Distributed Control / PLCs & PACs

Don't overlook the virtues of PID when optimizing processes

Model predictive control isn't always the best choice

By Greg McMillan and Stan Weiner

Stan: PID is the workhorse of the process industry. It has more than enough flexibility and capability to maximize the performance of PID loops distributed throughout the process for different objectives and difficult situations. However, the disparity is increasing between what PID can do and how it is used. I suspect this is due to an increase in the capability of PID, growing disagreement and misunderstandings in tuning rules, the lack of tools for automatically setting dynamic compensation of feedforward and decoupling signals, a decrease in the expertise onsite, and the lack of succinct guidance.

Greg: The solution more than ever is to get a consultant on-site. The Control Talk columns we have done with James Beall, Mark Coughran, Sigifredo Nino, Michel Ruel, and Jacques Smuts show us what consultants can do with getting the most out of PID. My concern is the number of consultants is declining, and they are so busy providing solutions that they don't have time to document their knowledge. While ideally we would want general concepts with a step-by-step approach for the major types of applications, just to hear about industrial solutions is a great help.

What I am seeing is that engineers who want to do something better, particularly where there is a feedforward signal, are turning to model predictive control (MPC) because the dynamics of the feedback and feedforward loops are automatically identified, and tuning often is relegated to a simple adjustment of move suppression (penalty on move). A penalty on error is used to place a different relative emphasis on the importance of controlled variables and constraint variables. Often the 1.0 default value can be used or adjusted based on a basic understanding of importance, and refined as more knowledge is gained.

Also read: "Model-based tuning methods for PID controllers"

Stan: To help us understand the role of PID and MPC in our future, we have invited Sigifredo Nino into this discussion. Sigifredo shared his expertise and accomplishments in the 2014 Control Talk columns "Giving thanks for process control achievements," "Distilled analysis of interaction," and "How to Get the most out of your PID by better tuning." The data shows that many advanced control solutions fall into disuse about a year or two after the consultant leaves the site. What is your experience?

Sigifredo: My solutions stay in service long after I leave. In fact, this is a basic requirement for me upfront. I assure the customer from the start that the solution will remain effective, and there should be no future need of my services for the particular application for as long as there are no substantial changes in the process and all field devices are working properly.

Greg: Maybe one of the advantages of PID is that once properly implemented, the operator can better understand what the PID system is doing compared to an MPC system. MPC does offer future trajectories, but these often dramatically change from the progression of unmeasured load disturbances. Still, there is an advantage to realizing that changes being made now do not start to have an effect until after the loop dead time. The simple computation of a process variable (PV) one dead time into the future for PID would greatly help operator understanding of where PID is going as detailed in the 6/28/2012 Control Talk Blog, "Future PV values are the future."

Sigifredo: It is easier to discern what a PID controller is doing in response to the behavior of the process variable, whereas the multivariable actions of an MPC approach are difficult to fathom, especially if we take into account that MPC does not have a closed-form solution.

Stan: Even if advances have been made in showing the operator the contribution of the controlled variables and constraint variables to what is seen in the action of a particular manipulated variable, being able to decide whether MPC is doing the right thing is a challenge. In override control, the controller output selected can be easily flagged to the operator. The principal concerns are the proper connections of the back-calculated signal in the configuration and the tuning of a PID that is only active for abnormal conditions. The "back-calculate" capability in the PID positional algorithm enables significant performance advantages over the velocity algorithm.

Greg: PID override control handles optimization sequentially, whereas MPC handles the optimization simultaneously for all of the constraints involved. The optimization in MPC can also take into account the constraint trajectories to provide a concerted action to avoid a future constraint violation. This is all done inherently by virtue of the dynamic model identified for the effect of manipulated variables on each constraint. To some extent, PID can also seek to prevent future violations by the use of rate action and, if necessary, by the use of dead time compensation.

