AN4070
STM32F103xx based current control for inverter grid connection
Doc ID 022934 Rev 1
29/53
4
STM32F103xx based current control for inverter grid
connection
The current control method is based on a d-q synchronous reference frame which provides
both the advantage of zero steady-state error, thanks to the use of PI controllers, and simple
implementation. This method has been implemented on a 32-bit, ARM based
microcontroller (STM32F103xx) and its performance was verified through simulations and
experimental results.
A block diagram showing the five feedback signals processed by the microcontroller for the
correct operation of the control algorithm is shown in
Figure 18
.
Figure 19.
Block diagram of the implemented control
Every algorithm for grid-connected inverter operation is based on the estimation or direct
measurement of grid voltage frequency and phase angle. The detection method used in this
implementation for a single-phase inverter is based on a synchronous reference frame PLL.
Single-phase inverters require a virtual bi-phase system. In fact, to create a rotating d-q
reference, starting from a stationary frame, at least two independent phases are required.
This problem is overcome with the creation of a virtual voltage, V
β
, phase shifted with
respect to the real grid voltage, V
α
, of 90 degrees. This is done via firmware. Knowing the
two voltage components V
β
and V
α
, the transformation from the stationary reference frame
to the d-q rotating frame is given by the following equations:
Equation 39
where
θ
is the angle between the d-q reference frame and the stationary reference frame
(
Figure 27
). The reverse transformation is given by:
!-V
'&
'&
'&'&%RRVW
03376WHSXS
9LQ
9
,
,QSXW)LOWHU
'&
$&
6 61 6 61
3:0,QYHUWHU
FXUUHQWFRQWUROOHG
2XWSXW)LOWHU
FRXSOLQJ,QGXFWRU
6
6
9ROWDJH &XUUHQW
6HQVLQJ
6FDOLQJ
ELWȝ&8QLW
*ULG9ROWDJH &XUUHQW
6HQVLQJ
6FDOLQJ
$'
9
J
,
J
%XV9ROWDJH
6HQVLQJ
6FDOLQJ
$'
9
EXV
$'
*
5
,
'
⎥
⎦
⎤
⎢
⎣
⎡
⋅
⎥
⎦
⎤
⎢
⎣
⎡
θ
θ
−
θ
θ
=
⎥
⎦
⎤
⎢
⎣
⎡
α
β
V
V
cos
sin
sin
cos
V
V
q
d