rizer.electrical_model.circuit.transmission_line_circuit#

Classes#

TransmissionLineResistiveCircuit

Nanosecond Repetitive Pulsed (NRP) discharge circuit.

TransmissionLineRCLoadCircuit

Transmission line terminated by a capacitor in parallel with the plasma resistance.

TransmissionLineCapacitiveSourceResistiveLoadCircuit

Transmission line with a capacitor at the source's own output node, resistive load.

TransmissionLineParallelCapacitiveSourceResistiveLoadCircuit

Transmission line with a capacitor in parallel with R_g itself, resistive load.

Functions#

build_transmission_line_circuit(...)

Build the resistive-load transmission-line circuit matching source's own type.

Module Contents#

class rizer.electrical_model.circuit.transmission_line_circuit.TransmissionLineResistiveCircuit(source: rizer.electrical_model.components.source_circuit.ResistiveSourceCircuit, cable: rizer.electrical_model.components.cable.IdealCable, include_reflections: bool)#

Nanosecond Repetitive Pulsed (NRP) discharge circuit.

The circuit models a pulsed voltage generator connected to a plasma load through an ideal transmission line. It is used for sub-microsecond pulsed plasma applications where wave propagation and multiple reflections along the cable matter.

Topology:

[Generator] ----[Ideal cable]----[Plasma load :math:`R_p(t)`]
   :math:`R_g`         :math:`Z_c, L, c`
   :math:`V_g(t)`

The generator has a purely resistive internal impedance \(R_g\) and a time-dependent open-circuit voltage \(V_g(t)\). The cable is lossless, with characteristic impedance \(Z_c\), length \(L\), and wave speed \(c\). The plasma is represented as a time-varying resistance \(R_p\) at the far end of the line.

At the generator–cable junction:

\[\alpha_g = \frac{Z_c}{Z_c + R_g}, \qquad \Gamma_g = \frac{R_g - Z_c}{R_g + Z_c}\]

where \(\alpha_g\) is the voltage attenuation coefficient and \(\Gamma_g\) is the reflection coefficient. The plasma-end reflection coefficient \(\Gamma_p\) is computed by Γ_p().

The plasma terminal voltage is computed with the SPICE-style traveling-wave recursion (Branin’s method of characteristics for an ideal line, [Branin1967]): the incident wave at the plasma end is

\[a(t) = \alpha_g V_g(t) + \Gamma_g \, b(t - \tau), \qquad b(t) = \Gamma_p(t) \, a(t), \qquad V_p(t) = (1 + \Gamma_p)\, a(t)\]

with \(\tau = 2L/c\). Only one round trip of the reflected wave is buffered; unrolling the recursion reproduces the bounce-diagram Neumann series to infinite order, so all reflections are included exactly whenever include_reflections=True – no separate count is needed. O(1) work per evaluation, O(round-trip) memory. The recursion is a contraction (\(|\Gamma_g \Gamma_p| < 1\) for any passive load), so interpolation errors decay instead of accumulating.

Parameters:
  • source (ResistiveSourceCircuit) – Voltage source with a constant series resistance R_g (e.g. a TrapezoidalGenerator behind some R_g).

  • cable (IdealCable) – Ideal lossless transmission line between the generator and the plasma.

  • include_reflections (bool) – Whether to include cable reflections in the plasma voltage computation. False returns the direct (non-reflected) contribution only.

References

[Branin1967]

F. H. Branin, Transient analysis of lossless transmission lines, Proc. IEEE 55 (1967) 2012-2013.

source#
generator#

The source’s own open-circuit voltage waveform.

cable#
include_reflections#

Whether to include cable reflections in the plasma voltage computation.

R_g#
Z_c#
alpha_g#
Γ_g#
round_trip_time#

Cable round-trip time \(\tau = 2L/c\) [s].

compute_plasma_voltage(t: float, R_p: float) → float#

Plasma terminal voltage, with or without cable reflections.

The incident wave from the generator is attenuated by \(\alpha_g\) and may reflect back and forth between the generator (\(\Gamma_g\)) and the plasma (\(\Gamma_p\)) ends. Each round trip introduces a delay \(\tau = 2L/c\).

If self.include_reflections is False, only the first forward wave is retained:

\[V_p(t) = \alpha_g \, V_g(t)\]

If True, the traveling-wave recursion (see TransmissionLineResistiveCircuit) includes all reflections exactly, to infinite order. The result is multiplied by the transmission coefficient \(2 R_p / (R_p + Z_c)\).

