You are on page 1of 6

Assignment#05

Linear control System

By

Syed Faraz Naeem Bacha Reg ID : 318566

……………………………………………………………………………………………………………………………...

Question # 01…………………………………………………………………………………………………….

Solution

a) Yes the given system is completely controllable, it is because the


controllability grammian is of full rank, i.e 5 and can be seen in the
following script of matlab
% First (as always), check for stability and controllability!
Gamma= ctrb(A, B);
rank_gamma=rank(Gamma)
EIGEN_VALUE=eig(A)
rank_gamma = 5
AS the given system is completely controllable, and hence there is no
uncontrolled part in the given system but for stability there should be
some input to make the system as it can be clear from their eigen values
EIGEN_VALUE =

-24.1755
-16.4772
-5.4012
20.0907
15.3074
b) By changing the weight for large number of times, it seems that given
eigen values are not to much effected so the corresponding optimal
optimal weights are as follows
Code
%% Update your weights here to get better performance
v=[28,38,600,990,44];
Q=diag(v)
d=[10000, 1000];
R=diag(d);
P=are(A,B*inv(R)*B',Q);
K1=inv(R)*B'*P;
optimal_eigen_value = eig(A-B*K1)
Output
Q =
28 0 0 0 0
0 38 0 0 0
0 0 600 0 0
0 0 0 990 0
0 0 0 0 44

R =
10000 0
0 1000

P =
1.0e+07 *
0.0537 0.1758 0.6519 0.1125 -0.0840
0.1758 0.5754 2.1352 0.3711 -0.2659
0.6519 2.1352 7.9254 1.3849 -0.9607
0.1125 0.3711 1.3849 0.2647 -0.0875
-0.0840 -0.2659 -0.9607 -0.0875 0.401

optimal_eigen_value =
-5.4012
-15.3081
-16.4766
-20.0907
-24.1755

Graph for given weights


………………………………………………………………………………………………………………………………
Question # 2)……………………………………………………………………………………………………….
a) The corresponding “optimal” closed-loop eigenvalues with gain k are as
follows.
Code
%% this is where you would use it
P=[-5.4012 -15.3081 -16.4766 -20.0907 -24.1755]
K=place(A,B,P)

Output
P =

-5.4012 -15.3081 -16.4766 -20.0907 -24.1755

K =

1.0e+03 *

-0.0121 -0.0194 -0.1177 0.0056 0.0983


-0.0716 -0.3678 -1.6833 -0.3670 -0.0625

>>

b) The resulting K is not the same this is because that K has 10 components
and all 10 component are used to minimize cost when using LQ while only
five are needed to place poles
……………………………………………………………………………………………………………………………….
Question # 03…………………………………………………………………………………………………………
Solution:
Question # 4……………………………………………………………………………………………………………
Solution

You might also like