AVERAGED DISCRETE-TIME MODEL FOR FAST SIMULATION OF PWM CONVERTERS IN DCM M. S. Al-Numay Electrical Engineering Department King Saud University, Riyadh 11421, Saudi Arabia alnumay@ksu.edu.sa Abstract Continuous and discrete-time averaged models are available for pulse width modulated (PWM) converters operating in the continuous conduction mode (CCM). A new discrete-time model for PWM converters operating in the discontinuous conduction mode (DCM) is proposed that leads to the exact discrete-time mathematical representation of the averaged values of the output signal. This model can also provide the averaged values of other internal signals with little increase in simulation time. This model is also used to simulate PWM converters operating in both DCM and CCM when combined with the averaged CCM model in [1]. It is compared to other models with respect to accuracy and simulation speed through a numerical example of boost converter. This method gives the exact values of the one-cycle-average (OCA) values of signals at switching instants. Numerical simulations show the accuracy and speed of the proposed method as well as its advantage in simulating PWM converters operating in both CCM and DCM. Key Words: Switched systems, sampled-data model, pulse width modulated (PWM) converter, averaged model, discrete-time simulation. 1 1. Introduction PWM converters are widely used for operating switch controlled systems. These systems are usually operated in two modes of operation, namely: continuous and discontinuous conduction modes. The DCM of operation typically occurs in dc/dc converters at light load. For low-power applications, many designers prefer to operate in the DCM in order to avoid the reverse recovery problem of the diode. DCM operation has also been considered a possible solution to the right-half plane (RHP) zero problem encountered in buck-boost and boost derived topologies. In single-phase ac/dc converters with active power factor correction (PFC), the input inductor current becomes discontinuous in the vicinity of the voltage zero crossing; some PFC circuits are even purposely designed to operate in DCM over the entire line cycle in order to simplify the control. Proper analytical models for DCM operation of PWM converters are therefore essential for the analysis and design of converters in a variety of applications (see [2] and references therein). On the other hand, converters for high-power applications are designed to operated in the CCM. Nevertheless, when these converters are operated at reduced power, DCM will appear during parts of the line period which means a need for a model appropriate for both modes of operation. Energy-conservation approach to medelling PWM DC-DC converters was presented in [3]. It provides a systematic method for including parasitic resistances and offset voltage source of power switches into averaged dynamic large signal, dc, and small-signal circuit models of PWM converters operating in CCM. This method is can not be used for DCM of operation. Other averaging methods are sometimes used to produce approximate continuous-time models for PWM systems by neglecting the switching period of the switches and the sampling period of the microprocessor controller. A recently published paper [2] has developed a new state-space averaged model for PWM converters operating in the discontinuous conduction mode (DCM SSA). This model is a generalization of the well-known state space average (SSA) model for CCM [4]. To 2 improve accuracy, a recent paper [5] presented some of the issues involved in applying frequencyselective averaging to modeling the dynamic behavior of switched systems operating in CCM. The authors suggested a new multi-frequency averaging (MFA) model, that is able to estimate the average values of state variables at low switching frequency. One disadvantage of such models is the existence of two different average models for CCM and DCM which would lead to the loss of the main advantage of SSA models. The boundary between these two modes is dependent upon the ripple current in the inductor, and this information is lost in the averaging process. A small-signal frequency domain representation of PWM converters for DCM to be used for analysis is provided in [6]. This model does not reflect high frequency component superimposed on the average values of voltages and current, but it reflects instantaneous average voltages and current. These average waveforms are essential to understand, design control circuits, and evaluate the open- and closed-loop dynamic performance. This model is not meant for time simulation of PWM converters. Sampled-data modeling techniques, on the other hand, provide the most accurate and most natural means to represent the behavior of PWM systems since these systems inherently operate in a clocked and cyclical fashion and because they are well suited to the design of digital controllers. Sampled-data models allow us to focus on cycle-to-cycle behavior, ignoring intracycle ripples. This makes them effective in general simulation, analysis and design. Early discussion of sampled-data models for switchmode power converters were presented in [7] and [8] and later extended in [9] and [10]. An algorithm to increase the speed of such simulation methods is presented in [11]. These models predict the values of signals at the beginning of each switching period, which most of the times represent peaks or valleys of the signals rather than average values. To better understand the average behavior of the system, a discrete-time model for the OCA signals was presented in [1]. These models were derived for CCM and can not be used for DCM. 3 It should be mentioned that the exact behavior of any switched system can be simulated using the exact continuous-time model in hand. Although best accuracy can be obtained using such model, this model is extremely slow as compared to even SSA models not to mention the fast discrete-time models. It is clear from the literature that there is a need for accurate and fast algorithm to be used for simulation, analysis and design of switched systems operating in DCM. In this paper, a new sampled-data model for DCM PWM converters is introduced. Besides accuracy and speed, the motivation for the new model is based on the fact that, in many power electronic circuits, it is the average values of the voltage and current rather than their instantaneous values that are of greatest interest. To accommodate for such applications, the proposed model provides the discrete-time response of the OCA signals of DCM PWM converters. This model (DCM OCA) is compared to most related existing models through numerical comparative example of boost converter. 2. Proposed Model 2.1 System Description The DCM PWM converter can be described by: A1 x(t) + B1 u(t) , A2 x(t) + B2 u(t) , ẋ(t) = A3 x(t) + B3 u(t) , C1 x(t) , C2 x(t) , y(t) = C3 x(t) , t ∈ τ1 t ∈ τ2 (1) t ∈ τ3 t ∈ τ1 t ∈ τ2 t ∈ τ3 4 (2) where u ∈ Rm is the input vector, x ∈ Rn is the state vector, and y ∈ Rp is the output vector. The system switches between three topologies, (A1 , B1 , C1 ), (A2 , B2 , C2 ), and (A3 , B3 , C3 ), with switching intervals determined by: τ1 := kT ≤ t < kT + d1k T (3) τ2 := kT + d1k T ≤ t < kT + (d1k + d2k )T (4) τ3 := kT + (d1k + d2k )T ≤ t < kT + T (5) where T is the switch period, (d1k + d2k ) ∈ [0, 1] are the switch duty ratios, and k is the discretetime index. All auxiliary inputs will be assumed to be piecewise constants, i.e. u(t) = uk for all t ∈ [kT, (k + 1)T ). This assumption is not necessary and is made for convenience only; more general cases would only require more complex notations. The OCA representation of the output signal [1] is given by: 1 y (t) := T ∗ Z t y(τ )dτ (6) t−T The signal, y ∗ (t) is used to develop a new discrete-time model for DCM PWM converters. This model provides the basis for discrete-time simulation of the averaged value of any state in the DCM PWM system, even during transient non-periodic operating conditions. 2.2 Discrete-Time Model It is desired to compute, without approximation, the evolution of all system variables at the sampling instants, t = kT assuming three different topologies for the system. Since the state and output equations (1)–(2) are piecewise-linear with respect to time t, the desired discrete-time model can be obtained symbolically. Using the notation, xk := x(kT ) and yk∗ := y ∗ (kT ), the result is the OCA large signal model: xk+1 = A(d1k , d2k )xk + B(d1k , d2k )uk (7) ∗ yk+1 = C(d1k , d2k )xk + D(d1k , d2k )uk (8) 5 where the input nonlinearities A(d1 , d2 ), B(d1 , d2 ), C(d1 , d2 ) and D(d1 , d2 ) are given by: A(d1 , d2 ) := Φ3 Φ2 Φ1 (9) B(d1 , d2 ) := Φ3 (Φ2 Γ1 + Γ2 ) + Γ3 (10) C(d1 , d2 ) := C1 Φ∗1 + C2 Φ∗2 Φ1 + C3 Φ∗3 Φ2 Φ1 (11) D(d1 , d2 ) := C1 Γ∗1 + C2 (Φ∗2 Γ1 + Γ∗2 ) + C3 (Φ∗3 (Φ2 Γ1 + Γ2 ) + Γ∗3 ) (12) The arguments d1 T , d2 T , and (1 − d1 − d2 )T for (Φ1 , Φ∗1 , Γ1 and Γ∗1 ), (Φ2 , Φ∗2 , Γ2 and Γ∗2 ) and (Φ3 , Φ∗3 , Γ3 and Γ∗3 ), respectively are omitted from the above equations for notation simplicity. where: Φi (t) := eAi t Z t eAi τ bi dτ Γi (t) := 0 Z t 1 ∗ Φi (t) := Φi (τ )dτ T 0 Z 1 t ∗ Γi (τ )dτ Γi (t) := T 0 (13) (14) (15) (16) Note that the averaging operation adds “sensor” dynamics to the system; as a consequence, the large-signal model (7)–(8) is not in standard state-space form. By defining the augmented state vector x∗ ∈ Rn+p such that: x∗k := xk C(d1k−1 , d2k−1 )xk−1 + D(d1k−1 , d2k−1 )uk−1 (17) an equivalent (but standard form) representation of the OCA large-signal model is given by: x∗k+1 = A∗ (d1k , d2k )x∗k + B ∗ (d1k , d2k )uk yk∗ = C ∗ x∗k where: (18) (19) A∗ (d1 , d2 ) := A(d1 , d2 ) 0n×p 1 2 C(d , d ) 0p×p 6 (20) B ∗ (d1 , d2 ) := C ∗ (d1 , d2 ) := B(d1 , d2 ) 1 2 D(d , d ) 0p×n Ip×p (21) (22) Note that not only the OCA values of output signal will be available but also the values of the signals (without averaging) at the beginning of every switching period as well. 2.3 Duty-ratio Computation Unlike duty ratio d1 ,the duty ration d2 is not known in advance and should be computed at the zero-crossing of the current signal in every switching period. A single variable nonlinear function can be solved for d2 using any standard nonlinear equation solver. For Matlab simulations, a built-in nonlinear equation solver (fzero) can be used to solve for d2 . To reduce the simulation time, the Piecewise Linear (PL) iteration method used in [12] for tracking control is adopted here to solve the nonlinear equation for the duty ratio d2 . Consider a PWM converter operating in the DCM. It is desired to find the value of d2 corresponding to the boundary between topologies 2 and 3. From the beginning of the first topology to the end of the second topology, the original signals (without averaging) are governed by the state space equation: xk+1 = F (d1k , d2k )xk + G(d1k , d2k )uk (23) where the input nonlinearities F (.) and G(.) are given by: F (d1k , d2k ) = Φ2 (d2k T )Φ1 (d1k T ) (24) G(d1k , d2k ) = Φ2 (d2k T )Γ1 (d1k T ) + Γ2 (d2k T ) (25) Note that this is the same state space model for CCM with (1 − d1k ) replaced by d2k . The value of 7 d2k at every switching interval, k is to be calculated. Define the scalar function: y 0 = C0 xk+1 (26) to be the nonlinear equation equals to zero at the boundary between topologies 2 and 3 (commonly current signal). Then, at every switching period, the nonlinear equation to be solved for d2 is given by: 0 = C0 Φ2 (d2k T )Φ1 (d1k T )xk + C0 (Φ2 (d2k T )Γ1 (d1k T ) + Γ2 (d2k T ))uk (27) and rearrangement of the equation gives: 0 = C0 Φ2 (d2k T )(Φ1 (d1k T )xk + Γ1 (d1k T )uk ) + C0 Γ2 (d2k T )uk (28) Note that the term, x0 := Φ1 (d1k T )xk + Γ1 (d1k T )uk is nothing but the states vector evaluated at the end of the first interval of switching period, i.e. at, kT + d1k T . This quantity does not depend on d2 and can be computed ahead of time, at each switching interval, without iteration. Hence, it will be assumed constant while formulating the PL procedure. The nonlinear scalar functions to be approximated by PL functions are: C0 Φ2 (d2 T ) ≈ ασ d2 + βσ , (σ − 1)W ≤ d2 ≤ σW (29) C0 Γ2 (d2 T ) ≈ γσ d2 + δσ , (σ − 1)W ≤ d2 ≤ σW (30) for σ = 1, 2, . . . , nσ , where W = 1/nσ is the width of the uniform segments and nσ is the number of segments used for linearization. The domain over which the input nonlinearities are approximated is d2 ∈ [0, 1]. The coefficients of the approximation are related to the original model by: ασ = C0 Φ2 (σW ) − C0 Φ2 ((σ − 1)W ) W (31) βσ = C0 Φ2 (σW ) − ασ W (32) γσ = (33) C0 Γ2 (σW ) − C0 Γ2 ((σ − 1)W ) W δσ = C0 Γ2 (σW ) − γσ W 8 (34) Figure 1: boost converter The iteration equation is then given by: d2 (j+1) = −βσ(j) x0 + δσ(j) uk ασ(j) x0 + γσ(j) uk (35) where j is the iteration index. The accuracy of PL iteration depends on the number of segments (nσ ). The precalculation time will increase as nσ increases but the iteration will slightly increase as nσ increases. This PL iteration process is used in the simulation programs for discrete-time models to reduce the simulation time. 3. Numerical Example To compare existing models with DCM OCA model, consider the boost converter circuit shown in fig. 1. The input is u = Vg and state variables are x1 = iL and x2 = vC . The same parameter values used in [5] for boost converter are used here except the value of R which is increased to force the converter to operate in the DCM. These are: R = 20 Ω, L = 100 μH, C = 4.4 μF, Vg = 5 V, T = 100 μs, and D = 0.5. The boost converter is defined by: A1 = A2 = 0 0 1 0 − RC − L1 1 − RC 0 1 C B1 = B2 = 9 1 L 0 1 L 0 C1 = C2 = 0 1 0 1 (36) (37) A3 = 0 0 1 0 − RC B3 = 0 0 C3 = 0 1 (38) The DCM SSA model for boost converter is given [2] by: du 2x1 x2 − L dT (u − x1 ) x1 x2 = − C RC ẋ1 = (39) ẋ2 (40) and the CDTM is given by: xk+1 = A(d1k , d2k )xk + B(d1k , d2k )uk (41) where the input nonlinearities A(d1 , d2 ) and B(d1 , d2 ) are defined in (9) and (10). All simulations were performed using Matlab 7 on a personal computer (Pentium 1.6 GHz) running Microsoft Window XP. Results of switched, DCM SSA, and conventional discrete-time model (CDTM) for the boost converter are shown in fig. 2. The DCM OCA model is also added to the plot to show its accuracy as compared with its continuous counterpart DCM SSA model as well as other models. In the figures, the current and voltage signals are represented by: − : switched and DCM SSA −− : MFA ◦ : CDTM : DCM OCA It should be noted that no approximation is made in deriving the new discrete-time model. Consequently, the steady-state average values predicted by the DCM OCA model are more accurate than the ones obtained by the DCM SSA method for this example. The only approximation in the proposed model is in the computation of d2 if the PL method is used. In this example the results of the DCM OCA model are computed using Matlab nonlinear equation solver and 10 3 2.5 Current (A) 2 1.5 1 0.5 0 -0.5 0 0.1 0.2 0.3 0.4 0.5 Time (ms) 0.6 0.7 0.8 0 0.1 0.2 0.3 0.4 0.5 Time (ms) 0.6 0.7 0.8 16 Voltage (V) 14 12 10 8 6 Figure 2: simulation comparison of various models for boost converter operating in DCM 11 Table 1: Simulation Times for Boost Converter in DCM Method Switched DCM SSA CDTM with PL DCM OCA w/o PL DCM OCA with PL Normalized Simulation Time 41 0.77 0.83 11.20 1.00 also using the PL method. The steady-state values are iL = 1.16402 A and vC = 10.79134 V for DCM SSA, iL = 1.14667 A and vC = 10.43337 V for the DCM OCA without PL approximation and iL = 1.133 A and vC = 10.38242 V for the DCM OCA with PL approximation (nσ = 20). The accuracy of the DCM SSA method decreases as the switching frequency decreases, while the accuracy of the proposed model does not depend on the switching frequency. Figs. 3 and 4 shows the steady state errors of the DCM SSA and DCM OCA (with PL) methods as functions of switching period (T ). The normalized simulation times required by each method are summarized in table 1. Note that the steady-state values can be exactly computed from the state equations at equilibrium, that is: xˉ∗ = (I − A∗ )−1 B ∗ (42) As expected, the same values iL = 1.14667 A and vC = 10.43337 V are obtained by solving this equation at d1 = 0.5. It should be mentioned that a similar piecewise linearization technique is used for CDTM for fair comparison. The algorithm presented in [11] will reduce the memory size required for storing the data used for online computation but, at the same time, will increase the simulation time. The DCM OCA model combined with the discrete-time model in [1] can exactly simulate the behavior of a PWM converter operating in both CCM and DCM. By changing the duty ratio, one can force the converter to operate in both CCM and DCM. The same example of boost 12 3 Steady-state error (%) 2.5 2 1.5 1 0.5 0 70 80 90 100 110 Switching Time (μs) 120 130 Figure 3: current steady-state error for DCM SSA (◦) and DCM OCA with PL () 8 7 Steady-state error (%) 6 5 4 3 2 1 0 70 80 90 100 110 Switching Time (μs) 120 130 Figure 4: voltage steady-state error for DCM SSA (◦) and DCM OCA with PL () 13 Table 2: Simulation Times for Boost Converter in CCM and DCM Method Switched DCM SSA MFA CDTM with PL DCM OCA w/o PL DCM OCA with PL Normalized Simulation Time 45 1.2 4.8 0.85 12.2 1.00 converter is used to show the simulation results of boost converter operating in the CCM and then in the DCM. This was achieved by operating the converter using the duty ratio defined by: 0 ≤ k < 10 0.8 cos (1000kT ) 1 dk = (43) 0.45 k ≥ 10 Fig. 5 shows the simulation results of the signals where the four methods, including MFA, are plotted for comparison. MFA method simulates, with good accuracy, the averages in the CCM operation period, while the DCM SSA method approximates, with good accuracy, the averages in the DCM operation period. The proposed method, on the other hand, is able to simulate the OCA behavior of the system throughout the simulation time with best accuracy and excellent simulation time. The normalized simulation times required by all methods are summarized in table 2. 4. Conclusion This paper proposed a new model which provides the discrete-time response of the OCA value of the output signal in DCM PWM converters. This model is used as a simulation model for PWM converters operating in the DCM. It is compared to existing models through a numerical example of boost converter. The proposed model provides the most accurate OCA values while the DCM SSA model predicted the next accurate average values for DCM and MFA model predicted the next accurate average values for CCM. The discrete-time OCA model [1] is a special case of 14 8 7 6 Current (A) 5 4 3 2 1 0 -1 0 0.2 0.4 0.6 Time (ms) 0.8 1 1.2 0 0.2 0.4 0.6 Time (ms) 0.8 1 1.2 35 30 Voltage (V) 25 20 15 10 5 0 Figure 5: simulation comparison of various models for boost converter operating in CCM and DCM 15 the proposed mode, and hence a combination of these two models is used to simulate converters operating in both modes of operation. Acknowledgement This work was supported in part by the Research Center, College of Engineering, King Saud University, Riyadh, Saudi Arabia under grant number 4/426. References [1] M. S. Al-Numay, A new discrete-time simulation method for switched systems using averaging, International Journal of Modelling and Simulation, 21(4), 2001, 288–291. [2] J. Sun, D. M. Mitchell, M. F. Greuel, P. T. Krein and R. M. Bass, Averaged modeling of PWM converters operating in discontinuous conduction mode, IEEE Transactions on Power Electronics, 16(4), 2001, 482–492. [3] D. Czarkowski, M. K. Kazimierczuk, Energy-conservation approach to modelling PWM DCDC converters, IEEE Transactions on Aerospace and Electronic Systems, 29(3), 1993, 1059– 1063. [4] R. D. Middlebrook and S. Cuk, A general unified approach to modeling switching-converter power stages, International Journal of Electronics, 42(6), 1977, 521–550. [5] V. A. Caliskan, G. C. Verghese and A. M. Stankovic’, Multifrequency averaging of DC/DC converters, IEEE Transactions on Power Electronics, 14(1), 1999, 124–133. [6] A. Reatti and M. K. Kazimierczuk, Small-signal model of PWM converters for discontinuous conduction mode and its application for boost converter, IEEE Transactions on Circuits and Systems–: Fundamental Theory and Applications, 50(1), 2003, 65–73. 16 [7] R. Prajoux, J. C. Marpinard and J. Jalade, Accurate mathematical modeling of PWM power regulators, NASA Technical Translation, NASA TT F-15947, National Aeronautics and Space Administration, Washington, D.C., September 1974. [8] H. A. Owen, A. Capel and J. G. Ferrante, Simulation and analysis methods for sampled power electronic systems, Proc. IEEE Power Electronics Specialist Conference, 1976, 44–55. [9] F. C. Lee, R. P. Iwens, Y. Yu and J. E. Triner, Generalized computer-aided discrete timedomain modeling and analysis of dc-dc converters, IEEE Transactions on Industrial Electronics and Control Instrumentation, 26(2), 1979, 58–69. [10] G. C. Verghese, M. E. Elbuluk and J. G. Kassakian, A general approach to sampled-data modeling for power electronic circuits, IEEE Transactions on Power Electronics, 1(2), 1986, 76–89. [11] R. C. Wong, H. A. Owen and T. G. Wilson, An efficient algorithm for the time-domain simulation of regulated energy-storage dc-to-dc converters, IEEE Transactions on Power Electronics, 2(2), 1987, 154–168. [12] M. S. Al-Numay and D. G. Taylor, Digital tracking control for PWM systems with unacceptable zeros, IEEE Transaction on Circuits and Systems I: Fundamental Theory and Applications, 45(4), 1998, 397–407. Biography Mohammed S. Al-Numay was born in Riyadh, Saudi Arabia in 1963. He received the B.Sc. degree (Second Class Honors) from King Saud University, Riyadh, Saudi Arabia, in 1986, the M.Sc. degree from Michigan State University, East Lansing, MI, in 1990, and the Ph.D. degree from Georgia Institute of Technology, Atlanta, GA, in 1997, all in electrical engineering. He is currently an Assistant Professor in the Electrical Engineering Department at King Saud Uni- 17 versity. His research interests include discrete-time modelling, simulation and control of PWM systems, and digital control of non-minimum phase systems. 18