TExcelTAD
Home › Power Electronics & Motor Drives › The Buck Converter: Volt-Second and Charge Balance

The Buck Converter: Volt-Second and Charge Balance

A 24 V24\ \text{V} industrial bus has to feed a 12 V12\ \text{V}, 2 A2\ \text{A} load: a fan tray, a radio, a camera. The Analog Electronics course showed the buck converter's three formulas; this lesson derives them from the two balance laws of the switching cell, adds the currents every component must carry (average, peak and rms), includes the capacitor's ESR, and checks the design with a switched ngspice model that has real losses. The same method, applied to other arrangements of the same parts, gives every converter in the next lessons.

Circuit and the two intervals

+ Cin Q D L 47 uH C 47 uFESR 10 mOhm R 6 Ohm Vin24 V swout iL + vL - Q on: vL = Vin - VoutD on: vL = -Vout IL = IoutiL

Assume continuous conduction (CCM): the inductor current never reaches zero, so in each period exactly one of QQ and DD conducts. During DTsDT_s (QQ on) the inductor sees Vin−VoutV_\text{in} - V_\text{out}; during (1−D)Ts(1-D)T_s (DD on, its drop neglected) it sees −Vout-V_\text{out}. Small-ripple approximation: voutv_\text{out} is nearly constant over a period.

Theory: the balance laws applied

Volt-second balance on LL:

(Vin−Vout) DTs+(−Vout)(1−D)Ts=0 ⇒ Vout=D Vin(V_\text{in} - V_\text{out})\,D T_s + (-V_\text{out})(1-D)T_s = 0 \ \Rightarrow\ V_\text{out} = D\,V_\text{in}

Charge balance on CC: the average capacitor current is zero, so the average inductor current equals the load current, IL=Iout=Vout/RI_L = I_\text{out} = V_\text{out}/R. The inductor current rises linearly by

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

(peak-to-peak), the same from both intervals, as balance demands. The ripple is largest at D=0.5D = 0.5 for a fixed VinV_\text{in}, and grows as the input rises at a fixed output (since 1−D1-D grows): size the inductor at the maximum input voltage.

Output ripple. The capacitor takes the inductor's AC part, a triangle of height ΔIL\Delta I_L. The charge in one positive half-triangle is q=12⋅Ts2⋅ΔIL2q = \frac{1}{2} \cdot \frac{T_s}{2} \cdot \frac{\Delta I_L}{2}, so with an ideal capacitor

ΔVC=qC=ΔIL8Cfsw,ΔVESR=ΔIL⋅RESR\Delta V_C = \frac{q}{C} = \frac{\Delta I_L}{8 C f_{sw}}, \qquad \Delta V_\text{ESR} = \Delta I_L \cdot R_\text{ESR}

The two parts are out of phase (the ESR part follows the current, the capacitive part its integral), so the total peak-to-peak lies between the larger one and their sum. With ceramic capacitors the first dominates; with electrolytics the ESR term usually does.

Component currents (CCM, small ripple; with ripple ratio r=ΔIL/Ioutr = \Delta I_L/I_\text{out}):

Component Average rms
Inductor IoutI_\text{out} Iout1+r2/12I_\text{out}\sqrt{1 + r^2/12}
Switch QQ D IoutD\,I_\text{out} IoutD(1+r2/12)I_\text{out}\sqrt{D(1 + r^2/12)}
Diode DD (1−D) Iout(1-D)\,I_\text{out} Iout(1−D)(1+r2/12)I_\text{out}\sqrt{(1-D)(1 + r^2/12)}
Input capacitor 0 IoutD(1−D)I_\text{out}\sqrt{D(1-D)} (ripple neglected)
Output capacitor 0 ΔIL/12\Delta I_L/\sqrt{12}

The input capacitor's rms current, largest at D=0.5D = 0.5 where it is Iout/2I_\text{out}/2, is the most often forgotten rating in a buck; it heats the capacitor through its ESR (Component Selection).

Worked example: 24 V to 12 V at 2 A

Given: Vin=24 VV_\text{in} = 24\ \text{V}, Vout=12 VV_\text{out} = 12\ \text{V}, Iout=2 AI_\text{out} = 2\ \text{A}, fsw=200 kHzf_{sw} = 200\ \text{kHz}, L=47 μHL = 47\ \mu\text{H}, C=47 μFC = 47\ \mu\text{F} with RESR=10 mΩR_\text{ESR} = 10\ \text{m}\Omega.

Find: DD, ΔIL\Delta I_L, the peak inductor current, the output ripple parts, and the switch and input-capacitor rms currents.

Solve:

D=12 V24 V=0.5,ΔIL=12 V⋅0.547 μH⋅200 kHz=0.638 A,Ipk=2+0.319=2.319 AΔVC=0.638 A8⋅47 μF⋅200 kHz=8.49 mV,ΔVESR=0.638 A⋅10 mΩ=6.38 mVIQ,rms=2 A0.5 (1+0.3192/12)=1.420 A,ICin,rms=2 A0.25=1.0 A\begin{aligned} D &= \frac{12\ \text{V}}{24\ \text{V}} = 0.5, \qquad \Delta I_L = \frac{12\ \text{V} \cdot 0.5}{47\ \mu\text{H} \cdot 200\ \text{kHz}} = 0.638\ \text{A}, \qquad I_\text{pk} = 2 + 0.319 = 2.319\ \text{A} \\ \Delta V_C &= \frac{0.638\ \text{A}}{8 \cdot 47\ \mu\text{F} \cdot 200\ \text{kHz}} = 8.49\ \text{mV}, \qquad \Delta V_\text{ESR} = 0.638\ \text{A} \cdot 10\ \text{m}\Omega = 6.38\ \text{mV} \\ I_{Q,\text{rms}} &= 2\ \text{A}\sqrt{0.5\,(1 + 0.319^2/12)} = 1.420\ \text{A}, \qquad I_{C_\text{in},\text{rms}} = 2\ \text{A}\sqrt{0.25} = 1.0\ \text{A} \end{aligned}

Check: the ripple ratio is 0.638/2=0.320.638/2 = 0.32, inside the usual 0.2 to 0.4 range. The inductor needs a saturation current above 2.32 A2.32\ \text{A} (with margin for start-up and overload, say 3 A3\ \text{A}), and the input capacitor an rms rating of at least 1 A1\ \text{A}. The total output ripple is somewhere between 8.58.5 and 14.9 mV14.9\ \text{mV}; the code computes it.

python · try it yourself
import numpy as np

Vin, Vout, Iout, fsw, L, C, esr = 24.0, 12.0, 2.0, 200e3, 47e-6, 47e-6, 0.010
D, Ts = Vout / Vin, 1 / fsw
dI = (Vin - Vout) * D / (L * fsw)
r = dI / Iout
print(f"D = {D:.3f}, dIL = {dI:.4f} A (r = {r:.3f}), peak {Iout + dI/2:.4f} A")

# sample one period of the inductor current and derive every component current from it
N = 20000
t = np.arange(N) * Ts / N
on = t < D * Ts
iL = np.where(on, Iout - dI/2 + dI * t / (D * Ts), Iout + dI/2 - dI * (t - D*Ts) / ((1 - D) * Ts))
iQ = np.where(on, iL, 0.0)
iD = np.where(on, 0.0, iL)
iCin = iQ - iQ.mean()                       # the input source supplies the average
iC = iL - Iout
rms = lambda x: float(np.sqrt(np.mean(x**2)))
for name, x, formula in [("inductor", iL, Iout*np.sqrt(1 + r*r/12)),
                         ("switch", iQ, Iout*np.sqrt(D*(1 + r*r/12))),
                         ("diode", iD, Iout*np.sqrt((1-D)*(1 + r*r/12))),
                         ("input cap", iCin, Iout*np.sqrt(D*(1-D))),
                         ("output cap", iC, dI/np.sqrt(12))]:
    print(f"{name:10s}: avg {round(float(x.mean()), 6) + 0.0:6.3f} A, rms {rms(x):6.4f} A (formula {formula:6.4f} A)")

# output voltage ripple: capacitor charge plus ESR drop
vC = np.cumsum(iC) * (Ts / N) / C
v = (vC - vC.mean()) + esr * iC
print(f"ripple: capacitor only {np.ptp(vC)*1e3:.3f} mV, ESR only {np.ptp(esr*iC)*1e3:.3f} mV, "
      f"total {np.ptp(v)*1e3:.3f} mV")
D = 0.500, dIL = 0.6383 A (r = 0.319), peak 2.3191 A
inductor  : avg  2.000 A, rms 2.0085 A (formula 2.0085 A)
switch    : avg  1.000 A, rms 1.4202 A (formula 1.4202 A)
diode     : avg  1.000 A, rms 1.4202 A (formula 1.4202 A)
input cap : avg  0.000 A, rms 1.0084 A (formula 1.0000 A)
output cap: avg  0.000 A, rms 0.1843 A (formula 0.1843 A)
ripple: capacitor only 8.488 mV, ESR only 6.383 mV, total 9.689 mV

