How to control two process variables with one output
How can a system control multiple process variables with only one output? A system can limit both values simultaneously. The operator enters setpoints for both and both act as limits.
How can a system control multiple process variables (PVs) with only one output (OP)?
A system can limit both values simultaneously. For example, the speed of a variable speed pump can be automatically adjusted to keep both the flow and pressure in its discharge line at, or below, limits for each. The operator enters setpoints for both; they both act as limits. If he or she enters 50 gpm and 150 psig, and valves downstream open to only demand 40 gpm, the pressure loop will control the pressure to 150 psig and the flow will drop to 40 gpm. But, if the downstream valves open to demand 60 gpm, the flow loop will take over to limit the flow to 50 gpm and the pressure will slump below 150 psig.
Dynamic output limits
If you just send the minimum of the two outputs to the speed reference and leave both PID outputs limited 0%-100%, the output of the loop not in control will rise to 100%-and when it's time to swap which loop is actively limiting the pump speed, it will take a long time for the higher output to come down from 100% to meet the other output, resulting in a major overshoot.
To solve this, the higher output should not be allowed to rise much above the lower output. But, the higher output must be allowed to rise a little bit above the lower because the proportional action of the loop not in control will act on signal noise to drive the speed down when it doesn't need to go down.
Both of these problems can be avoided by setting the PID's output upper limits to a few percent (2% is a good starting point, but it might need to be 1% or 5%) above the lower output being sent to the process.
Comparison with other methods
There are other methods to achieve this control. One approach is to have one PID loop track the other until it should take over. That makes sense when you want the operator to decide which loop should be in control and when to switch to the other. But the scheme above is superior when you want to automatically limit all process variables all the time because:
- The logic is simpler and inherently bumpless. There is no switching, and no need to decide when to have an OP or setpoint (SP) track. In fact, there is no Boolean logic at all. All the PID loops are active all the time.
- A system where one loop tracks the other will tend to overshoot on switch-over. In the above example, if the pressure loop were tracking the flow loop, you would switch when the pressure goes above its limit. You would then lose the ability to limit overshooting with proportional action. By contrast, with the system proposed here, if the pressure were to start to rapidly rise, the pressure loop's output would drop and take control before the pressure reached its limit and thereby minimize overshoot.
The simplest way to deal with output tieback to the PID block is to not use that feature. If you have a system that requires its use, I recommend:
- Subtract the output feedback (for example: VFD actual speed or a valve position feedback) from the output command (speed reference or position command to a valve) to calculate an OP-FB-Differential.
- For each PID loop, add the common OP-FB-Differential to that loop's output and send the result to that loop's tieback. This will result in the PID loop that is actually in control receiving the exact output feedback as its tieback. The other loop(s) will have a tieback slightly above the true feedback; this will prevent it from "being upset" at the discrepancy caused by the dynamic OP limit offset.
This general scheme can be used for many applications and has other variations. For example, you can use it to set lower instead of upper limits by taking the greater of two outputs and subtracting a few percent for the lower limits.
You can limit three or more PVs simultaneously; the only requirement is that the outputs must all be limited in the same direction. To the above example, you could add another PID for suction pressure and take the minimum output of all three PID loops. The flow and discharge pressure PID loops would be reverse acting, and the suction pressure PID loop would be direct acting, so you would have upper limits on flow and discharge pressure and a lower limit on suction pressure. All three would be able to slow down the pump to avoid exceeding the limit.
Finally, you can allow the operator to set the fixed maximum and/or minimum of the output, so instead of a hard 100% maximum pump speed, the operator could adjust it to 90%, and this would act as yet another limit to the system.
Multiple process variables can be controlled by automatically adjusting a single output by taking the minimum or maximum output from a PID loop for each process variable. The output of all loops must be dynamically limited near, but not exactly to, the value sent to the output to limit both overshoot and ratcheting all process variables below their limits.
Chris Hardy is an electrical engineer from Georgia Tech. At Cross Company Integrated Systems Group since 1994, Chris has process control experience with boilers, alternative energy, water/waste water, chemicals, pharmaceuticals, security, textiles and automotive. Chris also programs controllers/HMIs and writes custom Windows applications for communication, data collection, display, trending, and reporting.