Anda di halaman 1dari 6

Realizing Space Vector Modulation in

MATLAB/Simulink and PSCAD


Yan Ma, Student Member, IEEE, Lingling Fan, Senior Member, IEEE, Zhixin Miao, Senior Member, IEEE

Abstract—Space vector modulation (SVM) is a frequently used II. T HEORY OF S PACE V ECTOR M ODULATION
method to implement pulse width modulation (PWM) in three-
phase switching converters. SVM allows us to maximize the A. Space Vector
exploitation of the converter hardware. Compared to sine PWM, For a balanced three-phase voltage source, the phase volt-
SVM can achieve a higher AC voltage level (15% more in magni-
tude). This paper develops SVM models in Matlab/Simulink and
ages are lagging each other every 120◦ . We can write the
PSCAD, two most popular packages for power system dynamic instantaneous and phasor formats of the phase voltages as
studies. Theory of space vector will be clearly explained to present follows:
the principles of SVM based sinusoidal waveform synthesis. The  √
three unique contributions of this paper include: (i) A sawtooth va (t) = √ 2|V |cos(ωt + θ)

triangular waveform is used to generate repeating switching v (t) = 2|V |cos(ωt + θ − 2π 3 )
(1)
period for digital control. (ii) A technique to integrate blocks with  b √ 2π
vc (t) = 2|V |cos(ωt + θ + 3 )

different sampling rates is employed to generate SVM pulses.
(ii) Both Matlab/Simulink and PSCAD models are developed.
¯
 jθ
The developed models are very useful to develop detailed SVM Va = |V | θ = |V | e

enabled power converters in power system studies. A step by step
= |V | ej (θ− 3 )

tutorial of the model development procedure and the simulation V¯b = |V | θ − 2π


3
(2)
= |V | ej (θ+ 3 )

¯ 2π
Vc = |V | θ + 2π

results are provided to demonstrate the accuracy of the SVM
3
models.
Index Terms—Space Vector Modulation (SVM), MAT- To represent the above three vector, a space vector is defined
LAB/Simulink, PSCAD as following:
2π 2π

I. I NTRODUCTION v~s = va ej0 + vb ej 3 + vc e−j 3 (3)

V Ariable voltage and frequency supply for ac drives is


usually obtained from a three-phase Voltage Source
Inverter (VSI). A number of PWM techniques have been
Combining (1) and (3) leads to the space vector of balanced
three-phase voltages:
3√ 3 √ ¯ jωt
developed in the past to obtain variable voltage and frequency v~s = 2 |V | ej(ωt+θ) = 2Va e (4)
supply. The most popular ones are carrier-based sinusoidal 2 2
PWM and space vector modulation (SVM) PWM [1]. The Therefore, the three-phase positive sequence voltages are
output voltage per phase for a sinusoidal PWM based three- resolved into one space vector with a constant magnitude and
phase converter is limited to 0.5Vdc (peak value) and the line- rotating counter clockwise at a speed of ω. For a negative
to-line RMS voltage is 0.612Vd . SVM is another direct digital sequence set, √
the space vector will rotate in clockwise at speed
PWM technique proposed in 1982 [2]. It has become a basic of ω: V~s = 32 2V¯a e−jωt .
power processing technique in three-phase converters [3].
SVM based converter can have a higher output voltage output
B. Three-Phase Two-Level Inverter
at 0.707Vdc (Line-to-line, RMS). Therefore, SVM improves
ac voltage by 15.15% [4]. Furthermore, SVM algorithms can
be easily implemented using digital controllers [5]. A model
of SVM on MATLAB/Simulink has been developed [1].
Matlab/Simulink and PSCAD are two most popular software A
n
Vdc

packages for power electronics and power systems studies. The O B


main focus of this paper is to develop models of SVM on both C
MATLAB/Simulink and PSCAD.
The paper is organized as follows. The theory of SVM is N
explained in Section II. This is followed by the digital control
methods in Section III. The MATLAB/Simulink and PSCAD Fig. 1. Three Phase Inverter.
models for SVM are described in Section IV and Section V.
Finally the simulation results are given. Fig. 1 shows a typical three-phase inverter. The instanta-
neous values of per-phase output voltages (vAN , vBN and
Y. Ma, L. Fan and Z. Miao are with Dept. of Electrical Engineering,
University of South Florida, Tampa FL 33620. Emails: yanma@mail.usf.edu, vCN )can be either Vdc or 0. So we use the following equations
linglingfan@usf.edu and zmiao@usf.edu. Phone: (813)974-2031. to represent the per-phase output voltages.
978-1-4799-1255-1/13/$31.00 ©2013 IEEE
 In Fig. 2, vector Vs1 shows the limit of the linear operation
vAN = qa Vdc
 when the space vector is the side of the hexagon which is built
vBN = qb Vdc (5) by the six reference vector of the inverter. The dotted circle
is the rotating trajectory of Vs1 . When it touches the hexagon,

vCN = qc Vdc

the magnitude of Vs1 is 0.866Vdc [1]. From (4), the peak value
where qa , qb and qc can be 1 or 0. The synthesized space of the per phase output voltage will be 0.577Vdc . The RMS
vector from (5) will be: value of the output voltage will be 0.707Vdc . Considering the
v~s = (qa ej0 + qb ej

3 + qc e−j

3 )Vdc (6) output voltage of a sinusoidal PWM inverter is 0.612Vdc , the
SVPWM has about 15% higher output voltage limit.
The objective of SVM is to find qa , qb and qc for each time
instance to synthesize a space vector rotating at ωs speed with V ts
a desired magnitude. There are eight kinds of combinations of
qa , qb and qc . The resulting space vector for each combination
is listed in Table I.
O t

TABLE I
O UTPUT S PACE V ECTOR θs1

qc qb qa Vs Fig. 3. Sample time Ts .


0 0 0 0
0 0 1 Vdc ej0
0 1 0

Vdc ej 3
For a certain vector Vs , the phase angle of the vector can be
0 1 1 jπ
Vdc e 3 used to identify which sector it is located. Further, the vector
1 0 0 Vdc ej
−2π
3
Vs can be synthesized by two of the inverter’s output vectors
1 0 1 Vdc ej −π
3
as shown in Fig. 4.
1 1 0 Vdc ejπ
1 1 1 0 V2(011) V3(011)
Sector 2
Note that there are two zero vectors. Fig. 2 shows the
Vs2
position relationship of the vectors. V1 to V6 are the output θs2 Sector 1
space vectors of the inverter due to six switching combinations. Vs1

Vs is the space vector calculated from the desired balanced θs1


three-phase voltage at an instant. Vs is rotating in the plane V1(001)
from sector 1 to 6 at a speed of ω.
Fig. 4. Vector Decomposition.
Sector 2
In Fig. 4, Vs1 = AV1 + BV3 + CV0 , where V0 is zero vector
and A + B + C = 1. For a vector located in Sector 1 during
Sector 3 V2(0 1 0) V3(1 0 1) Sector 1
a period of time Ts , the inverter output should be as V1 (001),
Vs ATs and V3 (011) for BTs , and the rest time a zero vector.
V6(1 1 0) V1(0 0 1) Assume that a desired space vector Vs1 = 32 |V | ejθs1 is in
O
Sector 1, in order to synthesize this voltage vector, we should
Vs1
Sector 4 V4(1 0 0) V5(1 0 1) have
Sector 6 
|Vs1 |(cos θs1 −sin θs1 cot π
3)
Ta = ATs = Ts

 Vdc
π
Sector 5 |Vs1 | sin θs1 sec 3 (7)
 Tb = BTs = Vdc Ts

CT = T = T − T − T
Fig. 2. Vector Sectors. s 0 s a b

