pH Control

kdcui

Lifetime Supporting Member
Join Date
Dec 2007
Location
USA
Posts
386
I realize that pH and PIDs don't always mix as the process is very non-linear, however a system I am working on calls for using PID blocks.

The system is different than the usual case in that the wastewater coming into the tank is:

A)Either acid or base (it varies)
B)Varying flow rate, or sometimes intermittantly.

The design spec calls for TWO PID loops:
Each controlling the speed of a pump (0-100% or 0-32000 counts via VFD) which feeds either acid or base into the tank, depending on pH (an "acid" supply pump and a "base" supply pump). Feeds are NaOH and H2SO4 (causic soda and sulfuric acid).

At the moment both PID loops have a setpoint of 7 (though in practice the pH will likely hover in an acceptable range of 6-8).

When pH is 0-6, the PID loop controlling the acid flow is turned off (no incoming acid). Likewise with the base supply pump at 8-14.

I was trying to play around with the configuration, simulating inputs. The PID loops seem to work properly with just proportional action. However, when integral time is introduced it seems that the two PIDs fight eachother.

Also, when the pH reaches the setpoint, the output of the PIDs become static, or change very slowly, while idealy the output should be 0, since the wastewater has been neutralized and no futher addition of acid or base is desired(ignoring buffer effects, obviously this is somewhat simplified/ideal behavior since we are assuming the wastewater has completely neutralized).

Somehow I feel there is an easier way to do this, or that I am missing something, and I feel rather stupid for not being able to figure this out. The problem is most pH control examples I have come across in the past are usually consist of just the waste water feed and 1 neutralization feed (either acid or base, not both).

Any suggestions or opinion? I have not really had much "real world" experience with pH control outside of textbook / classroom examples...

Thanks for the input.

EDIT:
Someone with more experience than I will be finalizing the control on the pH loops, however I'd like to hear the proper (if any) way to deal with this, if nothing else than for my own knowledge / future reference.
 
Last edited:
"However, when integral time is introduced it seems that the two PIDs fight eachother."

DO you mean, it the PV fluctuate 5.9 to 8.1PH and caused both pumps to turn on/off?

You can always hardcode it such that if the PH is below 7.5 don't turn BASE pump on and if the PH is above 6.5 don't turn the pump on
 
Seems to me you made no mention of what your proportionally controlled item is (pump speed or ??).

IF the pumps are going to run at a set speed and set volumetric output then I do not see why you need PID. Turn acid pump on at pH > 8 and off at 7.9 or whatever. Turn base pump on at pH < 6 and off at 6.1.

IF you are going to pump more acid or base as pH falls or rises then you may need PID.
IF this is the case
What about ph < 5.9
THEN turn on PID for base pump
pH > 5.95 turn it off
Speed of pump inversely proportional to pH value

Same thinking for high pH.
This way only one PID can be active
Dan Bentler
 
PH adjustment is extremely non-linear depending on what is in the water. It can make PID very tough.

But I think you are having an overshooting problem. You are pumping acid in to a pH of 7 then wanting it to stop, but chances are you are pumping the caustic into the top of the tank and the PH probe is in the submersed somewhere near the middle or the bottom of the tank. By the time the pH probe reads 7, the water at the top where the caustic is being injected may be a pH of 10 or so. So it settles at 9...then your pumping acid trying to bring it back down.

Then you mention New Hampshire, is this outside? Caustic becomes a pain to meter consistently around 55 F

Key things to think about. How big is your tank? How long does it take for your mixer to turn the tank over? If your mixer takes an hours to turn the tank over, you'll have to forcast what your pH will be in an hour instead of using the current pH reading. What type of true flow control to you have over your acid and caustic?

Just out of curiousity, why the VFD?
 
Last edited:
I did a 2 tank 5k gallon batch system several years ago. Much easier than continuous. One big thing I learned is with process wastewater there could be some other compounds that will cause the amount of titrant to change. I found that my batch times varied greatly so I asked one of our chemists. Another thing you need to keep in mind is resonance time with a continuous flow system. If your flow through is too fast the reaction will not be completed. With a batch you just wait until it lines out. How big is this tank? Where are you measuring the pH? In the tank, infeed, outfeed? If you haven't seen a titration curve you need to see one to see what you are up against. Omega has a nice tutorial on pH.

