PWMSim

Buck

Buck converter — CCM

A simple step-down converter with continuous inductor current.

Open and simulate How it works
Press Run: the example simulates in your browser. Open and simulate takes it to the full app, where you can change it.

1Overview

The simplest switching converter in the gallery: a buck (step-down) converter running open loop at a fixed duty cycle. It turns 5 V into about 0.88 V at 2 MHz, and its inductor current never reaches zero, which is continuous conduction mode (CCM).

Use it to learn the app, and to check the textbook buck equations against a simulation: every result below is worked out by hand first.

2Model

Buck converter schematic
Fig. 1: The example as it opens in PWMSim.

S1 connects the input to the switch node sw for a fraction D = 0.18 of each 500 ns period, as PWM1 commands. When S1 opens, D2 carries the inductor current. L1 and C1 filter the switch node into a nearly constant output across the load R4.

The switches and diodes are two-state models (Ideal switched in the app): on, they are a 10 mΩ resistance; off, an open circuit (100 MΩ to 1 GΩ). The diode's forward drop is 1 nV, so it is ideal in practice. R2 and R3 add the inductor's and the trace's resistance.

PartKindValueRole
V1DC voltage5Input source
S1Switch—Main switch
PWM1PWM2 MHz · 18%Gate signal for S1
D1Diode1nBody diode of S1
D2Diode1nFreewheeling diode
R1Resistor100megKeeps the switch node defined
R2Resistor10mInductor resistance
L1Inductor10uOutput inductor
R3Resistor1mTrace resistance
C1Capacitor22uOutput capacitor
R4Resistor1Load

3How it works

Output voltage

In steady state the inductor's average voltage is zero (volt-second balance). During the on-time it sees Vin − Vout, during the off-time −Vout, so

D·(Vin−Vout)−(1−D)·Vout=0⟹Vout=D·Vin

That gives 0.18 × 5 V = 0.90 V. The load current also flows through 21 mΩ of series resistance (the switch or the diode, 10 mΩ, plus R2 and R3), which takes a little off:

Vout=D·Vin1+Rpath/R

Inductor ripple

During the on-time the inductor current rises with slope (Vin − Vout)/L for D·T:

ΔIL=(Vin−Vout)·DL·fsw

Staying in CCM

The current's valley is Iout − ΔIL/2. It reaches zero, and the converter leaves CCM, when the load resistance rises to

Rcrit=2·L·fsw1−D

Here Rcrit = 48.8 Ω, far above the 1 Ω load.

Start-up

Switched on from zero, L1 and C1 ring at f0 = 1/(2π√(LC)) = 10.7 kHz, damped by the load with Q = R√(C/L) = 1.48. A second-order step response overshoots by exp(−πζ/√(1−ζ²)) = 32% (ζ = 1/2Q), peaking at tp = 1/(2f0√(1−ζ²)) = 49.5 µs.

4Simulation

Open the example and it runs once, for 600 µs (1,200 switching periods). Fig. 2 shows the start-up; Fig. 3 the last four periods, where the inductor current is the triangle the ripple equation describes.

0.0 0.5 1.0 v(out) [V] 100 200 300 400 500 Time (µs) 0 1 i(L1) [A]
Fig. 2: Start-up: output voltage and inductor current over the whole run.
0 2 4 v(sw) [V] 0 250 500 750 1000 1250 1500 1750 2000 Time in the last four periods (ns) 0.88 0.90 i(L1) [A]
Fig. 3: Steady state: switch node and inductor current, last four periods.

Measured over the last ten periods, against the hand calculations of section 3:

QuantityBy handPWMSim
Output voltage, mean0.881 V0.881 V
Load current, mean of i(L1)0.881 A0.881 A
Inductor ripple, peak to peak37.1 mA36.9 mA
Inductor current, minimum0.863 A0.863 A
Start-up peak of v(out)1.17 V1.16 V
Time of that peak49.5 µs49.2 µs

The steady-state values agree within 0.4%. The start-up estimate is looser: it treats the converter as an LC filter switched onto a step of D·Vin, which ignores the switching itself.

5Try this

Raise the duty cycle

Select PWM1 and change its duty from 0.18 to 0.22, then press Run transient. The output and the ripple both follow the equations of section 3:

Duty 0.22By handPWMSim
Output voltage, mean1.077 V1.077 V
Inductor ripple, peak to peak43.1 mA42.9 mA

Lighten the load into DCM

Set R4 to 100 Ω, above Rcrit = 48.8 Ω, and the inductor current now reaches zero every period: discontinuous conduction (DCM). The output is no longer D·Vin; with K = 2L/(R·T) = 0.40 it is

Vout=2·Vin1+1+4·KD2

The output time constant grows to RC = 2.2 ms, so open Settings and set the stop time to 10 ms (type 10m) before you run it.

0 2 4 v(sw) [V] 0 250 500 750 1000 1250 1500 1750 2000 Time in the last four periods (ns) 0.00 0.02 i(L1) [A]
Fig. 4: R4 = 100 Ω: the inductor current falls to zero and stays there until the switch turns on again. While neither S1 nor D2 conducts, nothing drives the switch node, and it sits at the output voltage.
R4 = 100 ΩBy handPWMSim
Output voltage, mean1.235 V1.235 V
Inductor current, minimum0 A28 nA

6What the model leaves out

7References

  1. R. W. Erickson and D. Maksimović, Fundamentals of Power Electronics, 3rd ed., Springer, 2020. Chapter 2 (volt-second balance, ripple) and chapter 5 (discontinuous conduction mode).
  2. N. Mohan, T. M. Undeland and W. P. Robbins, Power Electronics: Converters, Applications, and Design, 3rd ed., Wiley, 2003. Chapter 7.

Every waveform and simulated number above comes from this example as the app opens it, run by PWMSim.