pmrf.models.nonideal
Classes
|
A model for a non-ideal resistor with parasitic capacitance and inductance. |
|
An abstract base class for creating realistic resistor models that include parasitic effects. |
- class pmrf.models.nonideal.NonIdealResistor(*, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)[source]
Bases:
ModelAn abstract base class for creating realistic resistor models that include parasitic effects.
This class provides a framework for representing a physical resistor as a combination of an ideal resistive element and a network of parasitic components (like series inductance and parallel capacitance).
Subclasses are required to implement the ideal and parasitics properties to define the specific topology of the non-ideal model.
- Parameters:
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- __init__(*, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)
- Parameters:
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- Return type:
None
- class pmrf.models.nonideal.CLCResistor(res=<factory>, clc=<factory>, *, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)[source]
Bases:
NonIdealResistorA model for a non-ideal resistor with parasitic capacitance and inductance.
This model represents a physical resistor as a parasitic Pi-network (Capacitor-Inductor-Capacitor) cascaded with an ideal resistive element. This topology is common for modeling SMD resistors at high frequencies.
- Parameters:
res (Resistor)
clc (PiCLC)
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
Examples
import pmrf as prf # Create a model for a 100-ohm resistor with parasitics non_ideal_r = prf.models.CLCResistor( res=prf.models.Resistor(R=100), clc=prf.models.PiCLC(C1=0.05e-12, L=0.1e-9, C2=0.05e-12) ) # You can access the ideal and parasitic parts print(f"Ideal Resistance: {non_ideal_r.ideal.R.value} Ohms") # Calculate the S-parameters of the complete non-ideal model freq = prf.Frequency(start=0.1, stop=20, npoints=201, unit='ghz') s = non_ideal_r.s(freq) print(f"S11 at 10 GHz: {s[freq.center_idx, 0, 0]:.2f}")
- 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.
- __init__(res=<factory>, clc=<factory>, *, name=None, separator='_', metadata=<factory>, _z0=(50+0j), _param_groups=<factory>)
- Parameters:
res (Resistor)
clc (PiCLC)
name (str | None)
separator (str)
metadata (dict)
_z0 (complex)
_param_groups (list[ParameterGroup])
- Return type:
None