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 solicits responses from automation professionals. Past Q&A videos are available on the ISA YouTube channel. View the playlist here. You can read all posts from this series here.
Looking for additional career guidance, or to offer support to those new to automation? Sign up for the ISA Mentor Program.
Brian Hrankowsky’s Question:
My understanding of the idea with Bypass mode is that the primary outer loop controller output is passed linearly to the secondary inner loop controller output and that while you lose inner loop load rejection, you will have reasonable control still and may not require retuning. I had convinced myself that the tuning of the outer loop should work well enough, but got challenged on it by a colleague. The argument seems to center on the scaling from input to output through the inner loop in bypass mode will appear to change the process gain relative to the outer loop.
Do you have experience with the PID Bypass mode? Is tuning of the outer loop affected? it will be particularly helpful if you share your experience about how to evaluate where it is a potential solution and then where you see that happen most often
I think there would be a different reset and rate setting besides gain setting if the inner loop is temperature or pH. There could also be different output limits, which may have been set to match inner loop setpoint limits.
By not being in cascade mode, you no longer have the faster inner loop making a faster correction for inner loop process disturbances which can be exceptionally fast (e.g., pressure disturbances to inner flow loop), and valve nonlinearities including lost motion and resolution limits. You may need to try to slow down or attenuate inner loop process disturbances even including the possible addition of feedforward control plus use more precise valves and actuators and more aggressive positioner tuning (e.g., higher positioner gain).
I have never used this function. My two cents—I like to explain that using a cascade scheme where the inner loop is a flow loop corresponds to replace a nonlinear element with a linear one. The flow loop becomes an idealized valve where backlash, stiction, non-linearity remains present but from the outer loop point of view, these problems disappear since within seconds they are fixed by the inner controller.
Hence, it seems that the bypass function would remove this local « guy » fixing the valve problems. For example, a backlash problem which is not a big issue with a flow controller tuned to nicely reach the SP without overshoot would become an issue with a slow (outer) controller.
Have fun! I suggest to test it in a simulator with a nonlinear problem: gain or backlash or stiction.
James Beall’s Responses:
The PID Bypass feature was intended for the use you describe, to maintain control from the primary loop when the secondary loop PV is not available. In Bypass mode the PID sends the %SP directly to the %OUT with Reverse control action and (100% - %SP) to the %OUT when the control action is Direct. This changes the open loop gain of the primary loop by the secondary loop’s open loop gain.
For example, if the secondary loop has an open loop gain of 2%PV/%OUT, then when the secondary loop is put in Bypass, the primary loop open loop gain (with secondary loop in closed) is multiplied by two. In this example, the closed loop response of the primary loop with also changed by the same factor (two times faster).
If the secondary loop’s open loop gain varies for the operation range, this changes the performance over the range of operation. This is not too bad on a well-designed flow loop with a linear installed flow characteristic but the open loop gains of other types of secondary loops (e.g., temperature, pressure, etc.) might cause issues.
Michel also makes valid points about the other benefits of a secondary loop that would be lost in the Bypass mode.
I have seen some customers that set up two sets of tuning parameters in module parameters for the primary loop, one set for the secondary loop’s Normal mode and one set for the Bypass mode. They include code to make the switch to/from Bypass in the secondary loop and change the tuning set at the same time. I suppose you could use a gain scheduler configuration as the mechanism for the tuning change of the primary loop.
I hope this helps!
It seems strange to me to have the feature, explain it is to be used for exactly this use case, but then have its implementation such that it cannot really be used because it changes the process dynamics seen by the outer loop by so much.
It seems like a useful feature, but there is very little in the PID manual to guide a person in applying properly or when its useful—just that it can provide some control when the inner loop input is bad.
I am not sure how I convinced myself previously that the performance would always be “good enough” to finish out a batch if a loop needed to switch to Bypass mode. I may have been putting too much weight on the idea that the outer loop would be slow in its output changes resulting in higher amplitude errors, but with the relatively sluggish tuning we tend to fall into (large gain margin), we would likely still be able to control OK around setpoint.
Considering what my colleague had said and these responses, I think its use needs to be more carefully considered and we should plan on testing the performance in Bypass mode before committing to its availability and use in production for a given cascade setup.
The colleague had also mentioned the use of a second set of tuning in the primary when the secondary is in Bypass mode. It is good to know That solution has been implemented elsewhere. I was considering if this would only need to be a different gain, but I suppose if you are going to put the effort in test it out, you may as well use new gain, reset, and rate during bypass.
James Beall’s Follow-up Responses:
The change in the dynamics of the primary outer loop when the secondary inner loop is switched to bypass is not a function of the bypass implementation. It is simply the impact of the secondary loop dynamics (notably its open loop gain) and its closed loop response time from its tuning. If the secondary open loop gain is 1%PV/1%OUT, and the cascade rule of closed loop speed is observed, the change in the primary loop dynamics would be minimal when the secondary loop is switched to bypass.
As I mentioned above, the closed loop response of the primary loop is impacted directly by the secondary loop gain when switched to the bypass mode. If the bypass feature is intended to be used on a loop frequently, and at the operators’ selection, I recommend the two sets of tuning (gain, reset, and rate).
However, if the bypass feature is only to be used infrequently, for example when the secondary loop PV is unavailable, then a manual change of the primary loop’s proportional gain by 1/ secondary open loop gain is probably sufficient for inner flow loops
Greg McMillan’s Follow-up Reponses:
The secondary inner open loop gain is the product of the valve gain, inner process gain, and inner measurement gain. For a flow loop with a linear valve and the measurement span equal to the valve capacity, the inner open loop gain is 1. The primary outer loop open loop gain in cascade mode is the product of the setpoint gain, outer loop process gain, and outer loop measurement gain.
It seems that the setpoint gain, which is inner loop setpoint span divided by 100%, translates to about the same effect as the valve gain for the case when inner flow loop gain is one. I think an inner loop five times faster than outer loop also means the additional delay from an inner open loop time constant rather than an inner closed loop time constant is not devastating assuming lambda tuning.
However, an inner loop with a near-integrating or true integrating response requiring integrator tuning might be another story. This is kind of rare but could be the case when the inner loop is heat exchanger temperature with a large thermal lag or vessel gas pressure.