Tutorials / Getting Started with PID Tuning

Getting Started with PID Tuning

April 27, 2026

PIDZiegler-NicholsIMCFOLPDtuning

Introduction

PID (Proportional-Integral-Derivative) controllers are the workhorse of industrial process control. Despite decades of advances in advanced control, ~90% of industrial control loops still use some form of PID. This tutorial walks through three classic tuning methods using our interactive control_utils toolkit.

Prerequisites

  • Basic understanding of first-order systems and time constants
  • Familiarity with transfer function concepts (optional but helpful)
  • Optionally: the PID Tuner web tool open in another tab to follow along visually

The Process Model: FOLPD

Before tuning any controller, we need a model of the process. The First-Order Lag Plus Deadtime (FOLPD) model is the industry standard:

G(s)=KeLsTs+1G(s) = \frac{K \cdot e^{-Ls}}{Ts + 1}
ParameterMeaningHow to Identify
KKProcess gainSteady-state output change per unit input change
TTTime constantTime to reach ~63% of final value after delay
LLDead timeTransport delay before response begins

From a step response plot:

from control_utils import FOLPD

# t and y are measured step response arrays
plant = FOLPD.from_step_response(t, y, method='tangent')
print(plant)  # G(s) = 2.0 * exp(-1.0s) / (5.0s + 1)

Method 1: Ziegler-Nichols Reaction Curve

The classic open-loop Z-N method uses the process reaction curve parameters KK, TT, and LL directly:

Kp=1.2TKL,Ki=Kp2L,Kd=KpL2K_p = 1.2 \frac{T}{K \cdot L}, \quad K_i = \frac{K_p}{2L}, \quad K_d = K_p \cdot \frac{L}{2}
from control_utils import PIDGains, auto_tune_pid

gains = plant.ziegler_nichols_tuning('PID')
print(gains)  # PIDGains(kp=3.00, ki=1.50, kd=1.50)

Characteristics

  • Fast response, ~25% overshoot typical
  • Aggressive — good for setpoint tracking
  • Can be oscillatory if L/TL/T is large (dead time dominant)

Method 2: Cohen-Coon Tuning

Cohen-Coon improves on Z-N for processes with significant dead time by accounting for the controllability ratio r=L/Tr = L/T:

Kp=1K(1.33r+0.167),Ki=Kp2.67L+0.5T,Kd=KpL2K_p = \frac{1}{K}\left(1.33r + 0.167\right), \quad K_i = \frac{K_p}{2.67L + 0.5T}, \quad K_d = K_p \cdot \frac{L}{2}
gains = plant.coon_cohen_tuning('PID')
print(gains)

Characteristics

  • Reduced overshoot compared to Z-N
  • Better disturbance rejection
  • More robust for r>0.5r > 0.5 processes

Method 3: Internal Model Control (IMC)

IMC provides explicit robustness-performance trade-off through the closed-loop time constant τc\tau_c:

Kp=T+L/2Kτc,Ki=KpT+L/2,Kd=TL2(T+L/2)K_p = \frac{T + L/2}{K \cdot \tau_c}, \quad K_i = \frac{K_p}{T + L/2}, \quad K_d = \frac{T \cdot L}{2(T + L/2)}
gains = plant.imc_tuning(tau_c=1.0)  # conservative
print(gains)

Choosing τc\tau_c

τc\tau_cBehaviorBest For
τc=L\tau_c = LAggressiveFast servo tracking, low noise
τc=2L\tau_c = 2LBalancedGeneral purpose
τc=5L\tau_c = 5LConservativeNoisy measurements, model uncertainty

Visual Comparison

Try each method in the PID Tuner with these typical values:

MethodKpKiKd
Ziegler-Nichols3.001.501.50
Cohen-Coon2.630.751.32
IMC (τc=1\tau_c=1)2.750.550.45

Observe: Z-N gives fastest rise but most overshoot. IMC is smoothest. Cohen-Coon balances both.

Summary Table

MethodComplexityOvershootRobustnessBest Use Case
Z-NLowHighLowQuick tuning, approximate
Cohen-CoonLowMediumMediumDead-time dominant
IMCMediumLowHighRobust performance, tunable

Next Steps

  1. Try the interactive PID Tuner with your own process parameters
  2. Read Process Identification to learn how to derive KK, TT, and LL from real plant data
  3. Explore IMC Robustness Analysis for advanced tuning

References

  1. Åström, K.J., & Hägglund, T. (2006). Advanced PID Control. ISA.
  2. Seborg, D.E., Edgar, T.F., Mellichamp, D.A., & Doyle, F.J. (2011). Process Dynamics and Control (3rd ed.). Wiley.
  3. Rivera, D.E., Morari, M., & Skogestad, S. (1986). Internal Model Control. Ind. Eng. Chem. Process Des. Dev., 25(1), 252–265.

Comments