Your Equation

Library / Control engineering / CTL-21

Control engineering

Scalar LQR feedback gain

Optimal state-feedback gain for the scalar plant ẋ = ax + bu that minimises the integral of Qx² + Ru².

Ref
CTL-21
Rev
v1
Field
Control engineering
Result
K

For the scalar plant ẋ = ax + bu with cost ∫(Qx² + Ru²) dt, the Riccati equation 2aP − (b²/R)P² + Q = 0 has the stabilising solution P = R(a + √(a² + b²Q/R))/b². The optimal control is u = −Kx with K = bP/R. The closed-loop pole is a − bK = −√(a² + b²Q/R), which is always in the left half-plane for Q > 0, even if the plant is unstable.

Optimal state-feedback gain for the scalar plant ẋ = ax + bu that minimises the integral of Qx² + Ru². It is the stabilising solution of the algebraic Riccati equation; the closed-loop pole moves to -√(a² + b²Q/R).

Calculator

Solve for
1/s
−22
0.53
0.520
0.110
  • Riccati solution, P = R(a + √(a² + b²Q/R)) / b²2
  • Closed-loop pole, a − bK−2 1/s
  • Open-loop pole, a0 1/s
  • Weight ratio Q / R4

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Feedback gain () current value 2
RInput weightKey driver
0.6326.32
aPlant coefficient a
0.8284.83
QState weight
0.7074.47
bInput gain b
  • For ẋ = u with Q = 4 and R = 1 the gain is 2 and the closed-loop pole is −2, so u = −2x. Quadrupling Q to 16 raises the gain to 4 and moves the pole to −4: a faster response bought with more control effort.
  • The design stabilises even an unstable plant. With a = 1 (unstable) the gain is 3.236 and the pole is at −2.236.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
R Input weight0.1 to 10 0.63256.3255.692+10%−4.65 %
a Plant coefficient a−2 to 2 1/s0.82844.8284+0.08 1/s+4.08 %
Q State weight0.5 to 20 0.70714.4723.765+10%+4.88 %
b Input gain b0.5 to 3 220+10%0 %

Sweep of State weight

State weightFeedback gain
0.50.7071
2.9381.714
5.3752.318
7.8132.795
10.253.202
12.693.562
15.133.889
17.564.191
204.472

Sweep one variable

Feedback gain ()Hover, touch, or use the arrow keys on the chart
1234 5101520 State weight now 2

Variables and how each one contributes

K

Feedback gain

Result ·

What the equation gives you. Everything else feeds it.

a

Plant coefficient a

1/s · typical −2 to 2

The plant coefficient in 1/s. A positive value is an unstable plant, a negative value a stable one. A larger a means a plant that is less stable and needs more feedback gain to hold. Raising it by 0.5 1/s (to 0.5 1/s) moves the result by +28.1 %, from 2 to 2.562.

b

Input gain b

· typical 0.5 to 3

The input gain: how strongly the control acts on the state. Only the product bK moves the pole. When the plant has no dynamics of its own (a = 0) the gain is √(Q/R) whatever b is, so a stronger input changes nothing; when a is not zero a larger b lowers K a little. Raising it by 10 % (to 1.1) moves the result by +0 %, from 2 to 2.

Q

State weight

· typical 0.5 to 20

The weight on state error in the cost. Larger Q penalises deviations more. A heavier state penalty raises the gain and speeds the response, at the cost of more control effort. Raising it by 10 % (to 4.4) moves the result by +4.88 %, from 2 to 2.098.

R

Input weight

· typical 0.1 to 10

The weight on control effort in the cost. Larger R penalises actuator use more. A heavier effort penalty lowers the gain and slows the response. Raising it by 10 % (to 1.1) moves the result by −4.65 %, from 2 to 1.907.

Worked example with the values above

  1. Inside the root: a² + b²Q/R = 0 + 1 × 4 / 1 = 4, so its square root is 2.
  2. Gain: K = (a + √...)/b = (0 + 2) / 1 = 2.
  3. Closed-loop pole: a − bK = 0 − 1 × 2 = −2.

Assumptions and limits

  • A scalar linear plant with full state measurement, an infinite horizon and an unconstrained control input.
  • Q ≥ 0 and R > 0, and the stabilising Riccati solution is used.

Common mistakes

  • Treating Q and R as physical quantities. They are design weights, and the states and inputs should be scaled so that a weight of 1 corresponds to an acceptable error or effort.
  • Forgetting that saturating an LQR command changes its closed-loop behaviour. The guarantees assume an unconstrained input.

Statistics and uncertainty

K depends on the weights only through the ratio Q/R (for fixed a and b), so scaling both by the same factor changes nothing. Q and R are design weights, not measured quantities, so they carry no sampling uncertainty. The plant parameters a and b do: a 10 % error in b changes the delivered closed-loop pole by about the same amount, since the pole shift is the product bK.

Where it is used

  • Seeing how the cost weights trade state error against control effort, before moving to the matrix problem.
  • Providing a first estimate of the gain and closed-loop speed for a single-state loop.

Maths you need

  • Quadratic cost: integral of Qx² + Ru²
  • Riccati equation: a quadratic equation for P in the scalar case

Related formulas

Practise this formula