Steady-State Error
Type and input decide the error
The gold curve is the tracking error e(t) = r(t) − y(t) from t = 0 to 12, the difference between the target input and the closed-loop output, and the dashed line is the steady-state value that error reaches over time. Choose the input among step (constant), ramp (straight line), and parabola (accelerating), and the system type among type 0, type 1, and type 2 (the number of poles the open loop has at the origin); the curve turns green when the error goes to 0 and red when it grows without end. You start with a ramp input, type 1, and K = 2, so the error stops at 2/K = 1. When the system type is at least one step higher than the input the error sinks to 0; when they are exactly equal it stops at a constant other than 0 (raising K shrinks it, but it never becomes 0); and when the type is lower it grows without end. The type 1 system K/(s(s + 1)(s + 2)) is the very plant used throughout the F1 ~ F6 units, and since this slider only goes up to K = 5, the instability at K = 6 does not appear.
Read the error with the final value theorem
The steady-state error comes out neatly from the final value theorem. With unity feedback, the Laplace transform of the error is E(s) = R(s)/(1 + L(s)), and its value after infinite time is e_ss = lim_{t→∞} e(t) = lim_{s→0} s·E(s) = lim_{s→0} s·R(s)/(1 + L(s)). A step input is R = 1/s, a ramp R = 1/s², and a parabola R = 1/s³, so s·R becomes 1, 1/s, and 1/s² respectively. The error then depends on how large 1 + L(s) gets as s → 0, and if L(s) has a pole at the origin, L grows to infinity as s → 0 and the error becomes 0. In the end, the power to drive the error to 0 comes from the poles L has at the origin, that is, from the number of integrators. The theorem, however, applies only when the closed loop is stable.
The three error constants and the type table
The quantity that governs the error for each input is given a name: the error constant. A step input goes with the position error constant K_p = lim_{s→0} L(s), a ramp with the velocity error constant K_v = lim_{s→0} s·L(s), and a parabola with the acceleration error constant K_a = lim_{s→0} s²·L(s), and the error comes out as 1/(1 + K_p) for a step, 1/K_v for a ramp, and 1/K_a for a parabola. The system type decides all at once whether these constants are finite or infinite. Type 0 has only K_p finite, with K_v and K_a equal to 0, so it leaves a finite error for a step and an infinite error for a ramp and a parabola. Type 1 has K_p infinite (step error 0), K_v finite (finite ramp error), and K_a equal to 0 (infinite parabola error), and type 2 has K_p and K_v infinite (step and ramp error 0) and K_a finite (finite parabola error). This 3 × 3 table is all there is to steady-state error, and the display on the first screen lists the three constants of the system you have chosen.
Two knobs to cut the error, and the price
There are two ways to reduce steady-state error. One is to raise the system type, that is, to add an integrator to the controller, adding a pole at the origin, which drives the error for that input all the way to 0 (the integral term of the F5 unit). The other is to enlarge the error constant, either by raising the gain or, like the lag compensation of the F6 unit, by placing a pole near the origin to raise the low-frequency gain; this only reduces a finite error and cannot remove it. Neither way is free. A pole at the origin delays the phase by 90° and cuts into the phase margin, pushing the system toward instability (the phase loss seen in the F3 and F6 units), and raising the gain makes the closed loop unstable the moment it passes a certain line. The boundary of the F1 ~ F4 units, where the type 1 plant K/(s(s + 1)(s + 2)) became unstable at K = 6, is still alive here. So real design is a tug of war among steady-state accuracy, stability, and response speed, and integrators are added only as much as truly needed, with lead compensation filling in the lost phase.
Back to the first screen
On the first screen, you displayed the tracking error e(t) directly and examined its final value while switching the input and the system type. When the type was higher than the order of the input the error vanished to 0, when they were equal it stopped at a finite value such as 1/(1 + K_p), 1/K_v, or 1/K_a, and when the type was lower it widened without end. Every case came from a single final value theorem, e_ss = lim_{s→0} s·R/(1 + L), and how much the number of poles at the origin enlarged 1 + L decided whether the error went to 0. The gain K only changed the size of a finite error and could not get past the wall of order. The integral term of the F5 unit erased the error by moving one cell up the system type in this table, and the lag compensation of the F6 unit reduced the error by enlarging the error constant within the same cell.
With this, the control chapter has come full circle. You judged stability with the Routh test (F1), followed the path of the poles with the root locus (F2), measured the distance with the two margins of the Bode plot (F3), checked encirclements of −1 with the Nyquist plot (F4), shaped the response with PID (F5), shaped the phase with lead and lag compensation (F6), and now read the limits of tracking through steady-state error (F7). Three goals, stability, response speed, and steady-state accuracy, pulling against one another and bound together into a single design: that is the backbone of classical control. Going further, state space, which handles many inputs and outputs at once, pole placement, which puts poles wherever you want, digital control, which controls with sampled signals, and optimal control, which minimizes a cost, await you. All of those paths, too, are built on the language of poles, zeros, margins, and errors seen in this chapter.