"detunning" PID

A

Thread Starter

Alan Brause

I'm investigating the use of PID to control three
wells that supply water to a small municipality's
elevated water tank.

Allowing PID to run normally causes many start/stops on the lead pump as PID maintains the setpoint.

Which parameters, I'm currently using only P&I, could be adjusted to allow a wider range before the pumps are cycled?

Is this possible?
Is it feasible?

Thanks,

Alan Brause
Wideband Technologies
(520) 881-1737
http://www.widebandtech.com
 
E

Enrique Fernandez Araujo

Dear Alan,

If you are using a quasi continuous controller (a continuous controller and a switching stage), you can increase the cycle time or the On/Off hysteresis value, any of them will allow you a wider range before the pumps are cycled.
 
PID, or PI, only P is incorrect for the job, unless some adequation is included. You must have more than one pump, is it ? During the low load period, only ON/OFF based on HIGH/LOW level should be enough. During normal load period, only P should maintain within reasonable gap. The means to control could be either: varying the pump(s) speed or using a control valve [usually a butterfly valve provides good control]. At least remove the I mode.




>
> Is this possible?
> Is it feasible?
>
> Thanks,
>
> Alan Brause
> Wideband Technologies
> (520) 881-1737
> http://www.widebandtech.com
>
 
G

Garrett Socling

Hmm...what type of PID controller are you using?
West makes a decent little single loop controller that it sells to Honeywell (UDC1000 I think), Danaher (Danaher T506) and Partlow (1160). What you would do to this is just forget about PID control. If I was worried about the controller constantly knocking about my motor, I would just give the controller a wide proportional band around my setpoint. It would kick on below the setpoint, and pump up above the setpoint. This is ok if you have a tank (process) that can handle the level being above and below the setpoint. The PB you can determine by how long you want the pump to run at a stretch. Right now it sounds like you are trying to maintain the process value right at the setpoint. This is pretty rough on an on/off output like a well pump. Maybe you can find a proportional output. On our auger feed controllers, we have an 1160 controlling the rate at which sawdust is fed into a boiler. Below the setpoint, it kicks up the motor speed, above it, it slows it down.
Just a couple ideas...
Good luck!
 
S

Stevens, Rodney (Minerals, Lucas Heigts)

Alan

You dont say how you convert an analog output (PID control) to a digital control signal (ON/OFF). The output from the PID must be sensed by something else that decides when to turn the pump on or off. What you realy need is deadband control, that switches the pump ON at some low level and switches it OFF at some higher level (tank full). Why use PID.

Rod

Rodney Stevens
CSIRO Minerals
http://minerals.csiro.au
Ph. 61 2 97106701
Fax 61 2 97106789

Elan SS s/e 45/7616
http://sites.netscape.net/rodjohnstevens
 
D
It could be as simple as a control deadband. Many control products include such a setting. The company I work for provides a "Smart PID" algorithm for advanced level controls. It employs control deadbands on integration terms.
Additionally, it has the concept of high and low "water marks" (nothing to do with actual water level) to keep the algorithm from over controlling the loop.

Although, with "bang-bang" control such as yours, PID might be a little overkill. You can simply turn on and off pumps based on the raw measurement
value (the level). Such as:

Level < 40% - Turn on a pump
Level < 30% - Turn on another pump
Level < 25% - Verify all pumps on
Level < 20% - Notify operator


Level > 60% - Turn off a pump
Level > 70% - Turn off another pump
Level > 75% - Verify all pumps off
Level > 80% - Notify operator

Also, do yourself a favor and have a totalized runtime indiction on the pump. When you turn on a pump, take the one with the lowest runtime out of
service. When you turn off a pump, take the one with the highest runtime in service.

I hate to over simplify it, but this will work if it is not required to maintain a tight level for pressure. If you have flow control, it would be
a different story.

Dustin Beebe
dsb<@NOSPAM>prosysinc.com

ProSys, Inc.
Process Systems Consultants
http://www.prosysinc.com
 
K

Kimberly Wang

Alan,

There is a book called "PID Controllers: Theory, Design, and Tuning" by K. Astrom. It talked how to choose PID controller, what process uses what
controller.

It is a very good book to start.

Kimberly
 
R

Robert Dusza

Alan,

Why are you using PID for this control? Do you have elevation feed back from the water tank? We have similar system here and use a simple start and stop based on elevation of the tank. This way the equipment will not cycle unnecessarily. This also allows for better power usage as only management. The wells will only come on when needed based on the demand. Let me know if I can provide you with more information.

Bob
 
J

Johan Bengtsson

As others have stated, you will probably not need the PID at all (and it is probably not even desired, really)

If, however, you actually do need the PID you are actually saying one of the following:

- "I need the PID because I do need to control the level quite tight" - in this case you can't have a long time between starts and stops

- "I need the PID because I do not want to make any hasty average changes to the flow" - the flow will of course change as the pump starts/stops but the average flow can be slow changing. However
I don't think this is the case so I don't explain it further.

I can't figure out any other good reason to really use a PID. Ok, if you need the PID - put a VFD on at least one pump to prevent frequent starts/stops

If you don't put in a VFD, you have to make some kind of PWM scheme to turn on/off pumps as needed. If you let this cycle around your pumps the on/off time for each pump will be longer without loosing accuracy in controlled level.

Conclusion: Don't use PID in this case if you don't really have to of unless you put in a VFD on at least one pump.


/Johan Bengtsson

----------------------------------------
P&L, Innovation in training
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: joh[email protected]
Internet: http://www.pol.se/
----------------------------------------
 
A
Rod and Dustin,

I am taking the output range from the PID algorithm and setting it to 3 as there are 3 pumps in the system. When the PID output is greater than .5 and less than 1.5 pump1 is ON/OFF, when the output is greater than 1.5 and less than 2.5 pump2 is ON/OFF, etc.

We currently use "bang bang" control as described in Dustin's earlier email reply. But what I see as advantageous in PID is it's predictive
nature. Rather then let a town's water supply get down to 25% before all the pumps come on, (fire fighting, for example) PID can sense a rapid fall in level and respond more quickly with all pumps.

I'm a software developer and have little contact with the water system operators and just thought the idea might have marketability. I remember
reading about a town in Indiana last winter that nearly burned to the ground because their water system couldn't keep up with the demand of fire
fighting. What if they had started with a full tank instead of one at 25% capacity?

Regards,

Alan Brause
 
K
PID is not really useful. What you require is a "multi-step" controller (multi step bang-bang). one such app for these controllers is the control of multi cylinder reciprocating refrigeration compressor. These had separate relays for each setpoint. In case you have not chosen your level sensor, then even simpler would be 3 independent level switches( say float type), at different heights in the tanks. Each in turn controlling one pump independently. So, at different points different pumps kick in. The second method will also allow you to add redundancy for reliability quite easily. You can also add pump cycling (so that diff pumps are assigned to the lowest level in diff weeks) to even out pump use.
If you want further info of the refrigeration controllers write to me.
[email protected]
 
E

Enrique Fernandez Araujo

Dear Alan,

If you are using a quasi continuous controller (a continuous controller and a switching stage), you can increase the cycle time or the On/Off
hysteresis value, any of them will allow you a wider range before the pumps are cycled.
 
D
I'm no expert, but in my experience a PID loop is typically used to control some type of analog output, as opposed to discrete outputs. I don't think you'll ever get a satisfactory response using analog feedback to control discrete devices.

If you really want to use a PID control scheme, I would suggest you put the pumps on VFDs to obtain a smooth, linear control output. Say, for the sake of argument, your PID loop had an output range of 0 to 9999. You could write some logic to scale this output so that 0-3333 operated pump #1 from 0-100%, then an output of 3334-6666 would add in pump #2 from 0-100% (with #1 still at 100%) and so forth for the last output range of 6667-9999. In this way you could treat the system of three pumps as one single controllable pump. I'm just theorizing here. Their may be some practical reasons this might not work=2E One immediate disadvantage is that you're not spreading the pumping duty evenly - one pump is
always going to be working. You also add significant cost with three VFDs.

Another way to go would be to avoid the PID, and write your own logic to determine rate of change of level. Using limit instructions you can define
different rate thresholds and start your pumps appropriately.

Cheers,
Dean Reimer
BPB Westroc Inc.
 
D
Alan,

The town needs to assess what water demand they might need (to fight fires, etc.). This needs to be evaluated even with a loss of power to the pumps. A minimum water level needs to be maintained. The capacity of the tank should meet those requirements plus a safety factor. In addition to that level, you need to determine how often you want your pumps to cycle. From the average consumption, you can calculate the required level of the tank. Setup pumps turn on before reaching the lower level matching the minimum requirement plus a safety factor. Adjust the upper limits according "full level", etc, etc... I think you get the point.

I could see adding logic to turn on pumps based on a large negative rate of change in the level (excess demand), but you will have difficultly balancing between maintaining a constantly full level and minimizing pump cycling.

You could also provide the fire station the capability to have the tank maintain a high level during emergency situations. This would be as simple as adjusting up the lower levels when a switch was flipped. If you sell the idea, remember who gave it to you.

Dustin
 
B

Blunier, Mark

> I am taking the output range from the PID algorithm and
> setting it to 3 as
> there are 3 pumps in the system. When the PID output is
> greater than .5 and
> less than 1.5 pump1 is ON/OFF, when the output is greater
> than 1.5 and less than
> 2.5 pump2 is ON/OFF, etc.

