Data every minute, one AID and a predictable outcome: what happens when you run an oref based loop on minute-by-minute data on body

Data every minute, one AID and a predictable outcome: what happens when you run an oref based loop on minute-by-minute data
Data every minute, one AID and a predictable outcome: what happens when you run an oref based loop on minute-by-minute data

In my last piece on sensor cadence I ran three copies of my loop side by side on one phone. All three read the same one-minute sensor and none of them was attached to a pump, so I could see what the software asks for when it’s allowed to bolus more often while everything else stays put. It asked for more microboluses and less basal, and the total crept up by less than the bolus numbers suggested.

The question I got back, more than once, was what happens when the insulin actually goes in. A virtual pump can’t give you a hypo, so the next step was to try it on myself.

How it was set up

The rules were simple. I used one Libre 2 Plus, read every minute by my own loop running Boost on my own pump. Every dosing setting was frozen before the first hour and stayed that way. The loop made a decision every minute throughout, and the only thing I changed was the minimum gap it had to leave between two automated boluses.

I started at three minutes from the sensor’s first reading on 30 September and ran that for 120 hours, then five minutes for another 120, then one minute. I’ll call these 1×3, 1×5 and 1×1: the loop deciding every minute, with a 3, 5 or 1 minute gap. The order, how long each setting would run and a safety rule for the one-minute setting were all written down before I started.

Real life got in the way once. On 9 October, halfway through the five-minute setting, a cannula stopped absorbing. Between eight in the morning and noon my glucose went from 113 to 259 while the loop put in nearly 19 units, which anyone who has had a dud site will recognise. I changed the site at quarter to one and the insulin later that afternoon, and I was back in range by nine that evening.

Those thirteen hours are left out of the results, and I kept the five-minute setting running until it had a full 120 hours without them. Where that window ended was my call, so I also checked what happens if the bad site is left in or the whole day is dropped. The lows come out the same either way. Leaving the failure in costs the five-minute week about 5 points of time in range and adds 4 units a day, which is worth remembering when you look at the totals below.

I also wore a Dexcom G7 the whole way through, on its own receiver and uploading every five minutes to a separate Nightscout. It played no part in dosing. It was there as a second opinion, and it ended up mattering more than I expected.

What happened to the insulin

Insulin a day on each setting

Figure 1 shows a day’s insulin on each setting. The coloured part of each bar is microboluses, and the grey part is the basal the loop actually ran, which isn’t the same as the basal in my profile.

Going from a five-minute gap to three gave me about a fifth more insulin as microboluses, and going to one minute added about half as much again. That’s the same direction as on the virtual pumps. The grey part of the bars is where it gets interesting, though. The loop cut the basal as it went, and roughly three fifths of the extra bolus insulin was matched by basal it held back. Adding the two together, the total that went in was 4% higher at three minutes and 11% higher at one.

I wouldn’t put much weight on those totals. On the virtual pumps the three copies ran side by side, so whatever the day threw at one of them, it threw at all three. Here the settings ran one after another, so every difference between one week and the next gets mixed in, and the range on the one-minute total runs from about three quarters to one and a half times the five-minute figure. The move from basal to boluses is clear. Whether the total changed at all is much less clear, and that’s where glucose comes in.

What happened to glucose

Median glucose by time of day on the two longer settings

Figure 2 is a typical day on the three- and five-minute settings, taken from the Libre. The line is the median of every reading at each time of day and the shaded band covers the middle half. The two settings sit almost on top of each other.

This is where the second sensor earns its place. Across nearly 3,800 pairs of readings taken within a minute of each other, the Libre read about 20 mg/dL lower than the Dexcom. When the Libre said I was under 70, the Dexcom typically said 82. I didn’t do fingersticks during this run, so I can’t say which was right, although the last Libre 2 Plus I wore also read about 20 below my fingersticks. So here are both:

settingLibre: in rangeLibre: below 70Dexcom: in rangeDexcom: below 70Dexcom: above 180
3 minutes88.0%6.3%85.4%1.5%13.1%
5 minutes89.5%4.5%88.7%1.7%9.5%
1 minute89.7%8.0%81.5%0.0%18.6%

Between three and five minutes there’s nothing to choose. Two five-day stretches on the same setting can differ by about 7 points of time in range just through the ups and downs of normal life, and the gap here is under 2 points on the Libre and around 3 on the Dexcom. On lows, the two sensors can’t even agree which setting was worse.

The one-minute row is where they part company completely. On the Libre it has the most time below 70 of any setting. On the Dexcom it has none, and the most time above 180. Most of the Libre’s lows were at night, which is also where the two sensors disagreed most.

