dtf = DiscreteZerosAndPoles.Conversion.toDiscreteTransferFunction(dzp)
Computes a DiscreteTransferFunction record
n(z) b0 + b1*z + ... + bn*z^n dtf = ------ = -------------------------- d(z) a0 + a1*z + ... + an*z^n
from a DiscreteZerosAndPoles record represented by first and second order numerator and denominator polynomials. The poles and zeros and the gain k are computed (zerosAndPoles) and are used as inputs in the DiscreteTransferFunction constructor.
ZerosAndPoles q = Modelica_LinearSystems2.DiscreteZerosAndPoles.q(); Modelica_LinearSystems2.DiscreteZerosAndPoles dzp = 1/(q + 3)/(q + 1) algorithm dtf:=Modelica_LinearSystems2.DiscreteZerosAndPoles.Conversion.toDiscreteTransferFunction(dzp); // dtf = 1/(z^2 + 4*z + 3)
function toDiscreteTransferFunction import Complex; import Modelica_LinearSystems2.Math.Polynomial; import Modelica_LinearSystems2.ZerosAndPoles; input Modelica_LinearSystems2.DiscreteZerosAndPoles dzp "DiscreteZerosAndPoles transfer function of a system"; output Modelica_LinearSystems2.DiscreteTransferFunction dtf; end toDiscreteTransferFunction;