Kristian Skorpen
Free interactive tool

Boost simulator

A boost converter you can program. Pick the topology, set L, C, Rload and the rails, then write the control loop in C and run a real switched-converter simulation that closes the loop cycle by cycle. Probe any voltage or current, sweep parameters, and explore the waveforms.

1

Configure the converter

fig. 1 · standard boost (diode) Dss ≈ 0.500
iL L 100 µH S Q1 D C 100 µF Rload 10.0 Ω + − vout target 24.0 V + − vin 12.0 V
Measurements
2

Write the controller

fig. 2 · control block diagram single voltage loop
vref vin + − e Voltage ctrl voltage.c d PWM pwm.c S boost plant see fig. 1 vout measured v_out
edit freely · re-run to see the effect
3

Pick what to plot, then run

Parameter sweep vary parameters across a grid, then explore the result
parameterstartstopstepsspacing
no axes selected
Waveform press Run
no run yet
Press Run sim →. The waveforms open in the Plot Explorer below — add curves, stack subplots, drop cursors.

Real engine: your C controller drives a switched boost (states iL, vC) integrated with symplectic Euler. Long timebases block-average each point; shorten the sim time to see per-cycle ripple. All measured channels (Vout, iL, duty, node voltages, branch currents) are sent to the explorer.

Plotting guidemeasurements, running, sweeps, and the Plot Explorer — everything

1 · What gets plotted

Pressing Run sim → simulates the converter and opens the result in the embedded Plot Explorer below. The simulation is never run automatically — only when you press Run (or Run sweep). Every channel the engine records is made available to the Explorer:

Topology (Step 1): Standard (diode) and Synchronous (low + high MOSFET) are switched models — real PWM, switching ripple, fine timestep. Averaged model replaces the switching network with a (1−d) DC-transformer (switch-node average vA = (1−d)·vout): smooth waveforms, no PWM ripple, and a much faster run — ideal for control/transient studies and sweeps. It assumes continuous conduction (CCM).

  • Built-ins — V_out, i_L, duty, plus node voltages and branch currents you add as measurements (below).
  • signals.py — every signal you define (e.g. Vref, Power) is recorded over the run and plottable by its name.
  • plot(...) channels — any internal controller variable you expose (see §3).

2 · Measurements (under the schematic, Step 1)

The Measurements panel sits beneath the schematic. A relevant default set is preloaded (Vout, i(L), Vin, input/load/cap currents, v(Q1)…). Each is a chip:

  • Click a chip to include it as a channel in the Explorer (highlighted = on). It is available to plot, not force-drawn — you pick curves in the Explorer.
  • + current → then click a component on the schematic to measure the current through it.
  • + voltage → then click two nodes to measure the voltage between them.
  • You name each probe on add (Cancel discards it). The ✕ on a chip removes it.

3 · Plotting controller variables — plot()

Expose any internal variable from voltage.c / current.c / pwm.c as a channel:

float i_ref = KP*err + KI*integ;
plot(i_ref);             // → channel "i_ref"
plot("err", Vref-Vout);  // → channel "err" (named)

The value is sampled at the controller's rate and recorded for the whole run.

4 · The Plot Explorer

Each plot card draws one or more curves. Use + Add standard plot / + Add 3D plot to compare slices side by side.

  • Curves — each row is a variable + operation, or switch it to ✎ expression… for a freeform expression. + add curve for more.
  • Horizontal axis — usually t; set it to ✎ expression… for a transform (t*1000) or a parametric plot (X = V_out, Y = i_L).
  • Subplots — stack 1–4 plots sharing the X axis; assign each curve to a subplot.
  • Style — every curve has a colour picker and a line style (solid / dashed / dotted / dash-dot).
  • ⊹ cursors — drop A & B lines, drag them to read exact values, Δx, Δy, and add mean / RMS / min / max / pk-pk over the interval.
  • Curve expressions — click the ? next to a plot for the full function reference. Highlights: reductions RMS(i)/MEAN(i)… (scalar); per-cycle with a frequency RMS(i_L*V_out, 50) (one value per 1/f cycle); rolling RMS_R(i, w); filters LPF(i, fc) / HPF(i, fc); element-wise ABS/SQRT/LOG/DERIV…; slicing i[a:b]; arithmetic + − * / ** %.

5 · Sweeps

Open Parameter sweep. Tick any parameters (circuit values and controller #define gains) and set start / stop / steps and linear / log spacing. The combo count and a cap are shown; press Run sweep →.

  • Every combination is simulated and the whole set loads at once.
  • Sliders appear for the swept dimensions — drag one to morph the waveform. Each slider has lock/float, a scale dropdown — lin / log / ✎ expr… (pick expr to type a custom monotonic transform like 1/L and slide in that space) — and ⬆ to promote it to the global header.
  • Switch a card to 3D for a heatmap / contour / surface: two swept params as axes, a reduced metric as the value (e.g. MEAN(V_out), P2P(i_L)).
  • Interpolate (smooth curves) renders lines as cubic splines (visual only).

6 · Saving & download

  • Your setup — controller C code, signals.py, parameters, probes, sweep config, every setting — is saved in your browser and restored on reload. The simulation waveforms are not saved.
  • Download data ↓ exports the waveforms as CSV: a single run gives t + all channels (+ signals + plot() channels); a sweep gives the full long-format grid.