I am looking to see if it’s possible to “calculate” the amount of solution “X” or solution “Y” to correct the pH in the measured pH of a known volume of a liquid.
To even get in the ball park would be better than the dose,mix,check systems I’ve come across. I know the relationship is not linear, but is there a rule of thumb that people work too?
If you have empirical data, then you can plug it into excel and derive a formula. Then implement the formula to your control system. I have done something similar with defoamer systems. Works better than PID loops.
In Siemens PCS7’s APL library they have a Smith Predictor that works kind of okay with non-linear systems. Works best if the PH stays within a certain range and does not swing to wildly.
It’s been a minute, but if you know the ionic species involved, the volumes, etc., then yes there is a calculation, iirc, I did it once for a process simulation for operator training when I worked for Big Oil. Search for terms like acid, base, buffering. Usually the calculations you will find are for measuring pH of a sample in a lab, where you add a base or acid reached of known concentration until a known pH is reached, where that known pH triggers a visible event like a color change, and then the ratio of initial sample volume to reagent volume added and a calculation tells you the pH of the original sample.
So in this case, if you know the pH up front from a sensor measurement you can trust, then it should be possible to back calculate the reagent quantity required to get to a target pH.
@KenMoore would it be possible to show an example of how to use excel to derive a formula. This might get me some time. At present it’s using a very course lookup table. with ranges spanning a whole unit of pH.
@Brian I’m not sure if i can provide enough data. Here’s what i know. Treatment vessel is 5000 gal. The liquid in the vessel is circulated through a pH meter back for pH monitoring.
The acid is sulphuric acid 51% at pH 1, the Alkaline is sodium hydroxide solution 30% at pH 14.
ph of the water is generally in the range of 5 - 11. I would like the system to get to pH 7.5 +/- 1 on its first treatment. After which a minor correction could be made if required.
My first suggestion is to contact a chemical engineer and get those amounts.
Then you can compute the needed amounts easier.
Am I understanding this correctly:
This is a batch process that starts with 5kgal water in a tank at a pH in the range 5-11.
If that initial pH is above 7.5, you want to estimate the batch volume of pH=1 sulfuric acid to add to get the mix to pH 7.5.
If that initial pH is below 7.5, you want to estimate the batch volume of pH=14 NaOH base to add to get the mix to pH 7.5.
Is that correct?
I think we also need to know the species of the material in the tank, because that affects the degree of dissociation (K in link below, IIRC).
But to give you an idea of what the model will look like, see here: Untitled Document
It sounds like this process is neutralizing a batch of weak acid or weak base with a strong base or strong acid, respectively.
The M unit is a unit iof concentration as “moles of species per liter,” and pH is -log10[H+], where H+ is concentration of hydrogen ions in M units
Gallons or liters won’t matter as the calculation will give a ratio of volume of neutralizing agent to add to the volume of the batch.
Apologies for the delay in getting back. I set up some logging and have been getting some data, using @KenMoore solution i put some points into excel and generated this. It’s a slow process so getting the data has taken some time. Thanks for all the support.
@drbitboy Thanks for the links too.
I asked a chemical salesman that was at a customer shop I was at about this and he said they have the formula that would calculate exactly how much pH XX acid or caustic would be needed to change XX gallons of pH XX water to pH XX.
He said every seller of acid and caustic should have that available.
That is interesting, but fitting the acidic and the basic data in the same model does not make physical sense; that can be seen from the negative values near the target 7.5pH value. The acidic/add-base data give a reasonable-looking titration curve that will hit 0 around 7.5pH. Also, there needs to be more data on the base side when adding acid; perhaps as an experiment you could add half the estimated acid and let it settle, and repeat that several times to get more data. Related sidebar: you can add a synthetic data point of zero at a pH of 7.5 to improve the fit.
Also, a second-order polynomial (parabolic) fit, even if the acid and base curves are modeled separately, is not going to give a great fit to titration data. Again, there needs to more data on the basic/add-acid side.
All of that said, you have a model that gets you into the “ball park,” and as noted in Post #1, that is probably good enough, so I am only picking the fly poop out of the pepper.
Well done!
what are the units of the ordinate (Y-axis)? If gallons, that seems like a lot of base added to neutralize those pH values in a 5kgal tank, which mean buffering is going on. What is the acid in the tank?
