{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "8N5CYXWXDV"
    },
    {
      "field": "defines",
      "target": "DT45YNKWSQ"
    },
    {
      "field": "specializes",
      "target": "FZ4BRYJ0YZ"
    }
  ],
  "body": "\n## Summary\n\nDirect collocation is a method of [[trajectory optimization|58895A7T4H]] that turns an optimal control problem into a finite nonlinear program.\nIt represents the state and the control by their values on a time grid.\nIt imposes the differential equation only at chosen collocation points, through a polynomial model of the state on each interval.\nThe cost integral becomes a quadrature sum, and the resulting sparse nonlinear program is solved by a general optimiser.\nIt is \"direct\" because it discretises first and does not use the [[maximum principle|7RPV2T29CF]].\n\n## Explanations\n\n### L1 human\n\nInstead of solving the equations of motion exactly, direct collocation draws the trajectory as a chain of short polynomial pieces through a few grid points.\nIt asks only that each piece obey the equations of motion at a few chosen times.\nThe grid values become the unknowns of an ordinary finite optimisation problem.\nWith the trapezoidal rule, for example, the condition on one step of length $h$ is $x_{k+1} - x_k = \\frac{h}{2} (f_k + f_{k+1})$, where $f_k$ is the velocity at grid point $k$.\nConstraints such as speed limits are easy to add, because they are just conditions on the grid values.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "49M37",
      "49M25",
      "65L60"
    ],
    "name": "Direct collocation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Collocation_method"
      }
    ],
    "tag": "T58W34D60G"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/T58W34D60G/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/T58W34D60G.md",
  "msc": [
    "49M37",
    "49M25",
    "65L60"
  ],
  "name": "Direct collocation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/T58/T58W34D60G.md",
  "status": null,
  "tag": "T58W34D60G",
  "uri": "m2://T58W34D60G",
  "url": "https://tamnd.github.io/math2/wiki/direct-collocation/",
  "writing": {
    "tag": "T58W34D60G",
    "kind": "concept",
    "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
      }
    ]
  }
}
