Percentage vs. Temperature Equation
Moderator: Site Moderator
Percentage vs. Temperature Equation
I have just put a temperature probe in my boiling vessel. (I already have one at the top of my still head). Both of these probes are USB and I am able to monitor my still with my laptop. I find this convenient since I can create various alarms to notify me of the different stages of distillation. I would like to know how to calculate the percentage of alcohol in the boiling vessel by reading its boiling temperature. Tony has the equation for boiling temperature when you know the % of the mash, but I would like the equation for the exact opposite i.e. what is the % of the mash for a given boiling temperature. If anybody can help me with this it would be greatly appreciated.
-
- Rumrunner
- Posts: 732
- Joined: Sat Mar 04, 2006 1:42 am
- Location: Nth coast NSW
-
- retired
- Posts: 1030
- Joined: Sun Oct 24, 2004 10:56 am
-
- Rumrunner
- Posts: 732
- Joined: Sat Mar 04, 2006 1:42 am
- Location: Nth coast NSW
Re: Percentage vs. Temperature Equation
roscoe wrote: Tony has the equation for boiling temperature when you know the % of the mash, but I would like the equation for the exact opposite i.e. what is the % of the mash for a given boiling temperature. If anybody can help me with this it would be greatly appreciated.
Cant you rearrange the equation to give you what you need? I couldn't find the equation you're talking about with my scanty search.
Post the equation here and I'll bet someone will rearrange it for you before I see it.
-
- retired
- Posts: 1030
- Joined: Sun Oct 24, 2004 10:56 am
-
- Rumrunner
- Posts: 732
- Joined: Sat Mar 04, 2006 1:42 am
- Location: Nth coast NSW
I am not interested in reading it of the graph. Since my computer is able to monitor the temperature of the boiling vessel. It could also continually calculate the percentage alcohol remaining in the mash. By also telling my computer the original volume of mash placed in the boiling vessel, my computer could tell me how many ml of alcohol are left in the boiling vessel simply be reading the temperature. But to do this I need to supply my monitoring program with an equation that would give alcohol % of a solution given a boiling temperature. If anybody can solve the above equation for x it would be greatly appreciated. Alternatively someone may know of another equation one could use to calculate this.
-
- Distiller
- Posts: 1132
- Joined: Sun Aug 20, 2006 1:30 pm
Suggestion about solving it the numeric methods way.
This is a hard equation to reverse and was derived using a Taylor series.
Here is my suggestion. Let the computer calculate the points for the temp in small increments such as 0.1°. Store the results in an array of pairs or a map with temp as the key. Have the program look up the closest two points, one above and below by temp, and interpolate the alcohol percent, mash or vapor, using the percent offset from the lowest point. It will be as close as you can get and it will allow the computer to do the lookups.
All math coprocessors calculate e or logs or trig functions using the same methods.
Here is my suggestion. Let the computer calculate the points for the temp in small increments such as 0.1°. Store the results in an array of pairs or a map with temp as the key. Have the program look up the closest two points, one above and below by temp, and interpolate the alcohol percent, mash or vapor, using the percent offset from the lowest point. It will be as close as you can get and it will allow the computer to do the lookups.
All math coprocessors calculate e or logs or trig functions using the same methods.
-
- Distiller
- Posts: 1132
- Joined: Sun Aug 20, 2006 1:30 pm
The USB temperature probes I use are called GO-Temp and are built by Vernier Scientific instruments. http://www.vernier.com/go/gotemp.html" onclick="window.open(this.href);return false;" rel="nofollow
The probe sells for $39.00 US. It cost me around $75 CDN to get a hold of one. The probe comes with software called Loggerlite that I do not use. Instead I use the LoggerPro software that allows for much more customization. The also have a software development kit if you are into writing your own program to use with the probe.
The probe sells for $39.00 US. It cost me around $75 CDN to get a hold of one. The probe comes with software called Loggerlite that I do not use. Instead I use the LoggerPro software that allows for much more customization. The also have a software development kit if you are into writing your own program to use with the probe.
-
- Distiller
- Posts: 1132
- Joined: Sun Aug 20, 2006 1:30 pm
I understand the solution you are suggesting. Thanks. I may be able to have my LoggerPro software access this table and find the appropriate value, although it would be significantly easier if I had an equation. Surely this equation exists and has been calculated already. I simply have been unable to find it. Hopefully someone who is aware of this equation reads this, and posts the equation. Once I finish setting up my monitoring software I will post a picture of it in operation, so other home distillers can form their own opinion on having your computer monitor your still. Hopefully we can even share our software solutions to perform this task. Obviously it is not for everyone and I imagine that some distillers would be turned off by this much technological integration into their hobby. A USB temperature probe is no more expensive than any other quality digital thermometer, and if you have the laptop kicking around anyway it sure is nice. I currently graph all my distillation runs and have found that I can determine the ethyl acetate concentration of my wash, just by analyzing my temperature curve during equalization of my column. I know if I am going to have a nice neutral vodka run just by comparing temperature graphs to previous runs.
-
- Distiller
- Posts: 1132
- Joined: Sun Aug 20, 2006 1:30 pm
Logging software.
I too log my runs. I have written a very nice program for precise power control that monitors boiler vapor temperature, doubler vapor temperature and condenser temperature.
I use a BK precision 710 dual k-type thermocouple with a serial interface. the power control is via the parallel port controlling a solid state relay. I can set the power control to .001 second precision. It seems you and I have a lot in common. I wrote my software in c# so it has nice real time graphing capability. for temp and power. It also logs the run for me so I can go back and look at it later.
The only thing mine lacks is the correlation of temp to alcohol %. I am still using my spread sheet.
I use a BK precision 710 dual k-type thermocouple with a serial interface. the power control is via the parallel port controlling a solid state relay. I can set the power control to .001 second precision. It seems you and I have a lot in common. I wrote my software in c# so it has nice real time graphing capability. for temp and power. It also logs the run for me so I can go back and look at it later.
The only thing mine lacks is the correlation of temp to alcohol %. I am still using my spread sheet.
-
- Bootlegger
- Posts: 104
- Joined: Thu Feb 22, 2007 7:38 am
- Location: 7th Floor, West Wing, nervous hospital
Thanks for the link roscoe. The basic specs are listed here in case others like myself are interested.roscoe wrote:The USB temperature probes I use are called GO-Temp and are built by Vernier Scientific instruments. http://www.vernier.com/go/gotemp.html" onclick="window.open(this.href);return false;" rel="nofollow
The probe sells for $39.00 US. It cost me around $75 CDN to get a hold of one. The probe comes with software called Loggerlite that I do not use. Instead I use the LoggerPro software that allows for much more customization. The also have a software development kit if you are into writing your own program to use with the probe.
Order Code: GO-TEMP
Technical Specifications
USB Specification: 1.1
Range: -20°C to 110°C
Maximum temperature that the sensor can tolerate without damage: 130°C
Resolution: 0.07°C
Accuracy: ± 0.5°C
Response time: 4 s (to 90% of full reading in water)
The rest of your conversation went over me like a rocket!
~ After all these years, a drop in time helps soothe my mind ~
-
- Master of Distillation
- Posts: 3086
- Joined: Fri Feb 03, 2006 11:40 am
- Location: Texas
-
- Bootlegger
- Posts: 104
- Joined: Thu Feb 22, 2007 7:38 am
- Location: 7th Floor, West Wing, nervous hospital
Check the site... lots of interesting sensors
hey junkyard dawg,
You thinking about usb data collection too? I did some checking and Vernier has some interesting stuff that's not too expensive.
(thanks again roscoe for the link)
The LabPro looks like a good unit for remote collection without a pc or handheld PALM, or use with pc. You can collect data from multiple sensors simultaneously using the full software package. A temp probe at the top is no problem but I'm a little concerned about sinking one of the GO-Temps & wire in the boiler with the mash. They offer a longer probe that might be an option.
An idea I've been kicking around for monitoring the boiler temp with something easier to read than a glass thermo is a ss probe and wire for the CDN programmable cooking thermometer (handy little device). The probe is about 6" and curved where the wires connects to the ss braided sleeve. I didn't want it banging around or touching the boiler sides or bottom so I plan to make a cork float and let it sit vertically like a buoy. This would be for digital monitoring only in either C or F, no data collection. You could probably float a GoTemp probe in the same manner or punch a hole in the boiler... so far my stock pot boiler is virgin unmodified, if possible I aims ta keep er that way.
Fun stuff!
You thinking about usb data collection too? I did some checking and Vernier has some interesting stuff that's not too expensive.
(thanks again roscoe for the link)
The LabPro looks like a good unit for remote collection without a pc or handheld PALM, or use with pc. You can collect data from multiple sensors simultaneously using the full software package. A temp probe at the top is no problem but I'm a little concerned about sinking one of the GO-Temps & wire in the boiler with the mash. They offer a longer probe that might be an option.
An idea I've been kicking around for monitoring the boiler temp with something easier to read than a glass thermo is a ss probe and wire for the CDN programmable cooking thermometer (handy little device). The probe is about 6" and curved where the wires connects to the ss braided sleeve. I didn't want it banging around or touching the boiler sides or bottom so I plan to make a cork float and let it sit vertically like a buoy. This would be for digital monitoring only in either C or F, no data collection. You could probably float a GoTemp probe in the same manner or punch a hole in the boiler... so far my stock pot boiler is virgin unmodified, if possible I aims ta keep er that way.
Fun stuff!
~ After all these years, a drop in time helps soothe my mind ~
-
- Bootlegger
- Posts: 112
- Joined: Tue Feb 13, 2007 7:42 pm
- Location: New Zealand's large western island!
Roscoe and others,
I'll be posting a full description of my computer monitored still next week (after the next run) but in the mean time...
The equation shown above for converting % to Temp is a 4th order polynomial. I have not found any way of reversing it so what I did was to write a small function (CalcTemp) to do it forwards. Then write another function (CalcAlc) that starts with Alcohol at zero and repeatedly calls CalcTemp until the calculated Temp equals or is below the value you started with. Each loop increments the alcohol being tested by say 0.1%. You then need to compare the previous step to see which was closer.
The problem with this method is the number of loops required increases with higher alchohol (lower temps). So I changed the strategy to do a binary chop and test values a bit like on "price is right". For example, start with alcohol at 50% and see if the temperature comes out above or below what you have (from the probe). Obviously (for a boiler probe), it will come out less so the next loop tries 50 divided by 2 (25%). Next loop tests 12.5%, then maybe swings the other way to test 18.75% and so on.
Sounds complicated but it's not really. Using the linear search method to 0.1% can take up to 1000 loops but using binary chop takes about 17. Obviously you can cut down the testing range if you know your boiler won't have more than a certain alcohol content.
I can post my code if you like - but you didn't say what language you're using. I'm using Delphi (Pascal).
Cruiser.
ps. I'm using home-made probes based on the Dallas/Maxim DS18B20 chip which has proven extremely accurate.
I'll be posting a full description of my computer monitored still next week (after the next run) but in the mean time...
The equation shown above for converting % to Temp is a 4th order polynomial. I have not found any way of reversing it so what I did was to write a small function (CalcTemp) to do it forwards. Then write another function (CalcAlc) that starts with Alcohol at zero and repeatedly calls CalcTemp until the calculated Temp equals or is below the value you started with. Each loop increments the alcohol being tested by say 0.1%. You then need to compare the previous step to see which was closer.
The problem with this method is the number of loops required increases with higher alchohol (lower temps). So I changed the strategy to do a binary chop and test values a bit like on "price is right". For example, start with alcohol at 50% and see if the temperature comes out above or below what you have (from the probe). Obviously (for a boiler probe), it will come out less so the next loop tries 50 divided by 2 (25%). Next loop tests 12.5%, then maybe swings the other way to test 18.75% and so on.
Sounds complicated but it's not really. Using the linear search method to 0.1% can take up to 1000 loops but using binary chop takes about 17. Obviously you can cut down the testing range if you know your boiler won't have more than a certain alcohol content.
I can post my code if you like - but you didn't say what language you're using. I'm using Delphi (Pascal).
Cruiser.
ps. I'm using home-made probes based on the Dallas/Maxim DS18B20 chip which has proven extremely accurate.
I seriously doubt this is a Taylor-series expansion. What would be the point of expanding a tidy, meaningful equation into a nasty 4th order polynomial?
More than likely, this is a polynomial regression generated by Excel or some other data plotter - somebody plotted a bunch of data points and generated a best fit curve with a 4th order polynomial.
So - the original equation is most likely only an approximation. Also - no wash is the same, so you should really only be looking for ball-park figures. If you still have a lot of dissolved sugar or starch or whatever in the wash, then this equation could be way off.
Anyway, from my perspective, the most reasonable way to reverse the equation is to plot the equation with a suitable range of values and then perform another polynomial regression on the other variable using that plotted data. Here is what I get:
Percent Alcohol = -.0786*T^2 + 3.2892*T - 37.4893
This was a 4th order regression, but the two high order terms were insignificant. If you graph this on top of the original equation, they are pretty much the same - and when you consider that the first one is also an approximation and that no two washes are ever the same, it should be good enough. I'd post the graph comparing the two, but I don't have a way to post images.
More than likely, this is a polynomial regression generated by Excel or some other data plotter - somebody plotted a bunch of data points and generated a best fit curve with a 4th order polynomial.
So - the original equation is most likely only an approximation. Also - no wash is the same, so you should really only be looking for ball-park figures. If you still have a lot of dissolved sugar or starch or whatever in the wash, then this equation could be way off.
Anyway, from my perspective, the most reasonable way to reverse the equation is to plot the equation with a suitable range of values and then perform another polynomial regression on the other variable using that plotted data. Here is what I get:
Percent Alcohol = -.0786*T^2 + 3.2892*T - 37.4893
This was a 4th order regression, but the two high order terms were insignificant. If you graph this on top of the original equation, they are pretty much the same - and when you consider that the first one is also an approximation and that no two washes are ever the same, it should be good enough. I'd post the graph comparing the two, but I don't have a way to post images.
-
- Novice
- Posts: 43
- Joined: Fri Jan 12, 2007 12:12 pm
- Location: Canada East Coast
I agree with masonjar that the given plot and equation are only approximations.
I often program such polynomial equations (such as NTC thermistor curves) using assembler.
In most cases I would split the curve into 5-10 (as required) straight lines.
Then using the end points of the straight lines it is easy to derive the line equations as simple y-y1 = m(x-x1) equations.
All the code has to do is determine (from the endpoints) which straight line equation to use and then it's
simply a matter of plugging the offset and slope into the generic equation.
On typical curve-matched thermistors, accuracy of +/- 0.1 C is attainable using this straight line approximation
over a range of 10-50 C.
Of course, if your using higher level programming language, other solutions
may be easier.
I often program such polynomial equations (such as NTC thermistor curves) using assembler.
In most cases I would split the curve into 5-10 (as required) straight lines.
Then using the end points of the straight lines it is easy to derive the line equations as simple y-y1 = m(x-x1) equations.
All the code has to do is determine (from the endpoints) which straight line equation to use and then it's
simply a matter of plugging the offset and slope into the generic equation.
On typical curve-matched thermistors, accuracy of +/- 0.1 C is attainable using this straight line approximation
over a range of 10-50 C.
Of course, if your using higher level programming language, other solutions
may be easier.
Thank you for doing this calculation. It is definitely an equation that should be posted on this forum. I agree that this is an approximation. The original equation for temperature on Tony's page appears to have been made by plotting points along the graph and then finding a polynomial to approximate the curve. I am a concerned that this original equation was designed to be more accurate at the lower temperatures (higher %) than at the higher temperatures (lower %). This concern may be unfounded, since I believe accuracy within 0.5% is plenty good for my purposes, and this equation may approximate much more accurately than that.
MasonJar could you please repost your equation it must be a typo since it is seriously off for any temperature that a mixture of ethanol and water could boil at. Thanks
MasonJar could you please repost your equation it must be a typo since it is seriously off for any temperature that a mixture of ethanol and water could boil at. Thanks
My error was to trim off the higher order terms. They looked insignificant to me at first, but they were quite significant after further inspection.
I didn't save my work, so I had to start over - and now this one looks a lot different. I guess there are an infinite number of combinations of polynomial coefficients that will achieve a 'pretty close' curve. Anyway, here it is:
Percent Alcohol = 234.1002 - 9.12097*T + 0.133522*T^2 - 0.00086943*T^3 + 0.00000212211*T^4;
This could be tweaked and/or increased to a 5th order polynomial to improve accuracy, but it's already within .2 degrees C of the first equation - which was an approximation to begin with, so it probably isn't necessary.
Roscoe, if you have some really good data points that are for real washes, then I'd be happy to start from that point and give you an equation that is catered to your washes instead of the alcohol/water mixture on Tony's site.
I didn't save my work, so I had to start over - and now this one looks a lot different. I guess there are an infinite number of combinations of polynomial coefficients that will achieve a 'pretty close' curve. Anyway, here it is:
Percent Alcohol = 234.1002 - 9.12097*T + 0.133522*T^2 - 0.00086943*T^3 + 0.00000212211*T^4;
This could be tweaked and/or increased to a 5th order polynomial to improve accuracy, but it's already within .2 degrees C of the first equation - which was an approximation to begin with, so it probably isn't necessary.
Roscoe, if you have some really good data points that are for real washes, then I'd be happy to start from that point and give you an equation that is catered to your washes instead of the alcohol/water mixture on Tony's site.
Here's what I use to approximate the ABV of what's coming out based on the head temp, but I guess it wouldn't work for a thermometer in the wash, since that's not a pure alcohol/water mixture. It's useful for my stripping runs, since I like to collect everything I can during those, and I don't make my cuts until the reflux run. So essentially it's telling me the ABV left in the pot, based on what's coming up the column.
(100 - T) / 21.4
100% water is 100 degrees and 100% alcohol is 78.6 degrees, and the range between the two is 21.4 degrees. So where the head temp is along that range tells me the ABV.
Poly nomi whosie what now?
(100 - T) / 21.4
100% water is 100 degrees and 100% alcohol is 78.6 degrees, and the range between the two is 21.4 degrees. So where the head temp is along that range tells me the ABV.
Poly nomi whosie what now?
Give a man a fish, and all he'll want tomorrow is another free fish.
-
- Bootlegger
- Posts: 112
- Joined: Tue Feb 13, 2007 7:42 pm
- Location: New Zealand's large western island!
Firewater, two things:
One: it's not a linear relationship.
Two: while the boiling point of ethanol is listed as about 78.5 or 78.6 (depending on what you read), the strange reversal of the curve at the azeotropic point around 96% means that you can't use that figure and a better approximation could be got using a much lower boiling point.
A quick calculation shows the following differences:
Temp FireH2O Polynomial
100° 0% 0%
95° 23% 7%
90° 47% 17%
85° 70% 34%
80° 93% 75%
79° 98% 84%
78.6° 100% 89%
78.4° 101% 91%
78.2° 102% 94%
78.0° 103% 97%
77.9° 103% 100%
(sorry about the formatting - tabs don't work well here)
I'm not saying you're wrong but my testing with a hydrometer (temperature corrected readings) compares more favourably with the "Poly nomi whosie what now" method. My head temperature is very constant at 78.1° and my hydrometer consistently reads 95%. My wash starts boiling at 89.2° suggesting about 18% alcohol which is what I should have given my particular sugar/turbo yeast ferment. At the end of the run my boiler reads about 98.5° or 1.8% which sounds reasonable.
You can see a graph of my latest run here if you're interested: http://i149.photobucket.com/albums/s50/ ... tGraph.jpg
Cruiser.
One: it's not a linear relationship.
Two: while the boiling point of ethanol is listed as about 78.5 or 78.6 (depending on what you read), the strange reversal of the curve at the azeotropic point around 96% means that you can't use that figure and a better approximation could be got using a much lower boiling point.
A quick calculation shows the following differences:
Temp FireH2O Polynomial
100° 0% 0%
95° 23% 7%
90° 47% 17%
85° 70% 34%
80° 93% 75%
79° 98% 84%
78.6° 100% 89%
78.4° 101% 91%
78.2° 102% 94%
78.0° 103% 97%
77.9° 103% 100%
(sorry about the formatting - tabs don't work well here)
I'm not saying you're wrong but my testing with a hydrometer (temperature corrected readings) compares more favourably with the "Poly nomi whosie what now" method. My head temperature is very constant at 78.1° and my hydrometer consistently reads 95%. My wash starts boiling at 89.2° suggesting about 18% alcohol which is what I should have given my particular sugar/turbo yeast ferment. At the end of the run my boiler reads about 98.5° or 1.8% which sounds reasonable.
You can see a graph of my latest run here if you're interested: http://i149.photobucket.com/albums/s50/ ... tGraph.jpg
Cruiser.
I should have known it wasn't that simple. It never is.
But it seems like a "close enough" approximation, and when I measure with an alcoholmeter as it comes out, I find I'm in the ballpark. But I'm not looking for an exact measurement. I just want to know about how far along I am during my stripping runs, and this reinforces the taste test.
I can be an information junkie at times, but you can lose the forest for the trees too. I never feel the need to know the exact percent in the pot at any given time. It'll take as long as it takes, experience will tell you about how long that is, and quick and dirty calculations like this let you know what's going on along the way.
But it seems like a "close enough" approximation, and when I measure with an alcoholmeter as it comes out, I find I'm in the ballpark. But I'm not looking for an exact measurement. I just want to know about how far along I am during my stripping runs, and this reinforces the taste test.
I can be an information junkie at times, but you can lose the forest for the trees too. I never feel the need to know the exact percent in the pot at any given time. It'll take as long as it takes, experience will tell you about how long that is, and quick and dirty calculations like this let you know what's going on along the way.
Give a man a fish, and all he'll want tomorrow is another free fish.
-
- Bootlegger
- Posts: 112
- Joined: Tue Feb 13, 2007 7:42 pm
- Location: New Zealand's large western island!
Firewater,
(Cool name by the way)
I don't know why it is non-linear - it's just a law of nature. Take a look around the parent site for a full description and also this discussion:
http://www.chemguide.co.uk/physical/pha ... ideal.html scroll down to the ethanol curves.
But you'll probably get a headache like I did
Also, remember that you need to temperature correct the readings you see on your alcoholmeter using a correction chart of some sort. Usually your product will be coming out of the still much hotter than the 20° your alcoholmeter is calibrated for. It can make quite a difference. On my still the alcohol comes out at around 45 to 50° and reads way over 100% alc. I have to let it cool to below 40° to be on the scale so I can apply a correction (the uncorrected indication would be 100% and corrected it would be 95%). If your product was indicating say 80% at 50° then it is actually only 70% corrected. Quite a difference! The other way is to cool your sample to 20° before testing it.
HookLine - thanks for the comment. The full description of my setup is in this forum under the title "Computer monitored still - long"
Cruiser
(Cool name by the way)
I don't know why it is non-linear - it's just a law of nature. Take a look around the parent site for a full description and also this discussion:
http://www.chemguide.co.uk/physical/pha ... ideal.html scroll down to the ethanol curves.
But you'll probably get a headache like I did
Also, remember that you need to temperature correct the readings you see on your alcoholmeter using a correction chart of some sort. Usually your product will be coming out of the still much hotter than the 20° your alcoholmeter is calibrated for. It can make quite a difference. On my still the alcohol comes out at around 45 to 50° and reads way over 100% alc. I have to let it cool to below 40° to be on the scale so I can apply a correction (the uncorrected indication would be 100% and corrected it would be 95%). If your product was indicating say 80% at 50° then it is actually only 70% corrected. Quite a difference! The other way is to cool your sample to 20° before testing it.
HookLine - thanks for the comment. The full description of my setup is in this forum under the title "Computer monitored still - long"
Cruiser