A mathematical approach to weight loss: closed-loope control

Health, Fitness, Insurance, ...
Post Reply
User avatar
Eureka
Posts: 212
Joined: Fri Jun 10, 2016 11:03 am
Location: Copenhagen, Denmark

A mathematical approach to weight loss: closed-loope control

Post by Eureka » Thu Jan 12, 2017 5:43 pm

Here is a guy (Danish of course, his name is even Jakob) whose mathematical approach to weight control is as clever as it is simple. And the math guarantees you exactly the weight you want to loose or maintain.

The Technology Professor Jakob Stoustrups has developed a control theory perspective on weight control and made it into a simple feedback algorithm. He also tried it out himself, thus providing experimental data verifying the algorithm.

His idea is that you plot your target weight for each day into a diagram and then you weigh yourself each day +you weigh your food and eat exactly the weight of food you need in order for weight of food plus weight of body to match the target weight. No less, no more. That is all you need to do.

There are no criteria for what kind of food or when to eat it during the day. Of course common sense says to eat sensibly healthy, but that is not even relevant if weight loss is the only aim.

Weight-loss Jakob set a target to loose 7.4 kg during a 31-day weight loss period, i.e. a daily decrement of 239 g, and after 31 days, he had lost exactly 7.4 kg.

Image

The full description including math and biology is here:
http://blog.ifac-control.org/2016/12/05 ... -feedback/

User avatar
BRUTE
Posts: 2006
Joined: Sat Dec 26, 2015 5:20 pm

Re: A mathematical approach to weight loss: closed-loope control

Post by BRUTE » Thu Jan 12, 2017 10:35 pm

doesn't solve any of the problems humans have with fat loss - like hunger, boredom, conditioning, social pressure..

as far as algorithms go, brute's algorithm is far better:

1)eat if target weight reached. if above target weight, no eating.
2)go to 1

User avatar
Fish
Posts: 126
Joined: Sun Jun 12, 2016 9:09 am

Re: A mathematical approach to weight loss: closed-loope control

Post by Fish » Fri Jan 13, 2017 12:02 am

I'm rather impressed by how much he simplified the problem. His model is beautifully crude. It's something I can appreciate after skimming a bunch of academic literature trying to determine who was first to prove the feasibility of extreme ER.

In the FIRE analogy, the people who were well-versed in the "science" were off studying other problems. Economists and financial planners trying to predict and optimize/maximize consumption. Several academics independently had the insight that a high savings rate means more money saved AND not having to save as much for retirement. But they were locked into close-minded assumptions about retirement age, and their financial equations were too overly complicated for them to discover the possibility of FIRE.

Jacob's assumptions in deriving the FIRE equations are just as crude as the human body model that we're discussing here. The constant-income, constant-spending assumption even makes non-academics squirm. But the resulting conclusions are robust to real-world variations in income and spending. It's good enough, and that's what matters.

As another note, this concept of "weight loss feedback control" can be applied to any system that obeys a conservation law, even personal finance. One can design a variable budget that responds to changes in net worth and use that to reach financial goals. The concept is simple but as with weight loss the difficulty is psychological.

But you don't even need feedback to FIRE. Based on a target FI date, choose the appropriate savings rate (e.g. 75%) and whenever you have ANY income, first put 75% into a savings account/locked box/investments. The remaining 25% is the entire budget (no debt allowed!) and can be spent on anything. Keep it up and you will begin an inexorable march to FI.

J_
Posts: 500
Joined: Tue Nov 01, 2011 4:12 pm
Location: Netherlands/Austria

Re: A mathematical approach to weight loss: closed-loope control

Post by J_ » Fri Jan 13, 2017 9:11 am

@Eureka Nice post, yes your Danes are loved: all those Jacobs, and the beautiful drama Borgen I saw last year on DVD!!
But my math is a little bit eroded. Jacob made a little sheet how his math worked out. Can I ask you to make a little sheet how the math of this Jacob works out? Lets say my weight is now 78 kg, I want to reduce it to 73 in 40 days. What must be the weight of my food intakes per day?

jacob
Site Admin
Posts: 8824
Joined: Fri Jun 28, 2013 8:38 pm
Location: USA, Zone 5b, Koppen Dfa, Elev. 620ft, Walkscore 73
Contact:

Re: A mathematical approach to weight loss: closed-loope control

Post by jacob » Fri Jan 13, 2017 12:13 pm

@J_ -

daily_loss=(78-73)/40=0.125kg/day

If t is the day and X(t) is your weight on that day then
For t=<40, you can eat 78-0.125*t-X (if it's negative, you can't eat anything)
For t>40, you can eat 73-X (if it's negative, you can't eat anything)

This approach is a very simple proportional control system (see https://en.wikipedia.org/wiki/PID_controller) that takes advantage of a few physiological facts, namely that "humans are made out of food" which means that the amount of calories that takes to lose a kilo of weight is very approximately the same(*) as the amount of calories one needs to eat (beyond what one uses) to gain a kilo.

There are many ways to improve a PID controller to make it more stable ... e.g. make it less likely that you go into "hunting"-mode where you don't get to eat one day .. but then have to eat a lot the next day. In the paper, he doubles the measuring frequency to compensate. The right way to do it would be with a Kalman filter that takes other variables into account along with a physiological model, but it would drown the illustrative purpose in math. That, however, would be the way to go if you were to put it into a fitness product.

(*) You'll notice that in practice ... 1kg of potatoes is 800kcal. 1kg of bodymass is 7700kcal. 1kg of olive oil is 9000kcal. In order for the algorithm to be unbiased, your food's energy density should be the same as the density of what you're eating. In practice, unless you subsist on a diet of olive oil, the algo is biased to make you lose weight even if you're trying to maintain it. You can of course again fix this by looking at caloric flows instead of mass flows(**) but again that would drown the point/paper in details---in particular it would require people to use calorie calculators for every meal ... something few dieters seem willing to do. (All sorts of schemes have been invented to make this process easier. Weight Watcher points (precalculated), Beach Body containers (by volume and type instead of mass), scales with built in calculators, apps, preset diets.)

(**) The algo could be fixed by fiddling with the amplication factor, e.g. if you eat only potatoes, your K factor is 7700/800 = 9.6 .. so if you're 72kg, you get to eat 9.6kg of potatoes.

User avatar
BRUTE
Posts: 2006
Joined: Sat Dec 26, 2015 5:20 pm

Re: A mathematical approach to weight loss: closed-loope control

Post by BRUTE » Fri Jan 13, 2017 10:18 pm

i.e. the algorithm simplifies too much to actually be useful. if "any math sounding thing will provide motivation" is good enough, there are billions of other pseudo-scientific and equally useless ideas out there, like brute's "no eating until weight loss completed" protocol (which is both easier and more effective).

7Wannabe5
Posts: 2429
Joined: Fri Oct 18, 2013 9:03 am

Re: A mathematical approach to weight loss: closed-loope control

Post by 7Wannabe5 » Sat Jan 14, 2017 11:22 am

I think this might proof to be a useful algorithm because it has been shown that one of the major differences in behavior between thin vs. heavier people is that the thin individuals maintain a tighter boundary on weight they find acceptable. It would also have the benefit of being more accurate and less tedious than calorie counting/calculation. The main obstacle, as was noted as a minor problem by the author, would be the social liability of having to weigh your food, and also the need to always have access to a body weight scale.

One question that immediately occurred to me was how were non-caloric beverages taken into account in this method? The average adult human body is about 65% water with men or more muscular people retaining relatively higher percentage vs. females or more fatty people. Most inexpensive food contain little water because dehydration or condensation reduces storage and transportation costs. So, rice, lentils, oatmeal, all need to be re-hydrated to be rendered edible. OTOH, Dollar Store cookies and walnuts can be eaten without re-hydration due to high fat content. Butter, raw ground beef, re-hydrated lentils and water have approximately the same weight for equivalent volume. A cup of honey will weigh approximately 50% more than a cup of butter, but hold fewer kilo-calories.

So, a simpler approximation for measured weight of food would be measured fresh,wet and/or raw volume with 2 cups equivalent to 1 lb. in the archaic system with which I am most familiar. A human being who weighs 150 lbs consists of approximately 300 cups of fresh, raw, wet flesh. The average human tends towards wanting to consume somewhere between 2 or 3 lbs. (or 4 to 6 cups )of food/day towards satiety. Therefore, the most simplistic BRUTE diet might be best achieved by combining daily internal burn/consumption of 2 cups raw human flesh (approximately 2100 kcalories) with intake of 2 to 4 cups of broth (24 to 60 kilocalories.) Those who suffer from the desire to "have a life" or other weaknesses, could adopt/adapt some more moderate practice that would hold volume/weight of food steady, but adjust water content of next meal, or set of meals, based on last measurement of body weight in adherence with initial algorithm.

J_
Posts: 500
Joined: Tue Nov 01, 2011 4:12 pm
Location: Netherlands/Austria

Re: A mathematical approach to weight loss: closed-loope control

Post by J_ » Sat Jan 14, 2017 1:12 pm

@ Jacob, thank you for your clarification. It helped me really.
@ Brute, it is for me not an unuseful thread, (but I like your algorithm ;)

Things I learned:
1 that most bodyweight you loose via the CO2 and waterdamp in your breath. As stated in the original article.
I weighted myself last night before sleeping, and this morning: it is true I was 1 lbs (0,5 kg) lighter!
2 I like professors who use their own body to verify their thesis! His graph and clarification helps a lot to understand his formula and how your body behaves.
3 I do not have a bodyweight issue, but I think I can help others who have problems with this approach.

Brute's algorithm is too simple, as you do not eat you die or got ill. Not everyone is so strong as Brute who does not need any food if he is too fat.

User avatar
BRUTE
Posts: 2006
Joined: Sat Dec 26, 2015 5:20 pm

Re: A mathematical approach to weight loss: closed-loope control

Post by BRUTE » Sat Jan 14, 2017 2:36 pm

J_ wrote:Brute's algorithm is too simple, as you do not eat you die or got ill. Not everyone is so strong as Brute who does not need any food if he is too fat.
incorrect. above crazy low body fat (~5% for human males, ~10% for human females), no food intake is needed for survival. that's what body fat does.

7Wannabe5
Posts: 2429
Joined: Fri Oct 18, 2013 9:03 am

Re: A mathematical approach to weight loss: closed-loope control

Post by 7Wannabe5 » Mon Jan 16, 2017 5:24 pm

I am going to try this plan. My digital scale registers to 1/10 lb., so I will make my projected goal of daily loss = .3 lbs. It is not always convenient to weigh my food, so I will make use of a plastic sandwich box which holds exactly 16 oz. of water for purposes of volume estimation of weight combined with a bit of common sense about high volume low calorie foods such as salad greens.

User avatar
BRUTE
Posts: 2006
Joined: Sat Dec 26, 2015 5:20 pm

Re: A mathematical approach to weight loss: closed-loope control

Post by BRUTE » Mon Jan 16, 2017 10:10 pm

the scale might show a precision of 1/10th of a lb, but that might not be accurate. few body weight scales are accurate to even one pound. regular daily fluctuations in fluids and intestine content are also easily up to 5-10 lbs. in the graph in the OP, swings are around 3-4kg per day, pretty much the same amount.

godspeed.

ducknalddon
Posts: 152
Joined: Fri May 20, 2016 5:55 am

Re: A mathematical approach to weight loss: closed-loope control

Post by ducknalddon » Tue Jan 17, 2017 3:27 am

BRUTE wrote:the scale might show a precision of 1/10th of a lb, but that might not be accurate. few body weight scales are accurate to even one pound. regular daily fluctuations in fluids and intestine content are also easily up to 5-10 lbs. in the graph in the OP, swings are around 3-4kg per day, pretty much the same amount.
Yet it did seem to work for the OP.

Did
Posts: 562
Joined: Mon Apr 01, 2013 7:50 am

Re: A mathematical approach to weight loss: closed-loope control

Post by Did » Tue Jan 17, 2017 5:20 am

@brute I am not so sure. I have read examples I'm sure where people die with fat still on them during an extended fast.

7Wannabe5
Posts: 2429
Joined: Fri Oct 18, 2013 9:03 am

Re: A mathematical approach to weight loss: closed-loope control

Post by 7Wannabe5 » Tue Jan 17, 2017 7:01 am

@BRUTE: I understand the likelihood of fluctuations and inaccuracy. That's why I used the word "registers" instead of the word "measures." I hopped on the scale before dinner yesterday, and arbitrarily set my goal weight in my spreadsheet for the day to be 1 lb. higher with .3 lb/day linear decrease. Then I had 12 oz of egg fried rice and 4 oz of butterscotch pudding for my dinner (total cost less than $.40.) This morning I weighed 6 lbs. less than my goal weight for today, so I shall enjoy a hearty 1.5 lbs of food for both breakfast and lunch. Easiest, cheapest diet ever!!! ;)

7Wannabe5
Posts: 2429
Joined: Fri Oct 18, 2013 9:03 am

Re: A mathematical approach to weight loss: closed-loope control

Post by 7Wannabe5 » Tue Jan 17, 2017 6:10 pm

Somehow I managed to lose more weight between morning and afternoon weigh-in, so now I am supposed to eat 3.75 lbs. of food for my dinner. I don't want to eat that much food. This is not the problem I expected to encounter. Granting myself that first lb of slack initially is sending the system out of bounds!!!

7Wannabe5
Posts: 2429
Joined: Fri Oct 18, 2013 9:03 am

Re: A mathematical approach to weight loss: closed-loope control

Post by 7Wannabe5 » Tue Jan 31, 2017 7:21 am

I have been bobbing up and down a bit, like the graph exhibited above, but I have lost a solid 5 or 6 lbs. in 15 days following this method. I continue to find compliance very easy and visual estimation of weight of food to be "good enough." I am pleased that this plan is working for me, because it will be a good fit in my overall system design with my total weight goal for production in my perma-culture food production/processing project. Measuring food consumption or production in kilo-calories is quite tedious by comparison.

simplex
Posts: 171
Joined: Sun Sep 04, 2011 9:28 pm
Location: NL

Re: A mathematical approach to weight loss: closed-loope control

Post by simplex » Thu Feb 02, 2017 10:34 am

This was a fun article to read.
It is very similar to the Steve Ward diet: http://philip.greenspun.com/writing/cha ... and-weblog (from 2009, second headline). It uses kind of bang-bang control.
Just eat only broccoli on overweight days.

Post Reply