Chapter 6 State-Space Design
Xmath Control Design Module 6-26 ni.com
continuous-time Riccati equation, which is used if B and S are not
specified, is:
Note The meaning of R is quite different in this case.
riccati( )
[P,resid, Kr, ev] = riccati(A,Q,R,{B,tol,S,d})
Here, A can be either a matrix or a system object.
If A is a matrix, riccati( ) solves the continuous Riccati equation in the
Riccati Equation section unless the B matrix is present; then it solves the
discrete form (also shown in the Riccati Equation section).
If A is a system object, the solution method depends on whether the system
is continuous or discrete. The B matrix is unnecessary to distinguish
continuous from discrete.
The algorithms used are based on [Lau79] and [PLS80]. For the continuous
case, an ordinary Schur solver is used. For the discrete-time case, the
solution uses a generalized eigenvalue solver. For an example of a
continuous Riccati equation, refer to Example 6-8. For an example of
a discrete Riccati equation, refer to Example 6-9.
Example 6-8 Continuous Riccati Equation
You can use riccati( ) to find the Riccati solution and gain for the
optimal regulator problem posed in Equation 6-9:
A = [0,1,0,0;21,0,0,0.8;0,0,0,1;0,0,0,-4];
B = [0,-2,0,1]';
Q = diagonal([1,0,0.1,0]);
R = B*((1e-5)\B');
Sys=system(A,B,rand(B'),[])
ys (a state space system) =
A
0 1 0 0
21 0 0 0.8
0 0 0 1
APPAPRPQ++ 0=
A'PPA PBS+()R1B'PS'+()Q++ 0=