ISA Interchange

Can a Primary Loop Manipulate a Secondary Loop Valve?

Written by Greg McMillan | Dec 1, 2023 1:00:00 PM

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

 

Greg McMillan’s Responses:

 

My first thought is the bypass mode is a way of dealing with issues involving measurement 5Rs (rangeability, reliability, resolution, repeatability, and response time) if an inferential measurement is not available. A common problem is flow measurement rangeability, especially when the flow measurement is an orifice meter or vortex meter.

 

At low flows, the measurement becomes noisy and loses resolution and repeatability. The other case that comes to mind is a large temperature or pH sensor response time due to low flows and coatings. pH electrodes are susceptible to all types of problems. Middle signal selection is advocated to automatically deal with and diagnose reliability and response time issues exhibited by one electrode.

 

The idea is to replace the bad electrode as soon as possible. While the process manufacturers I worked almost always used 3 electrodes and middle signal selection, it is not a common practice. Analyzers are very susceptible to all kinds of problems. Inferential composition measurements are a common and potentially effective way of being able to stay in the cascade mode described in “Control Talk: Top of the Bottom line.”

 

I have never used the PID Bypass mode. I think the tuning of the outer loop would be affected going to bypass mode from the change in process gain not only due to scaling of the input and output but also due to a possible nonlinearity in the final control element now seen by the outer loop and the omission of the dynamics of the inner loop tuning effect on the outer loop response. 

 

In boiler control, there is sometimes a computed flow from a precise valve position substituted at low flows for the flow measurement when the flow meter's rangeability is exceeded but the inner flow loop remains intact using the inferential flow measurement. 

 

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).

 

Michel Ruel’s Responses:

 

I have never used this function. My two centsI 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!

 

Brian Hrankowsky Follow-up:

 

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 usefuljust 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.