An Analytical Comparison of pH Estimation Algorithms

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Just a suggestion, but would it be possible to put some stats to the right of the grain bill, maybe three cells with min/max/delta?

Sure. I have not come up with a compelling way to compare the data yet, but when i do i'll flesh it out.

A few notes:

1.) It's pretty obvious that for the most part (and this is really fleshed out with a lot of the reported results of brewday pH), that these sheets handle pale grists pretty well if the inputted data is good, i.e. DI pH, color, etc.

2.) Grain Bill 3 results should give the general passerby the pretty strong impression that each program treats Crystal and Roasted (Roasted in particular) malts very differently.

3.) Each program seams to be handling Ca (and by extension Mg) mineralization differently.
 
RPIScotty, would it be fair to say that (despite their differences in output) perhaps as many as 4 (or possibly more) of these software packages are essentially built upon quite similar (if not the same) engine(s)?

My initial guess would be that an application of statistical analysis upon all of them would be likely to group the ~4 similar to same engine packages more closely together than the others which are not built upon the same underlying math model.
 
Last edited:
For Scenario 8 is the saurmaltz strength 3% and its 2.25% of the grist?

Scenario 3: (~70 ppm calcium)
Grain Bill 1 - 5.72 pH
Grain Bill 2 - 5.56 pH
Grain Bill 3 - 5.41 pH

Scenario 4: (5 gallons strike water)
Grain Bill 1 - 5.80 pH
Grain Bill 2 - 5.72 pH
Grain Bill 3 - 5.57 pH

Scenario 5: (~70 ppm calcium with 5 gallons strike water)
Grain Bill 1 - 5.69 pH
Grain Bill 2 - 5.61 pH
Grain Bill 3 - 5.47 pH

Scenario 6: (3.9 gallons strike water)
Grain Bill 1 - 5.80 pH
Grain Bill 2 - 5.72 pH
Grain Bill 3 - 5.57 pH

Scenario 7: (~70 ppm calcium with 3.9 gallons strike water)
Grain Bill 1 - 5.71 pH
Grain Bill 2 - 5.62 pH
Grain Bill 3 - 5.48 pH

Scenario 8: (add 2.25% of 2% strength saurmaltz)
Grain Bill 1 - 5.70 pH
Grain Bill 2 - 5.62 pH
Grain Bill 3 - 5.59 pH
 
Last edited:
RPIScotty, would it be fair to say that (despite their differences in output) perhaps as many as 4 (or possibly more) of these software packages are essentially built upon quite similar (if not the same) engine(s)?

My initial guess would be that an application of statistical analysis upon all of them would be likely to group the ~4 similar to same engine packages more closely together than the others which are not built upon the same underlying math model.

Well, we should separate out Scenario 1 because it represents the "off-the-shelf" condition of each sheet. In that scenario, you see relative parity between everyone except me for Grain Bill 1, and that is really down to my European Pilsner DI pH setting being higher in stock form. For Grain Bill 2, we see relative parity between everyone except MME, and I believe that is down to how your Log Base 10 method allocates the DI pH distribution. For Grain Bill 3, you see EZ water go a bit high and MME go a bit low. For EZ Water, I think this is explained by it only using color based calcs for Crystal malts, which means it doesn't seem to account fully for Roasted malt acidity. For MME, it seems the same comment about the DI pH distribution is in effect here as well.

For Scenario 2, we again see relative parity in Grain Bill 1. For Grain Bill 2, it becomes pretty obvious which programs are bypassing malt acidity in the calculations, namely EZ Water, BF, and ezRecipe. BW and MME are grouped together here, and MpH and my 2 variations as well, but it's clear that BW, MME, MpH, and my sheets are accounting for both DI pH and malt acidity. The same holds true for Grain Bill 3.

So for Scenario 1 and Scenario 2, we see that all the sheets perform similarly with a pale grist. It's obvious that BW and MME are handling Roasted malts in a way that makes them perform similarly. EZW, BF, and ezR are performing similarly because when they use inputs for DI pH, they bypass acidity calcs altogether. MpH and my sheets perform similarly because they account for DI pH and acidity.

Things get pretty squirrely after that. My Brewing Engine, BF, and ezRecipe are the only programs where pH didn't vary with volume change, although MME and MpH didn't change drastically.

Every sheet seems to be handling mineralization quite differently. Sauermalz performance was pretty even across the board and if I spent a little more time making 100% sure that the inputs were equal in Scenario 8, i'm pretty sure it would be better.
 
Last edited:
I tried to even everyone out using 2% Acid and 2.25% of the grist. I think I was pretty successful.
Ok, How did everyone enter 2.25% of the grist for the saurmaltz and keep the other grains proportions at 90%-5%-5% and 80%-10%-10%?

12.25 lbs Pilsner and 0.28 lbs saurmaltz? for 97.8%-2.23%?
 
Last edited:
Ok, How did everyone enter 2.25% of the grist for the saurmaltz and keep the other grains proportions at 90%-5%-5% and 80%-10%-10%?

12.25 lbs Pilsner and 0.28 lbs saurmaltz? for 97.8%-2.23%?

Where I could, I subtracted 2.25% from the Pilsner %.

This scenario was a bit tough because each sheet has it's own way of integrating Sauermalz.
 
Last edited:
Ok, my results for scenarios 3 through 8 are in now. This has been a real mental workout entering all these little nuances and I'm pretty sure I got them entered correctly.
Scenarios 3 through 8

I'm not sure why the report doesn't show results for all 3 of the grain bills for scenario 8 though?
 
Last edited:
Ok, my results for scenarios 3 through 8 are in now. This has been a real mental workout entering all these little nuances and I'm pretty sure I got them entered correctly.
Scenarios 3 through 8

I'm not sure why the report doesn't show results for all 3 of the grain bills though?

I didn't run the Sauermalz calcs for Grain Bill 2 and 3.
 
Not sure if this is useful for what you guys are doing, but I plugged in a simple recipe that I have 3 years (~200 brews) of calibrated mash pH measurements and compared them to a few of the water calculators. This brand has had the same water adjustments and grain bill for years, with a very stable water source. The target brewhouse mash pH is 5.40 and the achieved average has been 5.418. Here is what the individual water calculators came up with, including the lactic acid addition:

Bru'N Water - Estimated pH 5.34
MME 5.2 - Estimated pH 5.4 (using 2.5x amount of lactic acid that is actually used)
EZCalc - Estimated pH 5.52
BrewFriend - Estimated pH 5.60
MpH - Estimated pH 5.54

If I get the time I'll do a comparison for a dark beer.
 
Not sure if this is useful for what you guys are doing, but I plugged in a simple recipe that I have 3 years (~200 brews) of calibrated mash pH measurements and compared them to a few of the water calculators. This brand has had the same water adjustments and grain bill for years, with a very stable water source. The target brewhouse mash pH is 5.40 and the achieved average has been 5.418. Here is what the individual water calculators came up with, including the lactic acid addition:

Bru'N Water - Estimated pH 5.34
MME 5.2 - Estimated pH 5.4 (using 2.5x amount of lactic acid that is actually used)
EZCalc - Estimated pH 5.52
BrewFriend - Estimated pH 5.60
MpH - Estimated pH 5.54

If I get the time I'll do a comparison for a dark beer.

I'm confused, as if MME had estimated a mash at pH 5.4, it would suggest the addition of zero Lactic acid (for the case where target mash pH is set to 5.4).

The most common mistake that most people make with MME when they are relatively new to it is to fail to set the base malt drop down selector cell in the extreme lower right corner to the proper selection for the specific type of base malt being used in their recipe. Did you handle this correctly?

It is quite clear from RPIScotty's multiplicity of comparisons that not a single case presented itself across any of his 3 diverse scenarios whereby MME would require 2.5X the lactic acid of the others. For the most severe case of straight Pilsner malt (meaning for the case most likely to require a lactic acid addition) it was in the very same ballpark as for all of the others, and for the two cases of crystal and dark roasted malts added it was lower in its mash predictions than the others (which inherently implies no lactic acid requirement vs. many of the others still calling for it).
 
Last edited:
I'm confused, as if MME had estimated a mash at pH 5.4, it would suggest the addition of zero Lactic acid (for the case where target mash pH is set to 5.4).

The most common mistake that most people make with MME when they are relatively new to it is to fail to set the base malt drop down selector cell in the extreme lower right corner to the proper selection for the specific type of base malt being used in their recipe. Did you handle this correctly?

