.Modelica_LinearSystems2.TransferFunction.Analysis.zerosAndPoles

Information

Syntax

(z,p,k) = TransferFunction.Analysis.zerosAndPoles(tf)

Description

This function calculates the zeros, poles and gain of transfer function. Analysis.evaluate is used to calculate gain k.

Example

  TransferFunction s = Modelica_LinearSystems2.TransferFunction.s();
  Modelica_LinearSystems2.TransferFunction tf=(s+1)/(s^2+s+1);

public
  output Complex z;
  output Complex p;
  output Real k;

algorithm
  (z,p,k)=Modelica_LinearSystems2.TransferFunction.Analysis.zerosAndPoles(tf);
//  z = {-1}
//  p = {-0.5 + 0.866025j, -0.5 - 0.866025j}
//  k = 1

Interface

encapsulated function zerosAndPoles
  import Modelica;
  import Modelica_LinearSystems2.Math.Complex;
  import Modelica_LinearSystems2.Math.Polynomial;
  import Modelica_LinearSystems2.TransferFunction;
  input TransferFunction tf "transfer function of a system";
  output Complex z[:] = Polynomial.roots(Polynomial(tf.n)) "Zeros (Complex vector of numerator zeros)";
  output Complex p[:] = Polynomial.roots(Polynomial(tf.d)) "Poles (Complex vector of denominator zeros)";
  output Real k "Constant multiplied with transfer function that is factorized with zeros and poles";
end zerosAndPoles;

Generated at 2021-02-24T01:59:16Z by OpenModelicaOpenModelica 1.18.0~dev-65-g9ac6586 using GenerateDoc.mos