You are on page 1of 5

1

A
Simulations on UPS Inverter Employing Three-Level Hysteresis Function
Sliding-Mode Controller


L.Y. Lu
9861501


Department of Electrical Engineering
National Tsing Hua University, Hsinchu, Taiwan,
sofarcl3m03@gmail.com

ABSTRACT
This paper is mainly concerned with deriving a
sliding-mode controller for a single-phase UPS inverter.
Implementation of this controller is done by employing
a three-level hysteresis function. It keeps a switch in a
pair switching while the other turned on or off within
half of a cycle. This method considerably reduced the
switching frequency of the sliding-mode controller. To
verify the performance of this controller, simulations
employing MATLAB and PSIM have been made and
compared to conventional PI controller. Both linear
resistive and nonlinear rectifying loads are applied to
the output terminal. Results show that good power
quality and robust output voltage are obtained by
utilizing the sliding-mode controller.

Keywords: Sliding-mode, inverter, single-phase, UPS,
three-level hysteresis, nonlinear load.

I. INTRODUCTION
N uninterruptible power supply (UPS) inverter is
employed to deliver power to critical loads such as
equipments with rectifier inputs. A better performance one
is required to provide sinusoidal voltage output with low
total harmonic distortion (THD) under various load
conditions. Such conditions might include linear (resistive)
and nonlinear loads. Moreover, good rejection of
disturbances such as load changes and better dynamic
response are also requirements for a high performance UPS
inverter.
To meet above requirements, good control strategy is
indispensible. Conventionally, simple PI controllers are
employed. This results in poor ability of rejecting periodic
disturbances and thus large THD in the output voltages [1].
Recently, due to availability of low-cost microprocessors,
many control strategies become possible on UPS inverters.
These may include H-infinity control [2], adaptive
repetitive control [3], and sliding-mode control [4]. The
first one treats the control problem as a mathematical
optimization problem and tries to find a solver. This
method rather requires level of mathematical understanding
to apply it successfully and needs a reasonably good model
of the system to be controlled. The second one recognizes
the periodic error and eliminates it well. However, dynamic
response of this method is limited by speed of
microprocessors it employs.
The sliding-mode controller has been designed to
provide robust outputs against unknown load disturbances
and parameters variations. It employs high speed switching
control law to achieve finite time convergence on to the
sliding surface. After switching to the sliding-mode,
structure of the controller keeps changing discontinuously
due to the use of sign function. It consequently minimizes
the controllers sensitivities to parameters variation.
In this paper, a three-level hysteresis function [5] is
employed to construct the PWM function of the
sliding-mode controlled UPS inverter. Compared to
conventional two-level hysteresis function [6], it takes the
three-level nature of inverter output voltage into account,
and realizes a PWM function that is similar to the uni-polar
PWM technique. Simulations of the employed
sliding-mode controller have been made utilizing both
MATLAB and PSIM software. Comparison with
conventional PI controlled inverter has also been shown.

