Algorithm Search⌘K

Problemcore

Continuous-time algebraic Riccati equation

Also called CARE.

Find a symmetric P with A^T P + PA - PBR^(-1)B^T P + Q = 0 such that A - BR^(-1)B^T P is Hurwitz.

The continuous-time algebraic Riccati equation (CARE) is the matrix equation

ATP+PA−PBR−1BTP+Q=0A^T P + P A - P B R^{-1} B^T P + Q = 0

in a symmetric unknown P∈Rn×nP \in \mathbb{R}^{n \times n}. The problem is to find its stabilizing solution: the solution for which A−BR−1BTPA - B R^{-1} B^T P is Hurwitz. This solution gives the optimal gain K=R−1BTPK = R^{-1} B^T P of the infinite-horizon LQR problem and the optimal cost x0TPx0x_0^T P x_0. The same equation, with AA and BB replaced by ATA^T and CTC^T, gives the gain of the steady-state Kalman-Bucy filter. The CARE is quadratic in PP, so it can have many solutions or none. The stabilizing solution theorem gives when the stabilizing one exists, and the Hamiltonian matrix gives all solutions in terms of its invariant subspaces. The discrete-time counterpart is the DARE.

In plain words

For a linear system with a quadratic cost, the best cost from any state is a bowl-shaped function of the state, and a symmetric matrix holds its shape. This matrix must satisfy one balance condition: the rate at which the cost falls along the best motion must equal the cost being paid at that moment. Written out, that condition is the Riccati equation. It is quadratic in the unknown matrix, like the scalar equation for the roots of a parabola, so there are usually several solutions. Only one of them belongs to a controller that brings the state back to zero. That one is the answer to look for. Numerical methods find it by a matrix eigenvalue problem of twice the size, or by a sequence of linear matrix equations.

Definition

Input: A∈Rn×nA \in \mathbb{R}^{n \times n}, B∈Rn×mB \in \mathbb{R}^{n \times m}, Q=QT≥0Q = Q^T \ge 0 and R=RT>0R = R^T > 0. Write G=BR−1BTG = B R^{-1} B^T, which is symmetric and positive semidefinite. The Riccati map is

R(P)=ATP+PA−PGP+Q.\mathcal{R}(P) = A^T P + P A - P G P + Q.

A solution is a symmetric PP with R(P)=0\mathcal{R}(P) = 0. It is stabilizing if A−GPA - G P is Hurwitz. Output: the stabilizing solution PP and the gain K=R−1BTPK = R^{-1} B^T P, or the report that no stabilizing solution exists.

Facts about the answer.

  • There is at most one stabilizing solution. If P1P_1 and P2P_2 are both stabilizing, the difference D=P1−P2D = P_1 - P_2 satisfies (A−GP1)TD+D(A−GP2)=0(A - G P_1)^T D + D (A - G P_2) = 0. This is a Sylvester equation whose two coefficient matrices are both Hurwitz, so its only solution is D=0D = 0.
  • If (A,B)(A, B) is stabilizable and (Q1/2,A)(Q^{1/2}, A) is detectable, the stabilizing solution exists and is positive semidefinite (Kučera 1972). It is then the only positive semidefinite solution.
  • The stabilizing solution, when it exists, is the largest symmetric solution: P≥XP \ge X for every symmetric XX with R(X)=0\mathcal{R}(X) = 0. Proof: with D=X−PD = X - P, the identity R(X)=R(P)+(A−GP)TD+D(A−GP)−DGD\mathcal{R}(X) = \mathcal{R}(P) + (A - GP)^T D + D (A - GP) - D G D gives (A−GP)TD+D(A−GP)=DGD≥0(A - GP)^T D + D (A - GP) = D G D \ge 0, and a Lyapunov equation with a Hurwitz matrix and a positive semidefinite right side has a solution D≤0D \le 0.
  • PP solves the CARE if and only if the column space of [IP]\begin{bmatrix} I \\ P \end{bmatrix} is invariant under the Hamiltonian matrix H=[A−G−Q−AT]H = \begin{bmatrix} A & -G \\ -Q & -A^T \end{bmatrix}. Indeed H[IP]=[IP](A−GP)H \begin{bmatrix} I \\ P \end{bmatrix} = \begin{bmatrix} I \\ P \end{bmatrix} (A - G P) is the same as −Q−ATP=PA−PGP-Q - A^T P = P A - P G P. The stabilizing solution belongs to the stable invariant subspace of HH.