Sigifredo: I have successfully used dead time compensation in PID in a number of applications. The implementation of dead time compensation is particularly simple if you have the positive feedback implementation of the integral mode. A dead time block is simply inserted into the external reset feedback path. Unlike the Smith Predictor, you do not have to set a process gain or time constant in the compensator. You just need to set the dead time accurately. The sensitivity and benefits of the dead-time-compensated PID are comparable to what you would get from MPC. Also, the benefit of dead time compensation is actually greater for processes that are not dead-time-dominant in terms of the reduction in integrated absolute error for unmeasured load disturbances.

Stan: The commonly stated suggestion that dead-time-dominant loops benefit from going to MPC is the result of this misunderstanding and not knowing that the PID settings must be made more aggressive (i.e.,reset time drastically reduced) to see the benefit of a dead-time-compensated PID (preferably PID with simply a dead time block in the external reset path rather than a Smith Predictor).

Greg: Also not recognized is that both the dead time compensated PID and MPC have a counterintuitive greater sensitivity to an overestimate as opposed to an underestimate of the dead time. The consequence of an overestimate escalates rapidly with model mismatch and is greater for dead-time-dominant processes, triggering severe oscillations for an overestimate of just 30%. The sensitivity to an underestimate is more gradual and for the dead-time-compensated PID corresponds to mostly just a moderation of the possible improvement. When the principle source of the dead time is a transportation delay, the PID dead time block can have its dead time computed from flow rate. Until recently, MPC had a fixed dead time identified during testing.

Sigifredo: There are several functional capabilities of PID where MPC is playing catch up. The principle one is the use of external reset feedback. By simply connecting the process variable of a secondary loop, PID will not break out into oscillations if the primary loop is trying to change the setpoint faster than the secondary loop can respond in a cascade control system. Often the problem is undetected because oscillations break out only for large disturbances or large setpoint changes, as exemplified in Shinskey's May 2006 article, "The power of external-reset feedback."

Stan: The fast readback of an actual valve position can enable external reset feedback to prevent a controller output from changing faster than a valve can respond. In some cases external reset feedback can also break the limit cycle from backlash and stiction.

Greg: The use of setpoint up-and-down rate limits in an analog output block or secondary loop can provide a directional move suppression that enables a slow approach to an optimum and a fast getaway for abnormal conditions without any retuning of PID. This enables a surge controller to inherently provide a fast-opening valve to prevent surge, slow-closing valves to return to a more energy-efficient operating point, and a RCRA pH controller to give a fast increase in flow to prevent a violation and slow decrease in reagent flow to achieve a more raw-material-efficient operating point. The same capability is important for a valve position controller that seeks to increase production rate or process efficiency by adjusting feed or utility setpoints to maximize downstream valve positions, as extensively discussed in the November 2011 Control article, "Don't overlook PID in APC." External reset feedback (e.g., dynamic reset limit) also enables an enhanced PID that prevents oscillations and eliminates the need to detune a PID as the analyzer cycle time becomes larger than the sum of the process dead time and time constant, normally a very destabilizing situation. The impressive spectrum of potential advantages of external reset feedback is outlined in the 4/26/2012 Control Talk blog, "What is the key PID feature for basic and advanced control."

Many of our most important loops (e.g., gas pressure and vessel or column composition, pH and temperature), use integrating process tuning rules where an integrating process gain is identified. The controller gain and rate settings are normally aggressive, except as dictated by uncompensated nonlinearities, to enable tight control, particularly important for distillation and reaction. How does MPC handle these applications?

Sigifredo: The MPC correction for unmeasured disturbances by successively biasing the trajectory is more like what is given by the PID integral mode than the PID proportional or derivative modes. The handling of processes with large time constants as near-integrators in MPC is problematic in terms of steady-state gains. Unmeasured disturbances are handled by a rotation of the ramp of future values for integrating processes. The use of autoregressive exogenous (ARX) models leads to zeroes in the discrete transfer function and consequently provides some action like that from proportional and derivative modes not possible with the finite impulse response (FIR) models. This more prompt action comes at a price though; even greater modeling skills and expertise are needed for effective use and maintenance. The whole idea of MPC being an easy substitution for PID goes away.

