Buck Converter Tutorial: PWM Duty Cycle, LC Filter Sizing & Ripple Analysis
Stepping 12 V down to 3.3 V at 2 A with a linear LDO regulator burns 17.4 W as pure heat inside a small silicon package—only 27.5% efficient. A synchronous or diode-freewheeling buck converter achieves 88% to 96% conversion efficiency by rapidly chopping the input voltage with a MOSFET switch and averaging the resulting rectangular pulse train through a lossless LC low-pass filter. This guide derives volt-second inductor balance, inductor peak-to-peak current ripple, output voltage ripple, Continuous vs Discontinuous Conduction Mode boundaries, and lets you inspect every switching edge live in NodeSim.
1. Two-State Switching Cycle & Volt-Second Balance
Think of a buck converter as a high-speed electronic switch producing a 0-to-Vin square wave at switching frequency f_sw (commonly 50 kHz to 1 MHz), followed by a heavy LC low-pass filter whose cutoff frequency sits two decades below f_sw. During interval t_on = D * T_sw, the high-side MOSFET closes: switch node V_sw jumps to Vin, placing voltage (Vin − Vout) across inductor L so inductor current ramps linearly upward at slope dI_L/dt = (Vin − Vout) / L while storing energy in the core.
When the MOSFET opens during interval t_off = (1 − D) * T_sw, inductor current cannot interrupt instantaneously. Instead, the collapsing magnetic field drives switch node V_sw just below ground (~−0.4 V across a Schottky catch diode), forward-biasing the freewheeling diode so current ramps steadily downward at slope −Vout / L. In steady state, net inductor current change over one complete period must sum to zero (volt-second balance), immediately proving the famous buck transfer ratio.
Volt-Second Balance: (Vin − Vout) × D·T = (Vout + Vf) × (1 − D)·T Ideal Conversion Ratio (neglecting Vf & Rds(on)): Vout = D × Vin Duty Cycle Target: D = Vout / Vin (e.g., 12 V → 5 V requires D ≈ 0.417)
Because switch-node conduction losses (~0.4 V Schottky drop Vf and MOSFET I * Rds(on)) oppose current flow, closed-loop controllers subtly raise real duty cycle slightly above Vin/Vout.
2. Inductor Sizing, Ripple Ratio & CCM vs DCM
Selecting inductor value L sets the triangular peak-to-peak current ripple delta_I_L superimposed on top of the average load current I_load. Engineers typically target ripple current delta_I_L between 20% and 40% of full-load current. Making delta_I_L smaller lowers core losses and capacitor ripple stress but demands a bulky, expensive high-inductance coil with higher winding resistance (DCR). Making delta_I_L exceed 100% pushes the converter into Discontinuous Conduction Mode (DCM) at light loads, where inductor current touches 0 A before the switching period ends.
Why does DCM matter? In Continuous Conduction Mode (CCM), output voltage tracks duty cycle cleanly regardless of load current (Vout ≈ D * Vin). Once inductor current drops to zero in DCM, however, light loads cause output voltage to climb upward toward Vin unless a feedback PWM controller narrows duty cycle dynamically.
Peak-to-Peak Current Ripple: ΔI_L = ((Vin − Vout) × D) / (L × f_sw) Inductor Sizing Formula (target ΔI_L = 0.3 × I_load): L = ((Vin − Vout) × D) / (ΔI_L × f_sw) Critical Boundary Current: I_crit = ΔI_L / 2 (DCM occurs when I_load < I_crit)
- Check Inductor Saturation Current (I_sat): Peak core current equals I_load + (ΔI_L / 2). Choosing an inductor whose saturation rating falls near peak current collapses inductance abruptly and destroys the switching FET.
- Why Schottky Diodes Beat Standard Silicon (1N4007): Standard 50/60 Hz rectifier diodes suffer slow microseconds-long reverse recovery charge, shorting Vin through Q1 every cycle at 100 kHz. Fast Schottky diodes (1N5819 / SS34) combine sub-nanosecond recovery with low ~0.4 V forward drop.
3. Output Capacitor Ripple, ESR, and Startup Inrush
With triangular inductor ripple current divided cleanly into the output capacitor (C_out holds constant DC voltage so AC ripple current enters C_out), output voltage ripple ΔVout stems from two sources: pure capacitive charge integration ΔQ / C_out and resistive drop ΔI_L * ESR across the capacitor Equivalent Series Resistance. Modern multilayer ceramic capacitors (MLCCs) drive ESR below 10 mOhm, making pure capacitance the main design variable, whereas aluminum electrolytics are often ESR-dominated.
At power-up (t = 0 ms), output capacitor C_out starts completely discharged at 0 V. Applying a fixed 41.7% open-loop duty cycle immediately triggers underdamped LC ringing—causing Vout to overshoot temporarily above 6.5 V before settling back to 5.0 V. Practical integrated buck regulators prevent that startup surge with soft-start duty ramping and current-mode PI feedback.
Capacitive Ripple: ΔV_C = ΔI_L / (8 × f_sw × C_out) ESR Ripple Contribution: ΔV_ESR = ΔI_L × R_ESR Resonant Corner of LC Filter: f_LC = 1 / (2 × π × √(L × C_out))
4. Inspecting Switching Nodes & Efficiency in NodeSim
Click Simulate Live Circuit to open NodeSim's pre-wired DC-DC buck converter (12 V input stepped down with 100 kHz PWM pulse drive, N-MOSFET/switch, Schottky diode, L = 47 uH–100 uH, C = 47 uF, load RL). Set Transient end time around 2 ms to 4 ms with fine timestep (around 0.5 us to 1 us) so ngspice resolves every 100 kHz switching transition cleanly.
Zoom into the steady-state region past 1.5 ms: observe the clean 12 V / -0.4 V rectangular switch node waveform ahead of the inductor, compare it against the smooth DC rail past the LC filter, and measure the sawtooth millivolt output ripple with waveform cursors.
Reference Component Values & Bill of Materials
| Part / Designator | Nominal Value | Role in Circuit |
|---|---|---|
| Vin (Input Bus) | 12 V DC | Unregulated automotive, battery, or adapter rail supplying input power |
| Q1 / M1 (Power Switch) | IRF540 / Logic NMOS | Low Rds(on) transistor modulated at PWM switching frequency f_sw |
| D1 (Catch Diode) | 1N5819 Schottky | Conducts freewheeling inductor current during switch off-time |
| L1 (Power Inductor) | 100 uH | Stores magnetic energy during t_on and limits triangular current ripple |
| C1 (Output Filter Cap) | 47 uF | Absorbs AC triangular inductor ripple current into low-ripple DC output |
| RL (System Load) | 10 Ohm | Draws steady ~0.5 A output load current at ~5 V target |
Expected Waveforms & Simulation Verification
| Probe / Node | Analysis Type | Expected Waveform | Engineering Check |
|---|---|---|---|
| V_sw (Switch Node) | Transient (.tran) | 0 V / +12 V square wave (-0.4 V undershoot) | Verifies clean MOSFET conduction and catch-diode clamping during dead/off interval |
| Vout (Startup 0–1 ms) | Transient (.tran) | Damped LC step overshoot settling to ~4.8–5.0 V | Shows natural LC filter resonance before steady-state volt-second balance |
| Vout (Steady-State Ripple) | Transient (.tran zoom) | < 50 mVpp triangular ripple | Matches ΔI_L / (8 f_sw C) capacitive smoothing equation |
| I(L1) Inductor Current | Transient (.tran) | Triangular wave centered near I_load | Confirms CCM operation when valley current remains strictly above 0 A |
Troubleshooting Common SPICE & Bench Mistakes
Hands-On Lab Exercises in NodeSim
- Vary PWM duty cycle D cleanly from 25% to 50% and 75% in NodeSim, recording steady-state Vout after 2 ms to plot Vout vs Duty Cycle linearity.
- Increase load resistance RL by 10x (light load) and observe switch-node ringing at the exact instant inductor current hits zero—demonstrating Discontinuous Conduction Mode (DCM).
- Cut output capacitor C1 by 5x and verify how output ripple peak-to-peak amplitude ΔVout scales proportionally.
