Simulation of PWM DC DC Converters Using

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Journal of ELECTRICAL ENGINEERING, VOL 68 (2017), NO1, 13–22

Simulation of PWM DC-DC converters


using eigenvalues and eigenvectors

Aleksandra Lekić

In this paper, a time-domain simulation of the DC-DC converters’ dynamic behavior is described. Corresponding to the
state-space model for each possible operation mode of the circuit, an analytic solution is provided. Converter’s regulator is
discretized using the pole-zero placement technique based on its Laplace transfer function. An algorithm results in a very
accurate simulation due to the exact solution of the circuit’s equations.
K e y w o r d s: simulation, DC-DC converters, PWM, eigenvalues

1 Introduction switching cell and as the state-space averaging. Switch-


ing cell averaging is made by representing a converter as a
Simulation of power electronics’ circuits has been a re- two port network consisting of inductors, capacitors and
search topic over the years [1]. Power electronics’ circuits switches [5]. A lot of the research effort has been done
are built as switching circuits which makes their simu- in order to determine and classify switching cells; see [5–
lation very challenging [2]. Furthermore, the switching 7] for more details. However, averaging on the level of
power converters’ simulators can be classified into gen- a switching cell has to be carefully done in all of the
eral purpose, piecewise-linear and averaged simulators. operating modes of the converter being continuous and
General purpose simulators are developed for simu- discontinuous ones. Another type of averaging simulators
lation of the wide range of electronic circuits [3]. From is based on the state-space averaging. State-space aver-
power electronics’ point of view, due to the existence aging is based on developing state-space system models
of switches, general purpose simulator Spice [3] and its and then averaging them as described in [8–10].
derivations being LTspice, HSPICE, etc. are shown to In this paper an algorithm for the transient simulation
have convergence issues. These problems are caused by of the pulse width modulated (PWM) DC-DC convert-
very complex models of switches, realized as transistors ers, is presented. This algorithm is based on the piece-
and diodes, and from their very fast switching being much
wise simulation of the exact converter model described
faster than the line voltage frequency fS ≫ f0 . Some-
with ordinary differential equations for the state vari-
times the convergence problems can be bypassed by de-
ables. Ordinary differential equations (ODEs) are solved
creasing the simulation time step. However, there are
using eigenvectors and eigenvalues of the system matrix
cases when a simulation cannot be performed although
[11] and then the homogeneous and particular solutions of
the simulation step is very small (for example, PFC con-
the system are found. The outcome solution of the ODEs
verters).
is exact without any approximations, thus resulting in
Convergence problems in general purpose simulators
this algorithm being very accurate and providing an op-
motivated the development of other simulators especially
tion for increasing the simulation’s time step. However,
made for simulating switching converter’s power stages.
there is still a problem for determination operating modes
Piecewise-linear simulators [4] assume a switching con-
which is solved using the predefined switching mode as
verter with its linearized model for each state of the
will be described in Section 2. Due to development of mi-
switch, being on or off. However, not every type of switch-
crocontrollers and digital control [12], the regulation of
ing is possible in circuits and the operation state (mode)
of the converter cannot be easily checked. Operation the converter is shown to be suitable for digital realiza-
mode determination causes in piecewise-linear simulators tion. In that manner, the converter regulation is realized
problems similar to the previously mentioned convergence in discrete-time.
problems. The paper is organized as follows. Section 2 provides
Development of the averaged simulators, which are de- the development of the circuit state-space models and the
veloped for power converter’s circuits with averaged volt- solutions of ODEs, the regulation design and the deter-
ages and currents in the circuit, is based on slow vari- mination of the circuit’s operation modes. In Section 3,
ations of the circuit’s input voltage or current compar- the program implementation is described. Simulation ex-
ing to the switching frequency. Averaging of the voltages amples of practical importance are provided in Section 4.
and currents in the circuit is often done on the level of a Finally, some concluding remarks are given in Section 5.

∗ School of Electrical Engineering, University of Belgrade, Belgrade, Serbia, lekic.aleksandra@etf.rs

DOI: 10.1515/jee-2017-0002, Print (till 2015) ISSN 1335-3632, On-line ISSN 1339-309X c 2017 FEI STU
14 A. Lekić: SIMULATION OF PWM DC-DC CONVERTERS USING EIGENVALUES AND EIGENVECTORS

Determination of the valid converter’s operation modes


