|
TraceMaker
C++ API of the engine
|
Closed-form transmission-line impedance for PCB traces (design doc 15 §5.3) and the IPC-2221 width for current (§5.4). More...
Go to the source code of this file.
Classes | |
| struct | tmk::crules::imp::Line |
| struct | tmk::crules::imp::Pair |
| struct | tmk::crules::imp::Solved |
Namespaces | |
| namespace | tmk |
| namespace | tmk::crules |
| namespace | tmk::crules::imp |
Enumerations | |
| enum class | tmk::crules::imp::Structure : std::uint8_t { tmk::crules::imp::Microstrip , tmk::crules::imp::Stripline , tmk::crules::imp::Gcpw } |
Functions | |
| Line | tmk::crules::imp::microstrip (Coord w, Coord h, Coord t, double er) |
| Microstrip: strip of width w and thickness t on a dielectric of height h (strip bottom to plane), εr er. | |
| Line | tmk::crules::imp::stripline (Coord w, Coord h1, Coord h2, Coord t, double er) |
| Stripline between two planes: h1 dielectric from the upper plane to the strip, h2 from the strip to the lower plane (the plane spacing is h1 + t + h2); symmetric when h1 == h2. | |
| Pair | tmk::crules::imp::coupled_microstrip (Coord w, Coord s, Coord h, Coord t, double er) |
| Edge-coupled microstrip: two strips of width w, edge-to-edge gap s. | |
| Pair | tmk::crules::imp::coupled_stripline (Coord w, Coord s, Coord h1, Coord h2, Coord t, double er) |
| Edge-coupled stripline (broadside layout not modelled). | |
| Line | tmk::crules::imp::gcpw (Coord w, Coord g, Coord h, Coord t, double er) |
| Grounded (conductor-backed) coplanar waveguide: strip w, gap g to the coplanar ground on both sides, plane at h. | |
| double | tmk::crules::imp::ipc2141_microstrip (Coord w, Coord h, Coord t, double er) |
| IPC-2141A's simple forms (the industry rule of thumb, ±5-10 %), used only as an independent cross-check. | |
| double | tmk::crules::imp::ipc2141_stripline (Coord w, Coord b, Coord t, double er) |
| b = plane spacing, strip centred | |
| double | tmk::crules::imp::prop_delay_ps_per_mm (double eps_eff) |
| Propagation delay in ps/mm for an effective permittivity: sqrt(eps_eff) / c. | |
| double | tmk::crules::imp::k_ratio (double k) |
| Complete elliptic integral ratio K(k) / K(k'), k' = sqrt(1 - k^2), by the arithmetic-geometric mean (K(k) = pi / (2 AGM(1, k'))). | |
| Solved | tmk::crules::imp::solve_monotone (const std::function< double(Coord)> &z_of, double target, Coord lo, Coord hi, bool decreasing) |
| Bisection on integer nm for a function that decreases (decreasing = true, e.g. | |
| const char * | tmk::crules::imp::structure_name (Structure s) |
| double | tmk::crules::imp::formula_error_pct (Structure s, bool differential, bool asymmetric) |
| Formula error stated in the report, percent (doc 15 §5.3 point 3; dev/assumptions-m13.md). | |
| Coord | tmk::crules::imp::width_for_current (double amps, double delta_t_c, Coord copper, bool external) |
| IPC-2221B §6.2 (from the IPC-D-275 charts): I = k * dT^0.44 * A^0.725, A cross-section in mil^2, k = 0.048 external / 0.024 internal layers. | |
| double | tmk::crules::imp::current_for_width (Coord width, double delta_t_c, Coord copper, bool external) |
Variables | |
| constexpr double | tmk::crules::imp::kEta0 = 376.730313668 |
| free-space wave impedance, ohm | |
| constexpr double | tmk::crules::imp::kC0MmPerPs = 0.299792458 |
| speed of light, mm/ps | |
Closed-form transmission-line impedance for PCB traces (design doc 15 §5.3) and the IPC-2221 width for current (§5.4).
Quasi-static (no dispersion: the targets are 45-100 ohm lines below a few GHz), lossless, no solder mask (it lowers outer-layer impedance by roughly 1-3 ohm; KiCad's calculator also leaves it off by default). Geometry in integer nanometres; impedances in ohm.
Models (each cited at its definition in impedance.cpp): microstrip Hammerstad & Jensen 1980, with their finite-thickness correction stripline Cohn 1954 (wide strip, thick) / Wheeler 1978 (narrow strip), asymmetric by the image split of Wadell 1991 §3.5.3 (two virtual centred striplines in parallel) coupled microstrip Kirschning & Jansen 1984 static even/odd mode, Jansen 1978 thickness correction, Bahl & Garg 1977 thickness filling-factor term coupled stripline Cohn 1955 zero-thickness even/odd, Cohn 1960 thickness correction, asymmetric by the same image split grounded coplanar Ghione & Naldi 1983/1984 conformal mapping, Gupta et al. 1996 thickness correction Solving for a width or gap is a bisection on integer nanometres: deterministic and exact to 1 nm.
Definition in file impedance.hpp.