02 / PRACTICAL PROCEDURE
How to compare PID tuning in simulation
Test one hypothesis: will changing Ti reduce residual error without extra overshoot? Run two experiments on one model, restoring the initial state between them.
After reading. You will have a reproducible A/B comparison with test conditions, PV/MV plots and an explanation of the trade-off.
1. Record the baseline conditions
Choose one stand and one controller. Record initial SP/PV, MV limits, model parameters, PID form, time units and Kp/Ti/Td. Fix noise and disturbance conditions: they must match across the two runs.
For example, compare only Ti while keeping Kp and Td fixed. Run A uses the baseline parameters. Run B starts after restoring the same initial conditions. First time here? The first-launch lesson walks through signing in, choosing a demo stand and starting the simulation.
2. Define the step and criteria before running
Example comparison conditions: SP 40 → 60 °C, a 120 s observation and a settling band of 59–61 °C. These are selected teaching conditions, not a recommendation for every stand. Choose suitable values for your model in advance.
Settling time is the point after which PV stays inside the chosen band for the rest of the observation. If PV leaves the band again, the first crossing is not settling. Record “not reached” if the condition is not met.
Measure maximum PV, residual error and time at an MV limit. For a positive step, one normalized overshoot definition is max(0, max(PV) − new SP) / |ΔSP| · 100 %. For example, a 64 °C peak after a 40 → 60 °C step gives 20 %; the formula is undefined for ΔSP = 0.
3. Repeat with one change
Run A and retain its parameters and plots. Restore the initial state. For B, change only Ti and repeat the same SP step for the same observation duration. Reducing a positive Ti strengthens I; also changing Kp would alter several ISA contributions.
Record the same fields for A and B: Kp/Ti/Td, SP step, maximum PV, settling time, residual error and time at an MV limit. If B is faster but produces more overshoot or keeps the output at a limit longer, that is a trade-off.
4. Check the output and one disturbance
If MV reaches 100 %, more controller gain cannot produce extra heater power. Check how the loop recovers from saturation and how anti-windup operates. If MV fluctuates strongly with noisy PV, examine D and filtering.
Now apply one identical disturbance to A and B, where the stand supports it. Investigate noise or model-parameter changes in separate experiments. Autotuning and one favourable metric do not replace testing the complete scenario.
5. State a conclusion from the observations
Use this template: “Under [conditions], B changed [metric] from […] to […], at the cost of […]. Under disturbance, […]. I choose […] using criterion […]”. Fill the gaps with your results; if neither tuning is acceptable, say so.
Include SP/PV/MV plots and baseline parameters so the experiment can be repeated. The conclusion applies to the tested model and scenario. Transfer to physical equipment needs separate checks of scaling, action direction, calculation interval, limits and a test plan.
Compare tunings in PIDLAB
Open the first-launch lesson: sign in, choose a demo stand and start the process. Then return to the comparison procedure above.
Open the first-launch lessonPIDLAB — an engineering laboratory for PID loops. Simulation does not replace validation on the real plant.