Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new

Use an averaged model for anything slower than the switching period: start-up, load and line steps, loop gain and long mission profiles. Use the switching model for anything inside a period: ripple, peak and RMS currents, switching and conduction losses, dead time, junction temperature at full load and EMI. An averaged model replaces the switch and diode by their averages over one period, so it needs no time steps inside each period; a 20 ms load-step study at 100 kHz takes about 400,000 steps in the switching circuit at 200 steps per period, and 10,000 in the averaged one.

The idea: watch the tide, not the waves

A switching converter's waveforms look like waves on top of a tide. The waves are the ripple: the inductor current ramps up and down every period, the switch node jumps between the rails. The tide is the slow part underneath: the output rising at start-up, sagging on a load step and recovering as the loop reacts.

An averaged model draws only the tide. It replaces the switch by what it does on average over one period, so there is nothing left that changes faster than the period, and the simulator can take long steps. That makes it fast, and it makes it blind to everything inside a period.

The buckClosedLoop example (48 V to 12 V, 5 A, 100 kHz, PI control) starting up in Voltecx, on the switching circuit and on its averaged model. The output voltages lie on top of each other; the averaged inductor current runs through the middle of the switching one's ripple band.

What is an averaged model?

Averaging over one switching period removes the ripple and keeps the low-frequency behaviour. For a buck in continuous conduction (Erickson and Maksimović, Fundamentals of Power Electronics, AC equivalent circuit modelling):

Ld⟨iL⟩dt=d ⟨vin⟩−⟨vout⟩,Cd⟨vout⟩dt=⟨iL⟩−⟨vout⟩RL\frac{d\langle i_L\rangle}{dt} = d\,\langle v_{in}\rangle - \langle v_{out}\rangle, \qquad C\frac{d\langle v_{out}\rangle}{dt} = \langle i_L\rangle - \frac{\langle v_{out}\rangle}{R}

Linearising those about an operating point gives the small-signal transfer functions used for loop design. The circuit-averaged form keeps the circuit and replaces the switch network by controlled sources, so the same schematic runs in both modes. Discontinuous conduction needs its own averaged switch, because the diode's conduction time then depends on the current.

What does each model get right?

Question Averaged Switching
Output voltage after a load step yes yes
Loop gain, phase margin yes, below about fsw/2f_{sw}/2 yes, with periodic small-signal analysis
Start-up and soft start yes yes, slow
Inductor ripple, output ripple no yes
Peak and RMS currents in each part no (only averages) yes
Switching and conduction loss, efficiency no yes
Dead time, body-diode conduction no yes
EMI spectrum no yes
Hours of a drive cycle or mission profile yes rarely practical

A 2.5 A load step at 12 ms on the same buck, both models in Voltecx. Both outputs dip to 10.41 V and ring back the same way; the switching current peaks higher by half its ripple.

Three switching periods at steady state. The switching model shows the inductor current's 0.9 A triangle; the averaged model shows only the 5 A it averages to. Peak current, RMS current and ripple are invisible to it.

How much faster is averaging?

A switching simulation needs steps fine enough to resolve each period: with 100 steps per period at 100 kHz, 20 ms of simulated time is 100×20 ms×100 kHz=200,000100 \times 20\,\text{ms} \times 100\,\text{kHz} = 200{,}000 steps, plus extra steps at each switching event. An averaged model steps at the speed of the slowest dynamics.

In Voltecx, the 20 ms load-step run above took 402,154 steps on the switching circuit (the example uses 50 ns steps, 200 per period) and 10,000 steps on the averaged model, which steps at a fifth of a switching period: 40 times fewer, for the same output waveform.

For loop gain the difference is larger. On the buckClosedLoop example, analysis.loopGain with the periodic method needs 16,659 solver steps for 12 frequencies, where injecting a sine and waiting for it to settle at each frequency (the perturbation method) needs more than 20 million (Analyses in the manual).

Where do the two models disagree?

  • Near half the switching frequency, where averaging misses the sampling effect. Current-mode control's subharmonic instability is the classic example: the averaged model does not show it.
  • At light load, when the converter enters discontinuous conduction and a continuous-mode averaged model is wrong.
  • With large ripple, where the average of a nonlinear device (a saturating inductor, a diode near its knee) is not the device at the average.

A practical check: run the full-load corner on both and compare the output mean.

Common mistakes

  • Reading ripple or peak current off an averaged run. It has none by construction. Size parts from the switching run.
  • Trusting the averaged loop gain near fsw/2f_{sw}/2. Sampling effects, such as current-mode subharmonic oscillation, are not in it.
  • Using a continuous-conduction model at light load. The gain and dynamics change in discontinuous conduction; the model must cover it.
  • Running hours of switching simulation to see a slow effect. A thermal or battery profile over minutes belongs on the averaged model, with a switching check at the corners.
  • Never comparing the two. One full-load run on both models takes seconds and tells you whether the averaged one can be trusted for the rest.

How to do it in Voltecx

  • Automatic design uses both. With auto.model set to averaged (the default), design.auto runs the light-load corners, the load and line steps and the loop gain on the circuit-averaged model of a buck, boost, buck-boost, SEPIC or flyback, in continuous and discontinuous conduction. The full-load corners (worst ripple and stress), the efficiency and the junction temperatures stay on the switching circuit, and each full-load corner runs on both models so the report shows how well they agree (within 1 % of the output).
  • Loop gain on the switching circuit. analysis.loopGain picks the periodic method on a circuit that switches: it finds the periodic steady state, linearises one switching period about it and reads the response from that model. That is the sampled-data approach of Verghese, Elbuluk and Kassakian (IEEE Trans. Power Electron., 1986).
  • Steady state without the start-up. simulation.steadyState (Simulation › Steady-State Analysis) finds the periodic steady state and shows its last period.
  • Speed of the switching solver. On the rectifier and buck cases of a published benchmark, Voltecx's fast solver ran 7 to 10 times faster than ngspice on the same netlists, with waveforms within 0.04–0.13 % of ngspice's, 1.2 % on one exported buck (Voltecx benchmark against ngspice-47 on an Apple M1 Pro, measured 2026-10-18). That is a measurement on one machine and a few circuits, not a guarantee for every circuit.

See simulation and analyses.

Frequently asked questions

Can I design a control loop with an averaged model?

Yes, below roughly half the switching frequency. Check the result on the switching circuit, especially for current-mode control, where sampling effects near fsw/2f_{sw}/2 matter.

Why does my averaged model not show ripple?

Because averaging over one switching period removes it by construction. Use the switching model for ripple, peak currents and losses.

Does an averaged model work in discontinuous conduction?

Only if it models DCM. A continuous-conduction averaged model gives the wrong gain and dynamics at light load.

How do I know the averaged model is accurate enough?

Run the same operating point on both models and compare the mean output and the loop gain below fsw/10f_{sw}/10. They should agree within a percent or so.