stepK = 11 / (s(s + 1))○ −z × −p→ 1K = 1−0.5 ± 0.87jK = 1
−6−4−20−3−2−10123σ, real partjω, imaginary partS-PLANE120°106.1°60°target024681000.511.52time (s)ySTEP RESPONSE y(t)gain onlynow0.1110100010203040ω (rad/s)phase (degrees)LEAD PHASE ∠Gc(jω)(s + 1)/(s + 4)36.9° at 2 rad/szp
Lit wire with moving dashes: a signal is flowing along itBlocks: the step input, the summing junction, the controller, the plant G(s), the output, the lead network tray, the gain knob and the closed-loop pole tilePlots: the s-plane (× poles, ○ the lead's zero, ● closed-loop poles, squares the target, dashed rays the angles), the step response integrated from the loop, and the lead network's Bode phaseThe pill carries a new gain, or the lead network, into the controllerG(s) = 1/(s(s + 1)) under a plain gain can only move its poles up and down σ = −0.5, so it always takes about 8 s to settle. A lead compensator 16(s + 1)/(s + 4), placed with the angle and magnitude rules, moves the locus to σ = −2: the same 16.3% overshoot, settled in 2.02 s. The lead network's phase on the jω axis peaks at sin φmax = (1 − α)/(1 + α), at ωmax = 1/(T√α), with α = z/p < 1 and T = 1/z. Frequency-response design picks α from the phase margin it needs.

The problem

  1. 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.

Design on the root locus

The result

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.