=
(1)
where: T
s
switching period, D duty cycle.
Neglecting the voltage drop across the LCL filter, the grid
voltage can be expressed as
g dc
u U D =
, where the duty cycle
sin( ) D m t = , (0 < t < ) is expressed as a function of
the modulation index
$
/ g
d
m u U = , where
$
g u is the peak grid
voltage and is the grid frequency in [rad/s]. Thus, a non
dimensional expression of current ripple can be written as:
( )
( )
'( ) 1 sin( ) sin( )
2
i
i
dc s
i
i t
i t m t t
U T
L
= =
(2)
The variable i
i
is plotted in Fig. 3 for a half period of the
grid voltage and it is a good way to estimate the maximum
ripple knowing the dc voltage, switching period, modulation
index for a given inductance.
0 0 . 0 0 1 0 . 0 0 2 0 . 0 0 3 0 . 0 0 4 0 . 0 0 5 0 . 0 0 6 0 . 0 0 7 0 . 0 0 8 0 . 0 0 9 0 . 0 1
0
0 . 0 5
0 . 1
0 . 1 5
0 . 2
0 . 2 5
t i m e [ s ]
D i , m a x
Fig 3. Time variation of the nondimensional current ripple ii for a half
period of the grid voltage
,max ,max
1 1
' ' arcsin
2 4
i i
i i
m m
   
= =
 
\ . \ .
(3)
Knowing the ripple current, the peak current through the
inverter can be calculated as:
,max
( )
( ) max sin( )
2
i
g
i
i t
i t i t
 
= +

