Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Infinite-Horizon Linear Quadratic Regulation

This section continues the study of the linear quadratic optimal control problem. The main goals are:

  1. to complete the interpretation of the finite-horizon Riccati solution;

  2. to derive the infinite-horizon linear quadratic regulator;

  3. to obtain the algebraic Riccati equation;

  4. to explain the stabilizing Riccati solution;

  5. to introduce the shooting method for two-point boundary-value problems; and

  6. to show why shooting can become numerically unstable.

Finite-Horizon Linear Quadratic Optimal Control

Consider the finite-horizon problem

minu()J=12xT(tf)Sfx(tf)+120tf[xTQx+uTRu]dt,\min_{\boldsymbol{u}(\cdot)} J = \frac{1}{2}\boldsymbol{x}^{\mathsf{T}}(t_f)\boldsymbol{S}_f\boldsymbol{x}(t_f) + \frac{1}{2}\int_0^{t_f} \left[ \boldsymbol{x}^{\mathsf{T}}\boldsymbol{Q}\boldsymbol{x} + \boldsymbol{u}^{\mathsf{T}}\boldsymbol{R}\boldsymbol{u} \right]\,\mathrm{d} t,

subject to

x˙=Ax+Bu,x(0)=x0.\dot{\boldsymbol{x}}=\boldsymbol{A}\boldsymbol{x}+\boldsymbol{B}\boldsymbol{u}, \qquad \boldsymbol{x}(0)=\boldsymbol{x}_0.

The usual assumptions are

Q=QT0,R=RT0,\boldsymbol{Q}=\boldsymbol{Q}^{\mathsf{T}}\succeq 0, \qquad \boldsymbol{R}=\boldsymbol{R}^{\mathsf{T}}\succ 0,

together with controllability of (A,B)(\boldsymbol{A},\boldsymbol{B}) and observability or detectability of the relevant state-weighted pair.

The Hamiltonian is

H=12xTQx+12uTRu+λT(Ax+Bu).H = \frac{1}{2}\boldsymbol{x}^{\mathsf{T}}\boldsymbol{Q}\boldsymbol{x} + \frac{1}{2}\boldsymbol{u}^{\mathsf{T}}\boldsymbol{R}\boldsymbol{u} + \boldsymbol{\lambda}^{\mathsf{T}}(\boldsymbol{A}\boldsymbol{x}+\boldsymbol{B}\boldsymbol{u}).

Stationarity gives

Hu=Ru+BTλ=0,\frac{\partial H}{\partial \boldsymbol{u}} = \boldsymbol{R}\boldsymbol{u}+\boldsymbol{B}^{\mathsf{T}}\boldsymbol{\lambda} = \boldsymbol{0},

so

u=R1BTλ.\boldsymbol{u}^* = -\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{\lambda}.

The costate equation is

λ˙=QxATλ.\dot{\boldsymbol{\lambda}} = -\boldsymbol{Q}\boldsymbol{x}-\boldsymbol{A}^{\mathsf{T}}\boldsymbol{\lambda}.

The terminal transversality condition is

λ(tf)=Sfx(tf).\boldsymbol{\lambda}(t_f)=\boldsymbol{S}_f\boldsymbol{x}(t_f).

The Riccati Transformation

Introduce

λ(t)=S(t)x(t)+β(t).\boldsymbol{\lambda}(t)=\boldsymbol{S}(t)\boldsymbol{x}(t)+\boldsymbol{\beta}(t).

After substitution into the state and costate equations, one obtains

x˙=(ABR1BTS)xBR1BTβ,β˙=(SBR1BTAT)β+Γ(S)x,\begin{aligned} \dot{\boldsymbol{x}} &= \left( \boldsymbol{A}-\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S} \right)\boldsymbol{x} - \boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{\beta}, \\ \dot{\boldsymbol{\beta}} &= \left( \boldsymbol{S}\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}-\boldsymbol{A}^{\mathsf{T}} \right)\boldsymbol{\beta} + \boldsymbol{\Gamma}(\boldsymbol{S})\boldsymbol{x}, \end{aligned}

where