Variants

  • Cross term. For the cost xTQx+2xTSu+uTRux^T Q x + 2 x^T S u + u^T R u, the equation is ATP+PA−(PB+S)R−1(BTP+ST)+Q=0A^T P + P A - (P B + S) R^{-1} (B^T P + S^T) + Q = 0, and the gain is K=R−1(BTP+ST)K = R^{-1} (B^T P + S^T). It is the CARE of the data A−BR−1STA - B R^{-1} S^T and Q−SR−1STQ - S R^{-1} S^T.
  • Indefinite quadratic term. In H-infinity control and the bounded real lemma, the matrix GG is B2B2T−γ−2B1B1TB_2 B_2^T - \gamma^{-2} B_1 B_1^T or a similar difference, which need not be positive semidefinite. The stabilizing solution is still read from the Hamiltonian matrix, but the positive semidefinite theory of this page does not apply.
  • Riccati inequality. R(P)≥0\mathcal{R}(P) \ge 0, which is an LMI in PP after a Schur complement. When the stabilizing solution exists, the same identity shows that it bounds every solution of the inequality from above.
  • Generalized CARE. With a descriptor matrix EE, the equation is ATPE+ETPA−ETPGPE+Q=0A^T P E + E^T P A - E^T P G P E + Q = 0, solved through a generalized eigenvalue problem.
  • Riccati differential equation. −P˙=R(P)-\dot P = \mathcal{R}(P) with a terminal value. It is the finite-horizon version (finite-horizon LQR), and the CARE is its equilibrium.
  • Filter form. AP+PAT−PCTV−1CP+W=0A P + P A^T - P C^T V^{-1} C P + W = 0 for the error covariance of the Kalman-Bucy filter. It is the CARE of (AT,CT,W,V)(A^T, C^T, W, V).

Examples

Scalar. With n=m=1n = m = 1 the CARE is (b2/r)p2−2ap−q=0(b^2 / r) p^2 - 2 a p - q = 0. For b≠0b \ne 0 the roots are

p=rb2(a±a2+b2q/r),a−b2rp=∓a2+b2q/r.p = \frac{r}{b^2} \left( a \pm \sqrt{a^2 + b^2 q / r} \right), \qquad a - \frac{b^2}{r} p = \mp \sqrt{a^2 + b^2 q / r}.

The plus sign gives the stabilizing solution. For a=b=q=r=1a = b = q = r = 1, p=1+2≈2.414214p = 1 + \sqrt 2 \approx 2.414214, the gain is 1+21 + \sqrt 2 and the closed loop is −2-\sqrt 2. The other root 1−21 - \sqrt 2 is negative and gives the closed loop +2+\sqrt 2.

Double integrator. With A=[0100]A = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, B=[01]B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, Q=IQ = I, R=1R = 1 and P=[p1p2p2p3]P = \begin{bmatrix} p_1 & p_2 \\ p_2 & p_3 \end{bmatrix}, the three entries of the CARE are 1−p22=01 - p_2^2 = 0, p1−p2p3=0p_1 - p_2 p_3 = 0 and 2p2−p32+1=02 p_2 - p_3^2 + 1 = 0. The choice p2=−1p_2 = -1 gives p32=−1p_3^2 = -1, so there is no real solution with it. The choice p2=1p_2 = 1 gives p3=±3p_3 = \pm \sqrt 3 and p1=p3p_1 = p_3. So the equation has exactly two real symmetric solutions:

