This function estimates a useful frequency range for the Bode plot of a vector of zeros (numerator or denominator zeros). This frequency range is estimated such that the phase angle of one zero is in the range:

phi_min/n_zeros ≤ |phase angle| ≤ pi/2 - phi_min/n_zeros

where n_zeros is the number of zeros. Note, the phase angle of one zero for a frequency of 0 up to infinity is in the range:

0 ≤ |phase angle| ≤ pi/2

Therefore, the frequency range is estimated such that the essential part of the phase angle (defined by phi_min) is present.

If the real part of a complex zero vanishes (i.e., the zero is located on the imaginary axis), the maximum value of the bode plot magnitude of the zero is infinity. In order to avoid difficulties, zeros close to the imaginary axis are shifted by the input argument real_min along the real axis.


function frequencyRangeZeros
  import Modelica;
  import Modelica.Math;
  import SI = Modelica.SIunits;
  import Modelica_LinearSystems2.Math.Complex;
  input Complex z[:] "Vector of zeros";
  input SI.Angle phi_min(min = 10 * Modelica.Constants.eps) = Modelica.SIunits.Conversions.from_deg(5) "Minimum phase angle";
  input Real real_min(min = 0) = 1.e-4 "|r| < real_min are treated as |real_min|";
  output Modelica.SIunits.AngularVelocity w_min "Minimum frequency";
  output Modelica.SIunits.AngularVelocity w_max "Maximum frequency";
  output Boolean useFullRange = true;
end frequencyRangeZeros;

Generated at 2020-04-02T01:37:38Z by OpenModelicaOpenModelica 1.16.0~dev-259-g8a5138f using GenerateDoc.mos