skrf.vectorFitting.VectorFitting.passivity_test
- VectorFitting.passivity_test(parameter_type='s')[source]
Evaluates the passivity of reciprocal vector fitted models by means of a half-size test matrix [1]. Any existing frequency bands of passivity violations will be returned as a sorted list.
- Parameters:
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.- 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.
- Returns:
violation_bands – NumPy array with frequency bands of passivity violation: [[f_start_1, f_stop_1], [f_start_2, f_stop_2], …].
- Return type:
ndarray
See also
is_passive
Query the model passivity as a boolean value.
passivity_enforce
Enforces the passivity of the vector fitted model, if required.
Examples
Load and fit the Network, then evaluate the model passivity:
>>> nw_3port = skrf.Network('my3port.s3p') >>> vf = skrf.VectorFitting(nw_3port) >>> vf.vector_fit(n_poles_real=1, n_poles_cmplx=4) >>> violations = vf.passivity_test()
References