The Fugue

Counterpoint by Hans Fugal

Use a balloon to estimate RV

Posted by Hans Fugal Wed, 30 Jul 2008 21:22:18 GMT

So it's been awhile since I estimated my residual lung volume (RV), and I figured it was time to do it again.

I'm a big guy, so my lungs hold a lot of air. When you're blowing all your air into containers in the bathtub, and you're ⅔ or more exhaled, is not the best time for pausing to move your straw to another container—or worse, refilling the container. This time I decided to use a balloon.

I took a deep breath, exhaled maxmially into the balloon, then blew the rest into the container through a straw. (Wait, did he just say "the rest" after "maximally exhaled"?) I heard that. Yes, you can't exhale all of your air because the pressure in the balloon is higher than atmospheric pressure. In my case, I had another 400ml of air.

Then I emptied the air out of the balloon into the container. This is easy and leisurely once you figure out the trick, but it can seem next to impossible at first. Hint: don't try to submerge the balloon. If you grab the lip of the balloon mouth only, and avoid pinching the neck, you can control the air flow very well. There, I had measured my vital lung capacity (VC).

It worked great, and compared with the last circus event when I measured VC it was much easier.

Now I had to figure out how to get from VC to RV. The clown who wrote http://hans.fugal.net/density kind of left this step vague. I've remedied that and added a page to my spreadsheet. For the curious, my RV is up from 2.0 liters to 2.2 liters, and a total lung capacity of 8.2 liters.

no comments |

%BF Nomogram

Posted by Hans Fugal Mon, 28 Jul 2008 23:54:54 GMT

Remember that system I came up with for calculating body fat percentage using a gallon jug in a swimming pool? I always let the computer do the calculations for me—I have a little script that I run that updates my weight graph. But not everyone is as geeky as that, and formula is not that simple, and when you add units conversion in it gets downright hairy.

I finally figured out how to generate a nomogram. Now you have no excuses.

no comments |

Fat Loss Progress

Posted by Hans Fugal Mon, 30 Jun 2008 17:16:11 GMT

Back in October I talked about my fat loss plan, which boiled down to this: exercise 30 minutes a week and live a 1.5 lb-per-week feedback diet.

Here's a snapshot of the graph on the sidebar:

The red dots are my daily weigh-in, the blue dots are my water jug body fat measurement (aka the days I go swimming). The green and blue lines are trend lines. I've lost about 25 pounds. There are some notable features here.

First, notice how my body fat was plummeting compared to my weight when I was actively swimming and doing some minimal strength training. I got out of the habit, and haven't really reestablished it yet. Also, note that the body fat measurement is consistently lower than the BMI number.

Second, notice that my trend is most consistent when I was swimming regularly. Seems like that exercise thing is a good thing to do.

Third, and you'll have to take my word for it on this, when I was following my feedback diet it worked flawlessly. The humps are when I got rebellious and didn't follow the diet even though the feedback said I should.

Let's review the diet. It's really really easy. Get a piece of graph paper and mark today's weight. Draw a line that goes down 1 lb every 5 days (this is the rate I chose, you may want to choose 1 lb per 7 days or whatever). Now, if your weight is over the line, you eat smaller portions, drink more water, and skip dessert. If it's under the line, you don't fret it. Eat what you want (without gorging yourself).

Ok, this works really good, but there's bound to be hiccups. You're only human. So when you get a hiccup like I had in January/February, the feedback system breaks down. It only takes a week or so of disobedience for you to be completely unable to get back down to the line you charted without a sharp dive. But a sharp dive is exactly the thing you are not prepared to do. So you continue to float too high. Maybe you start a new chart (a wholly demoralizing thing to have to do), and then another hiccup begins and you lose heart even sooner. What I'm getting at is that line is just too rigid. The whole point is a sustainable rate of loss.

