When the final value theorem may be used
The theorem is true only if
Every pole of
Said another way,
The setpoint says 4.5 bar, the gauge says 4.25 bar, and it has said so for a week. Nothing is broken: the pump runs, the transmitter is correct, the controller is in automatic. The missing 0.25 bar is an offset, and it can be predicted from the loop drawing before the pump is ever started. This lesson gives the tool for that prediction: the transfer function, the rules for joining blocks, and a careful statement of when the steady-state shortcut may be used. #TransferFunctions #BlockDiagrams #SteadyStateError
By the end of this lesson, you will be able to:
A booster pump with a variable speed drive holds the pressure in a water line. A pressure transmitter on the discharge measures the pressure, and the drive’s own controller sets the pump speed. The installer enabled proportional action only, with a moderate gain, because the loop was steady and that seemed enough.
The loop is steady, but it is steady at the wrong pressure. After every setpoint change the pressure covers only part of the change. When a large tap opens, the pressure falls and recovers only part of the fall. The operators correct for it by setting the setpoint higher than the pressure they want, which works until the demand changes.
To predict this behaviour, each box in the drawing needs a mathematical description that can be joined to the next box by simple algebra. A differential equation does not join easily. A transfer function does.
The Laplace transform changes a function of time
You will almost never evaluate this integral. Its value is in three rules that turn the operations of calculus into algebra. In each rule,
| Operation in time | In the |
|---|---|
| Differentiate: | Multiply by |
| Integrate: | Divide by |
| Delay by | Multiply by |
The variable
Six transform pairs cover the signals met in this course:
| Signal | Transform |
|---|---|
| Unit impulse | |
| Unit step, | |
| Unit ramp, | |
| Decay, | |
| First-order rise, | |
| Sine, |
A step of size
The transfer function
To find it, replace each derivative in the differential equation by a power of
Two conditions are built into this definition.
A transfer function is a ratio of two polynomials in
For
The final value theorem gives the value at which a signal settles, directly from its transform:
For a step of size
When the final value theorem may be used
The theorem is true only if
Every pole of
Said another way,
| Poles of | Formula gives | What really happens | |
|---|---|---|---|
| 2 | Settles at 2. Theorem allowed. | ||
| Grows without limit. Not allowed. | |||
| 0 | Swings for ever. Not allowed. | ||
| infinite | A ramp, no final value. Not allowed. |
The last row is an integrating process, such as a tank level, fed by a constant extra inflow. It has no steady-state gain. For a feedback loop the practical rule is this: confirm that the closed loop is stable before you calculate any steady-state value. An offset calculated for an unstable loop means nothing.
A block multiplies the transform of its input by its transfer function. Three rules reduce any diagram.
The feedback rule is the one that matters most, and it takes three lines to prove. From the diagram,
In words: the forward path, divided by one plus the whole loop. The plus sign belongs to negative feedback. The series rule assumes the second block does not load the first, which is true for signals and for most process units, and false for two tanks joined by a short pipe.
Use the feedback rule on the loop of the booster pump, with controller
Closed-loop transfer functions
The error
The same denominator
Apply the final value theorem to the error after a setpoint step
Everything depends on
| System type | Example of | Error after a step | Error after a ramp of rate | |
|---|---|---|---|---|
| 0 | Grows without limit | |||
| 1 | Infinite | Zero |
A self-regulating process under proportional control is type 0. The reason for the offset is physical: to hold a new pressure the pump needs a new speed, a proportional controller changes its output only when there is an error, so an error must remain. A process that integrates is type 1 without any help from the controller, and a setpoint step leaves no error.
Blocks. With dead time ignored,
Loop gain.
Feedback rule: ✅
Standard first-order form. Divide the numerator and the denominator by
Check that the theorem is allowed. The only closed-loop pole is at
Closed-loop gain: ✅
Final pressure. The pressure rises by
Offset: ✅
Final speed. The controller output rises by
Read it from the standard form: ✅
Meaning. The loop reaches 63.2 percent of its final change in 1.5 s, against 3 s for the pump at fixed speed. Feedback has made the response twice as fast, by the same factor
Open-loop effect. The 0.6 bar fall at fixed speed is the steady-state value of
Closed-loop effect. The loop divides it by
Result. With the tap open the pressure settles 0.30 bar below where it was, and the pump speed is
Balance without any transform. At steady state the process gives
Simulation with the dead time restored. The Python script simulates the loop with
What the dead time does change. The time to reach 63.2 percent of the final change is 1.76 s with dead time, against 1.50 s without. Ignoring the dead time was safe for the offset and optimistic for the speed. ✅
A higher gain. At
The tank is one integrator. The inflow from the valve and the outflow to demand both pass through it, so the drawing gives the outflow its own block with the same
Loop transfer function.
Feedback rule: ✅
Closed-loop time constant:
The theorem is allowed, because the only closed-loop pole is negative. ✅
Closed-loop gain.
Offset: ✅
Physical reason. The level is steady only when inflow equals outflow. The outflow has not changed, so the valve must return to 50 percent, and a proportional controller gives 50 percent only when the error is zero. ✅
On the way there. The valve first opens by
Disturbance transfer function. With
Closed loop from disturbance to level: ✅
Final value. The pole is at
Result. The level settles at
Flow balance. For a steady level the inflow must rise by 0.5 L/s. The valve must open by
Error needed. A proportional controller opens 12.5 percent further only with an error of
Simulation. The Python script steps the setpoint at
Where the theorem is not allowed. With the valve fixed, a 0.5 L/s rise in outflow gives
The script reproduces both applications. It simulates the pump loop with and without the dead time, and the tank loop through both events.
import numpy as npfrom scipy import signalimport matplotlib.pyplot as plt
# ---------- Application 1: booster pump, P control ----------K, tau, theta = 0.10, 3.0, 0.5 # bar per percent, s, sKc = 10.0 # percent per bardr = 0.5 # bar, setpoint step
loop_gain = Kc * KT0 = loop_gain / (1.0 + loop_gain) # closed-loop gain T(0)tau_cl = tau / (1.0 + loop_gain)
# Closed loop without dead time: T(s) = Kc K / (tau s + 1 + Kc K)closed = signal.TransferFunction([loop_gain], [tau, 1.0 + loop_gain])t_a = np.linspace(0.0, 20.0, 20001)t_a, y_a = signal.step(closed, T=t_a)y_a = dr * y_a
def pump_with_dead_time(Kc, t_end=20.0, dt=0.001): """P control of K e^(-theta s)/(tau s + 1), simple Euler steps.""" n = int(t_end / dt) nd = int(round(theta / dt)) y = np.zeros(n + 1) u = np.zeros(n + 1) for k in range(n): u[k] = Kc * (dr - y[k]) u_delayed = u[k - nd] if k >= nd else 0.0 y[k + 1] = y[k] + dt * (K * u_delayed - y[k]) / tau return np.arange(n + 1) * dt, y
t_b, y_b = pump_with_dead_time(Kc)
print("Application 1: booster pump with P control")print(f" loop gain Kc*K = {loop_gain:.2f}")print(f" closed-loop gain T(0) = {T0:.3f}")print(f" pressure rise, formula = {dr * T0:.3f} bar")print(f" offset, formula = {dr / (1.0 + loop_gain):.3f} bar")print(f" closed-loop time constant = {tau_cl:.2f} s")print(f" final rise, no dead time = {y_a[-1]:.3f} bar")print(f" final rise, dead time = {y_b[-1]:.3f} bar")print(f" time to 63.2 pct, no dead time = {t_a[np.argmax(y_a >= 0.632 * dr * T0)]:.2f} s")print(f" time to 63.2 pct, dead time = {t_b[np.argmax(y_b >= 0.632 * dr * T0)]:.2f} s")print(f" 0.6 bar droop at fixed speed becomes {0.6 / (1.0 + loop_gain):.2f} bar")print(" Kc (percent/bar) offset (bar) time constant (s)")for gain in (10.0, 20.0, 50.0): print(f" {gain:5.0f} {dr / (1 + gain * K):.3f} {tau / (1 + gain * K):.2f}")
# ---------- Application 2: storage tank level, P control ----------A = 2.0 # m2kv = 2.0e-5 # m/s per percentKc_level = 100.0 # percent per metredr_level = 0.20 # m, setpoint step at t = 0dq = 0.5e-3 # m3/s, rise in outflow at t = 3000 s
dt = 0.5t_c = np.arange(0.0, 8000.0 + dt, dt)h = np.zeros_like(t_c) # level change from the starting levelu = np.zeros_like(t_c) # valve change from the starting openingfor k in range(len(t_c) - 1): u[k] = Kc_level * (dr_level - h[k]) d = dq if t_c[k] >= 3000.0 else 0.0 h[k + 1] = h[k] + dt * (kv * u[k] - d / A)u[-1] = Kc_level * (dr_level - h[-1])
i_before = np.argmax(t_c >= 3000.0) - 1print("Application 2: storage tank level with P control")print(f" closed-loop time constant = {1.0 / (Kc_level * kv):.0f} s")print(f" first valve move = {Kc_level * dr_level:.1f} percent")print(f" level change at 500 s = {h[np.argmax(t_c >= 500.0)]:.3f} m")print(f" offset before disturbance = {dr_level - h[i_before]:.4f} m")print(f" extra valve opening needed = {dq / (A * kv):.1f} percent")print(f" offset, formula = {dq / (A * Kc_level * kv):.3f} m")print(f" offset, simulation = {dr_level - h[-1]:.3f} m")print(f" valve change at the end = {u[-1]:.1f} percent")
# ---------- Plot ----------fig, ax = plt.subplots(1, 2, figsize=(11, 4.2))ax[0].plot(t_a, 4.0 + y_a, label="no dead time")ax[0].plot(t_b, 4.0 + y_b, label="dead time 0.5 s")ax[0].axhline(4.5, color="grey", lw=0.8, ls="--", label="setpoint")ax[0].set_xlim(0, 12)ax[0].set_xlabel("time (s)")ax[0].set_ylabel("pressure (bar)")ax[0].set_title("Booster pump, P control, Kc = 10 percent/bar")ax[0].legend(loc="lower right")
ax[1].plot(t_c, 1.50 + h, label="level")ax[1].axhline(1.70, color="grey", lw=0.8, ls="--", label="setpoint")ax[1].axvline(3000.0, color="grey", lw=0.6)ax[1].set_xlabel("time (s)")ax[1].set_ylabel("level (m)")ax[1].set_title("Tank level, P control, Kc = 100 percent/m")ax[1].legend(loc="lower right")fig.tight_layout()fig.savefig("loop_offset.png", dpi=120)print("Saved loop_offset.png")Expected output
Application 1: booster pump with P control loop gain Kc*K = 1.00 closed-loop gain T(0) = 0.500 pressure rise, formula = 0.250 bar offset, formula = 0.250 bar closed-loop time constant = 1.50 s final rise, no dead time = 0.250 bar final rise, dead time = 0.250 bar time to 63.2 pct, no dead time = 1.50 s time to 63.2 pct, dead time = 1.76 s 0.6 bar droop at fixed speed becomes 0.30 bar Kc (percent/bar) offset (bar) time constant (s) 10 0.250 1.50 20 0.167 1.00 50 0.083 0.50Application 2: storage tank level with P control closed-loop time constant = 500 s first valve move = 20.0 percent level change at 500 s = 0.126 m offset before disturbance = 0.0005 m extra valve opening needed = 12.5 percent offset, formula = 0.125 m offset, simulation = 0.125 m valve change at the end = 12.5 percentSaved loop_offset.png1. For
Poles at
2. Two blocks
3. For each transform, say whether the final value theorem may be used, and give the final value where it may: (a)
(a) Allowed:
4. A hot water tank has gain
5. For the booster pump of the first application, find the proportional gain needed for an offset of at most 5 percent of a setpoint step. Then use the stability limit quoted in that application to decide whether proportional control alone can reach it.
6. The storage tank of the second application is given a controller gain of
(a)
A booster pump holds 4.0 bar with a proportional controller only. The loop gain K Kc is 1. The operator raises the setpoint to 4.5 bar. Where does the pressure settle?
The dashed line is the new setpoint, 4.5 bar. The dark line is the pressure, simulated in steps of 1 ms with K = 0.10 bar per percent and τ = 3 s. The dotted line is the final value the transfer function predicts. Raise the gain: the offset shrinks and the response gets faster. With the dead time switched on, a high gain makes it ring, and above about 101 percent per bar it never settles.
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. On the same booster pump (K = 0.10 bar per percent), the gain is raised to Kc = 40 percent per bar. The setpoint is again raised by 0.5 bar. What offset remains?
2. With Kc = 40 (loop gain 4), what is the time constant of the closed loop, if the dead time is ignored? The process time constant is 3 s.
3. A storage tank level is held by a proportional controller, Kc = 100 percent per metre. The inlet valve passes 0.04 L/s for each percent of opening. The outflow to demand rises by 1 L/s and stays there. What level error remains?
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.