Why DIA matters

DIA: Duration of Insulin Action

At our first endocrinologist appointment, I distinctly remember the doctor telling us that rapid acting insulins (like humalog and novolog) had insulin durations of about 5 hours.  I remember looking at the insulin curves…and I remember that the curves were distinctly skewed to the left.  Meaning, most of the insulin “action” seemed to be in the first few hours and it peaked around 90 minutes.  I also remember them saying to wait until about 2 hours had passed since the last insulin dose before considering a corrective dose of insulin…to give that insulin its due time to work.  Based on that information, I had concluded that the “tail” of the insulin duration (from hours 3-5) contributed relatively little to the insulin experience.  After all, looking at curves like the one below, it would pretty easy to say that the effect of insulin seems pretty darned small between hours 3-5 compared to hours 0-3.


Back when we were on omnipod, we used a 2 hour DIA.  Basically, we picked that setting because it seemed like after about 2 hours we noticed that insulin seemed to wear off…corrections from high BGs slowed way down after 2 hours, or our BG control of food seemed to falter for big meals around 2 hours and we’d need to give more.  We had pretty great control with 2 hours of DIA.

Our omnipod system basically only used the DIA to calculate the insulin remaining after it had been given…the insulin-on-board (IOB).  So, if BGs were coming down too quickly (have you seen what happens to kids’ BGs on trampolines?), we would look at the IOB and eat an appropriate amount of carbs to try to offset the remaining IOB.

I always knew my estimate of DIA was probably a little off.  I knew I was ignoring that little bit of insulin effect from hours 3-5.  Especially because when we had large carb meals…the system would tell me that her insulin had gone to zero, but Anna would still be dropping.  On large carb meals, those “little bits of tail” between hours 3-5 added up to a significant amount because our boluses were proportionately bigger.  The “noise” of everyday diabetes variations were less apt to hide the 3-5 hour insulin on those big meals.  But most of the time 2 hours seemed to work “about right”…so we stuck to it.

Since we’ve started to manage diabetes with closed loop systems (OpenAPS and Loop), the effect of DIA (and especially that late insulin effect tail) has become more apparent and important.  So, I thought it would be good to discuss just how DIA can impact closed loop operations.

I like to visualize carbs and insulin as opposite effects on BGs; one upward and one downward.  I have several visuals that I typically imagine…my favorite two are crowd surfers at concerts and wet paper towels holding coins.

Imagine carbs are the hands below.  Imagine insulin is the weight of the crowd surfer.  If you had a bunch of weak little kids trying to hold up The Rock (an all fat/protein meal bolused upfront entirely)…BGs would get crushed low.  If you had a tiny little baby being held up by rambunctious steroid-filled weight lifters (underbolused slurpee)…that BG might go sailing high.


Or how about the wet paper towel is a meal and the coins are insulin dosing. Can you put too many coins suddenly on that wet paper towel such that it can’t support the weight of the coins?  Yup…low BG.  Give that towel time to dry out, get strong (carbs absorb)…then it would be able to support those coins later.


With those comparisons in mind, we can look at the geeky explanation a bit more.  Simply put, carbs make your BGs go up.  Loop used to predict the “shape” that carbs would absorb as a static value much like shown below.  You’d tell Loop the time for carb absorption, and the model said it would peak halfway through….BG impacts would look much like my hand-drawn sketch below.  (Please keep in mind these are conceptual drawings…not to any scale exactly.)

dia 1

And insulin makes your BGs go down…

dia 2

If you add the up and down effects together…you hope to get a fairly even final BG curve.  We’re all aware of the difficulty in lining all of this up to achieve that…some foods absorb faster than insulin kicks in (so we try to prebolus to help that), some foods absorb so slow that insulin wears off before the food is done (so we do extended boluses to help that).  If the stars aligned, you may get a fairly good match between the downs and ups…to get a fairly flat BG result.

dia 3

If we take a closer look at those downward forces, the insulin effect, we can conceptualize that as an “area under the curve”.  All that drawing is a bunch of little tiny insulin effects added up together.  If that was one unit of insulin with an ISF= 30 and a DIA of 4 hours…you’d expect your BG to drop 30mg/dl over the entire 4 hours (assuming your basals are correct).

dia 4

But, what would happen if you considered DIA of 2 hours?  Like I’d been doing with my omnipod?  Well, all that insulin action (aka “area under the curve”) still needs to be there, so the shape of the curve changes as a result.  Like moving play-doh into a new shape.  Since the length is cut in half, the height of that curve will necessarily get longer.  The curve become more pointy, less like a upside-down bell and more like an upside-down mountain.

dia 5

In effect, BGs will still drop 30 mg/dl in both situations based on the “math” but the BGs will drop MUCH faster and stronger with the shorter DIA.

dia 6

