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.
For some of these programs the water to grist ratio plays an integral part in mash pH output and for others it does not. And all of them likely juggle Kolbach (I.E., the impact of mineralization upon downward pH shift) a bit differently by default as well. I can't thereby agree that everything else should present itself uniformly and accurately across all of these programs/spreadsheets.
 
I'm chuckling along to this thread. It's a simplification but you tend to get two types of people: process oriented people and results oriented people. Showing a step in a process to a results type is frustrating for them ... and you.
 
I'm chuckling along to this thread. It's a simplification but you tend to get two types of people: process oriented people and results oriented people. Showing a step in a process to a results type is frustrating for them ... and you.

Those types of people aren’t mutually exclusive. I like my process to make my results more predictable.
 
I think part of the issue is a fundamental misunderstanding about models and their purpose.

If you have the actual data that grain bill 'x' produces pH 'y', then you don't need a model.

However, when you don't have actual data, or are using grain 'z' with no knowledge of what will be the resulting pH, a model would be a great starting point.

Continuous improvement on modeling can be very effective at getting models to the point that the actual result will be the same (within an acceptable margin of error) as the modeled prediction.

A good example is looking at hurricane tracking predictions and how there are now literally dozens of different models to help accurately predict their path, where just a decade or so there was only a few 'spaghetti strands'. The years of accumulated data are fed back into the models to improve accuracy and precision.

I believe that's what the OP is attempting to tease out in this initial exercise...
 
Those types of people aren’t mutually exclusive. I like my process to make my results more predictable.

Wasn't meant as a criticism. No one is into process for the sake of it alone. The distinction has something to do with a patience for abstraction.

As soon I as read your first post I knew that some people are definitely not going to see the point.

Myself, I'm a process guy and applaud your efforts.

Cheers!
 
I think part of the issue is a fundamental misunderstanding about models and their purpose.

If you have the actual data that grain bill 'x' produces pH 'y', then you don't need a model.

However, when you don't have actual data, or are using grain 'z' with no knowledge of what will be the resulting pH, a model would be a great starting point.

Continuous improvement on modeling can be very effective at getting models to the point that the actual result will be the same (within an acceptable margin of error) as the modeled prediction.

A good example is looking at hurricane tracking predictions and how there are now literally dozens of different models to help accurately predict their path, where just a decade or so there was only a few 'spaghetti strands'. The years of accumulated data are fed back into the models to improve accuracy and precision.

I believe that's what the OP is attempting to tease out in this initial exercise...

Given the data presented make a reasonable statement that will advance the models of all programs.

I'm not following your hurricane example. Small amounts of real data were used to make models, as successively larger amounts of data rolled in the models were improved. How is that remotely like a thread with no real data present?
 
I'm chuckling along to this thread. It's a simplification but you tend to get two types of people: process oriented people and results oriented people. Showing a step in a process to a results type is frustrating for them ... and you.

Given the data presented make a reasonable statement that will advance the models of all programs.

The step is flawed without real data. Chuckle at that.
 
I'm chuckling along to this thread. It's a simplification but you tend to get two types of people: process oriented people and results oriented people. Showing a step in a process to a results type is frustrating for them ... and you.
I like to think of myself as beer-oriented.
 
Given the data presented make a reasonable statement that will advance the models of all programs.

I'm not following your hurricane example. Small amounts of real data were used to make models, as successively larger amounts of data rolled in the models were improved. How is that remotely like a thread with no real data present?

As an example, say Brewer’s Friend is the closest in reality to its estimation.

Knowing WHY Brewer’s Friend is the closest, i.e. how it models the malt system, is of interest.

I didn’t analyze them all to see if we could forego real measurement and none of them were created in a theoretical vacuum. We know that pH estimation is valid because we know mash chemistry and we see decent results.

The whole point of this post was to tease out the why and how of each and how they represent the malt system.

The next step would be mini mashed to flesh this out.
 
As an example, say Brewer’s Friend is the closest in reality to its estimation.

Knowing WHY Brewer’s Friend is the closest, i.e. how it models the malt system, is of interest.

