Page 202 - MATLAB an introduction with applications
P. 202
Control Systems ——— 187
Determine if the system is completely state controllable and completely observable using MATLAB.
Solution:
The controllability and observability of the system can be obtained by examining the rank condition of
2
2
[B AB A B] and [C' A' C' (A') C']
>> % MATLAB Program
>> A =[–1 –3 –2; 0 –2 1; 1 0 –1];
>> B =[3; 0; 1];
>> C =[1 1 0];
>> D =[0];
>> rank ([B A*B A^2*B])
ans=
3
>> rank ([C’ A’*C’ A’^2*C’])
ans=
3
2
2
We observe the rank of [B AB A B] is 3 and the rank of [C' A'*C' (A') *C'] is 3, the system is completely
state controllable and observable.
Example E3.33: Determine the eigenvalues of the following system using MATLAB.
0 2 0 0
x = 0 2 − 9 x +
0 r
2
− 22 5
y = [0 0 1] x
Solution:
>> A = [0 2 0; 0 2 –7; –2 2 5]; %Define the matrix above
>> eig (A) %Calculate the eigenvalues of matrix A.
ans =
2.0000
2.5000 + 3.4278i
2.5000 – 3.4278i
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09