Greg: For refineries, many of the loops have many continuous unit operations with integrated energy systems and recycle where abrupt movement and overshoot of the manipulated variables create upsets that propagate through the system. The process can often be categorized as having a balanced self-regulating response. A smooth, gradual response is desirable, precluding much proportional or derivative action. MPC can handle dynamics with an irregular response and provide the desired gradual response focusing more on the desired steady state. The effect of inverse response and dynamics from heat integration and recycle can be included in the MPC model, as noted in the June 2013 Control Talk Column, "The route to model predictive control success." Additional MPC software capability and expertise is required. The use of "raw weight" models can give trajectories any shape by the summed entry of the change in the process control variable per unit change in each of the manipulated variables at each data point in the trajectory by the principle of linear superposition.

Some PID auto tuning software can identify complex dynamics as well, but the total solution is generally less automated. Identification of the secondary time constant is achievable and useful, since a rate time can be set equal to this time constant that is particularly beneficial for non-self-regulating responses. The identification of a first- order-plus-dead-time model with an integrator and a lead time or an additional lag time in the process response is advantageous in some processes (e.g., heat exchangers with recirculation and/or two phase utilities).

Where there is a large variation in feedstock components and desired concentrations, the multivariable optimization opportunity is considerable. MPC is the common solution in most refineries, relegating PID to basic control, such as flow, level and pressure.

Sigifredo: I just finished commissioning an exothermic reactor average bed temperature control that was implemented in PIDs as  advanced regulatory control (ARC) with the MPC setting the reactor temperature profile. This setup makes it easier to handle disturbances coming from variations in feedstock components.

Stan: MPC is also designed to enable incorporation of a steady-state optimizer (e.g., linear program) that seeks the vertex intersection of operating limits on manipulated variables and controlled variables with the greatest monetary value. The optimum vertex depends upon the value of yield and capacity, and changes in market demands, operating costs and process limits as set in terms of dollars per unit change in each variable. If the vertex moves (e.g., per-unit value of variables changes), a high-fidelity first principle model and real-time optimization are needed to find the new vertex.

Greg: If the process is largely self-regulating and the solution involves interaction of more than two loops, the optimization needs to be multivariable and simultaneous, or if the optimization and dynamics are complex, MPC is the obvious solution. However, if we don't somehow develop more expertise in the use of PID, we will see MPC replacing  PID for ARC, where PID could have served the application even more effectively ,as conveyed in the 3/29/2015 Control Talk Blog, "How MPC will take over more of the role of PID."

Sigifredo: I think it is time for consultants to make the extra effort to give guest lectures at universities and teach courses on the effective use of PID in advanced control strategies. Online courses without registration fees and complications may be the best route to reach an extensive audience.

MPC has a place in process control; I have first-hand experience with it. I have been involved in transferring control from MPC to PID, and in implementation of distributed PID control strategies that enable optimization of a unit by using MPC. I still believe users need to be more aware of the difference between those two technologies, which in my mind are complementary. There is no free lunch; I can't see how you can succeed in effectively controlling a process you don't understand with a technology you don't comprehend.

Greg: The use of MPC and ARC is not mutually exclusive. We should keep our minds open to the opportunities of using both, realizing the results are only as good as the foundation of the basic control system. See "Basic control—Believe it or don't" list below.

Basic control - Believe it or don't

10. Someone read one of my books cover to cover.
9. A consultant recommended the use of another consultant's tuning rules instead of his own tuning rules (Actually true. See "So many tuning rules, so little time").
8. Someone correctly showed the time domain block diagram for the ISA Standard Form with the positive feedback implementation of integral action and external reset feedback offering 8 different structures (for my best effort see "Best PID time domain diagram").
7. Someone knew the actual installed flow characteristic for the plant's valves as discussed in the 5/6/2015 Control Talk "Best valve flow characteristic tips."
6. The true valve or variable frequency drive rangeability was stated in the literature.
5. Someone knew when the control valves would come off their output limits.
4. Operators asked for PID gain to be increased to provide more abrupt changes and overshoot in the controller output for setpoint changes.
3. All of a plant's loops were properly tuned for all loads.
2. None of a plant's loops were in manual.
1. A CEO personally praised an engineer for tuning all of the company's controllers.