TExcelTAD
Home › Analog Electronics: Diodes, Transistors & Op-Amps › An Introduction to Switching Regulators

An Introduction to Switching Regulators

The thermal example in LDOs, Dropout and Thermal Design ended badly: 3.3 V3.3\ \text{V} at 0.5 A0.5\ \text{A} from 12 V12\ \text{V} burns 4.4 W4.4\ \text{W} in the regulator to deliver 1.65 W1.65\ \text{W}. A linear regulator can never beat Vout/VinV_\text{out}/V_\text{in}, because it controls the output by dropping voltage across a transistor that carries the full load current. A switching regulator never makes its transistor do that: the switch is either fully on (current flows, almost no voltage across it) or fully off (voltage across it, no current). In both states it dissipates almost nothing. An inductor and a capacitor then average the chopped voltage. Efficiencies of 85 to 95 % are normal, and a switcher can also step a voltage up. This lesson is the analog designer's working knowledge of switchers; the full treatment (topologies, magnetics, control loops, isolated converters) is in Power Electronics & Motor Drives.

The buck converter in one picture

+ Vin 12 V S (on for D T) D Schottky sw L 47 uH C 100 uF R 5 Ohm out switch on: Vin drives current into L; switch off: L keeps it flowing through D

The switch closes for a fraction DD (the duty cycle) of each period T=1/fswT = 1/f_{sw}. The voltage at node sw is a rectangular wave between VinV_\text{in} and about 0 V; its average is DVinD V_\text{in}. The inductor current cannot change instantly, so it ramps up while the switch is on and down while it is off, with the diode (or a second transistor, in a synchronous buck) carrying it during the off time. In steady state the inductor's average voltage must be zero (volt-second balance), which gives, for an ideal buck in continuous conduction:

Vout=D Vin,ΔIL=(Vin−Vout) DLfsw,ΔVout=ΔIL8CfswV_\text{out} = D\,V_\text{in}, \qquad \Delta I_L = \frac{(V_\text{in} - V_\text{out})\,D}{L f_{sw}}, \qquad \Delta V_\text{out} = \frac{\Delta I_L}{8 C f_{sw}}

The boost converter rearranges the same three parts (inductor from the input to the switch node, switch to ground, diode to the output) and gives Vout=Vin/(1−D)V_\text{out} = V_\text{in}/(1 - D). The buck-boost, SEPIC and flyback can do both; the flyback adds a coupled inductor for isolation. These, and the control loop that sets DD, are the subject of Power Electronics & Motor Drives.

Interactive: buck and boost waveforms

The lab is an ideal, lossless converter in steady state (no switch drop, no ESR). Set to match the SPICE example below: 12 V12\ \text{V} in, D=0.42D = 0.42, L=47 μHL = 47\ \mu\text{H}, C=100 μFC = 100\ \mu\text{F}, R=5 ΩR = 5\ \Omega, 200 kHz200\ \text{kHz}.

gateonoff00.5 A1.0 AiLIL avg 1.01 Aripple dIL = 311 mA p-p-972 uV0972 uV0 s2.5 us5.0 us7.5 us10 ustoutput rippleCCM: Vout = D Vin = 5.04 V; R = 5.00 Ohm < Rcrit = 32.4 Ohminductor currentoutput ripple

The lab reads Vout=5.040 VV_\text{out} = 5.040\ \text{V}, Iout=1.008 AI_\text{out} = 1.008\ \text{A}, ΔIL=311.0 mA\Delta I_L = 311.0\ \text{mA}, a peak inductor current of 1.163 A1.163\ \text{A} and an output ripple of 1.944 mV1.944\ \text{mV}. The boundary resistance is Rcrit=32.41 ΩR_\text{crit} = 32.41\ \Omega: raise RR above it (a light load, IoutI_\text{out} below about 0.16 A) and the inductor current reaches zero each cycle. The lab then says the continuous-conduction formulas fail and shows the discontinuous mode, where VoutV_\text{out} rises above DVinD V_\text{in}. Switch to boost and try Vin=5 VV_\text{in} = 5\ \text{V}, D=0.5D = 0.5: about 10 V10\ \text{V}.

