skrf.vectorFitting.VectorFitting.vector_fit

VectorFitting.vector_fit(n_poles_real=2, n_poles_cmplx=2, init_pole_spacing='lin', parameter_type='s', fit_constant=True, fit_proportional=False)[source]

Main work routine performing the vector fit. The results will be stored in the class variables poles, residues, proportional_coeff and constant_coeff.

Parameters:
  • n_poles_real (int, optional) – Number of initial real poles. See notes.

  • n_poles_cmplx (int, optional) – Number of initial complex conjugate poles. See notes.

  • init_pole_spacing (str, optional) – Type of initial pole spacing across the frequency interval of the S-matrix. Either linear (‘lin’), logarithmic (‘log’), or custom. In case of custom, the initial poles must be stored in poles as a NumPy array before calling this method. They will be overwritten by the final poles. The initialization parameters n_poles_real and n_poles_cmplx will be ignored in case of ‘custom’.

  • parameter_type (str, optional) – Representation type of the frequency responses to be fitted. Either scattering (‘s’ or ‘S’), impedance (‘z’ or ‘Z’) or admittance (‘y’ or ‘Y’). It’s recommended to perform the fit on the original S parameters. Otherwise, scikit-rf will convert the responses from S to Z or Y, which might work for the fit but can cause other issues.

  • fit_constant (bool, optional) – Include a constant term d in the fit.

  • fit_proportional (bool, optional) – Include a proportional term e in the fit.

Returns:

No return value.

Return type:

None

Notes

The required number of real or complex conjugate starting poles depends on the behaviour of the frequency responses. To fit a smooth response such as a low-pass characteristic, 1-3 real poles and no complex conjugate poles is usually sufficient. If resonances or other types of peaks are present in some or all of the responses, a similar number of complex conjugate poles is required. Be careful not to use too many poles, as excessive poles will not only increase the computation workload during the fitting and the subsequent use of the model, but they can also introduce unwanted resonances at frequencies well outside the fit interval.