pathsim.blocks.rf module

class pathsim.blocks.rf.RFNetwork(ntwk: Network | str | Path, auto_fit: bool = True, **kwargs)[source]

Bases: StateSpace

N-port RF network linear time invariant (LTI) multi input multi output (MIMO) state-space model.

Uses Vector Fitting for rational approximation of the frequency response using poles and residues. The resulting approximation has guaranteed stable poles that are real or come in complex conjugate pairs.

Assumes N inputs and N outputs, where N is the number of ports of the RF network.

Note

This block requires scikit-rf [skrf] to be installed. Its an optional dependency of pathsim, to install it:

pip install scikit-rf
Parameters:

ntwk (can be Network, str, Path, or file-object.) – scikit-rf [skrf] RF Network object, or file to load information from. Supported formats are touchstone file V1 (.s?p) or V2 (.ts).

References

[skrf] (1,2)

scikit-rf webpage https://scikit-rf.org/

s(freqs: ndarray) ndarray[source]

S-matrix of the vector fitted N-port model calculated from its state-space representation.

Parameters:

freqs (ndarray) – Frequencies (in Hz) at which to calculate the S-matrices.

Returns:

s – Complex-valued S-matrices (fxNxN) calculated at frequencies freqs.

Return type:

ndarray