AP16098
UPS Main Control
XC164CS Implementation of Main Control
Application Note
15
V1.0, 2007-03
4.3.5
ASC0
The ASC0 initialization for communicating with XC866 on the display board is
summarized as below (according to display order in DAvE):
“Module Clock”:
Enable module.
“Pin Selection”:
Full-duplex asynchronous operating modes; Use pin TxDA0 (P3.10);
Use pin RxDA0 (P3.11).
“Control ”:
8-bit data (asynchronous); One stop bit; Enable receiver (REN).
“Baud Rate”:
Additionally reduce serial clock to 2; Enable baud rate generator;
Required baud rate 9.6k.
“Functions”:
In “Initialization Function” select “ASC0_vInit”.
4.4
Some Programming Considerations
In CCU6 T12 period-match interrupt service routine, the output current and voltage,
primary current, line voltage, battery voltage and IGBT temperature are all sampled. Here
the dual-loop control strategy is utilized so the primary current and output voltage are both
involved to control the inverter. Figure 8 shows the block diagram of this control scheme.
R
LS
LRCS
RCS
+
+
+
2
1
1
+
RCS
R
Figure 8
Dual-loop Control Block Diagram
It can be calculated that the proportion coefficient
k
i
of the current loop is 1.4. The
equation for compensation link of the voltage loop can be described as
1
003
.
0
30
8
.
2
)
(
+
+
=
s
s
y
CL
(
E-1
)
The difference equation can be derived that
)
1
(
9835
.
0
)
1
(
506
.
2
)
(
0848
.
3
)
(
−
⋅
+
−
⋅
−
⋅
=
k
y
k
e
k
e
k
y
(
E-2
)
where
)
(
k
y
is the output value of the compensation and
)
(
k
e
is the error value.
The width of the SPWM signal which drives the inverter can be calculated by
+
×
=
1
5
.
0
softstart
cm
g
K
U
U
PW
(
E-3
)
where
softstart
K
is the modulation coefficient. To avoid inrush current at start-up, soft starting
operation is required. The value of
m
is
increased to get better performance for soft
starting.
The RMS value of the output voltage is also calculated to modify the reference sine
table to meet the voltage regulation specification. The maximum amplitude of the output