Beruflich Dokumente
Kultur Dokumente
The development of power electronic systems usually involves the design of both the electrical circuit and the control
algorithms. To study the behavior of these systems thoroughly
simulation is essential.
For the simulation of purely electrical circuits powerful programs like Spice and Saber exists. They allow the user to enter
the circuits as netlists or schematics. However, incorporating
complex control structures requires a thorough knowledge of
the specific program.
Simulink, an extension to Matlab, is a program for simulating dynamic systems. It is widely used for the simulation of
control systems, since even complex structures can be built
easily and Matlab provides powerful evaluation of the simulation results. Therefore, Simulink is also convenient for the design of closed loop controlled power electronic systems.
However, systems containing electrical circuits cause difficulties, in that they cannot be modeled in a straightforward way.
Simulink accepts neither schematics nor netlists for electrical
circuits. Instead they must be represented by mathematicalformulae - be it state-space equations or nodal formulation which must be set up individually for every topology. This process is time-consuming and error-prone.
Since summer 1998 the Power System Blockset is available
[l]. This toolbox allows the user to combine the electrical system and the controller in one system model by entering the circuit diagram at Simulink block level. Although the Power
System Blockset also contains components such as diodes and
GTOs the extensive use of these elements leads to very long
simulation times. Furthermore, ideal elements like switches require snubber circuits to make the simulation converge. Thus,
this toolbox is not well suited for simulating large power electronic systems.
355
v.v-src
s . s-T
nl
nl
am. am-D
vm .vm-D
s. s-D
am. am-L
l.L
r.R
c.c
r.G
T
-
grid
v src
x = Ax+Bu
(1)
y = Cx+Du
(2)
If the circuit contains one or more switches every combination (3 of switch positions yields a different linear circuit topology and therefore a different set of equations characterized
by the matrices A , , B , , C , ,and D , .Having n switches the
system could have 2" different topologies. Thus, even if not
all of the 2"topologies are needed in a simulation, the state
space approach is only practical if the matrices can be generated automatically.
For this purpose the independent mesh and node equations
must be set up according to Kirchhoff s voltage and current
PLECS y
+
Sum
i-ref
The algorithm of PLECS is based on state-variable equations, where the states represent storage components i.e. inductors and capacitors. A circuit containing only linear
components can be described mathematically by one set of differential equations:
10
Relay: +/-O.!j
Buck converter
i-L
356
[x Y
(3)
s x U]
where:
i=
[.vc
T
e']
1L
(state derivatives)
(4)
y =
[vout
(5)
s = [vs idT
(6)
x = [vc idT
(state variables)
(7)
(8)
(9)
(10)
VT-VD-V,,
iL.L = -vD-vC-iL. R
(11)
0 = iT+iD-iL
(12)
vc.C = -vc.G+iL
(13)
O
0
L
0
O
0
O
0
O
0
c o o o o
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
1 - 1
0 -1
0 0
0 0
0 1
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
(15)
0 0 -1 -R
0 - 1
- G 1
0 0
0
0
0
1
1
0
0
0
0
0
0
B.
0
0
0
0
1
0
0
1
0
0
0
0
0
0
10
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0 0
0 0
1 0
0 1
010
0
0
0
0
0 0
0 0
0 0
0 0
0 1 0 -1
0 - 1 0 -
o]
Implementation in Simulink
357
It has been pointed out in section I11 that the number of possible topologies increases exponentially with the number of
switches used in the circuit. However, not all of these topologies are actually needed. Therefore it is not practical to calculate all of them in advance. Instead, they are computed as they
are encountered during the simulation. The most recently used
matrices are cached in order to further reduce the computational effort.
A.
As has been described in detail in [2]-[4] the toggling of ideal switches may lead to Dirac impulses due to inconsistent ini-
given x, U ,g,d
f l
violated?
Simulink
Fig. 6: Flow chart of the switch manager
B.
For an accurate simulation it is vital to find the exact instances at which the boundary conditions are violated and
therefore a switching occurs. Consider for example a diode
connected in series with an inductor. The diode may open only
when the inductor current is zero within machine precision. If
this instant is missed the non-zero current will produce a Dirac
V. APPLICATION EXAMPLES
In this section, two examples will be discussed that show the
ease of use, the accuracy, and the speed of PLECS. The first
example is a simple switched network which has been used already in [2] because its response can be calculated analytically. The second example contains thyristors as switches that are
358
controlled both by internal and external conditions. For comparison both examples are also simulated with the Power System Blockset and with Saber. All simulations have been
performed on a Sun Ultra 1C/200 MHz.
A.
PLECS y
9
Switched RC
- I,
5 104-.. . . . . . . ... . _ .. _. . .
5
!
'
10
time (ms)
Fig. 9: (a) Capacitor voltage and ramp signal. (b) Relative errors
of the simulation results compared to the exact solution
TABLE I
Simulation times for the circuit in Fig. 7 for a time span of 0.1 s
Simulation Program
CPU time
33.49 s
6.58 s
0.34 s
3 59
C.
Other Applications
VI. CONCLUSIONS
DC current
PLECS y d ?
out@g
v-1-1
6-Pulse Rectifier
alpha
Pulse
generator
alpha
i-en
Pl-controller
i-ref
30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
REFERENCES
1.
2.
3.
4.
0
.............................
0.02
0.04
0.06
0.1
0.08
time (s)
Fig. 12: Simulation results for the circuit in Fig. 10
TABLE 11
Simulation times for the circuit in Fig. 10 for a time span of 0.1 s
CPU time
Saber
360
39.30 s