Worked example

Given: a buck from 12 V12\ \text{V} to 5 V5\ \text{V} at 1 A1\ \text{A}, fsw=200 kHzf_{sw} = 200\ \text{kHz}, L=47 μHL = 47\ \mu\text{H}, C=100 μFC = 100\ \mu\text{F} (ceramic, negligible ESR).

Find: DD, ΔIL\Delta I_L, the peak switch current, the output ripple, and the efficiency of a linear regulator doing the same job.

Solve:

D=5 V12 V=0.417ΔIL=(12−5) V⋅0.41747 μH⋅200 kHz=0.310 A,Ipeak=1 A+0.310 A2=1.155 AΔVout=0.310 A8⋅100 μF⋅200 kHz=1.94 mV,ηlinear≤512=41.7 %\begin{aligned} D &= \frac{5\ \text{V}}{12\ \text{V}} = 0.417 \\ \Delta I_L &= \frac{(12 - 5)\ \text{V} \cdot 0.417}{47\ \mu\text{H} \cdot 200\ \text{kHz}} = 0.310\ \text{A}, \qquad I_\text{peak} = 1\ \text{A} + \frac{0.310\ \text{A}}{2} = 1.155\ \text{A} \\ \Delta V_\text{out} &= \frac{0.310\ \text{A}}{8 \cdot 100\ \mu\text{F} \cdot 200\ \text{kHz}} = 1.94\ \text{mV}, \qquad \eta_\text{linear} \le \frac{5}{12} = 41.7\ \% \end{aligned}

Check: the ripple current is 31 % of the load, inside the common design range of 20 to 40 %. The inductor's saturation current must exceed the peak, 1.155 A1.155\ \text{A}, with margin (and more at start-up or in a short circuit).

Cross-check with SPICE: a real buck, with losses

A switch with 0.1 Ω0.1\ \Omega on-resistance (an ngspice voltage-controlled switch), the course Schottky model as the freewheeling diode, and the same LL, CC, RR. Because the switch and the diode drop some voltage, the gate pulse is on for 2.2 μs2.2\ \mu\text{s} of each 5 μs5\ \mu\text{s} (D=0.44D = 0.44, not 0.417) to reach 5 V. The circuit runs 8 ms (1600 cycles) so the LC filter's start-up ringing has died; meas then averages over the last 0.1 ms.

bash · try it yourself
cat > buck.cir <<'EOF'
* Asynchronous buck 12 V -> 5 V, 1 A: switch (0.1 ohm on), Schottky, L = 47u, C = 100u
.model DSCH D(Is=2u N=1.05 Rs=0.05 Cjo=100p BV=40 IBV=10u)
.model SW SW(Ron=0.1 Roff=1meg Vt=2.5 Vh=0)
VIN vin 0 12
VG g 0 PULSE(0 5 0 10n 10n 2.19u 5u)
S1 vin sw g 0 SW
D1 0 sw DSCH
L1 sw out 47u
C1 out 0 100u
RL out 0 5
.control
tran 20n 8m 0 20n
meas tran vavg avg v(out) from=7.9m to=8m
meas tran vpp pp v(out) from=7.9m to=8m
meas tran ilpp pp i(L1) from=7.9m to=8m
let p_in = -v(vin)*i(VIN)
meas tran pin avg p_in from=7.9m to=8m
let pout = vavg*vavg/5
let eff = 100*pout/pin
print pout eff
.endc
.end
EOF
ngspice -b buck.cir 2>&1 | grep -E '^(vavg|vpp|ilpp|pin|pout|eff) +='
vavg                =  5.008848e+00 from=  7.900000e-03 to=  8.000000e-03
vpp                 =  2.124591e-03 from=  7.900000e-03 to=  8.000000e-03
ilpp                =  3.226556e-01 from=  7.900000e-03 to=  8.000000e-03
pin                 =  5.292738e+00 from=  7.900000e-03 to=  8.000000e-03
pout = 5.017712e+00
eff = 9.480370e+01

