You are on page 1of 6

Tiago Davi Curi Busarello August / 2014

Using dq-rotating reference frame in single phase system – Digital


implementation
This report presents how to use dq-rotating reference frame in single phase system. The dq-rotating reference
frame is mainly used in three-phase systems due to AC signals in abc frame be represented as DC singal in dq.
Therefore, the controller design is simplified. The application of dq frame in single phase system is known in the
literature.

The simulation file (PSIM) with automatic code generation used in this report is freely available on
https://sites.google.com/site/busarellosmartgrid/material-didatico-didactic-material/dq-
rotating%20reference%20frame%20in%20single%20phase%20system%20%E2%80%93%20Digital%20impleme
ntation.psimsch?attredirects=0&d=1

Fig. 1 presents the single-phase system showing the measured variables. The load is a RL.

Load
Fig. 1. Single-Phase system showing the measured variables.

Fig. 2 presents how to use dq-rotating reference frame in single phase system. A Phase-Locked Loop (PLL) is
required to make the dq-rotating frame rotating. In this case, the dq transformation rotates at the grid frequency
(60Hz). The voltage and current are transformed to dq quantities vd, vq, id and iq.
PLL θ
Single-phase PLL
vα’ vd
v αβ
i vβ’ vq
dq
θ
dq LPF
Low-pass Filter
vβ αβ LPF
Low-pass Filter

iα’ id
αβ
iβ’ iq
dq
θ
dq LPF
Low-pass Filter
iβ αβ LPF
Low-pass Filter

Fig. 2. How to use dq-rotating reference frame in single phase system.


Experimental Results
The αβ to dq transformation is given by (1).

vd   cos(θ ) sin(θ )   vα 


 =   (1)
vq   − sin(θ ) cos(θ )   vβ 

And the dq to αβ transformation is given by (2).

vα   cos(θ ) − sin(θ )   vd 


 =   (2)
vβ   sin(θ ) cos(θ )   vq 

The angle θ in the above-mentioned equations is supplied by the PLL. From these equations and in order to have
the d axis aligned to the voltage phase, the PLL should be synchronized according to the following figure.

Fig. 3. The PLL should be syncrhonized at 90 degree in the voltage phase. Orange curve: grid voltage; Purple:
PLL output signal θ.

Fig. 4 shows the grid voltage and current. The grid voltage RMS is 132V (186V peak).

Fig. 4. Grid voltage (orange) and current.

Fig. 5 presents the variables vd (channel 4) and vq (channel 3). These results were collected by means of the
DAC4922 (Digital to analog converter). A scale factor equals to 1/100 was applied in both signals. Therefore,
the channel 4 average valeu presented is equal to 189V (1.89 x 100). It corresponds to the grid peak votlage.
The vq is zero, as expected.
Fig. 5. Variables vd (green, channel 4) and vq (channel 3).

The real power (P) and reactive power (Q) at the PCC in dq-rotating rotating reference frame is given by (3) and
(4). Notice that the first term is ½ in single-phase system and 3/2 in three-phase system.

1
P =   ( vd id + vq iq ) (3)
 2

1
Q =   ( −vd iq + vq id ) (4)
2

Fig. 6 presents the grid voltage and current with the measured real and reactive power. The real power is 342W
and the reactive power is 96.5VAR. These powers were measured with the oscilloscope application key.

Fig. 6. Grid voltage and current with the measured real and reactive power.

Fig. 7 presents the P and Q obtained by equations 3 and 4 and experimentally collected by means of the
DAC4922. The channel 4 has a scale factor equals to 1/200 and channel 3 has 1/100. Therefore, the real power
obtained by using equation 3 is equal to 340W. Similarly, the reactive power obtained by using equation 4 is
equal to 92.3VAR. They are equal to those measured with the application key.
Fig. 7. Real power P (green, channel 4) and reactive power Q obtained by equations 3 and 4 and experimentally
collected by means of the DAC4922.

Fig. 8 presents the simulated circuit.


V Vteta
PLL
ADC 30k
v A0 D0 ZOH teta
A1 D1
i A2 D2
A3 D3 30k
A4 D4 ZOH
A5 D5
A6 D6
A7 D7
B0 D8
B1 D9
B2 D10
B3 D11
B4 D12 V Vd
B5 D13 200
B6 D14 K al d Vd
B7 D15
F28335 V Vq
be q Vq

teta

V
al d z
V
z be q
1 z

teta

V Id
20
K al d Id

V Iq
be q Iq

teta

V
al d z
V
z be q
1 z

teta

Real and Reactive Power


SPI with DAC4922 Calculation
V RealPower

1/2
20k V K SPI3
Vd
1/200 out
SPI3 ZOH K SPI
0 F28335
Id

Vq
20k V V_SPI3
ZOH 1/100
K
out
SPI4 SPI
Iq
F28335
0

V
ReactivePower

-1 1/2 SPI4
Vd K K

Iq

Vq

Id

Fig. 8. Simulated circuit.

You might also like