They have been bugging me to automate one of the waste feed basins, ~20k gallons, this one won't be fun for sure.
 
Good points John. I took it to be a batch since it had varying incoming streams and varying flow. But let's clarify, is it a batch or a continuous flow?
 
The others that have replied have made some strong points on the problems on PH control the experience I've had on a similar system although e were only dealing with acid injection was that both caustic and acid tended to create varying levels of PH in a larger tank in my case 18,000 gallons
The worse part is no matter how many pumps or impellers we added we could never optain consistency throughout the tank. This is most likely why they want the two PH controls as an effort to prevent overshooting and supplying a more consistent ph level throughout the tank. We still have that problem with our system so I will be curious as to how well the PID controls work after you get it working. Experiments I've done as an operator on that system showed that reducing the PH pump to a lower rate of injection caused less variation within the tank might be a possibility with your system.

John you have me curious on the Titration charts you mentioned I may question you later on it after I check out Omega
 
Last edited:
Thanks for the responses.

First off nothing has been built yet, this is purely in software testing at the moment. I realize that this may make it tought to manually simulate the changes in the pH (though our dummy AI sensor) The tank will/does contain a mixer.

Yes, I have the base/acid PID turned off at 8-14 / 0-6.

The proportionally controlled item is the supplying pump speed (output of our controller).