The input-capacitor rms is 1.008 A1.008\ \text{A} with the ripple included (1.000 A1.000\ \text{A} without). The two ripple parts combine to 9.69 mV9.69\ \text{mV}, well below their sum.

Interactive: the lab with the same numbers

The lab is lossless and has no ESR, so its ripple is the capacitive part only. It reads Vout=12.00 VV_\text{out} = 12.00\ \text{V}, ΔIL=638.3 mA\Delta I_L = 638.3\ \text{mA}, a peak of 2.319 A2.319\ \text{A}, ΔV=8.488 mV\Delta V = 8.488\ \text{mV} and Rcrit=37.60 ΩR_\text{crit} = 37.60\ \Omega. Raise RR to 40 Ω40\ \Omega (a 0.3 A0.3\ \text{A} load): the converter enters discontinuous mode and the output rises to 12.25 V12.25\ \text{V} at the same duty cycle (Discontinuous Conduction Mode).

gateonoff01 A2 AiLIL avg 2.00 Aripple dIL = 638 mA p-p-4.2 mV04.2 mV0 s2.5 us5.0 us7.5 us10 ustoutput rippleCCM: Vout = D Vin = 12.0 V; R = 6.00 Ohm < Rcrit = 37.6 Ohminductor currentoutput ripple

Cross-check in ngspice, with losses

The deck uses an ideal voltage-controlled switch with 50 mΩ50\ \text{m}\Omega on-resistance, a Schottky diode model, 30 mΩ30\ \text{m}\Omega of inductor resistance and the 10 mΩ10\ \text{m}\Omega ESR. The drops need a slightly longer on-time: 2.56 μs2.56\ \mu\text{s} of 5 μs5\ \mu\text{s} (D=0.512D = 0.512). It runs 5 ms5\ \text{ms} (1000 cycles) so the start-up ringing of the output filter has died out, and measures over the last 0.1 ms0.1\ \text{ms}.

bash · try it yourself
cat > buck.cir <<'EOF'
* Buck 24 V -> 12 V, 2 A, 200 kHz: switch 50 mohm, Schottky, L 47u (30 mohm), C 47u (ESR 10 mohm)
.model SW1 SW(Ron=0.05 Roff=1meg Vt=2.5 Vh=0)
.model DSCH D(Is=5u N=1.1 Rs=0.03 Cjo=200p BV=60 IBV=10u)
VIN vin 0 24
VG g 0 PULSE(0 5 0 10n 10n 2.56u 5u)
S1 vin sw g 0 SW1
D1 0 sw DSCH
L1 sw a 47u
RL1 a out 30m
C1 out c 47u
RESR c 0 10m
RLOAD out 0 6
.control
tran 10n 5m 0 10n
meas tran vout avg v(out) from=4.9m to=5m
meas tran vpp pp v(out) from=4.9m to=5m
meas tran ilpp pp i(L1) from=4.9m to=5m
let pin = -v(vin)*i(VIN)
meas tran pinavg avg pin from=4.9m to=5m
let eff = 100*vout*vout/6/pinavg
print eff
.endc
.end
EOF
ngspice -b buck.cir 2>&1 | grep -E '^(vout|vpp|ilpp|pinavg|eff) +='
vout                =  1.201829e+01 from=  4.900000e-03 to=  5.000000e-03
vpp                 =  9.807601e-03 from=  4.900000e-03 to=  5.000000e-03
ilpp                =  6.465605e-01 from=  4.900000e-03 to=  5.000000e-03
pinavg              =  2.471272e+01 from=  4.900000e-03 to=  5.000000e-03
eff = 9.741225e+01

SPICE gives 12.02 V12.02\ \text{V}, an inductor ripple of 0.647 A0.647\ \text{A} (slightly above 0.638 A0.638\ \text{A} because DD is larger), an output ripple of 9.81 mV9.81\ \text{mV} (the Python estimate was 9.69 mV9.69\ \text{mV}) and an efficiency of 97.4 %97.4\ \%. That is optimistic: the model switch changes state in 10 ns10\ \text{ns} with no capacitance, so there is no switching loss (Hard-Switching Waveforms and Switching Losses). Most of the 0.64 W0.64\ \text{W} lost here (24.71 W24.71\ \text{W} in, 24.07 W24.07\ \text{W} out) is the diode's forward drop during the off-time.

Guided lab: a 24 V to 12 V buck on the bench

Hand calculation. For a buck evaluation board (or the mini project build) with your LL, CC and fswf_{sw}: DD, ΔIL\Delta I_L, IpkI_\text{pk}, ΔV\Delta V and the input-capacitor rms current at full load.

Simulation. Put your values into the lab and into the ngspice deck; adjust the pulse width until the deck gives your output voltage.

