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.00000 00 0
0-0.5000 1.5000-1.5000 0
3.00000 1.00000 -3.0000
3.0000-1.5000 1.5000-0.5000 -3.0000
00 00 -2.0000

» Bo = C'

Bo =
40
80
0-4
0-4
00

» O = [Bo Ao*Bo Ao*Ao*Bo Ao*Ao*Ao*Bo Ao*Ao*Ao*Ao*Bo]

O =
40 -80 160 -320 640
80 -40 200 -280 680
0-4 12-4 -12-4 36-4 -60-4
0-4 0-4 0-4 0-4 0-4
00 00 00 00 00

» rank(O)

ans =

3

» Tccf = [O(:,1:3) [1;0;0;0;0] [0;0;0;0;1]]

Tccf =
40 -81 0
80 -40 0
0-4 120 0
0-4 00 0
00 00 1

» rank(Tccf)

ans =

5

» Accf = inv(Tccf)*Ao*Tccf

Accf =
0.00000 2.00000 0
01.0000 0-0.7500 0.7500
1.00000 -1.00000 0
00 0-2.0000 0
00 00 -2.0000

» Ac = [0 0 2; 0 1 0;1 0 -1]

Ac =
00 2
01 0
10 -1

» Ac_bar = [-2 0;0 -2]

Ac_bar =
-20
0-2

» %All unobservable eigenvalues are in LHP

» %Therefore, system is detectable!!

» Bccf = inv(Tccf)*Bo

Bccf =
10
01
00
00
00

» Bc = [1 0;0 1;0 0]

Bc =
10
01
00

» 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.00002.0000 -1.0000-2.0000

» Apv = [0 1 0;0 0 1;2 1 -2]

Apv =
01 0
00 1
21 -2

» bpv = [0;0;1]

bpv =

0

0

1

» poly([-10 -10 -10])

ans =
130 3001000

» 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 =
00 -1
-10 1
21 -2

» Kc = Kf + ks * Kpv * Tpv_inverse

Kc =
11 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 =
00.1250 0.1250-0.3750 0
0-30.5000 -73.166765.9167 0

» Ko = K'

Ko =
00
0.1250-30.5000
0.1250-73.1667
-0.375065.9167
00

» %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 =
01 00 0
00 01 0
00 00 1

» rank([C;R])

ans =

5

» inv([C;R])

ans =
0.25000 -2.00000 0
00 1.00000 0
0-0.2500 0-1.0000 0
00 01.0000 0
00 00 1.0000

» Q1=ans(:,1:2)

Q1 =
0.25000
00
0-0.2500
00
00

» Q2=ans(:,3:5)

Q2 =
-20 0
10 0
0-1 0
01 0
00 1