You are on page 1of 11

3‐Phase Inverter Control Loop Design

SmartCtrl Tutorial 
3‐Phase Grid‐Connected PV Inverter 
Control Loop Design

‐ 1 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

SmartCtrl1 is a general‐purpose controller design software specifically for power electronics applications. 
This  tutorial  is  intended  to  guide  you,  step  by  step,  to  design  the  inner  control  loop  in  dq  axis  of  a  3‐
phase grid connected PV inverter from its imported frequency response. The outer control loop design 
and the maximum power point tracking (MPPT) are not included in this tutorial. 
The figure below shows the PV inverter system with the current feedback.

PWM Modulator

P* Id*
2 p ⋅ vd + q ⋅ v q d a
id = ⋅
PI
+
3 vd2 + vq2 - b
q
c

2 p ⋅ v q − q ⋅ vd
iq = ⋅ Iq*
Q* 3 vd2 + vq2 id a
PI d
+ - b
iq q
c

There are different ways to control such a system. One approach is to use the axis decoupling by means 
of feedforward control as shown in the figure below. 

K sc

iˆd _ REF εˆd Rid d̂ d


+ + VVG 1
iˆd
- - + L⋅s + r
K sc ⋅ iˆd 1 Lω -
K sc VG Lω

1 Lω Lω
K sc ⋅ iˆq K sc VG
-
- εˆq + d̂ q VVG 1
iˆq
iˆq _ REF Riq + L⋅s + r
+ +

K sc

Due  to  the  axis  decoupling,  this  approach  requires  large  amount  of  computations.  For  low  cost 
applications (low cost µP, PIC, DSP or small FPGA), a simplified control strategy is needed, as shown in 
the  next  figure.  In  the  simplified  approach,  direct  PI  control  (without  feedforward  paths  for  axis 
decoupling) is used. 

1
 SmartCtrl is copyright in 2010 by Carlos III University of Madrid, GSEP Power Electronics Systems Group, Spain 

‐ 2 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

*
Id +
-
d̂ d 0.5·VDC ·(L·s + r )
Iˆd
PI
(L·s + r )2 + (ωL )2 +
+

0.5·VDC ·ωL
(L·s + r )2 + (ωL )2
*
Iq d̂ q
PI
+
-
0.5·VDC ·(L·s + r )
(L·s + r )2 + (ωL )2

+ Iˆq
0.5·VDC ·ωL -
(L·s + r )2 + (ωL )2

 
The  plant  (grey  colored  area)  can  be  rewritten  as  it  is  shown  in  the  figure.  The  obtained    transfer 
functions can be classified as follows: 
   ‐ Mutual transfer functions: 

⎛ Iˆ ˆ ⎞
     ⎜ d and I q ⎟
⎜ dˆ dˆ d ⎟⎠
⎝ q
   ‐ Self transfer functions: 

⎛ Iˆq ˆ ⎞
     ⎜ , and I d ⎟
⎜ dˆ dˆ d ⎟
⎝ q ⎠
Taking into account the symmetry of the balanced 3‐phase inverter system, two identical PI controllers 
can be tuned. In order to design this PI compensator, there are two possibilities: the converter plant can 
be  either  the  mutual  transfer  function  or  the  self  transfer  function.  Due  to  the  higher  bandwidth  and 
better stability, it is preferable to use the self transfer function.  
The first step will be to validate the theoretical self and mutual transfer functions by means of a PSIM AC 
analysis of the 3‐phase grid connected inverter.

‐ 3 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

1. AC Analysis in PSIM

The frequency response of the plant is obtained from the average model of the 3‐phase inverter in dq 
axis by means of the PSIM AC analysis, as shown below.

AC sweep AC source
control

The frequency response from the ac analysis is shown below: 

Before proceeding with the control loop design, we would validate the ac sweep results. The figure 
below  shows  the  frequency  response  obtained  with  PSIM  (green  trace)  and  from  theoretical 
analysis  (red  trace). The comparison shows that the simulation result matches very well with the
theoretical result.

‐ 4 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

60

40
m1 ( Freci)

(dB)
ci)
20

− 20
3 4
10 100 1×10 1×10
Frecuency
Freci (Hz)

100

0
degrees

1 ( Freci)− 100

− 200

− 300

3 4
10 100 1×10 1×10
Frecuency
Freci (Hz)

Once the frequency response is obtained, in PSIM, go to Utilities ‐> Launch/Export to SmartCtrl (or 
click on the icon Run and Export to SmartCtrl) to export the ac sweep result to SmartCtrl.  
The loaded transfer function in SmartCtrl is shown below. 

‐ 5 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

2. Control loop design with SmartCtrl