The shape of the curves didn’t make much of a difference to us when we were using omnipod because we typically only were using the omnipod’s DIA setting much later after the bolus had been given…way down near the post-2 hours, post-3 hours after a bolus had been given when the two different curves might start to look more similar again.  We were checking IOB at times well after a meal had been bolused.

Additionally, we weren’t using DIA to calculate boluses ahead of time…all the boluses were based strictly off carb ratios and MY ABILITY to guess whether Anna would go low if I gave all the carb ratio based bolus upfront.    Quick carbs…I gave all the insulin up front.  Slow carbs…ummm, let me think about how much to give now and how much to extend and for how long.  Anyone have a calculator?  My omnipod PDM never suggested  proactively “Hey Katie, if Anna is eating pizza, you may want to give that 10 units broken up as 6 units now and 4 units extended over the next 2 hours or else she’ll be low in an hour.”  Wouldn’t that have been nice?! (hint: that’s what Loop is able to do now!!!)

So why is DIA different with Loop?  Well, it matters a whole bunch now because Loop is calculating what your curve will look like as soon as you enter carbs and a carb absorption time before you bolus.  If your upward effects (carbs) are not able to keep up with the downward effects (insulin), Loop is going worry about you going below your target BG.  It wants you safe.  If you have a short DIA, the chances increase that your Loop will think that the insulin will overpower the carbs early in a meal and you’ll have a low sag in BGs before carbs can catch up. (because hey…all that orange “area under the curve” has been crunched up into the front part!)

dia 7

So, when Loop does its number crunching and sees that low BG sag…Loop’s checking whether that low is “low enough” to take you below your target BG.  If that low is low enough, Loop will shave off some of your recommended bolus upfront from meal.  How much?  JUST ENOUGH to keep your predicted BG from going below your target anytime after you bolus.

dia 8

If you’re starting the meal near your target BG, you’re likely to see a prediction line something like the graph below after you use the recommended bolus from Loop.  And you will scratch your head and say “WHAT THE HECK IS GOING ON?”  Why would Loop SHOW that you’re going to be going high just after giving a meal bolus and not suggest more?  (some people may even take matters into their own hands and say “hey, it shorted me on a bolus…it should’ve been offering 6 units and only  recommended 4 units!”  And you’ll shortly find that if you manually change it to deliver 6 units, you’ll find Loop suspending you quickly afterwards)

BUT, take a pause and think about the situation.  What you aren’t seeing is that Loop is offering that amount of bolus to keep you from going low early…before carbs can catch up.  Based on the meal specs (carbs and carb absorption time) you entered and the DIA you are using, Loop is helping you know that an extended bolus is a good idea!  Don’t worry, Loop still knows about the upward carbs…it hasn’t forgotten about them at all.  In fact, it is literally SHOWING you that it has not forgotten about those carbs that still need insulin.  Loop will make up the remaining bolus needed through high temp basals as soon as the predicted BGs aren’t showing you’ll go below target.

dia 9

Isn’t that awesome?!  In the pre-Loop days, you’d have to recognize the meal needed an extended/dual wave bolus, do some guessing and memory games, watch the CGM to help decide when it was safe to give more insulin.  Now with Loop, you tell it “hey this is a kind of long slow meal” and it does the work of helping you extend the bolus.

The problem comes if you are using too short of a DIA…you’ll regularly get boluses that are lower than you’d expect (or likely want) because Loop is predicting a significant downward insulin effect early in the meal.  Going back to the simple models, you are telling Loop that you have a wet paper towel (slow carb meal with weak upward support) but want to drop a huge stack of coins immediately.  Loop is telling you to “hey, don’t drop an huge stack of coins on that wet paper towel right away…drop a few coins, wait for the towel to dry out a bit and you’ll be able to add more later safely.”

All of this was to demonstrate the not-so-trivial weight that DIA has in your Looping.  If you set that DIA too short, you’re not just going to see it in IOB calculations, you’re also going to be having boluses and predicted BG curves that aren’t realistic.  Looping in those situations will be less than optimal and you’ll likely feel frustrated.  Out of all the variables that are YDMV (your diabetes may vary) such as basal rates, ISF, and carb ratios…DIA is the LEAST person-specific variable and most likely to be uniform across the population.  DIA is more dependent on the type of insulin being used rather than the person using it.

So I encourage you to set your DIA realistic for the insulin type you are using, and check if your other YDMV variables might need tweaking as a result of changing your DIA.  The work you put into getting those variables more realistic will be rewarded with a much easier bolusing experience.

We’ve regularly been using this “fake extended bolus” technique on Loop now for several weeks and it has been nothing short of remarkable.  The new dynamic carbs model is better able to adjust the insulin delivery (downward pressure) to match observed carb absorption (upward pressure) rather than leaving the upward pressure as a fixed curve.  We have had nearly half a dozen meals over 120g carbs each (donuts, Chinese food, spaghetti) and given single boluses upfront.  Just a single bolus.  I did not calculate or guess how much of the 120g I should bolus for vs try to split bolus for later.  I just told Loop that it was a long meal, took the recommended bolus, and then we walked away to let Loop handle the remaining decisions.  The results have been great.  Very large carb meals peaking between 150-180 mg/dl, no lows, and smooth landings.  Something that used to take a lot of effort and attention has been reduced to a reliable, less stress interaction.

