---
title: The buck converter
heading: How chopping the input with a switch and averaging it with an inductor and capacitor gives an output of D times the input, the inductor's ripple current, the output's ripple voltage, choosing L and C, and the peak current the switch must carry
eyebrow: D2 · Lesson 2 · The buck converter
xp: 40
---

::: hook
The buck converter is the workhorse of electronics: there are dozens in a laptop. Its idea is almost embarrassingly simple. A switch connects the input to a node for a fraction D of each cycle and grounds it for the rest, so that node's average voltage is D times the input. An inductor and capacitor then filter away the switching and leave the average. The inductor is what makes it efficient: it carries the load current continuously, storing energy while the switch is on and delivering it while the switch is off.
:::

::: play
- A buck converter at 50% duty: the switch node (a square wave from 0 to the input voltage) drives an inductor into a capacitor and a load resistor.
- The output settles to half the input after a brief LC ringing; the inductor current settles to the load current with a triangular ripple on top.
- A larger inductor or a higher switching frequency shrinks the ripple; a larger capacitor smooths the output further but slows the start-up.
:::

```sim circuit
V1 sw 0 square 0 12 20k Hz  @ 0,0 down
L1 sw out 470u              @ 0,0 right
C1 out 0 47u                @ 2,0 down
R1 out 0 5                  @ 4,0 down
slider: L1 100u..2m log
slider: C1 10u..470u log
slider: R1 2..50 log
slider: V1.f 5k..100k log
scope: v(sw), v(out), i(L1)
time: 0..5m s
meter: v(out)
```

::: predict
## A buck converter turns its switch on for 27.5% of each cycle from a 12 V input. What's its output voltage?

- [ ] 12 V
- [x] 3.3 V
- [ ] 8.7 V
- [ ] It depends on the load

::: reveal
The switch node is at 12 V for a fraction D = 0.275 of each cycle and 0 V for the rest, so its average is 0.275 × 12 = 3.3 V. The inductor can't hold an average voltage across itself (its current would grow without limit), so the output sits at that average, whatever the load, as long as the inductor current never falls to zero.
:::
:::

::: nameit
## Conversion ratio

In steady state the inductor's average voltage is zero (**volt-second balance**), so

$$V_\text{out} = DV_\text{in}$$

with D the **duty cycle**, the fraction of each period the high-side switch is on.

## Ripple

While the switch is on, $V_\text{in} - V_\text{out}$ across the inductor ramps its current up; while off, $V_\text{out}$ ramps it down. The peak-to-peak ripple is

$$\Delta I = \frac{(V_\text{in} - V_\text{out})D}{Lf_s}$$

with $f_s$ the switching frequency. The ripple current flows into the output capacitor, giving an output ripple of about

$$\Delta V = \frac{\Delta I}{8f_sC}$$

