PID control with a very, very long sample delay

svankley

Member
Join Date
Oct 2004
Location
Tampa, FL
Posts
11
Hi all,

I have a chlorine contact chamber (ccc) at a water plant that I have been trying to control the level of chlorine in for a few months now with an SLC 5/05. The flow is typically 600-1200 gpm.

Albeit, the customers setup in definately not optimal, but it's what I have to work with. The problem is that the injection point is at the influent end of the CCC and the CL2 instrument is at the effluent end - with a lag time of about 30-40 minutes.

I had the customer add an analyzer 10 feet after the injection point (only spot avail) to get a quicker reading of the CL2 level, but there is still a lagtime of about 8-10 minutes including the fact that the analyzer (CL17) only reports back sample data every 3 minutes.

I eventually went to a stepper type function in the PLC to control the CL2 pumps since I couldn't regulate the PID loop because of the extreme lag time. Even with the stepper function (look-up table) type code, I CANNOT stop the pumps from hunting. I even added 4 ranges (0-500gpm/501-750gpm/751-1000gpm/1001-3000gpm) for flow with different setting & timer values for function. Nothing seems to be working!!

I've successfully set up extreme lag time heating controls in the steel industry, but this one almost has me ready to go postal!
Has anyone found a solution that has worked with the type of extreme lag time with chemical pump control.

Thanks for any assistance with this,
Steve

p.s. I did read the post at: http://www.plctalk.net/qanda/showthread.php?t=19563&highlight=pump+control which is somewhat similar to my challenge. The flow through the sample line is very good back to the analyzer. There is just an inherent long lag time I'm trying to overcome.
 
Last edited:
Chlorine dosage is usually based on a feedforward loop, and paced on dosage as a function of effluent flow rate. On some systems the dosage constant is modified by using a feedback signal on the measured chlorine residual, increasing or decreasing the factor if the residual drifts.

Don't plan on changing the relationship. The municipality is regulated on effluent chlorine residual and effluent fecal coliform count. You need residence time in the chlorine contact tank to kill micro-organisms, so the feed point has to be at the beginning of the tank. The long response time is inherrent in the process.

Include time delays and tolerances in your control logic.

This control loop is always a back breaker. US-Filter Stranco has a pretty good solution based on feed forward, residual, and ORP (Oxidation-Reduction Potential) but its patented.
 
Tom,

Thanks for the reply. I'm familiar with the facts you stipulate in your post, so I guess I'm trying to understand what your actual suggestion is, as to how to control a CL2 injection system with such a long hystresis besides a proprietory solution?

Steve
 
You need to have a better understanding of the process. When you add chlorine to water it oxidizes organics and inorganics, the amount of chlorine needed to oxidize these is called chlorine demand. The reason the analyzer is at the end of the CCC is because you need to keep a residual, this is the amount chlorine in the water after the demand. Demand in a water treatment plant (generally) does not very that greatly. Most treatment plants have a set feed rate. The demand in some treatment plants changes so little that they only need to change their feed rate with the changing seasons.

The process variable that changes the most is flow. I would start out with a flow paced set-up. This might be all they need.

If the flow paced doesn’t afford enough control you could try what I call a varied flow pace. Basically it’s a flow paced set-up where the controller will evaluate if the setpoint is correct. So let’s say the operator decides he wants to add 25% CL2 if the flow is at 100%. You have the controller evaluate the setpoint maybe every 30 mins. If there isn’t enough CL2 then the controller would increase the setpoint, too much CL2 then the controller would decrease the setpoint.

Tom’s suggestion is to use a feedfoward PID loop for control. Basically you use a PID to control the CL2 demand, but then feed the flow error into the output of the loop. What happens here is that say your PID loop output is at 25% and flow is at 50%. Now your flow jumps up to 75%, this increase in flow is a known error, so you feed this known error into the PID loop output which changes the output of the loop to maybe 40%.

Most water treatment plants I have done have been straight flow paced. I have done what I call varied flow paced on a few. I have done feedforward on waste water treatment plants because the demand at these plants can change a great deal.

In the end make sure you talk to the customer/operators to get a better understanding of the process. There are different ways to dose depending on if you are creating Free CL2 or Total CL2. Most important thing to keep in your mind, improperly disinfected drinking water can kill people.
 
Tark's ideas and mine coincide exactly.

To add a little detail, the primary loop is F = K x Q. F is the feed rate, gpm or gph or whatever. Q is the fow rate of water, mgd or gpm or whatever. K is a constant that determines the feed rate, and should be operator adjustable. An initial starting point would be a value that feeds chlorine at a rate slightly over the residual they want to cary into the distribution system, say 10%. The actual value of K would include unit conversions and so on.

Then, you use a feedback loop, so that if the residual is higher or lower than required you change the feed slightly. F = K x Q x C where C is a correction factor proportional to the error. (Or the output of a PID loop if you insist.) You use a time delay between re-calculations of C so that the change in feed rate can hit the residual sensor.
 
Hi,

I have a similar setup, its a Reverse Osmosis system and I have the following using Tom's analogy;

F = Chlorine feed rate (output to cl2 dosing pump)
Q = Flow rate of seawater
K = User defined rate of cl2 per Q

I also have a chlorine monitor which is positioned after the cl2 injection point, basket filter and multi-media filters.

I'm doing this in a Siemens PLC. The CONT_C PID block has a DISV variable which looks kind of like a feed forward, I've attached the input descriptions from help but it probably is irrelevant to my question.

I've done a few PIDs for pressure, temperature but never used feed forward before, my question is this; what do I put into the DISV? My thinking is as follows;

PV_IN := Chlorine Monitor (instrument reading in cl2)
SP_INT := K (ratio of x l/h cl2 for y l/h seawater - in cl2)
DISV := C ( K - PV_IN ? - in cl2)

Is that what I want my feed-forward/DISV to be?
 
Last edited:
I've had a few situations as you describe where PID would not work for me with long contact time. Most water plants I've setup used flow to base their chlorine needed. Their water supply rarly changes so it's stays pretty constant. I also gave them a "multiplier" to adjust the dosage with water supply changes (eg. temp/season). This has worked well for me in the past.

Only takes some time to setup beginning dosage.
 

Similar Topics

I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
628
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
975
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
430
I am setting up control for Hypochlorite dosing. The easy part is the dosing calculation for flow pacing but I would also like to setup trimming...
Replies
8
Views
957
Hey guys! I'm a newbie in the control area, so I'm gonna drop some thoughts here... We want to control the opening of big silos (about 1900...
Replies
6
Views
1,498
Back
Top Bottom