The problem
Our plant is G(s) = 1/(s(s + 1)), driven by a plain gain K. With K = 1 the output overshoots 16.3%, which we like, but takes 8.08 s to settle. We want the same overshoot, four times faster.
Turn K up. The poles meet at −0.5, then only climb the line σ = −0.5. The real part never moves, so the settling time stays near 8 s. At K = 16 the output overshoots 67.3% and still needs 7.33 s.
Same overshoot means ζ = 0.5; four times faster means ωn = 4. So we want poles at −2 ± 3.46j. Is that point on the locus? Add the plant's angles there: 120° + 106.1° = 226.1°, not 180°. No gain can reach it.
Design on the root locus
Swap the plain gain for a lead compensator: Kc(s + z)/(s + p), a zero and a pole with the zero nearer the origin (z < p). Seen from any point above the axis, the zero adds more angle than the pole takes away.
A common choice: put the zero at −1, right on the plant's slow pole. At the target it adds +106.1°, exactly cancelling that pole's angle. We still need 46.1° in total, so the lead's pole must take away 60°.
The pole must sit where the line to the target leans at 60°: that is −4. Now the loop is Kc/(s(s + 4)), and its locus climbs the line σ = −2, straight through the target.
On the locus, the gain that lands on a point is the product of the distances from the poles, divided by those from the zeros. At the target: Kc = 4 × 4 = 16. The poles now sit on −2 ± 3.46j.
The result
Run the step again. The output overshoots 16.3% as before, but peaks at 0.91 s instead of 3.63 s and settles in 2.02 s instead of 8.08 s (dashed). The velocity constant rose from 1 to 4.
Feed the compensator a sine wave and its output runs ahead of the input: positive phase. For (s + 1)/(s + 4) the lead peaks at 36.9° at 2 rad/s, halfway between 1 and 4 on a log scale.
Python's cmath does the angle and magnitude rules for us: it finds the missing angle, places the pole, and works out Kc. It prints 46.1°, a pole at 4 and a gain of 16.
The working
# step 1/10 · problem # about: Input: unit step, Compare: input − output, Controller, Plant G(s), Output y(t), Feedback path, plant poles 0 and −1, closed-loop poles, root locus, step response G(s) = 1 / (s(s + 1)) poles 0, −1 controller: a gain K closed-loop poles: s² + s + K = 0 K = 1: s = −0.5 ± 0.87j (ζ = 0.5, ωn = 1) overshoot 16.3 % peak at 3.63 s settles (2 %) in 8.08 s goal: same overshoot, settle in about 2 s
Every curve is the step response of the closed loop, integrated from its own equations (fourth-order Runge-Kutta: 3.125 ms steps on the plot, 1 ms steps for the measured numbers). Overshoot, peak time and 2% settling time are measured on that curve. Putting the lead's zero on a stable plant pole is a standard first choice and makes the result an exact second-order loop. If the plant pole is not known exactly the cancellation is imperfect, and it must never be tried on a pole in the right half-plane. The Python uses only the standard library. With python-control installed, ct.root_locus_map(ct.tf([1, 1], [1, 5, 4, 0]), gains=[16]) returns the same closed-loop poles: −2 ± 3.46j and −1.