Each call appends the reflected wave at t to the internal one-round-trip buffer, so it can be interpolated when evaluating the recursion at a later time.

Parameters:
  • t (float) – Time, in seconds.

  • R_p (float) – Plasma resistance at time t, in Ohm.

Returns:

Plasma terminal voltage, in Volts.

Return type:

float

Raises:
generator_voltage(t: float) → float#

Return the source’s own open-circuit voltage at t, before cable attenuation.

Γ_p(R_p: float) → float#

Reflection coefficient at the plasma end.

Parameters:

R_p (float) – Plasma resistance in Ohm.

Returns:

Reflection coefficient at the plasma end, dimensionless.

Return type:

float

Notes

The reflection coefficient at the plasma end is given by:

\[\Gamma_p = \frac{R_p - Z_c}{R_p + Z_c}\]

where:

  • \(R_p\) is the plasma resistance in Ohm,

  • \(Z_c\) is the cable characteristic impedance in Ohm.

field_ratio(t: float, v_ref: float, fraction: float) → float | None#

Ratio of the generator voltage at t to a significance level.

\[\rho(t) = \frac{|V_g(t)|}{\text{fraction} \cdot v_{ref}}\]

A field-rebound switch condition (“has a new pulse/field become significant”) is a fact about this circuit’s own driving generator, not composite-level context — evaluated here rather than reconstructed by a caller reaching into self.generator (shared with TransmissionLineRCLoadCircuit.field_ratio, identical for any load).

Warning

UNREVIEWED PHYSICS (rizer/adaptive_models/PHYSICS.md, section 6.4). The equations above and their implementation have not been validated by a human: do not use results from this trigger for design decisions or publication. Open findings: BUG-03.

Reviewed-by: nobody yet – set the class attribute reviewed_by (rizer.adaptive_models.review) to sign off.

Parameters:
  • t (float) – Time, in seconds.

  • v_ref (float) – Reference voltage (e.g. the generator’s peak voltage), in Volts. Non-positive values disable the check (see Returns).

  • fraction (float) – Fraction of v_ref above which the field counts as significant, dimensionless.

Returns:

\(\rho(t)\), or None when v_ref <= 0 (no reference level to compare against).

Return type:

float or None

class rizer.electrical_model.circuit.transmission_line_circuit.TransmissionLineRCLoadCircuit(source: rizer.electrical_model.components.source_circuit.ResistiveSourceCircuit, cable: rizer.electrical_model.components.cable.IdealCable, C: float, window_span: float, include_reflections: bool = True, R_para: float = 0.0, r_p_rtol: float = DEFAULT_R_P_RTOL, u_c_0: float = 0.0)#

Transmission line terminated by a capacitor in parallel with the plasma resistance.

[Generator] ----[Ideal cable]----+--[R_para]--+----[C]----+
   R_g              Z_c, L, c    |            |           |
   V_g(t)                                   [R_p(t)]    (parallel; u_p = u_c)

Looking from the load backward into the line, the generator and cable behave as a Thevenin source with open-circuit voltage \(2a(t)\) (\(a(t)\) the incident wave) and series resistance \(Z_c\) – a standard transmission-line result. An optional parasitic resistance R_para sits in series between the cable’s end and the C | R_p node (independent of R_g, which stays at the generator end and only affects \(\alpha_g\)/\(\Gamma_g\)). Solving the two boundary KCL relations simultaneously (current from the cable into R_para equals current into the C | R_p node) gives, for the load’s own voltage \(u_c\) (the plasma voltage):

\[C\,\frac{du_c}{dt} = \frac{2a(t) - u_c\left(1+\dfrac{Z_c+R_{para}}{R_p(t)}\right)} {Z_c+R_{para}}, \qquad b(t) = \frac{a(t)\,(R_{para}-Z_c) + Z_c\,u_c(t)}{Z_c+R_{para}}\]

with \(a(t) = \alpha_g V_g(t) + \Gamma_g\,b(t-\tau)\) (unchanged from TransmissionLineResistiveCircuit) fed back into a one-round-trip wave buffer. At \(R_{para}=0\) this is exactly compute_derivatives_driven() with \(R_{par}=Z_c\), \(u_{mes}(t)=2a(t)\), and \(b(t)=u_c(t)-a(t)\).

