Categories

More Posts

Toward a Better Refractometer Correlation

Last month I posted a brief summary of the troubles I was having with the de facto standard refractometer correlation for final gravity. Specifically, I found that it under-estimates FGs by, on average, about five “points”. More interesting, or at least more useful, I also found that the degree of the discrepancy is fairly well correlated with the degree of fermentation of the beer. By applying a logarithmic curvefit to the data, I was able to reduce the mean deviation of my (admittedly limited) dataset from 5.1 to 0.1 points, and the standard deviation from 2.2 to 1.2 points. This is comparable to the precision of a consumer-grade hydrometer, and I was pretty satisfied with that, but it wasn’t a particularly elegant solution.

What was really needed was a real, independent three-dimensional surface fit. Fortunately, I found a truly excellent site that did the heavy lifting for me: ZunZun.com. This is one of those transformative “cloud apps” that journalists keep telling us are so revolutionary, and you really ought to check it out. Anyway, equipped with data from twelve FG readings and a little free time today, I decided to see if I could get a reasonable equation together. The data I’ve collected so far is, I think, pretty representative: OGs range from 1.036 to 1.106, FGs from 1.007 to 1.022, and ADFs from 73% to 91%. It turns out there is actually a very good (R2 ≅ 0.98) fit, using a full cubic expansion:

FG = 1.0929176 – 0.0956887RIi + 0.160699RIf + 0.0103753RIi² – 0.00449931RIf² + 0.000585957RIi³ – 0.00911434RIf³ – 0.0165360RIiRIf – 0.00538394RIi²RIf + 0.0128988RIiRIf²

Where RIi and RIf are the initial and final refractive indices, respectively, in wort-corrected degrees Brix. The concern, of course, is that mapping 12 data points to 10 coefficients will result in substantial over-fitting. For the time being, I’m sticking with a simplified cubic form:

FG = 1.0111958 – 0.00813003RIi + 0.0144032RIf + 0.000523555RIi² – 0.00166862RIf² – 0.0000125754RIi³ + 0.0000812663RIf³

The mean deviation is, essentially, zero (10-15), with a maximum of 2.1 points, and the standard deviation is reduced to 0.98 points – still not as good as a quality hydrometer, but quite possibly acceptable to most brewers. In fact, you can reduce the polynomial quite a bit and retain accuracy; I’m reporting the simplified cubic because it can be quickly inserted into existing software by changing the coefficients. A basic linear fit has an SD of 1.1 points, with a maximum deviation of 2.0, and the added advantage of being able to be (quickly) worked out on paper:

FG = 1.00358522 – 0.00123861*RIi + 0.00380186*RIf

It’s worth noting that even this highly simplified equation is superior to the default correlation, although again, this is based on a set of only twelve points. Caveat calculator.

Finally, we come to what I thought was a pretty neat visualization of all this razzmatazz. I plotted the old-school (red), logarithmically corrected (yellow), new cubic fit (green), and simplified linear (blue) correlations against the expected FG values. A perfect fit would result in all the data points lying on the dotted line. As you can see, anything other than the stock correlation provides reasonably good results.

My FG/Attenuation/ABV spreadsheet has been updated to utilize the new correlation, and add the new visuals. If you find it useful and/or accurate, please drop me a line. I’d love to hear more brewers’ experiences with using refractometers to estimate FGs.
 
 
Update: 06 Aug 2010

I made a minor adjustment to the spreadsheet, changing the default wort correction factor to 1.02, which is what my own refractometer data support. The current version is now 2.1.
 
 
Update: 07 Apr 2011

I’ve tweaked the correlation and posted some results from other brewers, as well as an updated spreadsheet: Refractometer FG Results
 
 
Spreadsheet download:
fg_calculator_v2.1.ods | fg_calculator_v2.1.xls

