Loop Optimization: Troubleshooting
Loop Optimization: Troubleshooting
Plant efficiency and consistent product quality depend on proper loop performance, but PID tuning is only
the last step. This is the second in a three-part series on loop optimization. In March, Part I discussed defining
your objectives and understanding the limitations of equipment.
Before tuning a PID controller, it’s wise to perform a series of tests on the loop to find any conditions
that would compromise its performance, and correct those conditions if possible to make the tuning
more effective.
Last month we mentioned the questions that should be answered before PID tuning:
The tests
Testing is performed by collecting data with the controller in automatic mode under normal operating con-
ditions, then introducing a step change. For further diagnosis, data can be collected with the loop in manual
mode for comparison.
When collecting data, the scan time must be smaller than or equal to the update time in the controller, and
the update time should be smaller than the equivalent dead time of the loop. In many controllers, the update
time is user-selectable.
Collected data will show the operating range and performance of the final control element. Is the controller
output operating at one end of the range? Is the valve operating near its seat? Does the controller output
change by a very small amount? If so,the valve or final control element may need to be resized to give better
controller output resolution.
Does the loop cycle? If the loop cycles in automatic but not in manual mode, the cause of the cycle is the
closed loop. The cycling may be due to hysteresis, nonlinearities, or poor tuning.
A cycle in a linear loop caused by poor tuning will look sinusoidal. A sawtooth-shaped cycle can be caused by
stiction or by nonlinearity.
Cycling due to hysteresis usually has a longer period when theprocess variable is near the setpoint. As the
error is reduced, the controller output change is gradually reduced and the effect of hysteresis becomes
more important.
First, the loop was observed for two minutes in automatic(Figure 2). The variability was 0.59% and oscillations
are present at 30 seconds and five seconds. If properly tuned, the loop will handle the 30-second cycling, but
the five-second-cycling is too fast and must be eliminated at its origin.
Next, process variable data was collected for some time with the controller in manual. Along with determina-
tion of the noise band and variability in manual mode, this allowed a power spectral density analysis (Figure
3), which can reveal hidden cycling from an upstream process control loop or from mechanical problems.
The power spectral density graph gives the content of the process variable at each frequency. These hidden
oscillations could be from other loops or generated by the tuning parameters. Cycling can also be due to
periodic load disturbances.
It is important to identify and minimize or eliminate cyclic upsets. Do not expect the controller to remove a
cyclic upset caused upstream unless this cycling is slow in comparison with the loop dynamics.
You may need to run power spectral densities on upstream loops, one at a time, moving farther and farther
back, until the source of the oscillation is found. Look for a spike in the power spectral density at the same
frequency as the oscillation in the loop. A cross-correlation analysis may help to pinpoint the upstream loop
you are looking for.
On this steam loop, the five-second cycling was from a relief valve, which was to be checked at the next shut-
down. The 30-second cycling might also be from a mechanical problem--the loops in that part of the process
were analyzed and tuned, and none of them were implied in that cycling.
Figure 1
Figure 2
Figure 3
When any cycling in manual mode has been minimized, take a new set of readings in automatic. This step is
optional, but can be very useful. Does the controller increase or decrease the performance? Is the variability
greater in automatic mode? Does cycling appear in automatic mode (controller tuned too aggressively)?
How noisy is the measurement signal? If the noise is larger than 2-3%, a measurement filter may improve
control. Since the derivative action of a PID controller works on the derivative of the signal, any noise in the
process is greatly amplified when derivative action is used. A filter may allow you to add derivative to loops,
which can significantly improve performance.
Check the process gain (Figure 4). In this case, the process responds well and noise is small, but the process
gain is very high. While the controller output change is 3%, the process variable change is 23%. The process
gain is around eight, and this is definitely too high.
In manual mode, check the hysteresis and stiction of the loop. For the hysteresis check, make several control-
ler output changes:two steps in one direction and one step in the other (Figure 5).Finally, to detect stiction,
make a very small fourth step (or a series of steps).
Using the data, run a hysteresis check on the loop. If the hysteresis is more than 1% for valves with positioners
and 3% for valves without positioners, you should repair or change equipment. Hysteresis of 1-4% degrades
loop performance, while with tight tuning, hysteresis greater than 3% causes oscillations.
Here, the process responds well and noise is small, but the
process gain is very high. A controller output change of 3%
changes the process variable 23%. The process gain is about
eight, and this is definitely too high.
Figure 4
Hysteresis check
Figure 5
Is it linear?
To determine linearity, run the loop in manual or automatic and let it settle at several different locations in the
controller output range (Figure 6). If in manual mode, 15% steps-starting at 5% work well, for example, at 5%,
20%, 35%, 50%, 65%,80%, and 95%.
You can run these tests in automatic if both the measurement and output reach a full settled condition after
each step. If in automatic mode, the setpoint should be varied from the minimum to the maximum allowable.
Of course, this step is not always possible. If it must be skipped for process considerations, be careful when
tuning the controller. A safety factor is usually applied when selecting the tuning parameters if the behavior
of the process is unknown outside the range of previous steps.
Figure 6
Graph the process characteristic from the data collected at various settled areas. How linear is the process?
Look for the lowest and highest-slope areas. The lowest slope is the lowest gain; the highest is largest gain.
The ratio of the highest gain to lowest gain should be no more than three and preferably less than two.
If the ratio is higher than three, you should add (or modify any existing) output characterization to the loop,
which computes X-Y pair values or uses an equation to compensate for gain.
An output characterizer can greatly benefit a split-range control loop. Split-range loops switch between two
or more valves depending on the controller output--for example, below 50% output the loop is cooling with
chilled water or heat-exchanged oil;above 50% it’s heated with steam, hot water, or furnace-heated oil. These
loops are usually highly nonlinear.
Do not use an output characterizer to linearize pH loops-these require input characterization. With such
loops, use gain scheduling based on the process variable or the error.
Check symmetry
Next, check for asymmetry in manual or automatic mode. Perform step tests in the opposite direction from
the last step or,preferably, repeat the steps in the opposite direction. Does the process respond differently in
the up direction versus the down?
If so, can you reduce or eliminate the discrepancy? Asymmetry occurs, for example, with a spring and dia-
phragm valve where the pressure is applied to move the valve in one direction and the spring is used in the
other direction.
If you cannot eliminate the asymmetry, you must use the more conservative tuning or special algorithms that
tune the controller differently depending on the direction.
Based on the above tests, you may need to do maintenance on the valve, add filtering, linearize the loop,
repair or maintain a sensor, or identify and remove upstream cyclic upsets.
The last step is to identify the highest-gain,largest-deadtime location in the loop and tune the loop based on
that worst case.