Loop Optimization:

How To Tune A Loop

**The Right Approach Can Reduce Variability,
Cut Response Time, and Increase Robustness**

*By Michel Ruel, P.E.*

Reprinted with permission from CONTROL Magazine, May 1999

Plant efficiency and consistent product quality depend on proper loop performance, but PID tuning is only the last step. This is the third in a three-part series on loop optimization. In March, Part I discussed defining your objectives and understanding the limitations of equipment. In April, Part II described how to optimize loop characteristics.

Tuning control loops for optimal performance is a noble endeavor, and modern loop-tuning software tools make it look easy. But before tuning a loop, it's critical to understand the importance of defining the objectives, understanding the limitations of your equipment, and dealing with loop characteristics.

Plant efficiency and consistent product quality depend on proper loop performance, but PID tuning is only the last step. This is the third in a three-part series on loop optimization. In March, Part I discussed defining your objectives and understanding the limitations of equipment. In April, Part II described how to optimize loop characteristics.

As we discussed in Part I of this series, the EnTech study estimated that some 30% of all loops oscillate due to nonlinearities such as hysteresis, stiction, deadband, and nonlinear process gain. Only 30% oscillate because of poor controller tuning.

In Part II, we described a series of tests to find any conditions that would compromise loop the results of loop tuning. The tests answer the questions:

1. Process gain: Is the control valve sized properly?

2. Are hysteresis or stiction excessive?

3. Is the deadtime short enough?

4. Is there an excessive amount of noise in the loop?

5. How nonlinear is the loop?

6. Asymmetry: Does the loop respond differently in one direction than in the other?

7. Is the loop optimally tuned?

Loop tuning should be performed only after answering these questions and, if possible, correcting pre-existing conditions to make the tuning more effective. Corrections might include valve maintenance, filtering, linearization, repairing or maintaining a sensor, or identifying and removing upstream cyclic upsets.

The last step is to identify the highest-gain, largest-deadtime location in the loop and plan to tune for that worst case.

Tune for the Worst

Figure 1 shows the worst case for the paper mill steam pressure control loop example from Part II. Here, the PID controller is part of a Measurex system. This DCS uses a parallel algorithm. The software contains a database with more than 200 PID controllers. This database informs the software of the algorithm, units, and special functions.

THE WORST CASE

Tune for the
highest-gain, largest-deadtime location in the loop. Shown is

the worst case for a paper mill steam pressure control loop

SEEK ROBUSTNESS

This robustness plot
shows the tradeoff between tight tuning

and stability. It can be used to quickly analyze the stability

(sensitivity or robustness) of a loop.

When the controller uses a series or an ideal algorithm, it is easy to link the equivalent process deadtime to the integral time and derivative time. However, with a parallel algorithm, the numbers are sometimes quite different from what people expect.

The tuning parameters are chosen, in this case, to ensure robustness. This loop must eliminate disturbances quickly, but the valve has not been tested throughout its range, so a safety factor of 2.6 is used. Also, the valve operates only over a small part of its range and the behavior of this loop is greatly dependent on the valve.

If the loop interacts with others, the parameters must be chosen accordingly: in this case, the other loops are a lot slower and the loop can be tuned fast. If another loop is at the same speed, one of the two loops should be detuned to be sure the speeds are different.

The selected tuning parameters are "Load Fastest," which gives fast recovery after a disturbance and enough robustness. At the opposite, "Setpoint" tuning (also named Lambda tuning) would be too slow (three times slower) and not aggressive enough. Other applications could use settings between these extremes.

The robustness plot (Figure 2) is an analysis tool. It shows how sensitive (or robust) the loop is to process gain or process deadtime changes. Robustness plots graphically show the tradeoff between tight tuning and stability. Use the robustness plot to quickly analyze the stability (sensitivity or robustness) of a loop.

The plot has a region of stability and a region of instability. The solid (red and blue) lines on the robustness plot are the limits of stability. To the right and above the solid lines (higher gain and delay ratios), the closed loop process is unstable. To the left and below the solid lines, the closed loop system is stable. The cross, where both ratios are 1, shows the process gain and deadtime at the selected process values.

Check It Out

To see how the new tuning parameters affect the loop, compare variability before and after tuning. Collect process variable and controller output data with the controller in automatic at normal operating conditions (Figure 3).

CHECK RESULTS AT A CONSTANT SETPOINT

Process variable and
controller output data before (left) and after tuning

(right) shows significant improvements.

If possible, do a setpoint change to verify how the loop reacts and compare old and new tuning parameters (Figure 4). In this case, the response time is a lot smaller. Also, the cycling is now eliminated, and the valve moves by an appropriate amount.

CHECK STEP CHANGE RESULTS

Comparison of before
(left) and after tuning (right) shows the

response time is a lot smaller, cycling has been eliminated, and

the valve moves by an appropriate amount.

You could also do a before and after comparison using power spectral density (Figure 5). This one shows that cycling at longer periods has been greatly reduced, but cycling from the relief valve remains.

POWER SPECTRAL DENSITY

Cycling before (top) and
after tuning (bottom) shows great reduction, but

cycling from the relief valve remains.

Statistical analysis before and after (Figure 6) shows variability is cut by half. The short oscillations remain but the long oscillations are removed. This was easily visible on the DCS trends.

STATISTICS

Statistical analysis
before (left) and after tuning (right) shows

variability cut by half.

Write the Report

It's a good idea to write a report and insert pictures to help troubleshoot the loop in the future. The Multi-Loop Tuner package from ExperTune, Hartland, Wis., used for this example, has built-in tools to generate an automated report including graphics, values computed, and analysis.

The report on this loop also noted that the loop would perform better with a properly sized valve. A hidden cycling of five seconds from a leaking relief valve will disappear after the relief valve is replaced or repaired.

The new tuning parameters increased the loop performance:

• Three times more robust.

• Response time reduced 80%.

• Variability reduced by half.

After three weeks of operation, the paper mill steam pressure control loop was performing very well and the operators no longer complained about poor performance, cycling, and instability.

Michel Ruel, P.E., at TOP Control Inc., St. Romuald, Quebec, has 22 years of plant experience at companies including Monsanto, Domtar Paper, Dow Corning, and Shell Oil. Author of several publications on instrumentation and control and frequent university lecturer, Ruel is experienced in solving unusual process control problems and a pioneer in implementing fuzzy logic in process control.