I didn’t analyze them all to see if we could forego real measurement and none of them were created in a theoretical vacuum. We know that pH estimation is valid because we know mash chemistry and we see decent results.

The whole point of this post was to tease out the why and how of each and how they represent the malt system.

The next step would be mini mashed to flesh this out.

Good. Let's get that real data and see where it leads.
 
What do you use for pH estimation?

Best one can do with estimation tools is to get an estimate from 3 or 4 of 'em and try to guesstimate based on which ones "align" or trust your gut on which one is "correct" or take an average or some other nonsensical method.

There's too much variance in the answers and non-standardization of measurement time.
 
Best one can do with estimation tools is to get an estimate from 3 or 4 of 'em and try to guesstimate based on which ones "align" or trust your gut on which one is "correct" or take an average or some other nonsensical method.

There's too much variance in the answers and non-standardization of measurement time.

That doesn’t really answer my question.

So you don’t use them? Or you use 3-4? Or do you toss malt into hot water and say magic words? Are you a wizard? Or is it this OOP you speak of that does your bidding?

You’re suspect bro.

542EF62F-A27D-4F6D-9486-C8380A28AE1B.jpeg
 
An A+ for effort here, @RPIScotty , and I thank you for your work. However, I can sympathize with the "results" crowd. I also expected to see one of these calculators crowned the "winner". You did good work here, but I was expecting something slightly different when I clicked on it.
 
"To make good beer one simply neutralizes alkalinity if needed via boiling, HCl or H2SO4 and adds enough Ca/Mg salts to adjust mash pH down." -British

"To make good beer one simply neutralizes alkalinity if needed via boiling or Phosphoric/Lactic Acid and adds enough Ca/Mg salts and Sauer malt to adjust mash pH down." -German

"To make good beer one needs to get a water sample and send it to a lab for testing. After waiting two weeks for the results, he then inputs this analysis into 5 different pH estimation programs. When those don't align he spends the next 5 days on home brewing forums trying to figure out which is correct. After becoming frustated with that he spends the next 6 months learning the chemistry and writing his own pH estimation program, using the latest OOP langauge, and finally finds the "right" answer but because he's too good for tap water he buys himself a RO system. Finally he doesn't need to neutralize alkalinity and simply needs to add enough Ca/Mg salts to adjust pH down but alas his calculator doesn't properly handle the Kolbach mechanism, luckily his NEIPA doesn't need any of that stuff anyway." -American
 
An A+ for effort here, @RPIScotty , and I thank you for your work. However, I can sympathize with the "results" crowd. I also expected to see one of these calculators crowned the "winner". You did good work here, but I was expecting something slightly different when I clicked on it.

Appreciate it.

I did it because I thought others would find interest in it. I use my own sheet I made with A.J.’s materials but I still find it interesting to understand how the others work and get an idea of how my real world measurements stack up.
 
"To make good beer one simply neutralizes alkalinity if needed via boiling, HCl or H2SO4 and adds enough Ca/Mg salts to adjust mash pH down." -British

"To make good beer one simply neutralizes alkalinity if needed via boiling or Phosphoric/Lactic Acid and adds enough Ca/Mg salts and Sauer malt to adjust mash pH down." -German

"To make good beer one needs to get a water sample and send it to a lab for testing. After waiting two weeks for the results, he then inputs this analysis into 5 different pH estimation programs. When those don't align he spends the next 5 days on home brewing forums trying to figure out which is correct. After becoming frustated with that he spends the next 6 months learning the chemistry and writing his own pH estimation program, using the latest OOP langauge, and finally finds the "right" answer but because he's too good for tap water he buys himself a RO system. Finally he doesn't need to neutralize alkalinity and simply needs to add enough Ca/Mg salts to adjust pH down but alas his calculator doesn't properly handle the Kolbach mechanism, luckily his NEIPA doesn't need any of that stuff anyway." -American

I go the mostly the German route. Distilled water, minimal salts, Sauermalz. Easy peasy.
 
@RPIScotty, you sure attract a bit of arguments. [emoji6]

I see what you're going for I think it's interesting to dig in the weeds.

