Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new

Run this example

The browser version is coming soon. Until then, open this example in the desktop app. Download Voltecx

The boost example steps 12 V up to 24 V at a duty cycle of 0.5 and 50 kHz, into a 24 Ω load (1 A). By hand, the inductor carries 2 A with a 0.60 A ripple and the output ripple is 45.5 mV. A 60 ms run gives 23.99 V, 2.00 A, 0.60 A and 45 mV. The default 10 ms run ends at 23.89 V because the boost's LC resonance is lightly damped and still ringing.

Open it

In the app: File › Open Example › DC-DC › Boost converter, then press F5. From the command line, with the longer run:

powercraft-cli run --cmd file.openExample --params '{"name": "boost"}' \
  --cmd simulation.settings --params '{"tEnd": 0.06}' \
  --cmd simulation.run \
  --cmd scope.measure --params '{"signals": ["v(out)", "i(L1)"], "t0": 0.0599, "t1": 0.06}'

The boost example: a 12 V source, L1 = 200 µH, switch S1 to ground, diode D1, C1 = 220 µF and a 24 Ω load, with a constant duty of 0.5 driving a 50 kHz PWM.

Part Value
Input VinV_{in} 12 V
Duty cycle DD 0.5 (open loop)
Switching frequency fswf_{sw} 50 kHz
Inductor L1L_1 200 µH, starts at 2 A
Output capacitor C1C_1 220 µF, starts at 24 V
Load R1R_1 24 Ω

The hand calculation

In continuous conduction the inductor's volt-seconds balance over a period, which gives

Vout=Vin1−D=120.5=24 V,IL=Iout1−D=1 A0.5=2 AV_{out} = \frac{V_{in}}{1 - D} = \frac{12}{0.5} = 24\ \text{V}, \qquad I_L = \frac{I_{out}}{1 - D} = \frac{1\ \text{A}}{0.5} = 2\ \text{A}

While the switch is on, the full input is across the inductor:

ΔI=Vin Dfsw L=12×0.550 kHz×200 μH=0.60 A\Delta I = \frac{V_{in}\,D}{f_{sw}\,L} = \frac{12 \times 0.5}{50\ \text{kHz} \times 200\ \mu\text{H}} = 0.60\ \text{A}

While the switch is on the diode is off, and the capacitor alone feeds the load:

ΔV=Iout Dfsw C=1×0.550 kHz×220 μF=45.5 mV\Delta V = \frac{I_{out}\,D}{f_{sw}\,C} = \frac{1 \times 0.5}{50\ \text{kHz} \times 220\ \mu\text{F}} = 45.5\ \text{mV}

Why the default run has not settled

To the duty cycle, a boost looks like an LC filter whose inductance is L/(1−D)2=800L/(1-D)^2 = 800 µH. With 220 µF and 24 Ω:

f0=12π800 μH×220 μF=379 Hz,Q=RCL/(1−D)2=12.6f_0 = \frac{1}{2\pi\sqrt{800\ \mu\text{H} \times 220\ \mu\text{F}}} = 379\ \text{Hz}, \qquad Q = R\sqrt{\frac{C}{L/(1-D)^2}} = 12.6

A resonance with Q = 12.6 decays with a time constant of 2Q/(2πf0)≈10.62Q/(2\pi f_0) \approx 10.6 ms. The capacitor and the inductor start at their average values, but the first switching period still disturbs them, and the ring that follows lasts tens of milliseconds. After the default 10 ms the output still reads 23.89 V; after 60 ms it has settled.

The output over a 60 ms run: the ring at 379 Hz dies out over tens of milliseconds and v(out) settles at 24 V.

The run

Quantity Hand Run
Output after the default 10 ms — 23.89 V
Output after 60 ms (last five periods) 24 V 23.99 V
Mean inductor current 2 A 2.00 A
Inductor ripple (peak to peak) 0.60 A 0.60 A
Output ripple 45.5 mV 45 mV

Three periods at the end of the 60 ms run: the switch node v(sw) toggling between 0 V and 24 V, the inductor current i(L1) as a 0.60 A triangle around 2 A, and v(out) with its 45 mV ripple.

Try next

  • Close the loop with the boostClosedLoop example. A boost's loop is limited by its right-half-plane zero; the boost design article explains why.
  • Raise D to 0.6: VoutV_{out} = 30 V, ILI_L = 2.5 A, and the resonance moves to f0∝(1−D)f_0 \propto (1 - D).
  • Compare with the buck worked example, which settles in a few milliseconds because its Q is 1.

Every number on this page comes from a run that a test repeats (auto::tests_worked_examples), so the page changes when the simulator does.