3.5.35 · D1Guidance, Navigation & Control (GNC)

Foundations — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains

2,930 words13 min readBack to topic

Before you can read one line of the parent note, you must own every symbol it throws at you. This page builds each from absolute zero, in the order that lets each rest on the one before it.


0. The picture behind everything: the state as a point

Everything in LQR happens to a single moving point. That point is the machine's situation right now.

Figure — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains
  • Plain words: answers "what is the machine doing right now?"
  • The picture: a dot in a flat plane (for 2 numbers). The origin is "perfect — at target, not moving". Being away from the origin is bad.
  • Why the topic needs it: LQR's whole job is to drive this dot to the origin. If you don't picture the state as a movable point, nothing else makes sense.

Two dimensions we can draw (); higher we picture by analogy — still "a point that can be near or far from the origin".


1. Vectors and matrices — the alphabet of the whole topic

Figure — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains

2. The quadratic form — a number measuring "how bad"

This single expression appears three times on the parent page (, , ). Own it once and all three are free.

Figure — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains
  • Why squared (why not )? A square is smooth at the bottom (a rounded bowl), so calculus can find its minimum cleanly. An absolute value has a sharp corner — the optimizer chokes on it. This smoothness is the whole reason LQR has a tidy closed-form answer.
  • The picture: is a bowl sitting over the plane. The origin is the bottom (value ); the further out you go, the higher you climb. decides how steep the bowl is in each direction.

This table is exactly why the parent insists " strictly": a flat floor in the control cost would mean "some control is free", the minimum would not be unique, and (defined next) would not exist.


3. Time , the dot — rate of change

  • Why a derivative and not a difference? Physics happens continuously — the machine doesn't jump in discrete steps, it flows. The derivative is the tool that measures flow at an instant.
  • The picture: at each point, is a little arrow attached to the dot showing where it will move next. A whole field of these arrows is the machine's "wind map".

4. Control , gain , and the feedback law

Figure — Linear Quadratic Regulator (LQR) — Riccati equation, optimal gains
  • Why the minus sign? Feedback must oppose the error, like a spring pulling a stretched mass back. A plus sign would push you further off — the opposite of control.
  • Why proportional to (why linear)? The parent's punchline: linear plant + quadratic (bowl) cost forces the best recipe to be exactly this linear one. See Pole Placement and PID Controllers for the same shape reached by other roads.

5. The cost integral — adding up badness over all time

  • The picture: two bowls at every instant; is the shaded area swept out as time flows. A twitchy, wasteful controller has a big shaded area; the LQR controller has the smallest possible one.

6. The value function and the Riccati equation (preview)


How the foundations feed the topic

Real numbers R and lists R to the n

State x as a point

Vectors and matrices

Matrix shapes and multiplication rule

Transpose and symmetric matrices

Quadratic form x-top M x = a bowl

Positive definite Q and R

Matrix inverse R inverse

Time t and dt

Derivative x-dot = velocity

Plant x-dot = A x + B u

Control u and feedback law u = -K x

Cost integral J

Value function V = x-top P x

Riccati equation gives K

LQR optimal controller


Equipment checklist

Read each cue, answer aloud, then reveal. If any stumps you, re-read that section.

What does mean in plain words?
is a point (arrow) made of real numbers — the machine's full situation right now.
What is a matrix's job geometrically?
It eats an arrow and returns a transformed arrow (stretch/rotate/shear); is " after acts".
State the "shapes must match" rule for multiplying by a vector.
The number of columns of must equal the number of rows of the vector; an matrix eats a vector and returns .
What are the shapes of , , , , ?
is , is , is , is , is .
What does do and why do we need it?
Flips rows into columns (); needed so shapes line up when multiplying a row by a column, e.g. in .
What single number does produce, and what shape is it?
One scalar measuring weighted squared distance from the origin — a bowl over the plane.
Why square the error instead of using ?
A square is smooth at the bottom, so calculus finds a clean unique minimum; has a sharp corner.
Difference between and ?
allows a flat valley floor (); is strictly curved everywhere ( for ).
What is and when does it exist?
The "undo" matrix with ; it exists for a square matrix that squashes no non-zero arrow to zero — guaranteed when .
Why must strictly (not just )?
So a unique cheapest control exists and exists in .
What is and what does mean?
is the time parameter (seconds from ); is an infinitesimally small step of time weighting each instant in the integral.
What does represent?
The instantaneous velocity of the state point — its rate of change with time, .
Read out in words.
The state's velocity is its own natural drift plus the push we inject through control.
Why the minus sign in ?
Feedback must oppose the error and pull the state back toward the origin, like a spring.
What does compute for the cost?
The running total badness (error + effort) summed continuously over all future time.
What is ?
The best possible remaining total cost from state ; a bowl shaped by the symmetric .
What does the Riccati equation deliver?
The matrix , from which the optimal gain is read off.