Math 2.0

Calculus of variations and optimal control; optimization Definition

Differential dynamic programming

Builds on Hessian matrixGradientNewton's method

Definition

Let F ⁣:ℝn×ℝm→ℝnF \colon \R^n \times \R^m \to \R^n, ℓ ⁣:ℝn×ℝm→ℝ\ell \colon \R^n \times \R^m \to \R and ℓf ⁣:ℝn→ℝ\ell_f \colon \R^n \to \R be twice continuously differentiable, and let N≥1N \ge 1. Consider the problem of minimising ∑k=0N−1ℓ(xk,uk)+ℓf(xN)\sum_{k=0}^{N-1} \ell(x_k, u_k) + \ell_f(x_N) over u0,…,uN−1∈ℝmu_0, \dots, u_{N-1} \in \R^m, where xk+1=F(xk,uk)x_{k+1} = F(x_k, u_k) and x0x_0 is given. Subscripts denote partial derivatives, ∇2\nabla^2 a Hessian and ∇\nabla a gradient. One iteration of differential dynamic programming starts from controls uˉk\bar u_k with states xˉk\bar x_k and does the following.

  1. Backward pass: set Vx=∇ℓf(xˉN)V_x = \nabla \ell_f(\bar x_N) and Vxx=∇2ℓf(xˉN)V_{xx} = \nabla^2 \ell_f(\bar x_N). For k=N−1,…,0k = N - 1, \dots, 0, take all derivatives at (xˉk,uˉk)(\bar x_k, \bar u_k) and Vx,VxxV_x, V_{xx} from step k+1k + 1. Compute Qx=ℓx+FxTVx,Qu=ℓu+FuTVx,Q_x = \ell_x + F_x^T V_x, \quad Q_u = \ell_u + F_u^T V_x, Qxx=ℓxx+FxTVxxFx+Vx⋅Fxx,Quu=ℓuu+FuTVxxFu+Vx⋅Fuu,Qux=ℓux+FuTVxxFx+Vx⋅Fux,Q_{xx} = \ell_{xx} + F_x^T V_{xx} F_x + V_x \cdot F_{xx}, \quad Q_{uu} = \ell_{uu} + F_u^T V_{xx} F_u + V_x \cdot F_{uu}, \quad Q_{ux} = \ell_{ux} + F_u^T V_{xx} F_x + V_x \cdot F_{ux}, where Vx⋅FxxV_x \cdot F_{xx} is the matrix ∑i(Vx)i∇x2Fi\sum_i (V_x)_i \nabla_x^2 F_i and similarly for the others. If QuuQ_{uu} is positive definite, set dk=−Quu−1Qud_k = -Q_{uu}^{-1} Q_u, Kk=−Quu−1QuxK_k = -Q_{uu}^{-1} Q_{ux}, and update Vx←Qx−QuxTQuu−1QuV_x \leftarrow Q_x - Q_{ux}^T Q_{uu}^{-1} Q_u and Vxx←Qxx−QuxTQuu−1QuxV_{xx} \leftarrow Q_{xx} - Q_{ux}^T Q_{uu}^{-1} Q_{ux}.
  2. Forward pass: set x0new=x0x_0^{\text{new}} = x_0 and, for k=0,…,N−1k = 0, \dots, N - 1, set uknew=uˉk+dk+Kk(xknew−xˉk)u_k^{\text{new}} = \bar u_k + d_k + K_k (x_k^{\text{new}} - \bar x_k) and xk+1new=F(xknew,uknew)x_{k+1}^{\text{new}} = F(x_k^{\text{new}}, u_k^{\text{new}}).

The new controls replace uˉk\bar u_k, and the iteration is repeated until the corrections dkd_k are small.

Remarks

The function QQ is the second-order expansion of δx,δu↦ℓ(xˉk+δx,uˉk+δu)+Vk+1(F(xˉk+δx,uˉk+δu))\delta x, \delta u \mapsto \ell(\bar x_k + \delta x, \bar u_k + \delta u) + V_{k+1}(F(\bar x_k + \delta x, \bar u_k + \delta u)), where Vk+1V_{k+1} is the quadratic model of the cost-to-go. The correction δu=dk+Kkδx\delta u = d_k + K_k \delta x minimises this quadratic model in δu\delta u, and the update of Vx,VxxV_x, V_{xx} gives the model of the minimum. Dropping the terms with second derivatives of FF gives the iterative linear-quadratic regulator. In practice one scales dkd_k by a step size and adds a multiple of the identity to QuuQ_{uu} for robustness.

Example: if F(x,u)=Ax+BuF(x, u) = A x + B u and ℓ\ell, ℓf\ell_f are quadratic forms with ℓuu\ell_{uu} positive definite, the expansions are exact. Then the backward pass is the discrete Riccati recursion of the linear-quadratic regulator, and one iteration gives the optimal controls from any starting guess.

Non-example: take ℓ=−u2\ell = -u^2, F(x,u)=xF(x, u) = x and ℓf=0\ell_f = 0, so that Quu=−2Q_{uu} = -2 is not positive definite. The quadratic model has no minimiser in δu\delta u, and the step of clause 1 is not defined.

Reading path

To understand this page from the ground up, read these 15 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Euclidean space object
  2. Function concept
  3. Limit point of a set definition
  4. Total derivative concept
  5. Function of several variables concept
  6. Limit of a function definition
  7. Differentiable function of several variables concept
  8. Partial derivative concept
  9. Derivative definition
  10. Gradient concept
  11. Higher partial derivatives concept
  12. Tangent line concept
  13. Hessian matrix concept
  14. Newton's method concept
  15. Differential dynamic programming definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Differential_dynamic_programming
About this page
TagWA3974X06N
URIm2://WA3974X06N
Kinddefinition
WritingW0 stub
MSC49M15, 49L20, 93C55
DefinesDifferential dynamic programming
UsesHessian matrix, Gradient, Newton's method

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.