Controller modes and PID tuning methods

On-off, P, I and D modes, proportional band, windup and controller action, and Ziegler–Nichols, Cohen–Coon and IMC tuning.

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 out of ten industrial loops run on some form of PI or PID control. Knowing what each mode does, how the parameters are expressed on a real controller, and how to get a first set of tuning values from a plant test is basic professional skill for an instrumentation engineer — and a favourite area for GATE numericals.

Key ideas

On-off (two-position) control. The output is either fully on or fully off. A differential gap (hysteresis) stops the final element chattering; the PV then cycles continuously inside and slightly beyond the gap. Good enough for domestic heaters, tank filling and alarms, not for precise control.

Proportional (P) mode. Output change is proportional to error: Δu = K_c·e. Controllers often show proportional band instead of gain — the percentage change in PV (as % of span) that drives the output through its full 0–100 % range. PB = 100/K_c when K_c is in %/%. A narrow band means high gain. P-only control of a self-regulating process leaves a steady offset: the controller needs a non-zero error to hold a new output. Increasing K_c reduces the offset but makes the loop more oscillatory, and eventually unstable.

Integral (I, reset) mode. Output moves at a rate proportional to error, so it keeps changing until the error is exactly zero — integral action removes offset. It is set as integral time T_i (time for the integral term to repeat the proportional action for a constant error) or as reset rate 1/T_i in repeats per minute. Shorter T_i = stronger integral = faster offset removal but more overshoot and phase lag (−90° from the integrator).

Derivative (D, rate) mode. Output proportional to rate of change of error. It adds phase lead, damps overshoot and lets you use a higher gain on slow, multi-lag processes such as temperature. It amplifies measurement noise, so it is used with a filter, rarely on flow or level loops, and usually computed on the PV rather than the error, so that a set-point step does not produce a "derivative kick".

Practical features.

  • Action. Reverse acting: output falls as PV rises (heating valve on a temperature loop). Direct acting: output rises as PV rises. Choose so that the overall loop gives negative feedback, taking the valve's fail position into account.
  • Integral windup. If the output saturates (valve fully open) while error persists, the integral keeps growing and causes a large overshoot later. Anti-reset-windup clamps or back-calculates the integral.
  • Bumpless transfer. Switching from manual to auto should not step the output; the controller initialises its integral to the current output.

Tuning methods.

  • Ziegler–Nichols ultimate-cycle (closed loop). With I and D switched off, raise K_c until the loop oscillates with constant amplitude. That gain is the ultimate gain K_u; the period is T_u. Apply the table below. Aims at roughly quarter-decay response — fast but oscillatory; often detuned in practice.
  • Ziegler–Nichols reaction-curve (open loop). Fit K, θ, τ from a manual step test (FOPDT) and apply the open-loop table.
  • Cohen–Coon. Also uses the FOPDT model, with corrections that suit larger θ/τ; take the formulas from your textbook.
  • IMC / lambda tuning. Choose a desired closed-loop time constant λ; for a FOPDT process the PI settings are K_c = τ/[K(λ + θ)], T_i = τ. Smooth, robust and widely used in process plants.
  • Fine tuning by trial. Start from computed values and adjust while watching the response to small set-point steps.

Formulas

u(t) = u_b + K_c·[e + (1/T_i)·∫e dt + T_d·de/dt]

  • u: controller output (%); u_b: bias (%); K_c: controller gain (% output per % PV); e = SP − PV (%); T_i: integral time (s or min); T_d: derivative time (s or min). Ideal (ISA, non-interacting) PID.

C(s) = K_c·(1 + 1/(T_i·s) + T_d·s); equivalently K_p + K_i/s + K_d·s with K_p = K_c, K_i = K_c/T_i, K_d = K_c·T_d.

PB = 100 / K_c (%)

  • K_c dimensionless (%/%).

e_ss = Δr / (1 + K_c·K)

  • Offset with P-only control of a self-regulating process of steady gain K after a set-point step Δr. Units of Δr.

