Skip to content

transmission_line

Transmission-line theory of the Traveling-wave electrode (pure functions).

The line the modulator's RF drive travels down, described on its own terms and with no modulator in sight: what a mode solve says about it (:class:RFLineParams, built by :func:line_params_from_neff or :func:line_params_from_gamma), what its per-unit-length circuit is (:func:rlgc_from_line_params, the Marks-Williams relations), how a lumped shunt branch loads it (:func:loaded_line_params, with the branch :func:gsim.common.junction.series_rc_from_admittance fits), and what a periodically loaded electrode behaves as — one period's two-port (:func:segmented_period_abcd), its Bloch constants (:func:segmented_line_params, :func:segmented_line) and how near the period sits to the Bragg condition (:func:bragg_fraction).

:func:section_abcd is the telegrapher two-port of one uniform section that the cascades here and the compact-model export of :mod:gsim.common.circuit are both assembled from.

Sign convention is the one gsim uses throughout: gamma = alpha + j beta with alpha >= 0 on a lossy line, and fields following exp(+i omega t).

Classes:

  • RFLineParams –

    RF transmission-line parameters versus frequency at one bias.

Functions:

RFLineParams

Bases: BaseModel

RF transmission-line parameters versus frequency at one bias.

Attributes:

  • freq_hz (NDArray[float64]) –

    RF frequencies in Hz (ascending).

  • n_rf (NDArray[float64]) –

    RF effective (phase) index per frequency.

  • alpha_rf_np_m (NDArray[float64]) –

    RF amplitude loss in Np/m per frequency.

  • z0_ohm (NDArray[complex128]) –

    Complex characteristic impedance in ohms per frequency.

  • unloaded (bool) –

    Whether these are the bare electrode's parameters — the cross-section solved with every carrier switched off — rather than a Bias point's answer.

  • bias_v (float | None) –

    The Bias the Cross-section was built at (V), when it was built from a Bias point; None for parameters that came from nowhere in particular (a hand-assembled line).

  • signal_contact (str | None) –

    Name of the Contact the RF drive is applied to, which names the conductor the impedance was read over; None when no Contact was involved.

Methods:

  • resampled –

    These parameters on another frequency grid.

  • validate_shapes –

    All arrays share the frequency axis; frequencies are positive.

gamma_per_m property

gamma_per_m: NDArray[complex128]

Complex propagation constant alpha + j beta in 1/m.

rlgc property

rlgc: dict[str, NDArray[float64]]

RLGC per-unit-length parameters (Marks-Williams relations).

resampled

resampled(freq_hz: ArrayLike) -> RFLineParams

These parameters on another frequency grid.

Linear interpolation of the index, the loss and the complex impedance — its real and imaginary parts separately — onto freq_hz, with the end values held outside the solved range rather than extrapolated. What an EO response grid and the SAX line model both read, so a frequency axis interpolates one way everywhere.

Parameters:

  • freq_hz (ArrayLike) –

    Frequencies to sample at (Hz, ascending, 1D).

Returns:

  • RFLineParams –

    The same line on the new grid, carrying the same Bias, signal

  • RFLineParams –

    Contact and loaded/unloaded flag.

Raises:

validate_shapes

validate_shapes() -> Self

All arrays share the frequency axis; frequencies are positive.

bragg_fraction

bragg_fraction(
    *,
    gamma_loaded_per_m: ArrayLike,
    gamma_unloaded_per_m: ArrayLike,
    fill_factor: float,
    period_m: float,
) -> NDArray[float64]

How near a segmented electrode's period sits to the Bragg condition.

The RF phase advance across one period — the loaded section's plus the unloaded one's — as a fraction of pi, where the reflections of successive periods add in phase and the periodic line stops propagating. Read off the sections rather than the Bloch constant, so it keeps rising past the Bragg condition instead of folding back into the first Brillouin zone. Far below one, the segmented electrode is the averaged line; approaching one, it is a filter.

Parameters:

  • gamma_loaded_per_m (ArrayLike) –

    Propagation constant of the loaded line (1/m).

  • gamma_unloaded_per_m (ArrayLike) –

    Propagation constant of the unloaded line (1/m).

  • fill_factor (float) –

    Loaded fraction of the period, 0 to 1.

  • period_m (float) –

    Length of one period (m, > 0).

Returns:

  • NDArray[float64] –

    The fraction, per frequency.

line_params_from_gamma

line_params_from_gamma(
    freq_hz: ArrayLike,
    gamma_per_m: ArrayLike,
    *,
    z0_ohm: ArrayLike,
    unloaded: bool = False,
    bias_v: float | None = None,
    signal_contact: str | None = None,
) -> RFLineParams

Build :class:RFLineParams from complex propagation constants.

The inverse of :attr:RFLineParams.gamma_per_m, for routes that produce gamma directly — the loaded-line assembly (:func:loaded_line_params) rather than a mode solve: n_RF = |Im(gamma)| c0 / omega and alpha = |Re(gamma)|, so either sign convention is read as loss.