Yes, malt was set to appropriate type. 2 row and munich 10L. The target mash pH was set to 5.4 and the pre-acid base pH was 5.68. Estimated lactic addition to achieve 5.4 is significantly more than normally used (18,110 ml lactic estimated v. 8,060 ml actual). Yes, very big brew size. I'll see if I can find a recipe that is shareable.
 
Yes, malt was set to appropriate type. 2 row and munich 10L. The target mash pH was set to 5.4 and the pre-acid base pH was 5.68. Estimated lactic addition to achieve 5.4 is significantly more than normally used (18,110 ml lactic estimated v. 8,060 ml actual). Yes, very big brew size. I'll see if I can find a recipe that is shareable.

Standard 2-Row Brewers type malt in MME can brew straight up at 100% of grist weight without any lactic acid addition, as it comes in at about 5.57 DIpH by default. 10L Munich comes in at 5.50 DIpH by default. With mineralization considered (or without) I would find it rather difficult to get a result of pH 5.68 for any sort of blend of these two relatively low DIpH malts.

What you really need to do to resolve your issue is do a test mash of your specific lot of base malt, and use your DIpH findings for it as your guide, either for setting the base malt DIpH via the drop down cell, or for directly overriding the default DIpH with the one you discover for your specific lot of malt. With 6 default selections for base malt DIpH, one of them will likely give you the results you are actually seeing for lactic acid requirement to hit pH 5.4. MME is highly conformable and configurable vs. the others. No need to leave it at settings which do not conform to your measured mash pH reality.
 
Last edited:
Curious thread.

