result = DiscreteZerosAndPoles.Analysis.evaluate(dzp,q)
Function Analysis.evaluate evaluates the DiscreteZerosAndPoles transfer function at a given (complex) value of q. The transfer function G(z)=N(q)/D(q) is evaluated by calculating the numerator polynomial N(z) and the denominator polynomial D(q).
import Modelica.ComplexMath.j; DiscreteZerosAndPoles q = Modelica_LinearSystems2.DiscreteZerosAndPoles.q(); Modelica_LinearSystems2.DiscreteZerosAndPoles dzp=(q+1)/(q^2+q+1); Complex result; algorithm result := Modelica_LinearSystems2.DiscreteZerosAndPoles.Analysis.evaluate(dzp, j+1); // result = 0.538462 - 0.307692*j
Math.Polynomial.evaluateComplex
encapsulated function evaluate import Modelica; import Modelica.ComplexMath.j; import Complex; import Modelica_LinearSystems2; import Modelica_LinearSystems2.DiscreteZerosAndPoles; import Modelica_LinearSystems2.ZerosAndPoles; input DiscreteZerosAndPoles dzp "DiscreteZerosAndPoles transfer function of a system"; input Complex q = Complex(0) "Complex value q where dzp is evaluated"; input Real den_min = 0 "|denominator(p)| is limited by den_min"; output Complex y "= zp(p)"; end evaluate;