What is a PID controller?
A PID controller (proportional-integral-derivative) is a control algorithm that continuously calculates the difference between the measured process value and the desired Setpoint and derives from it a control signal for an actuator, so that temperature, pressure, level or flow stays stable at the desired value. The PID controller is the computational core of virtually every closed control loop in industry. It runs as a function block in a PLC, as a standard function in a DCS or as a stand-alone compact controller in a control cabinet. A refinery or chemical plant easily contains hundreds to thousands of these loops.
PID has been the standard for stable process control for almost a century: simple, robust and present in every control system.
🎯 What exactly does a PID controller control?
A PID controller continuously compares three quantities:
- Process Value (PV) - the measured value, supplied by a sensor or transmitter, often via a 4-20 mA signal (see Process Value)
- Setpoint (SP) - the desired value, set by the operator or by a higher-level controller
- Manipulated Variable (MV) - the control signal to the actuator, for example a control valve, pump or variable-frequency drive (see Manipulated Variable)
The error is e(t) = SP − PV. In every execution cycle the controller recalculates how much
the MV must change. This principle is called feedback: the controller sees the effect of its own action in the next measurement. Without feedback,
the system is an open-loop control.
🔍 What do the P, I and D actions do?
| Action | Full name | Responds to | Effect | Drawback |
|---|---|---|---|---|
| P | Proportional | The current error | Fast correction, proportional to the deviation | Leaves a permanent deviation (offset) under load |
| I | Integral | The accumulated error over time | Removes the permanent deviation (memory) | Slows the loop and can cause overshoot and windup |
| D | Derivative | The rate at which the error changes | Brakes and damps overshoot | Amplifies measurement noise; seldom used in practice |
Most industrial control loops are in practice PI controllers: derivative action is often switched off because noise on flow and pressure measurements would otherwise make the valve restless. Derivative action pays off mainly in slow processes with little noise, such as temperature control.
🧮 What does the PID formula look like?
In the parallel form the three terms are added together:
MV(t) = Kp·e(t) + Ki·∫e(t)dt + Kd·de(t)/dt
Most control systems, however, use the standard form (also called the ISA or ideal form), with one gain and two time constants:
MV(t) = Kp·( e(t) + (1/Ti)·∫e(t)dt + Td·de(t)/dt )
Here Ti = Kp/Ki (integral time) and Td = Kd/Kp (derivative time). Note that
vendors differ in form, units (seconds or minutes, gain or proportional band in %) and details. You
therefore cannot copy settings from one system to another without converting them.
In a PLC or DCS the controller runs digitally, in a fixed cycle. A common rule of thumb is that the sample time should be well over ten times shorter than the process time constant. A flow loop then needs a cycle of a few hundred milliseconds, while a temperature loop can manage with seconds. Variation in that cycle (jitter) or an overly long cycle time mainly disturbs the derivative action.
🕰️ How did the PID controller come about?
| Year | Milestone |
|---|---|
| 1911 | Elmer Sperry builds an intuitive PID-type automatic ship steering system |
| 1922 | Nicolas Minorsky publishes the first formal PID control law, for the course control of US Navy ships |
| 1930–1932 | Pneumatic controllers with P and I action (from Foxboro, among others) spread through the process industry |
| 1942 | Ziegler and Nichols publish their tuning rules in the Transactions of the ASME |
| 1953 | Cohen and Coon publish tuning rules based on a process model with dead time |
| 1970s–1980s | Digital PID blocks in DCSs (from 1975) and later PLCs replace pneumatic and analogue controllers; automatic tuning (autotuning) arrives in the 1980s |
The algorithm has barely changed in a hundred years. What did change is where it runs: from a pneumatic box next to the pipe to software in networked systems. That made the PID controller part of OT convergence and of the attack surface.
🔧 How do you tune a PID controller?
A poorly tuned controller causes overshoot, slow response or oscillation around the setpoint, and extra wear on valves and pumps. A practical approach:
- Check the hardware first - a valve with stiction, backlash or a wrongly scaled transmitter cannot be fixed by tuning
- Determine the process dynamics - make a small step on the MV in manual mode and measure gain, dead time and time constant
- Choose the control action and form - P, PI or PID, and check the control direction (direct or reverse acting)
- Calculate starting values - with a model-based method such as lambda tuning or IMC, or with Ziegler-Nichols
- Test with a small setpoint step and assess overshoot, settling time and valve movement in the trends
- Record the settings under change management, so that deviations stand out later
Ziegler-Nichols is a manual rule of thumb: increase Kp until the loop just sustains oscillation (ultimate gain Ku, period Tu), then choose for a PID Kp = 0.6·Ku, Ti = 0.5·Tu and Td = 0.125·Tu. This gives an aggressive tuning with quarter-amplitude decay, fine for disturbance rejection but often too restless for valves. Modern controllers also offer autotuning, in which the controller runs a test itself. Examples are PID_Compact, PID_3Step and PID_Temp in TIA Portal from Siemens and the PIDE instruction from Rockwell Automation.
| Loop type | Typical dynamics | Usual controller |
|---|---|---|
| Flow | Fast (seconds), noisy | PI, low gain, no D |
| Liquid pressure | Fast, noise-sensitive | PI |
| Level | Integrating, often a buffer | P or gentle PI (averaging control) |
| Temperature | Slow (minutes), large dead time | PID, derivative action useful |
| Gas pressure | Medium | PI or PID |
⚙️ Which practical functions does an industrial PID have?
A PID block in a PLC or DCS contains more than the formula. Important functions are:
- Anti-windup - limits the integral action when the valve is already fully open or closed, so the controller does not “run away” and overshoot heavily later
- Bumpless transfer - prevents a jump in the control signal when switching between manual and automatic or when changing parameters
- Derivative on PV - differentiates the measurement instead of the error, so a setpoint change does not cause a spike (derivative kick)
- Derivative filter - a low-pass filter that damps noise before the derivative action amplifies it
- Output limits and rate limits - protect actuators against steps that are too large or too fast
PID controllers are often combined. In cascade control an outer controller provides the setpoint of an inner one. Feedforward control acts on a measured disturbance before the error arises. For strongly coupled processes, companies move to MPC as part of APC, which drives the setpoints of the underlying PID loops.
🔐 Why are PID controllers relevant to OT security?
Setpoints, tuning parameters and the manual/auto mode are simply variables in the control system. Anyone with access to the OT network or an engineering workstation can change them via protocols such as Modbus TCP or OPC UA. A controller that is deliberately tuned to be unstable makes a process oscillate and can damage valves, pumps or motors, possibly without raising an immediate alarm. Stuxnet showed how dangerous this is: the malware changed the frequency of variable-frequency drives while operators saw recorded normal values.
| System | Role in PID | Security focus |
|---|---|---|
| PLC | Executes the control loop cyclically | Write protection, password on the project |
| DCS | Central execution and tuning of PID loops | Roles and rights per operator and engineer |
| SCADA | Visualisation of SP, PV, MV and parameters | Limits on setpoints, logging of changes |
| Historian | Logging of control performance and trends | Data integrity for analysis and forensics |
Measures follow from IEC 62443: network segmentation, hard setpoint limits in the controller itself, an audit trail of parameter changes and monitoring with anomaly detection. Never rely on a PID controller alone for safety-critical limits: that is what an independent SIS is for. For organisations covered by the Dutch Cybersecurity Act (in force since 15 August 2026), these measures are part of the duty of care for their process automation.
🏭 Where do you find PID controllers?
- Drinking water and wastewater - pH and chemical dosing, level control of reservoirs and pumping stations
- Process industry - reactor temperature, pressure and flow in chemicals, refining and food; most loops appear on a P&ID as TIC, PIC, FIC or LIC
- Greenhouses and buildings - greenhouse climate and HVAC installations via building automation
- Energy - steam pressure in boilers, speed of turbines and compressors
- Machine building - speed and position control in motion control and drives
❓ Frequently asked questions
What is the difference between a PI and a PID controller?
A PI controller uses only the proportional and integral actions, while a PID controller adds the derivative action. Derivative action slows the controller down when the error changes quickly, but it also amplifies measurement noise. That is why most industrial control loops are PI controllers and PID is mainly used for slow processes such as temperature.
What is integrator windup in a PID controller?
Integrator windup occurs when the integral action of a PID controller keeps accumulating while the actuator is already fully open or closed. When the process comes back, that accumulated value must first be unwound, which leads to considerable overshoot. Anti-windup in the PID block limits or corrects the integrator to prevent this.
What does Ziegler-Nichols mean in PID tuning?
Ziegler-Nichols is a tuning method from 1942 in which you increase the gain until the control loop just sustains oscillation and then calculate the PID parameters from that ultimate gain and period. The method is quick and simple, but it produces an aggressive tuning with noticeable overshoot. The process industry therefore often uses calmer model-based methods such as lambda tuning.
Where does a PID controller run in an OT environment?
A PID controller usually runs as a function block in a PLC or as a standard building block in a DCS, close to the process at level 1 of the Purdue Model. SCADA and HMI display the values and let operators change the setpoint, but the control itself runs in the controller. As a result the control loop keeps working if the connection to the higher network is lost.
Can a hacker misuse a PID controller?
Yes, an attacker with access to the OT network can change the setpoints, tuning parameters or manual/auto mode of a PID controller. A deliberately unstable tuning can make the process oscillate and damage equipment. Segmentation, setpoint limits in the controller and logging of parameter changes reduce that risk.
When is a PID controller not enough?
A single PID controller falls short in processes with long dead time, strong interaction between variables or hard process constraints. Cascade and feedforward control or model predictive control are then used. Safety functions also never belong in a PID controller, but in a separate safety instrumented system.
📌 In summary
A PID controller keeps a process variable at the setpoint by correcting the error proportionally, integrally and derivatively, and is the building block of virtually every industrial control loop.
Good performance requires healthy instrumentation, careful tuning and functions such as anti-windup and bumpless transfer. Because setpoints and parameters can be changed over the network, the PID controller also belongs in your OT security policy.
