The Test Bench: run one case and see it against its limits
spec.verify checks every corner of a spec at once and answers with a table. The Test Bench runs the same checks one case at a time and keeps each run's waveforms, with the limits drawn on them. You run a load-step case on the closed-loop buck, watch it fail, fix the loop, run it again and lay the two runs over each other. About 15 minutes.
Pictures: a numbered red box is what you click or read, Run is a button, Simulation › Test Bench a menu path.
1. Open the Test Bench
Step 1 of 6 · about 1 minChoose File › Open Example › DC-DC › Buck converter, closed loop (the circuit of tutorial 2), then open the Simulation menu.
Simulation.Test Bench, thenOpen Test Bench.
2. List the cases
Step 2 of 6 · about 1 minFill in the spec in the Spec section at the top, the same rows as the Auto Design form. Use spec from Auto Design fills it with the spec Auto Design would open with (here the circuit's 48 V, 12 V and 5 A). For this tutorial, paste the whole spec instead: Paste JSON (in the top row), paste the text below, Apply, then click List Cases:
{"vin":{"min":44,"nom":48,"max":52},"vout":{"nom":12,"tolPct":2},"iout":{"min":2.5,"max":5},"loadStep":{"from":2.5,"to":5,"maxDroopPct":5,"maxSettle":"2m"}}
48 V (44 to 52 V) in, 12 V ±2 % out, 2.5 to 5 A, and a load step from 2.5 to 5 A that may pull the output down by at most 5 % and must recover within 2 ms.
- The
Specsection, filled from the pasted JSON (the same specspec.verifyanddesign.autotake). It closes once the cases are listed; click it to open it again. List Cases. Listing simulates nothing.- A corner case: one input and one load, run until the output settles, checked against the regulation band.
- A load-step case at 48 V: the load steps from 2.5 to 5 A after the first run and back to 2.5 A after the second, checked for the largest swing after each edge and the recovery time. The list also has
preBias, a start-up into an output already charged to half its voltage.
3. Run the load step
Step 3 of 6 · about 1 minClick Load step 2.5 A to 5 A, Vin 48 V. It runs at once.
Fail,Test run tb1. The plots showv(out)andi(L1). The dashed horizontal line is the dip limit (11.4 V, 5 % under 12 V); the two dashed vertical lines are the recovery window, 2 ms from the step at 10 ms.Undershoot or overshoot after the load step: 16.03 % against 5 %. The output falls to about 10 V and rings past 12 V; the note gives both in millivolts. The next row,Overshoot or undershoot after the load release, reads the load going back to 2.5 A.Recovery after the load step: 5.588 ms against 2 ms, the slower of the two edges. The PI loop is too slow, as tutorial 2 found.
4. Fix the loop
Step 4 of 6 · about 1 minClose the window and choose Design › Design Steps › Voltage Loop.
Controller:Auto picked Type III., a Type III network crossing at 5.78 kHz with 60° of margin.Design again.Applywrites the network into the circuit.✔ Verified. On the schematic,PIis now a transfer function block,B(s)/A(s).
5. Open the stale case
Step 5 of 6 · about 1 minChoose Simulation › Test Bench › Open Test Bench again. The spec and the cases are still there.
⟳after the case title: the circuit changed after this run, so the result is out of date.Run Caseruns the selected case again.
6. Run again and compare
Step 6 of 6 · about 1 minClick Run Case, then pick tb1 · loadStep-48V in Compare with:.
Pass,Test run tb2.Compare with::tb1, the first run.- The overlay is drawn dashed:
v(out) (tb1)rings and dips; the newv(out)barely moves at the step. - The table adds the overlay's values and the difference: the dip falls from 16.03 % to 4.62 %, and the recovery from 5.588 ms to 122 µs.
Differenceis in the limit's unit: −11.4 % for the dip and −5.47 ms for the recovery. The plots' y axes name their signal and unit,v(out)in V andi(L1)in A.
Run All Cases runs every case in parallel, Re-run Failed only those that failed, Export CSV writes one row per limit of every case, and Copy JSON copies the cases and runs.
The same steps from a script
SPEC='{"vin":{"min":44,"nom":48,"max":52},"vout":{"nom":12,"tolPct":2},"iout":{"min":2.5,"max":5},"loadStep":{"from":2.5,"to":5,"maxDroopPct":5,"maxSettle":"2m"}}'
powercraft-cli run \
--cmd file.openExample --params '{"name":"buckClosedLoop"}' \
--cmd testbench.run --params "{\"case\":\"loadStep-48V\",\"spec\":$SPEC}" \
--cmd design.voltageLoop --params '{"controller":"typeIII","apply":true}' \
--cmd testbench.run --params "{\"case\":\"loadStep-48V\",\"spec\":$SPEC}" \
--cmd testbench.compare --params '{"a":"tb1","b":"tb2"}'
Back to the learning path.