can be done in a few steps. After defining all switches’
states, first the states that are not possible when the
desired control is applied, are eliminated. In the second
step, the loops consisting only of switches and voltage
sources, and cutsets of switches and current sources, are
determined. The loops consisting only of switches and
(a) (b) (c) (d) voltage sources result in a short-connected independent
Fig. 1. Switches realization: (a) — transistor, (b) — a diode, (c) — voltage source when all switches in the loop are on. In
current bidirectional and (d) — voltage bidirectional the cutsets consisting of switches and current sources, the
current sources would be disconnected if all the switches
in the cutset are off. These states are clearly not valid
and thus eliminated.
2 iL L 3
1 The third step is to find the states which can produce
S1 one of the discontinuous conduction modes: discontinuous
inductor current mode (DICM) or discontinuous capaci-
vIN S2 C R tor voltage mode (DCVM). This is necessary for the cir-
vC
cuit equations’ formulation. According to [14] there can
0 only be two continuous states and some number of dis-
continuous states which is not bigger than the number of
state variables (ie inductors and capacitors). In [15] it is
described that DICM can occur if in the circuit exists a
Fig. 2. Buck converter cutset consisting only of current sources, inductors and
switches, denoted as DICM cutsets. The current of this
DICM cutset is given as
2 Transient Simulation – Constraints
X X X
±iLi + ±iSj + ±iGk = 0 , (1)
In this section, the simulation algorithm and its im-
i j k
plementation are explained in detail.
where iLi are inductors’ currents, iSj are switches’ cur-
2.1 Formulation of circuit equations rents and iGk are independent current sources’ currents.
Converter enters DICM when the sum of the switches’
DC-DC converters are the switching circuits consist- currents reaches zero which forces the switches to turn
ing of two or more switches. Most of the families of DC- off. In general case, as shown in [16], during the DICM,
DC converters have even number of switches [13]. Each the sum of inductors’ voltages is equal zero, but their
switch has two operation modes: on and off. Switches are current has some nonzero value which is nearly constant
classified according to the polarity of the current which during the whole DICM interval.
flows through the switch when it is on and the polar- A similar scenario is with DCVM which occurs when in
ity of voltage in the off state of the switch. The possi- the converter exists a loop with switches, capacitors and
ble realizations are one-quadrant, two-quadrant and four- independent voltage sources when all switches in DCVM
quadrant switches [2]. As can be seen in Figs. 1a and loop are closed (in the remaining text denoted as DCVM
1b possible ways for realization of a one-quadrant switch loops). The sum of the voltages in the DCVM loop is
is to use a transistor or a diode, two-quadrant switches X X X
are current (Fig. 1c) and voltage bidirectional (Fig. 1d) ±vCi + ±vSj + ±vGk = 0, (2)
and four-quadrant is a combination of the previous two i j k
two-quadrant switches (current and voltage bidirectional
where vCi are capacitors’ voltages, vSj are voltages
switch). Also, switches can be controllable or not. Con-
across switches and vGk are voltages of independent volt-
trollable switches are the ones which have a transistor.
age sources. Equality of the sum of capacitor voltages to
In Fig. 1 controllable switches are transistor, current and
the
P sum of independent voltage sources’ voltages, since
voltage bidirectional.
j ±vSj = 0 for all switches closed, is the condition for
In Fig. 2, the Buck converter is depicted, which rep-
entering DCVM.
resents one of the common DC-DC converters besides
Circuit equations are formed by the modified nodal
Boost and Buck-Boost converter. As can be seen from
analysis [17] which is defined as
Fig. 2, Buck converter has two switches, which provides
four operation states of the circuit. However, not all of the Hx = z , (3)
states are possible. For example state when both switches
are on makes the independent voltage source vIN short- where x presents a vector consisting of node voltages,
connected which is not valid and makes this state impos- currents through independent voltage sources and cur-
sible. rents through switches, as well as derivatives of inductor
Journal of ELECTRICAL ENGINEERING 68 (2017), NO1 15

and for DCVM loop (2)

vC1 X X
L2 ±vCi + ±vGj = 0. (7)
iL1 L1 2 3 iL2 4
1 i j

C1
C2
vIN S2 R Thus, DCVM and DICM provide one extra equation
S1 by including dependence of capacitor voltages or induc-
vC2 tor currents. On the other hand one of the unknown
0
state variables is symbolically changed to the combina-
tion of sums of inductor currents and current sources cur-
rents/capacitor voltages and voltage sources voltages.
Fig. 3. Ćuk converter
A common case for DICM is when inductor current be-
comes zero which means that DICM cutset contains only
currents and derivatives of capacitor voltages. Vector z
consists of independent sources’ values, inductor currents one inductor and switches and possibly current sources.
and capacitor voltages, while matrix H contains quanti- Then the equation is modified by setting inductor voltage
ties. In order to solve the converter’s circuit containing to zero. In Fig. 2, DICM cutset is depicted as red dashed
switches, an extra equation for each state of the switch, circle and as it can be seen this cutset contains one in-
on and off state, must be added as ductor and two switches. Other, more complicate case,
is when the number of inductors in the DICM cutset is
iS = 0 for S off, greater than one. From Fig. 3 it can be seen that this kind
(4)
vS = 0 for S on. of DICM occurs in the Ćuk converter where DICM cutset
is depicted as red dashed circle and crosses two inductors
The equations for reactive elements in the circuit, induc- and two switches. The equation for DICM cutset for the
tor and capacitor, are similar to the equations for inde- Ćuk converter in DICM is given by
pendent current and voltage source, respectively. There-
fore, an extra equation for the inductor in the example of
Buck converter shown in Fig. 2, is given as iL1 − iL2 = 0 (8)

diL v2 v3 and therefore current iL1 is replaced by −iL2 inside vec-


