10.3 Riccati Equations
Finding the optimal control for a continuous-time linear system with a quadratic cost function involves solving the differential Riccati equation, which, for the case of infinite-horizon problem, simplifies to the algebraic Riccati equation (ARE)
The discrete-time case requires solution of the discrete algebraic Riccati equation (DARE)
(see, for example, Brogan (1991), Section 14). These are equations in an unknown matrix that could be viewed as systems of coupled quadratic equations regarding the unknown components and as such could be attempted using the built-in Mathematica functions Solve and NSolve. Control System Professional provides also two more specialized functions that can be more efficient than the general-purpose solvers.
Functions for solving Riccati equations.
Consider again the double-integrator system.
This extracts matrices and .
Let all the weights be equal.
This is the solution to the corresponding ARE.
Consider now another second-order system.
This time we find its discrete-time equivalent for a sampling period of, say, second.
This extracts matrices and .
This solves the DARE.
We can use the result to find the optimal feedback gains.
We could also arrive at this result by using LQRegulatorGains directly.
For yet another example, let us design a controller for the roll attitude of a missile (Figure 10.2). The controller must, by using the hydraulic-powered ailerons, keep roll attitude close to zero while staying within the physical limits of aileron deflection and aileron deflection rate (Bryson and Ho (1969)). In the state-space description, it is assumed that the system has one input, which accepts the command signal to aileron actuators so that and the state vector is
The performance index we choose is
resulting in matrices and as shown below. and are the maximum desired values of and , and is the maximum available value of .
Figure 10.2. Roll attitude control of a missile.
This is the matrix for the model. Q and are the aileron effectiveness and roll-time constant, respectively.
This is matrix .
These are the matrices and for the performance index.
We choose a set of numeric values for our parameters.
We then reassign the matrices using these values.
Applying RiccatiSolve to this list solves the corresponding Riccati equation.
We can use the solution to find the optimal feedback matrix.
Again, the result is the same as the one obtained with LQRegulatorGains.
RiccatiSolve and DiscreteRiccatiSolve work by finding the eigensystem of the corresponding Hamiltonian matrix. Alternatively, one may use the Schur decomposition method, which has advantages for systems with multiple or near-multiple eigenvalues of the Hamiltonian (Laub (1979)). The method is accessible by selecting the option SolveMethod SchurDecomposition (which is available for RiccatiSolve only). If this method is chosen, RiccatiSolve does not accept infinite-precision input since neither does the built-in function SchurDecomposition. The default Automatic setting of the option selects the Eigendecomposition or SchurDecomposition method depending on whether the input matrices are exact or not (for DiscreteRiccatiSolve, Eigendecomposition is chosen in either case).
Option specific to RiccatiSolve.
Solving Riccati equations involves sorting eigenvalues of the Hamiltonian (which is required to separate stable and unstable eigenvalues); therefore, the eigenvalues should not contain symbolic parameters. If symbolic parameters are used, a warning is issued and LQRegulatorGains returns unevaluated. This, of course, does not mean that the system cannot be solved symbolically; however, such a case requires human intervention in the selection of stable poles.