The following discussion is part of an occasional series, “Ask the Automation Pros,” authored by Greg McMillan, industry consultant, author of numerous process control books and 2010 ISA Life Achievement Award recipient. Program administrators will collect submitted questions and solicit responses from automation professionals. Past Q&A videos are available on the ISA YouTube channel; you can view the playlist here. You can read posts from this series here.
Greg McMillan’s Question
What are the sources and consequences of interactions between PID loops and what are the possible solutions in terms of loop design and dynamics and PID tuning and decoupling?
Brian Hrankowsky’s Response
To answer “What are the sources?” I kept thinking “what aren’t the sources?!” A plant is full to the brim with interacting loops. If two control elements (e.g., control valve, variable speed pump, variable speed fan) are connected either by following the process flow, utility flow, HVAC flow or across a physical interface such as jacket or heat exchanger or to the ambient environment — they probably interact. We need to worry about the interaction when process variability can affect quality and/or the bottom line. And those are going to be the places where the underlying processes of the loops have similar response times.
Some worrisome interactions are easier to identify than others: Liquid lines with both pressure and flow controls. Temperature control using a heat exchanger on a line with flow control. Inline buffer addition mixed with a controlled flow. Others may be less obvious: Multiple controllers off the same liquid utility header interact across the header. The application of cascade controls where the inner loop and outer loop have similar response times.
From here on in my answer, I’m only going to address interacting loops that are worrisome, i.e., actually have potential to cause me problems.
To address interacting loops, I start by looking at mechanical solutions or design advantages. A positive displacement pump used for flow control decouples mitigates a lot of the effects of a supply with variable pressure. A pressure regulator does similar. Insulating lines dampens the effect of variable ambient temperatures on process lines. Raising the pressure of a gas header (e.g., steam) allows it to better dampen the transmission of user loops to one another. You may not be able to do much mechanical redesign, but identifying where these are can help with predicting what is unlikely to interact.
The next thing I’m looking at is which loops are the ones that affect quality and/or the bottom line the most. Prioritize their tuning first. If they also interact with each other, I pick the fastest one as the most important. Once I have it tuned, I look at the time constant of the closed loop response and apply the 5:1 rule, i.e., coordinated tuning approach typically discussed with — but not limited to — lambda tuning. The one exception here is that inner loops of cascade strategies need to be faster than outer loops. The decision to use cascade should be seriously reevaluated when this situation arises as the outer loop tuning is forced to be slower that it likely would have been in a single loop strategy. The inner loop measurement might be a better feedforward signal than an inner loop signal.
Sometimes that is not sufficient as it may result in important loops that are too slow. My next tool is feedforward. I’m one of those who thinks of feedforward in a broad sense. The feedforward signal could be another measurement, but it also be another controller output or the loop’s own setpoint.
I’m not sure if I have been fortunate or unfortunate that I have not needed to use more complex tools that these. Fortunate because I haven’t had anything that couldn’t be made to perform good enough with this approach. Unfortunate because I haven’t had the opportunity to get much field experience with those tools. I hope I get to deploy MPC in production at least once before I retire!
Russ Rhinehart’s Response
First understand the cause for the loop interaction. Here are two simple process examples on interaction. Consider in-line mixing of hot and cold water, like in a shower. There are two control valves, and two process response variables — total flow rate and mixed temperature. If you change either valve, it affects both the process responses. It is easy to understand and model the mechanism. Another example would be distillation. The primary influences are reflux rate, boil-up rate and vapor removal rate. If you change either of the three, it affects the column pressure as well as the top and bottom product composition. Interaction may have several influences and several process responses.
The problem of interaction is associated with single loop controllers, each adjusting one process influence to control one process response. For instance, in the shower, if a temperature controller is adjusting the hot water valve and a flow controller is adjusting the cold water valve, then if there is a temperature upset, the temperature controller adjusts the hot valve, which upsets total flow rate. Then when the flow controller adjusts the cold water valve to correct flow, it upsets the temperature. Which causes the temperature controller to adjust its valve, which upsets flow rate. If both controllers are tuned to be aggressive, then the interacting upsets to the other can lead to long term and increasing amplification of the upsets.
As part of understanding the problem, don’t confuse interaction with two responses to a common influence. For instance, upstream gas flow control oscillation may lead to downstream pressure and composition oscillation. The pressure and composition controllers might not be interacting, but may be oscillating as if they were upsetting each others’ CV. Be sure to understand the cause-and-effect interaction mechanism. The solutions for interaction are different from the solution to several responses to a single source.
Also, don’t confuse control-caused interaction with several controllers responding to a common upset. For instance, a change in feed flow rate or composition to a distillation column will cause an upset that all controllers will respond to. If there is interaction between controllers, it will cause a regular periodic oscillation, not an irregular intermittent pattern. The solution to a disturbance is not the solution to controller interaction.
Back to interacting controllers. Simple solutions are best. If the simple solution does not work, then progress to a more complicated solution to solve the problem. I have listed a precedence of solutions based on my view of lowest complexity, number of coefficients to determine and ease of understanding and implementing.
If the problem is controller interaction:
First, consider changing the controllers’ controlled variables (CVs). Perform a relative gain analysis to determine the loop pairing that minimizes interaction. For the shower example, if the desired temperature is near the hot water temperature, then the hot water flow rate will dominate the total flow rate. In this situation, use the cold water valve to adjust temperature and the hot valve to adjust total flow rate. Alternately, if the hot water flow rate will be a small portion of the total, switch the pairing.
Second, consider detuning one controller if its CV is not as important as the other CV. In this case, as the less important controller is progressively making slow changes, the other controller is making quick adjustments to keep the more important CV at the set point.
Third, consider a ratio structure. Here one controller is a single loop controller, which adjusts one input to keep its CV at the set point. There are two ratio options.
- 3a) The other controller watching the other CV sends a ratio signal to a secondary controller that adjusts the second final element. This is a classic ratio scheme.
- 3b) The ratio is a fixed value, and trims the output of the other controller by a ratio of the first controller prior to the signal going to the final element. This is a static, one-way decoupling scheme.
Fourth, consider a double ratio structure if it is a 2x2 system. If it is more complex than 2x2, then jump to #7.
Fifth, for a 2x2 system, consider a one-way dynamic decoupler.
Sixth, for a 2x2 system, consider a two-way dynamic decoupler, cross decouplers, seemingly the favorite solution in many textbooks!
Seventh, consider a multivariable model-based control structure. The model in the controller would provide the decoupling. This could be a classic model-predictive control (MPC, APC, DMC, etc.) horizon-predictive controller based on a matrix of linear FIR responses. However, my favorite solution would be to replace the controllers with a first-principles model-based controller. If the process dynamics are first-orderish then simple first-principles controllers would be fully adequate. If the dynamics are ill-behaved, then first-principles models within either a predictive functional control (PFC) or MPC structure would work. If interested in first-principles model-based control, see the how-to in my ISA book Nonlinear Model-Based Control: Using First-Principles Models in Process Control, International Society of Automation, Durham, North Carolina, 2024, ISBN 13:978-1-64331-242-2, 411 pages, with companion website www.r3eda.com.
If the interaction happens in one operating region, and not another, it may be because process gain or dynamics change with operating conditions. This may indicate that gain scheduling of the controllers is the best solution. If so, also consider implementing a nonlinear, first-principles model-based control strategy.
If overrides or constraints are also an issue, again consider implementing a nonlinear, first-principles model-based control strategy.
Greg McMillan’s Response
The following is an excerpt from my book Tuning and Control Loop Performance Fourth Edition that is freely available to download at:
The solutions in preferential order to reducing interaction is the best control strategy in terms of pairing of manipulated and control, preventing positive feedback from recycle and heat integration, separation of dynamics by tuning, decoupling and move suppression.
Consider an upstream pressure and downstream flow controller in series in the same pipeline. There is a small valve upstream and a large valve downstream of the pressure and flow measurements. What valve should the flow loop manipulate realizing the main objective is to control the flow downstream? The “off the cuff” answer is the flow loop should manipulate the large valve. Actually, the flow controller should manipulate the valve with the largest pressure drop so that changes in pressure have least effect. Given the valves need to pass the same flow, the smaller valve upstream has the larger pressure drop and should be manipulated for flow control. Process dead time and time constant are not a consideration because they are very fast and the same for each valve for liquid flow.
A classic example often cited is inline composition and total flow control by the blending of two pure component feed streams, 1 and 2, fed to the inlet of a static mixer. The total flow and composition is measured downstream of the static mixer. If the composition loop is controlling the concentration of component 1 from feed stream 1 and the desired concentration of component 1 is less than the desired concentration of component 2 at the outlet of the static mixer, then the concentration controller should manipulate flow 1 which is the smaller stream flow. This analysis also works for static mixer pH control. Consider stream 1 to be a reagent flow with a relatively high reagent concentration (e.g., 98% sulfuric acid). Stream 2 is a high flow dilute effluent stream (e.g., 0.1% ammonia). The historical choice of the pH controller manipulating the reagent stream and the total flow controller manipulating effluent will minimize interaction. Consider the unusual but possible case of an extremely dilute waste reagent stream that is larger than the effluent. Here the pH controller should manipulate the effluent stream and the total flow controller should manipulate the waste reagent flow. In both cases, a feedforward of flow controller PV should be added to the pH controller output to further reduce interaction and improve control for production rate (total flow setpoint) changes.
Another example occurs in large recirculation loops where flow and backpressure are to be controlled. Often the flow controller mistakenly manipulates the Variable Speed Drive (VSD) and the backpressure controller manipulates the control valve. The relative gain matrix would say the exact opposite pairing of controlled and manipulated variables.
The interaction between outlet and inlet temperature controllers for kilns that manipulate firing rate and exit gas flow can be reduced by the addition of an oxygen controller. A feedforward of firing rate to the outlet temperature controller as a decoupler can reduce the remaining interaction.
A more complex example showing the importance of first addressing gas and liquid inventory control is distillation column control. When both the top and bottom composition need to be tightly controlled (two point composition control) full interaction occurs between the temperature loops on the top and bottom of the column. Here temperature is an inferential measurement of composition usually in terms of the impurities (high boiling key point key component on the top and low boiling point key component on the bottom of the column).
First, column pressure and levels must be controlled. Tight pressure control is needed so that boiling points of components throughout the column change with temperature, not pressure. The pressure controller should have a relatively large gain and reset time to rapidly manipulate the split ranged between nitrogen and vent valve. If the gain is decreased and the reset time is not correspondingly increased, slow rolling oscillations will result from integral action dominating proportional action in this integrating process. The slow rolling oscillations can cause the rest of the loops to perpetually oscillate.
Since reflux flow back to the column is often greater than distillate flow from the column, overhead receiver level PID often manipulates reflux flow. This leaves distillate flow from the receiver to be manipulated for temperature control. Because the column is not affected by a change in distillate flow until the reflux changes, tight level control is essential. Fortunately, tight level control is possible and desirable for the reasons such as inherent compensation of overhead vapor or reflux temperature changes. As with gas pressure control, the level controller should have more proportional than integral action for the integrating process. For the bottom of the column, the manipulation of bottoms flow is preferred for sump level control. However, if the bottoms flow is too small, then sump level PID manipulates steam flow to the reboiler. Here, tight sump level control is needed because a change in bottoms flow does not affect the column until the steam flow changes. Unfortunately, a slow secondary lag form from heat transfer and an inverse response from bubble formation and collapse, prevents tight sump level control. A feedforward signal of bottoms flow, that is in reality a half decoupler, provides the immediate effect needed in terms of a change in steam flow.
The tray for top and bottom temperature control is selected that provides the largest change in temperature for a change in the manipulated flow in both directions (increase and decrease). By choosing the largest change in both directions, the composition at other trays in the column is more tightly regulated. The manipulated flow paired with the temperature is the one with the largest effect on the temperature. Normally, the top temperature is most affected by reflux flow (directly or indirectly from receiver level control) rather than steam flow so the top temperature is often not paired with steam flow.
After proper pairing, there is still an interaction with the two-point composition control. The addition of feedforward of column feed to both loops can provide much of the decoupling needed. Typically, the top temperature trims the reflux to feed or distillate to feed ratio and the bottom temperature trims the steam to feed or bottoms to feed ratio.
Periodic disturbances should be eliminated where possible by better process and automation system design and better tuning. These oscillations can trigger interactions causing a confusing situation where oscillations at different frequencies are spreading throughout the process.
Recycle streams and heat integration create more opportunities for interactions where disturbances come back with an integrating response from accumulation and at worse a runaway response (snowballing effect) from positive feedback. A good example of this problem is continuous reaction and recovery system. A fixed setpoint flow controller based on production rate needs to be set somewhere in the recycle stream path from a reactor through a recovery system and back to the reactor in terms of recovered reactant.
Separation of dynamics by tuning, making fast loops faster, can stop full interaction. In particular, the fast loops can correct quickly for a slow disturbance from the slow loop. A feedforward of the fast loop to the slow loop eliminates the rest of the interaction. The remaining concern is setpoint changes to the slow loop that result in large abrupt changes in the slow loop output.
Relative gain analysis (RGA) is a powerful technique for accessing the type and degree of interaction. The relative gain for a given loop is the open loop steady state gain for the other loops open divided by the open loop steady state gain for the other loops closed. Note that the given loop is open for the tests with the other loops open and closed. A loop is considered open if the mode is manual or remote output or output tracking is enabled or the PID output is at an output limit. For integrating processes, the process variable (PV) is translated to a rate of change so the concept of steady state can be used. The relative gain is dimensionless and thus does not depend upon the engineering units of the loops involved. The relative gain does not change when a flow ratio rather than a flow is manipulated. Operating point nonlinearities will affect the analysis but not changes in time constants and dead times. Ideally, the pairing of loops should have a relative gain close to one or slightly higher. Negative relative gains are disastrous.
Full interaction creates additional feedback loops. The type oscillation observed is a clue to whether the loop has positive or negative feedback and to what degree.
If the subject loop’s oscillation is severe showing signs of instability, there is a strong positive feedback hidden loop created from other closed loops. The subject controller action can be reversed and tuned to stop the oscillations but this is not safe because if the offending loop becomes open (could be just temporary residence at output limit), the action sign will be wrong again. Process and/or system redesign is needed to eliminate this extreme type of interaction. Most severe interaction problems are caused by poor process or system design. This scenario corresponds to a negative relative gain.
If the subject loop’s oscillation period and amplitude are larger but with a normal rate of return back to setpoint, there is a parallel negative feedback path created by the other closed loops. The open loop gain and dead time in the subject loop has increased, requiring that the PID gain be decreased and the reset time be increased. This scenario corresponds to a relative gain between 0 and 1.
If the subject loop’s oscillation period does not appreciably change but the return back to set point is protracted, there is a slight positive feedback path created by the other closed loops. For setpoint changes, the subject loop will peak below setpoint and very slowly approach setpoint. For both disturbances and setpoint changes, the approach to setpoint is so slow, there appears to be an offset and no integral action. For loops with similar dynamics, the subject loop PID gain should be decreased. This scenario corresponds to a relative gain greater than 1.
For a 2 ×x 2 RGA, there is one hidden loop that has a path through both of the interaction process gains and the PID controllers. For the static mixer example, consider a change in concentration controller output. The change in stream 1 flow to control concentration passes through a process gain of one and causes an equal change in total flow. The total flow PID then responds and decreases the stream 2 flow, which passes through a concentration process gain that is the inverse of the total flow to cause a concentration change. The concentration PID then responds and changes the stream 1 flow completing the hidden loop. For a 3 ×x 3 RGA, there are 3 hidden control loops.
Hidden control loops are obviously confusing since the effect is not recognized and there is no PID whose options and tuning can be used to control what is going on in the loop. The hidden loop can cause a closed loop positive or negative feedback response depending upon the value of the relative gain. Positive feedback causes instability. Processes with a positive feedback open loop response (e.g., runaway response or open loop unstable response) rely upon the PID controller to provide enough negative feedback action so that the closed loop response has negative feedback.
AI CoPilot Response
Ah, the classic loop conundrum — when two or more loops seem to clash or interfere with each other’s flow, causing unexpected results. Here's how you might tackle this issue:
- Identify the Conflict: Examine the loops in question and check their dependencies. Are they trying to access or modify the same variable or resource at the same time?
- Use Isolation: If feasible, isolate the processes. Instead of running both loops simultaneously, consider breaking them into separate threads or combining their logic in a single loop.
- Apply Flags or Conditions: Implement flags or conditional checks to control when one loop can execute. For instance, only allow a loop to run if a certain condition is met, ensuring that loops don’t step on each other’s toes.
- Synchronize Access: For multithreading scenarios, synchronization tools like mutexes or locks can prevent conflicts when accessing shared resources.
- Debug Step-by-Step: If you're coding, add print statements or use debugging tools to understand the flow and pinpoint where the loops interfere.
- Refactor Code: Sometimes, the issue arises from poor code structure. Refactoring your code to make it cleaner and more modular can resolve loop conflicts.
Let me know if you want examples of any of these fixes!
About the Authors
Brian Hrankowsky is a senior advisor of engineering with 23+ years process control experience in the pharmaceutical and animal health industries. Brian has experience in large and small molecule synthesis and purification, continuous utility, discrete assembly and packaging automation with various DCS, PLC, vision and single loop control platforms.
R. Russell Rhinehart has experience in both the process industry (13 years) and academe (31 years). He is a fellow of ISA and AIChE and a CONTROL Automation Hall of Fame inductee. He served as president of the American Automatic Control Council and editor-in-chief of ISA Transactions. Now “retired,” Russ is working to disseminate engineering techniques with his web site (www.r3eda.com), short courses, books and monthly articles. His 1968 B.S. in ChE and M.S. in NucE are both from the U of Maryland. His 1985 Ph.D. in ChE is from North Carolina State U.
Gregory K. McMillan retired as a Senior Fellow from Solutia Inc in 2002 and retired as a senior principal software engineer in Emerson Process Systems and Solutions simulation R&D in 2023. Greg is an ISA Fellow and the author of more than 200 articles and papers, 100 Q&A posts, 80 blogs, 200 columns and 20 books. He was one of the first inductees into the Control Global Process Automation Hall of Fame in 2001, and received the ISA Lifetime Achievement Award in 2010, ISA Mentor Award in 2020 and ISA Standards Achievement Award in 2023. His LinkedIn profile is: https://www.linkedin.com/in/greg-mcmillan-5b256514/