Hamilton-Jacobi-Bellman Equation

Decision Sciences
Introduced by
Richard Bellman
Year
1957
Type
algorithm
Family
Optimal Control

What does it do?

The Hamilton-Jacobi-Bellman (HJB) equation is a partial differential equation for the optimal cost-to-go (value) function of an optimal control problem, derived from Bellman's dynamic programming principle.

Its name combines the Hamilton-Jacobi equation with Bellman's principle. When a sufficiently smooth solution is available, it gives sufficient conditions for optimality, in contrast with the necessary conditions of Pontryagin's principle. HJB is closely related to reinforcement learning and approximate dynamic programming, and it is used for both the analysis and the synthesis of optimal feedback controls.

The intuition behind the method

The core principle of HJB is dynamic programming: the optimal cost from state x at time t equals the immediate cost plus the optimal cost from the new state. Formally, if V(x,t) is the optimal cost-to-go from state x at time t, then V(x,t) = min_u [L(x,u)dt + V(x+f(x,u)dt, t+dt)]. Taking the limit as dt→0 yields the HJB equation: −∂V/∂t = min_u[L(x,u) + (∂V/∂x)^T f(x,u)]. Solving HJB gives V(x,t), from which the optimal control u*(x,t) = argmin_u[...] is extracted. Unlike Pontryagin's principle (which gives necessary conditions), HJB gives sufficient conditions under smoothness assumptions: if a sufficiently smooth solution V(x,t) is found, the implied feedback control is optimal.

History

Dynamic programming, the principle on which the equation rests, is associated with Bellman's 1957 book cited on this page. In that work Bellman popularized the discrete-time Bellman optimality equation, which he called the 'basic functional equation'. Its continuous-time, continuous-state counterpart is known as the Hamilton-Jacobi-Bellman equation. The name reflects its roots in classical physics, where Hamilton's principal function plays the role of an action-value function. Unlike Pontryagin's principle, the HJB equation gives sufficient conditions when a smooth solution exists. Viscosity solutions extend the notion of solution to nonsmooth value functions.

When to use it

Choose HJB-based synthesis when you need a feedback control with an optimality argument and the problem is low-dimensional enough for a grid or other PDE solver. It suits nonlinear systems, time-optimal problems and differential games. It is also appropriate when you need the value function itself, for sensitivity analysis or as input to learning or adaptive control. Avoid it when the state dimension is high and no reduced-dimension approximation is acceptable, because the cost of solving the PDE grows rapidly with the number of states. In such cases, approximate dynamic programming or model predictive control may be more practical.

Limitations and considerations

  • Solving HJB on a grid is computationally expensive: memory and computation grow exponentially with state dimension (the curse of dimensionality).
  • Analytical solutions are rare, and numerical PDE solvers (finite difference, finite element) require tuning and can be inaccurate.
  • Checking that a numerical approximation satisfies the equation does not establish that it is the true value function, so the sufficiency argument is hard to apply in practice.
  • No general rule selects the numerical scheme; the choice depends on the problem.
  • The running cost L and the terminal cost Φ are part of the problem definition. The terminal condition V(x,T)=Φ(x) must be stated for the PDE to be well posed.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • For a sufficiently smooth (classical) solution, the equation gives sufficient conditions: the feedback derived from V(x,t) is optimal, not merely a candidate that satisfies first-order conditions.
  • The same equation is written for general dynamics f(x,u) and running cost L(x,u), so it applies to nonlinear, time-varying and constrained problems within one framework.
  • The value function V(x,t) gives the optimal cost from every initial state and time, which supports sensitivity analysis of the optimal policy.
  • The displayed equation is for deterministic dynamics. Stochastic control leads to an additional second-order term in the equation, and differential games are also covered by the framework.
  • Its dynamic programming structure underlies the value functions used in reinforcement learning and approximate dynamic programming.

Applications

  • Aerospace: minimum-time and minimum-fuel trajectory problems, where the value function yields the optimal feedback law.
  • Robotics: optimal motion planning, where the gradient of the value function enters the optimal control law.
  • Finance: derivation of trading bounds, for example the upper and lower bounds of a no-action channel in a trend-following model obtained by solving an HJB equation.
  • Game theory: equilibrium analysis in differential games.
  • Machine learning: value functions in reinforcement learning, which are the discrete-time counterparts of the HJB value function.

How it works

How it works

1

Assume deterministic dynamics ẋ = f(x,u), with f and L continuous, f Lipschitz in x, an admissible control set U, and a terminal cost Φ. Write the HJB equation: −∂V/∂t = min_u[L(x,u) + ∇V^T f(x,u)], with terminal condition V(x,T)=Φ(x). A classical solution requires V to be continuously differentiable in x and t.

2

Solve the HJB partial differential equation using separation of variables, method of characteristics, or numerical schemes (finite difference, finite element).

3

The optimal control is u*(x,t) = argmin_u[L(x,u) + ∇V^T f(x,u)]; this feedback law is extracted from the HJB solution.

4

Check that V(x,t) satisfies the HJB equation and the terminal condition. If V is a sufficiently smooth solution, this verification argument establishes that the feedback control is optimal. An approximate numerical V satisfies the check only approximately, so passing it does not by itself certify optimality.

Common pitfalls

  • Assuming the HJB solution is easily found; PDE solving requires specialist expertise and often involves approximations.
  • Using insufficient grid resolution in numerical schemes; under-sampling can produce spurious solutions.
  • Confusing the necessary conditions of Pontryagin's principle with the sufficient conditions of HJB; PMP candidates are not guaranteed to be optimal.
  • Treating an approximate numerical V as exact; a classical solution may not exist for nonsmooth cost functions, and viscosity solutions must then be considered.

Frequently asked questions

What is the curse of dimensionality in HJB?

HJB is a PDE in state space. Discretizing an n-dimensional state space with m grid points per dimension requires m^n grid cells. For n=10 and m=100, this is 10^20 cells, which is impractical. This is the curse of dimensionality. Mitigation options include sparse grids, function approximation (for example neural networks), or restriction to lower-dimensional subspaces.

Related methods

Sources

  1. Bellman, R. (1957). Dynamic Programming. Princeton University Press.

    Open publication reference
  2. Kirk, D. E. (2004). Optimal Control Theory: An Introduction (2nd ed.). Dover Publications.

    Open publication reference
  3. RLbook2018, Bibliographical and Historical Remarks to Chapter 3

  4. Handbook of Financial Econometrics, Mathematics, Statistics, and Machine Learning (4 volumes) (2020), section on trend-following trading strategies