Switchmode power supplies (SMPSs) include switching elements (MOSFETs, diodes, IGBTs, etc.) and storage components (inductors and capacitors). The way you arrange these elements together leads you to a given topology. Let's look at the following basic topologies and their definitions.

*Buck:* Use this converter when you need to have an output voltage lower than the input voltage, without any galvanic isolation. An extension from this first topology is the forward converter, which combines a transformer to provide the end user with isolation. Further extensions are possible, like the half-bridge, the full-bridge, and the push-pull. In these devices, the energy transfer takes place during the time the main switch is closed.

*Boost:* This topology makes the output voltage higher than the input voltage, with no galvanic isolation.

*Buck-Boost:* When you need to either decrease or elevate the output voltage, the buck-boost is a possible choice, but using it can result in negative output voltage (by reference to the input ground). To overcome its lack of isolation, you can use the flyback topology, without any polarity restrictions. In these two last converters, the input to output energy process occurs at the switch opening.

*Single Ended Primary Inductance Converter (SEPIC):* The SEPIC finds high-volume applications where you need to boost or decrease the battery voltage without inverting the output voltage, e.g., in a portable handset.

Each basic topology requires an independent model that you can expand by the adjunction of an external transformer to generate forwards, full-bridge, etc. Depending on the performance or defaults you wish to highlight, two different model approaches are available: average or switched models.

A switched model is a way to simulate the behavior of an electrical circuit exactly, as if you were building it on a breadboard. This includes the semiconductor models, the transformer, its associated leakage elements, and the peripheral elements. In this case, the time variable, t, is of primary importance because it governs the overall circuit operation and performances such as semiconductor losses, ringing spikes due to parasitic, and stray elements. Because an SMPS usually works at high frequencies, the simulation of response times in the order of milliseconds can be computationally high, leading to prohibitive analysis times. Keep in mind that SPICE acts like a sample-and-hold system that continuously adjusts its internal timestep depending on the dI/dt or dV/dt of the analyzed circuit. Furthermore, transient analysis doesn't easily lend itself to ac transfer function evaluations.

On the other hand, average models represent a method in which the switching component has disappeared in favor of a unique state equation describing the average behavior of the system. In a switching system, a set of linear equations describes the circuit's electrical characteristics for the two stable positions of the ON or OFF switch(es). Note that a third interval also exists when the converter leaves the continuous conduction mode (CCM) and then enters the discontinuous conduction mode (DCM). How do you properly link the two (or three in DCM) matrices?

A method such as the state-space-averaging (SSA) technique smoothes the discontinuity associated with the transitions of the switch(es) between these states. The result is a set of continuous nonlinear equations in which the state equation coefficients now depend upon the duty cycles *d* and *d*'(1-*d*). A linearization process around a stable operating point leads to a set of continuous linear equations. The SSA is a long and complicated process because you restart from scratch every time you modify the converter's configuration (for example, when you add an input filter).

Following are the advantages and drawbacks of both model types.

### Average Models

- Small-signal response: Draw Bode or Nyquist plots in a snapshot and assess the stability.
- Input and output impedance plots: First, verify the stability when adding an input filter.
- No switching component: simulation results are immediate.
- You can visualize long, transient effects of several tens of milliseconds (for example, in a low bandwidth system like a power factor corrector).
- It's difficult to see the effects of parasitic elements, although some models now include them.
- You can't evaluate the switching losses of semiconductors.

### Transient Models

- Can include parasitic elements: See the effect of the leakage inductance and quantify the main switch voltage stress or the poor resulting cross-regulation.
- You can accurately model propagation delays: What is my real final peak current when it takes 150 ns to fully propagate the internal latch reset and finally open the power switch?
- Transient simulations easily reveal ripple levels and sampling effects. You can precisely evaluate conduction losses, rms, and average levels.
- Because of the numerous switching events, simulation time can be very long.
- Transient response is difficult to assess in low-bandwidth applications.

Several options exist to model or derive the small-signal equivalent circuit of a given topology: you either write the state equations corresponding to the two switch(es) positions and average them over a switching cycle, or you directly average the converter waveforms. The common denominator of those methods remains the final small-signal linearization needed to extract the equivalent model. You can describe the first method through the SSA technique, while the other options include circuit averaging and averaged switch modeling.

