Open In Colab

All rights reserved. For enrolled students only. Redistribution prohibited.

The Algebraic Riccati Equation#

Introducing the Algebraic Riccati Equation#

Recall that, in the linear–quadratic regulator (LQR) problem, we consider the linear dynamics

\[ \dot x(t) = A x(t) + B u(t), \qquad x(0) = x_0. \]

We seek a state-feedback control law

\[ u(t) = -Kx(t) \]

that minimizes the cost

\[ J = \int_0^\infty \left( x(t)^\top Q\,x(t) + u(t)^\top R\,u(t) \right)\, dt, \]

where \(Q\) is positive semidefinite and \(R\) is positive definite.

The algebraic Riccati equation (ARE) is a matrix equation that plays a central role in solving the LQR problem. This equation is

\[ A^\top S + S A + Q - S B R^{-1} B^\top S = 0, \]

and the matrix variable to be solved for is \(S\). In general, the ARE does not admit a closed-form solution. However, it can be solved numerically for a positive semidefinite (and, under mild assumptions, positive definite) matrix \(S\). For example, in MATLAB, the command

\[ [\texttt{K}, \texttt{S}, \texttt{E}] = \texttt{lqr}(A,B,Q,R) \]

returns the ARE solution \(S\) as its second output.

Connection to the solution of the LQR problem#

Once the ARE has been solved for \(S\), the optimal LQR feedback gain is recovered as

\[ K = R^{-1} B^\top S. \]

Moreover, the optimal value of the cost \(J\) (attained under the LQR controller) is

\[ J^\star = x_0^\top S x_0. \]

Thus, the solution \(S\) of the ARE determines both the optimal feedback gain and the optimal cost of the LQR problem.