Section 10–8 / Quadratic Optimal Regulator Systems 805MATLAB Program 10–23
% ---------- Unit-step response of designed system ----------
A = [0 1 0;0 0 1;0 -2 -3];
B = [0;0;1]
C = [1 0 0];
D = [0];
K = [100.0000 53.1200 11.6711];
k1 = K(1); k2 = K(2); k3 = K(3);
% ***** Define the state matrix, control matrix, output matrix,
% and direct transmission matrix of the designed systems as AA,
% BB, CC, and DD *****
AA = A - B*K;
BB = B*k1;
CC = C;
DD = D;
t = 0:0.01:8;
[y,x,t] = step (AA,BB,CC,DD,1,t);
plot(t,x)
grid
title('Response Curves x1, x2, x3, versus t')
xlabel('t Sec')
ylabel('x1,x2,x3')
text(2.6,1.35,'x1')
text(1.2,1.5,'x2')
text(0.6,3.5,'x3')
Response Curves x1,x2,x3 versus tx1,x2,x^35- 2
1420- 1
3t Sec051 2 3 486 7x 3x (^2) x 1
Figure 10–40
Response curves x 1
versust, x 2 versust,
andx 3 versust.