defcon.klaxon
Lifetime Supporting Member
Hi guys,
I'm working on controlling two pumps with a single PID loop. I've been doing searches in the forum and with Google so I have the general idea down, but wanted to ask about a few "best practices" sort of things that aren't quite be answered by Google searches.
So the general idea is, I have two pumps that bring water in from a lake and supply treatment units. Each pump can supply 900 GPM, and maximum needed influent flow is 1400 GPM but typical operation will likely be 700-1100 GPM. Thus, one pump will be able to handle many situations, but not all. So I'll call a lag pump to run. My plan is to, if the lead pump is called to 100% for a time delay, call the lag; manually ramp the lag pump to 50% and hold it for a minute, then let the PID loop control both pumps at same speed; then, shed the lag pump once the PID output drops below something like 30%.
I have the PID instruction in a periodic function that is set to run once a second. All other PID related instruction (moving data, etc) is done in a subroutine under the main task. So I should be set.
Here's my specific issue: Both pumps have manual speed setpoints if they're in Hand (in the HMI). So if one pump is in auto, but the other is in hand, then the one in auto still runs off the PID. If both are not in auto, then I disable the PID loop with the .SWD bit. Should I also force the output to 0 with .SO? If a pump is in hand, I will simply move the manual speed setpoint to the pump speed setpoint (if the pump is in auto, the PID output is moved to the pump speed setpoint). To ensure smooth, "bumpless" operation do I need to set .SO to 0? Finally, one more question: when the pumps aren't being called to run, what should I do to the PID instruction to keep it from winding up the integral? Should I disable it with .SWM? Put a contact in front of it to keep it from executing? Reason I ask is, I have a Time-of-Day Enable/Disable function that keeps the pumps from running during off hours (5pm to 8am, when no one is at the treatment plant).
Thanks for any help! I did a bunch of Google searching to minimize as much duplicate questions as possible, but these still are stumping me.
I'm working on controlling two pumps with a single PID loop. I've been doing searches in the forum and with Google so I have the general idea down, but wanted to ask about a few "best practices" sort of things that aren't quite be answered by Google searches.
So the general idea is, I have two pumps that bring water in from a lake and supply treatment units. Each pump can supply 900 GPM, and maximum needed influent flow is 1400 GPM but typical operation will likely be 700-1100 GPM. Thus, one pump will be able to handle many situations, but not all. So I'll call a lag pump to run. My plan is to, if the lead pump is called to 100% for a time delay, call the lag; manually ramp the lag pump to 50% and hold it for a minute, then let the PID loop control both pumps at same speed; then, shed the lag pump once the PID output drops below something like 30%.
I have the PID instruction in a periodic function that is set to run once a second. All other PID related instruction (moving data, etc) is done in a subroutine under the main task. So I should be set.
Here's my specific issue: Both pumps have manual speed setpoints if they're in Hand (in the HMI). So if one pump is in auto, but the other is in hand, then the one in auto still runs off the PID. If both are not in auto, then I disable the PID loop with the .SWD bit. Should I also force the output to 0 with .SO? If a pump is in hand, I will simply move the manual speed setpoint to the pump speed setpoint (if the pump is in auto, the PID output is moved to the pump speed setpoint). To ensure smooth, "bumpless" operation do I need to set .SO to 0? Finally, one more question: when the pumps aren't being called to run, what should I do to the PID instruction to keep it from winding up the integral? Should I disable it with .SWM? Put a contact in front of it to keep it from executing? Reason I ask is, I have a Time-of-Day Enable/Disable function that keeps the pumps from running during off hours (5pm to 8am, when no one is at the treatment plant).
Thanks for any help! I did a bunch of Google searching to minimize as much duplicate questions as possible, but these still are stumping me.
Last edited: