Micrologix 1400 PID issue

Russff

Member
Join Date
Mar 2006
Location
PA
Posts
21
I've got a control loop that I can't quite figure out how to accomplish.

Three variable speed wells feed water to a tank, the tank supplies water to the plant. Plant water usage can vary and they need the tank to remain full at all times. The lead well runs almost continuously and is usually enough to keep the tank full. Each well has its own PID and the tank level to maintain is the SP (so each PID uses the same SP and PV). The well will vary speed to keep the tank at SP. If the tank level drops, the second and third wells come on (the wells alternate every so often to keep an even runtime). The wells are different size, so they have different pumping rates, so each PID has its own P&I and min/max out settings (to limit each well's max flow rate to their permit amounts, which is around 1,000 GPM each). The above is all the easy part. The problem is that the combined pumping flow rate cannot exceed a max value (2,000 GPM). It normally doesn't matter how much the wells are pumping unless the combined flow rate exceeds a setting, which is all the piping can handle. Two wells at full speed can exceed 2,000 GPM, three wells definitely will. Each well has its own flowmeter, which I add to get the combined flow. I cannot figure out how to manipulate the PID's to limit the speed in order to limit the combined flow when it exceeds the max flow setting. I used a negative feed forward value to slow down the highest flowing well (checking every few seconds for which well has the highest flow rate), but the I term overrides the FF and all PID CV's end up at 100% before long. I can't put the PID's into manual to clamp the speed because then they won't slow down as the tank level approaches SP, and I can't overshoot the level SP or the tank will shoot out water. Each well flow rate/speed varies with ground water conditions and tank level, so it isn't consistent. Does anyone have any ideas?
 
Last edited:
Instead of writing to the FF (bias) write to the MAXO of each PID.

When going back up ( increasing) use limit instructions to maintain your min/max settings.
 
Last edited:
What I would probably do is use another PID with tank level as the PV and a "total flow rate required" as the CV. Then divide up that flow rate between the wells as required. The well pumps then run to a flow rate PID rather than a tank level PID.

You can then limit the "total flow rate required" value to 2000 gpm, and provided your well pump flow PIDs are well tuned you should not exceed this.

If the total flow rate required value exceeds the capacity of one well you can simply divide it by 2 (or using some other ratio to account for different well capacity), and start your second pump.
 
I think Saffa's on to something by using a single PID. If you know the max flow rate of each pump, divide the total summed flow rate by a single PID's .CV. For example, for the .CV at 0-40% = Pump1 (0-100%), .CV at 41-80% = Pump2 (0-100%), and .CV at 81-100% = Pump3 (0-100%).

But you say all three pumps will definitely exceed 2000 gpm.. Then is either your system's design flawed or your pump's flow rates not consistent?
 
Flow isn't important as long as it doesn't exceed the max the piping can handle. The piping was designed for two pumps, the third well was added to make sure they had the necessary capacity to keep the tank full for the max the plant may draw. The well flow will vary with well level and the head pressure in the tank, so I can't say a certain well speed will always give the same flow. It also varies if two or three wells are running, so the bottom line is well flow is unpredictable. I can't control on well flow since it may cause the tank level to drop or overflow, so the pid pv must be level. Level is the critical factor, I just can't allow the combined well flow to exceed the max. If level drops enough to call on the third well (or maybe even with just two pumps if they run at a high enough speed), flow will come into play if it exceeds the max allowed, at which point level becomes secondary, but even then I can't overflow the tank so level still is in play.

Mickeys suggestion of limiting maxo seems to have some merit, that's the only way I can see how to limit flow while still allowing the pid to control the level. I just can't think how to manipulate maxo, at some point it has to be released back to normal, but I don't want to keep see sawing maxo. Hmmmm.
 
Last edited:
Does your logic say that once pump 1 is full speed engage pump 2? After pump 2 is full speed engage pump 3? If you do this then you can just limit pump 3 maxo once pump 1 and 2 are at full speed. Or if this is not the case then you could look out your output from each PID and scale those values according to the pump output add them and clamp the maxo when it reaches max capacity.
 
I would use a 4th PID set point (2000 gpm) is total flow. Output is written to the MAXO of the 3 PID's.
The 4th PID is overflow protection.

If you cut back on flow the level is going to be affected (lowered), you can't have it both ways.
 
The pumps come on as needed based on level. When the tank level drops below some setpoints, it calls on the 2nd and 3rd pumps to keep the tank full. Normally, the flow is not important, as long as it doesn't exceed the capacity of the piping (2,000 GPM). Only then do I need to throttle back the pump speed.
I'll give the 4th PID a try and see how that goes. Yes, when the flow is cutback, the tank won't fill as fast, but if the pumps burst the piping, they'll have bigger problems, so when flow exceeds 2,000 GPM, the pumps will have to be throttled to keep the flow down, but they still need to respond to level. If the tank drops that fast to call on two or three pumps, it is likely only a temporary spike in water usage. Two or three pumps may be running at that point, but the level can refill only up to the max of 2,000 GPM, once the level starts to rise (the water usage spike passes) the pumps again need to slow down so as not to overfill the tank. So it's only during those (unknown and unpredictable) high demand periods that multiple pumps will run, and it's only when multiple pumps run that the max flow needs to be considered.
 
I setup a 4th PID for flow. I used the CV to subtract from my 3 pump PID's MAXO's so that if the flow exceeds 2,000 GPM, the rising CV will cause the pump PID MAXO's to decrease and the pumps slow down. I set it up for testing and it appears to work (took some tweaking of the P & I terms to prevent too large or too quick changes). When this gets to the site, I'll test it under real conditions.

Thanks all for your suggestions.
 

Similar Topics

HI - I have a tough process and have been struggling with controlling my PV using a Micrologix 1400. I uploaded the file, changed .rss to .txt...
Replies
9
Views
1,970
I have 2 no.s Micrologix PLCs used for PID control variable output to 7 no.s VFD drives.2 no.s are used as i have no spare analog cards for analog...
Replies
3
Views
1,520
in micrologix 1400 we have to enter duty cycle to get particular duty cycle.But i want my duty cycle changes according to values coming from pid...
Replies
2
Views
2,619
I am having trouble with PID instruction. I have done this many times with a SLC500 but not with the Micrologix 1400. Basically I am confused on...
Replies
7
Views
3,141
First time using a PID instruction on a micrologix 1400 Platform, my issue is putting the PID instruction in manual and writing to the CV for...
Replies
1
Views
4,447
Back
Top Bottom