Step response of a first-order process
The output moves by
A technician changes a controller setting, sees no change in the temperature after one minute, and changes it again. Twenty minutes later the tank is 8 °C too hot and the high temperature alarm sounds. The controller was not at fault: the tank was slow and the sensor was late, and nobody had measured how slow or how late. This lesson gives you three numbers that describe almost any industrial process, and one simple test that finds them. With those numbers you can predict what the process will do before you touch it. #ControlEngineering #StepTest #DeadTime
By the end of this lesson, you will be able to:
A hot water tank with an electric heater supplies a wash line. The temperature sensor is not in the tank. It is on the outlet pipe, some metres away, where it was easy to fit. When the heater power rises, the water in the tank warms slowly because there is a large mass of it. Then the warmer water must travel along the pipe before the sensor feels anything.
So the tank answers a change in two stages: first nothing happens at the sensor, then the temperature climbs, quickly at the start and more slowly as it nears its new level. To control it well you need three numbers, which are the model of the process: how far the temperature moves for each percent of power, how long the climb takes, and how long the silent stage lasts.
A model is a short description of how the output of a process answers a change of its input. It does not need to describe the physics inside the tank. It needs to be good enough for three jobs:
The model in this lesson is simple, and most tuning rules in industry are written for it.
Many processes store one quantity and lose it at a rate that grows with the amount stored. A tank stores heat and loses it with the water that leaves and through its walls. A pipe system stores water under pressure. For such a process the rate of change of the output is proportional to the distance that remains to the final value:
Here
If the controller output is changed in one sudden step of size
Step response of a first-order process
The output moves by
The fraction of the total change that is complete depends only on the number of time constants that have passed.
| Time after the response begins | Fraction complete |
|---|---|
| 28.3 percent | |
| 63.2 percent | |
| 86.5 percent | |
| 95.0 percent | |
| 98.2 percent | |
| 99.3 percent |
After one time constant the response is 63.2 percent complete, after three 95 percent, and after four 98 percent, when engineers call the process settled. So a tank with
The process gain is the final change of the process variable divided by the change of the controller output that caused it:
For the tank, the units are °C per percent of heater power. For a pump on a variable speed drive they are bar per percent of speed. Always write the units. A gain of 0.5 has no meaning until you know it is 0.5 °C per percent.
The gain also has a sign. More heater power gives a higher temperature, so the gain is positive. More compressor running in a cold room gives a lower temperature, so the gain is negative.
Dead time is the time between a change of the controller output and the first movement of the measured value. Its symbol is
The usual causes are these:
Dead time is the hard part of control because the controller is blind while it lasts: it cannot see the result of any action until
The two ideas together are the model used in the rest of this course: first order plus dead time, written FOPDT. The output waits for the dead time, then follows the first-order curve.
FOPDT step response
Time
The step test, also called a bump test, is the standard way to find
A safe and useful test follows a few rules.
The gain comes directly from the start and end values. For
Find the dead time first: it is the time from the step to the first clear movement of the measured value. Then find
This method is quick and easy to do on a paper chart. Its weak point is the dead time, because the first movement is small and is hidden in noise.
Find two times:
This method does not ask you to see the first movement. Both points are on the steep part of the curve, where the reading is clear, so it is the better method on noisy data.
The ratio of dead time to time constant,
| Ratio | What to expect |
|---|---|
| Below about 0.3 | Easy. The time constant dominates and a standard controller works well. |
| About 0.3 to 1 | Moderate. Tuning must be careful and the loop cannot be made fast. |
| Above about 1 | Difficult. Dead time dominates and the loop must be tuned slowly. |
These limits are a guide from experience and not a law. The idea behind them is exact: no feedback controller can correct a disturbance in less time than the dead time, so the dead time sets the best speed the loop can ever reach.
All of the above describes a self-regulating process, which settles by itself at a new value after a step. The hot water tank does this because a warmer tank loses more heat, until loss and supply balance.
Some processes never settle. A storage tank whose outflow is set by demand is the standard example. Take a tank of cross-section
The FOPDT model is a straight-line model around one operating point. The gain of a heater loop changes with the water flow through the tank, the gain of a pump with speed and demand, and the dead time with the flow in the pipe. So a model from a test at one condition is true near that condition only. When the process works over a wide range, test at the two ends of the range and compare.
Confirm that the test finished. The last two readings are 54.8 °C at 1200 s and 55.0 °C at 1800 s. The curve is flat within the 0.1 °C resolution of the record, so 55.0 °C is taken as the final value. ✅
Total changes.
The temperature moved by 10.0 °C for 20 percent of power. ✅
Process gain.
Each percent of heater power is worth half a degree at the sensor. ✅
The 63.2 percent level.
This level lies between the readings at 300 s (50.8 °C) and 360 s (51.6 °C). ✅
Interpolate for the time. Take a straight line between the two readings.
The response is 63.2 percent complete at 339 s. ✅
Dead time from the first movement. The reading at 30 s is still 45.0 °C and the reading at 60 s is 45.6 °C. So the table alone says only that the dead time is between 30 s and 60 s. To do better, extend the early slope back to the starting temperature. Between 60 s and 90 s the slope is
The dead time is about 40 s. ✅
Time constant.
The 63.2 percent method gives
The 28.3 percent level.
This level lies between the readings at 120 s (47.3 °C) and 150 s (48.1 °C). ✅
Interpolate for the time.
The response is 28.3 percent complete at 139.9 s. ✅
Time constant. Use
The time constant is 298.7 s. ✅
Dead time.
The two-point method gives
Side by side. The 63.2 percent method gives
Controllability ratio.
The ratio is well below 0.3. The time constant dominates, and this is an easy loop if it is tuned with respect for the 40 s of dead time. ✅
Rounded model for use. Report the model to the precision the test supports:
Predict a reading that was not used. The reading at 600 s played no part in either method. The two-point model predicts
The record shows 53.5 °C. The model agrees within the rounding of the record. ✅
Check every reading. The Python script below compares each model with all fifteen readings. The largest difference is 0.05 °C for the 63.2 percent method and 0.04 °C for the two-point method. Both are inside the 0.1 °C resolution of the data. ✅
Compare with the source of the data. The readings in this lesson were calculated from an exact model with
A third method. The script also fits the model to all fifteen readings by least squares. That fit gives
Process gain.
Each percent of speed is worth 0.10 bar near this operating point. ✅
The two levels.
These are the two pressures given in the problem, so
Time constant.
The pump loop is 100 times faster than the tank. ✅
Dead time.
Half a second passes before the pressure moves. On a pump this comes mostly from the drive, which changes speed along a ramp, and from the filter in the pressure transmitter. ✅
Controllability ratio.
This is an easy loop by the ratio, and close to the tank’s 0.135. ✅
Check with the third reading. At 6.5 s the model predicts
The log shows 4.43 bar. The model fits a point that was not used to build it, and the script gives the same 4.432 bar. ✅
The script creates the step test record of Application 1, applies both hand methods exactly as in the steps, fits all fifteen readings by least squares, and then repeats the pump calculation. It saves one plot of the readings with the two-point model drawn through them.
"""Identify a first order plus dead time model from a step test (hot water tank)."""import numpy as npfrom scipy.optimize import curve_fitimport matplotlib.pyplot as plt
# ---------- True process, used only to make the test data ----------K_TRUE, TAU_TRUE, THETA_TRUE = 0.5, 300.0, 40.0 # degC per percent, s, sU0, U1 = 40.0, 60.0 # heater power before and after, percentY0 = 45.0 # degC before the step
def fopdt_step(t, K, tau, theta, du=U1 - U0, y0=Y0): """Temperature after a step of size du made at t = 0.""" t = np.asarray(t, dtype=float) rise = K * du * (1.0 - np.exp(-np.clip(t - theta, 0.0, None) / tau)) return y0 + rise
# ---------- The step test record (what the technician writes down) ----------t_data = np.array([0, 30, 60, 90, 120, 150, 180, 240, 300, 360, 420, 600, 900, 1200, 1800], dtype=float)y_data = np.round(fopdt_step(t_data, K_TRUE, TAU_TRUE, THETA_TRUE), 1)
print("Step test record: heater 40 to 60 percent at t = 0")print(" t (s) T (degC)")for t, y in zip(t_data, y_data): print(f" {t:5.0f} {y:6.1f}")
def time_at(level): """Time at which the record crosses a temperature, by straight-line interpolation.""" return float(np.interp(level, y_data, t_data))
# ---------- Process gain ----------du = U1 - U0dy = y_data[-1] - y_data[0]K = dy / duprint(f"Change in temperature {dy:.1f} degC for {du:.0f} percent: K = {K:.3f} degC per percent")
# ---------- Method 1: 63.2 percent point and the first movement ----------y63 = y_data[0] + 0.632 * dyt63 = time_at(y63)slope = (y_data[3] - y_data[2]) / (t_data[3] - t_data[2]) # between 60 s and 90 stheta_1 = t_data[2] - (y_data[2] - y_data[0]) / slope # back to the start leveltau_1 = t63 - theta_1print("Method 1 (63.2 percent)")print(f" 63.2 percent level {y63:.2f} degC reached at t63 = {t63:.1f} s")print(f" early slope {slope:.4f} degC/s, dead time = {theta_1:.1f} s")print(f" tau = {tau_1:.1f} s")
# ---------- Method 2: two points ----------y28 = y_data[0] + 0.283 * dyt28 = time_at(y28)tau_2 = 1.5 * (t63 - t28)theta_2 = t63 - tau_2print("Method 2 (two points)")print(f" 28.3 percent level {y28:.2f} degC reached at t28 = {t28:.1f} s")print(f" tau = {tau_2:.1f} s, dead time = {theta_2:.1f} s")
# ---------- Check: least-squares fit of all fifteen readings ----------popt, _ = curve_fit(fopdt_step, t_data, y_data, p0=[K, tau_2, theta_2])print("Least-squares fit of all readings")print(f" K = {popt[0]:.3f}, tau = {popt[1]:.1f} s, dead time = {popt[2]:.1f} s")
for name, (k, tau, theta) in (("method 1", (K, tau_1, theta_1)), ("method 2", (K, tau_2, theta_2)), ("least squares", tuple(popt))): err = fopdt_step(t_data, k, tau, theta) - y_data print(f" {name:>13}: largest model error {np.abs(err).max():.2f} degC, " f"ratio theta/tau = {theta / tau:.3f}")
# ---------- Booster pump: two readings from a fast log ----------p0, p1, du_pump = 4.00, 4.50, 5.0 # bar, bar, percentt28_p, t63_p = 1.5, 3.5 # sK_p = (p1 - p0) / du_pumptau_p = 1.5 * (t63_p - t28_p)theta_p = t63_p - tau_pprint("Booster pump")print(f" K = {K_p:.3f} bar per percent, tau = {tau_p:.2f} s, dead time = {theta_p:.2f} s")print(f" ratio theta/tau = {theta_p / tau_p:.3f}")p_check = fopdt_step(6.5, K_p, tau_p, theta_p, du=du_pump, y0=p0)print(f" predicted pressure at 6.5 s = {float(p_check):.3f} bar")
# ---------- Plot ----------t_fine = np.linspace(0.0, 1800.0, 901)plt.figure(figsize=(8, 4.5))plt.plot(t_data, y_data, "o", label="step test readings")plt.plot(t_fine, fopdt_step(t_fine, K, tau_2, theta_2), label="two-point model")plt.axhline(y63, color="gray", linewidth=0.8, linestyle="--")plt.axvline(t63, color="gray", linewidth=0.8, linestyle="--")plt.xlabel("time since the step (s)")plt.ylabel("outlet temperature (degC)")plt.title("Hot water tank: step test and fitted model")plt.legend()plt.tight_layout()plt.savefig("step_test_fit.png", dpi=120)print("Saved step_test_fit.png")Expected output
Step test record: heater 40 to 60 percent at t = 0 t (s) T (degC) 0 45.0 30 45.0 60 45.6 90 46.5 120 47.3 150 48.1 180 48.7 240 49.9 300 50.8 360 51.6 420 52.2 600 53.5 900 54.4 1200 54.8 1800 55.0Change in temperature 10.0 degC for 20 percent: K = 0.500 degC per percentMethod 1 (63.2 percent) 63.2 percent level 51.32 degC reached at t63 = 339.0 s early slope 0.0300 degC/s, dead time = 40.0 s tau = 299.0 sMethod 2 (two points) 28.3 percent level 47.83 degC reached at t28 = 139.9 s tau = 298.7 s, dead time = 40.3 sLeast-squares fit of all readings K = 0.500, tau = 296.4 s, dead time = 41.7 s method 1: largest model error 0.05 degC, ratio theta/tau = 0.134 method 2: largest model error 0.04 degC, ratio theta/tau = 0.135 least squares: largest model error 0.05 degC, ratio theta/tau = 0.141Booster pump K = 0.100 bar per percent, tau = 3.00 s, dead time = 0.50 s ratio theta/tau = 0.167 predicted pressure at 6.5 s = 4.432 barSaved step_test_fit.png1. A first-order process with no dead time has
The total change is
2. A control valve is moved from 30 to 45 percent. The flow rises from 12.0 to 16.5 litres per minute and settles. Find the process gain with its units.
3. The temperature sensor of a water heater is on a pipe 6 m from the heater. The water moves at
4. An oven is steady at 180 °C with the heater at 50 percent. The output is stepped to 60 percent and the temperature settles at 204 °C. The response passes 28.3 percent of its change at 95 s and 63.2 percent at 215 s after the step. Find
5. The hot water tank of Application 1 (
The total change is
6. A storage tank has a cross-section of
The extra inflow is
A tank has a time constant of 300 s and no dead time. The heater power is raised in one step and held. How much of the total temperature change is complete 300 s after the step?
The shaded interval is the dead time: the input has changed and the output has not moved. The gold lines mark the 63.2 percent point, which comes one time constant after the dead time ends. The second dot is the 28.3 percent point, at θ + τ/3. These are the two points of the two-point method. The dots of the test data are the readings from the step test in Application 1 and in Application 2 below. The tests used a step of 20 percent on the tank and 5 percent on the pump. The fit error is the root mean square difference between the curve and the readings.
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. A hot water tank has K = 0.5 °C per percent, τ = 300 s and θ = 40 s. It is steady at 45.0 °C. The heater is stepped from 40 to 60 percent. What does the sensor read 340 s after the step?
2. In a step test the response passes 28.3 percent of its total change 50 s after the step, and 63.2 percent 110 s after the step. What are the time constant and the dead time?
3. Loop A is a tank with τ = 300 s and θ = 40 s. Loop B is a small pressure line with τ = 3 s and θ = 2 s. Which loop is more difficult to control?
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.