2.1 Select the sensor type: 
The feedback current sensor type is selected from a pull‐down listbox as shown below. 

In this case, the hall effect sensor is selected. Then define the sensor gain and the bandwidth (pole 
frequency) of the Hall effect sensor.

Sensor
gain

Pole frequency

‐ 6 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

2.2 Select the regulator type 

Select the regulator type of the regulator pull‐down listbox. 

The PI regulator is selected in this case. The PI regulator specification window is shown below.

Modulator
gain

R11 value

For an equivalent analog implementation of the compensator, it is necessary to set the modulator 
gain  and  the  value  of  the  resistance  “R11”.  In  this  case  the  resistance  value  is  not  important 
because the PI regulator to be implemented in PSIM is given by the values of the proportional gain 
and the time constant in s‐domain transfer function block diagram.
2.3 Select the crossover frequency and the phase margin 

Once  all  the  control  loop  transfer  functions  are  defined,  the  crossover  frequency  and  the  phase 
margin must be selected. Click on the "Set.." button and the solutions map will be displayed. 

‐ 7 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

Now,  select  the  crossover  frequency  and  the  phase  margin  of  the  loop  just  by  clicking  within  the 
white zone and click OK to continue. The selected pair (PM and fcross) will provided stable operation. 
Optimization process could be carried out in the main SmartCtrl window.

 
Once the crossover frequency and the phase margin have been selected, the solution map will be 
shown  on  the  right  side  of  the  input  data  window.  If,  at  any  time,  these  two  design  parameters 
need to be changed, just click on the shown solution map (See next figure). 

‐ 8 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

Now  accept  the  selected  configuration  and  confirm  the  design,  the  program  will  automatically 
show the performance of the system in terms of frequency response, etc.
The regulator components to be used in PSIM are the Kp and Kint values. 

Regulator
components

‐ 9 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

3. Closed loop performance

In order to check the closed loop performance of the regulator designed in SmartCtrl, a closed loop 
simulation with PSIM will be carried out. Both the simulation schematic circuit and the simulation 
results are shown below. 
AIcc_pwm V Va
V Vb
IGBT1 IGBT2 IGBT3
VVAB_pwm 100m V Vc
1 1m

1
6.2831 V wt VA_pwm
50 1
K
wt 500V
T a
IGBT4 IGBT5 IGBT6 Ia
gnd Ib b
Ic
c
0.3183m. 1.
0.3183m. 1. Id_fil
0.3183m. 1.
V Id_fil
Vmod_a Ia_fil a d Iq_fil
Vge1
V Ib_fil b q K
Vmod_a V
Ic_fil c o -1 ac
Vmod_b Vge2 V
wt Iq_fil
V
Vmod_b V

Vmod_c Vd
Vge3
V a V
Vmod_c V
a d vd*
b q K
b
Vtri V c o -1 vq*

1500Hz c
wt
V Vq

PI components 
calculated by 
P P_ref Id_ref
SmartCtrl 5k V
vd*
2/3 V
1.89538m K Id*
8.24078m
Id* PI d a Vmod_a vq*
15k abs
K q b Vmod_b 165m
Q_ref V
1.89538m
Id_fil 8.24078m o c
-1 Vmod_c Iq_ref
PI 15k vq*
wt 300m 2/3 V
Iq_fil K Iq*
Direct PI control vd*
abs
Iq*
Power References Generation
V
1.5 V p_dq 1.5 V q_dq
vd* abs
vd* K vq* K

Id_fil Id_fil vq*

vq* vd*

Iq_fil Iq_fil

 
Ia_fil Ib_fil Ic_fil

100.00

50.00

0.0

-50.00

-100.00

p_dq P_ref

30.00K
20.00K
10.00K
0.0K Active Power Step
-10.00K
-20.00K

q_dq Q_ref

20.00K
15.00K
10.00K
5.00K
0.0K
Reactive Power Step
-5.00K

Va Ia_fil
200.00

100.00

0.0

-100.00

-200.00
0.0 0.10 0.20 0.30 0.40
Time (s)
 

‐ 10 ‐  Powersim Inc.
www.powersimtech.com 
3‐Phase Inverter Control Loop Design

As it can be seen from the simulation results, the control loop, designed in SmartCtrl and validated 
in  PSIM,  provides  a  good  performance  to  the  3‐phase  PV  inverter  system  without  the  use  of 
feedforward decoupling loops.  
This  example  shows  that,  SmartCtrl  in  combination  with  PSIM,  with  the  capability  to  import 
frequency response results from PSIM, provide a fast and powerful platform for control loop design 
and optimization of any power converter systems. 

‐ 11 ‐  Powersim Inc.
www.powersimtech.com 

You might also like