Ziegler–Nichols ultimate cycle: P: K_c = 0.5·K_u PI: K_c = 0.45·K_u, T_i = T_u / 1.2 PID: K_c = 0.6·K_u, T_i = T_u / 2, T_d = T_u / 8

Ziegler–Nichols reaction curve (FOPDT K, θ, τ): P: K_c = τ / (K·θ) PI: K_c = 0.9·τ / (K·θ), T_i = 3.33·θ PID: K_c = 1.2·τ / (K·θ), T_i = 2·θ, T_d = 0.5·θ

IMC PI: K_c = τ / [K·(λ + θ)], T_i = τ

  • λ: chosen closed-loop time constant (s).

Worked examples

Example 1 (standard) — offset and reaction-curve tuning. (a) A self-regulating process with steady gain K = 2 is under P-only control with K_c = 4. The set point is raised by 10 %. Find the offset and the proportional band. (b) A heater test gave K = 1.2 °C/%, θ = 8 s, τ = 42 s. Find Ziegler–Nichols PI settings.

  1. e_ss = Δr/(1 + K_c·K) = 10/(1 + 4 × 2) = 10/9 = 1.11 %.
  2. PB = 100/K_c = 100/4 = 25 %.
  3. (b) K_c = 0.9·τ/(K·θ) = 0.9 × 42/(1.2 × 8) = 37.8/9.6 = 3.94 % per °C.
  4. T_i = 3.33·θ = 3.33 × 8 = 26.6 s.

Example 2 (GATE level) — ultimate gain from the model. A process is G(s) = 1/(s + 1)³ (time in s). Find K_u and T_u, then Ziegler–Nichols PID settings.

  1. At the crossover frequency ω_u the phase is −180°: 3·tan⁻¹(ω_u) = 180° → tan⁻¹(ω_u) = 60° → ω_u = √3 = 1.732 rad/s.
  2. |G(jω_u)| = 1/(1 + ω_u²)^(3/2) = 1/(4)^(1.5) = 1/8. Loop gain must be 1, so K_u = 8.
  3. T_u = 2π/ω_u = 2π/1.732 = 3.63 s.
  4. K_c = 0.6 × 8 = 4.8; T_i = 3.63/2 = 1.81 s; T_d = 3.63/8 = 0.454 s.
  5. In parallel form: K_i = K_c/T_i = 2.65 s⁻¹ and K_d = K_c·T_d = 2.18 s.

Common mistakes

  • Treating proportional band and gain as the same number — they are reciprocal (PB in % = 100/K_c).
  • Mixing integral time with integral gain. A larger T_i means weaker integral action; a larger K_i means stronger.
  • Saying integral action "makes the response slower". Too much integral (small T_i) makes the loop oscillatory; too little makes offset removal slow.
  • Using derivative on a noisy flow loop, or on error instead of PV, and getting violent valve movement.
  • Choosing the wrong controller action, which turns negative feedback into positive feedback and drives the valve to a limit.
  • Applying Ziegler–Nichols values and expecting a well-damped result; they give roughly quarter-decay and usually need detuning.

For GATE IN

Expect: computing offset for P control from the closed-loop transfer function and final-value theorem; converting between PB, K_c, T_i, reset rate and parallel gains; finding K_u and ω_u from a transfer function (Routh array or phase-crossover) and applying Ziegler–Nichols; identifying the effect of each mode on rise time, overshoot, steady-state error and stability; and matching controller forms to step responses of the controller output.

Quick check

  1. A controller has a proportional band of 50 %. What is its gain?
  2. K_c = 2 and T_i = 4 min. What is the integral gain K_i, and the reset rate?
  3. Which mode removes offset, and which mode is avoided on noisy flow loops?
  4. K_u = 10 and T_u = 20 s. What are the Ziegler–Nichols PI settings?

Answers: 1. 2. 2. K_i = 0.5 min⁻¹; reset rate 0.25 repeats/min. 3. Integral removes offset; derivative is avoided on noisy flow loops. 4. K_c = 4.5, T_i = 16.7 s.

