kicad2ems documentation

kicad2ems converts a KiCad board into a model, solves it with gfdtd or openEMS (3D FDTD), mom25d (2.5D method of moments) or a transmission-line model, and writes S-parameters, antenna results, field images and a report.

Using kicad2ems

Page

Contents

Getting started

Installing, checking the install, a first run, preparing your own board

Usage

The command line, config files, choosing solvers, every option, the output files

GUI

The graphical interface: settings, running, results, field views

Signal integrity

Crosstalk between traces: NEXT and FEXT for an edge, and what in the layout makes it; a bus’s coupling a layer at a time

Time domain

A channel’s TDR, step response and eye for a bit pattern, from its S-parameters’ passive macromodel, ideal or IBIS buffers

Line parameters

R, L, G, C per metre over frequency of one line or N coupled lines (skin and proximity effect, a 2D eddy-current solve), W-element models and S-parameters, for every cross-section of a board’s nets

Conducted emission

A switching circuit through a CISPR network (LISN) in each supply line, read with peak, quasi-peak and average detectors against CISPR 32 or CISPR 25: margins, differential and common mode

Radiated EMC

The board’s radiated emission for a clock or data against CISPR 32 at a test site, and the voltage a plane wave puts on each port (IEC 61000-4-3), from each port’s far field on mom25d

Decoupling

The fewest capacitors at a rail’s decap sites that keep the impedance its loads see under the target, each at its DC bias, from one solve of the rail

Drop at temperature

A rail’s DC drop with its copper at the temperature it runs at, the board’s temperature from the copper’s and the parts’ loss, and both over time for a load profile

Whole-board studies

A large board in pieces (the Jetson Thor carrier, the LimeRFE): the settings and why, the checks, how to make each result again

KiCad plugin

In KiCad’s PCB editor: the impedance map of the open board, a region and ports, a simulation

Examples

The example boards and how the solvers compare on them

Results

S-parameters, antenna results, field dumps, the run summary and report

Benchmarks

Each solver’s run time and memory on each example, CPU and GPU

Solver matrix

Every example on every solver, scored against openEMS: curves, layouts, deviations

The solvers

Page

Contents

openEMS: meshing

How the FDTD mesh, boundaries and time step are chosen

openEMS: simulation

Materials, excitation, when a run stops, parallel and antenna runs

mom25d

The method-of-moments solver: what it models, ports, antennas, speed, GPU

gfdtd

The GPU FDTD solver: openEMS’s model on a GPU, from kicad2ems

Which solver

The solvers’ strengths and weaknesses, how close each comes to openEMS and how fast

Transmission-line model

Line sections, impedance formulas, the circuit solvers

The parts

Each part of kicad2ems, as it was described in its own repository before 0.4:

Page

Contents

mom25d

The 2.5D method of moments: the solver itself, its mesher and kernels

gfdtd

The FDTD engine: GPU, compiled CPU core and NumPy, openEMS’s interface

fdtd

The FDTD layer: openEMS and gfdtd on one shared FDTD model

fem

Palace and Elmer behind kicad2ems: capacitance, rail drop, temperature, coils

gui

The window’s code

ipc

The KiCad plugin’s code

dfsynth

Distributed filter synthesis

emsdev

The machine: GPUs, CPU threads, memory, the compilers

pcbqs

Power integrity, quasistatic fields, ngspice circuits, temperature (its pages)

Working on kicad2ems

Page

Contents

Architecture

The run pipeline, the solvers, the module map

APIs

Every interface between the parts: the Python APIs, the solvers and analyses, the files

KiCad import

What is read from a .kicad_pcb

The board model

The board every solver gets: stack, copper, vias, ports, parts

Testing

Running and extending the tests

Maintenance notes

openEMS quirks, adding an option or a solver, conventions

Conventions

  • Lengths are in mm. Frequencies are in GHz on the command line and in Hz in the code.

  • KiCad’s y axis points down; the model’s points up (y_model = -y_kicad). Messages give positions in KiCad coordinates, so you can find them in the PCB editor.

  • z = 0 is the bottom copper layer.