where θs1 is the angle between Vs1 and V1 . Fig. 4 shows two
space vectors in Sector 1 and Sector 2 in the sector plane. The
C. Synthesizing a Space Vector from Switching vector decomposition of the space vector is given. For Vs2 , the
Fig. 3 shows that for a small sample time Ts , which is much principle is the same with Vs1 except that Vs2 is synthesized
smaller than the desired low-frequency sinusoidal waveform from V2 , V3 and V0 .
1
period 60 , the space vector can be assumed as constant. The Once the time zone Ta , Tb and T0 are determined, we just
objective of SVM is to synthesize this space vector through need to control the inverter’s gates play as the specific mood
appropriate switching during the period of Ts . By making in different time zone. We choose a space vector in Sector
the average value of the inverter output space vector the 1 as an instance. In Ta , which is shown in yellow in Fig. 5,
same as the ideal three-phase voltage space vector, then the the inverter’s output voltage should be (0, 0, 1) in the order of
fundamental component of the inverter output voltage would Phase C, Phase B and Phase A as V1 . In Tb , which is shown
be the same as the balanced three-phase voltage. as blue, it should be like V3 as (0, 1, 1) which means vBN
and vAN have an output as Vdc ; for the rest time T0 , inverter TABLE II
should behaves as V0 (0, 0, 0) or V7 (1, 1, 1). The detailed phase PARAMETERS OF S EQUENCE VOLTAGE IN T IME Z ONE
output voltage is shown as follow Fig. 5: Sector P hase Ta Tb
qa 1 1
Ts Sector 1 qb 0 1
0.25T0 0.25T0
qc 0 0
qa 1 0
0.5Ta 0.5Tb 0.5T0 0.5Tb 0.5Ta Sector 2 qb 1 1
Vdc
0 1 1 1 1 1 0 VAN qc 0 0
0 qa 0 0
Sector 3 qb 1 1
Vdc qc 0 1
VBN
0 0 1 1 1 0 0 qa 0 0
0
Sector 4 qb 1 0
qc 1 1
Vdc
VCN qa 0 1
0 1 1 1 1 1 0
0 Sector 5 qb 0 0
T1 T2 T3 T4 T5 T6 T7 qc 1 1
qa 1 1
Fig. 5. Voltage Sequence for Space Vector in Sector 1. Sector 6 qb 0 0
qc 1 0
In order to make every Ts all three-phase voltage be-
gin at 0 and switch two times in one sample time Ts
reference time is added to select output mood of the inverter
and make it symmetrical, the time sequence is placed as
T0 Ta Tb T0 Tb Ta T0 as shown in Fig. 7. The inverter’s output can be determined
4 , 2 , 2 , 2 , 2 , 2 , 4 . If we use this time sequence for a by comparing the Tref and the time levels. The value of
space vector located in Sector 2 the output voltage will be like
reference time should be the remainder of TTime
imereal
. The
Fig. 6. In the yellow part the inverter is working as V3 (0, 1, 1) sample
time reference single can be generated by a sawtooth wave
while in the blue part V2 (0, 1, 0).
generator or a repeating sequence in MATLAB and PSCAD.
Ts
Once the time zone Ta and Tb are determined, we can set
0.25T0 0.25T0
seven signal levels in (8).
T1 = T40

0.5Ta 0.5Tb 0.5T0 0.5Tb 0.5Ta 
Vdc 
T2 = T1 + T2a
VAN



0


Tb
T3 = T2 + 2



Vdc
VBN T4 = T3 + T20 (8)
0  Ta
T5 = T4 + 2




Tb

Vdc
VCN



 T 6 = T5 + 2
T7 = T6 + T40

0
T1 T2 T3 T4 T5 T6 T7

By comparing the time levels and the reference time signal,


Fig. 6. Voltage Sequence for Space vector in Sector 2.
we can determine the inverter output voltages. The detail is
after we draw all the voltage graphs, we realized that in shown in Fig. 7.
order to make the switching frequency relatively constant, we
need to set all the odd sector’s time sequence as Sector 1, and V0
(0,0,0)
set all the even sectors should be settled as Sector 2.
T7
Table II shows the output voltage in different time zone for Tref
T6
different sectors.
Therefore the algorithm of the space vector inverter is as T5

follows: T4
1) Determine which sector the space vector is located in V0
T3 (0,0,0)
by the phase angle of the space vector. Va
2) calculate the time zone length Ta and Tb and get the T2
V7
Vb

time sequence by sector. Vb


(1,1,1)
T1
3) Determine the voltage sequence by table II and time O
Va

sequence. t
4) When the output voltage should be Vdc make the active Fig. 7. Time level for digital control.
gate on for that phase; when it is 0, make the gate off.

III. D IGITAL C ONTROL IV. MATLAB/SIMULINK


In order to generate switching sequence shown in Figs. 5 This section gives the step by step development of MAT-
or 6, we need to find exact T1 , T2 , T3 , T4 , T5 , T6 and T7 . A LAB/Simulink model for SVPWM. The Simulink model is
shown in Fig. 8. The Maltab code used to generate the gate
control signal is also explained. Each subsystem is described.

A. System Topology
Fig. 8 shows the system topology of the system topology.
The simulation is built by six subsystems with a repeating
sequence work as the reference time signal. The six subsys-
tems are Sinusoid Wave generator, Space vector Calcuator,
Zero Holder, Gate Controller, Three-phase PWM inverter and
Low Pass Filter.