36 comments to Toward a Better Refractometer Correlation

  • Thank you for mentioning my web site, zunzun.com. Please let me know if you have any suggestions or questions about the site.

    James

  • SPAM

    I told you, that’s orange, not red.

  • […] (44) Popular PostsBuild a Better StirplateToward a Better Refractometer CorrelationLOL @ MazurAeration and Yeast StartersYeast Pitching Rate ResultsTwo-Stage Starter CalculationsYeast […]

  • Thank you very much for this useful post.

  • Jay

    Sean, thank you very much for this. Very useful! Just to make sure, the formula you have in v2.1 is the cubic form, not the more complex logarithmically corrected, right?

    • Right, v2 switched to the simplified cubic. All v2.1 did was change the wort correction factor from 1.04 to 1.02, which is a more reasonable average based on my recent measurements.

  • Christopher

    Wow, an R2 =0.98; that’s impressive. I can’t help feeling that the main component that throws off FG calculations is alcohol content. Some recipes, while having the same OG, have different proportions of fermentable and unfermentable sugars. A highly fermentable beer will have more alcohol and less residual complex sugars, while unfermentable beers will have less alcohol and more residual complex sugars. I do not see how one regression can account for this ‘fermentability effect”. Basically, the ratio of unfermented sugar to alcohol could provide a division point for multiple regressions to more accurately estimate FG. While unfermentable sugar content is hard to analyze, you could essentially group”‘like maltiness beers” and form regressions based on a relative unfermentable sugar to alcohol ratio. Do you feel it would be more accurate to have one regression for malty beers (scotch, ESB, porters, strong ales and barley wines) while having another for cleaner finishing beers (belgian ales, pales, lagers, etc.)?

    • Christopher,

      The key assumption that has to be made in order to develop any correlation based on gravity readings is that there is a linear relationship between attenuation and alcohol content. This is one of those lies everyone agrees to believe. The reality, of course, is that not all sugars in the wort are consumed during fermentation. The yeast will use some of the available resources during aerobic respiration and reproduction (the lag phase). This will introduce some minor variations from one brewery to another, but it’s the price you have to pay in order to estimate alcohol content based on gravity readings. Once those lower-order effects are set aside, though, the basic principle of the problem makes me think it should be soluble. Setting aside still more minor variations, beer is a three-phase solution: water, alcohols, and carbohydrates. Given two specific gravities (or refractive indices) it should be possible to implicitly solve for the third variable, and therefore convert back and forth between the two units.

      Based on the results so far – 60 data points and counting – it seems that this is the case, and that a regression both more accurate and more precise than the one in common use is possible. I’ll be publishing the full details soon.

      Sean

  • Steve

    Hi Sean. I just listened to the June 10, 2010 edition of Basic Brewing Radio podcast that you participated in. I’m glad you’re working on improving refractometer reading conversions for FG. Thanks for doing this.

    Does the spreadsheet linked to in this post contain the current best-practice conversion for the refractometer reading correction? If using it with home brewing, do you think it’s accurate enough to skip the hydrometer reading?

    Thanks again,
    Steve

    • Steve,

      The spreadsheet posted here (v2.1) is the most up-to-date version so far. As far as whether it’s accurate enough for you to be able to skip the hydrometer readings, that’s going to depend on what kind of precision you want/need. Based on the data I’ve been receiving so far, about 60% of readings come out within one “gravity point” (±0.001 SG).

      On the other hand, if you’re willing to continue taking readings with both, we may be able to improve the accuracy even further.

      Cheers,
      Sean

  • Brett Hall

    I was just looking around for some conversions when trying to figure out my new refractometer, and stumbled upon this site. This looks awesome, and exactly what I’m looking for.

    In particular, I think I’ve found a potential error with how the morebeer and valleyvintner spreadsheets that seem to give a couple points error if you you enter nothing in the temperature column (cause you have an ATC) vs entering “60”. I notice that in your formulas, even for the “old” FG, you don’t use the temperature coefficients at all, leading me to think I was correct in this assumption.

    Thoughts?

    • Brett,

      You’re exactly right that there’s an error in the MoreBeer sheet. (I haven’t checked ValleyVintner’s.) The equation they use has roots at 12.2, 57.6, and 713.3°F. Leaving the field blank (zero) adds 0.00131 SG to the estimated FG. Given that the correlation they’re using seems to under-estimate FGs for most brewers, that offset probably helps in most cases, and could be why it’s never been caught. If you have the time, I’d suggest emailing B3 about it – the more feedback, the better.

      The ATC mechanisms used to correct consumer-grade refractometer readings are designed for vintners (i.e. pure sucrose solutions). This means that to get an accurate value for beer when using an ATC refractometer you would have to back-calculate the true refractive index from the reported value, then apply a different ATC correction. Rather than doing that, I’m hoping that we can maintain reasonable accuracy by using the built-in corrections and developing an equation that takes it into account. A brewer using a refractometer without ATC would still have to correct the readings before using the spreadsheet. Since most handheld refractometer seem to have ATC built in, that seemed like the best compromise.

      Sean

  • Brent

    Judging from my experiments, it seems to me that the higher the original gravity is, the more inaccurate your equation becomes… and I don’t find it to be very accurate to begin with. Your equation (along with every other equation out there) will give me a SG of less than 1.000. The last time I checked, attenuation above 100% is not possible. I support your efforts in trying to create an equation and I hope that you continue to find ways to increase its’ accuracy, but it’s not there yet.

    • Brent,

      Have you calibrated your hydrometer and refractometer recently? If you’re consistently getting estimates below 1.0 – with either correlation, really – I suspect there’s either a measurement or calculation error. Would you mind sharing your data?

      Attenuation greater than 100% isn’t possible, but gravities below 1 certainly are. A 1.050 beer that ferments to 0.996, for example, has an attenuation of 88%. If you’re mashing for a very fermentable wort (like a high-adjunct domestic lager) an FG below 1 would be expected.

      Sean

  • Kevin

    This idea is great. Would it make sense to force the constant to be 1, since at 0 initial brix and 0 final, the SG should be 1.00.

    Kevin

    • Kevin,

      That’s a good question, and I’ve gone back and forth on the answer. Just in the past few days, as I work on a revised correlation, I’ve decided not to force values for any of the coefficients. While it does make sense from a physical standpoint, I have no illusions that this equation is describing a physical process. Instead the objective is to develop an empirical relationship that encapsulates all the physics that are too complex (at least for me) to model directly.

      As it happens, it looks like the constant in the final correlation will be very close to unity (>0.999), but that’s simply coincidence.

      Sean

      • Kevin

        While I understand the idea of “letting the data speak for itself” I think there’s a way to be smarter about it to make the final equation more accurate due to our knowledge of how such an equation should work. This is how I’m used to making empirical models. In this case I can think of three constraints. The constant should be one, when RIi=Rif the equation should reduce to converting RI to brix, and the partial derivatives should have no zeros in the range of RIi > 1. If it did have you’d have a situation where, given a starting RI, as the FG increases, the final RI will switch from increasing to decreasing for a period. If the physics makes this the reality, then an equation will be difficult to use. If the the equation shows this behavior, then it’ll lead to some confusion.

        The overall theme I guess is, just because you get a high R squared, doesn’t mean the equation is free from major quirks. Over-fitting of the data will be the largest problem with this.

        Kevin

    • Kevin,

      As I said, over-fitting is a major concern. So far, though, the data submitted seem to support the new correlation being fairly accurate, and significantly more precise than the old one. I’m incorporating a few of the most divergent data points from other brewers to hopefully improve the “final” correlation.

      Your fitting targets are good ones. Unfortunately, I don’t have the ability to set anything other than basic coefficient goals with the fitting software I’m using, and I don’t have access to Mathematica or MATLAB. If you’d like to play around, I can send you the full dataset (80 triplets so far).

      Sean

      • Yeah, I’d love to see the data. If you would like to work with matlab check out GNU Octave. I used it in college a lot and here and there at various jobs. I like linux, so I’ve used it within Cygwin or Linux, but it works natively in Mac and Windows.

        Kevin

  • muldengold

    Hi Sean,

    great blog and great post! I was wondering if your FG is the apparent final gravity? If I read your spreadsheet correctly it is so. And if so why not correlating the Brix readings with real final gravities in first place, which would eliminate one extra calculation that may contain errors itself? One question: I live close to the Czech border and most of their beers have the original gravity on the label. Would it be helpful if I sampled a couple and measure the FG using a hydrometer and a refractometer and provide you with these data + the original gravity to hone your formula?

    Sandro

    • Sandro,

      If you would be able to test a few commercial beers, that would be very helpful.

      Yes, I am using the apparent extract (FG), rather than the real extract. There are a few reasons. First, it’s simply the unit that most brewers use. It can be measured directly and used as a baseline without having to do any calculations. It’s also – more or less – what the refractometer is measuring in the first place. In effect, converting to real extract would require an additional step. Finally, the conversion between RE and AE is both precise and very simple (RE = .1808*OE + .8192*AE). Even if the refractometer were to measure the real extract, a cubic polynomial can easily encapsulate the less-complicated equation without any significant loss of precision.

  • Don

    Sean,

    Sorry for asking such a basic question but I am having a hard time following your discussion. You said you took pre- and post-fermentation using both a refractometer and hydrometer and in every case the refractometer correlation provided an FG that was lower than the hydrometer reading. Your spreadsheet (if I am reading it correctly) shows the Refract FG(new) even less (compared to Refract FG(old). In terms of specific gravity is 1.015 greater than 1.020? In your spreadsheet is Refract FG(new) the corrected FG that should match the hydrometer reading?

    Don

    • Don,

      The “Refract FG (new)” field is the new, hopefully, more accurate, result. I don’t think I completely follow your question though. You’ve put original and final refractometer readings into the spreadsheet and gotten a lower result for the new value? That would be unusual, but not unprecedented – it’s happened in 11 of the data points I’ve received so far. The important question is: which correlation is closest to your hydrometer reading? In each of those cases, the new correlation was more accurate.

      Sean

  • Don Dunn

    Sean,

    OK, now things make sense. In fact, I did get a lower result for the new value. Unfortunately I set my mash tun down on top of my hydrometer (again) and have not been able to take a final reading with a hydrometer. The beer is still laugering so before I bottle it I will have to get a new hydrometer and take a reading. I will let you know how it turns out. Thanks.

    Don

  • muldengold

    Hi Sean,
    Thanks very much for your helpful response. One other thing that worries me: I played around with your spreadsheet and noticed that if one uses the same brix reading for pre- and postfermentation gravities (which would be the case right at the beginning of the fermantation) the equation actually spits out an attenuation and accordingly an alcohol value, which of course doesn’t make sense. Using the old equation this happens too, but to a far lesser extent (e.g. for 12/12 Brix one gets 1.1%ABV with your equation vs. 0.2%ABV with the old one). Your equation was presumably not designed to monitor the extract during fermentation but it makes me wonder at which point in time during the fermentation process the equation starts to produce meaningful data?
    Sandro

    • Sandro,

      The Brix-to-SG conversion is something that would be nice to have built in, but at this point I’m not sure to what extent that will be possible. The lowest attenuation value used to develop the current correlation was 60% (73% apparent), so it holds up well down to about 50%, then becomes inaccurate fairly quickly below that. I do have some data on very low-attenuating worts now, so I believe the final correlation will be accurate down to maybe 30% RDF/37% ADF, but below that the results will likely only be approximate. If it turns out that it’s possible to incorporate a Brix-to-OG conversion without compromising accuracy at normal attenuation levels, I will definitely do so.

      Sean

  • […] (55) Popular PostsToward a Better Refractometer CorrelationYeast Pitching Rate ResultsBuild a Better StirplateOf Ice and 10°PAeration and Yeast […]

  • […] (55) Popular PostsToward a Better Refractometer CorrelationYeast Pitching Rate ResultsBuild a Better StirplateOf Ice and 10°PRefractometer Estimates of […]

  • […] that the number was the same one that iBrewmaster had calculated! Converter/Correction table: http://seanterrill.com/2010/07/20/toward-a-better-refractometer-correlation/ I am going to go ahead and say that isn't a coincidence…. It appears this app does more than I […]

  • Dan

    Is there a specific temperature my refractometer needs to be read at? It’s not an ATC refractometer, so I’m assuming I’ll need to account for temperature. I don’t see any recommended temps on here so that’s why I’m asking.

    And along that same note, if I am supposed to read my results at a specific temperature, how can I take a sample out of my boiling wort and read it correctly to make sure it’s where it needs to be? Do I have to cool the two little drops I take out of my boiling wort?

    Thanks!

    Dan

    • Dan,

      You’ll have to check your specific refractometer to know what the calibration temperature is. Most likely it’s 20°C, but it could be anything. Hopefully it came with some sort of literature.

      To get an accurate reading, you’ll need to cool the sample in a sealed container, just like with a hydrometer. I use a small syringe to withdraw about 0.5 mL of wort. That small amount of liquid cools to near-ambient temperature very quickly. Once the sample has cooled enough that evaporation isn’t a concern, it can be dropped on the refractometer, and it will come into equilibrium with the temperature of the refractometer body in just a few seconds.

      Sean

Leave a Reply to webmaster Cancel reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  


5 + = 9