.Modelica_LinearSystems2.WorkInProgress.DiscreteTransferFunction.Conversion.toDiscreteZerosAndPoles

Information

Syntax

dzp = DiscreteTransferFunction.Conversion.toDiscreteZerosAndPoles(tf)

Description

Computes a DiscreteZerosAndPoles record

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

of a discrete transfer function represented by numerator and denominator polynomial. The poles and zeros and the gain k are computed by (zerosAndPoles) and are used as inputs the DiscreteZerosAndPoles constructor.

Example

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

algorithm
  dzp:=Modelica_LinearSystems2.TransferFunction.Conversion.toZerosAndPoles(dtf);
//  zp = 1/( (z + 1)*(z + 2) )

Interface

encapsulated function toDiscreteZerosAndPoles
  import Modelica;
  import Complex;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.WorkInProgress.DiscreteZerosAndPoles;
  import Modelica_LinearSystems2.WorkInProgress.DiscreteTransferFunction;
  import Modelica_LinearSystems2.TransferFunction;
  input DiscreteTransferFunction dtf "transfer function of a system";
  output 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