.Modelica_LinearSystems2.ZerosAndPoles.Analysis.evaluate

Information

Syntax

result = ZerosAndPoles.Analysis.evaluate(zp, p, den_min=0)

Description

Function Analysis.evaluate evaluates the ZerosAndPoles transfer function at a given (complex) value of p and returns the value G(p)=N(p)/D(p). The optional argument den_min with default 0 is used to guard against a division by zero.

if |(D(p))| >= den_min then
   G(p) = N(p) / D(p);
elseif D(p).re >= 0.0 then
   G(p) = N(p) / den_min
else
   G(p) = -N(p) / den_min
end if;

Example

  import Modelica.ComplexMath.j;
  ZerosAndPoles p = Modelica_LinearSystems2.ZerosAndPoles.p();
  Modelica_LinearSystems2.ZerosAndPoles zp=(p+1)/(p^2+p+1);

  Complex result;

algorithm
  result := Modelica_LinearSystems2.ZerosAndPoles.Analysis.evaluate(zp, j+1);
//  result = 0.538462 - 0.307692*j

See also

Math.Polynomial.evaluateComplex

Interface

encapsulated function evaluate
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.ZerosAndPoles;
  import Complex;
  input ZerosAndPoles zp "ZerosAndPoles transfer function of a system";
  input Complex p = Complex(0) "Complex value p where zp is evaluated";
  input Real den_min(min = 0) = 0 "|denominator(p)| is limited by den_min";
  output Complex y "= zp(p)";
end evaluate;

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos