pcbqs¶
Part of kicad2ems since 0.4: the package
kicad2ems.pcbqs, installed with kicad2ems (pip install .in this repository; the README has the installer). Its history up to then is in this repository’s, and in its own repository. Install lines below that name.mean this repository.
PCB DC/power-integrity analysis, magneto-quasistatic and PEEC extraction, magnetic near fields, low-frequency S-parameters, and ngspice operational circuits with passive copper feedback.
pip install .
python -m kicad2ems.pcbqs.pdn --describe --json
python -m kicad2ems.pcbqs.mqs --describe --json
python -m kicad2ems.pcbqs.sparams board.kicad_pcb --fmin 1e3 --fmax 1e8 --out lf
python -m kicad2ems.pcbqs.circuit --template boost > boost.json
python -m kicad2ems.pcbqs.circuit boost.json --out result
python -m kicad2ems.pcbqs.circuit src/pcbqs/data/wpthb_bridge.json --out wpthb # the wpthb full bridge
JSON-based solving, layout/mesh export and field reconstruction work without
mom25d and without kicad2ems’s board model, pipeline and window: pcbqs’s
numerics import from kicad2ems.core only its shared leaf modules (units,
constants, touchstone, fields.dumps), which import nothing from kicad2ems
(tests/pcbqs/test_standalone.py holds it to that). A .kicad_pcb is read
through kicad2ems’s importers (pcbqs/_cli.py), and pcbqs/analyses.py is the
tools as kicad2ems’s analyses: the two modules that may import the rest.
In kicad2ems the four tools are its analyses (pcbqs/analyses.py, listed in
kicad2ems.core.analyses.ANALYSES) and kicad2ems.pcbqs.sparams one of its
S-parameter solvers (kicad2ems.core.solvers: --solvers pcbqs): kicad2ems --check lists them, a config keeps a study’s under [analysis], and
kicad2ems-gui builds each one’s settings from its options table, runs it and
shows what its result folder holds: the maps as field dumps in its Viewer, the
report and the curves (pcbqs/reports.py) on its Results page. The circuit
examples are configs beside their models (circuit/examples/*.toml), under its
File > Examples > Circuits. Install ngspice separately for operational circuits.
Component models and parasitics are explicit assumptions; footprints do not
imply calibrated models.
The compiled core is needed: it meshes (the constrained Delaunay triangulation of
src/kicad2ems/emsdev/native/mesh2d.hpp) and holds the
CPU kernels. Build it with pip install '.[core]' followed by python -m kicad2ems.pcbqs.core.build
(a C++17 compiler; the kicad2ems installer does this). The kernels keep their NumPy/threaded
fallbacks (PCBQS_NO_CORE); the mesher has none.
Execution controls use PCBQS_FILL_BACKEND, PCBQS_FILL_THREADS,
PCBQS_OMP_THREADS, PCBQS_NO_CORE and PCBQS_ARCH; general OpenMP settings
remain supported. Another static-fill backend is registered with
register_fill_backend.
Decoupling chosen to a target impedance:
pcbqs.pdn --choose-decaps, the fewest capacitors at a rail’s decap sites (fitted or not) that keep its loads under the target, at their DC biasLow-frequency S-parameters: a board’s ports from DC to a tenth of a wavelength, with the return current where it flows;
--solvers pcbqsin a kicad2ems run. Its example,examples/return-path/return_path.py: what a ground via’s place does to a layer changeCircuits: any circuit of parts, nodes and drives, by ngspice: its parts’ losses for the thermal analysis, its copper’s currents for the fields; ten examples, each with a board whose copper can be put in, and the wpthb full bridge; KiCad boards, schematics and netlists read into a model
Conducted emission: a circuit with a CISPR network (LISN) in each supply line, read by a CISPR 16-1-1 receiver (peak, quasi-peak, average) against CISPR 32’s or CISPR 25’s limits; the differential and common modes, the board’s capacitance to the reference plane
Temperature: a trial of a lightweight thermal solver on a grid
Drop at temperature: a rail’s DC drop with its copper at its temperature, the board’s temperature from both, and both over time for a load profile
Jetson AGX Thor PDN check: a real-board DC cross-check, cavity limitations, and a bounded local PEEC/skin comparison.
Experimental compressed backend: graded meshes, hierarchical current/charge operators and iterative solving.
The numerics pcbqs shares with mom25d (RWG functions, the mesher, the off-plane integrals,
Biot-Savart) are kicad2ems.emsdev.numerics, one copy; emsdev also supplies the hardware and
native-build services and the adaptive sweep’s fit (kicad2ems.emsdev.afs). pcbqs imports no
other part at run time; RF/full-wave solvers remain in mom25d.
Licence¶
GPL-3.0-or-later (see LICENSE), the mesher’s triangulation
(src/kicad2ems/emsdev/native/mesh2d.hpp) included.