pmrf.models.nonideal
Classes
|
Overview |
|
Overview |
- class pmrf.models.nonideal.NonIdealResistor(*, name=None, separator='_', _z0=(50+0j), _param_groups=<factory>)[source]
Bases:
Model
Overview
An 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)
_z0 (complex)
_param_groups (list[ParameterGroup])
- class pmrf.models.nonideal.CLCResistor(res=<factory>, clc=<factory>, *, name=None, separator='_', _z0=(50+0j), _param_groups=<factory>)[source]
Bases:
NonIdealResistor
Overview
A model for a non-ideal resistor with parasitic capacitance and inductance.
This model represents a physical resistor as an ideal resistive element cascaded with a Pi-network (Capacitor-Inductor-Capacitor). This topology is common for modeling SMD resistors at high frequencies.
Example
# 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}”) ```
- Parameters:
res (Resistor)
clc (PiCLC)
name (str | None)
separator (str)
_z0 (complex)
_param_groups (list[ParameterGroup])
- property ideal: Model
The ideal Resistor part of the model.
- Returns:
Model: The ideal resistor component.