= −
dt L L tor z . An extra equation which has to be added is then
and for capacitor
v3 = vC . diL1 diL2
− = 0. (9)
dt dt
For the example including the Buck converter in the
state when switch S1 is on and S2 (switch S2 represents a
diode which is a non-controllable switch) is off, the system When all possible states in which DC-DC converter
of equations (3) is as follows: can operate are formulated, it is important to determine
the switching between the states. According to [13] PWM

0 0 0 1 1 0 0 0

v1

0
  converter can have two continuous conduction modes and
0 0 0 0 −1 0 0 0   v2
    −iL  a number of discontinuous conduction modes. They can
 v operate in discontinuous quasi resonant mode (DQRM)
   
1
 3
0 0   i 
R 0 0 0 0 C   L 
  iIN when both discontinuous modes, DICM and DCVM, oc-

 v 
1 0 0 0 0 0 0 0

  IN 
  iS1 = . (5) cur during one switching interval.
 1 −1 0 0 0 0 0 0   0 

  iS2


0 0 0 0 0 1 0 0
 
  0 
 For PWM converters possible transitions are as fol-
  diL


0 −1 1
0  dt
 
  0 
 lows:
L 0 0 0 1 
L dvC
0 0 1 0 0 0 0 0 vC • 01 → 10 ,
dt
• 01 → 10 → 00 ,
When the converter operates in a discontinuous mode, • 01 → 11 → 10 .
DICM or DCVM, some modifications in the equations
The states are represented as binary variables where 20
are made. In general, sum of inductor currents or capaci-
bit represents controllable switch S1 equal to 1 during
tor voltages is constant. The discontinuous mode enables
the system reduction by one equation in the form of cut- interval nTS ≤ t < (n + d)TS and 21 bit is S2 with
set/loop equations. The equation for DICM cutset (1) is possible realization as a diode. In the case when DQRM
reduced to can occur, which means that in the circuit exist both a
DICM cutset and a DCVM loop, in addition it is possible
X X
±iLi + ±iGk = 0 (6)
i k to have transition 01 → 11 → 10 → 00 .
16 A. Lekić: SIMULATION OF PWM DC-DC CONVERTERS USING EIGENVALUES AND EIGENVECTORS

2.2 Solving State-Space Equations Using Eigenvalues where xp is the particular and xh is the homogeneous
solution. Homogeneous solution is found by calculating
A system consisting of ordinary differential equations eigenvalues of the system matrix A from equation (10).
can be presented in the standard state-space form as Matrix A has (m + n) rows and columns, so there are
follows: m+n eigenvalues, λj ∈ C where j ∈ {1, 2, . . . , m+n} . In
the case of DC-DC converters, eigenvalues are either zero
ẋ = Ax + Bu , (10) or distinct real or complex numbers. In the case when
y = Cx + Du , (11) there are complex eigenvalues, they are in conjugate-
complex pairs because their characteristic polynomial has
where x is the vector which consists of state variables, real coefficients. The homogeneous solution in the case of
i.e., inductor currents and capacitor voltages, u is the distinct eigenvalues is given by
vector of independent sources and y is the vector of out- m+n
X m+n
X
put variables [18]. In this work only DC-DC PWM con- xh (t) = x i e λi (t−t0 ) = Xi e λi t , (15)
verters with one input and one output, as described in i=1 i=1
[6, 5], will be considered. Let us denote the number of where t = t0 denotes the beginning of the interval. Thus,
inductors in the converter as m and the number of ca- for each interval during one switching period, the homo-
pacitors as n. Generally, the number of inductors and the geneous solution can be analytically solved by calculating
number of capacitors doesn’t have to be equal. However, system eigenvalues.
in order to obtain independent output voltage of the load The particular solution is obtained by solving the fol-
resistance, it is shown that the total number of inductors lowing equation
should be equal to the total number of capacitors, m = n
[19]. The switching cell is considered as a three-port ele- Axp (t) + Bu(t) = 0. (16)
ment between input and output of the converter and it is If matrix A is invertible, particular solution is equal to
made of switches, inductors and capacitors. xp (t) = −A−1 Bu(t). (17)
Depending on the switch realization and the switching
However, the system matrix can have zero eigenvalue,
cell network during one switching interval, a number of
meaning being singular. If matrix A has zero eigenvalues,
subintervals may occur. However, that number is equal to
then the particular solution can be determined as
2 + k , where 2 subintervals are usual CCM intervals and ⊤
k represents different number of discontinuous modes, as P−1 Qu(t) (18)
in [14]. During one switching period consisting of 2 + k where matrix P is obtained from matrix A by the elimi-
subintervals, the state-space models are nation of rows and columns which are containing only ze-

A1 x(t) + B1 u(t), nTS ≤ t < (n + d1 )TS ros or that are linear combination of other rows/columns.
This occurs in the case of discontinuous modes and in






 A2 x(t) + B2 u(t), some continuous conduction modes as well. Vector Q is


 (n + d1 )TS ≤ t < (n + d1 + d2 )TS obtained from vector B by elimination the same rows
ẋ(t) = (12) that are eliminated in matrix A. The particular solution
 ...
for the state variables whose equations are eliminated in


 Ak+2 x(t) + Bk+2 u(t),




 Pk+1  equation (18) are their values from the end of the previous
 n + j=1 dj TS ≤ t < (n + 1)TS time interval.