*Averaged* usually means that an event of a periodic time function (for example, the switch current in a converter) integrates during a cycle and divides by the duration of that cycle. Thus, the averaged function is a succession of separate discrete values. If you replace that discrete function with a continuous function that has the same values as the averaged function at the end of each period and is essentially smooth, then you get an “averaged and continuous” representation of the original function. In *Fig. 1*, on page 26, you see how a waveform (for instance, the duty-cycle evolution in an ac-modulated converter) smoothes over the discrete average values. The duty cycle is modulated following the law d(t)=D_{DC} + D_{m} ×cosω_{m}t. D_{DC} represents the steady-state duty cycle corresponding to a given operating point. D_{DC} and D_{m} are constant with the condition |D_{m} | << D_{DC}, implying the system under study stays linear in the modulated region. The modulation frequency ω_{m} is much smaller than the converter switching frequency. The averaged and continuous function is similar to the filtered waveform, but isn't exactly the same, because it's a mathematical abstraction rather than a real time-dependent physical variable. *Fig. 1* neglects the ripple.

In the average circuit modeling technique, the exercise ties in isolating and replacing the switch network with a set of current and voltage sources whose electrical architecture doesn't vary with time. In the boost converter example, we can redraw its electrical schematic highlighting the sources, now called v_{1}(t) and i_{2}(t); *Fig. 2*, on page 28, depicts this concept.

When the switch closes during the ON time (or D Ts), v_{1}(t)=i_{2}(t)=0. At the switch opening (during d Ts), v_{2}(t) appears across its connections because of the diode conduction and i_{2}(t)=i_{1}(t). *Fig. 3* graphically represents these waveforms. Now, average the signals over a switching cycle.

By plugging these averaged equations into the *Fig. 2* model, on page 28, we obtain a nonlinear circuit-averaged model for the boost converter. The next step consists of perturbing and linearizing the equations to extract the final small-signal model and its electrical representation.

### State Space Averaged Models

To present the SSA technique, we show a simple buck converter and highlight the state variables. State variables are usually associated with storage elements like capacitors and inductors. If we know the state of these variables at a given time, (for example, at t=0) then we should be able to solve the system equations for other t>t_{0} (*Fig. 4*).

You must first write the classical node/mesh equations, then rearrange them to reveal the state variables: x1 the inductor current and x2 the capacitor voltage. You have as many state variables as storage elements (the number of storage elements directly gives the order of the circuit). The object of the development is to make the equations fit the universal format:

Where:

A is called the state coefficient matrix and B represents the source or input coefficient matrix. We make the distinction between two switching cases (assume we are in CCM):

State 1: Sw closed, diode open. Solve the equation with the state variables x1 and x2 to find their respective derivatives:

State 2: Sw open, diode closed. Again, solve the equation with the state variables x1 and x2 to find their respective derivatives:

At this point, we need to link both states: Al and A2, and B1 and B2. If you look at the buck schematic and the previous equations, Al and B1 apply for the first (ON) interval, or during *d*th of the switching time, while A2 and B2 exist during the (1-*d*)th (OFF) switching time interval. Using this remark, we can combine both matrixes:

A=A1×*d*+A2×(1-*d*) (1.6)

B=B1×*d*+B2×(1-*d*) (1.7)

These equations would be linear if *d* and (1-*d*) were constant. However, in a normal application, this isn't the case because some of the state variables (x2 in our buck) are fed back to a control IC. This chain continuously adjusts *d* to keep the output voltage constant. Therefore, we transformed a set of two distinct linear equations into a set of nonlinear but continuous equations. This SSA process holds only if the time constants of the circuit are large compared to the switching frequency.

To end the process, we must linearize the system across a given operating point. We replace the variables with a static portion (a fixed dc level) associated with a small amplitude modulation (also noted with a small ^):

As you can see, the same applies for the input voltage and the state variables. You can derive an equivalent small-signal and calculate all necessary transfer functions.

*For more information on this article, CIRCLE 332 on Reader Service Card*

This article is an excerpt from the first chapter of the book, “Switch-Mode Power Supply SPICE Cookbook,” written by Christophe Basso and published by McGraw-Hill in 2001 (ISBN 0-07-137509-0). The 263-page book also includes a CD-ROM with demo versions of SPICE. The author's Web page is http://perso.wanadoo.fr/cbasso/Spice.htm.