1G0 = K / 202e_ss = 1 / (1 + G0)3ok = K < 396 # stable?r = 1K = 801/((s+1)(s+2)(s+10))c = 0+−e = 1.000u = 0.0c = 0.000
r = 1e_ss = 0.2000246810-10123time (s)c(t)OUTPUT c(t), UNIT STEP INK = 80K = 180K = 440
Lit wire with moving dashes: a signal is flowing along itBlocks: reference step, summing junction, gain K, plant and output; the final value theorem is the code cardPlot: output c(t) for K = 80, 180 and 440, simulated from the loop equationThe pill riding back to the junction is the output c: feedbackA unity-feedback loop: reference step, summing junction, gain K, plant P(s) = 1/((s+1)(s+2)(s+10)) and output, with the output fed back. The plot is simulated from the loop equation as the steps play: with K = 80 the output settles at 0.8, the gap the final value theorem predicts; more gain shrinks the gap until the loop goes unstable. The final value theorem: if every pole of sF(s) lies in the open left half-plane, then the limit of f(t) as t goes to infinity equals the limit of sF(s) as s goes to 0. If a pole is on the imaginary axis or to the right of it, f(t) has no final value, and the formula's answer means nothing.

The gap

  1. A unity-feedback loop: a gain K = 80 drives the plant P(s) = 1/((s+1)(s+2)(s+10)), and the output is fed straight back. At t = 0 the reference r(t) steps from 0 to 1. Does the output end up at 1?

Final value theorem

Its limits

What is happening

# step 1/10 · loop
# about: Reference r(t), Summing junction, Controller K, Plant P(s), Output c(t)

reference   r(t) = 1 for t ≥ 0 (unit step)
controller  u = K·e,  K = 80
plant       P(s) = 1/((s+1)(s+2)(s+10))
open loop   G(s) = K·P(s)
feedback    unity: c(t) goes straight back

Every curve and number in the figure is simulated from the loop's equation, c''' + 13c'' + 32c' + 20c = K·(1 − c), with fourth-order Runge-Kutta and a 1 ms step. The Python is plain Python 3, no libraries. With python-control installed, control.dcgain(G) returns G(0) directly.