← ProjectsSoftware demonstration · tested · AI-assisted

Power-stage sizing utility.

Sizes an ideal buck inductor against the worst-case input voltage, and reports the current stress and output-capacitance estimates that follow from it. The formulas, assumptions, worked calculation and an independent test suite are published with the module.

Specification

Results update as you type. Defaults are case A of the reference table below.

01 / Input range
02 / Output and load
03 / Switching and targets
04 / Capacitor and transient assumptions optional

Left ideal by default. Real numbers make the capacitance figure larger and more realistic.

Derating covers tolerance, DC bias loss and ageing. A 10 µF ceramic at 5 V may retain well under half of its nominal value.

Inductor ripple across the input rangeΔIL vs Vin

Ripple grows with input voltage because the off-time fraction (1 − D) grows.

Sized stageevaluating
Series inductance held across Vin,min…Vin,max
—

Inductor current

Ripple at Vin,max
—
Ripple at Vin,min
—
Peak current Ipeak
—
Valley current Ivalley
—
RMS current IL,rms
—
CCM boundary inductance
—

Output capacitor

Nominal capacitance
—
ESR contribution
—
Transient floor
—
Capacitor RMS current
—

Timing

Duty ratio (min / max input)
—
On-time (longest / shortest)
—
Switching period
—

Enter a specification to size the stage.

01 / THE MODEL

Five relations,
one worst case.

Ideal continuous conduction. Every expression below is implemented in the published module and re-derived independently in the test suite.

Duty ratioD=VoutVin

Ideal CCM conversion ratio. Duty is largest at the minimum input; on-time follows it.

Inductor rippleΔIL(Vin)=Vout(1−VoutVin)Lfsw

The ripple depends on the input only through 1 − Vout/Vin, which rises with input voltage.

Required inductanceL≥Vout(1−VoutVin,max)ΔIL,targetfsw

Sized at the maximum input, where the ripple is worst — not at the minimum input, where the duty is worst.

CCM boundaryLcrit=Vout(1−VoutVin,max)2Ioutfsw

The inductance at which the valley current reaches zero at full load. Below it the converter enters DCM and this model no longer describes it.

Output rippleΔVout≈ΔIL8fswC+ΔIL·RESR

Capacitive and resistive terms summed as a worst case. Set ESR to zero for the ideal figure.

Inductor heatingIL,rms=Iout2+ΔIL212

Combines the DC load current with the triangular ripple. Different from the peak current that sets the saturation requirement.

WORST-CASE OPERATING POINTS

At Vin,max

Inductor ripple, peak current, valley current, RMS current and the CCM boundary inductance are all worst here, because the off-time fraction is largest.

At Vin,min

Duty ratio and on-time are worst here, which matters for minimum on-time limits, gate-drive timing and switching loss.

The tool reports both ends of the range. Evaluating a whole input range at one arbitrary voltage is the mistake this utility was rebuilt to avoid.

02 / BEHAVIOUR

What the range
actually does.

The same sized inductor, evaluated at five input voltages. Interpolated live from your specification.

Inductor ripple, current stress and timing at five input voltages for the current specification
VinDuty DΔILRipple / IoutIpeakIvalleyOn-time
Enable JavaScript to interpolate the operating points.

Scroll the table sideways for every column.

The maximum ripple and the maximum duty occur at opposite ends of the input range.

03 / WORKED CALCULATION

Case A,
by hand.

9–15 V in, 5 V out, 2 A, 500 kHz, 30 % ripple target, 1 % output ripple. Every figure below is reproduced by both test files.

  1. 01

    Ripple allowance

    ΔIL,target = 30 % × 2 A = 0.60 A peak to peak.

  2. 02

    Duty at the maximum input

    D = 5 / 15 = 0.3333, so the off-time fraction is 1 − D = 0.6667.

  3. 03

    Required inductance

    L = 5 × 0.6667 / (0.60 × 500 kHz) = 11.11 µH.

  4. 04

    Check the minimum input

    At 9 V, D = 0.5556 and the same inductor gives ΔIL = 5 × 0.4444 / (11.11 µH × 500 kHz) = 0.40 A — 20 % of load, inside the 30 % target.

  5. 05

    Current stress

    Ipeak = 2 + 0.30 = 2.30 A, Ivalley = 2 − 0.30 = 1.70 A, Irms = √(2² + 0.60²/12) = 2.007 A.

  6. 06

    Continuity check

    Lcrit = 5 × 0.6667 / (2 × 2 A × 500 kHz) = 1.667 µH. The chosen 11.11 µH is 6.7× that boundary, so the design stays in CCM at full load by a wide margin.

  7. 07

    Output capacitance

    1 % of 5 V is 50 mV. With ESR = 0: C = 0.60 / (8 × 500 kHz × 0.05) = 3.0 µF. With ESR = 10 mΩ the resistive term takes 6 mV of the 50 mV budget, raising the requirement to 3.41 µF — and a capacitor that keeps only 60 % of its nominal value under bias needs 5.68 µF on the order line.