Γ(S)=S˙SAATS+SBR1BTSQ.\boldsymbol{\Gamma}(\boldsymbol{S}) = -\dot{\boldsymbol{S}} -\boldsymbol{S}\boldsymbol{A} -\boldsymbol{A}^{\mathsf{T}}\boldsymbol{S} +\boldsymbol{S}\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S} -\boldsymbol{Q}.

Choose S\boldsymbol{S} such that

Γ(S)=0.\boldsymbol{\Gamma}(\boldsymbol{S})=\boldsymbol{0}.

Then

S˙=SAATS+SBR1BTSQ.\dot{\boldsymbol{S}} = -\boldsymbol{S}\boldsymbol{A} -\boldsymbol{A}^{\mathsf{T}}\boldsymbol{S} +\boldsymbol{S}\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S} -\boldsymbol{Q}.

Equation (13) is the Riccati differential equation.

Why the auxiliary term vanishes

At t=tft=t_f,

λ(tf)=S(tf)x(tf)+β(tf).\boldsymbol{\lambda}(t_f)=\boldsymbol{S}(t_f)\boldsymbol{x}(t_f)+\boldsymbol{\beta}(t_f).

But the transversality condition requires

λ(tf)=Sfx(tf).\boldsymbol{\lambda}(t_f)=\boldsymbol{S}_f\boldsymbol{x}(t_f).

Choosing

S(tf)=Sf\boldsymbol{S}(t_f)=\boldsymbol{S}_f

gives

β(tf)=0.\boldsymbol{\beta}(t_f)=\boldsymbol{0}.

Since

β˙=(SBR1BTAT)β\dot{\boldsymbol{\beta}} = \left( \boldsymbol{S}\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}-\boldsymbol{A}^{\mathsf{T}} \right)\boldsymbol{\beta}

is a homogeneous linear differential equation, its solution can be written as

β(t)=Φβ(t,tf)β(tf).\boldsymbol{\beta}(t) = \boldsymbol{\Phi}_{\beta}(t,t_f)\boldsymbol{\beta}(t_f).

Therefore,

β(t)0.\boxed{\boldsymbol{\beta}(t)\equiv \boldsymbol{0}.}

Hence

λ(t)=S(t)x(t).\boldsymbol{\lambda}(t)=\boldsymbol{S}(t)\boldsymbol{x}(t).

Finite-horizon optimal feedback law

The optimal control becomes

u(t)=R1BTS(t)x(t).\boxed{ \boldsymbol{u}^*(t) = -\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S}(t)\boldsymbol{x}^*(t). }

The corresponding closed-loop state equation is

x˙=[ABR1BTS(t)]x.\dot{\boldsymbol{x}}^* = \left[ \boldsymbol{A}-\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S}(t) \right]\boldsymbol{x}^*.

The finite-horizon solution procedure is therefore:

  1. Integrate the Riccati differential equation backward from

S(tf)=Sf.\boldsymbol{S}(t_f)=\boldsymbol{S}_f.
  1. Use the resulting S(t)\boldsymbol{S}(t) to construct the time-varying feedback gain

K(t)=R1BTS(t).\boldsymbol{K}(t)=\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S}(t).
  1. Integrate the state equation forward from x(0)=x0\boldsymbol{x}(0)=\boldsymbol{x}_0.

  2. Recover

u(t)=K(t)x(t).\boldsymbol{u}^*(t)=-\boldsymbol{K}(t)\boldsymbol{x}^*(t).

Infinite-Horizon Linear Quadratic Regulator

The infinite-horizon problem is

minu()J=120[xTQx+uTRu]dt,\min_{\boldsymbol{u}(\cdot)} J = \frac{1}{2}\int_0^\infty \left[ \boldsymbol{x}^{\mathsf{T}}\boldsymbol{Q}\boldsymbol{x} + \boldsymbol{u}^{\mathsf{T}}\boldsymbol{R}\boldsymbol{u} \right]\,\mathrm{d} t,

subject to

x˙=Ax+Bu,x(0)=x0.\dot{\boldsymbol{x}}=\boldsymbol{A}\boldsymbol{x}+\boldsymbol{B}\boldsymbol{u}, \qquad \boldsymbol{x}(0)=\boldsymbol{x}_0.

