.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.866025*j, -0.5 - 0.866025*j}
//  k = 1

Interface

encapsulated function zerosAndPoles
  import 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 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos