skrf.vectorFitting.VectorFitting.passivity_enforce¶
- VectorFitting.passivity_enforce(n_samples=200, f_max=None, parameter_type='s')[source]¶
Enforces the passivity of the vector fitted model, if required. This is an implementation of the method presented in 1. Passivity is achieved by updating the residues and the constants.
- Parameters
n_samples (int, optional) – Number of linearly spaced frequency samples at which passivity will be evaluated and enforced. (Default: 100)
f_max (float or None, optional) – Highest frequency of interest for the passivity enforcement (in Hz, not rad/s). This limit usually equals the highest sample frequency of the fitted Network. If None, the highest frequency in
self.network
is used, which must not be None is this case. If f_max is not None, it overrides the highest frequency inself.network
.parameter_type (str, optional) – Representation type of the fitted frequency responses. Either scattering (
s
orS
), impedance (z
orZ
) or admittance (y
orY
). Currently, only scattering parameters are supported for passivity evaluation.
- Return type
None
- Raises
NotImplementedError – If the function is called for parameter_type different than S (scattering).
ValueError – If the function is used with a model containing nonzero proportional coefficients. Or if both f_max and
self.network
are None.
See also
is_passive
Returns the passivity status of the model as a boolean value.
passivity_test
Verbose passivity evaluation routine.
plot_passivation
Convergence plot for passivity enforcement iterations.
Examples
Load and fit the Network, then enforce the passivity of the model:
>>> nw_3port = skrf.Network('my3port.s3p') >>> vf = skrf.VectorFitting(nw_3port) >>> vf.vector_fit(n_poles_real=1, n_poles_cmplx=4) >>> vf.passivity_enforce() # won't do anything if model is already passive
References
- 1
T. Dhaene, D. Deschrijver and N. Stevens, “Efficient Algorithm for Passivity Enforcement of S-Parameter- Based Macromodels,” in IEEE Transactions on Microwave Theory and Techniques, vol. 57, no. 2, pp. 415-420, Feb. 2009, DOI: 10.1109/TMTT.2008.2011201.