P+=[3113],P−=[−311−3].P_+ = \begin{bmatrix} \sqrt 3 & 1 \\ 1 & \sqrt 3 \end{bmatrix}, \qquad P_- = \begin{bmatrix} -\sqrt 3 & 1 \\ 1 & -\sqrt 3 \end{bmatrix}.

P+P_+ is positive definite and gives K=[13]K = \begin{bmatrix} 1 & \sqrt 3 \end{bmatrix} and the closed loop polynomial s2+3 s+1s^2 + \sqrt 3\, s + 1, which is Hurwitz. P−P_- is negative definite and gives s2−3 s+1s^2 - \sqrt 3\, s + 1, with both roots in the right half plane. As the order statement says, P+−P−=23 I≥0P_+ - P_- = 2 \sqrt 3\, I \ge 0.

No quadratic term. With B=0B = 0 the CARE is the Lyapunov equation ATP+PA+Q=0A^T P + P A + Q = 0, and the stabilizing solution exists exactly when AA is Hurwitz. For A=[01−2−3]A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix} and Q=IQ = I, the solution is P=[5/41/41/41/4]P = \begin{bmatrix} 5/4 & 1/4 \\ 1/4 & 1/4 \end{bmatrix}.

No detectability. For a=1a = 1, b=r=1b = r = 1 and q=0q = 0, the CARE is 2p−p2=02 p - p^2 = 0. Both p=0p = 0 and p=2p = 2 are positive semidefinite solutions. Only p=2p = 2 is stabilizing (closed loop −1-1), and p=0p = 0 leaves the closed loop at +1+1. So positive semidefinite does not imply stabilizing when detectability fails.

No stabilizing solution. For a=0a = 0, b=r=1b = r = 1 and q=0q = 0, the CARE is −p2=0-p^2 = 0. The only solution is p=0p = 0, with closed loop 00, which is not Hurwitz. Here (q1/2,a)(q^{1/2}, a) has an unobservable mode on the imaginary axis.

Known algorithms

  • Schur method (Laub 1979): compute an ordered Schur form of the Hamiltonian matrix, take the first nn Schur vectors [U1U2]\begin{bmatrix} U_1 \\ U_2 \end{bmatrix}, and set P=U2U1−1P = U_2 U_1^{-1}. It costs O(n3)O(n^3) operations and is the usual dense method. When RR is badly conditioned, the QZ form of an extended pencil avoids forming R−1R^{-1} (Van Dooren, 1981; see the QZ algorithm).
  • Kleinman iteration: Newton's method on R\mathcal{R}. Each step solves a Lyapunov equation; from a stabilizing start the iterates decrease to PP and converge quadratically. It is also used to refine the result of the Schur method.
  • Infinite-horizon LQR by the Riccati differential equation integrated to steady state. It is simple but slow: the convergence is linear, and the slowest closed loop pole sets its rate.
  • The matrix sign function of HH and structure-preserving doubling, both with quadratic convergence (see Bini, Iannazzo and Meini).
  • For large sparse AA with few inputs and low rank QQ, low-rank Newton methods with ADI or Krylov solvers for the Lyapunov steps compute a low-rank factor of PP.
AlgorithmTimeSpacePropertiesCode
Kleinman iterationO(k (n^6 + m^3)) worstO(n^4 + m^2) extradeterministicnot exactiterativeiterative1 language
Schur method for Riccati equationsO(c n^3) worstO(n^2) extradeterministicnot exactiterativeiterative1 language

