IE437 · Data-Driven Decision Making and Control — Lecture 9

Optimal Control & Planning

The control-theoretic origin of sequential decision making
Jinkyoo Park · KAIST
Lecture 7 solved the dynamic optimum with operations research. This is the other tradition.
Optimal Control & PlanningLecture 9

Where we are — the other column of the map

Previous step This chapter's question
Lecture 7 introduced Bellman reasoning for sequential decisions. Now use continuous state/action models to compute feedback.

Control and dynamic programming overlap. We compare mathematical tools and assumptions, not mutually exclusive academic families.

Compute a feedback gain and compare the guarantees of the three mathematical views.
Lecture 9 · Optimal Control & Planning2 / 55
Optimal Control & PlanningLecture 9

Learning route — solve a small control problem first

Bring: Derivatives, matrix multiplication and the Bellman principle.

First pass What to do
Follow the idea One-step control → LQR feedback → interpret HJB → interpret Pontryagin
Work without the solution Compute a feedback gain and compare the guarantees of the three mathematical views.
Return later Full HJB, Riccati and Pontryagin derivations are after the main route.
For the temperature thread: predict → calculate → reveal and check → change one condition. Complete the core calculation before reading the research extensions.
Lecture 9 · Optimal Control & Planning3 / 55
Act 1

It is the same problem

Q1. Control theory writes different symbols. Is it solving anything different?
ACT 1It is the same problemLecture 9

Discrete-time optimal control — the problem, stated

Q1 Same problem?Q2 LQR feedback?Q3 HJB meaning?Q4 Two views?

Choose a control to minimise an accumulated cost subject to deterministic dynamics:

L(u)=∑k=0K−1gk(xk,uk)+gK(xK),xk+1=fk(xk,uk),uk∈UkL(u) = \sum_{k=0}^{K-1} g_k(x_k,u_k) + g_K(x_K), \qquad x_{k+1} = f_k(x_k,u_k), \quad u_k \in U_k

Read the third clause carefully, because it is the whole lecture in one symbol:

uk=γk(xk),γk a permissible control strategy at stage ku_k = \hl{\gamma_k(x_k)}, \qquad \gamma_k \text{ a \textit{permissible control strategy} at stage } k

What we seek is not a sequence of numbers u0,…,uK−1u_0,\dots,u_{K-1} but a rule γk\gamma_k from state to control. Control theory insists on this from its very first slide, for the same reason Lecture 7 wanted a policy rather than a plan: a rule is still valid from wherever the system actually lands.

Lecture 9 · Optimal Control & Planning5 / 55
ACT 1It is the same problemLecture 9

The same 2×2, one level downLecture 7 set this out as two tables — here it is drawn whole

The course cube puts Lectures 7 and 9 in one cell: single agent, dynamic, model-based. Zoom into that cell and two finer coordinates appear — how large the action set is, and whether time ticks or flows. Lineage A is the finite column; lineage B is the infinite column, and deleting the model is a single vertical arrow that acts on both at once.

Lecture 7 read this grid across the columns, to say what separates it from today. Read it down the rows instead and it says something Lecture 7 could not yet: the model axis is one move, made twice — and the empty cells are outside our syllabus, not empty research fields.

Lecture 9 · Optimal Control & Planning6 / 55
ACT 1It is the same problemLecture 9

Dynamic programming, in control's notation

Define the cost-to-go from any state xx at any time kk:

V(k,x)=min⁡γk,…,γK−1[∑i=kK−1gi(xi,ui)+gK(xK)],xk=xV(k,x) = \min_{\gamma_k,\dots,\gamma_{K-1}}\Big[\sum_{i=k}^{K-1}g_i(x_i,u_i)+g_K(x_K)\Big],\quad x_k=x
Bellman's principle of optimalityquoted as the source deck quotes it

An optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision.

Applied directly, it gives the recursion — and it is Lecture 7's, letter for letter:

V(k,x)=min⁡uk∈Uk{ gk(x,uk)  +  V(k+1,  fk(x,uk)) }V(k,x) = \min_{u_k \in U_k}\Big\{\, g_k(x,u_k) \;+\; V\big(k+1,\; \hl{f_k(x,u_k)}\big) \,\Big\}

Each uk∗u_k^* is read off as the argument attaining the right-hand side — what the source deck calls a single-shot optimisation. That phrase is worth keeping: a problem that unfolds over time has been reduced to one static optimisation performed once per instant. We meet the move again in Act 2 and again in Act 4.

Lecture 9 · Optimal Control & Planning7 / 55
ACT 1It is the same problemLecture 9

Where the expectation went

Lecture 7 — the Bellman backup

