.Modelica_LinearSystems2.ZerosAndPoles.Conversion.toTransferFunction

Information

Syntax

tf = ZerosAndPoles.Conversion.toStateSpacetoTransferFunction(zp)

Description

Computes a TransferFunction record

      n(s)     b0 + b1*s + ... + bn*s^n
tf = ------ = --------------------------
      d(s)     a0 + a1*s + ... + an*s^n

from a ZerosAndPoles record representated 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 TransferFunction constructor.

Example

  ZerosAndPoles p = Modelica_LinearSystems2.ZerosAndPoles.p();
  Modelica_LinearSystems2.ZerosAndPoles zp = 1/(p + 3)/(p + 1)

algorithm
  tf:=Modelica_LinearSystems2.ZerosAndPoles.Conversion.toTransferFunction(zp);
//  tf = 1/( s^2 + 4*s + 3 )

Interface

function toTransferFunction
  import Modelica;
  import Modelica_LinearSystems2.Math.Polynomial;
  import Modelica_LinearSystems2.TransferFunction;
  import Modelica_LinearSystems2.ZerosAndPoles;
  import Modelica_LinearSystems2.Internal;
  import Modelica_LinearSystems2.Math.Complex;
  input ZerosAndPoles zp "ZerosAndPoles transfer function of a system";
  output TransferFunction tf(redeclare Real n[2*size(zp.n2, 1) + size(zp.n1, 1) + 1], redeclare Real d[2*size(zp.d2, 1) + size(zp.d1, 1) + 1]);
end toTransferFunction;

Generated at 2024-04-18T18:15:58Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos