Choosing the gain for a target damping ratio
About this lesson
A motor turns a camera arm, and an amplifier gain K is the only knob. Turn K up and watch the three closed-loop poles trace the root locus. Then draw the ray where the damping ratio is 0.5, find where it crosses the locus, and read the gain off the pole-to-point lengths: K = 1.037. A step response integrated from the closed loop checks the design, and K = 3 shows what more gain costs.
One loop, one knob
A motor turns a camera arm to the angle we ask for. The plant is G(s) = 1/(s(s+1)(s+2)). An amplifier multiplies the error by a gain K, and feedback brings the arm's angle back to compare. K is our only knob.
plant G(s) = 1 / (s(s + 1)(s + 2))
controller gain K (an amplifier)
feedback unity: error = command - angle
closed loop T(s) = K·G / (1 + K·G)
= K / (s³ + 3s² + 2s + K)
The question: which K gives a good response?Read the lesson step by step
One loop, one knob
A motor turns a camera arm to the angle we ask for. The plant is G(s) = 1/(s(s+1)(s+2)). An amplifier multiplies the error by a gain K, and feedback brings the arm's angle back to compare. K is our only knob.
plant G(s) = 1 / (s(s + 1)(s + 2)) controller gain K (an amplifier) feedback unity: error = command - angle closed loop T(s) = K·G / (1 + K·G) = K / (s³ + 3s² + 2s + K) The question: which K gives a good response?The poles depend on K
The closed-loop poles are the roots of 1 + K·G(s) = 0, which here is s³ + 3s² + 2s + K = 0. Every K gives three poles. At K = 0 they sit on the plant's own poles: 0, −1 and −2.
1 + K·G(s) = 0 1 + K / (s(s + 1)(s + 2)) = 0 s(s + 1)(s + 2) + K = 0 s³ + 3s² + 2s + K = 0 K = 0 poles 0, -1, -2 (the plant's own) K > 0 the poles move The sum of the three poles is always -3 (minus the s² coefficient), whatever K is.Turn K up: the root locus
Turn the dial from 0 to 6 and follow the poles. Two meet at −0.423 and leave the axis; the third heads left. Their paths are the root locus. At K = 6 the pair reaches ±1.41j: the edge of stability.
K from 0 to 6: 0 and -1 move towards each other meet at s = -0.423 (K = 0.385) then split into a complex pair -2 moves left K = 6 poles ±j√2 = ±1.41j and -3 (the imaginary-axis crossing) K > 6 the pair is in the right half: unstable The breakaway point and the crossing are worked out in the lesson "Breakaway points and the imaginary-axis crossing".The target: a ray of ζ = 0.5
We want the pair's damping ratio ζ = 0.5: about 16.3% overshoot for a pure two-pole system. Every pole with ζ = 0.5 lies on one ray from the origin, 60° up from the negative real axis, because cos 60° = 0.5.
damping ratio ζ = 0.5 for a pole -σ ± jωd: ζ = σ / |p| = cos θ θ = angle from the negative real axis ζ = 0.5 → θ = cos⁻¹(0.5) = 60° pure second-order pair: %OS = 100·e^(-ζπ/√(1-ζ²)) = 16.3 % So the design point is wherever this ray crosses the locus.Where the ray meets the locus
A point is on the locus when the angles from the plant's poles add up to 180°. Walking out along the ray, that happens at distance 0.667 from the origin: s* = −0.333 + 0.577j. This is our design point.
# walk out along the ζ = 0.5 ray until the # angles from 0, -1, -2 add up to 180° import cmath, math ray = cmath.exp(1j * math.radians(120)) def angles(r): s = r * ray return sum(math.degrees(cmath.phase(s + p)) for p in (0, 1, 2)) lo, hi = 0.01, 1.4 for _ in range(60): mid = (lo + hi) / 2 lo, hi = (mid, hi) if angles(mid) < 180 else (lo, mid) s = lo * ray print(round(lo, 3), round(s.real, 3), round(s.imag, 3)) # 0.667 -0.333 0.577Read K off the lengths
On the locus, K = 1/|G(s*)|: multiply the distances from the plant's poles to s*. That is 0.667 × 0.882 × 1.764 = 1.037. In Python, K = −1/G(s) gives the same number in one line.
# the magnitude criterion: |K·G(s*)| = 1 G = lambda s: 1 / (s * (s + 1) * (s + 2)) s = complex(-1/3, 3 ** -0.5) # the design point lengths = [abs(s), abs(s + 1), abs(s + 2)] K = -1 / G(s) # from 1 + K·G = 0 print([round(x, 3) for x in lengths], round(K.real, 3), abs(K.imag) < 1e-12) # [0.667, 0.882, 1.764] 1.037 TrueTurn the dial to 1.037
Set K = 1.037 (exactly 28/27). The pair glides onto the ray at −0.333 ± 0.577j. The third pole stops at −2.33, because the three poles must still add up to −3.
K = 28/27 = 1.037 poles -0.333 ± 0.577j (ζ = 0.500, ωn = 0.667) -2.33 check: (s² + (2/3)s + 4/9)(s + 7/3) = s³ + 3s² + 2s + 28/27 ✓ sum of poles -1/3 - 1/3 - 7/3 = -3 ✓Is the pair in charge?
The pair's real part is −0.333; the third pole sits at −2.33, 7 times further left. Its term e^(−2.33t) dies 7 times faster, so the pair sets the shape. A common rule asks for at least 5 times.
pair -0.333 ± 0.577j fades like e^(-0.333t) third pole -2.333 fades like e^(-2.333t) ratio 2.333 / 0.333 = 7 rule of thumb: the other poles at least about 5 times further left than the pair → the pair is dominant; the second-order formulas are a good first guess.Check the step response
Now the real test: a unit step, integrated from the closed loop. The arm overshoots by 15.5% at 5.93 s and stays within 2% after 12.5 s. The predicted 16.3% was close: the third pole trims a little.
# step response of K / (s³ + 3s² + 2s + K), RK4 K, dt = 28 / 27, 0.001 y, v, a, t, peak = 0.0, 0.0, 0.0, 0.0, (0.0, 0.0) f = lambda y, v, a: (v, a, K * (1 - y) - 2 * v - 3 * a) while t < 40: k1 = f(y, v, a) k2 = f(*[x + dt / 2 * d for x, d in zip((y, v, a), k1)]) k3 = f(*[x + dt / 2 * d for x, d in zip((y, v, a), k2)]) k4 = f(*[x + dt * d for x, d in zip((y, v, a), k3)]) y, v, a = [x + dt / 6 * (p + 2 * q + 2 * r + s) for x, p, q, r, s in zip((y, v, a), k1, k2, k3, k4)] t += dt peak = max(peak, (y, t)) print(round(100 * (peak[0] - 1), 1), round(peak[1], 2)) # 15.5 5.93More gain, more swing
Why not more gain? At K = 3 the pair climbs past the ray to −0.164 ± 1.047j, ζ = 0.15. The arm overshoots 56.5% and needs 22.2 s to settle. On the root locus, picking K means picking this trade.
K = 1.037 K = 3 pair -0.333 ± 0.577j -0.164 ± 1.047j ζ 0.50 0.15 third pole -2.33 -2.67 overshoot 15.5 % 56.5 % settling 12.5 s 22.2 s more K: faster start, more swing, less margin (K = 6 swings for ever).
5 quick questions
Choose one answer per question. You can change your choices before checking them.
01With plant G(s) = 1/(s(s+1)(s+2)), unity feedback and gain K, where are the closed-loop poles?
The poles are the roots of 1 + K·G(s) = 0. Multiplying by s(s+1)(s+2) gives s³ + 3s² + 2s + K = 0. Only at K = 0 do they sit on the plant's own poles 0, −1 and −2.
02Why does every pole with damping ratio ζ = 0.5 lie on a ray 60° from the negative real axis?
For a pole −σ ± jωd, ζ = σ/|p| = cos θ. Fixing ζ fixes the angle, so all such poles share one ray from the origin. The distance along the ray is the natural frequency ωn.
03At the design point s* = −0.333 + 0.577j, the distances from the plant's poles 0, −1 and −2 are 0.667, 0.882 and 1.764. What is K?
On the locus |K·G(s*)| = 1, so K = 1/|G(s*)|. With no zeros, that is the product of the distances: 0.667 × 0.882 × 1.764 = 1.037 (exactly 28/27).
04ζ = 0.5 predicts 16.3% overshoot, but the simulated arm overshoots 15.5%. Why the difference?
The third pole is 7 times further left than the pair, so the pair is dominant and the formula is a good first guess. It is still not exact, which is why a root-locus design is always checked with a step response.
05What happens if you raise the gain from 1.037 to 3?
At K = 3 the pair sits at −0.164 ± 1.047j, with ζ = 0.15. The arm overshoots 56.5% and takes 22.2 s to settle. It is still stable; that only ends at K = 6, where the pair reaches the imaginary axis.
Glossary
- Root locus
- The paths the closed-loop poles trace in the s-plane as the gain K goes from 0 upwards.
- Characteristic equation
- 1 + K·G(s) = 0. Its roots are the closed-loop poles.
- Damping ratio (ζ)
- How quickly a pole pair's oscillation dies out, from 0 (never) to 1 (no overshoot). For a pole −σ ± jωd, the pole's distance from the origin is the natural frequency ωn, and ζ = σ / ωn.
- Constant-ζ ray
- The line from the origin holding every pole with the same damping ratio, at angle cos⁻¹ζ from the negative real axis.
- Angle criterion
- A point s is on the root locus when the angle of G(s) is 180° (an odd multiple of 180°). With no zeros: the angles from the open-loop poles to s add up to 180°.
- Magnitude criterion
- At a point on the locus, K = 1/|G(s)|. With no zeros, that is the product of the distances from the open-loop poles to the point.
- Design point
- The point s* where the constant-ζ ray crosses the locus: where we want the dominant poles to be.
- Dominant poles
- The closed-loop poles nearest the imaginary axis. When the others are about 5 or more times further left, the dominant pair sets the shape of the response.
Notes and sources
- The plant 1/(s(s+1)(s+2)) is a standard textbook servo model with round numbers, not a measured motor. The locus is the exact roots of s³ + 3s² + 2s + K for many values of K; the step responses are integrated from the closed loop (RK4, 0.01 s steps) and measured to a 2% band.
- The design point and gain come out exact here: s* = −1/3 + j/√3 and K = 28/27. On most plants you find the crossing numerically, as the Python on step 5 does, and read K from the magnitude criterion.
- The 16.3% overshoot from ζ = 0.5 is exact only for two poles and no zeros. Here the third pole at −7/3 lowers it to 15.5%. That is why a design read off the root locus is always checked with a simulated step response.
- The plant has a pole at s = 0 (a type 1 system), so for any K between 0 and 6 the arm ends exactly at the commanded angle: the steady-state step error is zero. Gain only changes how it gets there.
- The Python uses only the standard library. With python-control installed, ct.root_locus_plot(ct.tf([1], [1, 3, 2, 0]), grid=True) draws this locus with lines of constant damping.
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (ch. 8, Root Locus Techniques; §4.6–4.7, second-order response and additional poles)
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (ch. 6, Control Systems Analysis and Design by the Root-Locus Method)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson (ch. 5, The Root-Locus Design Method)
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall), lecture notes 11–13: the root locus method and its rules
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- Swarthmore Linear Physical Systems Analysis: Why make a root locus plot? (K = −1/G(s) on the locus)
- python-control documentation: control.root_locus_plot (grid=True draws the damping grid)
- Python documentation: cmath, mathematical functions for complex numbers
Quiz Unlocks after the last step.