control//feedback control//PID controller//PID tuning
PID tuning is choosing the three gains so that a loop answers quickly without oscillating, and in practice it is done on the running plant: an engineer bumps the setpoint, watches the response, and adjusts. The methods differ in how much they measure first, and all of them end with a test on the real loop, because the plant always differs from its model.
PID tuning is choosing the three gains so that a loop answers quickly without oscillating, and in practice it is done on the running plant: an engineer bumps the setpoint, watches the response, and adjusts. The methods differ in how much they measure first, and all of them end with a test on the real loop, because the plant always differs from its model.
Trial tuning, the way most loops are actually tuned, follows a fixed order. With integral and derivative off, raise the proportional gain until a small setpoint step gives a fast response with a little overshoot. Add integral action, from a long reset time towards a shorter one, until the remaining offset closes in a reasonable time without a slow swing. Add derivative only if the response is still too oscillatory and the measurement is clean. Then repeat the step at another operating point, since many plants change their gain with load.
The Ziegler and Nichols ultimate-gain method (1942) measures the plant through the loop itself. With P only, raise the gain until the loop oscillates steadily: that gain is the ultimate gain KuK_uKu and the period of the oscillation the ultimate period TuT_uTu. Their table then gives, for P, Kp=0.5KuK_p=0.5K_uKp=0.5Ku; for PI, Kp=0.45KuK_p=0.45K_uKp=0.45Ku and Ti=Tu/1.2T_i=T_u/1.2Ti=Tu/1.2; for PID, Kp=0.6KuK_p=0.6K_uKp=0.6Ku, Ti=Tu/2T_i=T_u/2Ti=Tu/2 and Td=Tu/8T_d=T_u/8Td=Tu/8.
Those settings are aggressive. They aim at a quarter-amplitude decay, each overshoot a quarter of the one before, which suits load rejection in process plants and gives large overshoot on setpoint steps; engineers usually start from them and soften the gains. Driving a production plant into sustained oscillation is often unacceptable, which is why relay autotuning replaces the gain search with a small controlled on-off oscillation (limit cycle).
Model-based rules start from a step test: the gain, dead time and time constant of the plant give the controller gains directly. Ziegler and Nichols proposed such a rule too, and later ones (IMC, SIMC, lambda tuning) trade speed for robustness through a single parameter, the closed-loop time constant the engineer asks for.
Software automates the same ideas. Siemens' PID_Compact runs a pretuning step test and a fine-tuning oscillation by itself; MATLAB's pidtune designs from a plant model for a target phase margin, 60 degrees by default (PID implementation, Bode plot).
?Why not tune for the fastest possible response?
Because a fast loop is a fragile one. Higher gains shrink the margin between the loop and instability, so a plant whose gain rises by a third at another load, or a valve that starts to stick, tips it into oscillation; they also pass more sensor noise to the actuator and wear it out. A tuning a little slow everywhere is preferred to one that is optimal at one operating point and unstable at another.