04 / REFERENCE CASES

Three cases,
two independent methods.

Produced by the published module and asserted in tests/powerstage.test.js; the same values are re-derived from first principles in tests/powerstage-independent.test.js.

Reference cases computed by the published module and verified independently
CaseSpecificationL requiredΔIL at Vin,maxIpeakLcritC for ripple target
A9–15 V → 5 V, 2 A, 500 kHz, 30 %11.111 µH0.600 A2.300 A1.667 µH3.000 µF
B12–24 V → 3.3 V, 1 A, 1 MHz, 40 %7.116 µH0.400 A1.200 A1.423 µH0.758 µF
C12 V → 5 V, 1 A, 100 kHz, 100 %29.167 µH1.000 A1.500 A14.583 µH25.000 µF

Scroll the table sideways for every column.

Ideal model output, not measurements of hardware. Case C sizes 29.167 µH for a ripple allowance equal to the full load current, leaving a valley of 0.5 A; the zero-valley boundary is half that inductance, because the ripple allowance is quoted relative to Iout.

05 / DEVELOPMENT & VERIFICATION

How this was built, and how it is checked.

Software demonstration · tested
Status
Tested software demonstration
Attribution
AI-assisted implementation
Dependencies
None
Runs
Entirely in your browser
Source
powerstage.js · tests

Implementation

The model was specified by the studio, written with AI assistance, and then reviewed line by line against the standard ideal CCM buck relations. The module has no dependencies and no build step: the file served at /assets/powerstage.js is the file that runs in the browser and the file the tests import.

AI assistance

Disclosed because it is material. The JavaScript module, the page, and both test files were produced with AI assistance. The work is published as a software artefact of this site — it is not presented as the founder's independent engineering work, nor as a converter that was built or measured.

Validation method

Correct answers are established by a second method, not by re-running the module. Because ripple is defined by di/dt, the test suite integrates the inductor current through a switching cycle and finds the duty ratio by bisection on volt-second balance. Ripple, RMS current and capacitor voltage ripple are then measured from the simulated waveform and compared with the closed-form results.

External reference values

Three specifications were supplied independently of the implementation, with hand-calculated expectations. Case A: 11.111 µH inductance and 1.667 µH boundary. Case B: 7.116 µH. Case C: 29.167 µH. The module reproduces all of them within 0.3 %.

Test coverage

495 assertions in eight groups: cycle-integration parity, dense sweeps locating the worst case, boundary behaviour, scaling invariants, RMS integration, capacitor integration with ESR and derating, sweep consistency, and input validation. A separate file asserts the worked cases and the reference table published above, so a stale table fails the build rather than going unnoticed.

Reproducing it

The suite runs with Node and no packages.node tests/powerstage.test.js node tests/powerstage-independent.test.js

What the model deliberately leaves out

  • No switch, diode or winding resistance, so a real converter needs slightly more duty than Vout/Vin. Efficiency is not used to correct the duty ratio.
  • No inductor saturation, core loss or thermal model. The peak current is a sizing input for a saturation rating, not a guarantee.
  • The capacitor estimate sums the capacitive and ESR ripple terms as a worst case, ignores ESL, and treats derating as a single scalar you choose.
  • The transient figure is an energy-balance floor for a load release. It ignores loop bandwidth entirely and cannot replace a stability analysis.
  • Steady-state CCM only. Below Lcrit the tool stops claiming anything rather than reporting a DCM result.
  • Nothing here has been compared with a bench measurement, because no converter has been built.

Sources this model is checked against

  • Hauke, B. Basic Calculation of a Buck Converter's Power Stage. Texas Instruments Application Report SLVA477B, December 2011, revised August 2015. Inductor ripple (Eq. 2) is evaluated at VIN(max); minimum output capacitance (Eq. 12) is ΔIL/(8 fS ΔVOUT); the ESR term (Eq. 13) is ESR·ΔIL; the note also records that transient response, not steady-state ripple, often sizes the output capacitor. ti.com/lit/an/slva477b
  • Erickson, R. W. and Maksimović, D. Fundamentals of Power Electronics, 3rd edition, Springer, 2020. Chapter 2 gives the inductor current ripple, the peak and valley currents, and the continuous/discontinuous conduction boundary used here.
  • The duty ratio is the ideal CCM conversion ratio Vout/Vin. Efficiency is deliberately not used to correct it; that is treated as an input-power estimate on the buck explorer instead. The derivation note explains why.

These are the published relations the module implements, not measurements for comparison: the implementation is checked against them and against an independent switching-cycle simulation, which is what the test suites do.