InvariantZeros = StateSpace.Internal.invariantZerosWithRealMatrix(A,B,C,D)
Computes the invariant zeros of a system in state space form:
der(x) = A*x + B*u y = C*x + D*u
The invariant zeros of this system are defined as the variables s that make the Rosenbrock matrix of the system
| sI−A −B | | | | C D |
singular, whereby I is the identity matrix of the same size as A
This function applies the algorithm described in [1] where the system (A, B, C, D) is reduced to a new system (Ar, Br Cr, Dr) with the same zeros and with Dr of full rank.
The zeros are returned as a matrix InvariantZeros[:,2] where InvariantZeros[i,1] is the real and InvariantZeros[i,2] is the imaginary part of the complex zero i.
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace( A=[1, 1, 1;0, 1, 1;0,0,1], B=[1;0;1], C=[0,1,1], D=[0]); Complex zeros[:]; algorithm zeros := Modelica_LinearSystems2.StateSpace.Analysis.invariantZeros(ss); // zeros = {1, 0}
encapsulated function invariantZerosWithRealMatrix import Modelica; import MatricesMSL = Modelica.Math.Matrices; import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2; import Modelica_LinearSystems2.Math.Matrices; import Complex; input Real A[:, size(A, 1)] "State matrix of linear state space system"; input Real B[size(A, 1), :] "Input matrix of linear state space system"; input Real C[:, size(A, 1)] "Output matrix of linear state space system"; input Real D[size(C, 1), size(B, 2)] "Feedforward matrix of linear state space system"; output Real InvariantZeros[:, 2] "Finite, invariant zeros of linear state space system; size(Zeros,1) <= size(A,1); Zeros[:,1]: Real part, Zeros[:,2]: Imaginary part"; end invariantZerosWithRealMatrix;
Date | Author | Comment |
---|---|---|
2010-05-31 | Marcus Baur, DLR-RM | Realization |