zp = StateSpace.Conversion.toZerosAndPoles(ss)
Computes a ZerosAndPoles record
product(s + n1[i]) * product(s^2 + n2[i,1]*s + n2[i,2]) zp = k * --------------------------------------------------------- product(s + d1[i]) * product(s^2 + d2[i,1]*s + d2[i,2])
of a system from state space representation using the transformation algorithm described in [1]. The uncontrollable and unobservable parts are isolated and the eigenvalues and invariant zeros of the controllable and observable sub system are calculated.
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 = [1.0; 1.0; 0.0], C = [1.0,1.0,1.0], D = [0.0]); algorithm zp:=Modelica_LinearSystems2.StateSpace.Conversion.toZerosAndPoles(ss); // s + 1.5 // zp = 2 ----------------- (s + 1)*(s + 2)
encapsulated function frequencyResponseGain import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2.Internal; import Modelica.Utilities.Streams.print; input Real A[:, size(A, 1)] "A-matrix of linear state space system"; input Real B[size(A, 1), :] "B-matrix of linear state space system"; input Real C[:, size(A, 1)] "C-matrix of linear state space system"; input Real D[size(C, 1), size(B, 2)] "D-matrix of linear state space system"; input Real Zeros[:, 2] "Zeros of state space system as Real matrix (first column: real, second column imaginary values)"; input Real Poles[:, 2] "Poles of state space system as Real matrix (first column: real, second column imaginary values)"; output Real gain "y(s) = gain*(s-z1)*(s-z2)*...*(s-zm)/((s-p1)*(s-p2)*...(s-pn))"; end frequencyResponseGain;
Date | Author | Comment |
---|---|---|
2011-07-31 | Marcus Baur, DLR-RM | Improved frequency calculation |
2010-05-31 | Marcus Baur, DLR-RM | Realization |