skrf.vectorFitting.VectorFitting.auto_fit

VectorFitting.auto_fit(n_poles_init_real=3, n_poles_init_cmplx=3, n_poles_add=3, model_order_max=100, iters_start=3, iters_inter=3, iters_final=5, target_error=0.01, alpha=0.03, gamma=0.03, nu_samples=1.0, parameter_type='s')[source]

Automatic fitting routine implementing the “vector fitting with adding and skimming” algorithm as proposed in [1]. This algorithm is able to provide high quality macromodels with automatic model order optimization, while improving both the rate of convergence and the fit quality in case of noisy data. The resulting model parameters will be stored in the class variables poles, residues, proportional_coeff and constant_coeff.

Parameters:
  • n_poles_init_real (int, optional) – Number of real poles in the initial model.

  • n_poles_init_cmplx (int, optional) – Number of complex conjugate poles in the initial model.

  • n_poles_add (int, optional) – Number of new poles allowed to be added in each refinement iteration, if possible. This controls how fast the model order is allowed to grow. Unnecessary poles will have to be skimmed and removed later. This parameter has a strong effect on the convergence.

  • model_order_max (int, optional) – Maximum model order as calculated with \(N_{real} + 2 N_{complex}\). This parameter provides a stopping criterion in case the refinement process is not converging.

  • iters_start (int, optional) – Number of initial iterations for pole relocations as in regular vector fitting.

  • iters_inter (int, optional) – Number of intermediate iterations for pole relocations during each iteration of the refinement process.

  • iters_final (int, optional) – Number of final iterations for pole relocations after the refinement process.

  • target_error (float, optional) – Target for the model error to be reached during the refinement process. The actual achievable error is bound by the noise in the data. If specified with a number greater than the noise floor, this parameter provides another stopping criterion for the refinement process. It therefore affects both the convergence, the final error, and the final model order (number of poles used in the model).

  • alpha (float, optional) – Threshold for the error decay to stop the refinement loop in case of error stagnation. This parameter provides another stopping criterion for cases where the model already has enough poles but the target error still cannot be reached because of excess noise (target error too small for noise level in the data).

  • gamma (float, optional) – Threshold for the detection of spurious poles.

  • nu_samples (float, optional) – Required and enforced (relative) spacing in termins of frequency samples between existing poles and relocated or added poles. The number can be a float, it does not have to be an integer.

  • 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.

Returns:

No return value.

Return type:

None

See also

vector_fit

Regular vector fitting routine.

References