02 / PRACTICAL PROCEDURE
How to compare PID tuning in simulation
Compare two tunings of one loop so that someone else can repeat your conclusion. You need a model with known parameters, one operating point and a way to restore the initial state. This is a simulation procedure, not a plant commissioning instruction.
1. Fix the baseline conditions
Choose one stand and one PID loop. Record plant dynamics, initial SP and PV, MV limits, PID form and time units. Use identical noise and disturbance settings for the initial comparison. Different initial states prevent an isolated comparison of gains.
In PIDLAB, start by signing in to the workspace and opening the user guide. Open your chosen stand in simulation. Do not mix different stands, or the outer and inner controllers of a cascade, in a single results row.
2. Define the criteria before testing
Specify the SP change, observation duration and an acceptable band around the new target. Settling time requires both a stated band and a rule: PV must enter it and remain there for the rest of the observation. If it has not settled, record “not reached”, not the time of the final sample.
Measure peak overshoot, residual error and MV behaviour. For a positive step, one definition of normalized overshoot is max(0, max(PV) − new SP) / |ΔSP| · 100 %. State your definition: other tools may normalize differently. This percentage is undefined for a zero step.
3. Compare the baseline with one hypothesis
Apply the same setpoint step with tuning A and then tuning B, restoring the initial conditions each time. Change only one parameter that tests your hypothesis. For example, hold Kp and Td fixed to investigate Ti. Remember that changing Kp in the ISA form scales P, I and D together.
Record a table containing tuning label, Kp, Ti, Td, step size, peak overshoot, settling time, residual error and time spent at an MV limit. A faster response accompanied by prolonged saturation or strong oscillation is a trade-off, not an unconditional improvement.
4. Test disturbance rejection and sensitivity
After the setpoint comparison, apply one identical disturbance to both tunings. Then investigate noise or a model-parameter change separately, where the chosen stand supports it. Changing everything at once makes the cause of a different response difficult to identify.
If the output reaches a limit, inspect saturation and integrator recovery. If MV responds strongly to noise, examine the derivative term and its filter. Neither autotuning nor one metric is a guarantee: the complete constrained scenario needs testing.
5. State the conclusion and its limits
A useful conclusion names the benefit, cost and conditions: “B reaches the specified band sooner in this experiment but increases overshoot; A recovers more calmly from the selected disturbance.” Include the parameters and SP/PV/MV plots. If neither tuning is acceptable, say so; there is no obligation to choose one.
Do not transfer coefficients to physical equipment without checking the model, scaling, action direction, execution period, PID form, limits and safety procedures. An explainable, repeatable simulation result is enough for a learning exercise. A real plant requires a separate test plan owned by the responsible engineer.
Turn the explanation into an experiment
PIDLAB lets you build stands and investigate PID loops in simulation. These materials need no account; the workspace requires sign-in. For access and teaching enquiries, contact info@pidlab.io.
Sign in to the lab User guide