P, PI and PID controllers
Explains what proportional, integral and derivative action each do to offset, damping and stability, with controller forms, proportional band, windup and Ziegler–Nichols starting values.
Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
More than nine in ten industrial loops — flow, pressure, level, temperature — run on some form of PID controller, usually inside a DCS or a single-loop controller on a panel. An instrumentation engineer is expected to know what each term does to offset, overshoot and stability, to read the tuning parameters on a faceplate (gain or proportional band, integral time, derivative time), and to tune a loop that misbehaves.
Key ideas
Proportional (P) action: u = Kp·e. The controller output is proportional to the present error.
- Raising
Kpspeeds the response and reduces, but never removes, steady-state error for a type-0 plant (offset =1/(1 + Kp·Kplant)for a unit step). - Too much
Kpcauses oscillation and eventually instability in plants with three or more lags or dead time. - In process industry the gain is often stated as proportional band
PB = 100/Kp% (for normalised signals).
Integral (I) action: u = (Kp/Ti)·∫e dt. Output keeps changing while any error remains.
- Adds a pole at the origin, raising system type by one, so a constant set-point or load disturbance leaves zero offset.
- Adds up to 90° of phase lag at low frequency, so it reduces stability margins; too short
Tigives slow oscillation. - Integral windup: if the actuator saturates (valve fully open), the integral keeps growing and causes a large overshoot later. Anti-windup (clamping or back-calculation) is standard in real controllers.
Derivative (D) action: u = Kp·Td·de/dt. Output responds to the rate of change of error — it "anticipates".
- Adds phase lead (a zero), increasing damping and allowing higher gain, so overshoot falls and response speeds up.
- Has no effect on steady-state error (a constant error has zero derivative).
- Amplifies high-frequency noise, so it is always filtered (
Td·s/(1 + Td·s/N)with N typically 5–20) and often applied to the measurement rather than the error, to avoid a "derivative kick" on set-point steps.
Combinations
- PI: the workhorse for flow, pressure and level loops — zero offset, modest speed.
- PD: improves transient response of servo loops; does not remove offset in type-0 plants.
- PID: used for slower loops with significant lag, such as temperature, where derivative helps damping.
In the s-plane: PI adds a pole at the origin and a zero at −1/Ti; PD adds a zero at −1/Td; ideal PID adds a pole at the origin and two zeros. PI behaves like a lag compensator and PD like a lead compensator.
Tuning: by model (pole-zero cancellation, IMC) or by experiment. The classic Ziegler–Nichols closed-loop method finds the ultimate gain Ku (P-only gain giving sustained oscillation) and its period Pu, then sets: P — Kp = 0.5Ku; PI — Kp = 0.45Ku, Ti = Pu/1.2; PID — Kp = 0.6Ku, Ti = Pu/2, Td = Pu/8. These give an aggressive, roughly quarter-decay response and are a starting point, not a final setting.
Formulas
u(t) = Kp·[e(t) + (1/Ti)·∫e dt + Td·de/dt]— ideal (ISA standard) PID form.u(t) = Kp·e + Ki·∫e dt + Kd·de/dt— parallel form, withKi = Kp/Ti,Kd = Kp·Td.C(s) = Kp·(1 + 1/(Ti·s) + Td·s)— PID transfer function.C(s) = Kp·(Ti·s + 1)/(Ti·s)— PI controller (zero at−1/Ti).C(s) = Kp + Kd·s— PD controller (zero at−Kp/Kd).PB (%) = 100/Kp— proportional band (normalised signals).
Symbols: e error and u controller output (in signal units such as %, mA or V); Kp proportional gain (output unit per error unit); Ti integral (reset) time and Td derivative time, both in s; Ki in s⁻¹ and Kd in s (times the gain units).
Worked examples
Example 1 — P versus PI on a first-order process
Given: process Gp(s) = 2/(5s + 1) (gain 2, τ = 5 s), unity feedback, unit step in set point.
- P control with
Kp = 4: loop gain8/(5s + 1); closed loopT(s) = 8/(5s + 9). - Steady state:
T(0) = 8/9 = 0.889, so offset= 1 − 0.889 = 0.111(11.1 %). Closed-loop time constant5/9 = 0.556 s. - PI control with
Kp = 4andTi = 5 s(zero placed on the process pole):C(s)·Gp(s) = 4·(5s + 1)/(5s) × 2/(5s + 1) = 8/(5s). - Closed loop:
T(s) = 8/(5s + 8);T(0) = 1, so offset = 0. Time constant5/8 = 0.625 s.
Result: P-only leaves 11.1 % offset (τ = 0.556 s); PI removes the offset (τ = 0.625 s) at almost the same speed.
Example 2 — choosing PD gains for a servo (GATE level)
Given: plant G(s) = 1/[s(s + 1)], unity feedback, PD controller C(s) = Kp + Kd·s. Find Kp, Kd for ωn = 4 rad/s and ζ = 0.7, and compare with P-only control at the same Kp.
- Characteristic equation:
s(s + 1) + Kp + Kd·s = s² + (1 + Kd)s + Kp = 0. - Match
s² + 2ζωn s + ωn²:Kp = ωn² = 16;1 + Kd = 2 × 0.7 × 4 = 5.6→Kd = 4.6 s. - P-only with
Kp = 16:s² + s + 16, soωn = 4,ζ = 1/8 = 0.125, overshoote^(−π × 0.125/√(1 − 0.0156)) = 67 %. - With PD:
ζ = 0.7gives about 4.6 % overshoot from the poles alone; the controller zero at−Kp/Kd = −3.48raises the actual step overshoot to about 14 % (found by simulation). - Velocity constant is unchanged:
Kv = lim s·C·G = Kp = 16 s⁻¹.
Result: Kp = 16, Kd = 4.6 s — derivative action cuts overshoot from 67 % to about 14 % while keeping Kv = 16 s⁻¹.
Common mistakes
- Saying P control "eliminates" steady-state error; it only reduces it for a type-0 plant.
- Confusing
Kiwith1/Ti: in the ideal formKi = Kp/Ti. - Expecting derivative action to reduce steady-state error.
- Using unfiltered derivative on a noisy measurement.
- Forgetting integral windup when the actuator saturates.
- Treating a large proportional band as high gain — PB is inversely proportional to gain.
For GATE IN
Expect questions on the effect of P, I and D actions on type, steady-state error, damping and stability; numerical problems that combine a controller with a simple plant to find offset, closed-loop poles or gains for a given ζ and ωn; and controller transfer-function forms and their pole-zero locations. Practise relating proportional band, integral time and derivative time to the transfer function.
Quick check
- What is the proportional band of a controller with
Kp = 2.5? - Which action removes offset for a step load disturbance on a type-0 process?
- A PI controller has
Kp = 3,Ti = 6 s. Where is its zero? - What problem does a derivative filter solve?
Answers: 1. 40 %; 2. Integral action; 3. At s = −1/6 s⁻¹; 4. It limits the amplification of high-frequency measurement noise.
Interview questions
All Control Systems interview questionsTry answering each one aloud before you open it.
1.What is a P controller in control systems?Concept
A proportional controller produces an output u = Kp·e proportional to the present error. Raising Kp makes the loop faster and reduces the steady-state error for a type-0 plant, but it never removes it: the offset to a unit step is 1/(1 + Kp·Kplant). Too much gain makes higher-order or dead-time loops oscillate, so P-only control is used where a small offset is acceptable, such as some level loops. In process work the gain is often given as proportional band, PB = 100/Kp %.
2.Explain the working principle of a PI controller.Concept
A PI controller combines the proportional control and integral control. The proportional part provides an output that is proportional to the error signal, while the integral part accumulates the error over time and integrates it to eliminate the steady-state error. This combination helps in reducing the steady-state error and improving the system's stability and response time.
3.Describe the function of a PID controller.Concept
A PID controller is a control loop feedback mechanism widely used in industrial control systems. It consists of three terms: Proportional (P), Integral (I), and Derivative (D). The proportional term responds to the current error, the integral term responds to the accumulation of past errors, and the derivative term predicts future errors based on the rate of change. This combination allows for precise control and stability in dynamic systems.
4.Why is a PID controller preferred over a P or PI controller in certain applications?Application
A PID controller is preferred over P or PI controllers in applications requiring precise control and minimal overshoot. The derivative component helps in predicting future errors, which can improve the system's response time and stability. This makes PID controllers suitable for systems with complex dynamics or where precise control is critical.
5.What happens if the derivative gain in a PID controller is set too high?Application
If the derivative gain in a PID controller is set too high, it can lead to excessive sensitivity to noise in the error signal. This can cause the control output to oscillate or become unstable, leading to poor system performance. It is important to carefully tune the derivative gain to balance responsiveness and stability.
6.In what scenarios would you use a PI controller instead of a PID controller?Application
A PI controller is often used in systems where the derivative action is not necessary or could introduce noise and instability. It is suitable for systems with slow dynamics or where the primary goal is to eliminate steady-state error without the need for rapid response. PI controllers are simpler to implement and tune compared to PID controllers.
7.How does the integral term in a PI or PID controller help in eliminating steady-state error?Concept
The integral term in a PI or PID controller accumulates the error over time and integrates it into the control signal. This accumulation continues until the steady-state error is eliminated, effectively driving the error to zero. By doing so, the integral term helps in achieving zero steady-state error in the system.
8.What is the effect of increasing the proportional gain in a P controller?Application
Increasing the proportional gain in a P controller increases the system's responsiveness to error changes, which can reduce the steady-state error. However, if the gain is too high, it can lead to system instability and oscillations. It is important to find a balance where the system is responsive but remains stable.
9.Calculate the control output of a PID controller with Kp = 2, Ki = 1, Kd = 0.5, given an error of 3 units, an integral of error over time of 5 units, and a derivative of error of 2 units.Numerical
The control output of a PID controller is calculated using the formula: Output = Kp * error + Ki * integral of error + Kd * derivative of error. Substituting the given values: Output = 2 * 3 + 1 * 5 + 0.5 * 2 = 6 + 5 + 1 = 12 units.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?