Algorithm Search⌘K

Definitionadvanced

Hamiltonian matrix

Also called Hamiltonian matrix of the Riccati equation.

The 2n by 2n matrix [A, -BR^(-1)B^T; -Q, -A^T], whose stable invariant subspace gives the stabilizing Riccati solution.

The Hamiltonian matrix of the continuous-time algebraic Riccati equation ATP+PA−PBR−1BTP+Q=0A^T P + P A - P B R^{-1} B^T P + Q = 0 is the 2n×2n2n \times 2n matrix

H=[A−BR−1BT−Q−AT].H = \begin{bmatrix} A & -B R^{-1} B^T \\ -Q & -A^T \end{bmatrix}.

It turns the quadratic matrix equation into a linear eigenvalue problem: PP solves the CARE exactly when the columns of [IP]\begin{bmatrix} I \\ P \end{bmatrix} span an invariant subspace of HH. Its eigenvalues are symmetric about the imaginary axis. Under the hypotheses of the stabilizing solution theorem, none of them lies on the axis, so exactly nn are in the open left half plane. A basis [X1X2]\begin{bmatrix} X_1 \\ X_2 \end{bmatrix} of their invariant subspace gives the stabilizing solution P=X2X1−1P = X_2 X_1^{-1}. The Schur method computes that basis. The name comes from the general class of Hamiltonian matrices, defined below, to which HH belongs; that class is also the matrix form of linear Hamiltonian systems in mechanics.

Definition

Let J=[0In−In0]J = \begin{bmatrix} 0 & I_n \\ -I_n & 0 \end{bmatrix}. A real matrix H∈R2n×2nH \in \mathbb{R}^{2n \times 2n} is Hamiltonian if JHJ H is symmetric, that is, HTJ+JH=0H^T J + J H = 0.

Block form. Write H=[AGFD]H = \begin{bmatrix} A & G \\ F & D \end{bmatrix} with n×nn \times n blocks. Then JH=[FD−A−G]J H = \begin{bmatrix} F & D \\ -A & -G \end{bmatrix}, which is symmetric if and only if F=FTF = F^T, G=GTG = G^T and D=−ATD = -A^T. So the Hamiltonian matrices are exactly the matrices

H=[AGF−AT],G=GT,F=FT.H = \begin{bmatrix} A & G \\ F & -A^T \end{bmatrix}, \qquad G = G^T, \quad F = F^T.

The Hamiltonian matrix of the CARE is the case G=−BR−1BTG = -B R^{-1} B^T and F=−QF = -Q. In this area, the name refers to that matrix unless the text says otherwise.

Origin in the LQR problem. The Pontryagin maximum principle for the LQR cost gives the state and costate equations x˙=Ax−BR−1BTλ\dot x = A x - B R^{-1} B^T \lambda and λ˙=−Qx−ATλ\dot\lambda = -Q x - A^T \lambda (with the costate scaled so that u=−R−1BTλu = -R^{-1} B^T \lambda). So HH is the coefficient matrix of the joint system in (x,λ)(x, \lambda), and the optimal solution satisfies λ=Px\lambda = P x.

Eigenvalue symmetry. From (JH)T=JH(J H)^T = J H and JT=−J=J−1J^T = -J = J^{-1}, one gets HT=JHJH^T = J H J, so HT=−JHJ−1H^T = -J H J^{-1} is similar to −H-H. Hence λ\lambda is an eigenvalue of HH if and only if −λ-\lambda is, with the same multiplicity. Since HH is real, λˉ\bar\lambda is an eigenvalue too. So the spectrum is symmetric under λ↦−λˉ\lambda \mapsto -\bar\lambda, the reflection in the imaginary axis, and also under λ↦−λ\lambda \mapsto -\lambda and λ↦λˉ\lambda \mapsto \bar\lambda.

Riccati solutions and invariant subspaces. For symmetric PP, with G=BR−1BTG = B R^{-1} B^T,

H[IP]=[A−GP−Q−ATP],[IP](A−GP)=[A−GPPA−PGP].H \begin{bmatrix} I \\ P \end{bmatrix} = \begin{bmatrix} A - G P \\ -Q - A^T P \end{bmatrix}, \qquad \begin{bmatrix} I \\ P \end{bmatrix} (A - G P) = \begin{bmatrix} A - G P \\ P A - P G P \end{bmatrix}.