Assuming that t = t0 denotes the end of the previous
and and the beginning of the next time interval, the value

 C1 x(t) + D1 u(t), nTS ≤ t < (n + d1 )TS of the state variables at the beginning of the interval is

 known and denoted as x(t0 ). Using previously formulated

 C2 x(t) + D2 u(t),


 equations (10), the system of m + n equations can be

 (n + d1 )TS ≤ t < (n + d1 + d2 )TS written as
y(t) = (13)
 . . . m+n
X
Xi e λi t0 ,


 Ck+2 x(t) + Dk+2 u(t),

 x(t0 ) = xp (t0 ) +
i=1


n + k+1
 P 
j=1 dj TS ≤ t < (n + 1)TS

m+n
X
ẋ(t0 ) = ẋp (t0 ) + λi Xi e λi t0 = Ax(t0 ) + Bu(t0 ),
In this work all of the discontinuous modes are considered i=1
[15]. Again, m is the number of inductors in the circuit, ..
n is the number of capacitors, p is the number of inde- . (19)
pendent sources and q is the number of output variables. m+n
Earlier defined vectors and matrices are of dimensions
X
x (m+n−1) (t0 ) = xp(m+n−1) (t0 ) + λim+n−1 Xi e λi t0
A(m+n)×(m+n) , B(m+n)×p , Cq×(m+n) and Dq×p . i=1
State-space differential equations have the solution of m+n−1
X
the form = Am+n−1 x(t0 ) + Am+n−1−j Bu(j−1) (t0 ),
x(t) = xp (t) + xh (t) (14) j=1
Journal of ELECTRICAL ENGINEERING 68 (2017), NO1 17

where Xi are spectral components of all state variables linear combinations of the remaining m+n−r equations.
corresponding to eigenvalue λi . In DC-DC converters, Equation (21) shows that even for those elements m+n−
the vector of independent sources u is constant or slowly r coefficients are calculated. Other elements operating
changing during one switching period. Thus, all deriva- continuously have m + n − r coefficients of which at least
tives u(j−1) (t0 ), j ≥ 1 will be considered as zero and one is different than zero.
omitted in what follows. Derivatives of the partial solu- Described algorithm is easy to be realized in some
tion are zero, because they are linear combinations of in- programming languages. For the given matrices A, B,
dependent sources values. The solution of equations (19) C and D, eigenvalues can be calculated and eliminated
provides quantities for further calculation which can be ones with value zero. Afterwards, the particular solution
found using the reduced row echelon form [11] of the sys- can be found as reduced row echelon form of the equa-
tem as tion (17). In this paper we used Python 2.7 to compute
   matrix obtained via reduced row echelon form with the
x(t0 ) − xp

X1 vector consisting of indices of leading 1. Of course in dis-
 X2   A x(t0 ) + B u continuous mode or in marginally stable continuous con-

M . =  (20)
   
 ..   .
..  duction mode there would be r rows completely equal
Xm+n A (m+n−1)
x(t0 ) + A (m+n−2)
Bu to zero, but for other state variables particular solution
is provided as the value in the last column pointed by
where matrix M(m+n)2 ×(m+n)2 consists of (m + n)2 ma- corresponding index. Zero rows are at the end of the ma-
trices indexed as Mi, j as follows: trix. In the programs for elements corresponding to the
“skipped” indices are assigned values from the end of the

M0,1 M0,2 ... M0,m+n
 previous time interval.
 M1,1 M1,2 ... M1,m+n  After determining coefficients of the homogeneous so-
M= . lution (21) and particular solution (17), the overall solu-
 
.. .. ..
 . . . 
tion can be determined as
Mm+n−1,1 Mm+n−1,2 . . . Mm+n−1,m+n
X1
 
Matrices Mi,j have (m + n) rows and columns and  X2 
ẋ(t) = N  ..  + xp (22)
 
.
Mi,j = diag λij e λj t0 .
  
Xm+n−q
Equations (19) and (20) can be rewritten for the case of
with matrix N(m+n)×(m+n)(m+n−q) , where q = 0 if ma-
singular system matrix A. System matrix is singular in all
trix A is nonsingular and q = r if matrix A has r zero
discontinuous conduction modes and in some continuous
eigenvalues, equal to
conduction modes, eg, continuous conduction modes of
the Ćuk converter (see Appendix 2). Let us assume that N = [ N1 N2 . . . Nm+n−q ] (23)
the number of zero eigenvalues is r . That means that the
column connected matrices A and B have r zero rows and
or rows that are some linear combination of other rows. Ni = diag e λi t .

(24)
Therefore, r equations can be eliminated and degener-
ated system of equations is then of dimension r (m + n). 2.3 Regulator Design
The solution for the described problem is to eliminate
eigenvalues equal to zero while calculating spectral com- The regulator generates a PWM signal which controls
ponents Xi and to reduce the order of the system. In the controllable switch. Duty-ratio of the PWM signal is
the case of r zero eigenvalues, the number of nonzero calculated inside regulator and provides exact moment
eigenvalues is m + n − r , and the originally system (20) of the transition between on-state and off-state of the
becomes controlled switch or switches. The exact time of the state
  transition is determined by the use of cutset algorithm
X1
with given absolute and relative errors.
 X2 
M = Since the simulation program is a natural environment
..
 
 .  for the implementation of digital and/or discrete regu-
Xm+n−r lators, the regulator is completely designed in discrete

x(t0 ) − xp (t0 )
 manner. With a given Laplace transfer function which de-
scribes the dynamic behavior of an analog regulator, the
 Ax(t0 ) + Bu(t0 ) 

.  (21)
 discretization is done using pole-zero matching method.
..

  General form of the regulator transfer function in analog
(m+n−r−1) (m+n−r−2) domain is given by
A x(t0 ) + A Bu(t0 )

with matrix M(m+n)(m+n−r)×(m+n)(m+n−r) . It should be d(s) ac,n sn + ac,n−1 sn−1 + · · · + ac,0 s0


Gc (s) = = , (25)
mentioned that r elements’ values can be formulated as e(s) bc,m sm + bc,m−1 sm−1 + · · · + bc,0 s0
18 A. Lekić: SIMULATION OF PWM DC-DC CONVERTERS USING EIGENVALUES AND EIGENVECTORS

State-space
Determination
Determination model generation
Netlist of possible List of states
of possible states and eigenvalues
transitions
calculation

Fig. 4. Initialization for transient simulation flowchart.

Start

Initialization

Yes End of
End simulation?

No
Update time
calculate vectors
x and y

Find switching Change state and


Internal Yes time and update statespace
switching? calculate matrices and
vectors x and y eigenvalues
No

External Yes Calculate vectors


switching? x and y at
switching time

No

Fig. 5. Simulation flowchart

where d(s) represents duty-ratio and e(s) is the output with the nominator of degree i and the denominator of
error in the Laplace domain. Equation (25) can be rewrit- degree j .
ten as Qn s

d(s) i=1 1 + szi j−1
bd,k
i
ad,l
Gc (s) = = Gc0 Qm
X X
e(s) s
 d[n] = − d[n + k − j] + e[n + l − j] . (26)
j=1 1 + spj bd,j bd,j
k=0 l=0
where, n is the order of nominator and m is the or-
der of denominator. Pole-zero matching transformation, For the desired regulator, values of errors and duty-ratio
Gc (s) → Gd (z), is done as follows [12] are updated once during switching period. Converter out-
• Finite poles and zeros of continuous transfer func- put values, which are same as regulator input values, at
tion Gc (s), sp/z,i = sreal,i + jsimag,i , are trans- the end of the switching period t = n TS are sufficient for
formed into their discrete equivalent by using zp/z,i = that purpose. Those values are already known, calculated,
e(sreal,i +jsimag,i )Ts , where Ts represents sampling pe- and thus new value for duty-ratio is easily obtained.
riod.
2.4 Switching time determination
• Zeros at sz,i → ∞ are mapped into zz,i = −1 .
• DC gain of discrete transfer function is set to be equal
DC-DC converters allow two switching types: inter-
to the DC gain of continuous transfer function |Gc (s =
nal, which occurs in case when condition for entering dis-
j · 0)| = |Gd (z = 1 + j · 0)|.
continuous mode is satisfied, and external triggered by
Hence, using the obtained discrete transfer function, dif- the regulator, for which exact time of the transition and
ference equation (or recurrent equation) for the duty-ratio state variables’ and output variables’ values have to be
determination is derived in a simple manner as known. An algorithm used for internal switching time de-
Pi Pi ad,l l−j termination relies on second-order Newton’s interpolation
l=0 bd,j z
l
d(z) l=0 ad,l z method. External switching is closely related to the reg-
Gd (z) = = Pj = Pj−1 bd,k k−j
e(z) k=0 bd,k z
k 1 + k=0 bd,j z ulator design.
Journal of ELECTRICAL ENGINEERING 68 (2017), NO1 19
iL1 (mA) iL1 (A)
128.3 1.4
74.5 1.1
20.8 0.7
-32.9 0.4
-86.6 0.0
iL2 (mA) iL2 (mA)
8.7 0.0
-36.5 -172.7
-81.6 -345.4
-126.8 -518.1
-171.9 -690.9
vC1 (V) vC1 (V)
12 42.4
9 31.8
6 21.2
3 10.6
0 0.0
vC2 (V) vC2 (V)
0.0 0.0
-0.5 -3.6
-1.1 -7.2
-1.6 -10.8
-2.1 -14.4
0 160 320 480 640 800 0 160 320 480 640 800
t (ms) t (ms)

Fig. 6. Transient diagrams of state variables of the Ćuk converter Fig. 7. Transient diagrams of state variables of the Ćuk converter
shown in Fig. 3 for the first 800 µs and d = 0.2 shown in Fig. 3 for the first 800 µs and d = 0.8

L This method is used because it converges fast and is suit-


1 2 iL 3 able for matrix state-space system’s representation [4].
S1 External switching

