Steady-state error from disturbances
About this lesson
A motor holds its speed until a load torque grabs the shaft. Follow that load around a unity-feedback loop, find the error it leaves with the final value theorem, and watch four simulated loops answer one question: what removes it? More gain only shrinks it. An integrator in the plant leaves it. Only an integrator in the controller, before the load enters, drives it to zero.
A motor holding its speed
A motor must hold the speed we ask for, R = 1. The controller G1 turns the error into a torque command u. The motor, the plant, is G2(s) = 1/(s + 2). G1 is a gain of 8. The speed settles at 0.800.
R 1 (step at t = 0) G1(s) 8 (proportional) G2(s) 1/(s + 2) speed before any load 0.800 error from R alone 0.200 = 1/(1 + 8/2) (the lessons on steady-state error and system type cover this part)
Read the lesson step by step
A motor holding its speed
A motor must hold the speed we ask for, R = 1. The controller G1 turns the error into a torque command u. The motor, the plant, is G2(s) = 1/(s + 2). G1 is a gain of 8. The speed settles at 0.800.
R 1 (step at t = 0) G1(s) 8 (proportional) G2(s) 1/(s + 2) speed before any load 0.800 error from R alone 0.200 = 1/(1 + 8/2) (the lessons on steady-state error and system type cover this part)A load grabs the shaft
At t = 5 s a load torque D = 1 starts to drag on the shaft. It enters between the controller and the motor and subtracts from the torque the controller asks for. The speed sags from 0.800 to 0.700.
t = 5 s load D: 0 → 1 motor sees u − D speed 0.800 → 0.700 A disturbance is an input nobody chose. It enters the loop at its own point, not where the reference enters.Two inputs, two errors
The loop is linear, so the effects of R and D simply add. The error R − c splits into a part caused by R and a part caused by D. Here: 0.200 from R plus 0.100 from the load.
E(s) = E_R(s) + E_D(s) from R 0.200 (system type, error constants) from D 0.100 (this lesson) total 0.300 = 1 − 0.700 Superposition: work out each input alone, with the other set to zero, then add.The load's path to the error
Set R = 0 and follow D: through the motor to the output, back through the feedback and the controller, and into the motor again. Reducing that loop gives E_D(s) = G2·D / (1 + G1·G2).
with R = 0: c = G2·(u − D), u = G1·(0 − c) c = −G2·D / (1 + G1·G2) E_D = 0 − c = G2·D / (1 + G1·G2) The load passes through G2 on its way in; G1 only acts on the way back round.Final value of a step load
For a step load D(s) = D0/s, the final value theorem gives e = D0 / (1/G2(0) + G1(0)). The motor's G2(0) = 1/2, so 1/G2(0) = 2. With G1(0) = 8: e = 1/10 = 0.100.
# P control, K = 8: speed at t = 12 s dt, c, w, i = 0.001, 0.0, 0.0, 0.0 for n in range(12000): # 12 s d = 1.0 if n * dt >= 5 else 0.0 # the load e = 1.0 - c u = 8 * e c += dt * (-2 * c + u - d) print(f"{c:.3f}") # 0.700Turn the gain up
Raise the gain to 38 and the load error drops to 1/40 = 0.025, a quarter of before. It never reaches zero: a plain gain needs some error to make the extra torque that balances the load.
# P control, K = 38: speed at t = 12 s dt, c, w, i = 0.001, 0.0, 0.0, 0.0 for n in range(12000): # 12 s d = 1.0 if n * dt >= 5 else 0.0 # the load e = 1.0 - c u = 38 * e c += dt * (-2 * c + u - d) print(f"{c:.3f}") # 0.925 # torque command at the end: u = 2.850 # (K = 8 needed only u = 2.400)An integrator in the plant
Suppose the plant had the integrator: G2 = 1/(s(s + 2)), a motor whose output is its angle. It is type 1, so the step in R leaves no error. But 1/G2(0) = 0, so the load still leaves 1/8 = 0.125.
# plant 1/(s(s+2)), K = 8: angle at t = 12 s dt, c, w, i = 0.001, 0.0, 0.0, 0.0 for n in range(12000): # 12 s d = 1.0 if n * dt >= 5 else 0.0 # the load e = 1.0 - c u = 8 * e c, w = c + dt * w, w + dt * (-2 * w + u - d) print(f"{c:.3f}") # 0.875 # before the load: 1.000 (no error from R) # after: 0.875Integrate in the controller
Back to the speed motor, and add integral action: G1 = 8 + 20/s. Now G1(0) is infinite, so e = 1/(2 + ∞) = 0. The load still makes a dip, to 0.924, but the speed climbs back to exactly 1.000.
# PI control, G1 = 8 + 20/s: speed at t = 12 s dt, c, w, i = 0.001, 0.0, 0.0, 0.0 for n in range(12000): # 12 s d = 1.0 if n * dt >= 5 else 0.0 # the load e = 1.0 - c u = 8 * e + 20 * i i += e * dt c += dt * (-2 * c + u - d) print(f"{c:.3f}") # 1.000Why the integrator wins
While any error is left, the integral keeps changing and so does the torque command. It can only stop when the error is zero. Then u carries the load's torque too: 2.000 before the load, 3.000 after.
before the load u = 2.000 (2 × speed 1.0) after the load u = 3.000 (2 × 1.0 + load 1.0) error 0 A plain gain makes u from e, so it needs e ≠ 0 to hold extra torque. The integral remembers: it holds u with e = 0.The rule to remember
To remove the steady error from a step load, the integrator must sit before the point where the load enters, in the controller. Gain there only shrinks the error. An integrator after it, in the plant, does not help.
steady error from a step load of 1 K = 8 0.100 K = 38 0.025 1/s in the plant 0.125 1/s in controller 0.000 Only G1(0), the controller's gain at zero frequency, can drive it to zero.
5 quick questions
Choose one answer per question. You can change your choices before checking them.
01A loop has a reference R and a load D. Why can we work out the error from each one separately and then add them?
In a linear system the response to two inputs is the sum of the responses to each one alone. Set D = 0 to find E_R, set R = 0 to find E_D, then add.
02The load enters between the controller G1 and the plant G2. What is the error it causes, E_D(s)?
With R = 0: c = G2·(u − D) and u = −G1·c, so c = −G2·D/(1 + G1·G2) and E_D = 0 − c = G2·D/(1 + G1·G2).
03G2(s) = 1/(s + 2) and the controller is a gain of 38. What steady error does a step load of 1 leave?
e = D0 / (1/G2(0) + G1(0)) = 1 / (2 + 38) = 1/40 = 0.025. More gain shrinks the error but never removes it.
04The plant is 1/(s(s + 2)) (type 1) and the controller is a gain of 8. What happens with a step load of 1?
1/G2(0) = 0, so e = 1/(0 + 8) = 0.125. The plant's integrator removes the error from a step in R, not from a load that enters before it.
05Why does a PI controller, G1 = 8 + 20/s, bring the speed back to exactly 1 after the load?
G1(0) is infinite, so e = 1/(2 + ∞) = 0. In the time domain, the integral holds the extra torque (u goes from 2.000 to 3.000) with zero error.
Glossary
- Disturbance
- An input nobody chose, such as a load torque, that pushes the output away from where we asked. It enters the loop at its own point, not where the reference enters.
- Superposition
- In a linear system the response to several inputs is the sum of the responses to each input alone.
- Steady-state error
- The error left once the response has settled: the limit of R − c as time goes to infinity.
- Final value theorem
- For a stable system, the limit of e(t) as t → ∞ equals the limit of s·E(s) as s → 0.
- DC gain, G(0)
- A block's gain at zero frequency: what it does to a constant input once everything has settled. It is infinite when the block has an integrator (a pole at s = 0).
- Integral action
- A controller term that adds up the error over time (20/s here). It keeps changing its output until the error is zero.
- PI controller
- Proportional plus integral control: u = Kp·e + Ki·∫e dt, or G1(s) = Kp + Ki/s.
Notes and sources
- The motor is a simple model with illustrative numbers: speed obeys dc/dt = −2c + u − d, so G2(s) = 1/(s + 2). Every curve and number in the figure is simulated from that model (RK4, 1 ms steps) and matches the final-value formula.
- Nise (§7.5) draws the disturbance added at the summing junction, which gives e = −1/(1/G2(0) + G1(0)). Here the load subtracts, so the sign is plus. The size is the same.
- The final value theorem only holds when the closed loop is stable. Every loop in this lesson is; the next lessons show how to check that without solving for the poles.
- The Python on the steps is plain Python 3, no imports. It uses Euler steps of 1 ms; their steady state is the true one, so the printed speeds match the formula to three decimals.
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (§7.5 steady-state error for disturbances)
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (§5-7 response to torque disturbances under P and PI control; §5-8 steady-state errors)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson (ch. 4, a first analysis of feedback)
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall)
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- python-control documentation: control.dcgain
Quiz Unlocks after the last step.