Ideally, proportional, integral, derivative (PID) controllers manage the loops and process applications they're in charge of closely, tightly, and efficiently for long periods of time. However, reality in the form of material constraints, communications latencies, and other physical limits inevitably and often immediately introduce delays in loops and controllers, and hinder performance in all kinds of process applications.
To keep controller and process loops running optimally and safely for as long as possible, Bob Rice, Ph.D, vice president of engineering at Control Station Inc., reports the key is stability. "A well-controlled process has less variability in the measured process variable (PV), so the process can be operated close to the maximum profit constraint," says Rice.
Control Station offers a two-day program for PID tuning in conjunction with NovaTech's D/3 control system by employing its D/3 Loop Optimizer solution, which is powered by Control Station's software. D/3 Loop Optimizer was introduced in 2008, and its new Version 1.9 debuted earlier this year with more domain windows, authentication, and offline and online analysis.
Rice presented a 45-minute version of Control Station's program, "PID controller tuning: addressing sticky, sluggish and troublesome loops," on Sept. 19, the second day of the NovaTech Automation Summit 2017 in Baltimore, Md.
Rice explained that functions of the proportional (P), integral (I) and derivative (D) terms include:
- Proportional considers how far PV is from setpoint (SP) at any instant in time, and adds or subtracts from controller output (CO) bias accordingly. For example, controller error at time (e(t)) = SP – PV;
- Integral addresses how long and how far PV has been from SP by continually summing e(t) over time; and
- Derivative considers how fast e(t) is changing at any instant using the rate of change or slope of the error curve (rapidly changing e(t) = large derivative = large impact on CO). Also, derivative doesn’t consider if e(t) is positive vs. negative or how much time has passed, just how fast e(t) is changing.
"If we add more proportional action and/or integral action, what happens?" asked Rice. "We want to get away from this historical trial-and-error by using our six-step D3LO tuning recipe." These steps include:
- Find—to identify the controller and specify the design level of operation (DLO) and control objective;
- Step—that performs a "bump test" and collects dynamic process data;
- Model—that fit a model to the process data;
- Tune—to use tuning correlations to calculate tunings based on the model;
- Test—that implements and tests results; and
- Document—to document the tuning process.
"Defining the controller and objective means asking what do we want it do and how fast do we want it to respond? But it also means asking why is this controller here and what is its purpose?" explained Rice. "Bumping the process means the controller's data must show a sharp, sudden CO change of at least 3%. Changes of at least 3% ensure that the valve or final control element will actually move; smaller changes may be inhibited by stiction or deadband. When a closed loop test is performed, the current controller tuning values must be aggressive enough that the SP bump causes a sharp, sudden CO change. If the CO change is ramped, generating an accurate model is not possible. We usually do three to five tests."
Rice added there are three main ways to bump a process:
- Step test that steps a controller output (CO) from one constant value to another, which results in the measured variable moving from one steady state to a new steady state.
- Pulse test that consists of two step tests performed in rapid succession. The CO is stepped up, and as soon as the measured variable shows a clear response, the CO is returned to its original value.
- Doublet test performs two pulse tests, also in rapid succession and in opposite directions. Likewise, the second pulse test is implemented as soon as the process has shown a clear response to the first pulse.
In addition, Rice reported that if a bump test can't be performed by automation, it can likely be done in a manual mode. "Many problems are related to production and mechanical issues, and these must be addressed because you can't use loop tuning to fix a broken valve that's causing poor production," he said.
Bump testing and gathering data up and down enables users to better understand the characteristics of their application, and find the right model for it. There are two primary types:
- Self-regulating models, in which a process (such as a heat exchanger) will seek a steady state if all inputs are held constant.
- Non-self-regulating models, in which a process (such as a surge tank) will only reach a steady state at its "balancing" point.
"Loop tuning isn't rocket science because getting to 90% of target performance is usually good enough, but it's important to understand that tuning can only be as good as its model," said Rice.
Rice reported that he and Control Station recommend using a modified internal model control (IMC) loop tuning method, which begins with computing the closed-loop time constant, and calculating for aggressive, moderate, or conservative performance. "My rule of thumb is to be conservative, and tune as slowly as the process will allow because more time allows for better stability."
In the implementation and testing phase, Rice explained that testing PID controllers typically involves adjusting setpoints to ensure adequate tracking, determining if the PV overshot or if the CO moved too much, and introducing a load change or disturbance to learn of the PV recovered quickly enough. "Updated tuning parameters must be tested," said Rice. "PID Controllers work off of controller error (SP-PV), so if there's no error, then there's nothing for the PID controller to do. Users must introduce controller error, and force the controller to respond before they know if their tuning changes improved the system."
Finally, Rice added that documenting loop tuning results means asking several questions:
- Who is accountable for the changes?
- What loop has been tuned, and what were the as-found and recommended tuning values?
- When was the loop adjusted?
- Why was this particular loop tuned?
To deal with common problems such a valve stiction, Rice advises, "Static friction counteracts opposing external forces below a certain threshold. In control valves, this often describes the stem of the valve becoming 'sticky' when small changes are attempted. The result is that the force required to get the stem to move is more than is required to get to the desired stem position, causing the movement to be jumpy.
"To determine how much stiction is present in a valve, place the controller in manual mode, and incrementally increase the controller output until the flow rate responds. If stiction is present in the valve, it won’t move until the CO is increased by the amount of stiction present in the valve. If stiction is present, the integral term should be decreased. This is because decreasing the integral influence in the PID algorithm slows down the oscillations created when a control valve overcomes the static friction and opens or closes."
To tune level controllers, such as a device handling liquid level in a surge tank, Rice advises, "Looks at your tanks. Most are oscillating, and that disturbance pushes down to the rest of the system. So, again, we need to understand what we're trying to do. We want slow and smooth level control, so our outflow will be stable and smooth.
"An integrating process’ measured PV is stable in an open-loop configuration only at its balance point. Making a step change in the controller output of a stable integrating process will cause the PV to move increasingly in one direction. In the beginning, the level in the tank is constant, so the exit flow exactly matches the inlet flow. As the exit flow rate is increased, more liquid leaves the tank than enters, and the tank drains. Level controllers are primarily designed to absorb flow fluctuations without exceeding limits—not to maintain a perfect setpoint. The closed-loop time constant should be as large as possible, but still fast enough to arrest or recover from a major disturbance."
NovaTech was the first OEM to integrate Control Station’s technology and many of its customers have already recognized significant savings.