vIN S2 C
According to the regulator design, duty-ratio and error
vC R
are calculated once during the switching period. On the
0 other hand, the condition for state change caused by
the regulator has to be checked after every time interval
(switching period is divided into smaller time intervals).
Checking is done based on whether the controlled switch
Fig. 8. Synchronous buck converter
or switches turns on or off. In both cases if the switching
occurs a new point with exact switching time in which the
Internal switching
state change occurs must be added and all state variable
Function that describes internal switching has the fol- values must be calculated.
lowing form
f (x) = αx + βu,
where α and β are vectors consisting of values 0 , 1 and 3 Program implementation
−1 . Those values are coefficients that contain information
for state variables and independent sources in equation Using the constraints explained in Section 2, a pro-
(6) or (7) and depend on the determined discontinuous gram is implemented in Python 2.7 programming lan-
mode. guage. Program reads input netlist whose form is pro-
According to the second-order Newton’s interpolation vided in Appendix 1. At the beginning of the simulation,
method, time is determined as the state-space model for each possible mode of operation
is created and stored. After that the calculation of the
1
tn+1 = tn + . (27) transient begins during which the simulation results are
f (2) (xn ) f˙(xn )
2f˙(xn )
− f (xn ) stored. In Fig. 4, the simulation initialization is described.
As can be seen from Fig. 4, the state-space matrices are
Matrix form of state-space model is very useful in this calculated for every possible combination of the conduct-
case, because ing switches. Then, the no valid states are eliminated. If
f˙(xn ) = αAxn + αBu in the circuit exists a DICM cutset or a DCVM loop then
a discontinuous mode (DICM or DCVM) is possible and
and that state is saved. Afterwards for each possible state,
f (2) (xn ) = αA2 xn + αABu . eigenvalues are calculated and stored.
20 A. Lekić: SIMULATION OF PWM DC-DC CONVERTERS USING EIGENVALUES AND EIGENVECTORS

With determined possible states and transitions and whose results are shown in Figs. 6 and 7 are verified using
also calculated matrices and eigenvalues, simulation pro- PLECS [20] and GeckoCIRCUITS [21]. Originally simu-
ceeds starting at time t = 0 with given initial values for lations were done with 100 points per period, but the
the state variables. The simulation starts with the ini- number of points can be decreased to 30 points per pe-
tial state and continues with the same procedure until it riod with the same simulation results.
reaches the stop time. The second example is the Buck converter. The first
Step interval is 1000 points per period by default, but simulation is done for the synchronous Buck converter
precision can be given as an input to the program. After (realized using four-quadrant switches) depicted in Fig. 8
each step interval, it is checked if there can be changes with parameters vIN = 20 V, L = 200 µH, C = 1 mF,
of state either by the regulator (limited duty-ratio) or by R = 5 Ω and fS = 100 kHz, whose input netlist is in
some of discontinuities inside the converter. In the case Appendix 1 and system’s matrices in Appendix 3, with
when a change occurs, by intersect algorithm, accurately the regulator defined using the following transfer function
a moment when the transition occurs is determined. This
procedure is presented in Fig. 5 by the flowchart. 1.05 · 106 s2 + 3.193 · 109 s + 3.161 · 1011
H(s) = (28)
3.011 · 105 s2 + 1.076 · 1010 s

4 Application Examples where the error signal is defined in comparison to refer-


ence voltage e = vC − 5 V. Simulation results are shown
In this section, two simulation examples are provided. in Fig. 9.
First example is the Ćuk converter operating in discon- The second case is when the Buck converter is realized
tinuous modes with a constant duty-ratio. This exam- using a switch and a diode as depicted in Fig. 2 with
ple proves that this simulator works for cases in which parameters vIN = 10 V, L = 25 µH, C = 330 µF, R =
the system matrix is singular. The second example is the 15 Ω and fS = 100 kHz. The converter is controlled with
Buck converter with the regulator. the regulator whose transfer function is
For the example of the Ćuk converter in the open-loop
configuration parameters vIN = 5 V, L1 = 645.4 µH, 0.06 s + 90
H(s) = (29)
L2 = 996.3 µH, C1 = 217 nF, C2 = 14.085 µF, R = s
43 Ω, fS = 30 kHz are taken. Time domain diagrams are
obtained as a result of detailed simulation during first and error signal defined as e = vC − 5 V. This converter
0.8 ms using calculated state-space matrices provided in operates in DICM for some intervals of time in the pe-
riod, which can be seen in Fig. 10. Again, all simulation
Appendix 2. In Fig. 6, the Ćuk converter which for some
results are verified using simulators PLECS and Gecko-
intervals of time operates in DICM with constant duty-
CIRCUITS.
ratio d = 0.2 , is shown. The converter operates in DICM
after first 580 µs.
The simulation of the same Ćuk converter in an open- 5 Conclusion
loop configuration with constant duty-ratio d = 0.8 pro-
vides converter operating in DCVM for some intervals of In this paper, an algorithm for simulation of DC-DC
time during the switching period. In Fig. 7, it can be seen converters based on exact solutions of the circuits’ equa-
that the simulator successfully simulates the converter op- tions, is provided. DC-DC converters’ equations are writ-
erating in DCVM. Both simulations of the Ćuk converter ten in the matrix form and solved as ordinary differential
iL (A) iL (A)
13.4 10.0
9.4 7.5
5.3 5.0
1.3 2.5
-2.7 0

