skrf.vectorFitting.VectorFitting¶
- class skrf.vectorFitting.VectorFitting(network)[source]¶
This class provides a Python implementation of the Vector Fitting algorithm and various functions for the fit analysis, passivity evaluation and enforcement, and export of SPICE equivalent circuits.
- Parameters
network (
skrf.network.Network
) – Network instance of the \(N\)-port holding the frequency responses to be fitted, for example a scattering, impedance or admittance matrix.
Examples
Load the Network, create a VectorFitting instance, perform the fit with a given number of real and complex-conjugate starting poles:
>>> nw_3port = skrf.Network('my3port.s3p') >>> vf = skrf.VectorFitting(nw_3port) >>> vf.vector_fit(n_poles_real=1, n_poles_cmplx=4)
Notes
The fitting code is based on the original algorithm 1 and on two improvements for relaxed pole relocation 2 and efficient (fast) solving 3. See also the Vector Fitting website 4 for further information and download of the papers listed below. A Matlab implementation is also available there for reference.
References
- 1
B. Gustavsen, A. Semlyen, “Rational Approximation of Frequency Domain Responses by Vector Fitting”, IEEE Transactions on Power Delivery, vol. 14, no. 3, pp. 1052-1061, July 1999, DOI: https://doi.org/10.1109/61.772353
- 2
B. Gustavsen, “Improving the Pole Relocating Properties of Vector Fitting”, IEEE Transactions on Power Delivery, vol. 21, no. 3, pp. 1587-1592, July 2006, DOI: https://doi.org/10.1109/TPWRD.2005.860281
- 3
D. Deschrijver, M. Mrozowski, T. Dhaene, D. De Zutter, “Marcomodeling of Multiport Systems Using a Fast Implementation of the Vector Fitting Method”, IEEE Microwave and Wireless Components Letters, vol. 18, no. 6, pp. 383-385, June 2008, DOI: https://doi.org/10.1109/LMWC.2008.922585
- 4
Vector Fitting website: https://www.sintef.no/projectweb/vectorfitting/
Attributes
Deprecated; Please use |
|
Instance variable holding the Network to be fitted. |
|
Instance variable holding the list of fitted poles. |
|
Instance variable holding the list of fitted residues. |
|
Instance variable holding the list of fitted proportional coefficients. |
|
Instance variable holding the list of fitted constants. |
|
Instance variable specifying the maximum number of iterations for the fitting process and for the passivity enforcement. |
|
Instance variable specifying the convergence criterion in terms of relative tolerance. |
|
Instance variable holding the wall-clock time (in seconds) consumed by the most recent fitting process with |
Methods
Returns one of the frequency responses \(H_{i+1,j+1}\) of the fitted model \(H\). |
|
Returns the root-mean-square (rms) error magnitude of the fit, i.e. \(\sqrt{ \mathrm{mean}(|S - S_\mathrm{fit} |^2) }\), either for an individual response \(S_{i+1,j+1}\) or for larger slices of the network. |
|
Returns the passivity status of the model as a boolean value. |
|
Enforces the passivity of the vector fitted model, if required. |
|
Evaluates the passivity of reciprocal vector fitted models by means of a half-size test matrix [#]_. |
|
Plots the specified component of the parameter \(H_{i+1,j+1}\) in the fit, where \(H\) is either the scattering (\(S\)), the impedance (\(Z\)), or the admittance (\(H\)) response specified in parameter. |
|
Plots the history of the model residue parameter d_res during the iterative pole relocation process of the vector fitting, which should eventually converge to a fixed value. |
|
Plots the history of the greatest singular value during the iterative passivity enforcement process, which should eventually converge to a value slightly lower than 1.0 or stop after reaching the maximum number of iterations specified in the class variable |
|
Plots the magnitude in dB of the scattering parameter response(s) in the fit. |
|
Plots the phase in degrees of the scattering parameter response(s) in the fit. |
|
Plots the unwrapped phase in degrees of the scattering parameter response(s) in the fit. |
|
Plots the imaginary part of the scattering parameter response(s) in the fit. |
|
Plots the magnitude in linear scale of the scattering parameter response(s) in the fit. |
|
Plots the real part of the scattering parameter response(s) in the fit. |
|
Plots the singular values of the vector fitted S-matrix in linear scale. |
|
Reads all model parameters |
|
Main work routine performing the vector fit. |
|
Writes the model parameters in |
|
Creates an equivalent N-port SPICE subcircuit based on its vector fitted S parameter responses. |