Unlike a purely resistive load, the reflected wave now depends on the load’s own ODE state, not just on the instantaneous incident wave – the boundary condition is a genuine delay differential equation (DDE). This class solves it by the method of steps: window_span-long re-solves of the load’s ODE (via DrivenCircuitAdapter), each window only ever needing already-finalized wave-buffer history from at least one round trip ago – which is why window_span must not exceed the cable round trip (see Raises).

If include_reflections=False, \(a(t) = \alpha_g V_g(t)\) only: no delayed-feedback term, so there is no DDE and no causality constraint in that mode – the load’s own RC ODE is still solved (C still matters), just decoupled from the wave buffer.

Parameters:
  • source (ResistiveSourceCircuit) – Voltage source with a constant series resistance R_g.

  • cable (IdealCable) – Ideal lossless transmission line between the generator and the load.

  • C (float) – Capacitance in parallel with the plasma resistance [F].

  • window_span (float) – Length of each re-solved window [s], passed to DrivenCircuitAdapter. Must be <= the cable round trip when include_reflections=True.

  • include_reflections (bool, optional) – Whether to include cable reflections. Default True.

  • R_para (float, optional) – Additional parasitic resistance [Ohm] in series between the cable’s end and the C | R_p node, independent of R_g. Default 0.0 (the load sits directly at the cable’s end, the original topology).

  • r_p_rtol (float, optional) – Relative tolerance on R_p drift within a window before it is forced to re-solve, passed to DrivenCircuitAdapter. Default 1e-3.

  • u_c_0 (float, optional) – Initial voltage across the capacitor (and across the plasma) at t=0 [V]. Default 0 V.

Raises:
  • TypeError – If source is not a ResistiveSourceCircuit, cable is not an IdealCable, or include_reflections is not a bool.

  • ValueError – If include_reflections is True and window_span exceeds the cable round trip, or R_para is negative.

source#
generator#
cable#
R_g#
Z_c#
R_para = 0.0#
include_reflections = True#

Whether to include cable reflections in the plasma voltage computation.

compute_plasma_voltage(t: float, R_p: float) → float#

Plasma terminal voltage, drop-in for the same call TransmissionLineResistiveCircuit answers.

No DrivenCircuitAdapter wrapping is needed by the caller – this class already wraps its own internal RC_Rp_Circuit with one.

Parameters:
  • t (float) – Time, in seconds.

  • R_p (float) – Plasma resistance at time t, in Ohm.

Returns:

Plasma terminal voltage, in Volts.

Return type:

float

generator_voltage(t: float) → float#

Return the source’s own open-circuit voltage at t, before cable attenuation.

field_ratio(t: float, v_ref: float, fraction: float) → float | None#

Ratio of the generator voltage at t to a significance level; see _field_ratio.

class rizer.electrical_model.circuit.transmission_line_circuit.TransmissionLineCapacitiveSourceResistiveLoadCircuit(source: rizer.electrical_model.components.source_circuit.CapacitiveSourceCircuit, cable: rizer.electrical_model.components.cable.IdealCable, window_span: float, include_reflections: bool = True, r_p_rtol: float = DEFAULT_R_P_RTOL)#

Bases: _SourceCapacitorCircuit

Transmission line with a capacitor at the source’s own output node, resistive load.

[Generator] --[R_g]--+--[C_s]--+----[Ideal cable: Z_c, L, c]----[R_p(t)]
   V_g(t)                    (node S, voltage u_s = a_s + b_s)

Unlike TransmissionLineRCLoadCircuit (capacitor at the load end), the capacitor sits at the generator end. With no cable, this distinction would not exist – there would be only one electrical node, and this topology would collapse to DirectRCLoadCircuit with R_para=0. With a cable, the two ends are genuinely different circuits.

Let \(a_s(t)\)/\(b_s(t)\) be the waves launched/returning at node S and \(\tau=2L/c\) the cable round trip. \(u_s = a_s + b_s\) and the current launched into the cable is \((a_s-b_s)/Z_c\) (the same boundary relation used at the load end throughout this module). Kirchhoff’s current law at node S gives:

\[C_s\,\frac{du_s}{dt} = \left[\frac{V_g(t)}{R_g} + \frac{2\,b_s(t)}{Z_c}\right] - u_s(t)\left(\frac{1}{R_g}+\frac{1}{Z_c}\right)\]