vC (V) vC (V)
5.7 5.1
4.3 3.8
2.9 2.5
1.4 1.3
0.0 0.0
0.0 2.6 5.3 7.9 10.5 13.2 0.0 1.5 3.0 4.5 6.0 7.5
t (ms) t (ms)

Fig. 9. Transient diagrams of state variables of the synchronous Fig. 10. Transient diagrams of state variables for buck converter
buck converter shown in Fig. 8 for the first 13.2 ms shown in Fig. 2 for the first 7.5 ms
Journal of ELECTRICAL ENGINEERING 68 (2017), NO1 21
 1
0 0 0 0
  
equations by calculating their homogeneous and partic- L1
 0 0 0 −L 1
ular solutions. For the converter, a discrete regulator is  , B(1,1) =  0
 
A(1,1) =
0 0 0
2 
designed which controls the switches. 0   0 
1 1
The proposed algorithm is implemented in Python 0 C2 0 − C2 R 0
2.7 programming language which is a free software. It
is shown to have high accuracy by decreasing the number C = [0 0 0 1], D = [0],
of calculation points. The simulation results for the two
State variables’ vector, independent source’s vector and
DC-DC converters of practical importance are provided.
Furthermore, these simulation results verify the perfor- output variable’s vector are given in the following forms
mance of the algorithm for each operating mode of the
converter. iL1
 
i 
x =  L2  , u = [ vIN ] , y = [ vC2 ] .
Appendix A: Input netlist example vC1
vC2
Here, the input netlist for the synchronous Buck con-
verter with parameters vIN = 20 V, L = 200 µH, C =
Appendix C: Buck converter
1 mF, R = 5 Ω and fS = 100 kHz is provided.

For the Buck converter depicted in Fig. 2 and in Fig. 8,


model = System.System() the state-space matrices are
# SYSTEM DESCRIPTION
model.create element(System.V(1, 1, 0, 20.0))    
0 0 0
model.create element(System.SW(1, 3, 1, 2)) A(0,0) = , B = ,
model.create element(System.SW(2, 3, 2, 0))
0 − C1R (0,0)
0
model.create element(System.L(1, 2, 3, 200e-6))
model.create element(System.C(1, 3, 0, 1e-3))
model.create element(System.R(1, 3, 0, 5.0)) C(0,0) = [ 0 1 ] , D(0,0) = [ 0 ]
model.set control(1, ’on state’)
model.set control(2, ’off state’)
when switch S1 is off and diode S2 is off. This state
model.set output([[’node’, 3]]) doesn’t occur in the synchronous Buck converter because
controller = Controller.Controller([1], [2], \ it has only four-quadrant switches which can handle both
’pole zero matching’, [[[1.05e06, 3.193e09, \ polarities of the currents and voltages.
3.161e11], [3.011e05, 1.076e10, 0], 5]], 100e3)
simulation time = 10e-3
− L1
 1
0

A(0,1) = 1 , B (0,1) = L ,
C − C1R 0
Appendix B: Ćuk converter

For the Ćuk converter depicted in Fig. 3, the calculated C(0,1) = [ 0 1 ] , D(0,1) = [ 0 ]
state-space matrices (matrices’ index is switches’ state in
order (S2, S1)) are given below. Matrices C and D are when switch S1 is on and diode/switch S2 is off and
the same for all of the states and therefore they are given
just once. 
0 − L1
  
0
A(1,0) = 1 , B (1,0) = ,
1 1 C − C1R 0
0 0 − L1 +L − L1 +L
   1 
2 2 L1 +L2
0 0 − 1 − 1  1
L1 +L2 L1 +L2
 
A(0,0) =  , B(0,0) =  L1 +L2
  
 0 C11 0 0   0  C(1,0) = [ 0 1 ] , D(1,0) = [ 0 ]
1
0 C2 0 − C21 R 0
when switch S1 is off and diode/switch S2 is on. It can be
  seen that when both switches are not conducting inductor
0 0 0 0  1

current falls to zero and thus discontinuous inductor cur-
0 0 − 1 − 1 L1
L2 L2
  0  rent mode occurs. State when both semiconductors are
A(0,1) =  , B(0,1) = 
 
1

 0 C1 0 0   0  on is not valid.
0 C12 0 − C21 R 0 State variables’ vector, independent source’s vector
and output variable’s vector are given in the following
0 0 − L11 0
   1
forms

L1
 0 0 0 − L12   0 
A(1,0) = 1  , B(1,0) = 
    
 C1 0 0 0  0  iL
x= , u = [ vIN ] , y = [ vC ] .

1
0 C2 0 − C21 R 0 vC
22 A. Lekić: SIMULATION OF PWM DC-DC CONVERTERS USING EIGENVALUES AND EIGENVECTORS

References [13] D. Maksimović and S. Ćuk, ”A General Approach to Synthe-


