Loop: Dynamic Carb Absorption

I’m super excited to share Loop’s latest development…it’s a big one! Dynamic Carb Absorption.

So, one of the things that has been most difficult for most new (or little kid) users of Loop app has been how to enter carb absorption times for meals. There’s lots of different strategies I’ve seen employed…breaking meals down into several different carb entries for a single meal, changing carb ratio/ISF settings, or using “fake carbs”. My personal experience was that we had used the default carb absorption times and found we had some significant post-prandial lows due to early high temping.

In the old Loop app, if you entered a longer carb absorption time and had earlier/stronger than expected increase in BGs…Loop would early high temp to cover the “unexpected” spike. Loop also assumed that the later carbs you’d entered were still coming. Basically, Loop was unable to assume that perhaps the carbs were simply acting quicker, and therefore decay them quicker. Conversely the same was true…if you entered a short carb absorption time, but the carbs were actually taking longer, you would likely see some early suspensions and have a BG spike later in the meal.

We figured out that, for us, a default carb absorption time of 90 minutes was working pretty well for our average meals. Fatty and higher carb meals needed some extra attention. We split-bolused a lot and it involved a fair degree of attention to how we entered the carbs (time of entry and carb absorption time) in order to make sure the suggested boluses were also reasonable.

We also had to keep the max basal rate fairly low (about 2.5-3 times the highest basal rate), just in case we had a situation where the carbs absorbed quicker than we’d expected. Didn’t want to let Loop overly correct in those situations.

After a bit of testing and tweaking, we got into a groove…but it wasn’t what I’d call an easy hand-off for a care giver or kid to operate. We still had a lot of “hey mom, how should I bolus for this pizza?” and “Mom, what time do I enter for the carbs?” So, while Anna was good at estimating total carbs for a meal…her actual entry of carbs into Loop app was still difficult by herself.

This difficulty led me to try OpenAPS, especially because of friends who were having troubles with school nurses and caregivers having difficulty in properly entering carbs. OpenAPS was more forgiving of a carb entry and more straight-forward (familiar) for school nurses. They seemed used to “normal” pump bolus wizard entries.

Enter Pete Schwamb. He took on the carb absorption challenge and came up with Dynamic Carb Absorption. You can read more about the idea behind it in Github here. A really good read…highly recommended.

Basically, what Pete’s done is allowed Loop to look at how BGs are responding based on a term called InsulinCounteractionEffect (ICE for short). To quote Pete:

To make an attempt to see how carb absorption is actually progressing, we can take the observed changes in glucose, subtract changes modeled from insulin delivery, and look at the resulting difference, called insulin counteraction effect.

The effects represented by this term are more than just carb effects. It includes exercise, sensitivity changes, and even errors in insulin settings such as basal rate, ISF, etc. However, since the effect of consuming carbohydrates is relatively large, we can still make some useful adjustments to Loop’s carb model by assuming that the effect is mainly carb absorption in the period following recorded meal entries.

What does this mean for us in plain English?  A more forgiving Loop if you get your carb absorption estimate wrong.


Dynamic Carb Absorption version of Loop has been available for development testing since July 1st.  We tried to use it when it was first released, but we were in the midst of trying to cram for how to deal with diabetes camp July 13-19th.  We were trying to figure out if Anna was going to loop, and if so how much and with which system.  She used Loop from September-December 2016 and OpenAPS from January-July 2017.  She’s not keen on change…so trying out a new system right before camp was just not happening.

However, once she came home from camp, we decided to give it a try.  We had a couple days of tweaking her settings after camp, which is typical.  She is quite active and at high altitude for camp, so basals and ISF need a couple days to settle down again.  About 5 days ago, we finally had things dialed in again and I could fairly confidently say that any errors in looping behavior would’ve “not been the fault of bad settings”.  So, it was time to really test.

TWO DONUTS

First test was two large donuts; one chocolate bar and one maple bar.  Typically we have split this bolus up into at least two, sometimes three, boluses.  Not my favorite thing to do.  I keep hoping for the day that Anna will know how to split her boluses herself, but we aren’t there yet.  She still asks for help on about 80% of her higher carb meals that need splits.  Sometimes I get distracted about the timing of the bolus or the eating, and she will go low early after the donuts are eaten because we’ve given too long of a pre-bolus.

So, I did something I thought I’d never do.  I told Anna just to enter 110g of carbs @ carb absorption time of 4 hours, postdate it for 20 minutes for her prebolus time, and give whatever the Loop app recommended for bolus.  It recommended bolusing for 60g of the 110g.  AND THAT WAS THE ONLY BOLUS WE GAVE.

I knew there was some inaccuracy in this entry upfront.  Obviously there are quicker carbs in there as some fraction of the overall carb count…so I knew there was going to be somewhat of a spike after eating.