Here A\boldsymbol{A}, B\boldsymbol{B}, Q\boldsymbol{Q}, and R\boldsymbol{R} are constant matrices.

This problem is the classical linear quadratic regulator, or LQR.

Finite horizon versus infinite horizon

FeatureFinite-horizon LQ problemInfinite-horizon LQR
Time interval[0,tf][0,t_f][0,)[0,\infty)
Terminal costUsually presentUsually absent
Riccati equationDifferentialAlgebraic
Feedback gainTime varyingConstant
ComputationBackward integrationMatrix equation solve

Convergence Requirements on an Infinite Horizon

For the cost

J=120[xTQx+uTRu]dtJ = \frac{1}{2}\int_0^\infty \left[ \boldsymbol{x}^{\mathsf{T}}\boldsymbol{Q}\boldsymbol{x} + \boldsymbol{u}^{\mathsf{T}}\boldsymbol{R}\boldsymbol{u} \right]\,\mathrm{d} t

to remain finite, the integrand must approach zero:

limt[xTQx+uTRu]=0.\lim_{t\to\infty} \left[ \boldsymbol{x}^{\mathsf{T}}\boldsymbol{Q}\boldsymbol{x} + \boldsymbol{u}^{\mathsf{T}}\boldsymbol{R}\boldsymbol{u} \right] = 0.

Because

Q0,R0,\boldsymbol{Q}\succeq 0, \qquad \boldsymbol{R}\succ 0,

the two nonnegative terms cannot cancel one another. Therefore,

limtxTQx=0,limtuTRu=0.\begin{aligned} \lim_{t\to\infty}\boldsymbol{x}^{\mathsf{T}}\boldsymbol{Q}\boldsymbol{x} &= 0, \\ \lim_{t\to\infty}\boldsymbol{u}^{\mathsf{T}}\boldsymbol{R}\boldsymbol{u} &= 0. \end{aligned}

Under the standard controllability and observability assumptions, this implies

x(t)0,u(t)0as t.\boldsymbol{x}^*(t)\to \boldsymbol{0}, \qquad \boldsymbol{u}^*(t)\to \boldsymbol{0} \qquad \text{as }t\to\infty.

Since

λ=Sx,\boldsymbol{\lambda}=\boldsymbol{S}\boldsymbol{x},

the optimal costate also satisfies

λ(t)0.\boldsymbol{\lambda}^*(t)\to \boldsymbol{0}.

The Algebraic Riccati Equation

For the infinite-horizon, time-invariant problem, the steady-state Riccati matrix is constant. Hence

S˙=0.\dot{\boldsymbol{S}}=\boldsymbol{0}.

Substituting this into the Riccati differential equation gives

SAATS+SBR1BTSQ=0.-\boldsymbol{S}\boldsymbol{A} -\boldsymbol{A}^{\mathsf{T}}\boldsymbol{S} +\boldsymbol{S}\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S} -\boldsymbol{Q} = \boldsymbol{0}.

Equivalently,

ATS+SASBR1BTS+Q=0.\boxed{ \boldsymbol{A}^{\mathsf{T}}\boldsymbol{S} + \boldsymbol{S}\boldsymbol{A} - \boldsymbol{S}\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S} + \boldsymbol{Q} = \boldsymbol{0}. }

Equation (38) is the algebraic Riccati equation.

The infinite-horizon feedback law is

u=Kx,K=R1BTS.\boxed{ \boldsymbol{u}^* = -\boldsymbol{K}\boldsymbol{x}^*, \qquad \boldsymbol{K}=\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S}. }

The closed-loop dynamics are

x˙=(ABK)x.\dot{\boldsymbol{x}}^* = (\boldsymbol{A}-\boldsymbol{B}\boldsymbol{K})\boldsymbol{x}^*.

The Stabilizing Riccati Solution

The algebraic Riccati equation is nonlinear and quadratic in S\boldsymbol{S}. It can possess multiple symmetric solutions. The relevant solution is the one that is:

  1. symmetric;

  2. positive semidefinite or positive definite under stronger assumptions; and

  3. stabilizing.

The stabilizing solution satisfies

Re[λi(ABR1BTS)]<0\operatorname{Re} \left[ \lambda_i(\boldsymbol{A}-\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\boldsymbol{S}) \right] <0

