kicad2ems.dfsynth.topologies

Filter topologies: each builder turns a Spec into a Design (dimensions, layout
geometry, the ideal TEM network of the synthesis and the microstrip network of
the layout).

    lowpass   stepped   stepped-impedance (alternating high / low impedance
              sections) stub      high-impedance lines with shunt open stubs
    highpass  stub      shunt short-circuited quarter-wave stubs (a wide stub
              band-pass, see below)
    bandpass  coupled   edge-coupled half-wave resonators (parallel-coupled
              lines) hairpin   the same, folded into U-shaped resonators
              endcoupled  gap-coupled half-wave resonators in line stub
              shunt short-circuited quarter-wave stubs, quarter-wave connecting
              lines (wide band)
    bandstop  stub      shunt open quarter-wave stubs, quarter-wave connecting
              lines

A builder takes two correction factors on top of the spec: kf scales the design
frequency (all lengths go as 1 / kf) and kb the design bandwidth. calibrate.py
sets them so the microstrip model lands on the spec, and the EM tuning in
validate.py updates them from a field solver.
class kicad2ems.dfsynth.topologies.Design(spec: kicad2ems.dfsynth.topologies.Spec, sub: object, kf: float, kb: float, geometry: kicad2ems.dfsynth.topologies.Geometry, ideal: list, model_fn: object, rows: list, g: list, notes: list = <factory>)[source]
class kicad2ems.dfsynth.topologies.FabViolation[source]
A note that a dimension is below the substrate's fabrication limits: the
CLI refuses such a design.
class kicad2ems.dfsynth.topologies.Geometry(polys: list = <factory>, vias: list = <factory>, ports: list = <factory>, W: float = 0.0, H: float = 0.0)[source]
finish(x_end, margin, port_in_y, port_out_y)[source]
Board from x = 0 to x_end, margin mm above and below the copper;
shift y so the board starts at 0; ports 0.5 mm inside the left / right
edges.
class kicad2ems.dfsynth.topologies.Spec(kind: str, topology: str, f0: float, bw: float = 0.0, response: str = 'chebyshev', order: int = 5, ripple: float = 0.1, z0: float = 50.0, zhigh: float = 0.0, zlow: float = 0.0, zstub: float = 0.0, feed: float = 0.0, trim: tuple = (), stub_angle: float = 60.0, hairpin_gap: float = 0.0)[source]
kicad2ems.dfsynth.topologies.bandpass_hairpin(spec, sub, kf=1.0, kb=1.0)[source]
Folded edge-coupled filter: resonator j's arms are the strips of sections
j-1 and j, joined by a bar; resonators alternate between opening up and
down, coupled-line feeds at both ends.
kicad2ems.dfsynth.topologies.bandpass_interdigital(spec, sub, kf=1.0, kb=1.0)[source]
Quarter-wave rods shorted at alternate ends, tapped feeds on the first
and last rods. The gaps and taps come from design curves extracted on the
multiconductor line model (_idg_tables): M_i,i+1 = FBW / sqrt(g_i g_i+1), Qe
= g0 g1 / FBW. spec.trim (calibrate.refine_coupled) scales the n - 1 gaps,
the two tap positions and the n rods' lengths.
kicad2ems.dfsynth.topologies.bandstop_radial(spec, sub, kf=1.0, kb=1.0)[source]
bandstop_stub with radial stubs: each fan resonates at f0 with the
reactance slope of the quarter- wave stub it replaces, (pi / 4) Z_k (its
angle sets the slope, its radius the resonance). Radial stubs are
low-impedance stubs, so this suits wide stop bands.
kicad2ems.dfsynth.topologies.bandstop_stub(spec, sub, kf=1.0, kb=1.0)[source]
Open quarter-wave stubs a quarter wave apart on a Z0 line (_bandstop).
kicad2ems.dfsynth.topologies.highpass_band(spec)[source]
(f0, fbw) of the stub band-pass realising a high-pass from spec.f0 with
spec.bw of pass band above it (default: up to 3 x the cut-off).
kicad2ems.dfsynth.topologies.lowpass_radial(spec, sub, kf=1.0, kb=1.0)[source]
lowpass_stub with each capacitor a butterfly (two radial stubs of
spec.stub_angle, one each side): the pair has the stub's susceptance at the
cut-off, and each fan's resonance above it adds a transmission zero to the
stop band.
kicad2ems.dfsynth.topologies.lowpass_stub(spec, sub, kf=1.0, kb=1.0)[source]
Series high-impedance lines (the inductors, L first) with shunt open
stubs (the capacitors) at the junctions, the stubs alternating sides.
kicad2ems.dfsynth.topologies.prepare(spec)[source]
Adjust the spec to what its topology can realise (in place); returns
notes on what changed.
kicad2ems.dfsynth.topologies.radial_stub_range(sub, w, fd, angles=(160.0, 15.0))[source]
(low, high) ohm: the straight quarter-wave stubs whose reactance slope
fans of 160 and 15 degrees on a line of width w have at fd (a fan cannot be
a higher or lower impedance stub than these).
kicad2ems.dfsynth.topologies.stub_bpf_values(g, fbw, h, z0)[source]
Matthaei's short-circuited-stub band-pass: (stub impedances [n],
connecting-line impedances [n-1]), stubs and lines a quarter wave at the
centre frequency.