V(s)=max⁡a∑s′T(s,a,s′)[R+γV(s′)]V(s) = \max_a \sum_{s'} \hl{T(s,a,s')}\big[R + \gamma V(s')\big]
  • a distribution over successors,
  • a finite set of actions to enumerate,
  • reward, and max⁡\max.

Lecture 9 — the DP recursion

V(k,x)=min⁡u{gk(x,u)+V(k+1,fk(x,u))}V(k,x) = \min_{u} \big\{ g_k(x,u) + V\big(k{+}1, \hl{f_k(x,u)}\big) \big\}
  • one deterministic successor,
  • a continuum of controls,
  • cost, and min⁡\min.

Two of those three differences are cosmetic. The expectation ∑s′P[⋯ ]\sum_{s'}P[\cdots] collapses to a single point because the dynamics are deterministic — put the noise back and it returns unchanged. Cost versus reward is a sign.

Solve backward in time; optimal sub-plans compose into an optimal plan. The logic is identical.
Lecture 9 · Optimal Control & Planning8 / 55
ACT 1It is the same problemLecture 9

One-step control — spend effort now to reduce the final error

Let x1=x0+ux_1=x_0+u, x0=2x_0=2, and minimize J(u)=u2+x12J(u)=u^2+x_1^2. There are no input constraints.

J(u)=u2+(2+u)2=2(u+1)2+2.J(u)=u^2+(2+u)^2=2(u+1)^2+2.
control final state effort cost final-state cost total
0 2 0 4 4
−1 1 1 1 2
−2 0 4 0 4
The optimum is u∗=−1u^*=-1. Reaching zero immediately costs too much effort. For any initial state, the same calculation gives the feedback rule u∗(x)=−x/2u^*(x)=-x/2.
Lecture 9 · Optimal Control & Planning9 / 55
ACT 1It is the same problemLecture 9

Temperature thread — derive a feedback commandshared teaching example · predict before revealing the calculation

For a measured temperature error x, minimize the known one-step cost c(u)=(x+u)2+u2c(u)=(x+u)^2+u^2. Allow a signed command for heating or cooling in this unconstrained version.

Predict: As the room gets colder, should the heating command increase? Find a rule valid for any x.

Calculate and check. dc/du=2(x+u)+2u=0dc/du=2(x+u)+2u=0 gives u∗(x)=−x/2u^*(x)=\mathbf{-x/2}. At x=−2x=-2, the command is 1. The rule is feedback: it recomputes the action from the current state.

This is a finite, one-step LQ problem. Its gain 1/2 need not equal the gain of an infinite-horizon problem.
Lecture 9 · Optimal Control & Planning10 / 55
ACT 1It is the same problemLecture 9

Try it — the measured error differs from the planned errorwork independently · reveal only after writing an answer

A previous prediction suggested the next error would be −1, so a precomputed command was 0.5. The next measurement instead gives x = −1.5. Using the same one-step objective, calculate the feedback command.

Check your answer. u∗=−(−1.5)/2=0.75u^*=-(-1.5)/2=\mathbf{0.75}. Reusing 0.5 ignores the new state measurement. Feedback revises the decision; it does not require the previous prediction to have been correct.

Distinguish an action sequence computed once from a state-to-action rule used after each measurement.
Lecture 9 · Optimal Control & Planning11 / 55
ACT 1It is the same problemLecture 9

The key computational difference — optimize over a continuum

In Lecture 7 the inner max⁡a\max_a was a loop: try each of the finitely many actions, keep the best. Here UkU_k is a continuum, so the inner minimisation

min⁡u∈Uk gk(x,u)+V(k+1,fk(x,u))⏟a function of u\min_{u \in U_k}\ \underbrace{g_k(x,u) + V\big(k+1, f_k(x,u)\big)}_{\text{a function of } u}

is not a loop at all. It is an optimisation problem — Lecture 1's template, nested inside every backup, once per state and once per time step.

So the continuous action space is not a nuisance detail; it is the structural fact that makes this a different tradition. Everything that follows is a way of coping with it: first solve a quadratic problem explicitly (Act 2), then interpret the smooth Bellman condition (Act 3), or characterise its solution along one trajectory rather than everywhere (Act 4).

Same problem, same principle — but the backup now contains an optimisation, not a loop.
Lecture 9 · Optimal Control & Planning12 / 55
ACT 1It is the same problemLecture 9

Check — the same problem, other clothes

Optimal control minimises a cost ∫c(x,u) dt\int c(x,u)\,dt subject to dynamics x˙=f(x,u)\dot{x} = f(x,u). Read as an MDP, what plays the role of the reward?

State is state, control is action, dynamics are the transition, and cost is negative reward. Operations research maximised a return; control theory minimised a cost; both are solving the same object. Keeping the translation table in view is what makes the second half of this course two parallel stories rather than two unrelated ones.

Lecture 9 · Optimal Control & Planning13 / 55
Act 2

Compute linear-quadratic feedback

Q2. Linear dynamics, quadratic cost: a useful case whose value function can be represented by a matrix.
ACT 2Compute linear-quadratic feedbackLecture 9

LQR — quadratic cost, linear feedback

Use a finite horizon, linear dynamics and unconstrained controls. Assume Q,Qf⪰0Q,Q_f\succeq0 and R≻0R\succ0.

x˙=Ax+Bu,J=∫0T(x⊤Qx+u⊤Ru) dt+x(T)⊤Qfx(T).\dot x=Ax+Bu,\qquad J=\int_0^T(x^\top Qx+u^\top Ru)\,dt+x(T)^\top Q_fx(T).

The optimal value and feedback law take the form

V(t,x)=x⊤P(t)x,u∗(t,x)=−K(t)x,K(t)=R−1B⊤P(t).V(t,x)=x^\top P(t)x,\qquad u^*(t,x)=-K(t)x,\qquad K(t)=R^{-1}B^\top P(t).
Object How to read it
P(t)P(t) Future cost attached to the current state; compute backward from P(T)=QfP(T)=Q_f.
K(t)K(t) Feedback gain: turn the measured state into a control command.
The Riccati equation computes PP. First verify a scalar feedback law by ordinary calculus; the full matrix derivation follows the HJB discussion in the appendix.
Lecture 9 · Optimal Control & Planning15 / 55
ACT 2Compute linear-quadratic feedbackLecture 9

Read the gain with numbers — a scalar infinite-horizon example

Let x˙=u\dot x=u and J=∫0∞(x2+u2) dtJ=\int_0^\infty(x^2+u^2)\,dt. Consider stabilizing controls with x(t)→0x(t)\to0.

Complete a square: since d(x2)/dt=2xud(x^2)/dt=2xu,

x2+u2=(u+x)2−d(x2)dt.x^2+u^2=(u+x)^2-\frac{d(x^2)}{dt}.

Integrating gives a lower bound that we can attain:

J=x(0)2+∫0∞(u+x)2 dt  ≥  x(0)2.J=x(0)^2+\int_0^\infty(u+x)^2\,dt\;\ge\;x(0)^2.

Choose u=−xu=-x. The square is zero, so this control attains the bound. Starting from x(0)=2x(0)=2, the state is x(t)=2e−tx(t)=2e^{-t} and the optimal cost is 4.

The gain is 1: error 2 gives command −2, and error 0.5 gives command −0.5. This infinite-horizon continuous-time problem differs from the earlier one-step heater problem.
Lecture 9 · Optimal Control & Planning16 / 55
ACT 2Compute linear-quadratic feedbackLecture 9

Conditions behind the tidy answer

Can we control unstable motion?

For xt+1=2xt+0utx_{t+1}=2x_t+0u_t, x0=1x_0=1, and state cost xt2x_t^2, every control has infinite cost.

Stabilizable means every unstable mode can be controlled. Full controllability is stronger than necessary.

Does the cost see unstable motion?

Detectable means an unstable mode cannot remain invisible to the state penalty QQ.

Together with Q⪰0Q\succeq0, R≻0R\succ0, this gives the standard stabilizing infinite-horizon LQR result.

Positive RR makes the unconstrained minimization strictly convex. If RR is singular, a minimum may still exist, but the displayed inverse formula does not apply. Input constraints also change the solution.
Lecture 9 · Optimal Control & Planning17 / 55
ACT 2Compute linear-quadratic feedbackLecture 9

LQR, runa double integrator — position and velocity as the state, force as the input

A=[0100]A=\left[\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right], B=[01]B=\left[\begin{smallmatrix}0\\1\end{smallmatrix}\right] — a mass you can push. Turn the dials and read the gain. The Riccati integration on the right flattens onto the algebraic solution, which is drawn as a dashed line from the closed form k1=q/rk_1=\sqrt{q/r}, k2=(2qr+1)/rk_2=\sqrt{(2\sqrt{qr}+1)/r}. Cheap control (RR small) buys speed with a violent input; expensive control is gentle and slow. There is no tuning here — the dials are the objective.
Lecture 9 · Optimal Control & Planning18 / 55
ACT 2Compute linear-quadratic feedbackLecture 9

Why LQR is the cornerstone

  • Globally optimal, and linear. For the stated unconstrained LQ problem, the Riccati solution is globally optimal. Computing that matrix usually requires numerical integration or an algebraic solver.
  • A useful local approximation. Linearise any smooth problem about a trajectory, take a quadratic approximation of the cost, solve the resulting LQR, re-linearise, repeat: that is iLQR / DDP, and it is the backbone of trajectory optimisation and of model-based planning in Lecture 11. (Jacobson & Mayne, 1970)
  • The target the data-driven world reaches for. In Lecture 10, DDPG's learned actor μθ(s)\mu_\theta(s) occupies exactly the place of this gain KK — for a system whose AA and BB are unknown.
Hold u=−Kxu=-Kx in view: it is a known-model feedback law to compare with a learned actor. Policy-gradient methods optimize a chosen policy class from experience; they do not automatically recover this LQR optimum.
Lecture 9 · Optimal Control & Planning19 / 55
ACT 2Compute linear-quadratic feedbackLecture 9

Check — why LQR is the exception that matters

For linear dynamics and a quadratic cost, the optimal controller is u=−Kxu = -Kx, with KK from the Riccati equation. Why does this single special case deserve a whole act?

Almost nothing is truly linear-quadratic. What LQR gives is a solvable local approximation: linearise the dynamics and take a quadratic expansion of the cost around the current trajectory, solve exactly, step, and repeat. That is iLQR, and it is how the closed form earns its place — as the inner loop of methods for problems that are not LQ at all.

Lecture 9 · Optimal Control & Planning20 / 55
Act 3

Interpret continuous-time Bellman reasoning

Q3. Let the time step shrink to nothing. What does the Bellman equation become?
ACT 3Interpret continuous-time Bellman reasoningLecture 9

Continuous time — the problem, and the cost-to-go

Q1 Same problem?Q2 LQR feedback?Q3 HJB meaning?Q4 Two views?

Time no longer ticks; it flows.

L(u)=∫0Tg(t,x(t),u(t)) dt  +  q(T,x(T)),x˙(t)=f(t,x(t),u(t)),x(0)=x0L(u) = \int_0^T g\big(t,x(t),u(t)\big)\,dt \;+\; q\big(T,x(T)\big), \qquad \dot x(t) = f\big(t,x(t),u(t)\big),\quad x(0)=x_0

with u(t)=γ(t,x(t))∈Uu(t) = \gamma\big(t,x(t)\big) \in U and γ∈Γ\gamma \in \Gamma, the class of admissible feedback strategies.

The cost-to-go is defined exactly as before, over the remaining interval:

V(t,x)=min⁡u(s),  t≤s≤T [∫tTg(s,x(s),u(s)) ds+q(T,x(T))],V(T,x)=q(T,x)V(t,x) = \min_{u(s),\; t\le s\le T}\ \Big[ \int_t^T g\big(s,x(s),u(s)\big)\,ds + q\big(T,x(T)\big)\Big], \qquad \hl{V(T,x) = q(T,x)}

The boundary condition is the terminal cost. In Lecture 7 the recursion was seeded at V(K,⋅)=gKV(K,\cdot)=g_K; here it is seeded at t=Tt=T. Same seed, same backward direction.

Lecture 9 · Optimal Control & Planning22 / 55
ACT 3Interpret continuous-time Bellman reasoningLecture 9

The claim, checkedshrink Δt on a discrete backup and watch it land on the PDE

A scalar problem whose HJB solution is known exactly: x˙=x+u\dot x = x + u, cost ∫02(x2+u2) dt\int_0^2 (x^2+u^2)\,dt, so V(t,x)=P(t)x2V(t,x)=P(t)x^2 with PP solving a Riccati ODE. The discrete backup of Act 1 is run on the Euler-discretised system at step Δt\Delta t and its PkP_k plotted against the exact curve. Halve Δt\Delta t and the error halves — first order, exactly as an Euler step should be.
Lecture 9 · Optimal Control & Planning23 / 55
ACT 3Interpret continuous-time Bellman reasoningLecture 9

What HJB buys — a certificate, not just a formula

Sufficient, and global

Find a continuously differentiable VV satisfying the PDE and terminal condition, and an admissible control attaining its minimum: the verification argument proves optimality — and the optimal control falls out of a static, pointwise minimisation:

u∗(t)=arg min⁡u∈U{∂xV f(t,x,u)+g(t,x,u)}u^*(t) = \argmin_{u\in U}\Big\{ \partial_x V\, f(t,x,u) + g(t,x,u)\Big\}

Feedback, everywhere

VV is a field over the whole state space, so the rule it generates is credible from any state the system actually reaches — not only the one you predicted.

And it extends to stochastic dynamics with one extra term, 12tr(σσ⊤∂xxV)\tfrac12\mathrm{tr}\big(\sigma\sigma^\top \partial_{xx}V\big).

"Sufficient" is a strong word and it is earned: a solution of the PDE is a certificate that every other admissible trajectory costs at least as much. The four-line verification argument is Backup 2, and it is the only place in this lecture where something is proved optimal rather than merely derived.

Lecture 9 · Optimal Control & Planning24 / 55
ACT 3Interpret continuous-time Bellman reasoningLecture 9

And what it costs

HJB is a nonlinear PDE over the entire state space.

Three prices, and each is a limitation we will spend the rest of the course working around:

  • It needs the model. ff and gg appear explicitly inside the minimisation. Delete them and there is no equation left to solve — which is Lecture 10.
  • It assumes VV is differentiable. Often it is not; the honest fix is a weaker notion of solution (viscosity solutions), which buys existence at the cost of the clean formula. (Crandall & Lions, 1983)
  • It does not survive dimension. A value field over x∈Rnx\in\R^n is exponentially large — the same curse Lecture 7's table faced, now with the table replaced by a continuum.

So HJB is the characterisation, rarely the computation. LQR is a particularly useful solvable case: a quadratic value function closes the equation. Other special problems also admit explicit solutions.

Lecture 9 · Optimal Control & Planning25 / 55
ACT 3Interpret continuous-time Bellman reasoningLecture 9

Check — what happens to Bellman in continuous time

Shrink the time step Δt→0\Delta t \to 0 in the discrete Bellman equation. What do you get?

The recursion becomes a PDE. HJB is the Bellman equation with the discrete step taken to its limit, and it inherits both the strength — a sufficient condition for global optimality — and the weakness, since solving a PDE over a high-dimensional state space is exactly as hard as the curse of dimensionality suggests. The earlier LQR example avoids a state-space grid because its value has a quadratic form. The next section studies conditions along one trajectory instead.

Lecture 9 · Optimal Control & Planning26 / 55
Act 4

The other view

Q4. HJB carries a value field over every state. Is there a way in that follows only one trajectory?
ACT 4The other viewLecture 9

Adjoin the dynamics — the Hamiltonian and the costate

Q1 Same problem?Q2 LQR feedback?Q3 HJB meaning?Q4 Two views?

HJB is the Eulerian view: stand still and watch a field V(t,x)V(t,x) over all states. There is a Lagrangian view: ride the optimal trajectory and enforce the dynamics as a constraint along it.

This is Lecture 1's Lagrangian move, applied once per instant. Adjoin x˙=f\dot x = f with a multiplier λ(t)\lambda(t) — the costate — and collect the terms into the Hamiltonian:

H(t,x,u,λ)  =  g(t,x,u)  +  λ⊤f(t,x,u)H(t,x,u,\lambda) \;=\; g(t,x,u) \;+\; \lambda^\top f(t,x,u)

One multiplier per instant, and a whole function λ(⋅)\lambda(\cdot) instead of a vector. The constraint set of Lecture 1 has become the dynamics themselves.

Lecture 9 · Optimal Control & Planning28 / 55
ACT 4The other viewLecture 9

The necessary conditions

For a smooth, fixed-horizon problem with free terminal state and no state constraints, the normal minimum principle gives these necessary conditions:

x˙∗=∂H∂λ=f,λ˙∗=−∂H∂x,λ(T)=∂q∂x∣x∗(T),u∗=arg min⁡u∈UH(t,x∗,u,λ∗)\dot x^* = \frac{\partial H}{\partial \lambda} = f, \qquad \hl{\dot\lambda^* = -\frac{\partial H}{\partial x}}, \qquad \lambda(T) = \frac{\partial q}{\partial x}\Big|_{x^*(T)}, \qquad u^* = \argmin_{u\in U} H(t,x^*,u,\lambda^*)

Read the shape of it. The state runs forward from x(0)=x0x(0)=x_0; the costate runs backward from λ(T)\lambda(T); and they are coupled. This is a two-point boundary-value problem, not an initial-value problem — you cannot simply integrate.

And the last condition is the familiar move again: dynamic optimisation reduced to a static minimisation of HH, freshly at each instant.
Lecture 9 · Optimal Control & Planning29 / 55
ACT 4The other viewLecture 9

What the costate actually is

Under the smooth optimal-control assumptions, the costate equals the value gradient along an optimal trajectory:

λ(t)=∂V∂x(t,x∗(t)).\lambda(t)=\frac{\partial V}{\partial x}\big(t,x^*(t)\big).
View What it carries
HJB The value function over time and state; its gradient is available wherever the smooth solution is known.
Pontryagin State and costate along one candidate trajectory, with endpoint conditions.

For the scalar quadratic value V(t,x)=P(t)x2V(t,x)=P(t)x^2, the costate is λ=2P(t)x\lambda=2P(t)x. At the infinite-horizon solution P=1P=1, a small state change Δx\Delta x changes the value by approximately 2xΔx2x\Delta x.

The costate measures sensitivity to the state. It is not automatically the gradient with respect to a policy's parameters. A Pontryagin candidate still needs the stated optimality checks.
Lecture 9 · Optimal Control & Planning30 / 55
ACT 4The other viewLecture 9

What does a costate measure? Use the same scalar example

For x˙=u\dot x=u and V(x)=x2V(x)=x^2, the costate is λ=Vx=2x\lambda=V_x=2x.

At x=2x=2, λ=4\lambda=4: increasing the state by 0.01 raises optimal future cost by approximately 4(0.01)=0.044(0.01)=0.04. The exact change is 2.012−22=0.04012.01^2-2^2=0.0401.

H=x2+u2+λu,Hu=2u+λ=0.H=x^2+u^2+\lambda u,\qquad H_u=2u+\lambda=0.

Thus u=−λ/2=−xu=-\lambda/2=-x, the same feedback law as before.

A costate is a marginal future cost. Pontryagin carries this sensitivity along a trajectory instead of solving for the whole value field.
Lecture 9 · Optimal Control & Planning31 / 55
ACT 4The other viewLecture 9

Shooting — two views, one optimumguess the costate, integrate, and see whether it lands

The same problem the HJB widget solved: x˙=x+u\dot x = x+u, ∫02(x2+u2)dt\int_0^2(x^2+u^2)dt. Guess λ(0)\lambda(0), integrate the coupled equations forward, and check whether λ(2)=0\lambda(2)=0 as the transversality condition demands. Exactly one guess lands — and it is λ∗(0)=2P(0)x0\lambda^*(0)=2P(0)x_0, the value gradient from the other method. The dashed trace is a control that does not minimise HH pointwise — and its Hamiltonian, conserved to fourteen digits when the principle is obeyed, drifts.
Lecture 9 · Optimal Control & Planning32 / 55
ACT 4The other viewLecture 9

One scalar system, three views of the same answerteaching comparison · continuous-time infinite-horizon LQR

Use x˙=u\dot x=u, cost ∫0∞(x2+u2) dt\int_0^\infty(x^2+u^2)\,dt, and the stabilizing infinite-horizon solution.

View Calculation Answer
HJB Try V(x)=Px2V(x)=Px^2: 0=min⁡u(x2+u2+2Pxu)0=\min_u(x^2+u^2+2Pxu) u=−Pxu=-Px, then 1−P2=01-P^2=0
LQR / Riccati A=0,B=1,Q=R=1A=0,B=1,Q=R=1 gives 1−P2=01-P^2=0 choose stabilizing P=1P=1
Pontryagin H=x2+u2+λuH=x^2+u^2+\lambda u, Hu=0H_u=0 u=−λ/2u=-\lambda/2; along this solution λ=2x\lambda=2x

Thus all three are consistent with u=−xu=-x, x(t)=x0e−tx(t)=x_0e^{-t} and V(x0)=x02V(x_0)=x_0^2. At x0=2x_0=2, the total cost is 4.

Agreement here comes from the LQ structure and the stabilizing solution. Pontryagin's conditions alone do not certify an arbitrary nonlinear candidate as globally optimal. Compare the mathematical guarantees as well as the answer.
Lecture 9 · Optimal Control & Planning33 / 55
ACT 4The other viewLecture 9

HJB versus Pontryagin — distinguish what each certifies

HJB (dynamic programming) Pontryagin (minimum principle)
view Eulerian — a value field V(t,x)V(t,x) Lagrangian — one trajectory x∗(t)x^*(t)
logic sufficient, over all (t,x)(t,x) necessary, along the optimum
output a feedback law γ(t,x)\gamma(t,x) an open-loop u∗(t)u^*(t), from a costate ODE
mathematics a nonlinear PDE a two-point boundary-value ODE
stochastic second-order HJB stochastic maximum principles exist; beyond this lecture
cost the curse of dimensionality one trajectory; necessity alone does not certify a minimum

Feedback beats an open-loop plan for the reason Lecture 7 already gave: γ(t,x)\gamma(t,x) is valid from any state you actually reach, while u∗(t)u^*(t) is valid only along the trajectory you predicted. But Pontryagin scales where HJB cannot, which motivates trajectory methods, alongside direct optimization approaches. Its machinery returns in Lecture 10 — REINFORCE is a trajectory view — and in Lecture 11, where a learned policy imitates an iLQR teacher.

Lecture 9 · Optimal Control & Planning34 / 55
ACT 4The other viewLecture 9

Check — the parallel about to be drawn

Lecture 8 deleted PP and RR from the MDP and got value-based RL. Lecture 10 deletes what from optimal control?

The two lineages lose their model in exactly the same way, one lecture apart. Delete PP from dynamic programming and you must sample the expectation; delete ff from optimal control and you can no longer differentiate through the rollout, so you must estimate the gradient from trajectories instead. Same deletion, two different repairs — and Lecture 11 gets the model back.

Lecture 9 · Optimal Control & Planning35 / 55
CLOSING

Closing

Both model-based origins are now on the table. Each one leaned entirely on knowing ff.
CLOSINGLecture 9

Where we are — three tools, different guarantees

Lineage A · OR / Dynamic Programming
Lineage B · Control Theory
Model-based
(origin)
MDP & Dynamic ProgrammingLecture 7
Optimal Control / PlanningLecture 9
Data-driven
(extension)
Value-Based RLLecture 8
Policy-Based RLLecture 10

Three mathematical tools with different roles; numerical solutions still need checking:

what it gives what it needs
LQR linear feedback u=−Kxu=-Kx; compute the Riccati matrix the stated unconstrained LQ model and horizon assumptions
HJB a value over (t,x)(t,x) and an optimal feedback law dynamics, cost, terminal condition and a smooth admissible solution
Pontryagin necessary conditions for candidate trajectories ff, gg, and ∂xf\partial_x f
HJB can verify an admissible solution; LQR solves its special case; Pontryagin provides necessary conditions. All use the dynamics.
Lecture 9 · Optimal Control & Planning37 / 55
CLOSINGLecture 9

What we hand on

Lecture 9 leavesthe feedback law γ(x)\gamma(x), and u=−Kxu = -Kx
Lecture 10 deletes ffand learns a parameterised feedback controller from data

Lecture 10 follows the same teaching move as Lecture 8: keep the decision objective, but learn from experience when a complete model is unavailable. The linear gain KK is one feedback policy. A network μθ(s)\mu_\theta(s) is a more general policy class trained using sampled performance; it is not guaranteed to recover the LQR solution or a global optimum.

A learned actor can avoid a fresh continuous action search at every step. The difficulty moves into training and evaluating that actor.

Lecture 9 · Optimal Control & Planning38 / 55
Bellman and optimal control study the same sequential decision structure.
HJB can verify a value function and feedback law; LQR solves a structured special case; Pontryagin supplies necessary conditions for candidate trajectories. Their guarantees and computational requirements differ.
Questions?
Two traditions, one destination. Bellman wrote the same equation twice — once as a sum over a table, once as a partial differential equation — and LQR gives a central case where the value field reduces to a matrix. Everything after this is what happens when you are no longer told ff.
APPENDIX

Backup slides

Complete arguments, kept out of the narrative.
APPENDIXBackup slidesLecture 9

Reading guide — solve the same system using different mathematical toolsone main idea to explain, one comparison, one application

Role Read or revisit Question to answer
Core Tedrake, Underactuated Robotics: selected LQR sections and this lecture's Bellman/HJB derivation Why does the linear-quadratic special case admit a tractable controller?
Compare HJB verification, Riccati/LQR and Pontryagin necessary conditions Which method gives a value function, a gain, or candidate trajectory conditions?
Apply One scalar system solved three ways, then the original control examples Do the methods agree under the stated LQ assumptions?
The same small problem is the main comparison. HJB and Pontryagin derivations are advanced reading; their historical importance does not make every technical step a prerequisite for computing feedback.
Lecture 9 · Optimal Control & Planning42 / 55
APPENDIXBackup slidesLecture 9

Backup 1 — the HJB equation, derived in one step

Start from Bellman's optimality principle over a short interval δ\delta:

V(t,x)=min⁡u∈U{ g(t,x,u) δ+V(t+δ,  x+f(t,x,u) δ) }+o(δ)V(t,x) = \min_{u\in U}\Big\{\, g(t,x,u)\,\delta + V\big(t+\delta,\; x + f(t,x,u)\,\delta\big) \,\Big\}+o(\delta)

Taylor-expand the second term about (t,x)(t,x):

V(t+δ, x+fδ)=V(t,x)+∂V∂t δ+∂V∂x f(t,x,u) δ+o(δ)V\big(t+\delta,\, x+f\delta\big) = V(t,x) + \frac{\partial V}{\partial t}\,\delta + \frac{\partial V}{\partial x}\, f(t,x,u)\,\delta + o(\delta)

Substitute, cancel V(t,x)V(t,x) from both sides — it is free of uu, so it passes through the minimum — divide by δ\delta and let δ→0\delta\to 0:

0=min⁡u∈U{g(t,x,u)+∂V∂t+∂V∂xf(t,x,u)}  ⟹  −∂V∂t=min⁡u∈U{∂V∂xf+g}■0 = \min_{u\in U}\Big\{ g(t,x,u) + \frac{\partial V}{\partial t} + \frac{\partial V}{\partial x} f(t,x,u)\Big\} \;\Longrightarrow\; -\frac{\partial V}{\partial t} = \min_{u\in U}\Big\{ \frac{\partial V}{\partial x} f + g\Big\} \qquad \blacksquare

Compare Lecture 7's derivation of the Bellman optimality equation: identical, with δ→0\delta \to 0 in place of a one-step sum. The minimising uu at each (t,x)(t,x) is the optimal feedback — a static pointwise minimisation embedded inside a PDE for VV.

Lecture 9 · Optimal Control & Planning43 / 55
APPENDIXBackup slidesLecture 9

Backup 2 — why HJB is sufficient: the verification argument

Suppose VV is continuously differentiable and satisfies HJB. Take any admissible γ∈Γ\gamma\in\Gamma, with trajectory xx, alongside an admissible minimizing candidate γ∗\gamma^* with x∗x^*, both at the same fixed terminal time TT. Also require V(T,x)=q(T,x)V(T,x)=q(T,x). Because the HJB right-hand side is a minimum over uu, the arbitrary control can only do worse, while the minimising control attains it exactly:

g(t,x,u)+∂xV f(t,x,u)+∂tV  ≥  0,g(t,x∗,u∗)+∂xV f(t,x∗,u∗)+∂tV  ≡  0g(t,x,u) + \partial_x V\, f(t,x,u) + \partial_t V \;\ge\; 0, \qquad\qquad g(t,x^*,u^*) + \partial_x V\, f(t,x^*,u^*) + \partial_t V \;\equiv\; 0

Along a trajectory the last two terms of each are exactly ddtV(t,x(t))\tfrac{d}{dt}V\big(t,x(t)\big), so integrating the first over [0,T][0,T] and the second over [0,T][0,T] gives

∫0Tg dt+V(T,x(T))−V(0,x0)  ≥  0,∫0Tg∗ dt+V(T,x∗(T))−V(0,x0)  =  0\int_0^{T} g\,dt + V\big(T,x(T)\big) - V(0,x_0) \;\ge\; 0, \qquad\qquad \int_0^{T} g^*\,dt + V\big(T,x^*(T)\big) - V(0,x_0) \;=\; 0

Eliminate V(0,x0)V(0,x_0) between them and apply the boundary condition V(T,x)=q(T,x)V(T,x)=q(T,x):

L(u)  =  ∫0Tg dt+q(T,x(T))  ≥  ∫0Tg∗ dt+q(T,x∗(T))  =  L(u∗)■L(u) \;=\; \int_0^{T} g\,dt + q\big(T,x(T)\big) \;\ge\; \int_0^{T} g^*\,dt + q\big(T,x^*(T)\big) \;=\; L(u^*) \qquad \blacksquare

A solution of the PDE is therefore a certificate: no admissible strategy beats γ∗\gamma^*, from any initial state. This is exactly what Pontryagin's conditions do not give — they are stationarity conditions, satisfied by every extremal, optimal or not.

Lecture 9 · Optimal Control & Planning44 / 55
APPENDIXBackup slidesLecture 9

Backup 3 — LQR: the Riccati derivation, both times

Continuous time. x˙=Ax+Bu\dot x = Ax+Bu, running cost g=x⊤Qx+u⊤Rug = x^\top Qx + u^\top Ru. Guess V(t,x)=x⊤PtxV(t,x)=x^\top P_t x, so ∂xV=2Ptx\partial_x V = 2P_t x and ∂tV=x⊤P˙tx\partial_t V = x^\top \dot P_t x. HJB reads

−x⊤P˙tx=min⁡u{ 2x⊤Pt(Ax+Bu)+x⊤Qx+u⊤Ru }-x^\top \dot P_t x = \min_u\Big\{\, 2x^\top P_t(Ax+Bu) + x^\top Qx + u^\top Ru \,\Big\}

Minimise over uu:   2B⊤Ptx+2Ru=0⇒u∗=−R−1B⊤Pt x\;2B^\top P_t x + 2Ru = 0 \Rightarrow u^* = -R^{-1}B^\top P_t\,x. Substitute back and match x⊤(⋅)xx^\top(\cdot)x for all xx:

−P˙t=A⊤Pt+PtA−PtBR−1B⊤Pt+Q-\dot P_t = A^\top P_t + P_t A - P_t B R^{-1}B^\top P_t + Q

Infinite horizon: P˙→0\dot P\to0, giving the algebraic Riccati equation A⊤P+PA−PBR−1B⊤P+Q=0A^\top P + PA - PBR^{-1}B^\top P + Q = 0 under the stabilizability and detectability assumptions above, with a unique PSD stabilizing solution, hence the constant gain K=R−1B⊤PK=R^{-1}B^\top P and u∗=−Kxu^*=-Kx.

Discrete time. With xt+1=Axt+Butx_{t+1}=Ax_t+Bu_t and V(z)=z⊤PzV(z)=z^\top Pz, the backup is z⊤Pz=min⁡w{z⊤Qz+w⊤Rw+(Az+Bw)⊤P(Az+Bw)}z^\top Pz = \min_w \{z^\top Qz + w^\top Rw + (Az+Bw)^\top P(Az+Bw)\}, whose minimiser is w∗=−(R+B⊤PB)−1B⊤PA zw^* = -(R+B^\top PB)^{-1}B^\top PA\,z. Substituting and matching for all zz:

P=Q+A⊤PA−A⊤PB(R+B⊤PB)−1B⊤PA,K=(R+B⊤PB)−1B⊤PAP = Q + A^\top PA - A^\top PB\big(R + B^\top PB\big)^{-1}B^\top PA, \qquad K = \big(R+B^\top PB\big)^{-1}B^\top PA

Under stabilizability and detectability, the ARE has a unique positive-semidefinite stabilizing solution. Started from P1=QP_1=Q, the recursion converges to it — value iteration, on a matrix. This discrete form is the one a learned critic implicitly targets in Lecture 10.

Lecture 9 · Optimal Control & Planning45 / 55
APPENDIXBackup slidesLecture 9

Backup 4 — Euler–Lagrange to the minimum principle

Adjoin the dynamics with a costate λ(t)\lambda(t) and form H=g+λ⊤fH = g + \lambda^\top f:

Jˉ=∫0T[H(t,x,u,λ)−λ⊤x˙] dt+q(x(T))\bar J = \int_0^T \big[ H(t,x,u,\lambda) - \lambda^\top \dot x \big]\,dt + q\big(x(T)\big)

Perturb the optimal control, u∗→u∗+ϵ p(t)u^* \to u^* + \epsilon\,p(t), and require dJˉdϵ∣ϵ=0=0\frac{d\bar J}{d\epsilon}\big|_{\epsilon=0}=0 for every admissible pp. Integrating by parts and collecting terms gives

x˙∗=∂H∂λ=f,λ˙∗=−∂H∂x,λ(T)=∂q∂x,∂H∂u=0\dot x^* = \frac{\partial H}{\partial\lambda} = f, \qquad \dot\lambda^* = -\frac{\partial H}{\partial x}, \qquad \lambda(T) = \frac{\partial q}{\partial x}, \qquad \frac{\partial H}{\partial u} = 0

From Euler–Lagrange to Pontryagin. Stationarity, ∂uH=0\partial_u H = 0, presumes uu is interior to UU. Pontryagin replaces it with the global condition u∗=arg min⁡u∈UH(t,x∗,u,λ∗)u^* = \argmin_{u\in U} H(t,x^*,u,\lambda^*), which remains valid on the boundary of UU — so it covers saturated actuators and bang-bang controls, where the derivative never vanishes.

A conserved quantity. Along a trajectory dHdt=∂H∂uu˙+∂H∂t\frac{dH}{dt} = \frac{\partial H}{\partial u}\dot u + \frac{\partial H}{\partial t}; for a time-invariant problem the second term vanishes and along a smooth interior extremal the first vanishes because Hu=0H_u=0. Thus HH is constant there; constancy alone does not prove optimality or that the minimum principle holds — the invariant the Act 4 widget plots. The minimum principle is also the standard way to state equilibrium conditions for dynamic games, which is how IE579 uses it.

Lecture 9 · Optimal Control & Planning46 / 55
APPENDIXBackup slidesLecture 9

Same problem, different dialect

The fixed point of the whole lecture, in one line:

Control theory and dynamic programming are two dialects for one dynamic optimum.

Where Lecture 7 had a stochastic transition over a finite set of states, control theory studies a system — usually continuous, often deterministic — driven by a control:

x˙(t)=f(t,x(t),u(t))orxk+1=fk(xk,uk),min⁡u  ∫0Tg dt  +  q(T,x(T))\dot x(t) = f\big(t, x(t), u(t)\big) \quad\text{or}\quad x_{k+1} = f_k(x_k,u_k), \qquad \min_u\; \int_0^T g\,dt \;+\; q\big(T,x(T)\big)

The goal is identical to Lecture 7's: not a plan, but a feedback law u=γ(t,x)u = \gamma(t,x) — the best control at every state and every time. The differences are of tradition, not of substance:

  • finite action set →\to continuous control u∈U⊆Rmu \in U \subseteq \R^m;
  • probabilistic transition T(s,a,s′)→T(s,a,s') \to differential dynamics ff;
  • sum →\to integral; reward and max⁡\max →\to cost and min⁡\min; a backup →\to a PDE.
Lecture 9 · Optimal Control & Planning47 / 55
APPENDIXBackup slidesLecture 9

One wall Lecture 8 left, and where it actually landsthe continuous-argmax problem — a meeting point, not the premise

Lecture 8 ended at a wall: with a continuum of actions, max⁡a′Q(s′,a′)\max_{a'} Q(s',a') cannot be found by enumerating a finite action list. A generic action maximum may require a costly numerical optimization.

That wall is not this lecture's starting point — we begin from Lecture 7, not Lecture 8. But it is one of the seams where the two lineages meet, and it is worth naming now because it recurs three times today:

where the same inner problem what happens to it
Act 1 · the DP backup min⁡u∈U{g+V(f(x,u))}\min_{u\in U}\{g + V(f(x,u))\} over a continuum it becomes a nested Lecture-1 problem
Act 2 · LQR the identical min⁡\min, with gg quadratic and ff linear solved in closed form, one line of algebra
Act 4 · Pontryagin min⁡u∈UH\min_{u\in U} H at each instant reduced to a static minimisation

Control theory has lived with the continuous arg⁡min⁡\arg\min since 1956, and its three answers are today's acts. Lecture 10's answer — learn a network that outputs the minimiser — is the fourth, and it is a descendant of the third.

Lecture 9 · Optimal Control & Planning48 / 55
APPENDIXBackup slidesLecture 9

The translation table — Lecture 7 in continuous time

Every object of dynamic programming has a control-theoretic twin. Keep this in sight all lecture.

Lecture 7 (OR / dynamic programming) Lecture 9 (control) The shift
transition T(s,a,s′)T(s,a,s') dynamics x˙=f(t,x,u)\dot x = f(t,x,u) probabilistic →\to differential
reward RR, maximise cost gg, minimise a sign, and a culture
value V(s)V(s), Q(s,a)Q(s,a) cost-to-go V(t,x)V(t,x) state →\to state and time
policy π(s)\pi(s) feedback law u=γ(t,x)u=\gamma(t,x), u=−Kxu=-Kx a rule, now continuous-valued
Bellman optimality (sum, max⁡\max) HJB equation (PDE, min⁡\min) a backup →\to a PDE
value iteration the Riccati recursion the same sweep, on a matrix
policy iteration / LP Riccati / Pontryagin a solver, not a sampler

Read it as one claim: HJB is the Bellman optimality equation made infinitesimal. Lecture 7's intuition transfers wholesale; only the calculus changes. And keep the last two rows in view — that is the seam where, in Lecture 10, samples will replace the solver.

Lecture 9 · Optimal Control & Planning49 / 55
EXTENSION

Derivations — HJB and Riccati in detail

Read after completing the main route.
EXTENSIONDerivations — HJB and Riccati in detailLecture 9

Shrink the step — and a backup becomes a PDE

Apply the principle of optimality over a short interval δ\delta, then let δ→0\delta \to 0:

V(t,x)  =  min⁡u∈U{ g(t,x,u) δ  +  V(t+δ,  x+f(t,x,u) δ) }+o(δ)V(t,x) \;=\; \min_{u\in U}\Big\{\, g(t,x,u)\,\delta \;+\; V\big(t+\delta,\; x + f(t,x,u)\,\delta\big) \,\Big\}+o(\delta)

Taylor-expand the second term, cancel V(t,x)V(t,x) from both sides, divide by δ\delta and take the limit. Assuming VV is continuously differentiable, what survives is the Hamilton–Jacobi–Bellman equation:

− ∂V(t,x)∂t  =  min⁡u∈U{ ∂V(t,x)∂x f(t,x,u)  +  g(t,x,u) },V(T,x)=q(T,x)-\,\frac{\partial V(t,x)}{\partial t} \;=\; \min_{u\in U}\Big\{\, \frac{\partial V(t,x)}{\partial x}\, f(t,x,u) \;+\; g(t,x,u) \,\Big\}, \qquad V(T,x)=q(T,x)
This is the Bellman optimality equation. It has become a nonlinear PDE for VV.

The full three-line derivation is Backup 1. Compare it with Lecture 7's: identical, with δ→0\delta\to 0 where Lecture 7 had a one-step sum.

Lecture 9 · Optimal Control & Planning51 / 55
EXTENSIONDerivations — HJB and Riccati in detailLecture 9

The Riccati equation, and a gain that stops moving

Substitute u∗u^* back and match x⊤(⋅)xx^\top(\cdot)x for all xx. What is left is an ODE in the matrix PtP_t alone:

−P˙t  =  A⊤Pt+PtA−PtBR−1B⊤Pt+Q,PT=Qf-\dot P_t \;=\; A^\top P_t + P_t A - P_t B R^{-1} B^\top P_t + Q, \qquad P_T = Q_f

the Riccati differential equation, integrated backwards in time — a backward sweep, exactly like Lecture 7's.

For infinite-horizon LQR, standard sufficient assumptions are stabilizability of (A,B)(A,B) and detectability of (Q1/2,A)(Q^{1/2},A), with R≻0R\succ0. The stabilizing Riccati solution gives a stationary value and gain:

A⊤P+PA−PBR−1B⊤P+Q=0(the algebraic Riccati equation)A^\top P + PA - PBR^{-1}B^\top P + Q = 0 \qquad\text{(the \hl{algebraic Riccati equation})}
And so the optimal controller is a matrix: u∗=−Kxu^* = -Kx,   K=R−1B⊤P\;K = R^{-1}B^\top P.

The discrete-time problem xt+1=Axt+Butx_{t+1}=Ax_t+Bu_t, J=∑(x⊤Qx+u⊤Ru)J=\sum(x^\top Qx + u^\top Ru) runs the identical argument and lands on P=Q+A⊤PA−A⊤PB(R+B⊤PB)−1B⊤PAP = Q + A^\top PA - A^\top PB(R+B^\top PB)^{-1}B^\top PA with K=(R+B⊤PB)−1B⊤PAK = (R+B^\top PB)^{-1}B^\top PA. Backup 3 carries both derivations in full.

Lecture 9 · Optimal Control & Planning52 / 55
EXTENSIONDerivations — HJB and Riccati in detailLecture 9

The Riccati recursion is value iteration

The single sharpest bridge between Lecture 7 and Lecture 9, and it comes free with the discrete-time form.

Pk+1=Q+A⊤PkA−A⊤PkB(R+B⊤PkB)−1B⊤PkA,P1=QP_{k+1} = Q + A^\top P_k A - A^\top P_k B\big(R + B^\top P_k B\big)^{-1} B^\top P_k A, \qquad P_1 = Q
Lecture 7 Lecture 9
Vk+1←max⁡aE[R+γVk]V_{k+1} \leftarrow \max_a \E[R + \gamma V_k] Pk+1←P_{k+1} \leftarrow the Riccati map
VkV_k is a table, one entry per state PkP_k is an n×nn\times n matrix
converges to the unique fixed point V∗V^* converges to the unique PSD solution of the ARE
a sweep touches every state a matrix recursion represents values over a continuum of states

Value iteration, with the value function carried in closed form instead of enumerated. The uniqueness of the positive-semidefinite PP plays the role of the uniqueness of the Bellman fixed point, and — the source deck's own remark — infinite-horizon LQR is just steady-state finite-horizon LQR. One backward sweep, run to convergence.

Lecture 9 · Optimal Control & Planning53 / 55
EXTENSIONDerivations — HJB and Riccati in detailLecture 9

Derivation — LQR from the HJB equation

x˙=Ax+Bu,J=∫0T(x⊤Qx+u⊤Ru) dt+x(T)⊤Qf x(T),Q,Qf⪰0,  R≻0\dot x = Ax + Bu, \qquad J = \int_0^T \big(x^\top Q x + u^\top R u\big)\,dt + x(T)^\top Q_f\, x(T), \qquad Q,Q_f \succeq 0,\; R \succ 0

Try V(t,x)=x⊤Pt xV(t,x) = x^\top P_t\, x. Then ∂xV=2Ptx\partial_x V = 2P_t x and ∂tV=x⊤P˙tx\partial_t V = x^\top \dot P_t x, and the HJB equation reads

− x⊤P˙tx  =  min⁡u{ 2x⊤Pt(Ax+Bu)+x⊤Qx+u⊤Ru }-\,x^\top \dot P_t x \;=\; \min_{u}\Big\{\, 2x^\top P_t\big(Ax + Bu\big) + x^\top Q x + u^\top R u \,\Big\}

The inner minimisation — the continuum that Act 1 warned about — is now a convex quadratic in uu. Set the gradient to zero:

2B⊤Ptx+2Ru=0⟹u∗(t)=−R−1B⊤Pt⏟−Kt  x(t)2B^\top P_t x + 2Ru = 0 \quad\Longrightarrow\quad u^*(t) = \underbrace{-R^{-1}B^\top P_t}_{\textstyle -K_t}\; x(t)
The wall of the continuous arg⁡min⁡\arg\min falls to one line of linear algebra.
Lecture 9 · Optimal Control & Planning54 / 55
EXTENSIONDerivations — HJB and Riccati in detailLecture 9

Derivation — the scalar LQR Bellman equation

Let x˙=u\dot x=u and J=∫0∞(x2+u2) dtJ=\int_0^\infty(x^2+u^2)\,dt. Try V(x)=Px2V(x)=Px^2.

0=min⁡u{x2+u2+2Pxu},u∗=−Px.0=\min_u\{x^2+u^2+2Pxu\},\qquad u^*=-Px.

Substitution gives 0=(1−P2)x20=(1-P^2)x^2. The nonnegative stabilizing solution is P=1P=1, so u∗=−xu^*=-x.

Starting at x(0)=2x(0)=2: x(t)=2e−tx(t)=2e^{-t} and

J∗=∫0∞8e−2t dt=4=V(2).J^*=\int_0^\infty 8e^{-2t}\,dt=4=V(2).
The gain is 1: a displacement of 2 calls for control −2; a displacement of 0.5 calls for −0.5. Feedback automatically weakens as the error shrinks.
Lecture 9 · Optimal Control & Planning55 / 55

Keys

→ / space
next reveal, then next slide
←
back
↑ ↓
skip a whole slide
R
reset this slide's widgets and quizzes
M
slide index
P
print → save as PDF (1280×720)
F
fullscreen