# Switching to Voltecx from another simulator

If you already simulate converters in a schematic-based simulator, most of what you know carries over to Voltecx. Switching circuits, control blocks, scopes, thermal networks and parameter sweeps are the same engineering ideas. This page maps the general ideas you already use to the place they live in Voltecx, so you can find your way in an afternoon.

This is a concept map, not a feature comparison. It describes Voltecx from its own documentation. Voltecx was written clean-room: no code, model library, example file or manual text from another simulator was used. Voltecx has not been compared with the reference waveforms of other simulators, and we make no claim that results match theirs.

LTspice is a trademark of Analog Devices, Inc. Other product names are trademarks of their owners. Voltecx is an independent product. It is not affiliated with, sponsored by or endorsed by these companies.

## The one idea that is new: everything is a command

Every action in Voltecx is a named command, for example `circuit.addComponent`, `simulation.run` or `analysis.acSweep`. The menu, the command palette (Cmd+K), the command-line tool `powercraft-cli`, the Python package and the built-in assistant all call the same commands. So anything you click, you can script, and the user manual names the command next to each menu path. Run `powercraft-cli commands` for the full list.

## Concept map

| If you think in terms of… | In Voltecx it is… |
|---|---|
| The simulation settings: time step and total time | **Simulation > Settings** (`simulation.settings`): `tEnd`, `maxStep`, `fixedStep`, `integration` (trapezoidal, backward Euler, or exact: piecewise-linear circuits solved in closed form between switching events), and the tolerances for variable step. Settings are saved with the circuit |
| Fixed time step | `fixedStep: true` (the default). The step is `maxStep`, shortened only to land exactly on a switching edge. A good start for a converter is 200 steps per switching period |
| Variable step | `fixedStep: false`. The solver controls the local error and still lands on every switching event |
| Choosing a solver | Two solvers: **fast** for everyday work and **reference**, a deliberately simple solver that checks the fast one. Run the same circuit on both when a result surprises you |
| Skipping the start-up transient | **Simulation > Steady-State Analysis** (`simulation.steadyState`) runs period after period until the waveform repeats, then shows the last period |
| Voltage and current probes | The **probe tool** (key P): click a wire, pin or part and its voltage or current goes on the scope. Signals are named `v(out)` and `i(L1)` |
| The scope window | The scope panel: tabs, cursors, logic lanes, measurements (mean, RMS, peak-to-peak, power, THD), comparison with earlier runs, export to CSV, PNG and SVG. It can be detached into its own window |
| Subsystems | **Circuit > Subsystem > Create Subsystem** (Cmd+G) turns parts into a block with named pins. Double-click to edit inside (it opens at a readable zoom; Esc or the **‹ Back** button returns); every instance follows the definition |
| Signal tags (goto and from) | **Net labels** (key L or N), with the kinds net, goto, from, rail and port. Goto and from labels join control pins by name, without wires |
| Model variables and parameter expressions | **Circuit > Variables**. A parameter that names a variable follows it everywhere. Parameters accept expressions and SI suffixes (`4.7u`, `10k`) |
| A parameter sweep | `analysis.paramSweep` (runs in parallel on your cores), `analysis.paramSweep2d` for two variables, `analysis.monteCarlo` for yield |
| Frequency response and loop gain | `analysis.acSweep`, `analysis.impedance` and `analysis.loopGain` (with phase and gain margins) |
| Switching and conduction losses | `analysis.losses` per switch and diode over a time window. Vendor devices carry loss tables read from their data sheets, with the source of every value |
| Thermal networks and heatsinks | The **Thermal** library: Foster and Cauer chains, heatsinks and junction temperatures, read with `analysis.thermal`. A separate thermal step (`thermalStep`) lets the slow thermal network step at its own rate |
| Writing your own block in C | Custom blocks run as sandboxed WebAssembly modules (`library.customBlock`), on the desktop and in the browser. C blocks in imported files are kept with the circuit (see below) |
| Generating controller code | **Tools > Code Generation** (`tools.codeGeneration`): portable C99 from the sampled control blocks, with optional set-up code for the STM32G474 or TMS320F28379D |
| Batch runs and scripts | **Tools > Parameter Sweep**, **Tools > Scripting**, `powercraft-cli script` and `powercraft-cli sim`, and the Python package `powercraft` |
| Motor drives | The `machine` and `mechanical` parts with FOC blocks. Examples: induction motor V/f and indirect FOC, PMSM FOC, sensorless PMSM, DC motor, direct torque control, BLDC six-step |
| Designing the converter before simulating it | The **Design** menu sizes inductors, capacitors and compensators from targets. **Design > Auto Design** (`design.auto`) goes from a spec to a checked circuit and a report |

## Opening your existing files

| Your file | What Voltecx does |
|---|---|
| LTspice `.asc` and SPICE netlists | Read and written back. See [Move an LTspice project to Voltecx](https://voltecx-web.nguyenvanqui291.workers.dev/guides/migrate-from-ltspice) |
| Files from other simulators | Read, and in several formats your edits are written back into the same file. An unedited file comes back byte for byte; an edit changes only the bytes it must. Blocks Voltecx does not map are kept untouched in the file or listed in **Problems**, the most important first. Where a format cannot be written, **File > Save** asks for a new `.voltecx` file. The wiring is rebuilt from the drawing. Control code in a C block is not run when the format cannot carry it across: the code is kept with the circuit (**Circuit > C Code**), with a comment listing the net each pin touched, so you can rebuild the controller. Import from other formats is a Pro feature |

What was measured: in a run recorded on 2026-10-15, all 332 public LTspice sample files and all 122 public sample files in the other supported write-back format in our test corpus wrote back byte for byte, with no crash. The read-only importer was checked on 6 public sample files, which read back identically. No file was opened in the original tools to test. The guarantees come from the file format rules and from tests on public files. See [File compatibility](https://voltecx-web.nguyenvanqui291.workers.dev/features/file-compatibility).

## How Voltecx earns your trust

You will want to know why a number is right before you rely on it. Three habits help:

1. **Use the second solver.** The reference solver is simple on purpose. If both solvers agree on your circuit, a solver bug is unlikely to be the cause of a surprise.
2. **Read the accuracy report.** The test suite compares both solvers with closed-form answers, with values from named data sheets and with waveforms computed by ngspice for the same netlists. The latest report lists 22 of 22 comparisons within tolerance, and each row names its reference.
3. **Read the not-checked list.** Reports from the design tools list the requirements they did not check, and mark estimates (EMI, layout, prices) as estimates.

## Where to go next

- [Simulation](https://voltecx-web.nguyenvanqui291.workers.dev/features/simulation): the two solvers and what they have been checked against.
- [Analyses](https://voltecx-web.nguyenvanqui291.workers.dev/features/analyses): sweeps, loop gain, losses, thermal and FFT.
- [Code generation](https://voltecx-web.nguyenvanqui291.workers.dev/features/code-generation): C99 for your controller.
- [File compatibility](https://voltecx-web.nguyenvanqui291.workers.dev/features/file-compatibility): every format, with its limits.
