GlobalScatteringCircuitSolver
- class pmrf.models.composite.interconnected.circuit.solvers.scattering.GlobalScatteringCircuitSolver(eps: float = 1e-12, linear_solver: AbstractLinearSolver = AutoLinearSolver(well_posed=None))
Bases:
AbstractScatteringCircuitSolverGlobal S-parameter reduction solver.
Assembles the full system into a single matrix and solves for the external ports simultaneously.
Best suited for arbitrary circuits.
- run(s_block_diagonal: Array, z0_ports: Array | None, z0_ext: Array | None, topology: PortRepresentation) ScatteringResult
Executes the scattering circuit solving algorithm.
Note on Dangling Ports
Implementations MUST safely handle mathematically isolated external ports (where a port in topology.ext_idx is the ONLY port on its defined net). To prevent solvers from evaluating these as perfect open circuits (S=1.0), implementations should dynamically inject matched virtual VNA probes (e.g., padding the S-matrix with 0.0s and rewiring the indices) prior to solving.
- param s_block_diagonal:
A 2D array of shape (N_total, N_total) containing the uncoupled S-parameters of all components placed sequentially along the main diagonal. All off-diagonal elements are exactly zero.
- type s_block_diagonal:
jnp.ndarray
- param z0_ports:
A 1D array of shape (N_total,) containing the characteristic impedances for all ports.
- type z0_ports:
jnp.ndarray
- param topology:
The static map dictating the port connections, nets, and partition logic.
- type topology:
PortRepresentation
- returns:
The fully solved S-parameter result.
- rtype:
ScatteringResult
- eps: float = 1e-12
Numerical regularization to prevent singular matrix division during lossless resonance.
- linear_solver: AbstractLinearSolver = AutoLinearSolver(well_posed=None)
The lineax solver to use for the global matrix inversion. Defaults to AutoLinearSolver.