Sunday 26 July 2015

The 25:5 diet - first impressions

Those who know me personally may be surprised that I'm dieting. At a bit over 6 feet tall in the old units, and about 73kg in the new, I am not what you would call overweight.

But for me,  dieting is not about weight. Since being diagnosed with MS in 2007, I've become much more interested in my health, including doing the best that I can do with diet. Diet is in our modern medical system, largely overlooked as a tool to treat illness and maintain optimal health. We tend to focus on pills and surgery for almost everything, but for MS (and for many other illnesses) neither of these approaches have been particular successful.

Research has shown that restricting dietary calories increases healthy lifespan in every animal that has been studied from nematode worms to monkeys. And that you don't need to do it all the time to have the same kinds of effects - alternate day fasting, intermittent fasting and the now popular "5:2 diet" show various health benefits. In the case of the 5:2 diet, by restricting calories on two non-consecutive days each week and eating normally on the other 5 days. Various versions of these diets are designed to get the positive effects without causing too much suffering in the dieters (this is important because if too much suffering is involved most people won't be able to follow the diet for any length of time and the whole thing becomes a bit pointless).

The diet I want to talk about today doesn't have a name yet, other than "Fasting Mimicking Diet" as labelled in the research paper that it comes from. This isn't very catchy or very informative though, so I'm going to call it the "25:5 diet", for reasons which will become clear.

First, lets look at this science. Although this isn't my area and there are doubtless things I haven't picked up on or don't understand fully, I feel I can make a pretty reasonable summary of what the findings were. The paper is "A Periodic Diet that Mimics Fasting Promotes Multi-System Regeneration, Enhanced Cognitive Performance, and Healthspan", by rather a lot of authors: Sebastian Brandhorst, In Young Choi, Min Wei,  Chia Wei Cheng, Sargis Sedrakyan, Gerardo Navarrete, Louis Dubeau, Li Peng Yap, Ryan Park, Manlio Vinciguerra, Stefano Di Biase, Hamed Mirzaei, Mario G. Mirisola, Patra Childress, Lingyun Ji, Susan Groshen, Fabio Penna, Patrizio Odetti, Laura Perin, Peter S. Conti, Yuji Ikeno, Brian K. Kennedy, Pinchas Cohen, Todd E. Morgan, Tanya B. Dorff, and Valter D. Longo; in the Cell Metabolism journal (for which free online access is given here).

These guys applied the Fasting Mimicking Diet to three very different organisms: yeast, mice, and people. Now clearly the comparison isn't exact, for instance yeast doesn't get cancer, and you can't cut up human test subjects to measure their organs, but there are a lot of points at which you can make comparisons. The basic approach is to trick the body into thinking it is starving (and in a sense, it is) over a period of 4 or 5 days by 1) restricting calories to less than half of the daily metabolic requirement and 2) restricting protein to less than a quarter of the recommended daily minimum. The results are summarised in the table below:


