Tool 16 · Advanced Control Systems

LQR Designer

Design an optimal state-feedback controller for a simple state-space system. Tune the state penalty Q and control penalty R, compute the gain K, and compare open-loop versus closed-loop response.

What this tool computes

Linear Quadratic Regulator control is a modern-control method that chooses feedback gains by balancing state error against control effort. It is a natural next step after PID because it handles multi-state systems systematically.

  • State feedback gain \(K\)
  • Closed-loop matrix \(A-BK\)
  • Approximate closed-loop eigenvalues
  • Open-loop versus closed-loop response
  • Control signal history
  • Trade-off between state penalty and control effort

State-space control model

The plant is written as:

\[ \dot{\mathbf x}=A\mathbf x+B\mathbf u \]

The LQR controller applies state feedback:

\[ \mathbf u=-K\mathbf x \]

LQR cost function

The gain is chosen to minimize a quadratic cost:

\[ J=\int_0^\infty \left(\mathbf x^TQ\mathbf x+\mathbf u^TR\mathbf u\right)dt \]

Increasing \(Q\) makes state errors more expensive. Increasing \(R\) makes control effort more expensive.

Engineering interpretation

  • Higher Q usually creates faster correction but larger control effort.
  • Higher R usually reduces control effort but gives slower response.
  • LQR assumes the states are available or estimated.
  • For real spacecraft, LQR is often paired with an estimator such as a Kalman filter.

Educational simplification

This page solves small educational examples numerically in the browser. It is not a certified control-design package.

Interactive LQR designer

This educational designer uses 2-state, 1-input systems.
Presets change A, B, Q, R, and initial conditions.

Results

LQR gain K

Closed-loop eigenvalues

Peak control effort

Final state norm

Settling estimate

Design status

Interpretation

Run the designer to compute LQR gain and closed-loop response.

State response: open-loop vs LQR closed-loop
Control effort

Assumptions and limitations

This tool assumes:

  • Continuous-time 2-state, 1-input linear system
  • Full state feedback is available
  • Diagonal Q and scalar R
  • No actuator saturation or state estimation uncertainty
  • Numerical Riccati iteration for educational use