01 / EXPLANATION
How a PID controller works
You need to heat a process to 60 °C, but it is currently at 55 °C. Follow the 5 °C error through the controller to see how it becomes a command to the heater.
After reading. You will distinguish SP, PV and MV, explain P/I/D and calculate how Ti changes the integral contribution.
Three signals and one error
SP is the setpoint: the target is 60 °C. PV is the measurement: the sensor reads 55 °C. Error e = SP − PV = 5 °C. SP, PV and error share the same units, so they can be compared.
MV is the manipulated variable: heater power in %, for example. In heating, positive error should increase power. If increasing MV reduces PV, as in cooling, the action direction must differ. Gain adjustments cannot fix the wrong direction.
P, I and D look at different things
P responds to the error now. With Kp = 2 %/°C, a 5 °C error gives a 10 % P contribution. More gain produces stronger action but can cause oscillation; P alone can leave a residual error.
I accounts for how long the error persists. While error is positive, the integral contribution grows. In stable operation without saturation, this helps remove a constant offset. At the output limit, protection against integral accumulation, or anti-windup, matters.
D accounts for how fast a signal changes. In the heating example shown, derivative on PV adds braking action while temperature rises. Noise also changes quickly, making D sensitive to it and requiring a filter. Derivative on PV avoids the kick specifically caused by an SP step; derivative on error responds to that step too.
Read Kp, Ti and Td in the formula
Below is the ideal continuous-time ISA form with derivative on error e. It explains the three contributions. For derivative on measurement, replace the last term with −Td·dPV/dt. An implemented algorithm also accounts for the calculation interval, filter, limits, output bias and operating mode.
u(t) = Kp · [e(t) + (1/Ti) ∫e(t)dt + Td · de(t)/dt]
Ti and Td have units of time. With Kp fixed, a smaller positive Ti strengthens I. A larger Td strengthens D. In the ISA form, Kp multiplies all three enabled contributions, so changing Kp affects more than P.
The parallel form uses Kp, Ki and Kd. For matching ideal forms: Ki = Kp/Ti and Kd = Kp·Td. Ti is a time; Ki is an integral gain. They are not interchangeable numbers. Before transferring a tuning, check the form, units and signal scaling.
Example: what changes when Ti is halved
Hold the error at 5 °C for this calculation. Let Kp = 2 %/°C, Ti = 10 s, Td = 0 and the initial I contribution be zero. The P contribution is 10 %, while I grows by (2/10)·5 = 1 percentage point per second.
With Ti = 5 s, I grows by 2 percentage points per second. After 5 s the I contribution is 5 % in the first case and 10 % in the second. This shows the strength of integration; on a closed-loop plot, error will not remain constant.
What to check besides the coefficients
Dead time delays the visible plant response. Saturation limits available power. Noise can provoke unnecessary output movement. PV being close to SP is therefore not enough to establish good tuning.
Read PV and MV together; test a setpoint step and a disturbance separately. Then compare two tunings on the same model. The numbers above illustrate the formula; they are not recommended gains for a particular heater.
See how PID controls a pump
In your first PIDLAB experiment, open a ready-made stand, change the setpoint SP, compare the measurement PV with the setpoint and observe how the controller output MV changes. You can read the lesson without an account. Running the stand requires sign-in; practice is currently free.
Start your first experimentPIDLAB — an engineering laboratory for PID loops. Simulation does not replace validation on the real plant.