EE611
Solution to HW#19
1a) Consider the following transformation:
Therefore, the eigenvalues of the combined observer/controller
closed loop system are the {eigenvalues of A-BK} U {eigenvalues
of A-KoC}
b)
Therefore, since T-1 has full rank, if (A,B) is controllable
then M has full rank, and then (T-1AT,T-1B)
is controllable since !!
c)
Note, the terms -BKB and (2ABK-(BK)2)B are just linear combinations of the columns of B. We know that elementary column operations DO NOT affect the rank!! Therefore:
So, if (A,B) is controllable, then (A-BK,B) is controllable!!
2a)
» Ao = A'
Ao =
| -2.0000 | 0 | 0 | 0 | 0 |
| 0 | -0.5000 | 1.5000 | -1.5000 | 0 |
| 3.0000 | 0 | 1.0000 | 0 | -3.0000 |
| 3.0000 | -1.5000 | 1.5000 | -0.5000 | -3.0000 |
| 0 | 0 | 0 | 0 | -2.0000 |
» Bo = C'
Bo =
| 4 | 0 | |||
| 8 | 0 | |||
| 0 | -4 | |||
| 0 | -4 | |||
| 0 | 0 |
» O = [Bo Ao*Bo Ao*Ao*Bo Ao*Ao*Ao*Bo Ao*Ao*Ao*Ao*Bo]
O =
| 4 | 0 | -8 | 0 | 16 | 0 | -32 | 0 | 64 | 0 |
| 8 | 0 | -4 | 0 | 20 | 0 | -28 | 0 | 68 | 0 |
| 0 | -4 | 12 | -4 | -12 | -4 | 36 | -4 | -60 | -4 |
| 0 | -4 | 0 | -4 | 0 | -4 | 0 | -4 | 0 | -4 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
» rank(O)
ans =
3
» Tccf = [O(:,1:3) [1;0;0;0;0] [0;0;0;0;1]]
Tccf =
| 4 | 0 | -8 | 1 | 0 |
| 8 | 0 | -4 | 0 | 0 |
| 0 | -4 | 12 | 0 | 0 |
| 0 | -4 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 1 |
» rank(Tccf)
ans =
5
» Accf = inv(Tccf)*Ao*Tccf
Accf =
| 0.0000 | 0 | 2.0000 | 0 | 0 |
| 0 | 1.0000 | 0 | -0.7500 | 0.7500 |
| 1.0000 | 0 | -1.0000 | 0 | 0 |
| 0 | 0 | 0 | -2.0000 | 0 |
| 0 | 0 | 0 | 0 | -2.0000 |
» Ac = [0 0 2; 0 1 0;1 0 -1]
Ac =
| 0 | 0 | 2 | ||
| 0 | 1 | 0 | ||
| 1 | 0 | -1 |
» Ac_bar = [-2 0;0 -2]
Ac_bar =
| -2 | 0 | |||
| 0 | -2 |
» %All unobservable eigenvalues are in LHP
» %Therefore, system is detectable!!
» Bccf = inv(Tccf)*Bo
Bccf =
| 1 | 0 | |||
| 0 | 1 | |||
| 0 | 0 | |||
| 0 | 0 | |||
| 0 | 0 |
» Bc = [1 0;0 1;0 0]
Bc =
| 1 | 0 | |||
| 0 | 1 | |||
| 0 | 0 |
» eig(Ac)
ans =
| 1 | ||||
| -2 | ||||
| 1 |
» %Ac is not cyclic!! Pick Kf:
» Kf = [1 1 1;1 1 1];
» eig(Ac-Bc*Kf)
ans =
| -2.0000 | ||||
| 1.0000 | ||||
| -1.0000 |
» Anew = Ac-Bc*Kf;
» %pick Ks:
» ks = [0;1];
» bs = Bc*ks
bs =
| 0 | ||||
| 1 | ||||
| 0 |
» Ms = [bs Anew*bs Anew*Anew*bs];
» rank(Ms)
ans =
3
» poly(Anew)
ans =
| 1.0000 | 2.0000 | -1.0000 | -2.0000 |
» Apv = [0 1 0;0 0 1;2 1 -2]
Apv =
| 0 | 1 | 0 | ||
| 0 | 0 | 1 | ||
| 2 | 1 | -2 |
» bpv = [0;0;1]
bpv =
0
0
1
» poly([-10 -10 -10])
ans =
| 1 | 30 | 300 | 1000 |
» Kpv = [1000+Apv(3,1) , 300+Apv(3,2) , 30+Apv(3,3)]
Kpv =
1002 301 28
» eig(Apv-bpv*Kpv)
ans =
-9.9999
-10.0000 + 0.0001i
-10.0000 - 0.0001i
» Tpv_inverse = [bpv Apv*bpv Apv*Apv*bpv]*inv(Ms)
Tpv_inverse =
| 0 | 0 | -1 | ||
| -1 | 0 | 1 | ||
| 2 | 1 | -2 |
» Kc = Kf + ks * Kpv * Tpv_inverse
Kc =
| 1 | 1 | 1 |
-244 29 -756
» eig(Ac-Bc*Kc)
ans =
-10.0000 + 0.0001i
-10.0000 - 0.0001i
-9.9999
» K = [Kc [0 0; 0 0]] * inv(Tccf)
K =
| 0 | 0.1250 | 0.1250 | -0.3750 | 0 |
| 0 | -30.5000 | -73.1667 | 65.9167 | 0 |
» Ko = K'
Ko =
| 0 | 0 | |||
| 0.1250 | -30.5000 | |||
| 0.1250 | -73.1667 | |||
| -0.3750 | 65.9167 | |||
| 0 | 0 |
» %check:
» eig(Ao - Bo*Ko')
ans =
-10.0001 + 0.0002i
-10.0001 - 0.0002i
-9.9998
-2.0000
-2.0000
» %Now we need to find R, Q1, and Q2:
» R=[0 1 0 0 0;0 0 0 1 0;0 0 0 0 1]
R =
| 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 0 | 1 |
» rank([C;R])
ans =
5
» inv([C;R])
ans =
| 0.2500 | 0 | -2.0000 | 0 | 0 |
| 0 | 0 | 1.0000 | 0 | 0 |
| 0 | -0.2500 | 0 | -1.0000 | 0 |
| 0 | 0 | 0 | 1.0000 | 0 |
| 0 | 0 | 0 | 0 | 1.0000 |
» Q1=ans(:,1:2)
Q1 =
| 0.2500 | 0 | |||
| 0 | 0 | |||
| 0 | -0.2500 | |||
| 0 | 0 | |||
| 0 | 0 |
» Q2=ans(:,3:5)
Q2 =
| -2 | 0 | 0 | ||
| 1 | 0 | 0 | ||
| 0 | -1 | 0 | ||
| 0 | 1 | 0 | ||
| 0 | 0 | 1 |