II. UPS INVERTER WITH SLIDING-MODE CONTROLLER
For the single-phase UPS inverter shown in Fig. 1, the
output LC filter and load can be written as:
o i
v v
dt
di
L =
(1)
o C
i i i + =
(2)
Where
s i
uV v =
in (1). Now let the state variables be
-
=
o o
v v x
1
and
-
=
o o
v v x
2
, where
) sin( ) ( t V t v
m o
e =
-
is
the reference output voltage. Then

2 1
x x = (3)
i
C
L
o
v s
V
C
i
o
i
i
v

B
T
+
A
T

A
T
+
B
T

Fig. 1. Single-phase UPS inverter.

2

) (
1
2
2 s s o
DV uV x x + + = e (4)
where
LC
o
/ 1 = e
and

) (
1
o o o
s
i L v v LC
V
D

+ + =
- -
(5)
which is considered as the disturbance term. Here the
equivalent series resistances of the inductor and capacitor
are neglected. Consider the load, if its pure resistive, then:

R
v
i
o
o

=
(6)
where R is the load value. If the load is an H-bridge
rectifier with output capacitor shown in Fig. 2, then:

< =
> + =
) 8 (
) 7 (
dc o
dc dc
dc
dc
dc o
dc
o
o dc o
v v
R C
v
v
v v
R
v
v C i


Under this condition, the state functions can be rearranged
as:
2 1
x x = (9)
( )
s s dc
dc eq
V D Lx x uV R
R LC
x ' + =
2 1 2
) (
1

(10)
) (
2 4
x abs x = (11)
for
dc o
v v >
, where
dc eq
C C C + =
,
dc
v x =
4
and

) (
1
- - -
+ + = '
o o o dc eq
s
Rv v L v R LC
V
D
(12)
And

2 1
x x = (13)

) (
1
2
2 s s o
V D uV x x ' ' + + = e (14)

dc dc
R C
x
x
4
4
=
(15)
for
dc o
v v <
, and

) (
1
- -
+ = ' '
o o
s
v v LC
V
D
(16)
Now the sliding surface is defined as:

3 2 1
x x x s | o + + =
(17)
where
1 3
x x = . So serving as the integral of the output
voltage error,
3
x
is designated to eliminate any
steady-state error that ever exists in the output which may
jeopardize desired power quality. The sliding mode can
therefore be written as

3 1 1
x x x | o = (18)
dc
R
dc
C
dc
v
o
v

Fig. 2. H-bridge rectifier with output capacitor.

1 3
x x = (19)
Let the Lyapunov candidate function be
2
3
2
1
2 2
1
x x V
|
+ =
(20)
which is positive definite (p.d.) if 0 > | . Then

2
1
x V o =

(21)
is negative definite (n.d.) if 0 > o . So the stable condition
of (12) and (13) is that o and | both being positive.
Now for stability of the approaching mode, when
2
5 . 0 s V = is chosen as the Lyapunov candidate function,
0 < = s s V

must be satisfied. Derivative of the sliding


function can be found as

) ( ) (
2
1
2
2
D u V x x s
s o o
+ + + = e e | o (22)
Let the control law ) sgn(s u = , then the following
conditions must be satisfied for stability issue:

= > < + + +
= < > + + +
) 24 ( 1 , 0 0 ) 1 ( ) (
) 23 ( 1 , 0 0 ) 1 ( ) (
2
1
2
2
2
1
2
2
u s D V x x
u s D V x x
s o o
s o o
e e | o
e e | o
Fig. 3 shows parts of the sliding surface and
corresponding boundary of stability that cross the ) , (
2 1
x x
plane. Since the disturbance D is actually a
time-dependent function,
1
D and
2
D in Fig. 3 can be
defined as

)) ( 1 ( ) (
2
1
t D V t D
s o
+ = e
(25)

)) ( 1 ( ) (
2
2
t D V t D
s o
+ = e
(26)
The
3
x
axis can be seen as pointing out of the paper. The
approaching mode is therefore stable if started within the
shaded region. To find the stability boundaries of ) (t D , it
can be derived from (5) that

( ) ) 1 (
1
) (
2
max max
e LC V i L
V
t D
m o
s
+ =
(27)
The corresponding boundaries of
1
D and
2
D can then
be found as

= =
max , 2 min , 1
D D ) ) ( 1 (
max
2
t D V
s o
e
(28)
(23) and (24) then become
1 1
2
2
) ( D x x
o
= | e o
2 1
2
2
) ( D x x
o
= | e o
1 2
x x o =

Fig. 3. s-plane and region of stability on ) , (
2 1
x x plane.

3

= > < + +
= < > + +
) 30 ( 1 , 0 0 ) (
) 29 ( 1 , 0 0 ) (
max , 2 1
2
2
min , 1 1
2
2
u s D x x
u s D x x
o
o
e | o
e | o
Now for the worst case of load disturbance being at the
peak amplitude of the output voltage, the initial conditions
can be derived as

RC
V
x x x
m
= = = ) 0 ( , 0 ) 0 ( ) 0 (
2 3 1
(31)
Here the load is considered as purely resistive for
simplicity. Since 0 > o , only (29) is of interest, which is

) ) ( 1 ( 0
max
2
min , 1
t D RC
V
V
D
RC
V
m
s o m
< > +
e
o o
(32)
And due to roots of the sliding surface are
|
.
|

\
|
= | o o 4
2
1
2
2 , 1
s
(33)

4
2
o
| <
(34)
Which gives the upper bounds of both o and | . Its
worth to note that since after the instant of load changing,
the
max
o
i
term in (27) will become small, so its
negligible when estimating
max
) (t D
.
Notice that in the state functions,
2
x introduces the
measurement of derivative of the output voltage, which is
forbidden when considering noise amplification. Therefore,
an alternative of measuring the current flowing through the
output filter capacitor that

C
i i
x
C C
-

=
2
(35)
is employed.
-
C
i
denotes the reference capacitor current
and is equal to
C v
o
-
.
Finally, in order to avoid control chattering, which may
leads to infinite switching frequency, a three-level
hysteresis function is introduced. By constructing it using
two two-level hysteresis, one of the switch in a pair is
switching while the other one stays on or off within half of
a cycle. By this approach, which is similar to the
conventional uni-polar PWM technique, the switching
frequency is reduced to a considerably low level. Also,
switching losses of the power devices are decreased. The
u
s
h
h
1 +
1
s
s
1 +
1 +
h
h
s
s
+
A
T

A
T

B
T
+
B
T

(a) (b)
Fig. 4. (a) Three-level hysteresis function. (b) Realized
using two two-level hysteresis function.
derived switching function is shown in Fig. 4, where h
denotes the corresponding hysteresis band.

III. COMPUTER SIMULATIONS
To construct computer simulations of an UPS inverter
with sliding-mode controller, several system parameters
have to be established. For the output LC filter, the cut-off
frequency should satisfy
s c o
f f f << <<
, where
o
f
,
c
f

and
s
f
denotes output fundamental frequency, filter
cut-off frequency and switching frequency, respectively.
With a conventional inverter is usually operated at 15 kHz
switching frequency, which is used by the PI controller to
be compared with, the cut-off frequency is chosen as

Hz 68 . 948 ~ =
o s c
f f f
(36)
Other system parameters are listed in Table 1.
According to the system parameters, (32), and (34), the
controller coefficients are chosen as /s 4900 = o and
2 6
/s 10 5 = | . The hysteresis band is selected as
s V/ 08 . 0 = h . Disturbances to be rejected are set as load
changes at both of the linear and nonlinear load buses,
while both changes have the amount of 500W.

A. MATLAB Simulations
The system is constructed by following instructions:
function
dx=func_sliding_nonlinear(t,x,L,C,Rl,Rh
,Vs,alpha,beta,h,Cdc,Rol,Roh)
global ss tt nn
dx=zeros(4,1);
Vm=110*(2^0.5);
vo_com=[ Vm*sin(2*pi*60*t);
2*pi*60*Vm*cos(2*pi*60*t);
-((2*pi*60)^2)*Vm*sin(2*pi*60*t)];
s=alpha*x(1)+x(2)+beta*x(3);
u=-sign(s);
if s<h && s>-h
if s ==0
u=0;
elseif s <0
if ss==0
u=0;
end
else
if ss==0
u=0;
end
DC bus voltage :
V 250 =
s
V

Output voltage peak :
V 2 * 110 =
m
V

Output fund. freq. :
Hz 60 =
o
f

Filter inductance : H 750 L =
Filter capacitance : F 5 . 37 C =
Linear load : O = 1 . 12 / 2 . 24 R
Rectifier capacitance :
F 400 C
dc
=

Rectifier load :
O = 133 . 16 / 2 . 24
dc
R

Switching freq. :
kHz 15 =
s
f

Table 1. System parameters.

4
end
end
ss=u;
if t <= (0.03+1/300+1/240)
R=Rl;
Ro=Rol;
else
R=Rh;
Ro=Roh;
end
dx(1)=x(2);
if (abs(x(1)+vo_com(1))-(x(4)))<0
dx(2)=(u*Vs-(x(1)+vo_com(1)))/(L*C)-
vo_com(3)-(x(2)+vo_com(2))/(R*C);
else dx(2)=((u*Vs-(x(1)+vo_com(1)))/L-
(Cdc +C)*vo_com(3)-(x(2)+vo_com(2))/Ro-
(x(2)+vo_com(2))/R)/(C+Cdc);
end
dx(3)=x(1);
if (abs(x(1)+vo_com(1))-(x(4)))<0
dx(4)=-x(4)/(Cdc*Ro);
else
dx(4)=abs(x(2)+vo_com(2));
end
if ((t-tt(nn))>=0) &&
((t-tt(nn))<=1.667e-6)
io=sign(x(1)+vo_com(1))*(Cdc*dx(4)+
x(4)/Ro)+(x(1)+vo_com(1))/R;
fid = fopen('io.m','a');
fprintf(fid, '%e %e\n', io ,t);
fclose(fid);
nn=nn+1;
elseif ((t-tt(nn))>=3*1.667e-6)
io=sign(x(1)+vo_com(1))*(Cdc*dx(4)+
x(4)/Ro)+(x(1)+vo_com(1))/R;
fid = fopen('io.m','a');
fprintf(fid, '%e %e\n', io ,t);
fclose(fid);
nn=nn+1;
end

Fig. 5 shows the resulting output voltage and current
waveforms. The voltage is rather robust under periodic and
large load disturbances. Fig. 6 shows a system trajectory
and the corresponding output voltage with initial condition
being
m o
V v = ) 0 (
and
0 ) 0 ( =
-
o
v
. The trajectory then
converges to s-plane within 1 ms.
o
v
o
i
50 V
5 ms
25 A
Load change

Fig. 5. Voltage and current output waveforms.
1 2
x x o =

Fig. 6. (a) System trajectory on ) , (
2 1
x x plane.
50 V
2 ms
o
v

(b) Corresponding voltage output.

B. PSIM Simulations
Fig. 7 shows the constructed PSIM simulation
environment. Fig. 8 illustrates the switching signals applied
on switches
+
A
T and

B
T , and the corresponding voltage
output. The switching behavior shown in Fig. 4 is then
verified. Fig. 9 and Fig. 10 shows the output voltage and
current waveforms with sliding-mode and conventional PI
controllers, respectively. Controller coefficients in
voltage-loop of PI controller are set as
100 =
p
k
and
7000 =
i
k
. Clearly, the sliding-mode controller possesses
better ability of noise reduction and disturbance rejection.

IV. CONCLUSION
In this paper, a sliding-mode controller for single-phase
UPS inverter is derived. By employing a three-level

Fig. 7. PSIM simulation environment.

5
+
A
T

B
T
o
v

Fig. 8. Switching signals on
+
A
T and

B
T , and
corresponding voltage output.
100 V
50 A
10 ms
o
v
o
i
Load change

Fig. 9. Output voltage and current waveforms employing
sliding-mode controller.
100 V
50 A
10 ms
o
v
o
i
Load change

Fig. 10. Output voltage and current waveforms employing
conventional voltage-loop PI controller.

hysteresis function, the required switching frequency is
decreased to a considerably low level. This results in that
the output LC filter designed under conventional 15 kHz
switching frequency is applicable to the sliding-mode
controlled inverter. Compared with conventional
voltage-loop PI controller, it also rejects disturbances and
reduces noise better. And in contrast with existing
disturbance rejecting controllers in the literature, the
simplicity of this sliding-mode controller is ineligible.

REFERENCES
[1] A. Kawamura and T. Yokoyama, Comparison of five different
approaches for real time digital feedback control of PWM inverters,
IEEE Proc. IAS, vol. 2, pp. 1005-1011, 1990.
[2] H. Ohmori, N. Narita and A. Sano, Plug-in adaptive controller for
periodic disturbance rejection, IEEE Proc. CDC, vol. 4, pp.
4529-4530, 1998.
[3] Y. Y. Tzou, S. L. Jung and H. C. Yeh, Adaptive repetitive control of
PWM inverters for very low THD AC-voltage regulation with
unknown loads, IEEE Trans. Power Electron., vol. 14, no. 5, pp.
973-981, 1999.
[4] S. L. Jung and Y. Y. Tzou, Sliding mode control of a closed-loop
regulated PWM inverter under large load variations, IEEE Proc.
PESC, pp. 616-622, 1993.
[5] O. Kukrer, H. Komurcugil and A. Doganalp, A three-level
hysteresis function approach to the sliding-mode control of
single-phase UPS inverters, IEEE Trans. Ind. Electron., vol. 56, no.
9, pp. 3477-3486, 2009.
[6] M. Carpita and M. Marchesoni, Experimental study of a power
conditioning system using sliding mode control, IEEE Trans. Power
Electron., vol. 11, no. 5, pp. 731-742, 1996.

You might also like