
spec.verify checks every corner of a spec in one go and answers with a table. The Test Bench (Simulation › Test Bench, simulation.testBench) runs the same checks one case at a time and keeps each run's waveforms. You can look at a failing case on its own scope with the limit drawn on it, change the circuit, run that case again and put the two runs side by side. Every button is a testbench.* command, so a script or an assistant can do the same.
A spec form filled from the circuit
In the next release. The Spec section at the top has the same rows as the Auto Design form. Nominal input, output voltage and maximum load current go under Required, the other targets below them, and the temperature and loop-margin limits sit closed under Limits. Use spec from Auto Design fills it with the spec Auto Design opens with. That is the last Auto Design run's spec if there is one. If not, Voltecx reads the open converter's input, output and load current and marks those rows from circuit. For a closed loop the output comes from the reference, and for an open loop from the ideal duty ratio. A spec you already have as JSON goes in through … › Paste JSON and Apply.
List Cases (testbench.list) turns the spec into cases and simulates nothing. In the next release: once the cases are listed, the Spec section folds away to give them room; click it to open it again.
Case sections and Edit as JSON
In the next release. Under the Spec rows, Test Bench cases holds the sections the Spec section has no rows for:
- Start-up sets the longest start-up time and the largest overshoot, and adds the start-up case.
- Hold-up sets the hold-up time and the lowest input voltage, and adds the hold-up case.
- Line step sets the step's from and to voltages, the largest deviation and the longest settling time.
spec.verifychecks these limits, and a mains spec gets its own line-step cases.
Tick a section to add it and untick it to remove it. Every field shows its unit, so 6m in a seconds field means 6 ms. Circuit binding has pickers for the input source, the load and the output net when the automatic choice is wrong. The automatic choice knows the bridge converters too: a dual active bridge, a phase-shifted full bridge or an LLC runs its cases without a binding. Edit as JSON opens the whole spec as JSON text, pretty-printed, so you can read or change any field, and Apply writes it back. The form and the JSON are the same spec: keys the form does not show are kept.
The cases
From a DC spec the bench makes one case per electrical corner (each input by each load), a start-up case at nominal input and full load, a load step at each input and a hold-up case. From design.testPlan it adds an over-current case, an over-voltage case, an under-voltage start case and an inrush case. A mains spec (with vinAc) gets AC corners read over two whole line cycles for power factor, THD and DC-link ripple, plus an AC load step, AC line steps and an AC hold-up. Test-plan steps that no simulation can show, such as a hipot test or a part check, are not cases. The reply lists them under notSimulated with the reason.
Pass or fail, case by case
Click a case to run it, or use Run All (in parallel) or Re-run Failed (testbench.run with all or failed). Each run is a background job with progress and Cancel in the status bar. Every case carries a chip: Pass, Fail, Not measured (the run or a reading failed; hover over the limit for the reason) or Not run. A ⟳ after the title means the circuit has changed since that run.
The scope on the right has one plot per signal of the case, with each limit drawn on its signal. A band is a shaded area between two levels, such as the regulation band. A line is a dashed level, such as the overshoot limit or the current trip. A window is a pair of dashed vertical lines, such as the start-up time allowed. Their time axes are linked, so zooming one zooms them all. In the next release: all the plots open on one time range, the end of the latest trace or limit window plus 3 %. Below the plots, a table gives each limit's measured value, what is required, the margin to the nearest bound (negative when outside) and the verdict.
Compare two runs
Pick an earlier run in Overlay (testbench.compare). Its traces are drawn dashed on the same plots, and the table adds that run's measured values and the difference. The usual loop: run a case, change a part, run it again, overlay the first run. The bench keeps the last 64 runs with their waveforms, and testbench.results reads them back.
Export
Export CSV (testbench.export) writes one row per limit of every case, using each case's latest run. Copy JSON puts the cases and every run, without the waveforms, on the clipboard.
The spec is saved with the circuit
In the next release. The spec a circuit is designed for is saved in its file. Auto Design stores its own, and spec.set stores one for an example or an imported circuit. Open the file again next week and List Cases (testbench.list {}) lists the same cases, with no spec typed in again. spec.verify, the conducted EMI estimate and the thermal check read the same stored spec, and each reply says it did.
How it relates to spec.verify
The two use the same spec and the same benches. spec.verify (Design › Automate › Verify Against Spec) is the one-shot check that also stops each automatic design loop, and it returns one table for the whole spec. The Test Bench splits that check into cases you can run, look at and repeat one by one, and it adds the cases only it simulates: start-up, hold-up and the protection trips from the test plan. Neither edits your circuit: each case runs on a copy set to its corner.
From a script
The commands do what the buttons do. This opens the closed-loop buck example, lists the cases for a 48 V to 12 V spec, runs them all and returns the CSV text:
powercraft-cli run \
--cmd file.openExample --params '{"name":"buckClosedLoop"}' \
--cmd testbench.list --params '{"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"}}}' \
--cmd testbench.run --params '{"case":"all"}' \
--cmd testbench.export --params '{"format":"csv"}'
testbench.compare {"a":"tb1","b":"tb2"} then compares two runs by their ids.
At bring-up, testbench.measure {"case":"corner-48V-5A","csv":"…","map":{"v(out)":"CH1"}} reads your scope export against the same case's limits, with the same readings, and keeps it as a measured run beside the simulated ones. testbench.compare then shows simulation, measurement and limit side by side.
Know the limits
A pass means the case meets its limit in Voltecx's models. It is not a safety or compliance result. For a mains spec, start-up from the mains and the protection trips are not simulated.
More in design tools and debugging and the scope. The manual has the full chapter, the Test Bench, and tutorial 11 walks through a failing load step, the fix and the comparison.