for every closed-loop eigenvalue.

Thus,

x(t)0as t.\boldsymbol{x}^*(t)\to\boldsymbol{0} \qquad \text{as }t\to\infty.

Computational Remarks

For moderate state dimension, the algebraic Riccati equation is solved efficiently using standard numerical linear algebra routines.

For large-scale systems, however, direct solution becomes expensive because SRn×n\boldsymbol{S}\in\mathbb{R}^{n\times n} may be dense even when A\boldsymbol{A} and B\boldsymbol{B} are sparse.

This issue appears frequently after spatial discretization of distributed-parameter systems such as:

A spatial discretization can create hundreds or thousands of states, making the Riccati equation itself a large-scale computational problem.

Return to the State–Costate Boundary-Value Problem

Before the Riccati transformation, the finite-horizon optimality system is

ddt[xλ]=[ABR1BTQAT][xλ].\frac{\,\mathrm{d}}{\,\mathrm{d} t} \begin{bmatrix} \boldsymbol{x}\\ \boldsymbol{\lambda} \end{bmatrix} = \begin{bmatrix} \boldsymbol{A} & -\boldsymbol{B}\boldsymbol{R}^{-1}\boldsymbol{B}^{\mathsf{T}}\\ -\boldsymbol{Q} & -\boldsymbol{A}^{\mathsf{T}} \end{bmatrix} \begin{bmatrix} \boldsymbol{x}\\ \boldsymbol{\lambda} \end{bmatrix}.

The boundary conditions are split between the two endpoints:

x(0)=x0,λ(tf)=Sfx(tf).\boldsymbol{x}(0)=\boldsymbol{x}_0, \qquad \boldsymbol{\lambda}(t_f)=\boldsymbol{S}_f\boldsymbol{x}(t_f).

This is a two-point boundary-value problem. The initial state is known, but the initial costate is unknown. At the terminal time, the state is unknown and only a relation between state and costate is available.

If

Φ(t,τ)\boldsymbol{\Phi}(t,\tau)

denotes the state-transition matrix of (43), then

[x(t)λ(t)]=Φ(t,τ)[x(τ)λ(τ)].\begin{bmatrix} \boldsymbol{x}(t)\\ \boldsymbol{\lambda}(t) \end{bmatrix} = \boldsymbol{\Phi}(t,\tau) \begin{bmatrix} \boldsymbol{x}(\tau)\\ \boldsymbol{\lambda}(\tau) \end{bmatrix}.

The transition matrix alone does not remove the missing-boundary-condition problem.

The Shooting Method

The shooting method converts a boundary-value problem into an iterative sequence of initial-value problems.

Suppose the initial costate is unknown. Define a guess

λ(0)=η.\boldsymbol{\lambda}(0)=\boldsymbol{\eta}.

For any chosen η\boldsymbol{\eta}, integrate the state–costate equations forward to tft_f. Define the terminal residual

r(η)=λ(tf;η)Sfx(tf;η).\boldsymbol{r}(\boldsymbol{\eta}) = \boldsymbol{\lambda}(t_f;\boldsymbol{\eta}) - \boldsymbol{S}_f\boldsymbol{x}(t_f;\boldsymbol{\eta}).

The correct initial costate satisfies

r(η)=0.\boxed{ \boldsymbol{r}(\boldsymbol{\eta}^*)=\boldsymbol{0}. }

The shooting method therefore solves the nonlinear root-finding problem

η=arg{r(η)=0}.\boldsymbol{\eta}^* = \arg\left\{ \boldsymbol{r}(\boldsymbol{\eta})=\boldsymbol{0} \right\}.

A Newton update takes the form

ηk+1=ηk[rη]1r(ηk).\boldsymbol{\eta}_{k+1} = \boldsymbol{\eta}_k - \left[ \frac{\partial \boldsymbol{r}}{\partial \boldsymbol{\eta}} \right]^{-1} \boldsymbol{r}(\boldsymbol{\eta}_k).

Backward shooting

One may instead guess the unknown terminal state:

x(tf)=ζ,\boldsymbol{x}(t_f)=\boldsymbol{\zeta},

construct