The systems that is supplying the caustic and the acids are through variable speed pumps, so that is why we are sending out a 0-100% output (to the pumps, no we didn't design the delivery system), and the flow rate of the acid or base will vary.

The neutralization tanks (there are a series of them) are emptied (or transfered to the next tank) when the level gets too high, so I am treating this as a batch process.

With the chages I made so that the PIDs turn on/off (so they aren't acting simultaneously), they seem to work with just using proportional gain, but I thought that adding the integral / derivative action would allow the process to be more tightly controlled. However, as I mentioned before, if I add this the pumps do not seem to shut off once the pH reaches the setpoint.

Thanks again for the help.
 
kdcui said:
Thanks for the responses.

First off nothing has been built yet, this is purely in software testing at the moment. I realize that this may make it tought to manually simulate the changes in the pH (though our dummy AI sensor) The tank will/does contain a mixer.

Yes, I have the base/acid PID turned off at 8-14 / 0-6.

The proportionally controlled item is the supplying pump speed (output of our controller).

The systems that is supplying the caustic and the acids are through variable speed pumps, so that is why we are sending out a 0-100% output (to the pumps, no we didn't design the delivery system), and the flow rate of the acid or base will vary.

The neutralization tanks (there are a series of them) are emptied (or transfered to the next tank) when the level gets too high, so I am treating this as a batch process.

With the chages I made so that the PIDs turn on/off (so they aren't acting simultaneously), they seem to work with just using proportional gain, but I thought that adding the integral / derivative action would allow the process to be more tightly controlled. However, as I mentioned before, if I add this the pumps do not seem to shut off once the pH reaches the setpoint.

Thanks again for the help.
My system was a total manual system that the various line operators would try to run. We automated it and reduced from 2-4 hrs. per shift of operator time to zero. They only look at it if there is an alarm.
With 2 tanks 5k gal each, one is filling while the other is either waiting or neutralizing. When a filling tank gets to 85% we go into a 5 minute wait for stabilization then it does a lookup to compare pH for the dosing reagent and time. The reagent pumps are diaphram air driven with 50% caustic 1" line and 97% sulphuric 1/2" line. Every 5 minutes it will compare and either dose or go to pumpout if within 6-8 pH. There is a 3/4" recycle line and a prop type mixer. The dosing time is also adjusted by tank level. They can force a tank to neutralize cycle if over 40%, the mixer level. Without the mixer it almost doesn't work. It takes about 2-3 minutes for the pH to stabilize after the reagent dose. The times were done empirically for all pH ranges.
Whatever you do try to keep it simple. We didn't do PID because of the existing pumps. They wanted to save some dollars but I think I saved some hair pulling by doing this way.
 
While I haven't needed to do pH control before just based on the little I know batch would be the way to go if you can.

However, back to the original control question. If I were you I wouldn't use two PID controllers. I would use one and let it go bipolar. Assuming you have the PID set up for SP-PV a positive CV would indicate you need to run the base pump. Run the output of your PID directly to the speed setpoint of the base pump drive, limiting the setpoint minimum to zero. Negate the PID ouptut and send that to the acid pump drive, again limiting the setpoint minimum to zero. If you do this the appropriate drive will run automatically based on what a single PID output requires. If the response between the two pumps is significantly different you may need to switch gains depending on the polarity of the PID output.

Keith
 
kamenges said:
While I haven't needed to do pH control before just based on the little I know batch would be the way to go if you can.

However, back to the original control question. If I were you I wouldn't use two PID controllers. I would use one and let it go bipolar. Assuming you have the PID set up for SP-PV a positive CV would indicate you need to run the base pump. Run the output of your PID directly to the speed setpoint of the base pump drive, limiting the setpoint minimum to zero. Negate the PID ouptut and send that to the acid pump drive, again limiting the setpoint minimum to zero. If you do this the appropriate drive will run automatically based on what a single PID output requires. If the response between the two pumps is significantly different you may need to switch gains depending on the polarity of the PID output.

Keith
Actually this is sort of how some of the dedicated pH controllers work, like Honeywell using solenoid valves. Either relay or PID one way acid the other caustic. It also depends on the reagent AND the pump response. If you have too strong of acid, my case, then control is hard to do without overshoot. Think about 1 second of strong acid flow into 4k gallons to change the pH from 8.5 to 5 or so. That's what I had to work with. They don't want to spend money because the waste stream doesn't make money directly. The reagent is from the process makeup acid storage tank so concentration is fixed. pH control has a lot of variables you would not even think about that make it a real challenge.
 
John do you perchance have a graph showing the Titration curve for 97%
sulphuric acid? As stated before our waste water process requires us to reduce an average PH of 8.9 down to 4.2 and the greater consistency we can maintain at 4.2 increases the ability of our floculant agent (the company that supplies the chemical will not reveal whats in it). This is a costly issue for us as when the City does water tests if we have a TSS level above 300 we end up with an extremely hefty surcharge for 3 months
 
mordred said:
John do you perchance have a graph showing the Titration curve for 97%
sulphuric acid? As stated before our waste water process requires us to reduce an average PH of 8.9 down to 4.2 and the greater consistency we can maintain at 4.2 increases the ability of our floculant agent (the company that supplies the chemical will not reveal whats in it). This is a costly issue for us as when the City does water tests if we have a TSS level above 300 we end up with an extremely hefty surcharge for 3 months
Sorry, I don't have the curve.
I know what you mean about the chemical supplier. Whatever costs YOU the most is best for them. I wonder if an acid supplier could provide that for you.
We are rural and discharge into a river. So we have the EPA to comply with. No surcharge just fines and possible shutdown for incentives.
 
no problem it was a hope mostly to assist the WWT dept as I no longer work that section of the plant except to repair their electronics. I did find some graphs so I have a better understanding of some of the variables this thread was useful in that
 

Similar Topics

does anyone have an install or know if/where i can download it for the following "ABB PS501 Control Builder Plus V2.3 " the software was a free...
Replies
2
Views
62
I am not sure why this is requested, but it was asked. Currently I have one PLC , with one output to a relay, turning on a field equipment (just...
Replies
7
Views
202
I have been requested to test this proportioning valve for PLC control of flow/pressure. Dwyer Series SVP Proportioning Solenoid Valve The flow...
Replies
10
Views
408
Hello Dear users, I am writing about a problem that has been bothering me for a few days, i.e. I am trying to establish remote access to the Allen...
Replies
0
Views
84
I have Allen Bradley plcs, I have had Circuit breakers and other automation equipment in the past. There's no solid buyers local. How much do you...
Replies
2
Views
192
Back
Top Bottom