www.pudn.com > controlsystem.ZIP > EX3031.M
% Example 3.31
%
% Pole placement -- using transformation matrix
%
disp('Pole placement -- using transformation matrix')
a=[0 1 0; 0 0 1; -6 -11 -6];
b=[0; 0; 10];
% Step 1
cam=ctrb(a,b);
disp('The rank of controllability matrix')
rc=rank(cam)
% Step 2
beta=poly(a)
% Step 3
a1=beta(2); a2=beta(3); a3=beta(4);
w=[a2 a1 1; a1 1 0; 1 0 0];
t=cam*w;
% Step 4
j=[-2+2*sqrt(3)*i 0 0
0 -2-2*sqrt(3)*i 0
0 0 -10];
alph=poly(j)
aa1= alph(2); aa2=alph(3); aa3=alph(4);
% Step 5
k=[aa3-a3 aa2-a2 aa1-a1]*(inv(t))
%
%
%
% Pole placement -- using Ackermann's formula
%
disp('Pole placement -- using Ackermanns formula')
a=[0 1 0; 0 0 1; -6 -11 -6];
b=[0; 0; 10];
% Step 1
cam=ctrb(a,b);
disp('The rank of controllability matrix')
rc=rank(cam)
% Step 2
j=[-2+2*sqrt(3)*i 0 0
0 -2-2*sqrt(3)*i 0
0 0 -10];
alph=poly(j);
% Step 3
phi=polyvalm(alph,a);
% Step 4
k=[0 0 1]*(inv(cam))*phi
%
% Pole placement -- using place function in MATLAB
%
disp('Pole placement -- using place function in MATLAB')
p=[-2+2*sqrt(3)*i -2-2*sqrt(3)*i -10];
k=place(a,b,p)