\ .
$
(4)
where
g i
$
is the peak of the fundamental current, usually equal
with the filtered grid current. The expression (4) is very useful
in the design of the filter inductance with the respect to the
saturation level of the magnetic core.
Next, in order to further attenuate the current ripple to a
desired level, an LC second order filter is used as part of the
LCL filter.
The attenuation at the switching frequency can be
determined by plotting the bode plot of the transfer function:
2
( )
1
( ) 1
g
i f g
i s
i s C L s
=
+
(5)
where the grid impedance Z
s
has been neglected.
D/2
D/2
ii
uLi
Udcug
ii
Ts/4 Ts/4 Ts/4 Ts/4
Fig 2  The voltage accros Li and the inverter current ii
581
The trend is to minimize the filter volume by using lower
inductances and higher capacitances [6], knowing that
inductors are more costly and bulky than capacitors.
In turn, the control has to be more complex having to cope
with stability problems when operating on a weak grid. The
relative high currentripple calls for the use of highquality
magnetic cores like the amorphous ones in order to keep the
volume and losses on a low level.
In the case of the 3 kW inverter having U
d
= 350 V, m =
0.93, an LCL filter having a resonance frequency of 4.25 kHz
has been designed. The L
g
C
f
fitler was designed to get around
20dB attenuation of the inverter current (5) at the switching
frequency, as it can be seen in Fig. 4. where 19 dB attenuation
is obtained. Thus the gridside current ripple is highly
attenuated.
10
0
10
1
10
2
10
3
10
4
10
5
0
45
90
135
180
P
h
a
s
e
(
d
e
g
)
60
40
20
0
20
40
60
M
a
g
n
it
u
d
e
(
d
B
)
System: Zfil
Frequency (Hz): 1.7e+004
Magnitude (dB): 19.1
LgCfilter attenuation
19 dB at 17 kHz
Fig. 4 The frequency response of the LgCf filter at the output of the inverter
Here it should be mentioned that the grid impedance has a
positive effect by further increasing the ripple attenuation at the
switching frequency. So this attenuation analysis could be
considered worstcase.
The transfer function of the LCL filter in terms of inverter
current and voltage neglecting the resistances is [7], [9]:
( )
( )
2 2
2 2
( ) 1
( )
( )
LC
i
f
i i res
s z
i s
G s
u s L s s
+
= =
+
(6)
where
1
2
LC g f
z L C
( =
and
( )
2
2
i g LC
res
i
L L z
L
+
=
.
The grid side inductance L
g
will be connected in series with
the grid inductance and thus the attenuation and resonant
frequency (6) can vary significantly leading to instability.
Special attention has to be paid when designing the current
controller in order to ensure stability over grid inductance
variation.
III. CONTROL STRATEGY
The classical PI current control strategy with voltage feed
forward is depicted in Fig.5 and the new proposed control
strategy in Fig. 6.
i
i
*
i
i
G
PI
(s)
G
d
(s)
G
f
(s)
i
i
u
i
*
u
g
Fig. 5. The current loop of PV inverter with PI controller.
i
i
*
i
i
G
c
(s)
G
h
(s)
G
d
(s)
G
f
(s)
i
i
u
i
*
Fig. 6. The current loop of PV inverter with PR and HC
where u
i
* is the inverter voltage reference and i
i
* is the inverter
current reference.
The PI current controller G
PI
(s) is defined as:
( )
I
PI P
K
G s K
s
= +
(7)
The PI controller is not able to track a sinusoidal reference
without steadystate error and in order to get a good dynamic
response, a grid voltage feedforward is used, as depicted in
Fig. 5. This leads in turn to the presence of the gridvoltage
background harmonics in the current waveform. Thus, a poor
THD of the current will typically be obtained.
The P+Resonant (PR) current controller G
c
(s) is defined as
[5], [10]:
2 2
( )
c P I
o
s
G s K K
s
= +
+
(8)
The harmonic compensator (HC) G
h
(s) as defined in [3]:
( )
2
2
3,5,7
( )
h Ih
h
o
s
G s K
s h =
=
+
(9)
is designed to compensate the selected harmonics 3
rd
, 5
th
and
7
th
as they are the most prominent harmonics in the current
spectrum .
A processing delay typical equal to T
s
for the PWM
inverters [8] is introduced in
( )
d
G s
. The filter transfer function
G
f
(s) is expressed in (6).
The current error  disturbance ratio rejection capability at
null reference is defined as:
582
( )
*
0
( )
( )
( ) 1 ( ) ( ) ( ) ( )
i
f
g c c d f
i
G s
s
u s G s G s G s G s
=
=
+ +
(10)
where: is current error and the grid voltage u
g
is considered as
the disturbance for the system.
The Bode plots of disturbance rejection for the PI and PR
controllers are shown in Fig 7. As it can be observed, around
the fundamental frequency the PR provides 140 dB attenuation
while the PI provides only 17 dB. Moreover around the 5
th
and
7
th
harmonics the situation is even worst, the PR attenuation
being 125 dB and the PI attenuation only 8 dB. Moreover from
Fig. 7 it is clear that the PI rejection capability at 5
th
and 7
th
harmonic is comparable with that one of a simple proportional
controller, the integral action being irrelevant.
150
100
50
0
10
1
10
2
10
3
540
450
360
270
PR+HC
PI
P
Fig. 7. Bode plot of disturbance rejection (current error ratio disturbance) of
the PR+HC, P and PR current controllers.
Thus it is demonstrated the superiority of the PR controller
respect to the PI in terms of harmonic current rejection.
Then the tuning for the PR controller can be adressed
considering first the system without harmonic compensator.
The open loop and closed loop frequency response of the
system can be seen in Fig.8 and Fig 9 respectively.
The size of the proportional gain K
p
from PR controller
determines the bandwidth and stability phase margin [3], in the
same way as for the classical PI controller.
A gain equal to K
p
= 2 leads to a bandwidth of about 650Hz
as it can be seen on the closedloop current loop bode plot in
Fig. 9. This was considered satisfactory with respect to the
sampling frequency of 8.5 kHz.
From the openloop bode plot depicted in Fig. 8, the phase
margin (PM) is determined to be equal with 72 deg. indicating
a high stability.
The dominant poles of the controller are well damped as it
can be observed in Fig. 10 exhibiting a damping factor higher
than 0.9 that is not the technical optimum as recommended in
[1].
10
1
10
2
10
3
10
0
10
20
30
40
50
60
M
a
g
n
i
t
u
d
e
[
d
b
]
open loop
10
1
10
2
10
3
180
160
140
120
100
80
60
40
20
0
Frequency [Hz]
P
h
a
s
e
[
G
r
a
d
]
wi thout harm. comp.
wi th harm. comp.
wi thout harm. comp.
wi th harm. comp.
fund
3rd
5th
7th
PM=72 grd
crossover freq=460 Hz
Fig. 8.Bode plot of openloop PR current control system with and without
harmonic compensator
1 0
1
1 0
2
1 0
3
6
4
2
0
2
4
M
a
g
n
i
tu
d
e
[
d
b
]
c lo s e d lo o p
1 0
2
1 0
3
1 0 0
8 0
6 0
4 0
2 0
0
F re q ue nc y [Hz]
P
h
a
s
e
[
G
r
a
d
]
wi th ha rm . co mp .
wi tho ut ha rm. c o m p .
wi th ha rm . c o m p .
wi tho ut ha rm . c o m p .
3 rd
5 th
7 th
fund
B W =6 5 0 H z
3 d B
Fig.9. Bode plot of closed loop PR current control system with and without
harmonic compensator
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
/T
0.9/T
0.8/T
0.7/T
0.6/T
0.5/T
0.4/T
0.3/T
0.2/T
0.1/T
/T
0.9/T
0.8/T
0.7/T
0.6/T
0.5/T
0.4/T
0.3/T
0.2/T
0.1/T
closed loop poles/zeros
dominant poles
LCL resonance poles
Fig.10 Polezeros placement of closedloop current control system
583
This is because a more conservative approach has been
adopted leading to a smooth transient response but the system
is stable even if the grid impedance varies considerably.
Also the highfrequency poles from the LCLfilter are
inside the unitycircle indicating stability even without any
kind of damping.
The onesample delay of the system also increases the
stability by pushing the LCLfilter poles toward the unitycircle
centrum.
The integral constant K
I
acts to eliminate the steadystate
error [5]. Another aspect is that K
I
determines the bandwidth
centred at the resonance frequency, in this case the grid
frequency, where the attenuation is positive. Usually, the grid
frequency is stiff and is only allowed to vary in a narrow range,
typically 1%.
A value of K
I
= 100 was determined by simulations in order
to eliminate the steady error at the grid frequency as it can be
seen in Fig. 11 being able to cope with the 1% frequency
variations.
0 0 .0 1 0. 02 0. 0 3 0 . 04 0. 0 5 0 . 06 0. 07
 1 . 5
 1
 0 . 5
0
0 . 5
1
1 . 5
ig
ig*
Kp =2 Ki =1 00 Lg r id[ uH] =0 Rg r id [o hm] =0 Po ut [ W] =3 00 ( s ec )
A
m
p
litu
d
e
Fig.11. 50Hz response of the PR current control system
Having the fundamental component current controller
designed, the harmonic compensator is being added. In this
case, the integral constant K
Ih
has the same effect as for the
fundamental component i.e. eliminating the steadystate error,
just that the resonance frequencies are synchronous with the
3
rd
, 5
th
and 7
th
harmonics.
Having added the harmonic compensator, the openloop
and closedloop bode graphs changes as it can be observed in
Fig. 8 and Fig. 9 with dashed line. The change consists in the
appearance of gain peaks at the harmonic frequencies, but what
is interesting to notice is that the dynamics of the controller, in
terms of bandwidth and stability margin remains unaltered.
In this way a selective harmonic compensation can be
achieved without affecting the fundamental controller
dynamics.
IV. DISCRETE IMPLEMENTATION
The GI integrators expressed in (8) are actually double
integrators and in order to ease the discretization they are
decomposed in two simple integrators as it follows:
( )
( )
( ) ( ) ( )
( ) ( )
2 2
2
1
1
y s u s v s
y s s
s
u s s
v s y s
s
= (
=
+
(11)
Fig. 12 shows the block diagram of the GI equivalent form.
2
y
u
v
Fig. 12 GI integrator decomposed in two simple integrators.
In order to avoid an algebraic loop during discrete
implementation it is suggested that the direct integrator is
discretized using forward method while the feedback one is
discretized using the backwards method giving:
1 1 1
2
1
( )
k k s k k
k k s k
y y T u v
v v T y
= +
= +
(12)
Thus, the PR controller transfer function expressed in terms
of inverter voltage reference u
i
* and current error is:
( )
*
2 2
( )
I
i p
K
u s s K
s
 
= +

+
\ .
(12)
and can be written in discrete form as follows:
1 1 1
*
,
2
1
1
1
1
k k s I k s k
i k p k k
k k s k
k k
k k
k k
y y T K T v
u K y
v v T y
y y
v v
= +
= +
= +
(14)
The block diagram of the PR control implementation is
shown in the diagram from Fig. 12
i
i
*
i
i
i
i u
i
*
y
u
v
kp
kI
2
aw
G
f
(s)
Fig.12 Control diagram of the PR controller implementation
584
In Fig. 12, the antiwindup function implemented as:
max max
max max
,
,
y y y y
aw
y y y y
>
=
<
(15)
and has been added in order to avoid the well known winding
up problems.
For the PR+HC control, three additional GI are added as
described by (9) using the same implementation model.
V. EXPERIMENTAL RESULTS
A test setup consisting of one 3 kW PV fullbridge (H)
inverter with LCL filter having the resonance fequency at 4.25
kHz and 19 dB attenuation around the switching frequency for
the inverter current has been built, as depicted in Fig. 13.
The following equipment is been used: 400V/10A regulated
dc power supply to simulate PV panels string, digital scope
Tektronix TDS3014B and power analyzer PM100.
Fig.13 Experimental testsetup of the 3kW PV inverter
The control strategy has been implemented and tested on a
16bit fixedpoint TMS320F24xx DSP platform. The execution
time for the control loop was measured to about 40s, for the
PR including the harmonic compensator.
The system was tested in the following conditions: dc
voltage U
D
= 370 V, grid voltage U
g
= 226 V
RMS
with a THD of
1.46 % background disttortion. The grid impedance was
measured to 1.1 ohms with a series inductance of less then 30
H.
The grid voltage and current was measured using Tektronix
differential probe TP5205 and current probe TCP202
respectively. The data from the scope was acquired on a pc and
plotted using Matlab.
The grid current and grid voltage at 3 kW for PI, PR and
PR+HC controllers are shown in Fig.14, Fig.15 and Fig. 16.
In Fig. 17, a comparison of the spectrum for PI, PR and
PR+HC in the lower frequency region is shown. The levels for
IEEE 929 standard are also shown for reference.
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.0
25
20
15
10
5
0
5
10
15
20
25
time[sec]
Ig (exp) [5A/div]
Ug (exp) [100/div]
Fig.14 Experimental results at 3kW. Grid voltage and current with PI
controller.
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.0
25
20
15
10
5
0
5
10
15
20
25
time[sec]
Ig (exp) [5A/div]
Ug (exp) [100/div]
Fig.15 Experimental results at 3kW. Grid voltage and current with PR
controller
0 0. 005 0. 01 0. 015 0. 02 0.025 0.03 0.035 0.04
25
20
15
10
5
0
5
10
15
20
25
time[sec]
Ig (exp) [ 5A/ div]
Ug (exp) [ 100/ div]
Fig.16 Experimental results at 3kW. Grid voltage and current with PR+HC
controller
585
50 150 250 350 450 550 650
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
C
u
r
r
e
n
t
h
a
r
m
o
n
i
c
[
A
]
Frequency [Hz]
PI  [%]THD=12.665
P+RES  [%]THD=8.1655
P+RES+HC  [%]THD=5.4028
IEEE 929  [%]THD=5
Fig. 17. Experimental results at 3kW (a) grid voltage and current with PR
controller; b) The measured grid current harmonic spectrum for PI, PR and
PR+HC control strategies and the limits for IEEE 929
As it can be seen in Fig. 17, the PI controller fails to
comply with the IEEE 929 standard, exhibiting very large
harmonics content, especially the 3
rd
and the 5
th
with a THD of
12.65%. The steadystate error in amplitude was about 20 %
with a phase shift of about 7 deg.
Using PR controller without harmonic compensation, a
noticeable improvement is being obtained, as it can be seen in
Fig. 15 and Fig. 17. The THD was 8.16 % and the steadystate
error was negligible.
Enabling now also the harmonic compensator (PR+HC), as
depicted in Fig. 16 and Fig. 17 the 5th and the 7th harmonics
are more attenuated and the current THD decreases to 5 %, the
limit imposed by the IEEE 929 standard. As the 3
rd
harmonic is
still relative high, accounting for about 4 % of the funemental,
it is considered that implementing a deadtime compensation
technique can further reduce it. The used deadtime was 500 ns.
VI. CONCLUSIONS
A new control strategy based on P+Resonant (PR)
controller and harmonic compensator (HC) has been developed
and successfully tested on a DSPcontrolled 3kW PV inverter.
As it was shown, the gain of PR becomes infinity in a
narrow bandwith centered on the resonant frequency and
almost null outside the bandwith. This makes the PR controller
to act as a notch filter at the resonance frequency and thus it
can track a high frequency sinusoidal reference without having
to increase the switching frequency or adopting a high gain, as
it is the case for the classical PI controller.
Several resonant controllers have been added in order to
compensate selcted harmonics without influencing the
controller s dynamics.
A modest computaion burden of around 40 s was achieved
for PR+HC on a 16bit fixedpoint TMS320F24xx DSP
platform due mainly to an original discretization method.
Considerable lower current THD in comparison with the
classical stationary PI controller is obtained and compliance
with IEEE 929 standard can be achieved.
REFERENCES
[1] M. Kazmierkowski, R.Krishnan, F.Blaabjerg, Control in Power
Electronics. Selected Problems, Academic Press 2002, ISBN 012
4027725.
[2] C. Cecati, A. Dell'Aquila, M. Liserre and V. G. Monopoli, "Design of H
bridge multilevel active rectifier for traction systems", IEEE Trans. on
Ind. Applicat., vol. 39, Sept./Oct. 2003, pp. 15411550.
[3] X. Yuan, W. Merk, H. Stemmler, J. Allmeling StationaryFrame
Generalized Integrators for Current Control of Active Power Filters with
Zero SteadyState Error for Current Harmonics of Concern Under
Unbalanced and Distorted Operating Conditions IEEE Trans. on Ind.
App., vol. 38, no. 2, Mar./Apr. 2002, pp.523 532.
[4] P. Mattavelli A ClosedLoop Selective Harmonic Compensation for
Active Filters IEEE Trans. on Ind. App., vol. 37, no. 1,
january/february, 2001, pp. 81 89.
[5] D. N. Zmood, D. G. Holmes, Stationary Frame Current Regulation of
PWM Inverters with Zero SteadyState Error IEEE Trans. on Power
Electr., vol. 18, no. 3, May 2003, pp. 814 822.
[6] J. H. R. Enslin and P. J. M. Heskes, Harmonic interaction between a
large number of distributed power inverters and the distributed
network, PESC 2003, pp. 17421747.
[7] M. Liserre, F. Blaabjerg, and S. Hansen, Design and control of an LCL
filter based active rectifier, IEEE Trans. on Ind. App., vol. 38, no. 2
Sept./Oct. 2001, pp. 299307.
[8] D.G. Holmes and T. Lipo, Pulse Width Modulation for Power
Converters : Principles and Practice, 2003, ISBN 0471208140.
[9] R. Teodorescu, F. Blaabjerg, M. Liserre and A. DellAquila A stable
threephase LCLfilter based active rectifier without damping IAS
2003, pp. 1552 1557.
[10] HS.S. Song, R.Keil, P.Mutschler, J.Weem, K.Nam Advanced
Control Scheme for a SinglePhase PWM Rectifier in Traction
Applications IAS 2003, pp. 1558 1565.
586