4.2 Adjusting the PID Gains

The 'P' gain of a PID controller sets the overall system response. To tune the PID controller, set the 'I' and 'D' gains to zero. Then, increase the 'P' gain until the system responds to set point changes without excessive overshoot or oscillations. Using lower values of 'P' gain will slowly control the system, while higher values will give aggressive control. Now the system will probably not converge to the set point.

After a reasonable 'P' gain is selected, slowly increase the 'I' gain to force the system error to zero. Only a small amount of 'I' gain is required in most systems. The effect of the 'I' gain, if large enough, can overcome the action of the 'P' term, slow the overall control response and cause the system to oscillate around the set point. If oscillation occurs, reducing the 'I' gain and increasing the 'P' gain will usually solve the problem.

This application includes a term to limit integral windup, which occurs if the integrated error saturates the output parameter. Any further increase in the integrated error does not affect the output. The accumulated error, when it does decrease, will have to fall (or unwind) to below the value that caused the output to saturate. The 'Kc' coefficient limits this unwanted accumulation. For most situations, this coefficient can be set equal to 'Ki'.