Bounds

  • Count (a theorem): every solution, symmetric or not, corresponds to an nn-dimensional invariant subspace of HH with a nonsingular top block. If the 2n2n eigenvalues of HH are distinct, HH has (2nn)\binom{2n}{n} invariant subspaces of dimension nn, so the CARE has at most (2nn)\binom{2n}{n} solutions, real or complex.
  • Exactness (a theorem): the entries of PP are algebraic numbers, often irrational, as 1+21 + \sqrt 2 shows. No finite rational algorithm gives PP exactly in general, and the methods above are iterative.
  • Cost: the dense methods use O(n3)O(n^3) arithmetic operations. Kleinman's method uses O(n3)O(n^3) per step with the Bartels-Stewart method for the Lyapunov equation, or O(n6)O(n^6) per step if the Lyapunov equation is solved in Kronecker form.
  • Sensitivity (a theorem on an example): take a=0a = 0, b=r=1b = r = 1 and q=ε>0q = \varepsilon > 0. Then p=εp = \sqrt\varepsilon and dp/dq=1/(2ε)dp / dq = 1 / (2 \sqrt\varepsilon), which grows without bound as ε→0\varepsilon \to 0. The closed loop pole −ε-\sqrt\varepsilon and the eigenvalues ±ε\pm \sqrt\varepsilon of HH approach the imaginary axis at the same time. In general (a rule of thumb), the CARE is badly conditioned when the Hamiltonian matrix has eigenvalues close to the imaginary axis.

Reductions

  • CARE to an eigenvalue problem. The stabilizing solution is P=X2X1−1P = X_2 X_1^{-1} for any basis [X1X2]\begin{bmatrix} X_1 \\ X_2 \end{bmatrix} of the stable invariant subspace of HH. This is the base of the Schur method and the sign function method.
  • CARE to a sequence of Lyapunov equations. Newton's method: (A−GPk)TPk+1+Pk+1(A−GPk)=−(Q+PkGPk)(A - G P_k)^T P_{k+1} + P_{k+1} (A - G P_k) = -(Q + P_k G P_k).
  • Filter to regulator. The filter equation for (A,C,W,V)(A, C, W, V) is the CARE of (AT,CT,W,V)(A^T, C^T, W, V), so one solver serves both.
  • CARE to DARE. A bilinear (Cayley) change of variables turns a CARE into a DARE with the same solution, under invertibility conditions. The bilinear transform is the map on the variable ss.
  • H2 and H-infinity synthesis to CAREs. The H2 controller needs two CAREs, one for the regulator and one for the filter. The DGKF H-infinity controller needs two Riccati equations with indefinite quadratic terms and a coupling condition.

Applications

  • The constant gain of infinite-horizon LQR, and the regulator half of LQG control.
  • The steady-state gain of the Kalman-Bucy filter, which is the dual of the regulator.
  • The bounded real and positive real lemmas, where a Riccati equation or inequality certifies a bound on the H-infinity norm or passivity.
  • Spectral factorization of a positive para-Hermitian matrix function, used in Wiener filtering.
  • LQG balanced truncation, which balances the solutions of the regulator and the filter CAREs in place of the Gramians, and the terminal cost of model predictive control for continuous-time plants.

References

  1. W. M. Wonham, On a matrix Riccati equation of stochastic control, SIAM Journal on Control 6(4), 681-697, 1968, the algebraic Riccati equation of the regulator and its positive semidefinite solution
  2. Vladimír Kučera, A contribution to matrix quadratic equations, IEEE Transactions on Automatic Control 17(3), 344-347, 1972, the existence and uniqueness of the stabilizing solution under stabilizability and detectability
  3. Peter Lancaster and Leiba Rodman, Algebraic Riccati Equations, Clarendon Press, Oxford, 1995, the continuous-time equation, its Hermitian solutions and their order
  4. Kemin Zhou, John C. Doyle and Keith Glover, Robust and Optimal Control, Prentice Hall, 1996, Chapter 13, Algebraic Riccati Equations
  5. Alan J. Laub, A Schur method for solving algebraic Riccati equations, IEEE Transactions on Automatic Control 24(6), 913-921, 1979, the computation of the stabilizing solution from an ordered Schur form of the Hamiltonian matrix
  6. Dario A. Bini, Bruno Iannazzo and Beatrice Meini, Numerical Solution of Algebraic Riccati Equations, SIAM, 2012, the survey of solution methods, with Newton, doubling and the matrix sign function

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml