Lead/Lag/Stdby Pump AOI advise

tarrant79

Member
Join Date
Jun 2020
Location
washington
Posts
23
To begin, before the Trolls pop out, I know you get your tools/test your tools/find the right tools. Thats great, but at this point Im on a startup and way behind schedule and any help would be greatly appreciated. I'm running A ControlOgix L82 PLC at v32.

I have a 3 pump configuration Im controlling: Lead/Lag/STDBY. I am controlling the Pump Lead VFD speed based on a Pressure Transducer Setpoint...25psi hit SP, leave VFD at current SPD.

So far I can meet Pressure just fine with 1 pump, but the system may need 2 pump capacity in the future, I would like to modulate with the Lead pump and just start the lag pump at 100% and drop the Lead pump to 25% and modulate from there(I don't know if this is kosher, but it would simplify my code).

So far 1 Lead pump is modulating on pressure just fine, but its all just ladder logic code(no UDTs and no AOIs). This is going to make it real hard for me to code, changing the LEAD/LAG pumps, excetra. I was wondering if anyone had any simplified Lead/Lag/Stdby AOI's they've used before that worked well for them, they could send my way.

Any help would be awesome, this project was pushed with WAY TO SHORT a timeline and now Im just trying to pick up the debris.
Thanks!
 
Is that Washington DC or state?

Anyway, Lead-Lag with pressure control is not easy to tune and it seems you realize this. Another method without a lot of coding is make a supervisory logic based on time delay, if the lead maxed out for a while then switch to state 2 - where 1st pump stay at 100% as before and modulate the 2nd pump, and so on so you always only have one pump on PID.
 
Here's an example from a vacuum pump system. It's not quite what you want to do but it might help get you there. The speed PID is independent of number of pumps running. All pumps run the same speed. Basically if the system can't reach a setpont after some delay, another pump turns on.

When load drops, if the system speed is below a threshold and PV stays above a threshold a pump is dropped after a delay.

Follow the pattern for however many pumps you have. The last pump uses XIC RunThisPump instead of XIO RunNextPump before the off delay.

LeadLag123.JPG
 
State unfortunately, rioting has been on and off for like 2-3 months now. Just nuts, fortunately Im no longer living in downtown, Anyways....

Ya pressure sucks, thousands of gallons of liquid loop, with who knows how many air pockets, and ever pervasive air entrapment.

Anyone kow of any ladder logic function i can used to avg/buffer analog Input. Like an 1-10sec averageing function to settle out a wildly fluctuating analog signal? I've done everything I can for noise and I just have to deal with badly installed customer instrumentation.....
 
5618, yes I thought about pacing the lead/lag the same. It would definetly be best to avoid fighting pumps, there is no check valves on the pump outlets, so a 100% pump is going to be pushing back hard on a 25% pump.
 
Anyone kow of any ladder logic function i can used to avg/buffer analog Input. Like an 1-10sec averageing function to settle out a wildly fluctuating analog signal? I've done everything I can for noise and I just have to deal with badly installed customer instrumentation.....


A-B has a moving average (MAVE) instruction, but it's only in FBD.


If performance is not an issue, I would use a FIFO and a running sum:

  • At the start, FFL a measurement onto the FIFO and add its value to the running sum
  • Once the FIFO is full, FFU a measurement off the FIFO before FFLing the next new measurement, and subtract the FFUed value from the running sum
  • Divide the running sum by the current length of the FIFO (Control.LEN, maybe?) to get the average.
  • Caveats
    • Beware of the case when .LEN is 0.
    • Can the FIFO use DINTs? Floats can accumulate error.
It's amazing how a PID will chase a noisy signal and actually make the PV even more noisy. Does the PID have a deadband? That might accomplish roughly the same thing unless the signal is just too noisy.
 
A-B has a moving average (MAVE) instruction, but it's only in FBD.


If performance is not an issue, I would use a FIFO and a running sum:

  • At the start, FFL a measurement onto the FIFO and add its value to the running sum
  • Once the FIFO is full, FFU a measurement off the FIFO before FFLing the next new measurement, and subtract the FFUed value from the running sum
  • Divide the running sum by the current length of the FIFO (Control.LEN, maybe?) to get the average.
  • Caveats
    • Beware of the case when .LEN is 0.
    • Can the FIFO use DINTs? Floats can accumulate error.
It's amazing how a PID will chase a noisy signal and actually make the PV even more noisy. Does the PID have a deadband? That might accomplish roughly the same thing unless the signal is just too noisy.

I'm referring to FIFO
 
A-B has a moving average (MAVE) instruction, but it's only in FBD.


You can make them work in ladder if you drop one on a FBD by creating an AOI and dropping one in. Then just make the input/output parameters Required. I do that all the time for converting SLCs that are full of SCPs. I have an AOI with a single SCL and call it SCP. Also use it for the PIDE.
 
Filtering analog inputs is tricky because it causes phase delay. If the total phase delay for the open loop system is 180 degrees or more the system will be unstable.
It is best to fix the problems. You can't control what you can't measure.

Look at this
https://www.airporttech.tc.faa.gov/NAPTF
This machine tests runways. To be more specific it tests runway construction techniques. I have driven that vehicle. Someone else on this forum was involved in supplying the big drives that move that system.

When I first arrived they were using Mitsubishi PLCs to control the hydraulic actuators. To make it work they had a 3 HZ filter to filter the analog data. To keep from oscillating they had to reduce the gains. The plots looked good but I convinced them that what they were controlling was the filter and they weren't seeing what was actually happening.I had them remove the input filters. There was so much noise that it was uncontrollable. We carefully ran a separate line from on set of analog transducers to the motion controller and it was clean. We did some tests and took some data but I convinced them that they had to rewire the whole system to get rid of the analog noise. That took 6 months but they did it so no filter was required. Then we could actually control the system. Now what they were seeing was real.
My point is that sometimes you must insist that the sources of noise be removed. Filtering inputs is not a good idea. It is better to filter the PID outputs.

BTW, the National Airport Pavement Test Facility is close to Atlantic city. I was there just after they opened up after hurricane sandy. I have before and after pictures. The NAPTF shares its findings about how to make runways last longer with the world.
 
Just another thought... what about running both pumps at the same speed based on the CV from the PID? If your process doesn't need quick response, you can set the tune very conservative so that the tune is acceptable for 1 or 2 pumps. Set the lag pump to turn on if the PID's CV is >90% or so for x seconds. Slowly ramp up the lag pump to ease the transition. If both pumps are running <40% or so, turn off the lag pump by very slowly ramping it down.

Should be pretty easy to code.
 
Last edited:
Just another thought... what about running both pumps at the same speed based on the CV from the PID?
This would be the simplest thing to do.
The problem is that if two pumps are running at different speeds then the pump that is running faster will create a pressure the slower pump may not be able to overcome.
The pressure goes up with the flow squared. That makes this application tricky.
 
You can make them work in ladder if you drop one on a FBD by creating an AOI and dropping one in. Then just make the input/output parameters Required. I do that all the time for converting SLCs that are full of SCPs. I have an AOI with a single SCL and call it SCP. Also use it for the PIDE.

FYI There is a ladder SCP under sample code on the Rockwell site.
 

Similar Topics

Good day everyone. if you have a logic for 3 pumps (lead/lag/off), would you please email it to me? I really appreciate it!
Replies
7
Views
174
Hello everyone. I am trying to figure out what the best way to control three pumps would be. I have searched the forums and cannot seem to find...
Replies
8
Views
1,998
Hello all, I have a triplex pump skid, which they want up to 2 pumps to operate and the other to be on standby. I am kind of racking my brain on...
Replies
7
Views
2,189
I am a novice at ladder logic programming but I needed a lead/lag function for two pumps that I am controlling. I bought a cheap FX1N(C) board...
Replies
14
Views
3,140
Hi, Im currently working on programming a Modicon TM221 PLC. I'm using Machine expect Basic/Somachine, I'm having a hard time programming lead...
Replies
3
Views
2,281
Back
Top Bottom