{
  "aliases": null,
  "backlinks": [
    {
      "field": "about",
      "target": "DJB8MAV5BH"
    },
    {
      "field": "uses",
      "target": "DJB8MAV5BH"
    },
    {
      "field": "uses",
      "target": "T5BEKMG5W8"
    },
    {
      "field": "uses",
      "target": "TMEKPXMC7V"
    }
  ],
  "body": "\n## Problem\n\nLet $A$ be a real $n \\times n$ matrix and $B$ a real $n \\times m$ matrix.\nLet $Q$ and $F$ be symmetric [[positive semidefinite|01MMVW8CKC]] $n \\times n$ matrices, and let $R$ be a symmetric [[positive definite|0KX66CZMBB]] $m \\times m$ matrix.\nLet $T \u003e 0$ and $x_0 \\in \\R^n$.\nThe *finite-horizon linear-quadratic regulator problem* is to minimize\n$$J(u) = \\int_0^T \\big( x(t)^{T} Q x(t) + u(t)^{T} R u(t) \\big) \\, dt + x(T)^{T} F x(T)$$\nover all controls $u \\in L^2([0, T]; \\R^m)$, where $x$ solves $x' = A x + B u$, $x(0) = x_0$.\n\n## Remarks\n\nThe problem is solved.\nLet $P$ be the solution of the [[Riccati differential equation|Y4V154JWR7]] $-P' = A^{T} P + P A - P B R^{-1} B^{T} P + Q$ with $P(T) = F$.\nThen the unique optimal control is given by the linear feedback $u^*(t) = -R^{-1} B^{T} P(t) x^*(t)$, and the optimal cost is $x_0^{T} P(0) x_0$.\nThe proof completes the square: along any trajectory, $\\frac{d}{dt} (x^{T} P x) = -x^{T} Q x - u^{T} R u + (u + R^{-1} B^{T} P x)^{T} R (u + R^{-1} B^{T} P x)$.\nIntegrating from $0$ to $T$ gives $J(u) = x_0^{T} P(0) x_0 + \\int_0^T \\abs{R^{1/2}(u + R^{-1} B^{T} P x)}^2 \\, dt$, which is smallest exactly for the feedback above.\nFor the infinite horizon $T = \\infty$ and $F = 0$, assume $(A, B)$ stabilizable and $(C, A)$ detectable, where $Q = C^{T} C$.\nThen the [[algebraic Riccati equation|GGZV75ZZMV]] $A^{T} P + P A - P B R^{-1} B^{T} P + Q = 0$ has a unique symmetric positive semidefinite solution $P$.\nThe feedback $u = -R^{-1} B^{T} P x$ is optimal and makes the closed loop asymptotically stable.\n\n## Explanations\n\n### L1 human\n\nThe linear-quadratic regulator steers a linear system toward zero while keeping both the deviation and the control effort small.\nThe cost charges squares of both, weighted by the matrices $Q$ and $R$.\nThe answer is remarkably simple: the best control is a fixed matrix times the current state, computed once from a Riccati equation.\nIt is one of the most used results of control theory, from aircraft autopilots to robots.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "T3V6ZNAMDN"
    ],
    "history": {
      "first_stated": "1960",
      "posed_by": "Rudolf E. Kálmán"
    },
    "kind": "problem",
    "msc": [
      "49N10",
      "93C05",
      "49N35"
    ],
    "name": "Linear-quadratic regulator",
    "same_as": {
      "wikidata": "Q2520550",
      "wikipedia": "Linear–quadratic regulator"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Linear–quadratic_regulator"
      }
    ],
    "tag": "HR720TJZZR",
    "uses": [
      "T3V6ZNAMDN",
      "Y4V154JWR7",
      "01MMVW8CKC",
      "0KX66CZMBB",
      "GGZV75ZZMV"
    ]
  },
  "kind": "problem",
  "link": "https://tamnd.github.io/math2/node/HR720TJZZR/",
  "links": [
    {
      "field": "about",
      "target": "T3V6ZNAMDN"
    },
    {
      "field": "uses",
      "target": "T3V6ZNAMDN"
    },
    {
      "field": "uses",
      "target": "Y4V154JWR7"
    },
    {
      "field": "uses",
      "target": "01MMVW8CKC"
    },
    {
      "field": "uses",
      "target": "0KX66CZMBB"
    },
    {
      "field": "uses",
      "target": "GGZV75ZZMV"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/HR720TJZZR.md",
  "msc": [
    "49N10",
    "93C05",
    "49N35"
  ],
  "name": "Linear-quadratic regulator",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/HR7/HR720TJZZR.md",
  "status": null,
  "tag": "HR720TJZZR",
  "uri": "m2://HR720TJZZR",
  "url": "https://tamnd.github.io/math2/wiki/linear-quadratic-regulator/",
  "writing": {
    "tag": "HR720TJZZR",
    "kind": "problem",
    "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
      }
    ]
  }
}