Output 5.009 V5.009\ \text{V}, inductor ripple 0.323 A0.323\ \text{A} (a little above the ideal 0.310 A0.310\ \text{A} because DD is larger), output ripple 2.12 mV2.12\ \text{mV}, and an efficiency of 94.8 %: 5.29 W5.29\ \text{W} in for 5.02 W5.02\ \text{W} out. Most of the 0.27 W0.27\ \text{W} loss is the Schottky's forward drop during the 56 % off-time, about 0.35 V⋅1 A⋅0.56=0.2 W0.35\ \text{V} \cdot 1\ \text{A} \cdot 0.56 = 0.2\ \text{W}, which is why synchronous bucks replace the diode by a MOSFET. The model has no switching losses (its switch changes state in 10 ns with no capacitance), so a real circuit would lose another few percent.

Linear or switching?

python · try it yourself
# Linear regulator against a buck converter: 12 V in, 5 V out
Vin, Vout = 12.0, 5.0
Iq_lin = 5e-3                      # linear regulator ground current
Ron, Vf, Rdcr = 0.1, 0.35, 0.05    # switch on-resistance, Schottky drop, inductor DCR
P_fixed = 0.05                     # controller, gate drive and switching losses at 200 kHz (W)
D = (Vout + Vf) / (Vin - Ron * 1.0 + Vf)   # duty cycle including the drops (at 1 A)
print(f"buck duty cycle about {D:.3f}")
print("  Iout   linear    buck")
for Iout in [0.01, 0.1, 0.5, 1.0, 2.0]:
    Pout = Vout * Iout
    eta_lin = Pout / (Vin * (Iout + Iq_lin))
    P_loss = Iout**2 * (Ron * D + Rdcr) + Vf * Iout * (1 - D) + P_fixed
    eta_buck = Pout / (Pout + P_loss)
    print(f"{Iout:6.2f} A {100 * eta_lin:6.1f} % {100 * eta_buck:6.1f} %")
buck duty cycle about 0.437
  Iout   linear    buck
  0.01 A   27.8 %   49.0 %
  0.10 A   39.7 %   87.6 %
  0.50 A   41.3 %   93.6 %
  1.00 A   41.5 %   93.6 %
  2.00 A   41.6 %   92.4 %