λ(tf)=Sfζ,\boldsymbol{\lambda}(t_f)=\boldsymbol{S}_f\boldsymbol{\zeta},

and integrate backward. The residual is then

r(ζ)=x(0;ζ)x0.\boldsymbol{r}(\boldsymbol{\zeta}) = \boldsymbol{x}(0;\boldsymbol{\zeta})-\boldsymbol{x}_0.

Both approaches seek a boundary guess that causes the integrated trajectory to hit the boundary conditions at the opposite endpoint.

Shooting iterates between a boundary-data guess, trajectory integration, residual evaluation, and guess update.

Figure 1:Shooting iterates between a boundary-data guess, trajectory integration, residual evaluation, and guess update.

Why Shooting Can Be Numerically Unstable

Consider the scalar problem

J=12sfx2(tf)+120tf(qx2+ru2)dt,J = \frac{1}{2}s_f x^2(t_f) + \frac{1}{2}\int_0^{t_f} \left( q x^2+r u^2 \right)\,\mathrm{d} t,

subject to

x˙=ax+bu,x(0)=x0,\dot{x}=ax+bu, \qquad x(0)=x_0,

where

q>0,r>0,b0.q>0, \qquad r>0, \qquad b\neq 0.

The state–costate system is

ddt[xλ]=[ab2/rqa]F[xλ].\frac{\,\mathrm{d}}{\,\mathrm{d} t} \begin{bmatrix} x\\ \lambda \end{bmatrix} = \underbrace{ \begin{bmatrix} a & -b^2/r\\ -q & -a \end{bmatrix} }_{\boldsymbol{F}} \begin{bmatrix} x\\ \lambda \end{bmatrix}.

The characteristic equation is

det(μIF)=0.\det(\mu\boldsymbol{I}-\boldsymbol{F})=0.

Thus,

det[μab2/rqμ+a]=0,\det \begin{bmatrix} \mu-a & b^2/r\\ q & \mu+a \end{bmatrix} =0,

which gives

μ2a2b2qr=0.\mu^2-a^2-\frac{b^2q}{r}=0.

Therefore,

μ1,2=±a2+b2qr.\boxed{ \mu_{1,2} = \pm \sqrt{ a^2+\frac{b^2q}{r} }. }

The eigenvalues are real, nonzero, and symmetric about the origin.

Let

μ=a2+b2qr>0.\mu = \sqrt{ a^2+\frac{b^2q}{r} }>0.

Then the general solution contains one growing and one decaying mode:

p(t)=c1eμtv1+c2eμtv2.\boldsymbol{p}(t) = c_1e^{\mu t}\boldsymbol{v}_1 + c_2e^{-\mu t}\boldsymbol{v}_2.

Forward integration

During forward integration, the mode

eμte^{\mu t}

grows exponentially. Any small component of the initial-guess error along this mode is amplified.

Backward integration

During backward integration, the mode that decays in forward time becomes unstable. Thus, the term associated with

eμte^{-\mu t}

grows when time is traversed backward.

Therefore, the state–costate system is unstable in either integration direction.

Consequences for Numerical Optimal Control

Shooting methods may fail or become poorly conditioned when:

These limitations motivate more robust methods such as:

Summary

The major conclusions are:

  1. In the finite-horizon LQ problem, the costate can be written as

λ(t)=S(t)x(t).\boldsymbol{\lambda}(t)=\boldsymbol{S}(t)\boldsymbol{x}(t).
  1. The matrix S(t)\boldsymbol{S}(t) satisfies a Riccati differential equation integrated backward from

S(tf)=Sf.\boldsymbol{S}(t_f)=\boldsymbol{S}_f.
  1. The finite-horizon feedback gain is time varying.

  2. The infinite-horizon LQR produces the algebraic Riccati equation.

  3. The relevant algebraic Riccati solution is the stabilizing symmetric solution.

  4. The resulting LQR feedback gain is constant.

  5. A two-point boundary-value problem can be solved iteratively using shooting.

  6. Shooting may become numerically unstable because the Hamiltonian state–costate system contains both growing and decaying modes.

Connection. LQR is unusually tractable; for general nonlinear problems the same necessary conditions form a boundary-value problem that must be solved numerically.