But, my goal here was more than just BG control.  My goal was “How much can Loop simplify my daughter’s interaction with difficult meals and still maintain decent BGs?”  In other words, can I finally be less involved with my teen’s t1d without risking poor bolusing effects?

SUPER PLEASED with results.  Short version, she did not go above 180 mg/dl and landed after the meal around 100 mg/dl (target is 90 mg/dl).

dca1

Do I know that we could do better if I’d manually added a second bolus earlier?  Or if I’d added quicker carbs in addition to the slower carbs?  Sure.  But this accomplished something that I’ve been wanting to see for a long time…a very simplified, safe way my teen could bolus a sugary/fatty meal without danger independently and still get reasonably good (or better) BG results.  She’s not always home.  She’s not always wanting my input on bolusing.  Independence is an important aspect we are trying to nurture.  This experiment gets a big WIN checkmark from me.

NEW SCREEN

Now you’re probably wondering what that new screen is above?  That’s the new carbohydrates effect graph that pops up when you click on the carbs graph.  The graph shows, basically, the expected ICE (insulin counteraction effects) compared to carb absorption effects in grey.  Pete does a great job of explaining the graph in the earlier link, so I won’t repeat it all here.  Suffice to say, I’ve actually found quite a bit of utility in this graph for non-carb stuff too.  For example, the first two days back from camp, Anna’s basals were still too low and our ICE was leading to additional carbs being “counted” at the end of each meal.  These were for meals we had been pretty certain of the carb amounts for.  It was pretty easy to see that we weren’t coming back to target after meal AND that the BG-resistence was being picked up as “additional carbs”.  Knowing that the carb counts were correct, it was pretty easy to hone in on lack of basals as our problem still.  Once we got basals dialed in a little better, the carb counts have been fairly close again between what we enter and what ends up being counted in the ICE at the end of the meal.

IN-N-OUT Cheeseburger

Another favorite meal that we’d previously split and prebolused for.  This time we did all 60g upfront @ carb absorption of 2 hours, and let Loop do the rest.  We started the meal at 115 mg/dl so I figured the lack of split would be ok this time…Loop agreed and provided the whole bolus upfront (vs giving a portion like in the donuts scenario).

About 2 hours after eating, we hit the high point.  Finger sticks showed a max of about 145 mg/dl.  Clearly the meal wasn’t done at the 2 hours we’d initially estimated.  In previous Loop versions, this would’ve meant a need to manually correct to come back to range easier.

dca2

By the time the meal ended (over an hour after I’d estimated the meal would take), we settled nice back to target range and didn’t have to manually intervene at all.  All off a single bolus entry.

dca3

Breakfast

How about a mixed meal?  Fruit cup, spoonfuls of peanut butter, and leftover fajitas meat.  Yum…the things that teenagers eat on their own while left alone during summer mornings.  Anna estimated 25g @ 90 minutes for this meal.  Peanut butter has always been a favorite of hers, but not so much for me.  Makes the carb absorption times kind of variable.  Some of the quick carbs make it through, but then we get a later rise too.

The dynamic carbs version somehow knew that all those carbs hadn’t ended when Anna had suggested.  By keeping them in the queue, the Loop was more responsive, even while BGs were dropping with IOB, and picked up the later BG rise quite well.  Left us in perfect shape after the meal.

dca4

So after 6 days of use, and 4 or 5 of those with our basals fairly well set, here’s how we are looking on Loop DCA version.  We’ve done zero spilt boluses, and only one manual correction (last night her basals doubled in middle of night from hormones).

dca5

Anna and I are both really loving the Loop DCA.  She’s enjoying bolusing from phone.  We are still using IFTTT that we’d setup from OpenAPS in order to track site and sensor changes.  I’d say I miss the range of the edison/explorer board that could get us several rooms away…but Anna has easily picked up her old habits of stashing the RileyLink in a pocket again.  We are going to test out tonight how well using multiple RileyLinks in the house may help if she walks around with phone/receiver only.

After testing this out, we’ve felt safe to give our max basal rate room to run a little more for boluses like the two donuts.  We have made our carb ratios just a touch stronger, but I think that’s unrelated to Loop DCA, but rather some hormonal changes that we saw even before we started this system.

All in all, I think this update is going to get a lot of deserved attention and appreciation.  Makes use for kids a heck of a lot easier and safer.  School nurses won’t have nearly the same ability to mess up your kid’s day by a careless carb absorption entry.

One thought on “Loop: Dynamic Carb Absorption”

  1. What a fantastic description–I understand! Thank you for taking the time to test this (and thanks Anna!) and show us how it works. And amazing amazing work Pete Schwamb!!

Leave a Reply

Your email address will not be published.