Source code coming soon. The GitHub repository is private for now and opens to everyone very soon.
BetterSPICE Beta 0.8.0 Join the beta Download soon
Part VI  Parts and modelsReferenceContentsIndex
42

Transmission lines, PCB traces and cables

A transmission line carries a wave with a delay, so reflections, ringing and termination effects appear as on a real board or cable. BetterSPICE computes the line's impedance, delay and loss from its geometry, from a PCB trace to a coax cable, and simulates it with the same method of characteristics as ngspice's T element, with skin and dielectric loss.

A microstrip: cross section, geometry and the computed Z0, delay and loss.
Figure 42.1A microstrip: cross section, geometry and the computed Z0, delay and loss.
A differential microstrip pair: Zdiff, Zcm and delay.
Figure 42.2A differential microstrip pair: Zdiff, Zcm and delay.

42.1The two parts

The two parts
PartTypePinsCross sections
Transmission linetline (T)A+, A-, B+, B-. A- and B- are the reference (return) conductor of each end.ideal (Z0, delay), microstrip, stripline, cpwg (coplanar waveguide with ground), wire (over ground), pair, coax, twisted
Differential pairtline_diff (T)A1, A2, B1, B2, refA, refBmicrostrip, stripline, twisted (over ground), wires (parallel, over ground), ideal (Zodd, Zeven)

Place them from the library's Transmission lines family or Place›Transmission line. The cross section picker in the inspector changes the geometry. Changing it resets the geometry fields to that section's defaults but keeps the length, the loss fit frequency, the sections and the reference tie.

42.2The geometry fields

The geometry fields
ParameterKeyUnitDefaultRangeValue comes fromWhat it does
Lengthlenmideal 1, PCB 0.1 (cpwg 0.05), cables 1> 0Default, inspector, part fileEvery section.
Impedance Z0z0Ω50> 0Default, inspector, part fileIdeal.
Velocity factorvf0.66 (pair 0.5)0 to 1Default, inspector, part fileIdeal.
Delaytds0 (from length)≥ 0Default, inspector, part fileIdeal. Overrides vf.
Series R / shunt G per mr, gΩ/m, S/m0≥ 0Default, inspector, part fileIdeal.
Odd / even-mode Z0z0o, z0eΩ50, 70> 0Default, inspector, part fileIdeal pair. Zdiff = 2 Zodd, Zcm = Zeven / 2.
Trace widthwmmicrostrip 3 mm, stripline 0.24 mm, cpwg 1 mm, pairs 0.15 mm> 0Default, inspector, part file
Dielectric heighthmmicrostrip 1.6 mm, stripline 0.3 mm to each plane, cpwg 0.8 mm, wire 5 mm (centre above the plane)> 0Default, inspector, part file
Gap or spacingsmcpwg 0.2 mm to ground, pair 6 mm centre to centre, PCB pairs 0.2 mm edge to edge> 0Default, inspector, part file
Copper thicknesstm35 µm (diff stripline 18 µm)≥ 0Inspector, copper weight picker0 uses zero-thickness formulas and no conductor loss. 1 oz = 34.79 µm.
Dielectric εrerFR-4 4.5 (stripline 4.2), coax 2.25, twisted 2.3, air 11 to 300Default, inspector, part file
Loss tangenttandPCB 0.02, coax and twisted 2 x 10-4, wires 00 to 1Default, inspector, part file
Wire diameterdmwire and pair 1 mm, coax inner 0.81 mm, twisted 0.511 mm (AWG 24)> 0Inspector, AWG and mm² pickers
Insulationinsmtwisted 0.2 mm, others 0≥ 0Default, inspector, part file
Effective εrerefftwisted 2.0, others estimated0 to 300Default, inspector, part file0 estimates it from the insulation.
Dielectric diameterdoutm2.95 mm> dDefault, inspector, part fileCoax.
Shield thicknesstshm0.15 mm≥ 0Default, inspector, part fileCoax braid resistance.
Twists per mtwist1/m30≥ 0Default, inspector, part fileTwisted pair.
Loss fit frequencyflossHz100 MHz> 0Default, inspector, part fileWhere the transient loss is fitted, and where the calculator reports loss.
Sectionsnseg0 (automatic)0 to 64Default, inspector, part fileLossy lines are split into up to 16 sections automatically.
Reference tierrefΩ1 mΩ≥ 0Default, inspector, part fileTies A- to B-. 0 isolates the two ends as in SPICE.
ResistivityrhoΩ·m1.72 x 10-8 (copper)> 0File or All parameters

Key: the name in the circuit file, in a parameter step (R1.r) and for AI agents. Range: a value outside it is refused with E_PARAM. Value comes from: where you can set it. The All parameters tab and agents can set every parameter.

42.3The formulas

The formulas
Cross sectionMethod
MicrostripHammerstad and Jensen with thickness correction. 3 mm on 1.6 mm FR-4 gives about 50 Ω.
StriplineWheeler with thickness correction, centred trace.
Coplanar waveguideConformal mapping, conductor-backed, zero thickness.
Wire over ground60 acosh(2h / d) Ω in air, with the insulation's effect.
Pair, twisted pair120 acosh(s / d) Ω in air. Twisted defaults give about 100 Ω and a velocity factor of 0.705.
Coax60 / √εr · ln(dout / d). The defaults are RG-58: 50 Ω, velocity factor 0.667.
Differential microstripKirschning and Jansen.
Differential striplineCohn.

Conductor loss has a DC resistance and a skin term that grows with √f. Dielectric loss grows with frequency through the loss tangent. The inspector's Computed block shows Z0 (or Zdiff, Zodd, Zeven and Zcm), εeff, velocity factor, delay per metre and total, L, C and R per metre, and loss in dB at the fit frequency, with warnings when a formula is outside its fitted range.

A coax cable: the defaults are RG-58, about 50 Ω and 5 ns per metre.
Figure 42.3A coax cable: the defaults are RG-58, about 50 Ω and 5 ns per metre.

42.4Reflections

Reflections
Far-end terminationWhat returns to the source after the round trip
OpenThe step doubles.
ShortThe step inverts back to zero.
Resistor ZLA reflection of (ZL - Z0) / (ZL + Z0).
Matched (ZL = Z0)No reflection.
Try it
See a reflection
  1. Open Transmission lines, the open-end example, or place a pulse source with 50 Ω in series, a 1 m coax and nothing at the far end.
  2. Probe both ends and simulate 50 ns with a 50 ps maximum step.

You should seeThe near end steps to half, the far end jumps to the full value 5 ns later, and the near end reaches the full value after 10 ns. Put 50 Ω at the far end and the near end steps once to half and stays.

42.5Simulation

  • Transient: the exact method of characteristics, as ngspice's T element. Arriving edges are breakpoints, so they aren’t smeared. The timestep is limited to the line delay only while waves are travelling.
  • Loss: the line is split into sections with lumped resistance, skin cells and dielectric cells fitted at floss, so the DC resistance and the loss at floss are exact.
  • AC: the exact lossy two-port at every frequency.
  • DC: the line is a wire with its resistance.
  • A line shorter than about 0.2 mm (under 1 ps of delay) acts as a wire and doesn’t slow the simulation.
  • Exported to ngspice as T, LTRA or a ladder of R, L, C and T elements, so Simulate and the netlist export include it.

Command line: bspice tline-calc microstrip w=3m h=1.6m er=4.5 len=0.1 prints the same numbers, and bspice tline-calc board.bsc --part T1 computes a line from a circuit. 3m is 3 mm (milli).