Skip to main content
Speclore

Pid controller tuning methods

Pid controller theory, tuning rules including ziegler-nichols, e practical guidelines.

pidcontrollertuning

Overview

A PID controller continuously calculates an error value and applies a correction based on proportional (P), integral (I), and derivative (D) terms:

u(t)=Kpe(t)+Ki0te(τ)dτ+Kdde(t)dtu(t) = K_p \cdot e(t) + K_i \int_0^t e(\tau)\,d\tau + K_d \frac{de(t)}{dt}

where:

  • e(t)e(t) = error = setpoint − process variable
  • KpK_p = proportional gain
  • KiK_i = integral gain
  • KdK_d = derivative gain

Ziegler-Nichols Tuning (Open Loop)

Based on the process reaction curve with parameters: gain KK, dead time LL, time constant TT:

Ziegler-Nichols (Closed Loop / Ultimate Gain)

Using the ultimate gain KuK_u and ultimate period TuT_u:

Controller KpK_p TiT_i TdT_d
P 0.5Ku0.5 K_u
PI 0.45Ku0.45 K_u Tu/1.2T_u / 1.2
PID 0.6Ku0.6 K_u Tu/2T_u / 2 Tu/8T_u / 8

Effect of Each Term

Term Effect of Increasing Side Effect
P (proportional) Faster response, reduces steady-state error May oscillate
I (integral) Eliminates steady-state error May cause overshoot, slow settling
D (derivative) Reduces overshoot, dampens oscillations Sensitive to noise

Practical Tips

  • Start with PI control (set Kd=0K_d = 0) for most processes
  • Add D term only for slow processes with significant dead time
  • Typical anti-windup: limit integrator output range
  • Derivative filter: use Kds/(1+Tfs)K_d \cdot s / (1 + T_f \cdot s) with TfTd/10T_f \approx T_d / 10