B. Component Description
Fig. 11. Matlab Function.
The sinusoid wave generator generates three phase balanced
voltage wave by a clock. To simplify the simulation, the
magnitude, frequency and phase angle are all assumed as and Tb (7). The time level can be determined by the equation
constant. (8). At the end it will give the gate signal by comparing Tref
and time level as shown in Fig. 7.
Vd |Vs| Remarks: the output of the zero holder is at 5 kHz while
the output of the repeating sequence should be much higher
then 5 kHz. Therefore, a rate transition block should be added
between the zero holder and Matlab function.
Vq θs

Vq Vs

θs
O Vd

Fig. 9. Space vector calculator.

Fig. 9 shows the detail of the space vector calculator. It first


calculate Vd and Vq where Vd = Va +Vb cos 2π 4π
3 +Vc cos 3 and
2π 4π Fig. 12. PWM inverter.
Vq = Vb sin 3 + Vc sin 3 . After the coordinates exchange,
the output are the magnitude and phase angle of the space
Fig. 12 shows the detail of the inverter block. The inverter
vector.
is represented by one function block for each phase shown in
equation (9). VnN ( VAN +VBN
3
+VCN
) is changing depending on
the different values of GA , GB and GC , which are the gate
control pulses that can be 0 or 1.

Vdc
VAn = 3 (2GA − GB − GC )

VBn = V3dc (2GB − GA − GC ) (9)
Fig. 10. Zero Holder.  Vdc
VCn = 3 (2GC − GB − GA )

To make the magnitude and phase angle of the space vector


constant in one sample time, a zero holder is added. Fig. 10
shows the detail of the subsystem. There are two zero holders
for |Vs | and θs . They receive the value of |Vs | and θs and send
them to the gate signal controller every sample time. In this
simulation the working frequency of the zero holder is 5 KHz,
so it send the signal every 0.0002 seconds.
The gate controller is a Matlab function block, it connect
to a Matlab program file. The input of this block will be the Fig. 13. Low pass filter.
input of the function and the return value of the function is this
block’s output. The function will first judge which sector the At the end of the simple low pass filter is added in order
space vector is in by θs and then calculate the time zone Ta to make the waveform looks nice. The low pass filter is
Fig. 8. MATLAB simulation System Topology.

accomplished by s-function. The transfer function of the filter


1
is G(s) = 0.001s+1 .

V. PSCAD
This section details the step by step development of PSCAD
model for space vector PWM. The simulation model is shown
Fig. 15. Reference Voltage Generator in PSCAD.
in Fig. 14. In this simulation, the load is a pure resister constant
load with a inductor to smooth the output current. The DC
voltage source is providing 2 kV and the desired ac output
voltage is set as 1 kV at 60 Hz.

A. System Topology
Calculate the
Get one value of
magnitude and
magnitude and angle
phase angle of
per sample time
the vector

Fig. 16. Calculate the Magnitude and Angle of Space Vector.

After calculate |Vs | and θs , a Sample and Hold component


is added to hold the value of the coordinate converter. When
the holder get a control signal as 0, the output of the holder
will be the input of the holder otherwise the output of the
holder won’t be changed. The control signal of the holder can
Fig. 14. Simulation model in PSCAD. be generated by a constant value 1 subtract a pulse sequence
at 5KHz.
Fig. 14 shows the three-phase inverter model in PSCAD. The last part is the gate signal generator which is shown
The six IGBT switches are controlled by the gate signal G1 in Fig. 17. It has exactly the same function with in Matlab
to G6. The following subsections will describe the method for Function block in MATLAB/Simulink. It gets |Vs |, θs , Tref ,
generating the gate signals. Vdc and sample time Ts can the output are the gate control
signal in phase. The detail of this block is shown in Fig. 18.
B. Component Description
The reference voltage generating part is shown in Fig. 15.
Signal “m” is the peak value of the reference voltage while
the signal “freq” is the frequency of the reference voltage. The
reference voltage is the output setting of the inverter. The space
vector is calculated from reference voltage via equation (4).
So the output voltage should be proportion on this reference
voltage. Fig. 17. Gate Control Signal Generator.
The next step is calculating the space vector and get the
magnitude and phase angle of the space vector. In order to The first component judges which sector the space vector
get the space vector, a new component in PSCAD is added is located by the phase angle of the vector. Loop “if” is used
as shown in Fig. 16. The new component is designed to get to achieve this. Further, it calculate the time zone Ta , Tb and
output as Vd = Va +Vb cos 2π 4π
3 +Vc cos 3 and Vq = Vb sin 3 +