Impact Yeast Special Mice Humans
Diet cycle Nutrient rich growth medium for 2 days, followed by water for 2 days. Half of normal calories on day 1, 10% of normal calories day 2-4, by low protein and low fat food. Day 5 to 14 normal rodent chow. The mice ate enough extra on the feed days to make up for the diet in calorie terms, over each cycle. Half of normal calories on day 1, a third of normal on day 2-5, limit protein intake to 9-10% of total energy budget. Day 6 to day 30 eat whatever you like.
Lifespan About a 20 to 50% lifespan extension, depending on how you look at it. Half of the control group had died by 25.5 months. In dieting mice, this point didn't occur until 28.3 months, an 11% life extension. The life extension effect got larger the older the mice got (the control mice died sooner) but there was no effect on maximum age achieved. Can't assess that in a short clinical trial. None of the subjects died during the study.
Cancer Yeast don't get cancer, It's a multi-cellular organism's problem. The special mice are a strain that gets cancer a lot. Without doing anything mean to them, about 67% of the control mice have some type of cancer at the end of their life.
In the dieting mice, the rate was 40%.
No one got cancer during the study (and no one was expected to).
Visceral fat (the stuff that sits in your abdominal cavity, around your vital organs) Yeast don't have visceral fat Compared to the control mice, the dieting mice had the same lean body mass as the controls, but less total body fat (and less weight). Fat under the skin was about the same, but visceral fat was lower in the dieting mice (all measured during the feeding period). The dieting humans had 3% lower bodyweight at the end of the trial, visceral fat was trending lower and lean body mass was slightly higher.
IGF-1 Not applicable to yeast Reduced by 45% at the end of the fast period, returned to normal within a week of re-feeding. Reduced by 25% at the end of the fast period, remained somewhat reduced during re-feeding.
Insulin, glucose and ketones Not applicable to yeast Blood glucose dropped by 40%, insulin levels by 90% and ketones increased by 900% at the end of the fast period, these all returned to normal levels during the re-feeding period. Blood glucose dropped by 11% and remained 6% below normal even during the re-feeding phase. Ketones increased by 370% and returned to normal during the re-feeding phase.
Inflammation and stress resistance Fasting yeast were 100 times more resistant to hydrogen peroxide This breed of mice is also very prone to severe ulcerating dermatitis, at a rate that requires 20% of control mice to be put down. In the fasting group this was only 10%. C-reactive protein (a risk factor for inflammatory heart disease) was reduced in dieting humans.
Immune system health Not applicable Increasing age causes reduced production of adaptive immune cells in the control group. This normal decline is reversed in the fasting mice. Not measured
Regeneration Not applicable Stem cell levels in the dieting mice increased a lot, likely to contribute to regeneration of cells and systems. Possible increase in stem cells but not significant in the study.
Cognitive performance Not applicable Compared to the control mice, the dieting mice had enhanced cognitive performance, better motor learning, short term and long term memory. Evidence of promoted adult neurogenesis in the fasting mice. Not measured

So it looks like this diet will probably promote a longer, healthier life with improved cognitive and physical function into old age. How do we do it, and how easy is it to do?

