mna2s

pmrf.rf.mna2s(stamp: MNAStamp, z0: Array | ndarray | bool | number | bool | int | float | complex, *, linear_solver: AbstractLinearSolver = AutoLinearSolver(well_posed=True)) → Array

Convert a Modified Nodal Analysis (MNA) stamp to power-wave S-parameters.

Each port is loaded with, and driven through, its reference impedance \(Z_r\). Loaded ports keep the system non-singular when ports are shorted together, which a stamp’s Y-parameters cannot represent (ADR-0007).

Mathematical Formulation

With \(H\) the port-voltage response to the drive, found by solving the full MNA system with \(Z_r^{-1}\) added to the port rows,

\[H = (Y + Z_r^{-1})^{-1} Z_r^{-1}, \qquad S = F\,\big(2\,\mathrm{Re}(Z_r)\,Z_r^{-1} H - Z_r^{*} Z_r^{-1}\big)\,F^{-1}, \qquad F = \mathrm{diag}\big(1 / (2\sqrt{\mathrm{Re}\,Z_r})\big)\]

where \(Y\) is the port admittance the stamp implies. \(Y + Z_r^{-1}\) is never formed: the auxiliary variables are eliminated inside the solve.

Parameters:
  • stamp (MNAStamp) – The stamp, with blocks of shape (n, n), (n, k), (k, n) and (k, k), or with a leading nfreqs axis. Its n node rows are the ports.

  • z0 (ArrayLike) – The reference impedance, scalar, per-port, or (nfreqs, nports). May be complex.

  • linear_solver (lx.AbstractLinearSolver, optional) – The lineax solver for the loaded MNA system. Defaults to LU.

Returns:

The S-parameter matrix with shape (nports, nports) or (nfreqs, nports, nports).

Return type:

jnp.ndarray

References

K. Kurokawa, “Power Waves and the Scattering Matrix,” IEEE Trans. Microwave Theory Tech., vol. 13, no. 2, pp. 194-202, 1965.