The simple loss model (conduction losses in the switch, the inductor's DC resistance and the diode, plus a fixed 50 mW50\ \text{mW} for the controller and switching) shows the shape of every efficiency curve in a switcher datasheet: poor at very light load, where the fixed losses dominate (many parts switch to a "pulse-skipping" or "burst" mode to fix that), flat in the middle, falling slowly at high current as I2RI^2 R grows. The linear regulator is flat at Vout/VinV_\text{out}/V_\text{in}.

What the switcher costs:

  • Ripple and noise. Millivolts of ripple at fswf_{sw}, plus sharp spikes at every switching edge that reach hundreds of megahertz.
  • EMI. The switch node swings the full input in nanoseconds, and the input current is a pulsed square wave. Layout (a tight "hot loop" from the input capacitor through the switch and diode) decides whether the product passes radiated and conducted emission tests (CISPR 32 for multimedia equipment, in force as CISPR 32:2015 with Amendment 1:2019 as of late 2026, with a third edition in preparation (check the IEC webstore for the current status); see EMC, Signal Integrity & Advanced Electromagnetics).
  • Parts and design effort. An inductor, careful capacitor choice and a feedback loop that must be stable over load.

Rules of thumb for an analog board:

Situation Choice
Small headroom (Vin−Vout<1 VV_\text{in} - V_\text{out} < 1\ \text{V}), tens of mA, noise-sensitive load (ADC reference, VCO, sensor bridge) LDO
Large step-down or more than about 1 W of loss in a linear buck
Output above input (one Li-ion cell to 5 V, LED strings) boost
Large step-down and a quiet rail buck to just above the output, then an LDO (post-regulation); the LDO's PSRR at fswf_{sw} (often 30 to 50 dB in 2026 parts) and an LC filter clean the ripple

Mains-input (offline) supplies such as phone chargers and laptop adapters use the same principles behind a rectifier and a high-voltage isolated flyback or resonant stage. They involve mains voltage and are covered by calculation and simulation only in this track; never open one or build one on the bench.

Guided lab: a buck module on the bench

Hand calculation. For your module's input, output and switching frequency: DD, ΔIL\Delta I_L from its inductor value, and the expected efficiency range from its datasheet curve.

Simulation. The lab with your values; the SPICE deck with your LL, CC, fswf_{sw}.

What you would measure. Use a ready-made synchronous buck module (12 V to 5 V, about 1 A) from a bench supply set to 12 V with a 0.5 A limit (the input current at full load is only about 5 W/(12 V⋅0.9)=0.46 A5\ \text{W}/(12\ \text{V} \cdot 0.9) = 0.46\ \text{A}). Load it with power resistors (50 Ω50\ \Omega, 10 Ω10\ \Omega, 5 Ω5\ \Omega, 10 W). Measure input voltage and current and output voltage and current with four meters (or two meters, carefully) and compute η=Pout/Pin\eta = P_\text{out}/P_\text{in}: expect about 85 to 95 % at 0.5 to 1 A and noticeably less at 0.1 A; meter uncertainties of 0.5 % each give η\eta to about ±1\pm 1 percentage point. Scope the output with the probe's ground spring (not the long ground lead) at the output capacitor, AC-coupled, 20 MHz bandwidth limit: a few millivolts of ripple at fswf_{sw} with spikes at the edges. Remove the bandwidth limit and use the long ground lead to see how much of the "noise" is your probe picking up the switch node.

Hazards and safe setup. Low voltage, current-limited supply. The inductor, switch and load resistors get hot. Do not probe the switch node with a long ground lead near other circuits, and do not short the output of a module without current limiting on its input.

Pitfalls

  • Comparing efficiencies at one load point. Check the whole range, especially light load if the product sleeps most of the time.
  • Sizing the inductor by inductance only. Its saturation current and DC resistance matter as much.
  • Feeding a switcher's output straight to a precision ADC reference. Post-regulate or filter.
  • Long, looping wiring in the input current path. That loop is the antenna; keep it tiny.

Practice

  1. An ideal buck runs from 24 V with D=0.25D = 0.25. What is VoutV_\text{out}?
  2. An ideal boost makes 12 V from 5 V. Find DD.
  3. A buck has ΔIL=0.4 A\Delta I_L = 0.4\ \text{A}, C=22 μFC = 22\ \mu\text{F}, fsw=500 kHzf_{sw} = 500\ \text{kHz}. Ideal-capacitor output ripple?
Answer
  1. Vout=0.25⋅24=6 VV_\text{out} = 0.25 \cdot 24 = 6\ \text{V}.
  2. D=1−Vin/Vout=1−5/12=0.583D = 1 - V_\text{in}/V_\text{out} = 1 - 5/12 = 0.583.
  3. ΔV=0.4/(8⋅22 μF⋅500 kHz)=4.55 mV\Delta V = 0.4/(8 \cdot 22\ \mu\text{F} \cdot 500\ \text{kHz}) = 4.55\ \text{mV}.

Test yourself

Why is a switching regulator's switch nearly lossless in principle?

  1. It carries no current
  2. It is either fully on (little voltage across it) or fully off (no current), so v⋅iv \cdot i is small in both states
  3. Its inductor stores the losses
  4. It runs at a high frequency

An ideal buck converter with Vin=12 VV_\text{in} = 12\ \text{V} and D=0.42D = 0.42 gives…

  1. 2.9 V2.9\ \text{V}
  2. 5.04 V5.04\ \text{V}
  3. 20.7 V20.7\ \text{V}
  4. 28.6 V28.6\ \text{V}

In the SPICE buck (Schottky freewheeling diode), which loss was largest?

  1. Switch conduction
  2. The Schottky's forward drop during the off-time
  3. Capacitor ESR
  4. Switching transitions

A noise-sensitive ADC reference needs 3.3 V at 20 mA from a 12 V rail. A good choice is…

  1. a buck alone
  2. a boost
  3. a buck to about 4 V followed by an LDO (post-regulation)
  4. a Zener diode from 12 V