Ziegler–Nichols Tuning (Closed-Loop / Ultimate Gain Method)

Enter Ku and Tu to compute Kp, Ki, Kd, then run the live simulation below.

Formulas (direct in Kp, Ki, Kd)

Controller Kp Ki Kd Notes
P 0.50 Ku 0 0 Proportional only
PI 0.45 Ku 0.54 Ku / Tu 0 From Ti=Tu/1.2 and Ki=Kp/Ti
PID 0.60 Ku 1.20 Ku / Tu 0.075 Ku Tu From Ti=Tu/2, Td=Tu/8

Results

P — Kp: —, Ki: 0, Kd: 0
PI — Kp: —, Ki: —, Kd: 0
PID — Kp: —, Ki: —, Kd: —

Units: Ki is 1/time, Kd is time. Controller form: u(t)=Kpe + Ki∫e\,dt + Kd de/dt.

Live PID Simulation

Plant model: first-order dy/dt = ( -y + K·u ) / τ. Derivative on measurement; simple anti-windup via integral clamping when saturated.

setpoint measurement y control u