ELE-390 · Lesson 6 of 12 · 22 min
Steady-state error and system type
Lesson 4 dealt with how a loop gets to where it is going. This lesson deals with where it ends up. Two of the PT-1 specifications are steady-state requirements: the camera must follow a 20°/s pan with an error of no more than 0.2°, and it must hold position against a steady wind torque. The CC-1 has one too: the cabinet should sit at its set point, not 1.75 K below it. Whether a loop can meet such requirements depends less on the exact gains than on a structural property, the number of integrators in the loop and where they sit relative to the disturbance. This lesson defines that property, the system type, and gives the error constants that measure steady-state accuracy.
The final value theorem
Steady-state error is the limit of e(t) as t → ∞. Rather than solve for e(t) and take the limit, control engineers use the final value theorem from Laplace transform theory: if the limit exists, it equals the limit of sE(s) as s → 0. The condition matters. The theorem applies only if sE(s) has all its poles in the left half plane, which in practice means the closed loop must be stable. Applying it to an unstable loop gives a finite answer for an error that is actually growing without limit.
System type and error constants
Write the loop gain L(s) with any poles at the origin pulled out as a factor 1/s^N, so that L(s) = K(1 + …)/(s^N(1 + …)). The integer N, the number of open-loop integrators, is the system type. The cabinet with proportional control has no integrator and is type 0. The PT-1 pan servo has one, from the conversion of speed to angle, and is type 1. A type 2 loop has two integrators, typically one in the plant and one in the controller.
For the three standard test inputs, a step r = A, a ramp r = At and a parabola r = At²/2, the final value theorem gives the steady error in terms of three error constants. The position constant K_p = lim L(s), the velocity constant K_v = lim sL(s) and the acceleration constant K_a = lim s²L(s), each as s → 0. (The symbol K_p for the position constant is traditional; in this course the proportional gain will be written as K_p only where the meaning is clear from context.)
| Input | Steady error | Type 0 | Type 1 | Type 2 |
|---|---|---|---|---|
| Step A | A/(1 + K_p) | A/(1 + K_p) | 0 | 0 |
| Ramp At | A/K_v | ∞ | A/K_v | 0 |
| Parabola At²/2 | A/K_a | ∞ | ∞ | A/K_a |
The pattern is simple. Each integrator in the loop removes the steady error for one more class of input. A type 0 loop leaves a finite error to a step and cannot follow a ramp. A type 1 loop follows a step exactly and a ramp with a constant lag. A type 2 loop follows a ramp exactly and a parabola with a constant error. The reason is physical: an integrator can hold a steady output with zero input. In a type 1 servo the plant's integrator holds the camera at any angle with zero error and zero voltage. To follow a ramp, the camera must move at a steady speed, which needs a steady voltage, which a proportional controller can produce only from a steady error.
The PT-1 velocity constant
For the pan servo with proportional gain K and the plant 8.33/(s(s + 21)), the velocity constant is K_v = lim sL(s) = 8.33K/21 = 0.397K. With the rate loop of lesson 3, the inner loop reduces the effective plant gain: L(s) = 8.33K_p/(s(s + 21 + 8.33K_d)), so K_v = 8.33K_p/(21 + 8.33K_d). The specification of 0.2° error at 20°/s requires K_v ≥ 20/0.2 = 100 s⁻¹.
Amara simulates the three controllers she has so far: proportional with K_p = 27, the cascade with K_p = 133 and K_d = 2.28, and the cascade with an integral term added, so that the motor voltage is u = K_pe + K_i∫e dt − K_dω with K_i = 443 V/(rad·s). She tests each with a 20°/s ramp and, separately, with a 1.5 N·m wind torque and the command held at zero.
import math
deg = math.pi / 180
def sim(Kp, Kd=0.0, Ki=0.0, ramp=0.0, Td=0.0, t_end=3.0, dt=1e-4):
"""Pan servo: d(omega)/dt = -21 omega + 8.33 (u - 0.8 Td); u = Kp e + Ki*int(e) - Kd*omega."""
th = w = integ = 0.0; t = 0.0
while t < t_end:
e = ramp * t - th
integ += e * dt
u = Kp * e + Ki * integ - Kd * w
w += dt * (-21.0 * w + 8.33 * (u - 0.8 * Td))
th += dt * w; t += dt
return ramp * t - th
designs = [("P, Kp = 27", 27.0, 0.0, 0.0), ("rate + position", 133.0, 2.28, 0.0), ("rate + position + integral", 133.0, 2.28, 443.0)]
for name, Kp, Kd, Ki in designs:
Kv = 8.33 * Kp / (21.0 + 8.33 * Kd) if Ki == 0 else float('inf')
e_ramp = sim(Kp, Kd, Ki, ramp=20 * deg)
e_wind = sim(Kp, Kd, Ki, Td=1.5)
pred = 20 / Kv if Ki == 0 else 0.0
kv = f"{Kv:6.1f} 1/s" if Kv < 1e9 else "infinite"
print(f"{name:27s} Kv = {kv:>10s} ramp error {e_ramp/deg:6.3f} deg (formula {pred:.3f}), "
f"1.5 N*m wind error {abs(e_wind)/deg:6.3f} deg")
# what proportional gain would meet Kv >= 100 without integral action?
print(f"P only needs Kp >= {100*21/8.33:.0f} V/rad for Kv = 100; with Kd = 2.28 it needs {100*(21+8.33*2.28)/8.33:.0f} V/rad")
# the cabinet is type 0: steady error to a step is 1/(1 + Kpos)
for Kc in (150.0, 400.0):
Kpos = 0.1 * Kc
print(f"cabinet Kc = {Kc:.0f} W/K: position constant {Kpos:.0f}, error {100/(1+Kpos):.1f} % of a set-point step")P, Kp = 27 Kv = 10.7 1/s ramp error 1.867 deg (formula 1.867), 1.5 N*m wind error 2.546 deg rate + position Kv = 27.7 1/s ramp error 0.722 deg (formula 0.722), 1.5 N*m wind error 0.517 deg rate + position + integral Kv = infinite ramp error 0.000 deg (formula 0.000), 1.5 N*m wind error 0.000 deg P only needs Kp >= 252 V/rad for Kv = 100; with Kd = 2.28 it needs 480 V/rad cabinet Kc = 150 W/K: position constant 15, error 6.2 % of a set-point step cabinet Kc = 400 W/K: position constant 40, error 2.4 % of a set-point step
The simulated ramp errors match the formula exactly: 1.87° for proportional control and 0.72° for the cascade, neither close to 0.2°. Meeting K_v = 100 with proportional control alone would need K = 252 V/rad, giving poles with ζ = 0.23 and nearly 50 % overshoot; with the rate loop's K_d = 2.28 it would need K_p = 480 V/rad, which pushes the poles far from the region of lesson 4. Raising the gain trades damping for accuracy, and here the trade does not work.
The third controller removes both errors. The integral term makes the loop type 2, so the ramp error is zero, and it also removes the wind error, which the next section explains. The cost is a third closed-loop pole and a zero, with consequences for overshoot that lessons 8 and 11 deal with. An alternative that keeps the loop type 1 but multiplies K_v by a large factor at low frequency is the lag compensator of lesson 8.
Disturbances and where integrators sit
The error constants describe reference tracking. Disturbance rejection follows a related but different rule: what matters is the number of integrators between the error and the point where the disturbance enters. For the wind torque, lesson 3 showed that the disturbance enters as an equivalent voltage at the motor terminals. The plant's integrator comes after that point, so it does nothing to reject the disturbance. At steady state the camera is still and the motor must supply a torque equal and opposite to the wind, which needs a steady current and a steady voltage of 0.8 × 1.5 = 1.2 V. A proportional controller can produce 1.2 V only from a steady error of 1.2/K_p radians.
The result shows the general rule: the steady error to a step disturbance entering at the plant input is the disturbance divided by the controller's DC gain. A controller with an integrator has infinite DC gain, so the error is zero. Integral action, placed in the controller where it acts before the disturbance's entry point, is the standard way to make a loop insensitive to constant disturbances. It is why almost every industrial controller has an integral term, and why the CC-1, whose disturbances are the weather and the electronics, needs one.
Worked problem
Velocity constant and wind error with the cascade
Daniel asks for the gain changes needed to meet K_v ≥ 100 with the cascade structure if the damping term is kept at 40 rad/s. Find K_p, the resulting closed-loop poles and the steady error to the 1.5 N·m wind torque.
Show solution
- With the damping term fixed, K_v = 8.33K_p/40 ≥ 100, so K_p ≥ 480 V/rad.
- \[s^2 + 40s + 8.33 \times 480 = s^2 + 40s + 4000 \;\Longrightarrow\; s = -20 \pm j60.0\]
- The poles have ζ = 20/63.2 = 0.32, giving about 35 % overshoot, which violates the 10 % limit.
- The wind error is 0.8 × 1.5/480 = 2.5 mrad = 0.14°.
Answer: K_p = 480 V/rad meets the velocity constant and reduces the wind error to 0.14°, but the poles at −20 ± j60 have ζ = 0.32 and 35 % overshoot. Accuracy and damping cannot both be met by gain alone.
The cabinet
The cabinet loop under proportional control is type 0. Its position constant is K_p = 0.1 × K_c, the loop's DC gain, so a set-point step leaves 1/(1 + 0.1K_c) of itself as error: 6.2 % at K_c = 150 W/K and 2.4 % at 400 W/K. The outdoor temperature and the electronics' dissipation enter at the plant, so their steady effects are also divided by 1 + 0.1K_c. Lesson 1's design-day offset of 1.75 K is this effect. An integral term makes the loop type 1 and removes the offset to set-point steps and constant disturbances alike. It cannot make the cabinet follow a ramp in outdoor temperature exactly, but such a ramp, a few kelvins per hour at dusk, leaves an error of the ramp rate divided by the new velocity constant, which with a reasonable integral gain is a small fraction of a kelvin.
Non-unity feedback and the meaning of error
The formulas above assume unity feedback, where the error signal inside the controller is r − y. When the sensor has a gain other than one, the controller's error is r − Hy, and the actual output error r − y differs from it. A thermistor whose calibration reads 2 % high gives a sensor gain of 1.02, and even a type 1 loop with zero internal error then holds the output 2 % low. No amount of integral action fixes a sensor error; it is fixed by calibration. For the PT-1, the encoder's gain is set by its line count and the gear ratio and is exact, but its zero position is set at power-up by a homing routine, and an error there appears directly as an aim error.
Steady state is not the whole story
System type and error constants describe the end of the response. A loop that meets every steady-state specification can still be unusable if it takes too long to get there or rings on the way. The type 2 pan servo above follows a ramp perfectly in the end, but its integrator takes time to build up the voltage the ramp needs, and the transient error at the start of a pan is larger than the steady error of a type 1 design. In practice the steady-state requirement is met first by choosing the structure, the number and location of integrators, and then the transient requirements are met by placing the poles, which is the subject of the next two lessons.
Common mistakes
MistakeApplying the final value theorem to an unstable loop.
InsteadThe theorem holds only if the closed loop is stable; check stability first.
MistakeCounting the plant's integrator as rejecting a disturbance that enters before it.
InsteadOnly integrators between the error and the disturbance's entry point remove its steady effect.
MistakeRaising gain to meet K_v without checking damping.
InsteadHigher gain moves the poles toward the imaginary axis; use integral or lag compensation instead.
MistakeExpecting integral action to correct a sensor calibration error.
InsteadThe loop follows the measurement; fix the sensor.
Summary and key terms
- The final value theorem gives e_ss = lim sE(s) as s → 0, provided the closed loop is stable.
- The system type is the number of integrators in the loop gain; each removes the steady error for one more input class.
- The error constants are K_p = L(0), K_v = lim sL(s) and K_a = lim s²L(s); the ramp error of a type 1 loop is A/K_v.
- The PT-1 needs K_v ≥ 100 s⁻¹; proportional and cascade designs give 10.7 and 27.7 s⁻¹, and raising gain alone destroys the damping.
- A step disturbance at the plant input leaves an error of the disturbance divided by C(0); integral action in the controller removes it.
- Sensor gain errors pass straight to the output and must be removed by calibration.
- Steady-state error
- The limit of the error as time tends to infinity.
- Final value theorem
- lim e(t) = lim sE(s) as s → 0, valid when sE(s) is stable.
- System type
- The number of free integrators in the loop gain.
- Position constant
- K_p = lim L(s) as s → 0.
- Velocity constant
- K_v = lim sL(s) as s → 0; the ramp error of a type 1 loop is the ramp rate divided by K_v.
- Acceleration constant
- K_a = lim s²L(s) as s → 0.
- Integral action
- A controller term proportional to the integral of the error, giving infinite DC gain.
- Offset
- The steady error left by a proportional controller.
Practice problems
Work each problem on paper first, then reveal the answer to check.
A type 1 loop has K_v = 50 s⁻¹. What is the steady error to a ramp of 10°/s?
Show answer
10/50 = 0.2°.
Find the steady error of a unity-feedback loop with L(s) = 20/((s + 1)(s + 4)) to a unit step.
Show answer
K_p = 5, so e_ss = 1/6 = 0.167.
What proportional gain gives K_v = 100 for the pan plant without a rate loop?
Show answer
K = 100 × 21/8.33 = 252 V/rad.
The pan servo has K_p = 200 V/rad and no integral term. What is the error for a 3 N·m wind torque?
Show answer
0.8 × 3/200 = 0.012 rad = 0.69°.
What is the system type of L(s) = 10(s + 2)/(s²(s + 5))?
Show answer
Type 2; K_a = 10 × 2/5 = 4.
Why does the type 2 pan servo still have a transient error at the start of a pan?
Show answer
The integrator needs time to build the steady voltage that the moving camera requires.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.