Buck Converter: Switching Cycle, Ripple and Efficiency on a PCB

A MOSFET, diode, inductor and capacitor step 12 V down to a lower voltage: follow the current through every switching cycle, see continuous and discontinuous mode and count the losses.

Switch to 2D

Presets

Playback

Parameters

Camera

Layers

Quality

Model check

The science

What is modelled

A step-down (buck) DC-DC converter on a printed circuit board: a MOSFET switch chops the input voltage, a diode lets the inductor current continue when the switch is off, and the inductor and capacitor smooth the pulses into a lower DC voltage across the load resistor. The page integrates the inductor current and capacitor voltage through every switching period (240 steps per period), so you see the ripple, the start-up and the change between continuous and discontinuous conduction. Time is slowed down: at the default speed 40 switching periods pass per real second.

Equations

  • Switch on (fraction D of each period T = 1/f): L diL/dt = Vin − iL (Rds + DCR) − vC. Switch off with the diode conducting: L diL/dt = −Vf − iL DCR − vC. If the current would fall below zero the diode blocks and iL = 0 (discontinuous mode).
  • Capacitor and load: C dvC/dt = iL − vC / R.
  • Ideal continuous mode (volt-second balance of the inductor): Vout = D Vin, ripple ΔiL = (Vin − Vout) D / (L f), output ripple ΔvC = ΔiL / (8 C f).
  • Boundary of continuous conduction: Lcrit = (1 − D) R / (2 f). Below it the converter runs in discontinuous mode where Vout/Vin = 2 / (1 + √(1 + 4K/D²)) with K = 2L/(R T).
  • Power: Pin = mean(s Vin iL), Pout = mean(vC²/R), losses Rds iL² s + DCR iL² + Vf iL (1−s). Efficiency is Pout/Pin.

Checks run in the page

  • Ideal parts: mean output against D Vin after 1500 periods.
  • Measured inductor ripple against the closed form.
  • Measured output ripple against ΔiL/(8Cf).
  • Discontinuous-mode gain against the textbook formula.
  • Energy balance with lossy parts: input power equals output power plus the three loss terms.

Honest simplifications

  • Switching transitions are instantaneous: there is no switching loss, gate-drive loss, dead time or diode reverse recovery, so real efficiency is lower than shown.
  • The capacitor is ideal (no ESR or ESL), so the real output ripple is larger than the ΔiL/(8Cf) estimate; the inductor does not saturate.
  • The diode is a fixed forward drop, the MOSFET a fixed resistance; their temperature dependence is ignored.
  • The load is a fixed resistor and there is no feedback loop: the duty cycle is set by hand. Moving charge on the board and the glowing winding are drawn from the computed current for illustration, and the slowed time scale is not real time.

What to try

  • Choose Slow motion and watch the current ramp up while the green LED (switch) is lit and ramp down through the diode when it is off.
  • Press Light load: discontinuous mode and see the current touch zero; the mode readout changes to DCM.
  • Shrink the inductor to 15 uH: the ripple grows in proportion to 1/L.
  • Choose Poor parts and compare the efficiency with the ideal preset.
Loading model...
Loading Blender model...
Inductor current over the last three periods
Output voltage ripple (zoomed)
Start-up of the output voltage
Made with 🟠 Blender · Three.js