S938 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S9 · Lesson 38 · The linear-quadratic regulator

Choosing state-feedback gains by minimizing a quadratic cost on state error and control effort, the algebraic Riccati equation, the scalar and double-integrator solutions, Bryson's rule for the weights, and the margins an LQR loop is guaranteed

Pole placement lets you put the poles anywhere, which raises an awkward question: where? Fast poles need large gains and large actuator effort; slow ones leave errors uncorrected. Kálmán's answer in 1960 was to state the trade-off as a cost, the integral of squared state error plus squared control effort, and find the feedback that minimizes it. The result, the linear-quadratic regulator, picks every gain at once from two weights, and as a bonus comes with guaranteed stability margins that hand-placed poles don't have.

  • A one-state plant x˙=ax+u under the LQR that minimizes ∫(qx2+ru2)dt, against the weight ratio ρ = q/r on a log axis.
  • The closed-loop pole sits at −a2+ρ and the gain is a+a2+ρ. Cheap control (large ρ) gives a fast pole and a big gain.
  • Expensive control (ρ → 0) barely acts: a stable plant is left alone, but an unstable pole at +a is mirrored to −a, the least effort that stabilizes it.

Predict

A double integrator gets the LQR with Q = diag(q, 0) and R = 1. What damping ratio do its closed-loop poles have, whatever q is?

Name it

The problem

For x˙=Ax+Bu, find u minimizing

J=∫0∞(xTQx+uTRu)dt,Q⪰0,R≻0

The solution

If (A, B) is controllable, the optimum is state feedback u=−Kx with

K=R−1BTP,ATP+PA−PBR−1BTP+Q=0

the algebraic Riccati equation, with P the positive-definite solution. The minimum cost from x0 is x0TPx0.

One state, x˙=ax+bu, J=∫(qx2+ru2): 2aP−b2P2/r+q=0, so

P=rb2(a+a2+b2q/r),K=bPr,pole at −a2+b2q/r

Double integrator, Q = diag(q, 0), R = 1: K=(q,2q), ωn=q1/4, ζ = 0.707.

Choosing the weights

Bryson's rule: make each term about one at its largest acceptable value: Qii=1/xi,max⁡2 and Rjj=1/uj,max⁡2. Then adjust: raise a state's weight to tighten it, raise R to calm the actuator.

Guaranteed margins

With full state feedback and one input, the LQR loop gain K(sI−A)−1B always keeps |1+L(jω)|≥1: its Nyquist plot stays outside the unit circle around −1. That guarantees a gain margin from 1/2 to ∞ and a phase margin of at least 60°. An observer in the loop can destroy these guarantees, a famous result of John Doyle (1978), which is why lesson 39's estimator must be checked.

Worked example

An unstable plant x˙=x+u gets the LQR with q = 3, r = 1. Find P, the gain and the closed-loop pole.

Show the solution
  1. Riccati solution. P=1+1+3=3 which satisfies 2P−P2+3=0.
  2. Gain and closed loop. The gain is K = 3, so x˙=(1−3)x a pole at −2=−1+3.
  3. Cost. Starting from x0 = 1, the cost is Px02=3

Answer P = 3 and K = 3, with the closed-loop pole at −2.

Worked example

A position stage should stay within 0.1 m and its amplifier delivers at most 12 V. Set up Bryson's weights.

Show the solution
  1. Bryson's weights. One over the square of each allowed size: q=1/0.12=100r=1/122=0.00694 on position and voltage, a ratio q/r = 14,400.
  2. What that gives. For a double integrator with unit input gain, that's like q = 14,400 with r = 1, giving ωn=14,4001/4=11rad/s at ζ = 0.707.
  3. Adjust. If the step responses then saturate the amplifier, raise r.

Answer q = 100 on position and r = 0.00694 on voltage.

Worked example

An unstable plant x˙=2x+u gets the LQR with r = 1. Find the gain and pole for q = 0, 5 and 96.

Show the solution
  1. Pole. s=−a2+b2q/r=−4+q
  2. Gain. K=P=a+a2+q For the three weights:
qPoleK
0−24
5−35
96−1012
  1. When the state costs nothing. Even then the LQR must stabilize, and the cheapest way mirrors the unstable pole into the left half-plane.
  2. Heavier weights. Heavier state weights then push the pole out roughly as q.

Answer q = 0 gives a pole at −2 with K = 4, q = 5 gives −3 with K = 5, and q = 96 gives −10 with K = 12.

Check

x˙=1x+2u gets the LQR for ∫(10x2+1u2)dt. Where's the closed-loop pole?

Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.

Check

For the same plant and cost, what's the LQR gain K?

Check

A double integrator gets the LQR with Q = diag(81, 0), R = 1. What's its velocity gain?

Check

By Bryson's rule, a state may reach 0.2 and the input 5. What's the weight ratio q/r?

Check

x˙=−1x+1u with cost weights q = 8, r = 2, starting from x = 2. What's the minimum cost?

Check

For x˙=−1x+1u, what weight ratio q/r makes the LQR put the pole at −20?

Check

The plant x˙=1x+1u gets the LQR for ∫(100x2+0.1u2)dt, starting from x = 1.

(a)

What is P?

(b)

What is the gain K?

(c)

What is the minimum cost?

Check

The scalar LQR for x˙=ax+bu with weights q and r.

Step 1

Where is the closed-loop pole?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why does an LQR with expensive control move an unstable pole to its mirror image rather than just barely into the left half-plane?

Practice

Keep practicing

10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.