A CAD SIMULATOR BASED ON LOOP GAIN MEASUREMENT FOR SWITCHING CONVERTERS Dongsheng Ma, Vincent H. S. Tam*, Wing-Hung Ki** and Hylas Y. H. Lam** Dept. of Electrical & Computer Engineering, Louisiana State University, Baton Rouge, LA 70803, USA Artesyn Technologies Asia-Pacific Ltd., Hong Kong SAR* Dept. of Electrical & Electronic Engineering, Hong Kong University of Science & Technology, Hong Kong SAR**
[email protected],
[email protected]*, {eeki, hylas}@ee.ust.hk**
ABSTRACT
2. DEVELOPMENT OF THE SIMULATOR
A CAD simulator for power converters on the MATLAB platform is presented. It employs an interpolation technique in determining switching instants in the time domain accurately. A small sinusoidal source is then injected to obtain the steady state time response and is followed by FFT to obtain the resultant amplitude and phase. By varying the injected frequency, loop gain frequency response is obtained. Issues on loop gain measurement are discussed. A cost-effective set-up is then presented. The methods of simulation and measurement can be applied in power converters of any topologies.
2.1 Modeling of the Switching Converter Power Stage
Vo
Vg
PWM Modulator
1. INTRODUCTION
Compensation Network Control Loop
A switch mode power converter, or switching converter for short, is a non-linear sampled-data system due to the presence of switches. Hence, analysis methods for linear systems are not applicable. With increasing popularity of switching converters due to their high efficiencies and flexible conversion manners, a unified methodology for analysis and design is in urgent need. Over the past thirty years, many researches have been conducted to tackle this problem. One appealing approach is to solve for the steady state solution of the converter, followed by perturbation analysis to obtain a linearized small signal model of the converter, from which the system loop gain can be determined for stability and transient response considerations [1] [2]. The common practice to verify that a model is valid is to perform measurement. If the measurement results cope well with analysis, the model is then concluded as valid. The problem is that every model is substantiated with measurement results, yet the models do not necessarily agree with each other. One problem lies in the lack of measurement details for fair comparison, another is due to variation in parameters, and parasitic elements that are unaccounted for. In loop gain analysis, every element assumes a constant value, e.g., ESR (equivalent series resistance) is 50m:, but their values are difficult to be measured accurately. In fact, they may vary according to operating condition and frequency. Despite the difficulty, design engineers of integrated switching converters still need the loop gain in advance for stability consideration. Hence, a good and efficient simulator is needed. Moreover, a good simulator may be used to evaluate the validity of a converter model, as all elements have ideal characteristics. For example, if the ESR is set at 50m:, then it stays constant throughout the simulation.
Fig. 1 Block diagram of a switching converter
Switching converters can be simulated using Hspice. However, if realistic models are used for transistors, the same problem of parameter variation arises as in measurement. For example, a transistor enters different modes of operation during both turn on and turn off, and the corresponding switch resistance cannot be a constant. If ideal elements are used, then the simulation may not converge. Hence, our simulator is developed on the MATLAB platform instead. Fig. 1 shows a regulated switching converter that constitutes a loop composed of the power stage, the compensation network and the pulse width modulator. The power stage consists of inductor(s), capacitor(s) and switch(es). Due to the switching actions, it can be modeled by a set of piecewise linear differential equations for each state. Second order converters such as buck, boost or flyback converters have up to three states (two states for continuous conduction mode (CCM) operation, and three states for discontinuous conduction mode (DCM) operation). The state space equations for n=1, 2, 3 are x An x Bn u (1)
y
C n x Bn u
(2)
where x = [vc iL]T is the state vector, with vc being the voltage of the filtering capacitor and iL the inductor current, and u and y are the input and output vector respectively. The solution to Eqn. (1) is x(t+'t) = An–1Bu + e An 't (x(t) – An–1Bu)
(3)
An 't
as I + An't, the equation implemented by By approximating e the simulator is (4) x(t+'t) = x(t) + x( t )'t
This research is in part supported by the Hong Kong Research Grant Council under grant CERG HKUST 6209/01E and the Innovative Technology Fund under grant ITS/033/02.
;,(((
9
,6&$6
The compensation network consists of linear elements such as op amp, resistors and capacitors in generating poles and zeros for loop compensation, which is also modeled as one set of linear differential equations for simulation. The pulse width modulator is to determine the switching instants (trip points) of the power stage. In the simulator, it determines the set of state space equations used at a particular time. Fig. 2 shows the state transition diagram of a 2nd order switching converter, where L0~L2 and T0~T2 represent leading- and trailing-edge modulation tripping conditions [3]. For example, for a voltage-programming converter with trailing-edge modulation, T0 is the condition when the oscillator ramp hits the output of the error amplifier. The simulator follows the transitions in the state diagram strictly in simulating time domain dynamics. State 3
L1
L2 T0
T2 T1
State 1
T0
State 2
L0 L1
Fig. 2 State transition diagram of 2nd order converters
circuit, the loop gain is given by T(s) = –Vt(s)/Vr(s), but for a switching converter, the loop gain cannot be obtained directly in the frequency domain. Voltage injection is employed, and from the discussion in Sec. 3, it is required that Zr(s) >> Zt(s) at the injection point. A suitable location is at the output of the error amplifier Va that feeds into the PWM comparator. Here, Va compares with a ramp to determine the trip point. An ideal signal Vj = Ajsin2Sfjt is then injected across Vt and Vr. Time domain simulation is then performed until the converter has settled in the steady state. Fast Fourier Transform (FFT) is then performed on the settled time domain section of both Vr(t) and Vt(t). The frequency spectrum of Vr(s) consists of the injected signal at fj, the switching noise at the switching frequency fs, mixed signals at fs – fj and fs + fj, and high order harmonics [3]. The spectrum of Vt(s) consists of the same components, but with different magnitudes. Yet, we only focus on the magnitude and phase at fj to compute the loop gain at fj. The simulation procedures will be repeated and we sweep fj in the overall interested frequency range. The simulation algorithm mimics that of the loop gain measurement by a gain/phase analyzer. Hence, the simulation results can be used for validating both modeling and measurement results. Performance such as ripple voltages, line and load regulations can also be obtained. 2.2 Error Correction on Finite Duty Ratio
Input Design Parameters
Power Stage Modeling including parasitic components
Compensation Network Modeling
Suppose the total number of simulation steps within one switching cycle is n, then the resolution of duty ratio is 1/n. Let the actual duty ratio be D and i/n < D < (i+1)/n. In simulation, due to limited resolution, the system can only assign a duty ratio that toggles between i/n and (i+1)/n to obtain an average duty ratio of D. For example, if a buck converter requires an actual duty ratio of D=0.5752, with a resolution of 1/200, the simulated duty ratio will toggle between 0.575 and 0.580, as shown in Fig. 4. Numerical oscillation of the duty ratio is reflected as fluctuation on vC and iL as shown in Fig. 5. When FFT is performed, inaccurate frequency information will be introduced.
PWM Modulator Modeling
Modeling on State Transitions: Real-time state: steady state; dynamics; Operation mode: CCM, DCM; Modulation mode: PWM (Trailing-edge, leading-edge), PFM, others;
Loop Breaking & Signal Injection at fi (i=1,2, ..., n)
Transient Simulation
Data Storage
Fast Fourier Transform (FFT)
Data Storage
i=i+1
i=n ?
No
Fig. 4 Oscillation due to finite duty ratio
Yes Display Simulation Results
End
Fig. 3 Flow chart of the simulation
By combining the equations of the power stage and the control loop (including the compensation network and the PWM modulator), the system is then closed. Fig. 3 shows the flow chart of the simulation in finding the loop gain of the converter. To find the loop gain of the converter, the loop is broken at a suitable location and a signal is injected, and the responses after (Vt) and before (Vr) the injection point are compared. For a linear
9
Fig. 5 Simulated effect of oscillation on vC and iL
To solve the problem of numerical oscillation while maintaining computation efficiency, an error correction technique is employed [3]. If a change in state is detected, the actual trip point is calculated by using the equations from the previous state to trace the system variables back to the trip point, and then using the equations of the current state to find the actual variables x(t+'t), as shown in Fig. 6. Hence, accuracy is much enhanced and numerical oscillation can thus be effectively eliminated.
drawback is that a very large inductor is needed and is not suitable for measuring loop gain at low frequencies. In [6], a digital modulation method is proposed. However, the loop gain thus measured may not be directly useful for designing compensation network for current programming switching converters [2].
X X(t+'t) actual trip point Correction
S1 S2
X(t)
Actual X
Fig. 8 Injection model
t actual trip point t+'t
t
Fig. 6 Error correction on finite duty ratio
2.3 Signal Injection The injection point of the simulator is chosen to be the output of the error amplifier, which is the same location as for loop gain measurement. The ratio of the reference node impedance Zr and test node impedance Zt (Sec. 3) is Zr/Zt=f/0=f, which indicates an ideal injection point. The injected signal should be chosen within a correct range of amplitude. With the injected signal, the trip point is determined by Vramp = Va + Vj = Va + Ajsin(2Sfjt). Aj should be chosen such that 0 < Va + Vj < Vm for proper comparison, where Vm is the amplitude of the ramp. Aj should not be too small, as numerical precision and approximation in modeling are considered as random noise, and Aj should be larger than the noise to minimize errors. Extensive simulation shows that 10PV < Aj < 100mV gives good simulation results.
Vo
Vg
C1
C2 Zr
Zt
R2
Va OPAMP
Vref Compensation Network
PWM Modulator
Reference
Test
T s G s
R1 R2 R3
The loop is then broken at the junction of R1 and R3, generating two nodes Vr and Vt. Vr is the reference node and Vt is the test node. Signal injection propagates from Vr, goes around the loop, and returns to Vt. The loop gain is given by T ' s V t s V r ( s ) G s V x s I x R 3 / V r s (6) G s R 2 R 3 R1 R 2
By substituting (5) into (6), we have § R3 · R3 ¸¸ T ' s T s ¨¨1 © R1 R2 ¹ R1 R2
.
(7)
With Zr=R1+R2 and Zt=R3, Eqn. (5) shows that a proper injection point is where Zt/Zr(=R3/(R1+R2)) should be as small as possible. For this reason, the injection point in our measurement is located between the error amplifier and the comparator. An impedance/gain phase analyzer injects signal through a transformer to the converter, which propagates around the loop. The ratio of the signals at two terminals of the injection gives the loop gain. It can be shown that the measured loop gain T' is the sum of the actual loop gain T plus noise divided by the injected signal Vj (T'(fj) = T(fj) + noise(fj)/Vj) . If Vj is too small, T' is dominated by noise, resulting in wrong simulation results. As an example, Fig. 9 shows a measured loop gain with unsuitable injection amplitude.
3. LOOP GAIN MEASUREMENT AND THEORETICAL ANALYSIS Power Stage
This research uses a measurement setup motivated by [5], as shown in Fig. 7. A feedback system with signal injection can be modeled in Fig. 8. Before inserting the transformer for signal injection, the original loop gain is R2 (5)
Signal input
HP4194A Gain / Phase Analyzer
Fig. 7 Measurement setup
To verify the validity of the simulator, loop gain measurement is performed. In this paper, loop gain simulation and measurement serve as cross-checking mechanisms. However, loop gain is not as easy to measure as other quantities such as voltages and currents. The loop has to remain operative at DC such that operating points are maintained. Yet, it has to be broken at higher frequencies. In [4], a voltage source is inserted, but strict impedance constraints have to be satisfied. In [5], the loop is broken by an inductor. The
Fig. 9 Loop gain measurement with unsuitable injection amplitude
9
For better understanding the characteristics of switching converters, theoretical analysis has also been performed in this research. We primarily utilize state space averaging (SSA) and signal flow graph (SFG) techniques for analysis [2]. After SSA is performed on the sets of linear differential equations of the power stage and the feedback network, the averaged state equations are then perturbed, and the corresponding SFG is generated. The closed loop transfer functions can be obtained by solving the perturbed equations mathematically, or by applying Mason's Gain Formula to the SFG. This method is applicable to all kind of switching converters operating in either CCM or DCM.
converter loop gain and shortens the design time with a costeffective simulation tool.
(a) (b) Fig. 10 Transient simulations in (a) CCM and (b) DCM
4. EXPERIMENTAL VERIFICATION Table 1. Configuration of the buck converter for verification CCM DCM CCM DCM 8 12 97.3 97.3 Vg (V) fs (kHz) 10 10 6.8 6.8 C (PF) R1 (k:) 39 39 2.2 2.2 L (PH) R2 (k:) 0.244 0.244 15 24.3 b R (:) 1.224 1.224 Vref (V) 100 100 0.4 0.4 GEA (dB) RC (:) 0.3 0.3 100 100 RL (:) Rf (k:) 1.5 1.5 1 1 Cf (nF) RS (:) 3.4 3.9 3.61 3.61 Vm (V) Rd (:)
The configuration of a buck converter for verification is listed in Table 1. Simulation and measurement results on the transient performance for both CCM and DCM are shown in Fig. 10, which cope with each other well. Loop gains by simulation, measurement and theoretical analysis are also performed and compared in Figs. 11 and 12. The derived loop gains in CCM and DCM based on the analysis in Sec. 3 are shown as Eqns. (8) and (9). As a whole, the simulation approximates the measurement well. The small phase deviation is mainly due to inaccurate values of the parasitics, especially RC, as well as sampling problem at around the switching frequency. The results of converters with a different topology have also been obtained with satisfactory performance. CCM:
T s
As b § VC · ¨ ¸ Vm ¨© d1 ¸¹ 676 (8) s
1
1 1 s § s · 1 ¨ ¸ Q Z 0 ¨© Z 0 ¸¹ 1
T (s)
A( s )b § 2VC 1 M ¨ Vm ¨© (2 M ) K M 676 (12.1) s 1
(8)
2
1 § s s · § · ¨ ¸¨ ¸ 7.6 © 2S 8.06k ¹ © 2S 8.06 k ¹ 3/2
DCM:
Fig. 11 Loop gain of the CCM buck converter
2
· 1 ¸ ¸ ¹ 1 sRC 1 M 2M
Fig. 12 Loop gain of the DCM buck converter
REFERENCES
(9) [1]
1 s 2S 1.78k
[2]
5. CONCLUSIONS In this paper, a unified simulation method for the loop gain of switching converters is introduced. Several techniques are proposed to improve simulation accuracy. Experimental measurement issues are also discussed. Theoretical analysis based on SSA and SFG is also addressed. The method is demonstrated to work satisfactorily for PWM switching converters. Experimental results fit well with the simulation and theoretical ones. The research contributes to a better understanding of switching
9
[3] [4] [5] [6]
R. D. Middlebrook and S. Cuk, “A general unified approach to modeling switching-converter power stage,” IEEE Power Elec. Specialists Conf., pp.18-34, 1976. W-H Ki, “Signal flow graph in loop gain analysis of dc-dc PWM CCM switching converters,” IEEE Trans. on Ckts. & Sys. I, no. 6, pp.644-654, June 1998. V. H.S. Tam, Loop Gain Simulation and Measurement of PWM Switching Converters, MPhil. Thesis, HKUST, 1999. R. D. Middlebrook, “Measurement of loop gain feedback systems,” Int. J. of Elec., vol. 57, no. 4, pp.485-512, 1975. S. Rosenstark, “Loop gain measurement in feedback amplifiers,” Int. J. of Elec., vol. 57, no. 3, pp.415-421, 1984. B. H. Cho and F. C. Lee, “Measurement of loop gain with the digital modulator,” IEEE Power Elec. Specialists Conf., pp.363-373, 1998.