functionfromFactorization
Generate a DiscreteZerosAndPoles data record from first and second order polynomials
Information
Syntax
dzp = 'constructor'.fromFactorization(n1, n2, d1, d2, k, Ts, method) dzp = 'constructor'.fromFactorization(n1, n2, d1, d2, k, Ts, method, uName, yName)
Description
This function constructs a DiscreteZerosAndPoles transfer function from the real first and scond order polynomials of the numerator and the denominator, respectively.
Example
(q + 0.1)
dzp = 4 * -----------------
(q + 1)*(q - 0.1)
is defined as
import Modelica_LinearSystems2.Math.Complex;
import Modelica_LinearSystems2.DiscreteZerosAndPoles;
dzp = DiscreteZerosAndPoles(n1={0.1},n2=fill(0,0,2), d1={1,-0.1}, d2=fill(0,0,2), k=4);
which is equal to
dzp = DiscreteZerosAndPoles(n1={0.1},n2=fill(0,0,2), d1=fill(0,0), d2=[0.9, -0.1], k=4);
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:] | n1 | fill(0, 0) | [p^0] coefficients of 1st order numerator polynomials |
| Real[:,2] | n2 | fill(0, 0, 2) | [p,p^0] coefficients of 2nd order numerator polynomials |
| Real[:] | d1 | fill(0, 0) | [p^0] coefficients of 1st order denominator polynomials |
| Real[:,2] | d2 | fill(0, 0, 2) | [p,p^0] coefficients of 2nd order denominator polynomials |
| Real | k | 1.0 | Multiplicative factor of transfer function |
| Modelica.Units.SI.Time | Ts | 1 | Sample time |
| Modelica_LinearSystems2.Utilities.Types.Method | method | Modelica_LinearSystems2.Utilities.Types.Method.Trapezoidal | Discretization method |
| String | uName | "" | input name |
| String | yName | "" | output name |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| DiscreteZerosAndPoles | dzp | ZerosAndPoles transfer function |