Machine learningControl TheoryOptimal ControlAlgorithm

Linear Quadratic Regulator

Also known as: LQR, Linear Quadratic Optimal Control

OriginatorRudolf KalmanYear1960Sources3Related methods10

The Linear Quadratic Regulator (LQR) is a classical optimal control algorithm that computes a linear feedback law to minimize a quadratic cost function for a linear dynamical system. Introduced by Kalman in 1960, LQR provides a provably optimal, closed-form solution for linear systems and remains fundamental in control theory, robotics, and aerospace applications because of its theoretical elegance and computational efficiency.

Key highlights

  • Provides the provably optimal feedback law for linear systems with quadratic cost.
  • Offline computation of gains; online control is just a matrix-vector multiplication (extremely fast).
  • Gain margin and phase margin guarantees; inherent robustness properties (infinite gain margin at the output).
  • Straightforward to compute; many numerical algorithms are available (Schur decomposition, eigenvalue methods).
  • Naturally handles multivariable systems and decouples the control design from sensor and actuator constraints.

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

When to use it

Use LQR when your system is linear (or well-approximated by linearization), when the objective naturally combines state error and control effort, and when you need a provably optimal solution with fast computation. LQR excels for problems like stabilizing an inverted pendulum, controlling aircraft attitude, or optimizing spacecraft trajectories. It is less suitable for systems with hard constraints (use MPC instead) or strongly nonlinear dynamics.

Strengths & limitations

Strengths
  • Provides the provably optimal feedback law for linear systems with quadratic cost.
  • Offline computation of gains; online control is just a matrix-vector multiplication (extremely fast).
  • Gain margin and phase margin guarantees; inherent robustness properties (infinite gain margin at the output).
  • Straightforward to compute; many numerical algorithms are available (Schur decomposition, eigenvalue methods).
  • Naturally handles multivariable systems and decouples the control design from sensor and actuator constraints.
Limitations
  • Restricted to linear systems; real systems are often nonlinear and require linearization.
  • Does not explicitly handle hard constraints on state or input; quadratic penalties are soft constraints only.
  • Cost function design (choosing Q and R) requires engineering judgment and tuning.
  • Kalman gain robustness properties assume the model is accurate; model mismatch degrades performance.

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

Frequently asked

How do I choose the Q and R weighting matrices?

A systematic approach is to start with Q as a diagonal matrix with each diagonal entry proportional to 1/max_allowed_state_i^2, and R proportional to 1/max_allowed_input_i^2. Then tune empirically: increase Q to tighten state regulation, increase R to reduce control effort. Trade-offs between overshoot and settling time emerge as you adjust these weights.

What is the algebraic Riccati equation and why is it important?

The algebraic Riccati equation (ARE) is a matrix quadratic equation that arises when solving the infinite-horizon LQR problem. Its solution P encodes the optimal cost-to-go from any state. Solving the ARE is the computational bottleneck of LQR; modern algorithms (e.g., via Schur decomposition) do this in O(n^3) time, where n is the state dimension.

Can LQR handle time-varying systems?

Yes, the time-varying LQR solves a differential Riccati equation (DRE) backward in time. However, this requires solving an ODE, which is more computationally expensive than the steady-state case. Time-varying LQR is useful for trajectory tracking or systems with slowly varying parameters.

Why does LQR have guaranteed robustness margins?

LQR's optimal feedback law guarantees infinite gain margin (tolerate arbitrary multiplicative output errors) and 50% phase margin at the output. These stability margins come from the structure of the optimal solution and do not need to be checked separately, unlike PID or other heuristic controllers.

Sources

  1. 1.
    Kalman, R. E. (1960). Contributions to the theory of optimal control. Boletin de la Sociedad Matematica Mexicana, 5(2), 102-119.
  2. 2.
    Bryson, A. E., & Ho, Y. C. (1969). Applied Optimal Control: Optimization, Estimation and Control. Blaisdell Publishing.
  3. 3.
    Lewis, F. L., Vrabie, D., & Syrmos, V. L. (2012). Optimal Control (3rd ed.). John Wiley & Sons.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 3). Linear Quadratic Regulator. ScholarGate. https://scholargate.app/control-theory/linear-quadratic-regulator

Linear Quadratic Regulator | ScholarGate