First, we need to cut calories from about 2400 kCal per day to about 725, only about a third of normal. Second, we need to reduce protein intake to only about 10% of those 725 kCal. Thirdly, despite this we need to get as much nutrition as possible to avoid running short of any essential nutrients and causing problems. I found that it was reasonably easy to achieve all of this by:
  • only eating plant-based foods, mostly vegetables, vegetable soup made with chicken stock, and salads. I also had dietary fibre supplements (psyllium husk) as a substitute desert. 
  • no high protein foods - so as well as no meat, also no mushrooms, beans or peas, tofu, eggs or dairy, or nuts
  • carefully control fat and carbohydrate consumption to limit total calories to the target. I found it easy to exclude carbohydrate rich foods altogether (starchy vegetables and grains), and to carefully control fat consumption (maybe 40g per day, mostly as salad dressing and for stir-fried green vegetables.
Here is my typical fasting day:
Breakfast - a soy latte (a habit, I find it easier to manage the fasting phase if I dont give up all my normal habits).
Lunch - a plate of salad with vinaigrette from my cafe at work. Choose the low carb, low protein salads (no meat, beans, cheese, potato etc.). The vinaigrette is important to make it delicious. I figure it may be 10 to 20g of fat total, mostly in the vinaigrette, but this is a guess only.
Dinner - a bowl of cauliflower and leek soup, and some stir fried green vegetables (maybe another 10 to 20g fat).
Desert - 150g blueberries, psyllium husk jelly and 20g coconut cream.

I found this pretty easy to comply with, because it was all nice food and relatively filling. Another meal that works is ratatouille  - as long as you're careful with the oil in the recipe, the rest of the ingredients are all low carb, low protein and low energy. Having a significant fraction of allowable calories from fat seems to be important in making the food palatable.

Over the 5 days I felt a bit hungry sometimes, but not ravenously so, and never following a meal. My urine ketone levels went quite high, well above 5mmol/L. My weight dropped by about 1kg - which would correspond to using about 200g per day of stored fat to make up about 1800 kCal of daily energy deficit. I figure this means I got the diet about right without precise calorie counting each day.

I found this easier to do than the 5:2 diet, partly because the food quantity was higher and it was more palatable, and partly because you quickly get used to eating less. In the 5:2 diet, the diet day was always slightly traumatic and unsatisfying because each time it is a change from the day before.

So far, it looks like this is fairly easy to do. I'll post again next month with some real data and graphs.




Thursday 23 July 2015

A lithium ion battery story

I've been riding e-bikes on and off for years now. I'm on my 4th build, all using the same bicycle, and I've learned some things. Which can basically be boiled down to: you really want a rear wheel drive geared hub motor and a mid-mounted battery - Lithium iron phosphate, if you want durability and worry-free charging.

Anyhow, that's a story for another day.

Build three and build four both used Iron-Phosphate chemistry lithium ion batteries from Ping Battery. Build three was a 24V, 20Ah system that was uneventful from the battery end of things - it worked perfectly and as far as I know it is still doing so as part of a UPS that a mate has reconditioned. Build four was a 48V, 10Ah system - the controller I selected for the system wouldn't operate on less than a 36V pack so I needed another battery. 48V seemed like a good idea because the currents are all smaller for a given power output, so the wiring and connectors don't need to be as robust.

Ping batteries have a neat little BMS board, which routes the main negative lead from the battery through a bank of parallel power transistors. A sensor wire comes from each junction between cells and connects to the board - 16 cells for the nominally 48V battery. The sensor wires let the board know what each individual cell voltage is, and as far as I can tell, during discharge the BMS does the following things:

- it closes the power transistors effectively shutting off the battery pack if any individual cell drops below a pre-determined voltage limit, to protect that cell from low voltage state and possible polarity reversal caused by the rest of the battery continuing to push current through it.

- shuts off the pack if the total battery voltage drops below a pre-determined limit

- shuts off the pack if current exceeds a pre-determined limit

Charging uses the bulk charging method, which passes a controlled reverse current through the whole battery pack, charging all the cells at the same time and by the same amount. Because the cells are not identical, this will eventually lead to some cells being over-charged. To prevent over-charging of cells, if a cell voltage exceeds a pre-determined limit, the BMS opens a small circuit just for that cell, which dissipates some energy through an overflow resistor and lights up a small LED to let you know what is happening.

Hence, what you see when you charge the pack is that as it gets close to fully charged, the LEDs start coming on more of less at random (there's that word again) until they are all lit up - meaning that the trickle current still being delivered by the charger is all being dissipated as heat by the overflow resistors. This would mean that all the cells are at the same voltage limit (and state of charge), hence the pack should be balanced at the fully charged state (which is where you want it balanced).


PRELUDE - DODGY BEHAVIOUR AT THE END OF THE BATTERY

The first clue I had that something wasn't right (which I didn't realise at the time), was that the last 4 LEDs on the battery management system were failing to light up consistently. I found out later that this was probably in part or in whole due to a design fault with the BMS. The later BMS design, which replaced this one, boasts a "Different power source. The elder version of BMS or some other BMS in the market are powered by the lowest 4 series of battery cells. The V5 BMS is powered by all the cells. This way, the battery pack won't be imbalanced even it's not charged for long time when BMS is connected."

Hmm. Lowest 4 cells eh? ...co-incidence? 

This shouldn't have been a problem by itself. I did leave the pack on charge, even overnight a few times but the last 4 cells stopped lighting up. I now guess this would mean that the power being withdrawn to power the BMS must have been about equal to, or exceeded, the trickle current from the charger once it had gone into trickle / voltage maintenance mode. It might have been avoided had the charger been adjusted up to a slightly higher cut-off voltage - enough to make sure that all 16 cells reach the overflow state, not just the first 12.

So, unbeknownst to me, I was riding around on a battery pack that was becoming progressively unbalanced, the last four cells getting to a progressively lower state of charge than the rest of the pack.

PART ONE - DISASTER IN THE RAIN

As I mentioned, I didn't recognise this as a problem until much later. What I did recognise as a problem occurred riding home one day in an exceptionally heavy downpour, safe in the knowledge that the battery and electrical connections were safe and secure in a waterproof bag. Well, more water-resistant as it turned out.

Complete power loss at the end of Coward street in Mascot.

Stopped under the bridge near the airport, power starting to come back on, but seem to have a large voltage drop if I open up the throttle too far. Limped home, then discovered blackened plastic over the end of the BMS and some blobs of solder that had, until recently, helped secure the negtive power lead to the output transistors on the BMS. A closer look at the BMS showed droplets of condensation on the inside of the clear plastic shrink-wrapped cover. 

Crap. I had been unlucky enough that some water had dripped into the tiny opening in the end of the shrink wrap and landed directly on the BMS circuit board. At least thats what I assumed had happened.

So I unplugged the BMS and contacted Ping from PingBattery. On his advice I read off the voltages of each individual cell and they all seemed ok. Clearly the BMS itself was either toast or not to be trusted, so I disconnected it altogether. A battery, pure and simple, no electronics. Since during charging, all the cells appeared to light up in very rapid succession (except for the 4 dodgy ones at the end of the pack), I figured that the cells were so well matched that I could safely ride and bulk charge for a while without a BMS, until the new one arrived in the mail from Ping.

PART TWO - AMPUTATION

After riding a few times I noticed the battery performance getting progressively worse. I was getting substantial voltage drop, indicating empty state, after around 5 Ah (on a 10Ah pack - about 50% of charge). Not quite enough to get to work. I figured the battery was probably screwed. I read off the cell voltages and the first 12 were fine, the last 4 were way below minimum discharge voltage, all the way down to only a volt or so each (minimum safe voltage for these cell types is supposed to be about 2.8V).

What I now think happened here, was that when the faulty (wet) BMS had shorted, it drew all that power to toast the power transistor and melt solder, from just the last 4 cells of the pack - leaving them in a much lower state of charge than the rest of the pack. This explains the big voltage drop as the battery discharged: as those 4 cells reached the empty state, the good cells pushed them down way below their safe voltage, making it look like the whole battery was discharged. Precisely the kind of thing that a BMS is supposed to prevent, though in this case it was probably precipitated by a BMS fault.

The solution? Open up the battery and remove the 4 weak cells, leaving me with a 12 cell, nominally 36V pack. Some really chunky solder holding those cells together, couldn't separate them using my little 60W soldering iron. So I broke out the retractable stanley knife to cut through the copper electrodes below the solder. Then packaged the thing back up - cut down the fibreglass panels to match the slightly shorter battery length and wrapped it up in fibre tape. Good stuff, fiber tape. Just like sticky tape only a lot stronger, and no stretch.

The next step was to solder on a main discharge lead to the new end of the battery, and attach some new Anderson powerpole connectors. Cut wire, strip insulation, fit new powerpole conductor, fit a piece of stickytape over to prevent it shorting as I do the other wire. Repeat: cut wire, strip insulation... BANG!!! Sparks everywhere. Blobs of molten metal have burned small holes in the dining room table and a piece has been melted out of the side of my tool steel wire stripper. The connector that I had insulated with sticky tape had vapourised completely, though the wire it was attached to was fine. Ok, so sticky tape (fibre tape) is not such a good insulator, even for 36V.

Anyhow, finished packaging up the pack, put it back on the bike and everything seems to be fine. Apparently a transient current of what must have been at least several hundred amperes didn't do it any harm at all. By now I've acquired a BC-168 battery charger (thanks Paul!) which reads voltages and independently charges up to 6 cells in a block - two blocks for this battery pack, now. The pack seems to still be working fine. As far as I can tell, the usable capacity seems to be about 9.3Ah - and this is regularly drawing about 50% more than the rated current (although for most of my commute I'm drawing less than the rated 10A).

PART THREE - DEATH BY DISCHARGE

So I've been riding around with the reduced voltage pack for a while, and everything is going fine. I've watched this clip from Jeff Dahn which goes a long way towards explaining what goes on with lithium ion battery death, and figured that if I'm leaving the pack unused for a while, I could maximise the life of the cells by keeping them close to the discharged state. Thinking this was a great idea, I left for a short break, returning about a week better to find an apparently dead pack.

Normally I leave my cycle analyst connected to the pack, partly out of laziness and partly to let me see the pack voltage at a glance. What I hadn't considered is that the cycle analyse itself draws about 10mA of current, and because the pack was nearly empty, this was enough to deeply discharge the battery pack, below the approximately 21V lower operating limit for the cycle analyst.

I connected the BC-168 to check the cell voltages - bad. Several read zero volts, some were at various points around 1 volt and all of them were under 2 volts (remember these are not supposed to ever be discharged below about 2.8V). Hit the charge button,  it started charging the cells, but only the ones that weren't dead flat. Of course - the dead flat cells just look like an open circuit as far as the charger is concerned. Disconnecting the BC-168, I connected my bulk charger immediately - nothing happened. Apparently the pack voltage was so low that the charger had not registered that a load was attached. So neither charger can recharge the pack!

I fixed this by charging both pairs of 6 cells for a few minutes using the BC-168, bringing up the voltages of the not-dead-flat cells. I figured if I could get the overall pack voltage high enough, the bulk charger would register that a pack was attached, which I could then use to get some current into the dead-flat cells. It worked. I left it bulk charging for a few hours, then disconnected it, recognising that at the very least, the pack would be badly out of balanced, probably with some badly damaged cells and possibly even dangerous.

PART FOUR - BACK FROM THE DEAD?

I used the BC-168 balance charger to balance up the pack, taking a couple of days. I used it to ride around for a few trips, looks ok although checking with the balance charger shows that apparently some cells are leaking charge because they seem to drift out of voltage with the others. Probably manageable if I balance it regularly, at least until I get a new pack.

Then I left the balance charger on overnight - no big deal. At least, not for a battery that is balanced - it stops charging when the pack voltage gets to 42.6V. The problem was that some of the cells were leaking (I thought). When I checked the cell voltages that morning, they were varied - some at only about 3.3V but one of them was at 4.5V! Remember these cells are supposed to operate between about 2.8V fully discharged and about 3.6V fully charged. Even LiPO cells are not supposed to go as high as 4.5V.

Ok, go for a quick ride to get that voltage down - when the cells are fully charged, voltage changes very rapidly with state of charge, so even a small amount of discharge should greatly reduce the voltage of the over-charged cell. It worked, thankfully, then I put the pack back on the balance charger.

The more that I rode around, and after several weeks of regular balance charging, the pack started to behave better and better. The cells stopped drifting in voltage - it seemed it wasn't self discharge or leakage after all, rather some kind of slow dynamic within the battery that made it look balanced, even though it wasn't properly balanced yet. Less and less balancing became required as the weeks went by until it seemed that I had a perfectly good battery pack once more. And the pack capacity? I haven't measured it with any confidence since then, but it's still at least 8.5 Ah. After the amount of abuse that I've inflicted on that pack, I'd say that's remarkable. Two thumbs up for Mr Li - his BMS may have left something to be desired, but it appears that the cells used were top-notch.

LESSONS LEARNED

What do I know now?
  • Cell balancing in a battery pack is important - you can get away without it for a while (maybe a long while) but eventually things will start to go wrong. Make sure you at least check the individual cell voltages periodically - otherwise you risk over-charging or over-discharging individual cells.
  • A badly out-of-balance pack can take quite a long time (weeks of charge / discharge / rebalancing) to come properly back into balance again. 
  • Make sure you don't accidentally over-discharge your pack - disconnect even tiny loads (possibly including the BMS if you are using one) if you are going to leave it sitting around for a while.
  • Make sure your battery is really waterproof! Especially the BMS.
And what do I suspect?
  • LiFePO4 chemistry seems very robust. I have way over-charged, and way over-discharged some of these cells, and they still seem to be just fine.
  • LiFePO4 is also supposed to have longer cycle life compared to LiPo, and I suspect that a large part of this is just due to the lower cell voltage being less oxidising of the eletrolyte (see Jeff Dahn's talk above.