Chapter 6 State-Space Design
© National Instruments Corporation 6-27 Xmath Control Design Module
0 0 0 -4
B
0
-2
0
1
C
0.211325 0.756044 0.000221135 0.330327
D
0
X0
0
0
0
0
System is continuous
[P,resid] = riccati(A,Q,R);
norm(A'*P+P*A-P*R*P+Q,1)
ans (a scalar) = 2.53297e-13
R = 1e-5;
[P,resid]=riccati(Sys,Q,R);
norm(A'*P+P*A-P*B*inv(R)*B'*P +Q,1)
ans (a scalar) = 2.52492e-13
The small residue indicates that the problem was well posed and the solution is reliable.
Example 6-9 Discrete Riccati Equation
A = [0,0,0;.3,-0.1,0;0,1,0];
Q = [2,0,0;0,0,0;0,0,10];
B = [1,0,0]';
RD = .25 ;
Sys=system(A,B,B',[],{dt=1})
Sys (a state space system) =
A
0 0 0
0.3 -0.1 0
A'PA PA'PB S+()RB'PB+()
1B'PA S'+()Q+0=