sis and Analysis of Quasi-Resonant Converters”, 20 th Annual
[1] D. Maksimović, A. M. Stanković, V. J. Thottuvelil and G. C. IEEE Power Electronics Specialists Conference, 1989. PESC’89
Verghese, ”Modeling and Simulation of Power Electronic Con- Record, IEEE, 1989, 713–727.
verters”, Proceedings of the IEEE, vol. 89, no. 6, 898–912, 2001. [14] K. Schenk and S. Ćuk, ”Small Singnal Analysis of Converters
[2] R. W. Erickson and D. Maksimovic,” Fundamentals of Power with Multiple Discontinuous Conduction Modes”, IEEE Power
Electronics, Springer Science & Business Media, 2007. Electronics Specialists Conference, Institute of Electrical Engi-
[3] L. W. Nagel and D. O. Pederson,” SPICE: Simulation Program neers Inc (IEE), 1998, 623–629.
with Integrated Circuit Emphasis, Electronics Research Labo- [15] D. Maksimović and S. Ćuk, ”A Unified Analysis of PWM Con-
ratory, College of Engineering, University of California, 1973. verters in Discontinuous Modes”, IEEE Transactions on Power
[4] D. Li, R. Tymerski an T. Ninomiya, ”PECS - an Efficient So- Electronics, vol. 6, no. 3, 476–490, 1991.
lution for Simulating Switched Networks with Nonlinear Ele- [16] M. Zhu, F. L. Luo and Y. He, ”Remaining Inductor Current
ments”, IEEE Transactions on Industrial Electronics, vol. 48, Phenomena of Complex DC–DC Converters in Discontinuous
no. 2, 367–376, 2001. Conduction Mode: General Concepts and Case Study”, IEEE
[5] R. Tymerski and V. Vorperian, ”Generation, Classification and Transactions on Power Electronics, vol. 23, no. 2, 1014–1019,
Analysis of Switched-Mode DC-to-DC Converters by the Use of 2008.
Converter Cells”, INTELEC’86. International Telecommunica- [17] C.-W. Ho, A. Ruehli and P. Brennan, ”The Modified Nodal
tions Energy Conference, IEEE, 1986, 181–195. Approach to Network Analysis”, IEEE Transactions on Circuits
[6] D. Maksimovic, Synthesis of PWM and Quasi-Resonant DC-to and Systems, vol. 22, no. 6, 504–509, 1975.
-DC Power Converters, PhD Dissertation, California Institute [18] R. D. Middlebrook and S. Ćuk, ”A General Unified Approach to
of Technology, 1200 E California Blvd, Pasadena, CA 91125, Modelling Switching-Converter Power Stages”, Power Electron-
United States, 1989. ics Specialists, 18–34 Conference, 1976, IEEE, 1976.
S. Ben-Yaakov, ”Average Simulation of PWM Converters by [19] R. Erickson, ”Synthesis of Switched-Mode Converters”, Power
Direct Implementation of Behavioural Relationships”, Interna- Electronics Specialists Conference, IEEE, 1983, 9–22.
tional journal of electronics, vol. 77, no. 5, 731–746, 1994.
[20] J. Alimeling and W. P. Hammer, ”PLESC-Piece-Wise Linear
[8] J. Sun, D. M. Mitchell, M. F. Greuel, P. T. Krein and R. M. Electrical Circuit Simulation for Simulink”, Power Electronics
Bass, ”Averaged Modeling of PWM Converters Operating in and Drive Systems, PEDS’99. Proceedings of the IEEE 1999
Discontinuous Conduction Mode”, IEEE Transactions on Power International Conference on, vol. 1, IEEE, 1999, 355–360.
Electronics, vol. 16, no. 4, 482–492, 2001.
[21] A. Müsing and J. W. Kolar, ”Successful Online Education-Gec-
[9] A. Davoudi, J. Jatskevich and T. Rybel, ”Numerical State-Space kocircuits as Open-Source Simulation Platform”, 2014 Interna-
Average-Value Modeling of PWM DC-DC Converters Operating tional Power Electronics Conference (IPEC-Hiroshima 2014-EC
in DCM and CCM”, IEEE Transactions on Power Electronics, CE ASIA), IEEE, 2014, 821–828.
vol. 21, no. 4, 1003–1012, 2006.
[10] A. Davoudi and J. Jatskevich, ”Realization of Parasitics in State Received 28 October 2016
-Space Average-Value Modeling of PWM DC-DC Converters”,
IEEE Transactions on Power Electronics, vol. 21, no. 4, 1142–
1147, 2006. Aleksandra Lekić is born in Belgrade, Serbia, in 1989.
[11] R. A. Horn and C. R. Johnson, Matrix Analysis, Cambridge She received BS and MS degrees in Electrical Engineering from
university press, 2012. the University of Belgrade, in 2012 and 2013, respectively.
[12] A. Prodic, D. Maksimovic and R. W. Erickson, ”Design and Im- Currently, she is a final year student of PhD studies at the
plementation of a Digital PWM Controller for a High-Frequency same school. Since December 2012, she works as a teaching
Switching DC-DC Power Converter”, The 27 th Annual Confer- assistant at the School of Electrical Engineering, University
ence of the IEEE Industrial Electronics Society, 2001 IECON’01, of Belgrade. The field of her interest is control in power elec-
vol. 2, IEEE,2001,893–898. tronics circuits.

You might also like