functionzerosAndPoles
Calculate zeros and poles of a transfer function
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
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| TransferFunction | tf | Transfer function of a system |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Complex[:] | z | Polynomial.roots(Polynomial(tf.n)) | Zeros (Complex vector of numerator zeros) |
| Complex[:] | p | Polynomial.roots(Polynomial(tf.d)) | Poles (Complex vector of denominator zeros) |
| Real | k | Constant multiplied with transfer function that is factorized with zeros and poles |