tf = StateSpace.Conversion.toTransferFunctionMIMO(ss)
Computes a matrix of TransferFunction records
n_i(s) b0_i + b1_i*s + ... + bn_i*s^n
tf_i = -------- = --------------------------------
d_i(s) a0_i + a1_i*s + ... + an_i*s^n
with repetitive application of Conversion.toTransferFunction.
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace(
A = [-1.0, 0.0, 0.0;
0.0,-2.0, 0.0;
0.0, 0.0,-3.0],
B = [0.0, 1.0;
1.0, 1.0;
-1.0, 0.0],
C = [0.0, 1.0, 1.0;
1.0, 1.0, 1.0],
D = [1.0, 0.0;
0.0, 1.0]);
algorithm
zp:=Modelica_LinearSystems2.StateSpace.Conversion.toZerosAndPoles(ss);
// zp = [(s^2 + 5*s + 7)/(s^2 + 5*s + 6), 1/(s + 2);
1/(s^2 + 5*s + 6), (1*s^2 + 5*s + 5)/(s^2 + 3*s + 2)]
i.e.
| |
| (s^2+5*s+7) 1 |
| ----------------- ----- |
| (s + 2)*(s + 3) (s+2) |
tf = | |
| 1 (s + 1.38197)*(s + 3.61803) |
| ------------- ----------------------------- |
| (s + 2)*(s + 3) (s + 1)*(s + 2) |
| |
function toTransferFunctionMIMO import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.TransferFunction; import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2.ZerosAndPoles; input StateSpace ss "State space system"; input Real tol = 1e-10 "Tolerance of reduction procedure, default tol = 1e-10"; output TransferFunction tf[size(ss.C, 1), size(ss.B, 2)] "Matrix of transfer function objects"; end toTransferFunctionMIMO;
| Date | Author | Comment |
|---|---|---|
| 2010-05-31 | Marcus Baur, DLR-RM | Realization |