Example Problems and Solutions 843
MATLAB Program 10–32
% Response to intial condition ---- minimum-order observer
A = [0 1;0 -2];
B = [0;4];
K = [4 0.5];
Kb = 0.5;
Ke = 6;
Aab = 1; Abb = -2;
AA = [A-BK BKb; zeros(1,2) Abb-Ke*Aab];
sys = ss(AA,eye(3),eye(3),eye(3));
t = 0:0.01:8;
x = initial(sys,[1;0;1],t);
x1 = [1 0 0]*x';
x2 = [0 1 0]*x';
e = [0 0 1]*x';
subplot(2,2,1); plot(t,x1); grid
xlabel('t (sec)'); ylabel('x1')
subplot(2,2,2); plot(t,x2); grid
xlabel('t (sec)'); ylabel('x2')
subplot(2,2,3); plot(t,e); grid
xlabel('t (sec)'); ylabel('e')
we find
or
The error equation is
Hence the system dynamics are defined by
Based on this last equation, MATLAB Program 10–32 produces the response to the given initial
condition. The resulting response curves are shown in Figure 10–53.
B
x#
e#R = B
A-BK
0
BKb
Abb-Ke AabRB
x
eR
e#=AAbb-Ke AabB ex# =(A-BK) x+BKb e=(A-BK) x+BCKa KbDB
0
eR
x# =Ax-BK x =Ax-BKx+BK(x-x)