Vous êtes sur la page 1sur 6

18

>> %-------- pole placement and design of observer---------


%--- First , Solving the Pole placement problem --------
% --- Entering Matrices ,A B C and D
A=[0 1;20.6 0];
B=[0;1];
An example on :
C=[1 0];
D=[0]; DESIGN OF A CONTROL SYSTEM USING
% ------- Checking controllability matrix M POLE-PLACMENT METHOD AND A
STATE OBSERVER. FIRST SOLVING THE
M=[B A*B];
POLE-PLACEMENT PROBLEM
rank(M)
ans =
Using MATLAB®

2
>>% since the rank of the matrix M is 2 ,
>> % arbitrary pole placement is possible .
>> % Entering the desired characteristics polynomial by
>> % defining the following matrix J and computing poly(J)...
>> J=[-1.8+2.4*i 0;0 -1.8-2.4*i];
>> poly(J)
ans =
1.0000 3.6000 9.0000
>> % Enter characteristics polynomial Phi
>> Phi=polyvalm(poly(J),A);
>> % State feedback gain matrix K can be given by ......
>> K=[0 1]*inv(M)*Phi
K=
29.6000 3.6000
19

% ***** The following program determines the observer matrix Ke ***


>> % Enter the observability matrix N and check its rank .....
>> N=[C' A'*C'];
rank(N)
ans =
2
>> % since the rank of the observability matrix is 2 , design of
>> % the observer is possible ....
>> % Enter the desired characteristic polynomial by defining
>> % the following matrix J0 and entering statement poly(J0)
>> J0=[-8 0;0 -8];
>> poly(J0)
ans =
1 16 64
% Enter the characteristics polynomial Ph
>> Ph=polyvalm(poly(J0),A);
>> % The observer gain matrix Ke is obtained from
>> Ke=Ph*(inv(N'))*[0;1]
Ke =
16.0000
84.6000
THE ACTUAL m-file PROGRAM IS THE FOLLOWING SCRIPT

Entering system
A=[0 1;20.6 0]; Matrices
B=[0;1];
C=[1 0]; A , B , C and D
D=[0];
M=[B A*B];
rank(M) Checking for controllability
20

J=[-1.8+2.4*i 0;0 -1.8-2.4*i]; 2.4*i];


poly(J)
Phi=polyvalm(poly(J),A); Entering char. . Poly. Phi
K=[0 1]*inv(M)*Phi Solving to find [K]
N=[C' A'*C'];
rank(N) Checking for observability
J0=[-8 0;0 -8];
poly(J0) Entering desired ch. Poly.
Ph=polyvalm(poly(J0),A); Entering ch. Poly. Phi
Ke=Ph*(inv(N'))*[0;1] Solving to find [Ke]
The state equations of the system before designing the feedback controller and the full-order
full
observer were :

Which gives an Unstable response to a step input function ,as shown below :

And this is due to the pole –zero


zero map of the system which has two poles and no zeros
21

X X

Root locus Bode plot


And after the design ,the system became of a forth order , with the characteristics equation for the
system as a whole is :

And the step response has become :

With the root locus and bode plot as shown below :


22

Root locus Bode plot

>> % ------ Enter matrices Aaa,Aab,Aba,Abb,Ba,Bb------


Aaa,Aab,Aba,Abb,Ba,Bb
>> Aaa=[0];Aab=[1 0];Aba=[0;6];Abb=[0 1;-11
1; -6];
>> Ba=[0];Bb=[0;1];
>> % ----- Not that state matrix A and control matrix B are -----
>> A=[Aaa Aab;Aba Abb],B=[Ba;Bb]

A =

0 1 0 A solved example on
0 0 1
6 -11 -6 DESIGNING A MIINMUM-ORDER
MIINMUM
OBSERVER
B =

0
Using MATLAB®
0
1
>> % -----Determine
Determine a1 and a2 of the characteristics polynomial
>> % for the unobserved portion of the system -----------
>> p=poly(Abb)

p =

1.0000 6.0000 11.0000


23

a1=p(2);a2=p(3);
>> %-----Enter the reduced observability matrix NN -----
>> NN=[Aab' Abb'*Aab'];
>> % ----Enter matrix WW -----
>> WW=[a1 1;1 0];
>> %-----Enter the desired characteristics polynomial be defining
>> % the following matrixJ and entering statement poly(j)--------
>> J=[-2+2*sqrt(3)*i 0;0 -2-2*sqrt(3)*i];
>> JJ=poly(J)

JJ =

1.0000 4.0000 16.0000


>> %----Determine aa1 and aa2 of the desired characteristics
>> % polynomial --------
>> aa1=JJ(2);aa2=JJ(3);
>> % ----- observer gain matrix Ke for the minimum-order
>> % --- observer is given by ----
>> Ke=inv(WW*NN')*[aa2-a2;aa1-a1]
Ke =

-2.0000
17.0000

References :
1. Ogata, Katsuhiko ," Linear control systems design with
Matlab® "
2. Ogata, Katsuhiko ," Modern control engineering ,second
edition, Prentice Hall, 1995.

a1 works ©2010

Vous aimerez peut-être aussi