On the left, donuts…large maple bar, large chocolate bar.  Single bolus, Loop calculated…high of about 125mg/dl using a carb absorption time of 2 hours.  On the right, big bowl of spaghetti using carb absorption time of 4 hours.  High of 173 mg/dl, single bolus given, Loop calculated…let Loop do the rest.


For meals that are quicker absorption (where DIA is not an issue because the carbs come in fast enough), Loop functions just like it did before…the full bolus is given upfront and Loop picks up the slop around the messy edges of real life.  But for these big, long meals…if you get your DIA well set, the experience can be one of the most significant reliefs to your t1d burden in a long time.

A few side notes:

  • To fully take advantage of the “fake extended bolus” technique, I did have to increase our max basal rate so that the extended bolus could be delivered in a reasonable time to help control BG spikes later in meal.  It took me some time to feel comfortable raising the max basal rate, since the previous carb absorption model was not forgiving at all…we’d kept the max basal rate fairly restricted to prevent unwanted high temping for quickly rising BGs after a meal.  Our previous max basal rate was 3 u/hr, and now it is 10 u/hr.  Anna’s regular basal rate on average is about 1 u/hr.
  • OpenAPS also uses DIA in calculating your predicted BG curves.  So, while the discussion above is mostly Loop specific, there are many parts that apply to OpenAPS as well.  If you are frustrated and wondering “why is my rig suspending basals so much?”, check if OpenAPS is predicting low BGs before your meal would be done…and ask yourself is it possible that the low BG prediction is due to a DIA set too low for the carb absorption being observed?
  • If you prebolus, make sure you forward-timestamp the carbs when you enter them in the Loop.  That helps Loop better line up the upward and downward curve peaks…and therefore you’ll get a better bolus recommendation upfront.
  • Loop’s Dynamic Carb Absorption model takes your entered carb absorption time and multiplies it by 1.5x as a starting point for its model.  This helps Loop be able to anticipate later carbs (past DIA) but not bolus for them upfront where a low would be more likely otherwise.  This multiplier has been working well for us.  Loop’s dynamic absorption has been able to adjust on-the-fly to situations where the carb absorption was not like we originally anticipated (because hey…that’s life with diabetes).
  • When we started on DCA, we were using 4 hours DIA.  We moved up to 4.5 hours and now are finally pretty pleased at 5 hours.  Our landings from the peak of a meal are more predictably coming in at target at 5 hours vs 4.
  • We still have a growing, hormonal teenager.  We still have to adjust basals regularly during the month.  Our good experiences on Loop still require us to be aware that diabetes presents ever-moving YDMV variables that we need to tweak.  But, it’s easier to be less emotional about that work when the meal bolusing has been made suddenly easier.  Diabetes feels a little lighter on our shoulders.


10 thoughts on “Why DIA matters”

  1. Thank you!
    So informative and clear.
    In OAPS Oref0, I can’t indicate that it will be a “long slow meal”, how do you recommand to handle those pizza days in there?

    1. We would use split boluses in OpenAPS for those meals. Enter in part of the carbs upfront and bolus those…then come back an hour later and enter more carbs and more bolus.

  2. This seems more complicated than our regular (Animas) pump, where we can set a combo and not have to remember to return later (and how many carbs to add)…?

    1. Well, that’s the beauty…I am doing the same, in that it is a single “bolus entry”…but I don’t have to guess at the initial bolus vs the remaining I’m going to send via the combo portion. The Loop automatically doles out the entire bolus dynamically based on feedback from BGs. So, if diabetes or life decide to make the meal behave a little differently (quicker vs slower)…I’m getting automated fixes by the Loop to compensate. If BGs are rising faster, I’ll get more insulin sooner. I’m not locked into a preset combo bolus…things are dynamically adjusting based on real-time BG feedback.

      It’s actually quite a bit more sophisticated and simpler (at the same time) than regular pump use. We are getting much easier bolusing (I’m doing less math before a bolus and after a meal), and better results because of the dynamic response to real-time BGs. Animas isn’t a loopable pump yet, but if you want to read more on Loop…you can check out loopdocs.org

      1. I meant to reply to your comment about OpenAPS, which is what I’m setting up. Sounds like with OpenAPS, it’s more of a manual combo, so to speak? Ugh, does this mean I should sell my Edison/Explorer and get a rileylink and an iphone?

  3. I meant to reply to your comment about OpenAPS, which is what I’m setting up. Sounds like with OpenAPS, it’s more of a manual combo, so to speak? Ugh, does this mean I should sell my Edison/Explorer and get a rileylink and an iphone?

Leave a Reply

Your email address will not be published.