So I modified the mechanism slightly, and hence this blog post (no, it's not so I can brag about losing 25 pounds—that comes when I get to my target weight).

Take a piece of graph paper and draw a line with the slope you want as before, starting in the corner. Now, that line starts 5 lb or so above where you are now. This is to emphasize that the line is only a slope reference, not the actual line. Now mark your weight every day, and then decide if it's a diet day or not. Do this by estimating with your pencil, finger, or just your eyes, what the slope of the line that best fits the last 5 measurements is. If it's pointing down as much or more than your reference slope, it's not a diet day. If it's flatter (or pointing up), then it is a diet day.

I've been trying this new system for a few weeks and I have found it much more adaptive and encouraging. If you have a bad couple of days, you can be back on track within a few days, no problem. You don't need to make a new graph. You can see the progress of the past and recognize that while it's not a perfect line it's still very good progress. All the good kinds of feedback.

So go give it a try. It can fit in with whatever other exercise/diet plan you have. It can work if you are just maintaining your perfect weight, or even if you're trying to gain weight. It's easy (just a piece of graph paper on the fridge). You've got nothing to lose. At least, nothing you don't want to lose.

1 comment |

Measurement Error in Soapmaking

Posted by Hans Fugal Sat, 16 Feb 2008 07:03:00 GMT

Have you ever wondered what significance the measurement error of your scale has in making soap? What, you didn't realize your digital scale has measurement error?

If your scale has 1-gram precision (the norm these days), then if it says 42 grams it actually means that it most probably is between 41.5 grams and 42.5 grams. The possible measurement error is ±0.5g.

What does this mean in measuring ingredients for soap? Well, there are two extremes: lye surplus and lye deficit (or inversely, fat deficit and fat surplus).

On the one extreme, you may have 0.5g more lye than the scale says, and 0.5g less fat than the scale says. In that case, the extra 0.5g lye is actually close to 4 grams worth of fat. The exact value depends on the saponification value of the fat in question. For example, olive oil has a saponification value of 0.134, so 0.5g/0.134 = 3.7g worth of oil. That means that if you do indeed have an extra half gram of lye, you need 3.7g more oil than the recipe called for (for simplicity, assume the recipe has no lye discount/superfatting). Now factor in the possibility that you have half a gram less oil than the scale says, and you need 4.2g more oil to be 100% sure you are not lye-heavy. Of course your scale only does 1g increments, so you have to bump it up to 5g. So, regardless of the recipe size, if you add 5g oil to the recipe, you're sure to have at least the nominal superfatting, but perhaps more. Actually, probably more.

What about the other extreme—a lye deficit? If you have 0.5g less lye than the scale says, and 0.5g more olive oil than the scale says, then you have 0.5g/0.134 + 0.5g = 4.2g extra oil. Add that to your 5g that you added to be sure you're not lye-heavy, and now you've got about 9–10g more oil than the recipe calls for in the most lye deficit case.

Now, we want to add the first 5g to a non-superfatted recipe, for sure, so we know we're not lye-heavy. Then, the scale threatens to add another 5g, so it's entirely possible we get more fat than we are willing to tolerate.

What kind of impact do those 10 grams actually have? Well that depends on the size of the recipe. For most recipes you'll find on the internet, that 5 grams will be less than 1% of the total weight. No big deal. But if you, like me, are experimenting and making quite small batches it becomes significant. I like to aim for 1–5% superfat, but I'd be ok with 0–8%. So if I want no more than 8% superfat, and I add 5 grams of oil to be absolutely sure I don't go below 0% superfat, and the scale adds another 4.2 in the worst case, then I want a minimum batch size of 9.2g/8% = 115g (before water). That's a nice one-bar batch size.

Well and good, as long as you're not trying to observe the effects of superfatting, since you have such a wide range of possible actual superfat. For that you'd have to break down and make larger batches.

But what is the expected value of your superfatting? The extremes are actually less likely to occur than something much closer to the actual reading. As a simplification, just take the actual reading to be your expected value. So if you add 5g oil to a 120g batch, then you probably have about 4% superfat. 4±4% superfatted soap. It's alright by me.

So, a pure castile soap one-bar ingredient list:

102 g olive oil
13 g lye
25–30 ml water or milk (preferably goat's milk)

So in summary, if you have a 1g scale and you make small batches, the above is important to understand and take into account. If you have a 1g scale and make medium to large batches, then you are going to get within ½–1% of your target superfatting.

Oh, and of course none of this actually takes into account the accuracy or variation of those saponification figures.

2 comments |

Rendering Tallow

Posted by Hans Fugal Thu, 14 Feb 2008 22:59:59 GMT

Ok, so I'm catching up on a backlog of photos I've been meaning to post. How did you guess?

Here are some photos of me rendering tallow. I went to Albertson's and asked the butcher folk for some beef fat. They said come back later and they'd save me some. I did, and I came home with a couple pounds of fat. I cut it into cubes and put it in my dutch oven

fat in dutch oven

then stuck it in the oven at 225°F for awhile. Nothing really happened. A little melting. This could take all day. So I put it on the range top and added water and brought the mess to a boil. I let it boil for awhile. It smelled about like boiling stock, if you can imagine that. After awhile, I declared the low-hanging fat picked, and poured the liquid through a collander into a receptacle which I put in the fridge after it cooled off somewhat. The next day I poured off the water. Et voilá! Tallow.

I made one bar of soap with it (and olive oil and coconut oil and a couple drops of pine essential oil), and though it hasn't yet fully cured and I haven't truly used it yet, it does smell a bit like beef fat. Or that might be my imagination. So I simmered it again in fresh water for about 4 hours, then refrigerated. This time it was a bit whiter. I made another bar, with basically the same ingredients (sans pine essential oil) but also with a bit of cocoa butter. Again, I haven't truly used it yet, but it seems to smell better.

If I do it again (and I may, if I like the soap), I'll do a larger batch, and I'll do some things different. First, I'll ask them to grind it for me. Hopefully more surface area will mean faster melting. Then, I'll first cook it dry on low heat for a time, kind of like cooking bacon. Or perhaps in the oven at a bit higher temperature. When I reach the "low-hanging fat" point, I'll pour it off into some simmering water and simmer it for a couple of hours. I'll let that harden, and simmer it for a couple of hours again. If I'm in no hurry, I'll do it a third time. Then I'll have lot's o' tallow that I'm confident is nice and pure.

1 comment |

Measure body fat with only a gallon jug (and a couple thousand tons of water)

Posted by Hans Fugal Thu, 15 Nov 2007 05:37:12 GMT

I finally got around to uploading the PDF version of my body fat measurement quest, and also a simplified one-page PDF for those of you that just want to try it out and don't want to wade through all the physics and my ramblings. While I was at it I threw together an OpenOffice.org spreadsheet to do all the heavy math for you too. Now the only difficulty is finding a couple thousand tons of water laying around. I put together a simple page with links to all that stuff I just mentioned (except the water).

2 comments |

The Hacker's Diet

Posted by Hans Fugal Tue, 16 Oct 2007 20:24:38 GMT

I came across this blog post while googling an unrelated gnuplot problem, of all things. The post talks about The Hacker's Diet. Duly intrigued, I whipped out my razor and plowed through the book. I like it.

The book is well-written, doesn't take itself too seriously, takes the subject matter seriously, and takes the audience seriously, i.e. you aren't expected to be Superman—the program is very down-to-earth and achievable. It is slightly aged (he mentions at one point that you need a color monitor to really appreciate the color graphs), but this isn't a problem.

The best part about the book (besides being free) is that he takes the problem of weight loss and attacks it as an engineering problem. He comes up with an understanding and a plan and implements it, and loses some 70 pounds. This book definitely appeals to every inner geek.

The worst part about the book is that his solution involves calorie counting. That makes me sick on so many levels, but I'll just rant on two of them. First of all, a calorie is not a calorie. I don't know if this is new knowledge or not, but we see it in all the latest fad diets. Atkins, GI, etc. are all based on the fact that a calorie is not a calorie. Second, I am not going to spend my life counting calories, thank you very much. I'd rather drink oil.

Speaking of drinking oil, this book has a very interesting parallel to the Shangri-La diet. They both use the thermostat analogy, but Shangri-La aims to adjust your off-kilter internal thermostat and this book aims to replace your broken thermostat with record keeping and conscious decision. Certainly, one could apply both at the same time.

In spite of me not wanting to count calories, I do intend to put a modified version of this plan into practice. Since I don't want to count calories, I am going to have to rely on some other feedback. Since most of us eat a relatively manageable variety of foods, we should be able to get an instinctive feel for "how much" we are consuming on a meal-by-meal and/or day-by-day basis. Indeed, he talks about getting to this point, by accident. I intend to get there much sooner, on purpose. By keeping a food log and comparing it to weight loss/gain over the period of a month or two or three, and studying it in hindsight, I should be able to get a feel for three "thermostat settings": lose weight, maintain weight, gain weight. It may be a bang-bang approach, but there's also the minute automatic adjustments and body's metabolism adjustment working in your favor while trying to stay stable.

I have adjusted my weight graph to include a trend plot as described in the book. While I was at it, I added the plot for measured body fat percentage (which I need to start doing more frequently). BMI is a linear relationship with weight, so the kg on the left correspond with the BMI on the right. So, by graphing measured body fat percentage you can see whether I am above/below the BMI for my given weight, plus see that otherwise invisble chasm between losing fat and losing weight. If you'd like to set up your own such graphs, I'm happy to share my code with you. Just drop me a line.

no comments |

The Heart Rate Chasm

Posted by Hans Fugal Fri, 31 Aug 2007 15:41:00 GMT

My Swimming Book makes the following claim: if you work out at lower (but still aerobic) intensity you burn more fat per calorie than if you work out at higher intensities. Note that it says per calorie, which means you have to work out longer. A rough guideline is to go the same distance as you would at the higher intensity.

Unfortunately he doesn't give any references and no numbers or graphs. One is left wanting more information. But if you try to google that topic you will find two camps yelling at each other from across a great chasm.

Group 1 says keep your heart rate down in the fat-burning zone. Group 2 says group 1 is a bunch of fools and that although the ratio may be higher you burn more fat by working at a higher intensity because you burn more calories. The amusing thing is that neither side ever cites any references whatsoever, nor gives any concrete numbers. Neither side gives due diligence to pointing out that you can burn the same amount of fat either by working easy-but-long or hard-but-fast. Calorie burn rate (time) and intensity are a tradeoff, but to the two groups there is no compromise.

Finally I found a white paper with solid logic and numbers and graphs. (Still not enough references, but at least there are some.) Check out the graph on page 8 which confirms what I suspected: there is a point of diminishing returns. Choosing Zone 2 over Zone 1 is a no brainer. Choosing Zone 3 over Zone 2 looks marginally smart. Choosing Zone 4 over Zone 3 (when fat loss is the only consideration) is silly—you use more calories to burn the same amount of fat. Of course there are lots of reasons to go into Zones 3 and 4, like training for races, cardiovascular health, building more muscle, and burning off the extra helping you had at breakfast. But if you're looking to burn fat efficiently, It looks like roughly 70% of maximum heart rate (220 minus your age, as an estimate) is the point of diminishing returns, and a good aim.

Now, that said, there is a lot of variance in the fat burning range. In fact, the whole point of that white paper is to teach you how to increase that anaerobic threshhold so that you can burn a higher fat percentage at higher intensities, effectively raising that point of diminishing returns and allowing you to burn more fat per minute. This is another thing the TI book said you could do but didn't give enough details for my taste.

Of course, let it not be forgotten that the thing that makes the most difference is actually getting up off your duff and into the pool.

Posted in | 2 comments |

Body Density Measurement Uncertainty

Posted by Hans Fugal Thu, 23 Aug 2007 02:06:00 GMT

A couple days back I posted my idea for measuring body density and estimating body fat. Dad, who has a set of skinfold calipers gave it a try and gave me comparative results, and asked the question on everbody's mind: just how accurate is it, especially with that pretty blatant guess at residual lung volume?

So I took some time to learn how to account for uncertainty and take a stab at pinning a confidence interval on the technique. First of all, I didn't realize how complicated uncertainty propogation is. Partial derivatives, squares and square roots, etc. Luckily, I came across some lecture or presentation notes detailing a sequential perturbation method (instead of an analytical method). I could have talked Jacob into walking me through the partial derivatives, but this method is easy to code and a find in and of itself. Read about it in this PDF.

I coded up the formula and ran some test data through it. Here's the equation again for review: ρ = m / ((m + mc)/ρw - (va + vc + vr)) Here's the values and uncertainty I attribute to each variable:

  • m = 121.29 ±0.02 kg
  • ρw = 0.997 ±0.001 kg/l
  • va = 1.13 ±ٍ0.01 l
  • vr = 1.87 ±0.5 l
  • mc = 0 ±0.02 kg
  • vc = 0 ±0.01 l

I didn't actually use a counterbalance, but I included the uncertainty in measuring its mass and volume as if I had, just for completeness. As suspected, vr has the largest uncertainty. I calculated the uncertainty if vr were magically accurate, and found that the uncertainty was 0.0014 kg/l. This translates to about 0.65% body fat with Siri's equation (ignoring the uncertainty inherent in that equation, which is a constant bias accross measurements for one person on any given day).

Note that I give ρw this time, instead of whisking it away with a magical 1 kg/l. I picked an average value between 72°F and 84°F (most pools are in this range), with an uncertainty (due to water temperature) of about 0.001 kg/l. If you use 1 kg/l instead you are introducing a bias of about 0.9% body fat. So I was wrong about that being insignificant.

Now, I found a better estimate (why better? because it seems to come from a more reputable source than Wikipedia) for residual lung volume: vr = RV = 0.24 VC. So I may have overestimated my RV last time by ½ liter. (Update: I think that must be a typo on that page, they probably mean 24% or 28% of total capacity instead. This fits in much better with the rest of the literature that I have found, e.g. Quanjer and Paoletti.) That seems like a generous uncertainty measure for RV, too. With that uncertainty factored in, we get an uncertainty of about 2.1% body fat, or about 5% is you are on the slight side of average (the less you weigh, the more difference that 1/2 liter makes).

So, Dad, let's bump your score up by about 1% for the density of water and then tack an uncertainty of 2% onto it, you have a body fat of 26.3% ±2%. I'm no expert on using calipers, but one paper's abstract indicates that the skinfold method uncertainty is about 3%. I've seen 10% tossed around casually too, but have no reliable source to back that up. That puts the two methods within the appropriate reach of eachother, which is heartening. It's interesting to note that BMI is overestimating Dad's fat, because he's more lean than the average couch potato. Imagine the difference if the subject were someone completely nuts, like a young triathlete, who has body fat of about 15%. Even better, if you are such a nut you could do the experiment and post your results (and BMI) here as a comment for us to see.

Posted in | 1 comment |