www.pudn.com > controlsystem.ZIP > EX3041.M
% Example 3.41
%
% Design of state observer
%
g=[0 0 -0.25; 1 0 0; 0 1 0.5];
h=[1 0 1]'; c=[1 0 0];
% Check the observability
disp('The rank of observability matrix')
ro=rank(obsv(g,c))
% Design
gaa=g(1,1); gab=g(1,2:3);
gba=g(2:3,1); gbb=g(2:3,2:3);
ha=h(1,1); hb=h(2:3,1);
% Dual system
g1=gbb'; h1=gab';
p=[0 0];
k=acker(g1,h1,p);
ke=k'