AP16098
UPS Main Control
XC164CS Implementation of Main Control
Application Note
16
V1.0, 2007-03
voltage
311
2
220
≈
×
(volts) can be normalized with a number 30967. So after being
attenuated by sampling circuit and knocked off by the DC offset, the AD convertion result
of the output voltage should be multiplied by 16.004 for normalization. The output value of
the voltage loop is also normalized to be limited between 48000 and –48000. Suppose that
the maximum positive value of the primary current is 130A and the attenuation coefficient
is
011
.
0
2000
/
22
=
, then the original AD conversion result is
1171
5
/
4096
011
.
0
130
=
×
×
.
Therefore all the AD conversion results of the primary current should be multiplied by
41
1171
/
48000
=
for normalization in order to be limited within the output range of voltage
loop.
The value of the
°
90
point of modulated sine wave is also detected in the T12 period-
match interrupt service routine. If short-circuit fault occurs on the output of the inverter, the
value of this point will be lower than the set value 400, which represents 68 volts of the
output voltage.
The zero-crossing point of the line voltage is calculated and detected to trigger the
CAPCOM2 external interrupt. In order to save operation time, the average value of the line
voltage is calculated instead of RMS. The relationship between the average value and the
RMS value is (for 50Hz):
11
.
1
)
50
2
sin(
311
02
.
0
220
02
.
0
0
=
⋅
×
×
∫
dt
t
U
rms
π
(
E-4
)
In this interrupt service routine, when lock signal is available, If the measured phase of
reference is less than
°
180
, the pointer for the reference sine table will be increased with 1
point. If it is larger than
°
180
, this pointer will be decreased with 1 point.