The two are equal if and only if PP solves the CARE. Then the subspace is invariant, and the eigenvalues of HH on it are those of the closed loop matrix A−GPA - G P. Conversely, if [X1X2]\begin{bmatrix} X_1 \\ X_2 \end{bmatrix} spans an nn-dimensional invariant subspace and X1X_1 is invertible, then [IX2X1−1]\begin{bmatrix} I \\ X_2 X_1^{-1} \end{bmatrix} spans the same subspace, and X2X1−1X_2 X_1^{-1} solves the CARE, provided it is symmetric.

No eigenvalue on the imaginary axis. Let (A,B)(A, B) be stabilizable, (Q1/2,A)(Q^{1/2}, A) detectable, and R>0R > 0. Suppose H[xy]=iω[xy]H \begin{bmatrix} x \\ y \end{bmatrix} = i \omega \begin{bmatrix} x \\ y \end{bmatrix} with ω\omega real. The two block rows are Ax−Gy=iωxA x - G y = i \omega x and −Qx−ATy=iωy-Q x - A^T y = i \omega y. Multiply the first by y∗y^* on the left, take the conjugate transpose of the second and multiply it by xx on the right, and add. The terms y∗Axy^* A x and ±iω y∗x\pm i \omega\, y^* x cancel, and what is left is

y∗Gy+x∗Qx=0.y^* G y + x^* Q x = 0.

Both terms are at least 0, so BTy=0B^T y = 0 and Q1/2x=0Q^{1/2} x = 0. Then Ax=iωxA x = i \omega x with Q1/2x=0Q^{1/2} x = 0, so x=0x = 0 by the PBH test for detectability. Also y∗A=iω y∗y^* A = i \omega\, y^* with y∗B=0y^* B = 0, so y=0y = 0 by the PBH test for stabilizability. So no eigenvector exists, and HH has no eigenvalue on the imaginary axis. By the symmetry, nn eigenvalues are in each open half plane.

The stable subspace is Lagrangian. Let the columns of X∈C2n×nX \in \mathbb{C}^{2n \times n} span the invariant subspace of the nn eigenvalues in the open left half plane, so HX=XΛH X = X \Lambda with Λ\Lambda Hurwitz. Let M=X∗JXM = X^* J X, which satisfies M∗=−MM^* = -M. The matrix X∗JHX=MΛX^* J H X = M \Lambda is Hermitian because JHJ H is symmetric, so MΛ=Λ∗M∗=−Λ∗MM \Lambda = \Lambda^* M^* = -\Lambda^* M. That is the Lyapunov equation Λ∗M+MΛ=0\Lambda^* M + M \Lambda = 0 with Λ\Lambda Hurwitz, whose only solution is M=0M = 0. With X=[X1X2]X = \begin{bmatrix} X_1 \\ X_2 \end{bmatrix}, M=X1∗X2−X2∗X1=0M = X_1^* X_2 - X_2^* X_1 = 0, so X1∗X2X_1^* X_2 is Hermitian. When X1X_1 is invertible, this gives X2X1−1=X1−∗(X1∗X2)X1−1X_2 X_1^{-1} = X_1^{-*} (X_1^* X_2) X_1^{-1} Hermitian, and real for a real basis. The invertibility of X1X_1 is part of the stabilizing solution theorem.

Examples and non-examples

Scalar. For n=m=1n = m = 1, H=[a−b2/r−q−a]H = \begin{bmatrix} a & -b^2 / r \\ -q & -a \end{bmatrix}, with eigenvalues ±μ\pm \mu, μ=a2+b2q/r\mu = \sqrt{a^2 + b^2 q / r}. For the eigenvalue −μ-\mu, the first row gives (a+μ)x=(b2/r)y(a + \mu) x = (b^2 / r) y, so y/x=r(a+μ)/b2y / x = r (a + \mu) / b^2. That is the stabilizing solution pp of the scalar CARE. For a=b=q=r=1a = b = q = r = 1, H=[1−1−1−1]H = \begin{bmatrix} 1 & -1 \\ -1 & -1 \end{bmatrix}, μ=2\mu = \sqrt 2 and p=1+2p = 1 + \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 and R=1R = 1,

H=[0100000−1−10000−1−10],det⁡(sI−H)=s4−s2+1=(s2+3 s+1)(s2−3 s+1).H = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & -1 \\ -1 & 0 & 0 & 0 \\ 0 & -1 & -1 & 0 \end{bmatrix}, \qquad \det(s I - H) = s^4 - s^2 + 1 = (s^2 + \sqrt 3\, s + 1)(s^2 - \sqrt 3\, s + 1).

