.Modelica_LinearSystems2.DiscreteTransferFunction.Conversion.toDiscreteZerosAndPoles

Information

Syntax

dzp = DiscreteTransferFunction.Conversion.toDiscreteZerosAndPoles(tf)

Description

Computes a DiscreteZerosAndPoles record

           product(q + n1[i]) * product(q^2 + n2[i,1]*q + n2[i,2])
dzp = k * ---------------------------------------------------------
           product(q + d1[i]) * product(q^2 + d2[i,1]*q + d2[i,2])

of a discrete transfer function represented by numerator and denominator polynomial. The poles and zeros and the gain k are computed from the DiscreteTransferFunction-input and are used as inputs the DiscreteZerosAndPoles constructor.

Example

  DiscreteTransferFunction z = Modelica_LinearSystems2.DiscreteTransferFunction.z();
  Modelica_LinearSystems2.DiscreteTransferFunction dtf = 1/(z^2 + 3*z + 2)


algorithm
  dzp = Modelica_LinearSystems2.DiscreteTransferFunction.Conversion.toDiscreteZerosAndPoles(dtf);
//  dzp = 1/( (z + 1)*(z + 2) )

Interface

encapsulated function toDiscreteZerosAndPoles
  import Modelica;
  import Complex;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.DiscreteZerosAndPoles;
  import Modelica_LinearSystems2.DiscreteTransferFunction;
  import Modelica_LinearSystems2.TransferFunction;
  input DiscreteTransferFunction dtf "transfer function of a system";
  output Modelica_LinearSystems2.DiscreteZerosAndPoles dzp(redeclare Real n1[DiscreteZerosAndPoles.Internal.numberOfRealZeros2(dtf)], redeclare Real n2[integer((size(dtf.n, 1) - 1 - DiscreteZerosAndPoles.Internal.numberOfRealZeros2(dtf))/2), 2], redeclare Real d1[DiscreteZerosAndPoles.Internal.numberOfRealPoles(dtf)], redeclare Real d2[integer((size(dtf.d, 1) - 1 - DiscreteZerosAndPoles.Internal.numberOfRealPoles(dtf))/2), 2]);
end toDiscreteZerosAndPoles;

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