We can compare them and discuss which are more similar. By your standard of the best model is closest to reality, this comparison can't determine a best since there is no known value yet. This may be where people are getting hung up?

It's a good comparison and explanation to the many threads about differences in the models. If I'm reading and understanding correctly, it appears that the models are breaking out in groups. I don't know enough of the math, but makes me wonder if there's a way to marry the most accurate together without getting too complicated to use.
 
We can compare them and discuss which are more similar. By your standard of the best model is closest to reality, this comparison can't determine a best since there is no known value yet. This may be where people are getting hung up?

The problem is that I never said this was a contest, never said I was trying to determine a best program, etc.

I just wanted to tease out the differences, or try to at least, in HOW the programs estimate. That’s it. Knowing HOW a program estimates will help tell you WHY one gets closer to reality in use.

I guess I thought there would be more interest in this than there is. I’m not the smartest guy in the room but I’m also no dummy. I’m fully aware you can’t actually test the validity of a software by comparing them with made up numbers.
 
Those constrained to mashing 12.5 lbs. of grist within a 5 gallon Gott type cooler (Rubbermaid or Igloo) may need to mash at a water to grist ratio of 1.25 (Qts/Lbs.) in order to get a comfortable fit. Instead of trying 5 gallons as I originally suggested, you might want to try 3.9 gallons of mash water, which comes in at a water to grist ratio of 1.248. Lots of people are still mashing in 5 gallon Gott coolers. And a water to grist ratio target of 1.25 is quite typical for this size of mash tun. Going back to Papazian and even for early Palmer, there was pure magic in this grist ratio.
 
Last edited:
(using test grain bill DIpH values)
(using grain color derived DIpH values)
(using empirical based color values)

I'm updating my table today Vince. Which of the above represents the 2 scenarios I outlined, i.e. which is the number associated with the stock version of 2.01 and which one substitutes the DI pH values I suggested?
 
Those constrained to mashing 12.5 lbs. of grist within a 5 gallon Gott type cooler (Rubbermaid or Igloo) may need to mash at a water to grist ratio of 1.25 (Qts/Lbs.) in order to get a comfortable fit. Instead of trying 5 gallons as I originally suggested, you might want to try 3.9 gallons of mash water, which comes in at a water to grist ratio of 1.248. Lots of people are still mashing in 5 gallon Gott coolers. And a water to grist ratio target of 1.25 is quite typical for this size of mash tun. Going back to Papazian and even for early Palmer, there was pure magic in this grist ratio.

I'm working up a new table with the scenarios you suggested yesterday plus a Sauermalz scenario and the 3.9 gallons from today.
 
I'm updating my table today Vince. Which of the above represents the 2 scenarios I outlined, i.e. which is the number associated with the stock version of 2.01 and which one substitutes the DI pH values I suggested?
I double checked and corrected the values I reported yesterday I had a few typos. The list below I was able to check several times this morning and I feel it is correct. Please use these for my evaluations. There's just no rushing through this testing.

v2.01
pH test1.jpg


v1.24 *Assumes RO water with 0 Alkalinity
pH test1.24c.jpg
 
Last edited:
For some of these programs the water to grist ratio plays an integral part in mash pH output and for others it does not. And all of them likely juggle Kolbach (I.E., the impact of mineralization upon downward pH shift) a bit differently by default as well. I can't thereby agree that everything else should present itself uniformly and accurately across all of these programs/spreadsheets.
We should eliminate as many variables as possible for this first test round. I'm 100% in favor of omitting mineral and acid additions from our original test scenarios. Until I at least understand what we've accomplished with it.
 
Screwy, the numbers you worked up for your version 2.01 appear to me to be essentially identical to the numbers RPIScotty initially reported for your earlier version 1.24 of ezRecipe. When I ran MME for these recipes I saw a couple minor discrepancies at the 3rd decimal place vs. what RPIScotty reported for MME also. But who is capable of pinning down pH precision to 3 decimal points? I'm happy with his results.
 
I double checked and corrected the values I reported yesterday I had a few typos. The list below I was able to check several times this morning and I feel it is correct. Please use these for my evaluations. There's just no rushing through this testing.

View attachment 607492

What is the difference between color based and empirical based?
 
It's essentially the same as a color based and weighted by actual mash pH readings I've measured.

For the purposes of this discussion, i'll omit those, although they will likely be important moving forward.

I am going to run some more scenarios and i'll lay them out clearly so you can run them when you want. I'll report your values from the first 2 scenarios accurately.
 
Screwy, the numbers you worked up for your version 2.01 appear to me to be essentially identical to the numbers RPIScotty initially reported for your earlier version 1.24 of ezRecipe. When I ran MME for these recipes I saw a couple of minor discrepancies at the 3rd decimal place vs. what RPIScotty reported for MME also. But who is capable of pinning down pH precision to 3 decimal points? I'm happy with his results.
I'll compare them again against my updated numbers posted this morning. Maybe I confused the initial report @RPIScotty posted. Although I want to be sure v1.24 results weren't entered in this round and for my benefit it they are they should be reported separately from the v2.01 results.
 
For the purposes of this discussion, i'll omit those, although they will likely be important moving forward.

I am going to run some more scenarios and i'll lay them out clearly so you can run them when you want. I'll report your values from the first 2 scenarios accurately.
Perfect and thank you!
ezRecipe Test Results
 
Last edited:
I'll compare them again against my updated numbers posted this morning. Maybe I confused the initial report @RPIScotty posted. Although I want to be sure v1.24 results weren't entered in this round and for my benefit it they are they should be reported separately from the v2.01 results.

I'm going to rerun everything, including the first 2 scenarios, and comment the table better so it's clearer.
 
The problem is that I never said this was a contest, never said I was trying to determine a best program, etc.

I just wanted to tease out the differences, or try to at least, in HOW the programs estimate. That’s it. Knowing HOW a program estimates will help tell you WHY one gets closer to reality in use.

I guess I thought there would be more interest in this than there is. I’m not the smartest guy in the room but I’m also no dummy. I’m fully aware you can’t actually test the validity of a software by comparing them with made up numbers.

RDWHAHB. I wasn't intending to call you out or start a fight. No you never said you were trying to determine a 'best' model, just saying that some of peoples' hang up (justified or not) may be they are expecting a good, better, best results at the end of this.

I think this is a valid theoretical experiment. And will be helpful to tear them apart and see how they tick and compare the different model types. If/ when measurements are introduced, it will allow Silver, screwy, and you to see why your models behaved differently. Look forward to what you guys figure out. :mug:
 
Okey Dokey. Re-ran all scenarios plus some new ones:

Scenario 1
10 gal/37.85 l, 12.5 lb/5.67 kg
Grain Bill 1 = 100% 2L Euro Pilsner
Grain Bill 2 = 90% 2L Euro Pilsner, 5% 11L Crystal, 5% 350L Roasted
Grain Bill 3 = 80% 2L Euro Pilsner, 10% 56L Crystal, 10% 550L Roasted

Scenario 2
10 gal/37.85 l, 12.5 lb/5.67 kg
Grain Bill 1 = 100% 2L Euro Pilsner @ 5.80 pH
Grain Bill 2 = 90% 2L Euro Pilsner @ 5.80 pH, 5% 11L Crystal @ 5.19 pH, 5% 350L Roasted @ 4.69 pH
Grain Bill 3 = 80% 2L Euro Pilsner @ 5.80 pH, 10% 56L Crystal @ 4.83 pH, 10% 550L Roasted @ 4.48 pH

Scenario 3
Scenario 2 but with ~70 ppm Calcium

Scenario 4
Scenario 2 but with 5 gal/18.93 l

Scenario 5
Scenario 4 but with ~70 ppm Calcium

Scenario 6
Scenario 2 but with 3.9 gal/14.72 l

Scenario 7
Scenario 6 but with ~70 ppm Calcium

Scenario 8
Scenario 2 but with 2% Acid Strength and 2.25% of Grist Sauermalz

Capture.JPG
 
Last edited:
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?
 

Latest posts

Back
Top