{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $U \\subseteq \\R^m$ be nonempty, and let $f \\colon \\R^n \\times U \\times \\R \\to \\R^n$, $L \\colon \\R^n \\times U \\times \\R \\to \\R$, $\\phi \\colon \\R \\times \\R^n \\times \\R \\times \\R^n \\to \\R$ be continuous.\nLet $c \\colon \\R^n \\times U \\times \\R \\to \\R^q$ give path constraints and $b \\colon \\R \\times \\R^n \\times \\R \\times \\R^n \\to \\R^r$ give boundary conditions.\nA *trajectory optimization problem* asks for times $t_0 \u003c t_f$, a measurable control $u \\colon [t_0, t_f] \\to U$ and an absolutely continuous state $x \\colon [t_0, t_f] \\to \\R^n$ that minimise\n$$\\phi(t_0, x(t_0), t_f, x(t_f)) + \\int_{t_0}^{t_f} L(x(t), u(t), t) \\, dt$$\nsubject to:\n\n1. the [[control system|ZPDTVZQN5K]] $x'(t) = f(x(t), u(t), t)$ for almost every $t$;\n2. the path constraints $c(x(t), u(t), t) \\le 0$ componentwise for almost every $t$;\n3. the boundary conditions $b(t_0, x(t_0), t_f, x(t_f)) = 0$.\n\n*Trajectory optimization* is the numerical solution of such problems, which yields an open-loop control and its trajectory.\n\n## Remarks\n\nThe problem is an [[optimal control|T3V6ZNAMDN]] problem in Bolza form with constraints; the word stresses the computation of one optimal trajectory.\nIndirect methods solve the conditions of [[Pontryagin's maximum principle|7RPV2T29CF]]; direct methods discretise $x$ and $u$ and solve a finite-dimensional nonlinear program.\n\nExample: $n = 2$, $x = (x_1, x_2)$, $f = (x_2, u)$, $U = \\R$, $L = u^2$, $\\phi = 0$, no path constraints, $t_0 = 0$, $t_f = 1$, and boundary conditions $x(0) = (0, 0)$, $x(1) = (1, 0)$.\nThe control $u(t) = 6 - 12t$ gives $x_2(t) = 6t - 6t^2$ and $x_1(t) = 3t^2 - 2t^3$, which meet the boundary conditions, with cost $\\int_0^1 (6 - 12t)^2 \\, dt = 12$.\nThe maximum principle forces the optimal $u$ to be affine in $t$, and this is the only affine control that meets the boundary conditions, so it is the solution.\n\nNon-example: finding a feedback law $u = \\kappa(x)$ that is good for all initial states is a synthesis problem, not a trajectory optimization problem in this sense.\n\n## Explanations\n\n### L1 human\n\nTrajectory optimization finds one best motion of a system, together with the controls that produce it, from given start and end conditions.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "58895A7T4H",
    "kind": "definition",
    "msc": [
      "49M37",
      "49M05",
      "49J15"
    ],
    "name": "Trajectory optimization",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Trajectory_optimization"
      }
    ],
    "tag": "NAD3RQNJ7V",
    "uses": [
      "ZPDTVZQN5K",
      "T3V6ZNAMDN",
      "7RPV2T29CF"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/NAD3RQNJ7V/",
  "links": [
    {
      "field": "defines",
      "target": "58895A7T4H"
    },
    {
      "field": "uses",
      "target": "ZPDTVZQN5K"
    },
    {
      "field": "uses",
      "target": "T3V6ZNAMDN"
    },
    {
      "field": "uses",
      "target": "7RPV2T29CF"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/NAD3RQNJ7V.md",
  "msc": [
    "49M37",
    "49M05",
    "49J15"
  ],
  "name": "Trajectory optimization",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/NAD/NAD3RQNJ7V.md",
  "status": null,
  "tag": "NAD3RQNJ7V",
  "uri": "m2://NAD3RQNJ7V",
  "url": "https://tamnd.github.io/math2/wiki/trajectory-optimization-definition/",
  "writing": {
    "tag": "NAD3RQNJ7V",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