(plus ΔI times the capacitor's series resistance, often larger in practice). The switch and inductor carry a peak current of $I_\text{out} + \Delta I/2$.

## Design

Designers usually pick L for a ripple of 20 to 40% of the full load current, then C for the allowed output ripple. Higher switching frequencies shrink both components but raise switching losses (lesson 8).
:::

::: example
## A buck converter makes 3.3 V from 12 V at 500 kHz with a 10 µH inductor and a 22 µF capacitor, delivering 2 A. Find D, the ripple current, the output ripple and the peak switch current.

::: solution
1. **Duty cycle.**
   $$\begin{aligned} D &= 3.3/12 \\ &= 0.275 \end{aligned}$$
2. **Ripple current.**
   $$\begin{aligned} \Delta I &= \frac{8.7 \times 0.275}{10\ \text{µH} \times 500\ \text{kHz}} \\ &= 0.479\ \text{A} \end{aligned}$$
3. **Output ripple.**
   $$\begin{aligned} \Delta V &= \frac{0.479\ \text{A}}{8 \times 500\ \text{kHz} \times 22\ \text{µF}} \\ &= 5.4\ \text{mV} \end{aligned}$$
4. **Peak switch current.** The load current plus half the ripple:
   $$2 + 0.24 = 2.24\ \text{A}$$
5. **Inductor for less ripple.** For a ripple of only 0.3 A the inductor would need
   $$\begin{aligned} L &= \frac{8.7 \times 0.275}{0.3\ \text{A} \times 500\ \text{kHz}} \\ &= 16\ \text{µH} \end{aligned}$$

**Answer:** D = 0.275, the ripple current is 0.479 A, the output ripple is 5.4 mV, and the peak switch current is 2.24 A.
:::
:::

::: example
## In the sim (12 V, 50%, 20 kHz, 470 µH, 47 µF, 5 Ω), what are the ripple current and output ripple?

::: solution
1. **Ripple current.**
   $$\begin{aligned} \Delta I &= \frac{6 \times 0.5}{470\ \text{µH} \times 20\ \text{kHz}} \\ &= 0.319\ \text{A} \end{aligned}$$
   around the 1.2 A load current.
2. **Output ripple.**
   $$\begin{aligned} \Delta V &= \frac{0.319\ \text{A}}{8 \times 20\ \text{kHz} \times 47\ \text{µF}} \\ &= 42\ \text{mV} \end{aligned}$$
3. **Start-up ringing.** It's at the LC's natural frequency:
   $$\begin{aligned} f_0 &= \frac{1}{2\pi\sqrt{LC}} \\ &= 1.07\ \text{kHz} \end{aligned}$$

**Answer:** the ripple current is 0.319 A and the output ripple is 42 mV.
:::
:::

::: example
## Below what load does the first example's converter (ripple 0.479 A) enter discontinuous conduction?

::: solution
1. **Shape of the inductor current.** It's a triangle of height ΔI around the load current.
2. **Where it touches zero.** That happens when the load falls to
   $$\Delta I/2 = 0.24\ \text{A}$$
3. **Below that.** The current stays at zero for part of each cycle, and the output voltage no longer follows $V = DV_\text{in}$ unless the controller adjusts D.

**Answer:** it enters discontinuous conduction below a load of 0.24 A.
:::
:::

::: check
given: a = 5 | 12 | 24; b = 1.2 | 1.8 | 3.3
answer: b/a
tolerance: 0.5%

## A buck converter makes {b} V from {a} V. What duty cycle does it need?

::: right
Right. $D = V_\text{out}/V_\text{in}$ = {answer}.
:::

::: misses
- [a/b] Duty cycle is a fraction less than 1.
- [any] Not yet. Volt-second balance.
:::
:::

::: check
given: a = 12 | 24; b = 3.3 | 5; L = 4.7 | 10 | 22; f = 250 | 500 | 1000
answer: (a - b)*(b/a)/(L*1e-6*f*1e3)
unit: A
tolerance: 0.5%

## A buck converter makes {b} V from {a} V with a {L} µH inductor at {f} kHz. What's the peak-to-peak inductor ripple?

::: right
Right. $(V_\text{in} - V_\text{out})D/(Lf_s)$ = {answer} A.
:::

::: misses
- [(a - b)/(L*1e-6*f*1e3)] Multiply by the duty cycle: the switch is on only for $D/f_s$.
- [any] Not yet. Volts across L times on-time, over L.
:::
:::

::: check
given: d = 0.2 | 0.5 | 1; f = 200 | 500; C = 10 | 47 | 100
answer: d/(8*f*1e3*C*1e-6)*1000
unit: mV
tolerance: 0.5%

## A buck converter's {d} A ripple current flows into a {C} µF capacitor at {f} kHz. What's the output ripple, ignoring its ESR?

::: right
Right. $\Delta I/(8f_sC)$ = {answer} mV.
:::

::: misses
- [any] Not yet. The triangular ripple's charge over C.
:::
:::

::: check
given: a = 12 | 24; b = 3.3 | 5; d = 0.3 | 0.6; f = 300 | 600
answer: (a - b)*(b/a)/(d*f*1e3)*1e6
unit: µH
tolerance: 0.5%

## What inductance limits a {a} V to {b} V buck converter at {f} kHz to {d} A of ripple?

::: right
Right. $L = (V_\text{in} - V_\text{out})D/(\Delta If_s)$ = {answer} µH.
:::

::: misses
- [any] Not yet. Solve the ripple formula for L.
:::
:::

::: check
kind: parts
given: Vi = 12 | 24; Vo = 1.2 | 3.3 | 5; L = 4.7 | 10 | 22; f = 300 | 1000

## A buck converter makes {Vo} V from {Vi} V at {f} kHz with a {L} µH inductor.

::: part
answer: Vo/Vi
tolerance: 0.5%

### What is its duty cycle?

::: misses
- [any] $V_o/V_i$.
:::
:::

::: part
answer: (Vi - Vo)*Vo/Vi/(L*1e-6*f*1e3)
unit: A
tolerance: 0.5%

### What is the inductor's peak-to-peak ripple?

::: misses
- [any] $(V_i - V_o)D/(Lf)$.
:::
:::

::: part
answer: (Vi - Vo)*Vo/Vi/(L*1e-6*f*1e3)/2
unit: A
tolerance: 0.5%

### Below what load does it enter discontinuous conduction?

::: misses
- [any] Half the ripple.
:::
:::
:::

::: check
kind: parts
given: Vi = 5 | 12; Vo = 1.8 | 3.3; d = 0.2 | 0.4; f = 500 | 2000

## A buck makes {Vo} V from {Vi} V at {f} kHz, and its ripple must be {d} A peak to peak.

::: part
answer: (Vi - Vo)*Vo/Vi/(d*f*1e3)*1e6
unit: µH
tolerance: 0.5%

### What inductance does it need?

::: misses
- [any] $L = (V_i - V_o)D/(\Delta I f)$.
:::
:::

::: part
answer: (Vi - Vo)*Vo/Vi/(d*2*f*1e3)*1e6
unit: µH
tolerance: 0.5%

### And at twice the frequency?

::: misses
- [any] Half as much.
:::
:::
:::

::: explain
## Why is a buck converter's output voltage D times its input, regardless of the load?

::: model
The switch makes the node at the inductor's input a square wave that is at the input voltage for a fraction D of each cycle and at ground for the rest, so its average is D times the input. In steady state the inductor's current must return to the same value at the end of each cycle, which means the average voltage across it is zero; otherwise its current would keep growing or shrinking. With zero average across the inductor, the output must equal the switch node's average, D times the input. The load sets the inductor's average current, but as long as that current stays positive throughout the cycle, it doesn't change the voltage.
:::
:::

::: practice

::: check
given: a = 3.6 | 60; b = 0.8 | 3.3
answer: b/a
tolerance: 0.5%

## Duty: {a} V to {b} V?

::: misses
- [any] $V_\text{out}/V_\text{in}$.
:::
:::

::: check
given: a = 6 | 48; b = 1 | 5; L = 1 | 100; f = 100 | 2000
answer: (a - b)*(b/a)/(L*1e-6*f*1e3)
unit: A
tolerance: 0.5%

## Ripple: {a} to {b} V, {L} µH, {f} kHz?

::: misses
- [any] $(V_\text{in} - V_\text{out})D/(Lf_s)$.
:::
:::

::: check
given: d = 0.05 | 2; f = 100 | 2000; C = 1 | 470
answer: d/(8*f*1e3*C*1e-6)*1000
unit: mV
tolerance: 0.5%

## Output ripple: {d} A, {f} kHz, {C} µF?

::: misses
- [any] $\Delta I/(8f_sC)$.
:::
:::
:::