solved by RC_Source_Circuit. The plasma resistance does not appear in this ODE directly – it only enters through the load’s reflection. Re-deriving this the same way TransmissionLineResistiveCircuit’s own recursion is derived (its module-level docstring), the plasma-facing wave \(a_s(t)\) – defined so it is used directly, at the same t, to report \(V_p(t)\), the same retarded-time convention every circuit in this module already uses – satisfies:

\[a_s(t) = u_s(t) - \Gamma_p(t-\tau)\,a_s(t-\tau), \qquad b_s(t) = \Gamma_p(t-\tau)\,a_s(t-\tau)\]

i.e. both the plasma’s reflection coefficient and the wave it reflects are needed a full round trip in the past – the same single depth \(\tau\) every other circuit in this module already buffers, not a shorter one (a from-scratch independent-DDE cross-check pins this down – see the class’s own test file). Mirroring TransmissionLineRCLoadCircuit’s own _reflected_wave exactly, this class buffers the single combined quantity \(q(t) := \Gamma_p(t)\,a_s(t)\) (not \(\Gamma_p\) and \(a_s\) separately), retrieved as \(q(t-\tau)\) for both the drive term and \(a_s\)’s own definition above. window_span must therefore be <= the cable round trip, the same bound as TransmissionLineRCLoadCircuit.

Reporting the plasma voltage uses \(a_s(t)\) directly (no further shift, per the retarded-time convention above): \(V_p(t) = \dfrac{2R_p}{R_p+Z_c}\,a_s(t)\).

If include_reflections=False, \(b_s(t) \equiv 0\) (the source’s own capacitor still charges through \(R_g\) and \(Z_c\), just decoupled from any returning wave), and \(a_s(t) = u_s(t)\) directly.

Parameters:
  • source (CapacitiveSourceCircuit) – Voltage source with series resistance R_g and a capacitor C_s at its own output node.

  • cable (IdealCable) – Ideal lossless transmission line between the source and the load.

  • window_span (float) – Length of each re-solved window [s], passed to DrivenCircuitAdapter. Must be <= the cable round trip when include_reflections=True.

  • include_reflections (bool, optional) – Whether to include the load’s reflected wave in the source’s own charging dynamics. Default True.

  • r_p_rtol (float, optional) – Relative tolerance on R_p drift within a window before it is forced to re-solve, passed to DrivenCircuitAdapter. Default 1e-3.

Raises:
  • TypeError – If source is not a CapacitiveSourceCircuit, cable is not an IdealCable, or include_reflections is not a bool.

  • ValueError – If include_reflections is True and window_span exceeds the cable round trip.

generator_voltage(t: float) → float#

Return the source’s own open-circuit voltage at t, before the R_g/C_s node.

class rizer.electrical_model.circuit.transmission_line_circuit.TransmissionLineParallelCapacitiveSourceResistiveLoadCircuit(source: rizer.electrical_model.components.source_circuit.ParallelCapacitiveSourceCircuit, cable: rizer.electrical_model.components.cable.IdealCable, window_span: float, include_reflections: bool = True, r_p_rtol: float = DEFAULT_R_P_RTOL)#

Bases: _SourceCapacitorCircuit

Transmission line with a capacitor in parallel with R_g itself, resistive load.

[Generator] --+--[R_g]--+----[Ideal cable: Z_c, L, c]----[R_p(t)]
   V_g(t)      |         |  (node N, voltage u_N = a_s + b_s)
              [C_s]------+

Unlike TransmissionLineCapacitiveSourceResistiveLoadCircuit (C_s shunting node N to ground), here C_s bridges directly from the generator’s own ideal terminal to node N, in parallel with R_g.

Let \(u_c(t)\) be the voltage across the R_g/C_s pair (from the generator’s terminal to node N), so \(u_N(t) = V_g(t) - u_c(t)\). With \(a_s(t)\)/\(b_s(t)\) the waves launched/returning at node N and \(\tau=2L/c\) the cable round trip, \(u_N = a_s + b_s\) and the current launched into the cable is \((a_s-b_s)/Z_c\) (the same boundary relation used at the load end throughout this module). The current through C_s (from the generator’s terminal to node N) is \(C_s\,du_c/dt\), identical to the current through R_g in the same direction (\(u_c/R_g\)), since the two are in parallel between the same two terminals. Kirchhoff’s current law at node N gives:

\[C_s\,\frac{du_c}{dt} = \frac{V_g(t)}{Z_c} - \frac{2\,b_s(t)}{Z_c} - u_c(t)\left(\frac{1}{Z_c}+\frac{1}{R_g}\right)\]