What you would measure. Supply from a bench supply set to 24 V24\ \text{V} with a 1.5 A1.5\ \text{A} limit (the input current at 2 A2\ \text{A} out is about 24 W/(24 V⋅0.92)=1.1 A24\ \text{W}/(24\ \text{V} \cdot 0.92) = 1.1\ \text{A}), load with a 6 Ω6\ \Omega, 50 W50\ \text{W} resistor on a heatsink or an electronic load set to 2 A2\ \text{A}. Expect VoutV_\text{out} within ±2 %\pm 2\ \% of 12 V12\ \text{V} (set by the feedback resistors), an inductor ripple of 0.60.6 to 0.7 A0.7\ \text{A} peak-to-peak with a current probe (inductance tolerance is typically ±20 %\pm 20\ \%), and 1010 to 20 mV20\ \text{mV} of output ripple with the probe tip-and-barrel at the output capacitor and the scope's 20 MHz limit on. The switch-node waveform swings from about −0.4 V-0.4\ \text{V} to 24 V24\ \text{V} with ringing on the edges.

Hazards and safe setup. 24 V24\ \text{V} maximum, current limit set before connecting. The load resistor dissipates 24 W24\ \text{W} and burns skin; the inductor, diode and switch get hot. Never disconnect the load from a running board under a scope probe in a way that lets a feedback wire come loose: an open feedback divider drives the output to the input voltage. Keep the probe ground short; a long ground lead on the switch node also couples noise into other channels.

Pitfalls

  • Sizing the inductor at nominal input. Ripple is largest at the highest input; size LL and its saturation current there.
  • Ignoring the input capacitor. It carries up to Iout/2I_\text{out}/2 rms and sets the input ripple; a long input wire without it rings.
  • Using the ideal-capacitor ripple formula for an electrolytic. Its ESR ripple can be ten times the capacitive part.
  • Forgetting DCM. At light load the inductor current reaches zero and Vout=DVinV_\text{out} = DV_\text{in} no longer holds; the control loop hides this until it matters.

Practice

  1. Repeat the worked example for Vin=36 VV_\text{in} = 36\ \text{V} (same VoutV_\text{out}, LL, fswf_{sw}): DD, ΔIL\Delta I_L and IpkI_\text{pk}.
  2. Choose LL for r=0.3r = 0.3 at Vin=36 VV_\text{in} = 36\ \text{V}.
  3. A buck with ΔIL=1 A\Delta I_L = 1\ \text{A} uses an electrolytic with RESR=50 mΩR_\text{ESR} = 50\ \text{m}\Omega and C=470 μFC = 470\ \mu\text{F} at 100 kHz100\ \text{kHz}. Which ripple term dominates?
Answer
  1. D=1/3D = 1/3, ΔIL=12⋅(2/3)/(47 μH⋅200 kHz)=0.851 A\Delta I_L = 12 \cdot (2/3)/(47\ \mu\text{H} \cdot 200\ \text{kHz}) = 0.851\ \text{A}, Ipk=2.43 AI_\text{pk} = 2.43\ \text{A}.
  2. L=12⋅(2/3)/(0.6⋅200 kHz)=66.7 μHL = 12 \cdot (2/3)/(0.6 \cdot 200\ \text{kHz}) = 66.7\ \mu\text{H} (choose 68 μH68\ \mu\text{H}).
  3. ΔVC=1/(8⋅470 μF⋅100 kHz)=2.66 mV\Delta V_C = 1/(8 \cdot 470\ \mu\text{F} \cdot 100\ \text{kHz}) = 2.66\ \text{mV}, ΔVESR=50 mV\Delta V_\text{ESR} = 50\ \text{mV}: the ESR term, almost twenty times larger.

Test yourself

Volt-second balance on the buck inductor gives…

  1. Vout=Vin/(1−D)V_\text{out} = V_\text{in}/(1-D)
  2. Vout=D VinV_\text{out} = D\,V_\text{in}
  3. IL=D IoutI_L = D\,I_\text{out}
  4. ΔIL=0\Delta I_L = 0

For a fixed output voltage, the buck's inductor ripple is largest at…

  1. the minimum input voltage
  2. the maximum input voltage
  3. the maximum load
  4. the minimum load

The average inductor current of a buck in steady state equals…

  1. the input current
  2. the load current
  3. half the load current
  4. the peak switch current

At D=0.5D = 0.5 and Iout=4 AI_\text{out} = 4\ \text{A}, the input capacitor's rms current (ripple neglected) is about…

  1. 0 A
  2. 1 A
  3. 2 A
  4. 4 A