Simple PID Tuning Diagnostic Tips

Jan. 6, 2015

There are some simple diagnostic checks and rules of thumb on tuning adjustments that can be used to find out if there is a problem with the PID tuning and what is the solution. This guidance in conjunction with good tuning software can reduce process variability introduced or aggravated by improper PID tuning.

There are some simple diagnostic checks and rules of thumb on tuning adjustments that can be used to find out if there is a problem with the PID tuning and what is the solution. This guidance in conjunction with good tuning software can reduce process variability introduced or aggravated by improper PID tuning.

The ultimate period of 99% of the loops is about 4 dead times. Loops with a large secondary time constant will have a larger period (e.g., 6 dead times) and loops with the dead time much larger than the primary time constant will have a shorter period (e.g., 2 dead times). The ultimate period corresponds to the critical frequency. Since the dead time is rather easy to visually see (time before the start of a response for a change in PID output or setpoint), the checks and test described here are based on comparison of the actual oscillation period to an ultimate period that is 4 times the dead time. Here we assume the data historian update time is less than 10% of the dead time and the compression is small enough to see the start of the response.

If the period of oscillation is more than 6 times the dead time, the culprit is too small of a reset time. If the period is more than 10 times the dead time, the product of the PID gain and reset time is too low. This last situation occurs frequently in level, gas pressure, and liquid composition and temperature control loops. These loops have a ramping open loop response as described in the 3/19/2013 blog Processes with No Steady State in the PID Time Frame (Conclusion).

Often the reset time is two orders of magnitude too small due to the propensity to not use the proportional mode because it can cause large abrupt changes in the PID and to rely more on the integral mode because it provides a more gradual ramping type of action. Also, the integral mode provides the type of control that humans would do manually where the direction of a change in output is not reversed until the error changes sign. The classic case I have often cited is where a split ranged steam valve rather than coolant valve is expected by the operator to be open when a temperature is below setpoint.

Whether the problem is too small of a PID gain or too small of a reset time, the solution is simple and relatively safe for near-integrating, true integrating, and runaway processes . Increase the reset time by a factor of 100 and see if the oscillation goes away or the decay rate and period is faster. If the oscillation goes away, you can decrease the reset time gradually to see when the oscillation starts again after a change in the PID setpoint or output. See the 4/11/2013 blog How to Avoid a Common Tuning Mistake for more details.

If the oscillation period is close to 4 times the dead time, the problem is most likely too large of a PID gain. The gain could be causing instability or amplifying a load disturbance due to resonance. In either case, decrease the PID gain until the oscillation goes away or decays more quickly. If the oscillation persists but has a smaller amplitude, resonance is likely.

If derivative action is used and the oscillation period is about 3 times the dead time, the rate time could be too large. The rate time should be less than the dead time and less than ¼ the reset time for the ISA Standard Form PID. If there is no possibility of a runaway response, set the rate time equal to zero and see if the oscillation dies out. If the oscillation starts to increase, immediately restore the rate time.

The PID should be put in manual if permissible (e.g., if there is no possibility of a runaway reaction or a fast pressure excursion) to see if the oscillation persists with the same amplitude or disappears. If the oscillation has the about the same amplitude in manual or automatic, there is not much to be gained by PID tuning. For level control, the tuning may need to be adjusted to maximize the absorption of variability so the load oscillations are not passed on to a level control valve on the discharge flow. An enhanced PID and external reset feedback and setpoint rate limits in an analog output block and secondary loop can help reduce the response to the disturbance oscillation to prolong valve packing life.

The tuning problem and fix should be verified by tuning software tests and observing the response to a load disturbance. Note that several tests should be made because of the continual changes in automation system and process conditions and dynamics. There are continual disturbances and changes in gains, time constants, and dead times. The question is not whether these changes exist but now much do they affect the tuning. A process response is not repeatable for these and many other reasons (the subject of the next blog).

The introduction of a small load disturbance for testing the tuning is more desirable than a setpoint change because of the effect of PID structure on the setpoint response and the need to see how a PID deals with a load disturbance, the basic objective of feedback control. If there were no disturbances, we would not need PID control.

The PID should be first tuned for a good load response. The desired setpoint response (e.g., minimal overshoot) should be obtained by the choice of PID structure including the more flexible “2 Degrees of Freedom” (2DOF) or a setpoint lead-lag.

1. The tuning for a load disturbance can be tested by momentarily putting the PID in manual, making a step change in the PID output, and then putting the PID in automatic. The step size should be about the same size as a typical total correction in the PID output to deal with disturbances but at least 5 times larger than measurement noise, valve backlash, and any resolution limit. The dead time can be estimated as the time it takes from the step change in PID output till a noticeable change in the PID process variable.

2. For a load disturbance, if the return to setpoint is more than twice as slow as the initial excursion, the reset time is too large. If the process variable oscillates with a period much greater than 6 times the dead time, the reset time is too small. For a setpoint change, an overshoot of the new setpoint is probably caused or aggravated by too small a reset time.

3. For a load disturbance, if the return to setpoint oscillates with a period between 4 and 6 times the dead time, the PID gain is too large. For a setpoint change, a hesitation in the approach to the new setpoint is indicative of too large a PID gain.

4. For a load disturbance, if the return to setpoint oscillates with a period less than 4 times the dead time, the rate time is too large. For a setpoint change, an oscillation in the approach to the new setpoint is indicative of too large a PID rate time.