the same ODE RC_Source_Circuit already solves for TransmissionLineCapacitiveSourceResistiveLoadCircuit – only the drive term differs (there, \(V_g/R_g + 2b_s/Z_c\); here, \(V_g/Z_c - 2b_s/Z_c\)), since u_c is a branch voltage (across C_s) rather than a node-to-ground voltage. Reused directly.

Following the same retarded-time convention validated throughout this module (the plasma-facing wave used directly, at the same t, to report \(V_p(t)\)):

\[a_s(t) = \left[V_g(t) - u_c(t)\right] - \Gamma_p(t-\tau)\,a_s(t-\tau), \qquad b_s(t) = \Gamma_p(t-\tau)\,a_s(t-\tau)\]

buffered as the single combined quantity \(q(t) := \Gamma_p(t)\,a_s(t)\), retrieved as \(q(t-\tau)\), exactly mirroring TransmissionLineCapacitiveSourceResistiveLoadCircuit’s own _q_wave. window_span must therefore be <= the cable round trip, the same bound as that class.

As an independent check on this derivation: in the \(C_s \to 0\) limit, the du_c/dt term vanishes and the KCL above becomes an algebraic balance whose solution is \(a_s(t) = \alpha_g\,V_g(t) + \Gamma_g\,b_s(t)\) – exactly TransmissionLineResistiveCircuit’s own recursion (with \(b_s(t)\) here playing the role of that recursion’s \(b(t-\tau)\), since \(b_s(t)\) is already defined as the wave returning a full round trip later).

Reporting the plasma voltage uses \(a_s(t)\) directly (no further shift): \(V_p(t) = \dfrac{2R_p}{R_p+Z_c}\,a_s(t)\).

If include_reflections=False, \(b_s(t) \equiv 0\) and \(a_s(t) = V_g(t) - u_c(t)\) directly.

Parameters:
  • source (ParallelCapacitiveSourceCircuit) – Voltage source with series resistance R_g and a capacitor C_s in parallel with R_g itself.

  • cable (IdealCable) – Ideal lossless transmission line between the source and the load.

  • window_span (float) – Length of each re-solved window [s], passed to DrivenCircuitAdapter. Must be <= the cable round trip when include_reflections=True.

  • include_reflections (bool, optional) – Whether to include the load’s reflected wave in the source’s own charging dynamics. Default True.

  • r_p_rtol (float, optional) – Relative tolerance on R_p drift within a window before it is forced to re-solve, passed to DrivenCircuitAdapter. Default 1e-3.

Raises:
  • TypeError – If source is not a ParallelCapacitiveSourceCircuit, cable is not an IdealCable, or include_reflections is not a bool.

  • ValueError – If include_reflections is True and window_span exceeds the cable round trip.

generator_voltage(t: float) → float#

Return the source’s own open-circuit voltage at t, before the R_g/C_s network.

rizer.electrical_model.circuit.transmission_line_circuit.build_transmission_line_circuit(source: rizer.electrical_model.components.source_circuit.SourceCircuit, cable: rizer.electrical_model.components.cable.IdealCable, include_reflections: bool, window_span: float | None = None, r_p_rtol: float = DEFAULT_R_P_RTOL) → rizer.electrical_model.circuit.base_circuit.PlasmaVoltageCircuit#

Build the resistive-load transmission-line circuit matching source’s own type.

Covers only the resistive-load side of this module’s dispatch (a TransmissionLineRCLoadCircuit load, and the no-cable Direct*Circuit variants, are a separate, orthogonal axis with their own kwargs – not handled here). Dispatches on type(source):

Parameters:
  • source (SourceCircuit) – One of the three concrete types listed above (any other raises TypeError).

  • cable (IdealCable) – Ideal lossless transmission line between the source and the load.

  • include_reflections (bool) – Whether to include cable reflections in the plasma voltage computation.

  • window_span (float, optional) – Length of each re-solved window [s], passed to DrivenCircuitAdapter. Required when source is stateful (the two capacitive variants).

  • r_p_rtol (float, optional) – Relative tolerance on R_p drift within a window before it is forced to re-solve, passed to DrivenCircuitAdapter. Default 1e-3.

Return type:

PlasmaVoltageCircuit

Raises:
  • TypeError – If source is not one of the three types above.

  • ValueError – If source is stateful and window_span is not given.