T0 by equation (7). A limiter is used to make sure Ta , Tb and

Vc sin 3 , which is shown in Fig. 9 by FORTRAN coding. T0 won’t be greater than sample time Ts or under zero..
The second component is used to get the time level as 1.5
1

shown in equation (8). Then the last part can generate the 0.5
0
−0.5
0.05 0.0502 0.0504 0.0506 0.0508 0.051 0.0512 0.0514 0.0516 0.0518
control signal based on which sector is the vector in and the 1.5
Time (sec)

comparison of Tref and times levels. 1


0.5
0
−0.5
0.05 0.0502 0.0504 0.0506 0.0508 0.051 0.0512 0.0514 0.0516 0.0518
Time (sec)
1.5
1
0.5
0
−0.5
0.05 0.0502 0.0504 0.0506 0.0508 0.051 0.0512 0.0514 0.0516 0.0518
Time (sec)

Fig. 21. Gate Control Signal in MATLAB/SIMULINK.

1.5

Fig. 18. Inside Gate Control Signal Generator.


0.5

−0.5

VI. S IMULATION R ESULTS AND D ISCUSSION −1

−1.5
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05

A. Simulation Result in PSCAD


The output from the gate controller is shown in Fig. 19. Fig. 22. Three Phase Output Voltage After Filter in MATLABN/SIMULINK.
It clearly shows that in ont sample time (0.0002s), the active
gate operating time for each phase are controlled by the length
of the time zone. The Voltage after the filter is also given in VII. C ONCLUSION
Fig. 20. The peak value is the same as the reference voltage. The models of SVM on both MATLAB/Simulink and
PSCAD are presented in this paper. The developed SVM PWM
1.5 is tested in three-phase two-level VSI in both Matlab/simulink
Phase A

1
0.5 and PSCAD. Key theory, challenges in model development
0
−0.5 and digital control are presented. This paper provides reference
0.055 0.0551 0.0552 0.0553 0.0554 0.0555 0.0556 0.0557 0.0558 0.0559 0.056
value of realizing space vector modulation for two-level three-
1.5
phase converters.
Phase B

1
0.5
0
−0.5
0.055 0.0551 0.0552 0.0553 0.0554 0.0555 0.0556 0.0557 0.0558 0.0559 0.056
R EFERENCES
1.5
[1] A. Iqbal, A. Lamine, I. Ashraf, and Mohibullah, “Matlab/simulink model
Phase C

1
0.5
0
of space vector pwm for three-phase voltage source inverter,” in Univer-
−0.5 sities Power Engineering Conference, 2006. UPEC ’06. Proceedings of
0.055 0.0551 0.0552 0.0553 0.0554 0.0555 0.0556 0.0557 0.0558 0.0559 0.056
Time (sec) the 41st International, vol. 3, 2006, pp. 1096–1100.
[2] H. Van der Broeck, H.-C. Skudelny, and G. Stanke, “Analysis and
realization of a pulsewidth modulator based on voltage space vectors,”
Fig. 19. Three Phase Gate Control Signal in PSCAD. Industry Applications, IEEE Transactions on, vol. 24, no. 1, pp. 142–150,
1988.
[3] S. Albatran, Y. Fu, H. Leung, R. Schrader, and M. Mazzola, “Hybrid
2d-3d space vector modulation voltage control algorithm for three phase
2 inverters,” vol. PP, no. 99, 2013, pp. 1–11.
Vao (KV) before filter

1 [4] D. G. Holmes and T. A. Lipo, Pulse width modulation for power


0
converters: principles and practice. Wiley-IEEE Press, 2003, vol. 18.
−1
[5] D. Rathnakumar, J. LakshmanaPerumal, and T. Srinivasan, “A new
software implementation of space vector pwm,” in SoutheastCon, 2005.
−2
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 Proceedings. IEEE, 2005, pp. 131–136.
2
Vao (KV) after filter

−1

−2
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Time (sec)

Fig. 20. Output Voltage Before and After Filter in PSCAD.

B. Simulation Result in MATLAB


The output from the gate controller is shown in Fig. 21.
The voltage after the filter is shown in Fig. 22.

Anda mungkin juga menyukai