Uploaded by Ahmad Hassan


See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/224213848
Single-phase grid-tie inverter control using DQ transform for active and
reactive load power compensation
Conference Paper · January 2011
DOI: 10.1109/PECON.2010.5697632 · Source: IEEE Xplore
4 authors, including:
Ehab El-Saadany
L. El Chaar
University of Waterloo
General Electric
L. A. Lamont
Mott MacDonald Group
Some of the authors of this publication are also working on these related projects:
Solving the nonconvex economic dispatch problem View project
Short Term Load Forecasting View project
All content following this page was uploaded by Ehab El-Saadany on 14 September 2015.
The user has requested enhancement of the downloaded file.
2010 IEEE International Conference on Power and Energy (PECon2010), Nov 29 - Dec 1, 2010, Kuala Lumpur, Malaysia
Single-Phase Grid-Tie Inverter Control Using
DQ Transform for Active and Reactive Load
Power Compensation
B. Crowhurst, E.F. El-Saadany, L. El Chaar and L.A. Lamont
Abstract—This paper presents a current control for single phase
grid connected inverters. The method allows for inverter active and
reactive power control. The method uses the Direct-Quadrature (DQ)
synchronous reference frame transformation for single-phase
converters. This method transforms an orthogonal pair consisting of
the inverter output current and a time shifted version of this current
from a stationary frame to a rotating frame synchronous to the
fundamental output frequency. Alternatives to using the time shifted
current are discussed. The steady state current components in this
rotating DQ frame are DC values and thus PI control methods
can be used with zero error. A household scale grid-tie inverter is
used as an example application of this method. A Simulink
simulation model and results where the inverter output is controlled
to match a local load's active and reactive power demand is
Index Terms— Pulse width modulated inverters, Reactive
power control, Power electronics.
istributed Generation (DG) systems offer secure and
implemented for the interconnection of certain renewable
energy resources to the grid [3].
Many DG systems are installed at residential or rural
locations which are often only served by a single phase of the
electrical distribution system. In these cases a single-phase
inverter is required. The FACTS systems previously mentioned
are typically larger scale three-phase systems, therefore if we
wish to implement equivalent power electronic converter
control algorithms in single-phase inverters they must either be
modified to suit that application or new algorithms must be
Some three-phase compensation algorithms also suffer from
the inability to generate sinusoidal current waveforms in the
utility side when utility voltages and/or currents are not
balanced [4] which could be a motive to further investigate
single-phase compensation techniques.
In the past, sine wave inverters used open loop feed- forward
control with output RMS voltage feedback to regulate the
magnitude for standalone applications. Grid-tie systems require
a more instantaneous control system to achieve lower Total
Harmonic Distortion, and improved disturbance rejection [5].
The application of time-invariant system theory to control
AC values is problematic and typically causes significant steady
state error in both amplitude and phase [6] referred to as
“following error” [5] which must be reduced by operating the
power converter at a very high switching frequency.
A common theory employed in active filters and reactive
power compensators that addresses this problem
Synchronous Reference Frame Theory (DQ). The advantage of
this theory is that the fundamental frequency components of an
AC signal are mapped to DC values. It has been shown to be
effective in the presence of harmonic distortion. One of the
inherent DQ transformation properties is that it can only be
applied to three-phase systems [7]. In single phase systems, the
instantaneous power contains sinusoidal components at twice
the grid frequency which complicates the grid connected system
[8]. This paper investigates a new method that overcomes the
problem listed above and applies the DQ transform to singlephase systems for the purpose of controlling active and
reactive power injection of a single phase inverter.
energy options, increase generation and
transmission efficiency, reduce greenhouse gas emissions,
improve power quality and system stability, cut energy costs and
capital expenditure, and alleviate the bottleneck caused by
distribution lines [1]. DG systems that are based on renewable
energy sources are intermittent source of energy and power
electronics converters are needed as interface to connect them to
the grid. Hence, Power electronic converters or inverters play an
important role in these systems particularly in cases where power
is generated in a format incompatible with the distribution system
such as the DC output of batteries, photovoltaic modules and
fuel-cells or the variable frequency AC output of variable speed
wind turbines. Moreover, such interface must be outfitted with
control strategies to maximize the power extracted from the
source and transferred to the grid without violating the grid
standards of quality [2].
Power electronic converters are also used for Active Power
Filtration and Power Factor Correction in Flexible AC
Transmission System (FACTS) systems such as the Static
Compensator (STATCOM) and the Unified Power Flow
Controller (UPFC). DG systems, which employ the same
A few alternative power electronic converter control
converters, are thus also capable of performing these functions.
methods that were reviewed but not implemented in this
FACTS technologies are extremely beneficial when
study are briefly described here.
B. Crowhurst and E.F. El-Saadany are with the Electrical and Computer
Engineering department, the University of Waterloo, Waterloo, Ontario
Canada. (e-mail: ehab@ uwaterloo.ca). L. El-Chaar and L. A. lamont are with
the petroleum Institute, Abu Dhabi, UAE. (e-mail: lelchaar@pi.ac.ae;
978-1-4244-8946-6/10/$26.00 ©2010 IEEE
A. Space Vector Transformation
The space vector transformation is another method used in
controlling power electronic converters. This method
overcomes a weakness of the DQ transform that there is a
strong coupling between the transformed coordinates (dq) [9].
B. Fuzzy Logic Control
Fuzzy logic controllers are another method of control for
power electronic converters. Fuzzy logic control is non-linear
and adaptive in nature, has robust performance under
parameter variation and load disturbance, and its
implementation does not require a sophisticated
microcontroller such as a DSP [10].
External connections to the inverter include a simple model
of the connection to the power grid and a similarly simple load
model to represent a load at the site of the DG to be
The single-phase inverter considered in this paper consists
of an IGBT based H-bridge and an LCL output filter. The
combination of the H-Bridge and LCL filter implemented as a
Simulink model is shown in Fig. 1. The inverter output voltage
and current measurement “sensors” are also shown in this
model. These signals are fed back to the control system which
generates the pulses or IGBT gate control signals. The signals
are generated such that in each leg of the bridge the bottom
transistor gate control is the inverse of the top to avoid creating
a low impedance path between the DC source terminals.
A. Power Grid Model
An infinite bus model of the power grid was used as shown
in Figure 2. This model consists of an AC voltage source and a
small RL branch component. The inclusion of the RL branch
allows for voltage variation at the point of common coupling
(PCC) dependent on load and inverter power injection.
Fig. 2. Power Grid Model
B. Load Model
The local load was modeled as two separate loads shown in
Fig. 3, one fixed and the other switched. This allows for the
observation of inverter response to changes in load. The
constant load is purely resistive whereas the switched load is
partially inductive. The switching of this load thus changes
both the active and reactive power demand of the total load.
The switch used is the ideal switch with infinite snubber
Fig. 1. Inverter circuit with H-Bridge, and LCL filter
A. H-Bridge
The H-bridge is also known as a full bridge. This is a simple
circuit topology with low component count which leads to low
cost and high efficiency [1]. This topology was chosen over a
half bridge which consists of only one pair of switches because
a lower DC voltage source is required. Half bridge inverters
require twice the DC voltage and two capacitors in series are
required to provide the neutral output. The H-Bridge is
modeled using the Universal Bridge Simulink model block
with two legs. The gates of the H-bridge are driven by a Pulse
Width Modulation (PWM) generator discussed in section V.
The average amplitude of the voltage output of the H-Bridge
in figure 1) over a switching cycle is directly
proportional to the commanded duty cycle of the inverter
(±100%) and the amplitude of the DC bus [5].
B. Output Filter
Inverters require an output filter to limit the high
frequency current ripple. There is a tradeoff between filter
component size and switching frequency. The former increase
inverter size and cost whereas the later increases switching
power loss. The output filter selected for simulation is the LCL
filter. This filter has gained popularity due to its smaller size
however it presents potential stability problems in control [11].
Fig. 3. Switched load used in simulation
A. DQ transform
As previously mentioned, the single-phase DQ transform is
an important element in the control circuit of the inverter
system. The DQ transform is an example of a state space
transform. The state of a system at any instant t0 is the smallest
set of variables which is sufficient to determine the behavior of
the system for all time t > t0 when the inputs to the system are
known [12]. This system state can be specified in many
different ways which means the state variable are not unique.
Alternative state representations can be obtained via linear
The three phase DQ transform can be implemented directly
from the ABC time varying signal space to the DQ space with
the linear transformation in (1) [3].
⎡vd ⎤
⎡sin ωt sin (θ − 2π 3) sin (θ + 2π 3) ⎤ ⎡va ⎤
⎢ ⎥ 2⎢
⎥⎢ ⎥
⎢ q ⎥ 3 ⎢cos ωt cos(θ − 2π 3) cos(θ + 2π 3) ⎥ ⎢vb ⎥
⎢v ⎥
⎢⎣1 2
⎥⎦ ⎢⎣vc ⎥⎦
⎣ 0⎦
where θ=ωt, and ω = electric system frequency
This transform can also be accomplished by first
transforming to the αβ space. The αβ space is used in PQ
theory and three phase voltages and currents are represented as
a single vector which rotates about the stationary
orthogonal axes thus α and β projections of sinusoidal abc
values are themselves sinusoidal.
The transformation from αβ space to DQ can then be
achieved by effectively rotating the αβ frame at the
fundamental frequency as shown in Figure 4. In this rotating
frame the resulting D and Q vectors will be constant for
sinusoidal signals at the fundamental frequency. What this
indicates is that the transformation to the synchronous frame
requires two orthogonal components, the equivalent of the αβ
components of three-phase systems. In other words, to achieve
an orthogonal plane, the projections of two or more variables
are necessary [3]. This is a problem in single-phase systems.
Fig. 4. Rotating DQ Frame
In order to get around this requirement several methods
have been suggested to generate the missing orthogonal vector.
One method involves using the capacitor current of an output
LC filter as in [5]. This current is 90 degrees out of phase with
the output voltage. Another is to use a quarter period time
delayed version of the signal as the orthogonal vector as in [7].
This is the method that is examined here.
If we consider a current signal to be transformed to the DQ
frame using the time delay method we can refer to the actual
current signal as the real current, ir, and the time delayed
version the imaginary current, ii, where the real current
corresponds to the α and the imaginary to the β. Equations for
ideal sinusoidal versions of these currents are given in (2.a) and
i r = A sin (ωt + δ )
ii = A sin (ωt + δ − π 2 ) = − A cos (ωt + δ )
The linear transform corresponding to the rotation of the αβ
frame is given in (3). Note that this transform is different if
cos(ωt) is considered the reference (i.e. replace sin(ωt) with
cos(ωt) and cos(ωt) with -sin(ωt)).
⎡I d ⎤
⎡sin ωt
I dq = ⎢ ⎥ = TI ri = ⎢
⎣cos ωt
⎣I q ⎦
− cos ωt ⎤ ⎡ I r ⎤
⎥⎢ ⎥
sin ωt ⎦ ⎣ I i ⎦
Equations (4) and (5) gives the resulting id and iq values for
this ideal sinusoidal case. These values are constant DC
values for fixed amplitude and phase input as previously
i d = A sin (ωt + δ ) sin (ωt ) + A sin (ωt + δ − π 2)(− cos(ωt ))
= A cos δ
i q = A sin (ωt + δ ) cos(ωt ) + A sin (ωt + δ − π 2)(sin (ωt ))
= A sin δ
It should be noted here that DC components of the original
signal are mapped to AC signals at the fundamental
frequency in the rotating DQ frame. Thus the presence of a
DC component will result in control system oscillation and
make zero steady state error impossible. In order to transform
back to the real and imaginary frame the inverse transform is
applied as shown in (6). Again, if cos(ωt) is considered the
reference this transform must be modified (i.e. replace sin(ωt)
with cos(ωt) and cos(ωt) with-sin(ωt)).
⎡I r ⎤
⎡sin ωt
I ri = ⎢ ⎥ = T −1 I dq = ⎢
⎣cos ωt
⎣ i⎦
cos ωt ⎤ ⎡ I d ⎤
⎥⎢ ⎥
− sin ωt ⎦ ⎣ I q ⎦
B. Simplified technique
Other techniques for implementing the single-phase
DQ transform avoid the need for a second orthogonal variable
by using notch filters tuned at twice the line frequency
[13][6]. In this case the transform is applied with i q = 0.
The resulting derivation is shown in equation series (7) and
It can be seen that similar results to the original are
obtained however a double line frequency sinusoid is
added. It is this double frequency component that must be
filtered in order to obtain the DC quantities desired for zero
steady state error.
This simplified technique was simulated without the use of
notch filters and because of the DC component in the D
and Q components, zero steady state error was possible. This
was the method that was described for the in-class
presentation. The results of this simulation are not presented
in this report as it was decided to implement the time delay
version instead.
i d = A sin (ωt + δ ) sin (ωt )
= A (cos δ ) sin 2 (ωt ) + (sin δ )(sin ωt ) cos(ωt )
( cos δ ) − A [sin δ sin (2ωt ) − (cos δ ) cos(2ωt )]
i q = A sin (ωt + δ )(− cos(ωt ))
= − A (sin δ ) cos 2 (ωt ) + (cos δ )(sin ωt ) cos(ωt )
(sin δ ) − A [sin δ sin (2ωt ) + (cos δ ) cos(2ωt )]
C. DQ Transform Circuit
The simulation model used to implement the single-phase
DQ transform is shown in figure 5. The generation of the sine
and cosine signals involved is discussed in the next section.
The transport delay achieves the π/2 phase shift. This
transport delay can easily be implemented using a digital
controller shifted queue [6].
Fig. 5. Time Delay Single Phase DQ Transform
The inverse transform is implemented at the load following
control level discussed in the next section. Only the “real”
signal needs to be generated in this case.
A. Control Circuit
The load following control circuit is shown in Figure 6. This
circuit includes sine and cosine reference generation, two DQ
transform blocks, D and Q PI controllers and the inverse DQ
commanded current and the inverter output current is
subtracted to generate D and Q error signals which are then
fed into PI controllers. The PI controllers adjust their output
so as to eliminate this error.
The PI controller output is then transformed back to the
stationary frame using only the “real” portion of the inverse
transform shown in (6). This output is used to command the
PWM generator which controls the output voltage of the Hbridge. Because the simulated example inverter control
attempts to match both the active and reactive components of
the load current the error signal could be generated in the
stationary frame before the DQ transform and thus only one
DQ transform block would be required. This topology was
not used because the ability to control active power
independent of load is a more likely scenario for a grid-tie
inverter. In this case only the Q component of the load current
would be required to achieve reactive power compensation.
D. Pulse Width Modulation Pulse Generator
The control loop is completed with the PWM pulse
generator which can be seen in the top level simulation
schematic shown in Figure 7. The output of the load following
control circuit is used to modulate the PWM gate signals. A
modulation process example is shown in Figure 8. By changing
the amplitude and phase of the command signal to the PWM
generator the magnitude and phase of the inverter output
voltage can be controlled. The load following current controller
thus adjusts the inverter output voltage such that the inverter
output current matches the load current in both phase and
magnitude. The Simulink PWM generator block was used to
generate the gate pulses as it is easily configured to generate
the appropriate output for an H-bridge.
Fig. 6. Load Following Control Circuit
B. Reference current generation
This circuit uses a Phase Lock Loop (PLL) to generate the
sine and cosine references from the PCC voltage. The load
current is determined by subtracting the output current from
the grid current. This technique was used because measuring
load current directly in a residential situation may be difficult
as grid-tie inverter typically connect directly to the main
household breaker panel making measurement of load
current independent of inverter current infeasible. This
indirect measurement technique could cause controller
stability problems particularly under zero load conditions and
thus a different connection location for the inverter output
that would allow for direct measurement of the load current
would be preferred.
C. PI Control in the DQ Reference Frame
Both the inverter output current and the load current are
transformed to the DQ frame. The load current is used as the
Fig. 7. Top level simulation circuit
Fig. 8. Pulse Width Modulation
A time domain simulation of the circuit shown in Figure 7
and previously described was carried out in the MATLAB
Simulink environment. The total simulation time was 0.45
seconds and the inductive load was switched in at 0.15 seconds
and out at 0.3 seconds. The simulation circuit parameters are
shown in Table I.
reactive power are increased. This can be seen as the current
magnitude increases and phase shift to compensate. After the
second switching event the current returns to its original
magnitude and phase.
A. H-Bridge Output Voltage
The output voltage and current of the H-bridge while
operating at unity power factor are shown in Figure 9. Note
that the voltage and current are out of phase due to the fact that
the inverter must compensate for the output filter in order
to achieve unity power factor at the filter output.
C. Active and Reactive Power
PWM Switching frequency
Universal Bridge Parameters
Inductance 1
Inductance 2
AC peak voltage
Constant load active power
Constant load reactive power
Switched load active power
Switched load reactive power
Proportional Control gain
Integral Control gain
DQ transform Transport delay
Switched load turn on time
Switched load turn off time
Simulation length
f pwm
L F1
L F2
R line
L line
P load1
Q load1
P load2
Q load2
t delay
t on
t off
t simulation
Fig. 10. Inverter PCC Voltage and Output Current
5 kHz DC
Default Filter
4 mH Filter
2 mH Filter
10 ℜ F Feeder
0.1 ∂ Feeder
0.69 mH Grid
340 V
5 kW
0 kVAR
5 kW
5 kVAR
1 / 240s
0.15 s
0.30 s
0.45 s
Fig. 9. H-Bridge Output voltage and current when operating at Unity PF
B. Voltage and Current
The inverter output voltage at the PCC and the inverter
current throughout the simulation are shown in Figure 10.
Before the first switching event the load is purely resistive and
thus the inverter output current is in phase with the
voltage. At the first switching event the load power and
The inverter output active and reactive power was measured
with a Simulink PQ measurement block. The output of this
block is shown in Figure 11. It can be seen that the inverter
output active and reactive power track the load with zero
steady state error. Overshoot could be eliminated by adjusting
the PI control gains however this may result in longer durations
to achieve zero error.
Fig. 11. Inverter Output Active and Reactive Power
D. DQ Transform of Inverter Output Current
The inverter output current, time shifted output current, D
component of the output current, and Q component of the
output current are shown over the duration of the simulation in
Figure 12. The D and Q components using the time shift DQ
transform are seen to be DC values in the steady state. It can be
seen that using the time shifted current in the DQ transform
contributes to D and Q error during magnitude and phase
transitions. This is because the time shifted current is not
completely orthogonal to the current during these periods.
E. DQ Error and PI Control Output
The D error, D PI controller output, Q error, and Q PI
controller output are shown in Figure 13. The high frequency
current spikes resulting from the switching of the inductive
load are seen in the Q error and also in the Q PI control
output. The DQ transform can also be applied in higher
order harmonic cancellation as discussed in [7].
This paper presented a description of the synchronous rotating
frame current control for single-phase inverters. The method
uses a time delayed version of the original output current signal
as the orthogonal variable used in the linear transform to the
synchronous frame. An example application of this control for
a household scale grid-tie inverter system was described.
Simulink models of this application were presented which
demonstrate local load following using switched inductive
load. Time domain simulation results of this example have
been presented. These results demonstrated the active and
reactive load power demand compensation capabilities of this
control method.
Fig. 12. Inverter Output Current, Time Shifted Inverter Output Current, D
component of output current, Q component of Output current.
Y.Xue, L. Chang, S.B. Kjær, J. Bordonau, and Toshihisa Shimizu,
“Topologies of Single-Phase Inverters for Small Distributed Power
Generators: An Overview ,” IEEE Transactions on Power Electronics,
vol. 19, pp. 1305-1314,.Sept. 2004
[2] F. Blaabjerg, R. Teodorescu, M. Liserre, and A. Timbus, “Overview
F. PWM Modulation Signal
of control and grid synchronization for distributed power generation
An example waveform showing the combination of the D
systems,” Industrial Electronics, IEEE Transactions on, vol. 53, no 5,
and Q PID output after having performed the inverse DQ
pp. 1398-1409, Oct. 2006.
transform is shown in Figure 14.
[3] J. D. Glover, M. S. Sarma, and T. J. Overbye, Power System Analysis
and Design (4th Edition), Toronto: Thomson, p. 228-235, 1950.
M. Tarafdar. Haque, “Single-Phase PQ Theory,”in Proceedings of
Power Electronics Specialists Conference, Vol. 4, pp. 1815-1820,
M.J. Ryan and R.D. Lorenz, “A synchronous-frame controller for a
single phase sine wave inverter,” in Proceedings of Applied Power,
Electronics Conference., Vol. 2 , pp. 813-819, 1997.
R. Zhang, M. Cardinal, P. Szczesny, and M. Dame, “A grid Simulator
with Control of Single-Phase Power Converters in D-Q Rotating
Frame,” Power Electronics Specialists Conference, Vol. 3, pp. 14311436, 2002.
M. Gonzales, V. Cardenas and F. Pazos, “DQ Transformation
Development for Single-Phase Systems to Compensate Harmonic
Distortion and Reactive Power,” 9th IEEE International Power
Electronics Congress, pp. 177-182, 2004.
S. Silva, B. Loopes, B. Filho, R. Campana, and W. Bosventura,
“Performance evaluation of pll algorithm for single-phase grid
connected systems,” Industry Applications Conference, 2004, 39th IAS
Annual Meeting, Conference Record of the 2004 IEEE, vol. 4, pp.
2259-2263, Oct. 2004
[9] J. M. Aller, A. Bueno, T. Paga, “Power system analysis using spacevector transformation,” IEEE Transactions on Power Systems., Vol.
17 , pp. 957-965, Nov. 2002.
Fig. 13. D error PI control input, D PI control output, Q error PI control input,
Q PI control output.
[10] S. Premrudeepreechacharn, T.Poapornsawan, “Fuzzy logic control
of predictive current control fro grid-connected single phase
inverter,” IEEE Photovoltaic Socialists Conference, pp. 1715-1718,
[11] H.R. Karshenas, H. Saghafi, “Basic Criteria in Designing LCL Filters
for Grid Connected Converters,” IEEE International Symposium on
Industrial Electronics, Vol. 3, pp. 1996-2000, 2006.
[12] B.P. Lathi, Linear Systems and Signals, Carmichael, CA:Berkely
Press, p. 595, 1992.
[13] U.A. Miranda and L.G.B. Rolin, “A DQ Synchronous Reference
Frame Current Control for Single-Phase Converters,” Power
Electronics Specialists Conference, pp. 1377-1381, 2005.
Fig. 14. Combination of D and Q PID output after the inverse DQ transform to
form PWM modulation signal
View publication stats