Parameters:

  • freq_hz (ArrayLike) –

    RF frequencies in Hz.

  • gamma_per_m (ArrayLike) –

    Complex propagation constant per frequency (1/m).

  • z0_ohm (ArrayLike) –

    Characteristic impedance per frequency (complex allowed).

  • unloaded (bool, default: False ) –

    Flag the result as the bare electrode's.

  • bias_v (float | None, default: None ) –

    The Bias the Cross-section was built at (V), if any.

  • signal_contact (str | None, default: None ) –

    The Contact the impedance was read over, if any.

Returns:

line_params_from_neff

line_params_from_neff(
    freq_hz: ArrayLike,
    n_eff: ArrayLike,
    *,
    z0_ohm: ArrayLike,
    unloaded: bool = False,
    bias_v: float | None = None,
    signal_contact: str | None = None,
) -> RFLineParams

Build :class:RFLineParams from complex mode effective indices.

This is the extraction step shared by both solver routes: Palace BoundaryMode (PalaceTextResults.modes[m]["n_eff"] per frequency) and the femwell adapter (mode.n_eff) both deliver a complex effective index; beta = omega Re(n_eff) / c0 and alpha = omega |Im(n_eff)| / c0.

Parameters:

  • freq_hz (ArrayLike) –

    RF frequencies in Hz.

  • n_eff (ArrayLike) –

    Complex effective index per frequency (either sign convention for the imaginary part).

  • z0_ohm (ArrayLike) –

    Characteristic impedance per frequency (complex allowed), e.g. from Palace's impedance postprocessing or a Marks-Williams extraction.

  • unloaded (bool, default: False ) –

    Flag the result as the bare electrode's — solved with the carriers switched off — rather than a Bias point's.

  • bias_v (float | None, default: None ) –

    The Bias the Cross-section was built at (V), if any.

  • signal_contact (str | None, default: None ) –

    The Contact the impedance was read over, if any.

Returns:

loaded_line_params

loaded_line_params(
    freq_hz: ArrayLike,
    *,
    rlgc: dict[str, NDArray[float64]],
    junction: JunctionBranch | tuple[float, float],
) -> tuple[NDArray[complex128], NDArray[complex128]]

Load a line's shunt admittance with a series-RC junction branch.

The classic loaded-line assembly: the unloaded line's series impedance R + j omega L is unchanged, its shunt admittance G + j omega C gains the junction branch j omega C_j / (1 + j omega R_s C_j), and the loaded propagation constant and characteristic impedance follow from the telegrapher relations gamma = sqrt(ZY), Z_0 = sqrt(Z/Y).

Parameters:

  • freq_hz (ArrayLike) –

    Frequencies in Hz (> 0).

  • rlgc (dict[str, NDArray[float64]]) –

    Unloaded per-unit-length parameters — arrays R (ohm/m), L (H/m), G (S/m), C (F/m) on the frequency axis, as :func:rlgc_from_line_params returns them.

  • junction (JunctionBranch | tuple[float, float]) –

    The series-RC branch to insert, one (scalar) fit — as :meth:gsim.tcad.results.BiasPoint.junction_branch returns it.

Returns:

  • tuple[NDArray[complex128], NDArray[complex128]] –

    (gamma_per_m, z0_ohm) of the loaded line, per frequency.

rlgc_from_line_params

rlgc_from_line_params(
    freq_hz: ArrayLike, *, gamma_per_m: ArrayLike, z0_ohm: ArrayLike
) -> dict[str, NDArray[float64]]

RLGC per-unit-length parameters from gamma and Z_0.

Uses the telegrapher relations R + j omega L = gamma Z_0 and G + j omega C = gamma / Z_0 (Marks & Williams).

Parameters:

  • freq_hz (ArrayLike) –

    Frequencies in Hz.

  • gamma_per_m (ArrayLike) –

    Complex propagation constant alpha + j beta in 1/m.

  • z0_ohm (ArrayLike) –

    Complex characteristic impedance in ohms.

Returns:

  • dict[str, NDArray[float64]] –

    Dict with arrays R (ohm/m), L (H/m), G (S/m), C (F/m).

section_abcd

section_abcd(theta: ArrayLike, z0_ohm: ArrayLike) -> NDArray[complex128]

Telegrapher ABCD matrix of one uniform section of line.

The two-port [[cosh(theta), Z0 sinh(theta)], [sinh(theta) / Z0, cosh(theta)]] of a section whose complex electrical length is theta = gamma l. One section on its own is a uniform line; the cascades of this module are products of several.

Parameters:

  • theta (ArrayLike) –

    Complex electrical length gamma * l of the section; scalar or per-frequency.

  • z0_ohm (ArrayLike) –

    Characteristic impedance of the section (ohm), broadcast against theta.