The one-minute setting

Glucose on both sensors through the one-minute setting

This was the setting I was most wary of. On an earlier run, a one-minute gap had pushed me past both of the standard limits for lows on a Libre, so this time it went last and came with a rule: from its sixth hour onwards, if more than 4% of the loop’s sensor readings were below 70, the trial would stop.

The top half of Figure 3 shows both sensors through the whole setting, and the bottom half shows the running share of readings below 70 on each, against that 4% line. The Libre crossed it at the sixth hour, at about half past three on the first night. The Dexcom’s lowest reading up to then had been 86.

With the Dexcom in front of me showing no low, I carried on. Over the next day the Libre’s share drifted back to about 4%, and the second night took it up to 8% again. The Dexcom never went below 80 in the whole 42.7 hours. I’ve reported all of it, with the first six hours as the part the protocol covered and the rest as extra.

Did one minute cause lows, then? On the sensor the loop was dosing from it looked that way, and on the one alongside it didn’t. My reading is that a sensor running low at night tripped the stop rule, but without fingersticks I can’t prove it.

Seeing a fall coming

The argument you hear most often for one-minute data is that the loop sees a fall coming sooner and cuts the insulin sooner. The cleanest way I could find to test that was to start from the moments the loop decided to cut the basal to zero, and look at what glucose did next.

Those zero temps come in two kinds. Some follow a microbolus: a couple of minutes after giving one, the microbolus code routinely zeroes the basal to account for the insulin it has just given. The rest are the loop cutting the basal on its own reading of where glucose is heading, and those are the ones that would show it seeing a fall coming. To compare with the five-minute loop I ran on the G7 in August, which decided and microbolused every five minutes, I measured everything against the G7, the one sensor I wore through both periods, and counted a fall as a drop of 15 mg/dL within 15 minutes.

settingzero temps a day, not after a microbolusfollowed by a fall within 15 minutesany minute followed by a fall
5 minutes, August13.64%8%
1×318.28%11%
1×516.34%7%
1×111.33%9%

On every setting, a zero temp the loop set on its own was followed by a fall less often than a minute picked at random. Deciding every minute didn’t change that: at a five-minute gap it was 4%, the same as the August loop, with the difference somewhere between four points lower and four points higher. These zero temps tend to come while glucose is drifting down slowly or sitting flat, and glucose stays flat over the next half hour. The loop is catching a gentle drift, and I can’t tell from this whether cutting the basal is what flattened it out.

The zero temps that do come before falls are the ones after a microbolus. Between 11 and 27% of those were followed by a fall, more than chance, because they land at the top of a rise just after the loop has dosed into it. That also explains something you see if you look from the fall backwards: deciding every minute, the basal was already off at the start of 71% of falls at a five-minute gap and 79% at one, against 39% for the August loop. That’s the loop accounting for a microbolus it had just given.

Once a fall is under way the loop cuts the insulin on every setting. By the time a 15 mg/dL drop was complete, about 14 minutes in, the basal was off on 96 to 100% of falls, and the loop reached ten minutes with nothing going in after about seven to nine minutes whatever the setting.

The two periods differ in more than the cadence. The August loop ran on the G7 with slightly different settings, and the one-minute loop was dosing from a Libre that read about 20 lower. That’s probably why it set its own zero temps at higher G7 readings, a median of 111 to 117 against 106: at 115 on the G7 it was seeing about 95.The next test compares the two decision cycles on the same sensor, which takes that out.

Where the gap might matter is after a fall. In the hour after one started, the one-minute setting put in about 0.4 units more as microboluses than the five-minute one, and it went into its falls with more insulin on board. There were only 25 falls in under two days, though, and the range on that runs from slightly less to nearly a unit more, so it’s something to look for in a longer run.

What the loop does while it waits

With the loop deciding every minute and a three- or five-minute gap, there are minutes when it wants to microbolus and isn’t allowed to. At three minutes that was about one decision in eight, and at five about one in five. In more than four out of five of those it still wanted insulin, and the only thing it can adjust in those minutes is the basal.

It pushed the basal both ways. With glucose rising, about half of those waiting decisions ran a high temp, and on average the basal was a little over twice my profile rate. That added roughly 2 units a day of basal on top of what the profile would have given, slightly more at five minutes than at three, and it’s part of why the five-minute setting ran more basal.

