PID step response: experiment bench
PID step response
Ask a motor or heater to jump to a new target and watch how proportional, integral and derivative action shape the response.
- 1. Ask
- 2. Hypothesise
- 3. Set up
- 4. Run
- 5. Record
- 6. Change one variable
- 7. Compare
- 8. Interpret
- 9. Limitations & save
If I change …, then … will …, because …
3 · Set up the parameters
Pushes harder the further the output is from the target.
Keeps pushing while any error remains, so it removes the leftover offset.
Brakes the output when it is moving fast, adding damping.
How sluggish the plant is: a bigger τ responds more slowly.
Output per unit of input once everything has settled.
A constant push against the plant, like a heavier load.
1 more control appear at higher levels; until then it stays at the default value.
The seed fixes any random noise. Same parameters + same seed = exactly the same result, every time, on every computer.
6 · Change one variable
Your first run is the baseline. After it, change one thing at a time.
7 · Compare on a graph
5 · Run log
No runs yet.
Equations
PID: u = Kp·e + Ki·∫e dt − Kd·dy/dt (derivative on the measurement, low-pass filtered with 0.05 s).
Integral action drives e_ss to 0 for a constant target and a constant disturbance d (plant input u + d).
Assumptions (always true in this model)
- Linear first-order plant with constant gain and time constant.
- Ideal actuator: no saturation limit in this bench.
- Target steps from 0 to 1 at t = 0; disturbance is a constant step at t = 5 s.
- Controller samples every 0.01 s and holds its output in between.
Text description of what the chart shows
A line chart of the plant output against time from 0 to 10 seconds, with the target at 1. Higher proportional gain makes the output rise faster and settle closer to 1; integral gain removes the remaining gap; derivative gain reduces overshoot. A second series shows the control effort.
Did the result support your hypothesis? Use the numbers from the comparison table and link them to an equation.
Which assumptions could change your answer in the real world? For example: Real motors and heaters saturate, have dead-time and change with temperature; none of that is modelled here.
Export and save
Exports use the ticked runs (or every run if none are ticked). Your draft saves automatically in this browser only. The Journal is private to you.
Valid parameter ranges
| Parameter | Range | Default |
|---|---|---|
| Proportional gain Kp | 0 to 20 | 2 |
| Integral gain Ki | 0 to 10 1/s | 0 |
| Derivative gain Kd | 0 to 2 s | 0 |
| Plant time constant τ | 0.2 to 5 s | 1 |
| Plant gain K | 0.2 to 3 | 1 |
| Load disturbance d (from t = 5 s) | -1 to 1 | 0 |
| Sensor noise σ | 0 to 0.2 | 0 |
Independent reference checks
P control, K = 0.5, Kp = 4
Final-value theorem for a first-order plant under P control: e_ss = r/(1 + Kp·K) = 1/(1 + 2) (Ogata, Modern Control Engineering, §5-8).
P control, K = 1, Kp = 3
Closed loop y_ss = Kp·K/(1 + Kp·K) = 3/4; a first-order closed loop is first order, so it never overshoots.
PI removes the offset
Integral action gives a type-1 loop: zero steady-state error to a step (final-value theorem).
Checked automatically on every change to the code. Educational model, not engineering-grade.
Where this model stops being right
- Real motors and heaters saturate, have dead-time and change with temperature; none of that is modelled here.
- A response that is still moving at 10 s is reported as settling time 10 s (not settled).