With this method, you will have lots of cycling of the pumps. Not knowing your rates, I'll make some up for an example.
The tank set point is 80%, and each pump can pump 1000 gpm of water. If the the demand is 1000 gpm, the tank level is 75%, and 2 pumps are on, the tank level won't change, but the PID output will go up until it reaches 2.5. Pump 3 comes on,
the tank level rises to 80%, with the PID continuing to increase. Tank level rises to 85, PID decreasing, Tank rises to 90%, PID has finally dropped to 2.5, 3rd pump stops, Tank level stays at 90%. PID continues to decrease, eventually going to 1.5. 2nd pump goes off. Tank level drops, PID eventually going below
set point, and eventually turning on the 2nd pump goes back on. So you would have 2, 3, 2, 1, then 2 pumps running, even though the level would stay even with 2 pumps running.

I suggest you drop the PID and use an algorithm such as:

If level goes Above 80% set went above 80 flag
If level goes Above 80% set went above 75 flag
If level goes Above 80% set went above 70 flag
If level goes below 80% set went below 80 flag
if level goes below 85% set went below 85 flag
if level goes below 90% set went below 90 flag
if level goes below 75% and above 80 flag is set, start another pump, clear
the above 80 flag
if level goes below 70% and above 75 flag is set, start another pump, clear the above 75 flag
if level goes below 65% and above 70 flag is set, start another pump, clear the above 70 flag
if level goes above 85 and below 80 flag is set, stop another pump, clear the below 80 flag
if level goes above 90 and below 85 flag is set, stop another pump, clear the below 85 flag
if level goes above 95 and below 90 flag is set, stop another pump, clear the below 90 flag

Mark
Any opinions expressed in this message are not necessarily those of the
company.
 
A
Dustin,

Your point is well taken. I guess I am trying to apply software solutions to what is essentially a governmental decision. I think what will probably
come of all this is we will give the various options to the council and let them choose a solution.

We will continue to "tweak PID" (or just P or PI as has been suggested) to see if a compromise can be reached between maintaining full level and
keeping pump cycling to a minimum.

Thank you to all who have addressed this issue. I now have a much better understanding of the dynamics of PID and how they may (or may not)
apply to my problem.

Regards,

Alan Brause
 
J

Johan Bengtsson

The problem is that you loose most of the wanted PID:s predictive behaviour in this case, at least you are not gaining anything in predicatbility above soem of the other schemes.

That unless you actually use the output from the PID in an analog way, either PWM (pulde width modulation) ie turn on pumps at regular interval and turn off them after a delay depending on the output (at 25% the delay should be 25% of the on to on time, at 75% it should be 75% and so on), this will probably turn on/off pumps unnecesarily, but the idea could be used in a half-way between what you suggest and this "standard" PWM:

you have 3 pumps, that means 33% equals one pump at full speed, 67% two pumps and 100% all three.

Now do like this:
First part is to determine the number of pumps to have turned on at any given moment in the following way:

above 33%: 1 pump + 1 PWM
above 67%: 2 pumps + 1 PWM

This is how that could be desribed in C:

int pumps(double PID_out,int pumpsAvail,double deltaT,double PWM_intervall)
{
static double PWM_time=0;
static int PWM_on=1;
int nPumps=0;

//first: count number of pumps to have turned on completely
while (PID_out>100.0/pumpsAvail)
{
PID_out-=100.0/pumpsAvail;
nPumps++;
}

//second: do PWM based on remaining part of PID_out
//but scale it to 0-100 again first
PID_out*=pumpsAvail;

PWM_time+=100*deltaT/PWM_intervall;
if (PWM_time>100)
{
PWM_time-=100;
PWM_on=1;
}
if (PWM_time>PID_out)
PWM_on=0;

nPumps+=PWM_on;

return nPumps;
}

Ok, first of all: I have not really debugged this, but it should give you the necesary ideas, second: the use of static variables might not suit you as well as other implewmentation related issues, but again, I wote it to describe the idea.


The second part:
No you have the number of pumps you want to have on at any given time the next part is to decide which pumps to turn on and off, that one could probably best be based on the ideas of Dustin Beebe, perhaps best combined with some limit to how long time it was since that particular pump was last turned on or off.


If you decide to go for a VFD, you could have one attached to only one of the pumps, in that case you can follow the ideas above to decide how many of the other pumps should be turned on and use the remainder (before the PWM part above) to feed the VFD. If you go for this remember two things:
1. Depending on how it is set up the VFD controlled pump would need some certain speed in order to just keep 0 flow, below that the flow will probably go backwards if nothing actually prevents it 2. You need some kind of hysteresis in order to not turn on/off pumps unnecesary around 33% and 67%, the fact in point 1 can be
used for this (ie allow backwards flow for a while).
I have seen this implemented (two pumps) and it worked quite well.


/Johan Bengtsson

----------------------------------------
P&L, Innovation in training
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Internet: http://www.pol.se/
----------------------------------------
 
Top