What surprised me was how often it then took it away again. While waiting, the loop cut a running basal to zero 80 times at three minutes and 95 times at five, three to four times as often as at other times and mostly while glucose was still going up. Nearly all of those had the same cause: about two minutes after a microbolus, the code that handles microboluses sets a zero temp to account for the insulin it has just given, even though it still wants a little more. A high temp set during the wait was switched off within five minutes in over 40% of cases, against about a quarter at other times, so the basal flicks between a high temp and zero across the gap.

As far as I could tell it made no difference to glucose. Glucose crept up 2 or 3 mg/dL across a typical wait, and when I compared waiting minutes that ran a high temp with similar ones that didn’t, glucose half an hour later came out within a few mg/dL either way. At one minute the gap almost never came into play, so there’s nothing to report there.

So the gap doesn’t leave the loop sitting idle. It moves some of the dosing into the basal, and basal is the part of the insulin that can still be taken back.

Exercise

Glucose and insulin around bouts of activity

My phone and watch feed step counts and heart rate into the loop on every cycle, so I could see when I’d been moving and what the loop did about it. I counted at least ten minutes of brisk walking, or of heart rate in zone 2 or above, as a bout of activity, and compared each one with the same time of day on other days of the same setting when I’d been sitting still.

Figure 4 shows the result. On the left, glucose was usually rising in the hour before I set off, which probably says more about my habit of walking after eating than anything else, and it falls away once I’m moving. On the right, the loop gives less insulin through the bout and afterwards than it does at the same time on a quiet day: about 1.1 units an hour less in microboluses and a third of a unit an hour less in basal while I’m active, with glucose dropping around 19 mg/dL further than it otherwise would. The loop backs off as I move, which is what you’d want.

There’s one catch when comparing the settings. I wasn’t equally active across them, with about 1.6 hours a day of activity in the three-minute week against 1.1 in the five-minute week. More walking means more lows whatever the loop is doing, so some of the extra time below range at three minutes may just be me walking more that week.

What it costs the battery

I hadn’t planned to measure the phone, but Android keeps a battery tally for each app. In the last week of the test, with the loop deciding every minute, AAPS used about a thousand mAh a day, between 32 and 39% of everything the phone used. On the 13th I switched the loop back to deciding every five minutes, and over the next two full days it used 584 and 540 mAh, about 18% of the phone’s total each day.

AAPS battery use by day and against the number of loop decisions

The cost comes from the decisions. Plotting each day’s battery use against the number of times the loop ran gives a straight line at about 0.4 mAh a run, which works out at roughly 540 mAh a day deciding every five minutes and a little over a thousand deciding every minute. The 14th and 15th showed this by accident. The loop decided about the same number of times on both days, but on the 15th I was between Libres and the sensor only sent a reading every five minutes, a quarter as many readings, and the battery use barely changed.

It’s only seven days, two of them on five minutes, so I wouldn’t lean on the exact figure. Deciding every minute roughly doubles what the loop takes from the battery, for an insulin effect this test couldn’t show.

Which setting to use

If you’re running a one-minute sensor and letting the loop decide every minute, the minimum gap between automated boluses is the key factor in how insulin is delivered. Shorter gaps gave more microboluses and less basal, and most of the extra microboluses are paid for out of reduced basal. The corollary of that is that insulin delivered via Bolus can’t be stopped. Insulin delivered by TBR can be stopped part of the way through.

Just looking at glucose I couldn’t really tell three minutes from five. One minute is harder to call, because the two sensors told opposite stories, with the G7 reading slightly above fingersticks and the Libres well below. Three minutes is a reasonable place to arrive at. If you try one minute, take significantly more care. The first time I tried it, I stopped after 36 hours because of constantly being pushed low by the bolus/basal mix. And of course, if you do decide to go with 1 minute readings, be prepared to recharge your battery much earlier in the day.


The caveats

This is n=1. The settings ran one after the other on a single sensor as it aged, through different weeks with different amounts of walking, so nothing cancels out the way it did on the shared sensor. Five days per setting can only pick up a change in time in range of about 7 points, and nothing here comes close. Neither sensor was checked against blood. It’s also Boost, which has its own caps on how big a single dose can be. Stock oref asked for a lot more extra insulin on the virtual pumps, so I wouldn’t assume its real-life picture is this mild. If you do run 1×1, be extra vigilant.

The full write-up, with intervals on every number and the protocol registered before any of this ran, is being prepared as a preprint. The earlier one, on the virtual-pump arms, is at https://doi.org/10.5281/zenodo.22790736.


Discover more from Diabettech - Diabetes and Technology

Subscribe to get the latest posts sent to your email.

Be the first to comment

Leave a Reply

Your email address will not be published.


*