Try answering each one aloud before you open it.

  1. 1.What is a PID controller and what are its components?Concept

    A PID controller is a control loop mechanism widely used in industrial control systems. It consists of three components: Proportional (P), Integral (I), and Derivative (D). The Proportional component depends on the present error, the Integral component depends on the accumulation of past errors, and the Derivative component predicts future errors based on the rate of change.

  2. 2.Explain the role of the Proportional component in a PID controller.Concept

    The Proportional component of a PID controller produces an output value that is proportional to the current error value. It helps in reducing the overall error by adjusting the control output. However, it cannot eliminate the steady-state error completely and may lead to oscillations if not tuned properly.

  3. 3.Why is the Integral component important in a PID controller?Concept

    The Integral component is important because it accumulates the error over time and integrates it to eliminate the steady-state error. By doing so, it ensures that the process variable reaches the setpoint and stays there. However, excessive integral action can lead to overshoot and instability.

  4. 4.Describe the function of the Derivative component in a PID controller.Concept

    The Derivative component predicts the future behavior of the error by calculating its rate of change. It provides a damping effect, which helps in reducing overshoot and improving system stability. However, it is sensitive to noise and can cause the system to react to small fluctuations if not tuned properly.

  5. 5.What is the Ziegler-Nichols method for PID tuning?Concept

    Ziegler–Nichols gives two empirical tuning recipes. In the closed-loop (ultimate-cycle) method you switch off integral and derivative action, raise the proportional gain until the loop oscillates with constant amplitude, and record the ultimate gain K_u and period T_u; for PID you then set K_c = 0.6·K_u, T_i = T_u/2, T_d = T_u/8. In the open-loop (reaction-curve) method you fit gain, dead time and time constant from a manual step test and use a second table (for PID K_c = 1.2·τ/(K·θ), T_i = 2θ, T_d = 0.5θ). Both aim at roughly quarter-decay response, which is aggressive, so the settings are usually detuned afterwards.

  6. 6.Why is PID control preferred in industrial automation?Application

    PID control is preferred in industrial automation because it provides a simple yet effective way to maintain control over a process. It can handle a wide range of operating conditions and is relatively easy to implement and tune. Additionally, PID controllers can be used in various applications, from temperature control to speed regulation, making them versatile.

  7. 7.What happens if the Derivative component is set too high in a PID controller?Application

    If the Derivative component is set too high, the controller may become overly sensitive to noise and small fluctuations in the process variable. This can lead to excessive control actions, causing the system to become unstable and oscillate. It may also result in increased wear and tear on the actuators due to frequent adjustments.

  8. 8.How does the Integral component affect the response of a PID loop?Application

    Integral action keeps moving the output as long as any error remains, so it removes the steady-state offset left by proportional control. The integrator also adds 90° of phase lag, so strong integral action (a short integral time) increases overshoot and oscillation and can destabilise the loop. Weak integral action (a long integral time) gives a well-damped loop but the last part of the error is removed slowly, so T_i is a trade-off between offset removal speed and stability.

  9. 9.Calculate the PID parameters using the Ziegler-Nichols method given an ultimate gain (Ku) of 6 and an oscillation period (Tu) of 2 seconds.Numerical

    Using the Ziegler-Nichols method, the PID parameters can be calculated as follows:

    1. Proportional gain (Kp) = 0.6 * Ku = 0.6 * 6 = 3.6
    2. Integral time (Ti) = 0.5 * Tu = 0.5 * 2 = 1 second
    3. Derivative time (Td) = 0.125 * Tu = 0.125 * 2 = 0.25 seconds
  10. 10.A PID controller has a proportional gain of 4, an integral time of 1.5 s and a derivative time of 0.5 s. Calculate the controller output change at the instant an error of 2 units appears, if the error is then changing at 0.1 units/s.Numerical

    For the ideal PID form, Δu = K_c·[e + (1/T_i)·∫e dt + T_d·de/dt]. At the instant the error appears the integral of error is still zero, so Δu = 4 × [2 + 0 + 0.5 × 0.1] = 4 × 2.05 = 8.2 units. After that, the integral term adds K_c·e/T_i = 4 × 2/1.5 ≈ 5.33 units per second for as long as the error stays at 2.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?