Returns:

  • NDArray[complex128] –

    The matrices, shape (..., 2, 2) over the broadcast inputs.

segmented_line

segmented_line(
    loaded: RFLineParams, unloaded: RFLineParams, *, fill_factor: float, period_m: float
) -> RFLineParams

The periodic line a segmented Traveling-wave electrode behaves as.

Between period boundaries the segmented electrode is exactly a uniform line with the Bloch propagation constant and impedance (:func:segmented_line_params), so these parameters stand wherever a uniform line's do: in the report, and in the two-port of a whole number of periods.

Parameters:

  • loaded (RFLineParams) –

    The loaded line's parameters.

  • unloaded (RFLineParams) –

    The unloaded line's, on the same frequencies.

  • fill_factor (float) –

    Loaded fraction of the period, 0 to 1.

  • period_m (float) –

    Length of one period (m, > 0).

Returns:

  • RFLineParams –

    The Bloch propagation constant and impedance as line parameters,

  • RFLineParams –

    on the loaded line's frequencies and with its provenance.

Raises:

  • ValueError –

    When the two lines are not on one frequency axis.

segmented_line_params

segmented_line_params(
    *,
    gamma_loaded_per_m: ArrayLike,
    z0_loaded_ohm: ArrayLike,
    gamma_unloaded_per_m: ArrayLike,
    z0_unloaded_ohm: ArrayLike,
    fill_factor: float,
    period_m: float,
) -> tuple[NDArray[complex128], NDArray[complex128]]

Bloch propagation constant and impedance of a segmented electrode.

The periodic line of :func:segmented_period_abcd carries Bloch waves exp(-Gamma n) from one period to the next, with cosh(Gamma) = (A + D) / 2. That is solved here in the form

sinh^2(Gamma/2) = sinh^2((t_l + t_u)/2) + (Z_l - Z_u)^2 / (4 Z_l Z_u) sinh(t_l) sinh(t_u)

(t = gamma l of each section), which is the same equation without the cancellation cosh(Gamma) - 1 suffers for a period far below the wavelength — exactly where a segmented electrode operates. The passive branch is taken: Re(Gamma) >= 0, and Im(Gamma) >= 0 on a lossless line, so the wave decays the way it travels; the Bloch impedance is that wave's own, Z_B = B / sinh(Gamma), whose real part is positive on a passive line.

A fill factor of one returns the loaded line and a fill factor of zero the unloaded one, to rounding. For a period far below the wavelength the result tends to the line whose series impedance and shunt admittance are the length-weighted averages of the two lines'; the difference is second order in the phase advance per period — below 1e-3 relative while :func:bragg_fraction stays under 0.05.

Parameters:

  • gamma_loaded_per_m (ArrayLike) –

    Propagation constant of the loaded line (1/m); scalar or per-frequency.

  • z0_loaded_ohm (ArrayLike) –

    Characteristic impedance of the loaded line (ohm).

  • gamma_unloaded_per_m (ArrayLike) –

    Propagation constant of the unloaded line (1/m).

  • z0_unloaded_ohm (ArrayLike) –

    Characteristic impedance of the unloaded line (ohm).

  • fill_factor (float) –

    Loaded fraction of the period, 0 to 1.

  • period_m (float) –

    Length of one period (m, > 0).

Returns:

  • NDArray[complex128] –

    (gamma_per_m, z0_ohm) of the periodic line: the Bloch

  • NDArray[complex128] –

    propagation constant per meter and the Bloch impedance.

segmented_period_abcd

segmented_period_abcd(
    *,
    gamma_loaded_per_m: ArrayLike,
    z0_loaded_ohm: ArrayLike,
    gamma_unloaded_per_m: ArrayLike,
    z0_unloaded_ohm: ArrayLike,
    fill_factor: float,
    period_m: float,
) -> NDArray[complex128]

ABCD matrix of one period of a segmented Traveling-wave electrode.

A segmented electrode is loaded by the Junction only part of the way: a loaded section of length fill_factor * period_m alternates with an unloaded one along the propagation axis. One period is cut here through the middle of the loaded section — half a loaded section, the unloaded section, the other loaded half — so the two-port is symmetric (A = D) and the periodic line has one Bloch impedance rather than one per direction.

Parameters:

  • gamma_loaded_per_m (ArrayLike) –

    Propagation constant of the loaded line (1/m); scalar or per-frequency.

  • z0_loaded_ohm (ArrayLike) –

    Characteristic impedance of the loaded line (ohm).

  • gamma_unloaded_per_m (ArrayLike) –

    Propagation constant of the unloaded line (1/m).

  • z0_unloaded_ohm (ArrayLike) –

    Characteristic impedance of the unloaded line (ohm).

  • fill_factor (float) –

    Loaded fraction of the period, 0 to 1.

  • period_m (float) –

    Length of one period (m, > 0).

Returns:

  • NDArray[complex128] –

    The matrices, shape (..., 2, 2) over the broadcast inputs.