The eigenvalues are ±3/2±i/2\pm \sqrt 3 / 2 \pm i / 2, four points placed symmetrically about both axes. The stable pair −3/2±i/2-\sqrt 3 / 2 \pm i / 2 is the spectrum of the optimal closed loop, and its invariant subspace gives P=[3113]P = \begin{bmatrix} \sqrt 3 & 1 \\ 1 & \sqrt 3 \end{bmatrix}. The unstable pair gives the other real solution [−311−3]\begin{bmatrix} -\sqrt 3 & 1 \\ 1 & -\sqrt 3 \end{bmatrix}.

Eigenvalues on the axis. For a=0a = 0, b=r=1b = r = 1 and q=0q = 0, H=[0−100]H = \begin{bmatrix} 0 & -1 \\ 0 & 0 \end{bmatrix} has the double eigenvalue 0, on the imaginary axis. Detectability fails, and the CARE −p2=0-p^2 = 0 has no stabilizing solution.

Hamiltonian, but not from an LQR problem. H=[0−110]H = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} is Hamiltonian (G=−1G = -1 and F=1F = 1 are symmetric), with eigenvalues ±i\pm i. It is the Hamiltonian matrix of the scalar data a=0a = 0, b=r=1b = r = 1 and q=−1q = -1, which violates Q≥0Q \ge 0. It is also the matrix of the harmonic oscillator x˙=−y\dot x = -y, y˙=x\dot y = x. So a Hamiltonian matrix can have all its eigenvalues on the axis, and the no-axis result needs the LQR hypotheses.

Not Hamiltonian. The identity I2I_2 is not Hamiltonian: JI2=JJ I_2 = J is skew, not symmetric, and the eigenvalues 1,11, 1 are not mirrored by −1,−1-1, -1. The matrix [AGF−AT]\begin{bmatrix} A & G \\ F & -A^T \end{bmatrix} with a nonsymmetric GG is not Hamiltonian either, even though its diagonal blocks have the right form.

  • Symplectic matrices. SS is symplectic if STJS=JS^T J S = J. If HH is Hamiltonian, eHte^{H t} is symplectic for every tt, which is why symplectic integrators suit Hamiltonian systems. The DARE uses a symplectic matrix, with eigenvalues in pairs λ\lambda and 1/λˉ1 / \bar\lambda, in the place of HH.
  • Hamiltonian Schur form. If HH has no eigenvalue on the imaginary axis, there is a matrix UU that is both orthogonal and symplectic with UTHU=[TW0−TT]U^T H U = \begin{bmatrix} T & W \\ 0 & -T^T \end{bmatrix}, TT upper quasi-triangular (Paige and Van Loan 1981). A method that keeps this structure in floating point would give eigenvalues that are exactly mirrored. The usual Schur method uses the general Schur decomposition instead, which ignores the structure.
  • Skew-Hamiltonian matrices, with JHJ H skew-symmetric. The square of a Hamiltonian matrix is skew-Hamiltonian, which some structure-preserving eigenvalue methods use.
  • Control Hamiltonian. The scalar function H(x,u,λ)\mathcal{H}(x, u, \lambda) of the maximum principle (control Hamiltonian). For the LQR problem, minimizing it over uu and writing the state and costate equations gives the linear system with matrix HH.
  • Extended Hamiltonian pencil. The (2n+m)×(2n+m)(2n + m) \times (2n + m) pencil that keeps BB and RR apart, so that R−1R^{-1} is never formed. It is solved with the QZ algorithm.

References

  1. Alan J. Laub, A Schur method for solving algebraic Riccati equations, IEEE Transactions on Automatic Control 24(6), 913-921, 1979, the Hamiltonian matrix of the CARE, its eigenvalue symmetry, and the solution from the stable invariant subspace
  2. Chris Paige and Charles Van Loan, A Schur decomposition for Hamiltonian matrices, Linear Algebra and its Applications 41, 11-32, 1981, the Hamiltonian Schur form under a symplectic orthogonal similarity, for matrices with no eigenvalue on the imaginary axis
  3. Peter Lancaster and Leiba Rodman, Algebraic Riccati Equations, Clarendon Press, Oxford, 1995, the correspondence between solutions of the Riccati equation and invariant subspaces of the Hamiltonian matrix
  4. Kemin Zhou, John C. Doyle and Keith Glover, Robust and Optimal Control, Prentice Hall, 1996, Chapter 13, Algebraic Riccati Equations

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)
WritingW4 complete
  • a review of the text: no review record reviews/PK49RX/text.yaml