pmrf.models.topological
Classes
|
A 3-port or 4-port model of a Box-network with a Capacitor-Inductor-Capacitor-Capacitor topology. |
|
A 2-port or 3-port model of a Pi-network with a Capacitor-Inductor-Capacitor topology. |
- class pmrf.models.topological.PiCLC(C1=1e-12, L=1e-09, C2=1e-12, three_port=False, *, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)[source]
Bases:
ModelA 2-port or 3-port model of a Pi-network with a Capacitor-Inductor-Capacitor topology.
This model consists of a shunt capacitor (C1), a series inductor (L), and a second shunt capacitor (C2). It is a fundamental building block for various filters and matching networks, and is also commonly used to model the parasitic effects of physical components like SMD resistors.
The parameter three_port determines whether all four ports are exposed or not.
To ensure numerical stability when using with JAX, this model provides a special case for when the series inductance L is zero, where the network behaves as a single shunt capacitor.
- Parameters:
C1 (Any)
L (Any)
C2 (Any)
three_port (bool)
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- three_port
If True, treats the network as a 3-port device (where the ground reference is implicit or shared). If False, treats it as a standard 2-port network.
- Type:
bool, default=False
- three_port: bool = False
- a(freq)[source]
Calculates the ABCD parameter matrix.
If only
s()is implemented, this is calculated using the conversionpmrf.functions.conversions.s2a().- Parameters:
freq (Frequency) – Frequency grid.
- Returns:
ABCD matrix with shape
(nf, 2, 2).- Return type:
jnp.ndarray
- Raises:
NotImplementedError – If neither
anorsis implemented in a subclass.
- a_general(freq)[source]
Internal calculation for the general case (L != 0).
- Parameters:
freq (Frequency) – The frequency points.
- Returns:
The ABCD matrix.
- Return type:
jnp.ndarray
- a_zero_inductance(freq)[source]
Internal calculation for the zero inductance case (L == 0).
The network simplifies to a single shunt capacitor C = C1 + C2.
- Parameters:
freq (Frequency) – The frequency points.
- Returns:
The ABCD matrix.
- Return type:
jnp.ndarray
- s(freq)[source]
Scattering parameter matrix.
If only
a()is implemented, converts viapmrf.functions.conversions.a2s().- Parameters:
freq (Frequency) – Frequency grid.
- Returns:
S-parameter matrix with shape
(nf, n, n).- Return type:
jnp.ndarray
- Raises:
NotImplementedError – If neither
anorsis implemented in a subclass.
- __init__(C1=1e-12, L=1e-09, C2=1e-12, three_port=False, *, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)
- Parameters:
C1 (Any)
L (Any)
C2 (Any)
three_port (bool)
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- Return type:
None
- class pmrf.models.topological.BoxCLCC(C1=1e-12, L=1e-09, C2=1e-12, C3=1e-12, four_port=False, *, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)[source]
Bases:
ModelA 3-port or 4-port model of a Box-network with a Capacitor-Inductor-Capacitor-Capacitor topology.
This model consists of a shunt capacitor (C1), a series inductor (L), and a second shunt capacitor (C2), and a bridging capacitor (C3).
The parameter four_port determines whether all four ports are exposed or not.
- Parameters:
C1 (Any)
L (Any)
C2 (Any)
C3 (Any)
four_port (bool)
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- four_port
If True, exposes the network as a 4-port model.
- Type:
bool, default=False
- four_port: bool = False
- y_general(freq)[source]
Internal calculation for the general case (L > 1e-18).
- Parameters:
freq (Frequency) – The frequency points.
- Returns:
The Y matrix.
- Return type:
jnp.ndarray
- y_zero_inductance(freq)[source]
Internal calculation for the zero inductance case.
Uses a small epsilon for L to avoid division by zero while approximating the behavior.
- Parameters:
freq (Frequency) – The frequency points.
- Returns:
The Y matrix.
- Return type:
jnp.ndarray
- s(freq)[source]
Scattering parameter matrix.
If only
a()is implemented, converts viapmrf.functions.conversions.a2s().- Parameters:
freq (Frequency) – Frequency grid.
- Returns:
S-parameter matrix with shape
(nf, n, n).- Return type:
jnp.ndarray
- Raises:
NotImplementedError – If neither
anorsis implemented in a subclass.
- __init__(C1=1e-12, L=1e-09, C2=1e-12, C3=1e-12, four_port=False, *, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)
- Parameters:
C1 (Any)
L (Any)
C2 (Any)
C3 (Any)
four_port (bool)
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- Return type:
None