(K, S, po, nfp, nap, nup) = StateSpace.Design.assignPolesMI(ss, gamma, np, tol, calculateEigenvectors)
The purpose of this function is to determine the state feedback matrix K for a given time invariant multi input state system (A,B) such that the closed-loop state matrix A-B*K has specified eigenvalues. The feedback matrix K is calculated by factorization following [1]. The algorithm modifies the eigenvalues sequentially and also allows partial eigenvalue assignment.
At the beginning of the algorithm, the feedback matrix K is set to zero (K = 0) and the matrix A is reduced to an ordered real Schur form by separating its spectrum in two parts
| F1 F3 | F = Q*A*Q' = | | | 0 F2 |
in such a way, that F1 contains the eigenvalues that will be retained and F3 contains the eigenvalues going to be modified. On the suggestion of [1] the eigenvalues evr to be retained are chosen as
evr = {s in C: Re(s) < -alpha, alpha >= 0}
but other specification are conceivable of course.
Let
G = [G1;G2] = Q*B
with an appropriate partition according to F2. (F2, G2) has to be controllable.
If the feedback matrix K is taken in a form
K = [0, K2]
the special structure of F and K results in a closed loop state matrix
| F1 F3 − G1*K2 | F − G*K = | | | 0 F2 − G2*K2 |
with only the eigenvalues of F2 are modified. This approach to modify separated eigenvalues is used to sequentially shift one real eigenvalue or two complex conjugated eigenvalues stepwise until all assigned eigenvalues are placed. Therefore, at each step i always the (two) lower right eigenvalue(s) are modified by an appropriate feedback matrix Ki. The matrix F - G*Ki remains in real Schur form. The assigned eigenvalue(s) is (are) then moved to another diagonal position of the real Schur form using reordering techniques F < -- Qi*F*Qi' and a new block is transferred to the lower right diagonal position. The transformations are accumulated in Qi and are also applicated to the matrices
G < - Qi*G Q < - Qi*Q
The eigenvalue(s) to be assigned at each step is (are) chosen such that the norm of each Ki is minimized [1].
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace( A=[-1,1; 0,-2], B=[0; 1], C=[1,0; 0,1], D=[0; 0]); Complex p[:]={Complex(-3,0),Complex(-4,0)}; algorithm (K, S, newPoles) := Modelica_LinearSystems2.StateSpace.Design.assignPolesMI(ss, p); // K = [6.0, 4.0] // S = [-1.0, 1.0; -6.0, -6.0] // newPoles = {-3, -4}
encapsulated function assignPolesMI import Modelica; import Modelica.Math.Matrices.LAPACK; import Complex; import Modelica_LinearSystems2; import Modelica_LinearSystems2.StateSpace; import Modelica_LinearSystems2.TransferFunction; import Modelica_LinearSystems2.Math.Matrices; input StateSpace ss "State space system"; input Complex gamma[:] = fill(Complex(0), 0) "Designed Poles"; input Real alpha = -1e10 "Maximum admissible value for real parts of the eigenvalues of A which will not be modified by the eigenvalue assignment algorithm"; input Real tolerance = Modelica.Math.Matrices.norm(ss.A, 1)*1e-12 "Tolerance to be used in determining the controllability of (A,B)"; input Boolean calculateEigenvectors = false "Calculate the eigenvectors X of the closed loop system when true"; output Real K[size(ss.B, 2), size(ss.A, 1)] "State feedback matrix assigning the desired poles"; output Real S[:, :] "Closed loop System matrix"; output Complex po[size(ss.A, 1)] "Poles of the closed loop system"; output Integer nfp "Number of eigenvalues that are not modified with respect to alpha"; output Integer nap "Number of assigned eigenvalues"; output Integer nup "Number of uncontrollable eigenvalues"; output Complex X[size(ss.A, 1), size(ss.A, 1)] "Eigenvectors of the closed loop system"; end assignPolesMI;
Date | Author | Comment |
---|---|---|
2010-05-31 | Marcus Baur, DLR-RM | Realization |