FWIW (and admittedly it's not much), the new version of MpH (not yet released) predicts pH values of 5.683 and 5.474 for scenarios 2 and 3, respectively.

We know how to model everything else uniformly and accurately.
Or do we? I imagine that the various calculators will significantly diverge when the RA of the water changes from a value of zero.

Cheers!

EDIT: I see that you have done some of this. Missed it before.
 
Last edited:
Or do we? I imagine that the various calculators will significantly diverge when the RA of the water changes from a value of zero.

Cheers!

I’m of the opinion that the major point of divergence in the sheets are malt modeling and how they treat Ca and Mg mineralization.

If there is divergence in how alkalinity in source water is treated, then that’s a major problem for those not capturing the proper modeling.

I should run some cases with different source water. Namely Grain Bill 1 in Scenario 1 and 2 so as to not introduce any other variables such as roast and crystal malts and mineralization.
 
Last edited:
My recently brewed robust Stout definitely weighed in at a carefully measured mash pH that was somewhat lower than Mash Made Easy 5.20 predicts for it. Mash Made Easy 5.20 predicts a "pre-adjustment (with baking soda)" mash pH of 5.21 for my specific Stout recipe, but my actual pH measurements indicated 5.18 pH at 30 minutes and 5.22 pH at 60 minutes into the mash respectively "post" the addition of 2.3 grams of baking soda to the 9.25 gallons of mineralized (to 50.6 ppm Ca++) "no-sparge" RO mash water.

Had I not added the 2.3 grams of baking soda up front to the mash water, the mash pH would thereby likely have weighed in at closer to around 5.1 (vs. 5.21 predicted by MME 5.20).
 
Last edited:
My recently brewed robust Stout definitely weighed in at a carefully measured mash pH that was somewhat lower than Mash Made Easy 5.20 predicts for it. Mash Made Easy 5.20 predicts a "pre-adjustment (with baking soda)" mash pH of 5.21 for my specific Stout recipe, but my actual pH measurements indicated 5.18 pH at 30 minutes and 5.22 pH at 60 minutes into the mash respectively "post" the addition of 2.3 grams of baking soda to the 9.25 gallons of mineralized (to 50.6 ppm Ca++) "no-sparge" RO mash water.

Had I not added the 2.3 grams of baking soda up front to the mash water, the mash pH would thereby likely have weighed in at closer to around 5.1 (vs. 5.21 predicted by MME 5.20).

What was the grain bill? What would the estimation have been with a weighted sum of the DI pHs as opposed to your log based distribution?
 
What was the grain bill? What would the estimation have been with a weighted sum of the DI pHs as opposed to your log based distribution?

Grain bill is as seen below.
Oatmeal Stout.png
 
If there is divergence in how alkalinity in source water is treated, then that’s a major problem for those not capturing the proper modeling.

I should run some cases with different source water. Namely Grain Bill 1 in Scenario 1 and 2 so as to not introduce any other variables such as roast and crystal malts and mineralization.
I think next round we should run fewer different scenarios than we have. Focusing first on a lighter color beer and then a darker color beer. And then devoting more time to dissecting any pH prediction discrepancies.
 
FWIW (and admittedly it's not much), the new version of MpH (not yet released) predicts pH values of 5.683 and 5.474 for scenarios 2 and 3, respectively.

Or do we? I imagine that the various calculators will significantly diverge when the RA of the water changes from a value of zero.
@dmr I know we're all looking forward to your next MpH version. I think we should include your results in our testing too. And our next round of test scenarios should include RA estimations too.

First Round pH Testing Summary Results
 
Grain bill is as seen below.
@Silver_Is_Money IMHO posting results for a 9-grain recipe is distracting from the original intent of our testing. We've all experienced matches of predicted and actual mash pH values for certain recipes. I'd like to see us focus on one or two basic recipes and then digging into the results to get a better understanding of how the predictions were made.
 
@Silver_Is_Money IMHO posting results for a 9-grain recipe is distracting from the original intent of our testing. We've all experienced matches of predicted and actual mash pH values for certain recipes. I'd like to see us focus on one or two basic recipes and then digging into the results to get a better understanding of how the predictions were made

Its what I brewed, and it is a real world example with carefully measured grist, minerals, water, and mash pH. I was extra careful to be precise at every step so my mash pH readings would be reliable.
 
Its what I brewed, and it is a real world example with carefully measured grist, minerals, water, and mash pH. I was extra careful to be precise at every step so my mash pH readings would be reliable.

If you calculate the sum of weighted DI pH contributions, what does that come out to?

I’m not near my computer or else I’d crunch it myself.
 
5.6346 pH as a straight weighted sum of the DIpH's pre any mineralization impact.

And 5.5258 pH as a straight weighted sum post mineralization impact.

Grist weight = 15.08 lbs.
 
Last edited:
My recently brewed robust Stout definitely weighed in at a carefully measured mash pH that was somewhat lower than Mash Made Easy 5.20 predicts for it. Mash Made Easy 5.20 predicts a "pre-adjustment (with baking soda)" mash pH of 5.21 for my specific Stout recipe, but my actual pH measurements indicated 5.18 pH at 30 minutes and 5.22 pH at 60 minutes into the mash respectively "post" the addition of 2.3 grams of baking soda to the 9.25 gallons of mineralized (to 50.6 ppm Ca++) "no-sparge" RO mash water.

Had I not added the 2.3 grams of baking soda up front to the mash water, the mash pH would thereby likely have weighed in at closer to around 5.1 (vs. 5.21 predicted by MME 5.20).

So even MME, which in the data input tests we did seemed to be 1 of 2 (MME and BW) programs that consider roasted and crystal malts to be very acidic, underestimated how much they would pull the pH down in this batch.

Interesting. That is an incredibly busy grain bill though so I think we'd have trouble troubleshooting it.

In other news, I revisisted our thread which prompted A.J.s "troubleshooter" back in August and pulled the code i should need to use Newton-Raphson to ditch the solver!
 
So even MME, which in the data input tests we did seemed to be 1 of 2 (MME and BW) programs that consider roasted and crystal malts to be very acidic, underestimated how much they would pull the pH down in this batch.

Interesting. That is an incredibly busy grain bill though so I think we'd have trouble troubleshooting it.

In other news, I revisisted our thread which prompted A.J.s "troubleshooter" back in August and pulled the code i should need to use Newton-Raphson to ditch the solver!

I’m finding hard to ditch the solver. Not from a code standpoint but from a preference standpoint. I’ll definitely be keeping the solver macro buttons in my personal file.

I’m hoping to get a solverless version out this week.
 
I want to bring up an important point.

It should be made clear that in order to effectively capture the totality of a grain's acid/base characteristics you need both it's DI pH and either it's titration characteristics or a proxy, typically given by an approximation based on it's color.

For those implementing sheets that bypass the latter, you need to think about and rectify it's absence, i.e. you can't just jettison the color proxy and hope to get a realistic handle on how a malt will perform from JUST it's DI pH.
 
If a grist consisting of 90% measured and confirmed DIpH 5.67 base malt and 10% measured and confirmed DIpH 4.69 roasted malt is mashed in DI water and weighs in consistently at about 5.57 mash pH I will believe a strictly linear weighted DIpH model to be true, but if it comes in at right close to 5.40 pH I will believe a strictly logarithmic weighted model to be true. And if measured mash pH falls consistently directly inbetween 5.57 and 5.40 pH (call it a rounded 5.49 pH) then a 50/50 mixture of the two methods would seem to be overall more correct. It seems as if a bare bones simplistic strictly weighted DIpH model can be made to fairly decently and yet highly empirically mirror any other and far more complex and less empirical modeling method simply by blending together "some" unknown percentage of straight linear weighted and straight logarithmic weighted DIpH results. This would result in an amazingly uncomplex software method for predicting mash pH. A model within the reach of most of us plebes, such that do it yourself mash pH spreadsheets would be within the reach of the masses of many common folk.

What do all of the currently under evaluation software packages predict for this totally simple DI water mash test case, presuming for further consistency a rather common Qts./Lbs. unit water to grist ratio of 2.00 (meaning 2.00 Qts. of mash water for every 1 Lb. of grain)?
 
If a grist consisting of 90% measured and confirmed DIpH 5.67 base malt and 10% measured and confirmed DIpH 4.69 roasted malt is mashed in DI water and weighs in consistently at about 5.57 mash pH I will believe a strictly linear weighted DIpH model to be true, but if it comes in at right close to 5.40 pH I will believe a strictly logarithmic weighted model to be true. And if measured mash pH falls consistently directly inbetween 5.57 and 5.40 pH (call it a rounded 5.49 pH) then a 50/50 mixture of the two methods would seem to be overall more correct. It seems as if a bare bones simplistic strictly weighted DIpH model can be made to fairly decently and yet highly empirically mirror any other and far more complex and less empirical modeling method simply by blending together "some" unknown percentage of straight linear weighted and straight logarithmic weighted DIpH results. This would result in an amazingly uncomplex software method for predicting mash pH. A model within the reach of most of us plebes, such that do it yourself mash pH spreadsheets would be within the reach of the masses of many common folk.

What do all of the currently under evaluation software packages predict for this totally simple DI water mash test case, presuming for further consistency a rather common Qts./Lbs. unit water to grist ratio of 2.00 (meaning 2.00 Qts. of mash water for every 1 Lb. of grain)?
I’m not 100% sure what you are getting at.

I’m just saying that a number of available programs seem to bypass color in the calculation of the acidity proxy and just use the grains DI pH. That’s not accurate.

For the case you stated above, I used American 2-Row (DI pH = 5.50 with 5.67 override, a1 = -46.2, a2 = 0, a3 = 0) and Light Roast [300L-425L] (DI pH = 4.69, a1 = -67.6, a2 = -38.1, a3 = 6.861).

The result with zero alkalinity water and nothing else inputted is 5.532.
 
Last edited:
Something to consider when brewing dark beers is that Black Malt (also called Black Patent) often exhibits appreciably more acidity than does Black Barley. Brulosophy made 2 identical beers, sans that one had 1 Lb. of Black Barley and one had 1 Lb. of Black Patent in the grist. The colors of these grains was nominally identical at 500L. The Black Barley batch mashed at 5.34 pH and the Black Patent batch mashed at 5.20 pH. All else being equal (as it purportedly was) this reveals a dramatic difference in acidity levels between Black Barley and Black Malt. Just something to consider when mash pH results for dark recipes come rolling in. Unmalted deep roasted barley and malted deep roasted barley are likely not at all similar as to acidity. In MME I may not be currently allowing for sufficient acidity difference between these two grains, albeit that I do separate them and allow for somewhat more acidity for black malt vs. black barley.

Edit: Briess provided DIpH data which I have on hand agrees with the above. Unmalted deep roasted barley hardly moves in DIpH as its roasting level progresses from 300L to 500-550L, whereas malted deep roasted barley shows far more DIpH disparity upon additional roasting which is indicative of much greater acidity.
 
Last edited:
Back
Top