Vector Fitting
MFT-NNLS
MFT-NNLS is a complete procedure for multi-port rational modeling from frequency domain data. It is applicable to both Y-parameter, Z-parameter and S-parameter data sets. Rational fitting and passivity enforcement is achieved by two subsequent function calls. VFdriver.m: A stable but possibly non-passive rational model is calculated using vector fitting (vectfit4.m). RPdriver.m: Passivity is enforced by iteratively perturbing the model’s residue matrix elements using a compressed cost function and an efficient NNLS solver. The required passivity assessment is done using either a half-size test matrices, or frequency sweeping (user’s choice). Functions are available for exporting the final model to EM transients simulation programs: EMTP, PSCAD and ATP.
MFT-NNLS_1.zip contains the package, including a User Manual, Matlab source files and some worked examples.
Download: MFT-NNLS_1.zip
- VFdriver.m calculates a rational model starting from a tabulated data (square matrix) in the frequency domain. It makes use of routine vectfit4.m, also contained in the package. The returned result is a pole-residue model as well as the associated state-space model. The model has guaranteed stable poles.
- RPdriver.m perturbs the model generated by VFdriver.m such that it becomes passive, by perturbing the eigenvalues of the its residue matrices. The model can represent both Y-parameter, Z-parameter and and S-parameter data sets. The routine also takes care of the passivity assessment, either by test matrices or by frequency sweeping (user choice).
- netgen_EMTP.m, netgen_PSCAD.m and netgen_ATP.m allows to export the final model to leading electromagnetic transient simulation programs.
With both driver routines, several control parameters are availble.
Restrictions of use:
- The solver for NNLS has three options, using a native solver in Matlab (lsqnonlin.m) or third party solvers (nnls.m, tntnn.m). See the instructions in MFTNNLS_1.zip for conditions of their use. (file: user_manual_MFT-NNLS.pdf)
- For general use of the package, reference should be made to the following paper:
- B. Gustavsen, “MFT-NNLS: A matrix fitting toolbox for passive macromodeling from large immittance and scattering data sets using vector fitting and residue perturbation in Matlab”, IEEE Trans. Power Delivery, 2026, available online: ieeeXplore.org
- If the code is used in a scientific work, then reference should me made to the relevant publications:
- VFdriver.m and vectfit4.m:
- B. Gustavsen and A. Semlyen, "Rational approximation of frequency domain responses by Vector Fitting", IEEE Trans. Power Delivery, vol. 14, no. 3, pp. 1052-1061, July 1999. Link
- B. Gustavsen, "Improving the pole relocating properties of vector fitting", IEEE Trans. Power Delivery, vol. 21, no. 3, pp. 1587-1592, July 2006. Link
- D. Deschrijver, M. Mrozowski, T. Dhaene, and D. De Zutter, “Macromodeling 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. Link
- RPdriver.m, RP_QRNNLS_Y.m, RP_QRNNLS_S.m:
- A. Semlyen and B. Gustavsen, “A half-size singularity test matrix for fast and reliable passivity assessment of rational models”, IEEE Trans. Power Delivery, vol. 24, no. 1, pp. 345-351, January 2009.
- B. Gustavsen and A. Semlyen, “Fast passivity assessment for S-parameter rational models via a half-size test matrix”, IEEE Trans. Microwave Theory And Techniques, vol. 56, no. 12, pp. 2701-2708, December 2008.
- B. Gustavsen, "Passivity enforcement by residue perturbation via constrained non-negative least squares", IEEE Trans. Power Delivery, vol. 36, no. 5, pp. 2758-2767, October 2021.
- B. Gustavsen, “An efficient residue perturbation scheme for passivity enforcement of S-parameter rational models”, IEEE Trans. Electromagnetic Compatibility, vol. 67, no. 3, pp. 913-920, June 2025.
- VFdriver.m and vectfit4.m: