P, PI, PD and PID
Add one term at a time to the same response — then the two failure modes that actually break PID loops in service.
Skip to the animationPID sums three terms answering different questions about the error — how big it is now, how long it has been wrong, and which way it is heading — and its two classic failure modes, integral windup and derivative kick, are what actually break these loops in service.
The three terms
| Term | Acts on | Contributes | Costs |
|---|---|---|---|
| P | The present error | Immediate response | Leaves a steady-state offset |
| I | The accumulated past | Removes the offset exactly | −90° of phase; windup |
| D | The predicted future | Damping; +90° of phase | Amplifies noise; derivative kick |
Present, past and future — which is why there are three terms and not some other number. Over 90% of industrial loops are PID, and most of those are PI.
Adding them one at a time
- 1P alone — fast, and settles short of the target, because zero error would mean zero drive.
- 2PI — the integrator accumulates while any error remains, driving it to exactly zero. Its −90° of phase produces overshoot and ringing.
- 3PID — derivative acts on the rate, reducing drive before arrival. It brakes rather than reacts, and returns the phase the integrator spent.
Integral windup
When the actuator saturates the plant cannot respond further, but the integrator keeps accumulating — storing a large value that commands nothing extra. When the error finally reverses, the loop stays saturated until that store unwinds, producing a large overshoot long after the disturbance has passed.
Anti-windup — clamping the integrator, or freezing it while saturated — is standard on any real implementation. A textbook PID with no anti-windup will misbehave on the first hard disturbance.
Derivative kick, and noise
A step change in setpoint has infinite slope, so the D term produces a violent output spike. It also amplifies measurement noise, since differentiating noise makes it worse.
The standard fix is to differentiate the measurement rather than the error, which removes the kick while keeping the damping, and to filter the derivative. Even so, D is the term most often left switched off.
Tuning
Ziegler-Nichols raises the proportional gain until sustained oscillation, then reads the gain and period — which is exactly the stability boundary Routh-Hurwitz computes from a row of zeros and Bode shows as the axis crossing. The classical rules are an empirical shortcut to the quantities the theory predicts.
They are known to be aggressive, giving roughly quarter-amplitude decay, so most engineers detune the result. Modern controllers run a relay auto-tune that measures the same two numbers automatically.
The numbers you will be asked for
- PID
u = K_p·e + K_i·∫e dt + K_d·de/dt
Present, past, future.
- Transfer function
K_p(1 + 1/(T_i·s) + T_d·s)
The standard, non-interacting form.
- Ziegler-Nichols PID
K_p = 0.6K_u · T_i = 0.5T_u · T_d = 0.125T_u
From the ultimate gain and period.
- Derivative on measurement
u_d = −K_d · dy/dt
Removes the setpoint kick.
Advantages and disadvantages
Advantages
- Three terms cover the overwhelming majority of industrial loops.
- Requires no plant model — it can be tuned on the running process.
- The integral term removes steady-state error exactly.
- Derivative returns the phase margin the integrator spends.
Disadvantages
- Integral windup on actuator saturation, unless explicitly handled.
- Derivative kick on setpoint changes, and noise amplification.
- Poor on plants with long transport delays.
- Classical tuning rules are aggressive and usually need detuning.
Watch it work
Check yourself
question 1 / 4
One question at a time. Pick an answer to see why it is right or wrong, then move on — there is no score to keep and nothing is saved.