The Auto Mode experience: 670G two weeks in

@drbbennett, I figure there aren’t many among those on the 670G today that understand this bit :slight_smile:

1 Like

Is that a way to prompt it to do a bigger correction? Why did it not initiate the correction on its own that time?

This is probably a very naive question. I get the feeling that I am missing something obvious.

Well, like so many things in this system, the Inigo Montoya rule applies: “You keep using that word. I do not think it means what you think it means.” Sometimes when you enter a BG, it will come back with “Bolus recommended,” but it will only do that if the BG is over 150 and it doesn’t see any countervailing factors, like IOB that’s going to bring it down to 150 anyway. But even when it doesn’t say "Bolus [i.e., correction] recommended, you can leave carbs zeroed, hit the bolus button, and see if it will give you a dose anyway. Sometimes it will, sometimes it won’t. In those circumstances it seems like it must be targeting 120, which would explain why I got 3+ units for a 156 BG on Sunday. Clearly much remains mysterious.

2 Likes

Learned from my MDT trainer this a.m. that I needn’t have bothered. The Max Basal setting in Options: Delivery Settings only applies to Manual Mode. Auto Mode derives this limit from the algorithm. Which I’m still struggling to get my head around, but once again Rule Number One of Algorithm Fight Club seems to be, “That Setting Doesn’t Mean What You Think It Means.”

4 Likes

I once watched a youtube video by the creator of the Loop app (The iPhone based APS system). He had a list of criteria that a good APS application should meet. One of those characteristics was transparency - if the user does not know what is going on under the hood then how will they trust the algorithm.

Depending on the underlying algorithm complexity, complete transparency may not be achievable - but - it would be nice if the user had some basic understanding instead of just “trust me”.

Need to find that video…

I am fascinated by this discussion. Could you say what the alternative algorithms would be called?

1 Like

@jag1 Model Predictive Control (MPC) is the most likely one. Some reading for you :laughing:

EDIT: MPC always has some sort of prediction for the future and tweaks the model of the prediction based on past performance.

The APS algorithms use a form of MPC. They use a model of how blood sugar will be impacted in the future based on Insulin-on-board (IOB) and carbs-on-board (COB) as well as other model inputs such as duration of insulin action (DIA) and the Insulin Sensitivity factor (ISF) - how much 1 unit will lower your blood sugar.

APS also has a separate thing called a “sensitivity factor” which is calculated based on past performance of the ISF - so if your ISF is wrong (say due to a pump site that is getting old) it will pile on a bit more insulin.

When most people manage their diabetes they use some basic model to select what dose of insulin to give.

The benefit of using a computer to build a model is that it can quickly react (like every 5 minutes when a new BG reading comes in) and it can look at past performance to see if the outcome was what was predicted by the model. If not - time to update the model.

That is where I see the 670 using some sort of MPC - the learning is building the model.

3 Likes

Here it is: talk by Nate Racklyeft who created Loop and brought it to v1.0 last year: https://www.youtube.com/watch?v=kxSgi8TojUM. Thanks largely to continuing amazing contributions by another key developer, Pete Schwamb, Loop is now at further improved v1.4. It is evolving quickly but it remains true to the original vision outlined in Nate’s presentation.

BTW, great topic, many thanks to @drbbennett for the 670g review and everyone else for thoughts about algorithms etc - I have much to catch up here :slight_smile:

3 Likes

Here is a good summary of the state of the art in control theory:

http://www.sciencedirect.com/science/article/pii/S2314717214000038

MPC (Model Predictive Control) essentially means that:

  • you have a mathematical model of the system you are trying to control
  • you put the model “in parallel with” the system under control
  • you feed the same input to both the system and the model
  • you calculate the difference between the output you see and the output you should see in the model
  • You feedback that difference into the input, possibly/probably using Linear Quadratic Gaussian optimization techniques (LQG).

The next level up is Adaptive Predictive Control, when you tune the parameters you use to match the behavior you are expecting to the actual behavior at the same time.

More complexities are introduced when you deal with systems that are not linear around the area where you are trying to localize control. In some cases, it is possible to use robust control techniques such as, for instance, Popov hyperstability to deal with some such nonlinearities.

Deep learning is an additional layer on top of these control strategies, and can be used within many different mathematical approaches, often to derive an estimate of the actual system model.

2 Likes

Looking through some literature on Medtronic-based on Medtronic-sponsored closed-loop development efforts, I believe their algorithm is PID based, probably with some modifications and parameter tuning. I do not think they employ MPC or any other modern control theory technique @Michel mentioned. However, I’d not discount 670g as inferior or inadequate just because the underlying control techniques may be considered fairly basic. For the vast majority of people with T1D, any sensible closed-loop algorithm is likely going to result in improved outcomes, and improved quality of life.

4 Likes

@drbbennett, has the week brought improvement to your overall BG management?

What about your number of lows at night?

I would qualify with one huge conditional.

Is the cgm sensor/system used to provide the real-time BG which drives the entire algorithm providing accurate data.

“Obvious” one might say. However this is my biggest concern with any closed-loop system.
Is the input data good.

3 Likes

I don’t generally have a huge problem with overnight lows, but I can see the system intervening to make sure I bottom out in the high 80s-low 90s. What’s still driving me a little nuts is I see where I’m in this happy zone of like 90-120 all night long, but then right around 4am the DP monster comes to visit and by the time I’m getting up around 6:30 I’m heading toward 160-180. It’s supposed to anticipate BG rises as well as drops, but I need it to do that a lot more aggressively than it is. Apparently the CR settings figure in to this. Since I’ve already set my AIT to the lowest (2hrs) that’s all I have left to tweak, so I’m pushing my MDT trainer to advise something there.

4 Likes

The nice thing about pump basal programming is that you can preemptively have a basal setting for those times, because you know every morning at 4 am you are going to have a spike.

I see that same spike at 4 am. But my pump is ready for it. I start my counter-attack at 2:30 am. That 4 am spike has no chance!

Is there no way the 670G can be set to preemptively counter that? If you have to wait for the CGM reading to show you that you are going high, the battle is lost. By that time it is too late.

3 Likes

That’s where I’m hoping the CR setting comes into play, since you can have multiple ratios set for different times of day. Waiting to hear what my MDT trainer replies about that. Otherwise, well, you can always just switch back to manual at night, and I’ve heard from a couple of people who do that. But it seems kinda self-defeating. Heck, I could switch back to manual 24/7, since I was doing better on that than I am now. But it is definitely improving, and I’d like to see if I can’t make the thing do what it’s supposed to do.

6 Likes

It seems like having a combo of pre-set basal rates and the reactive adjustment to the CGM reading would be cool.

For a particular hour of the day, you could have a baseline of 0.45, or 0.70, or 0.55, or whatever, and the pump would do the change up or down from that number, for whatever time it is.

But instead Medtronic is using CR, which is kinda confusing to me, since you are not eating in the middle of the night. So I am guessing a more aggressive CR would cause a more aggressive response to a high BG?

2 Likes

I can only imagine how frustrated you are right now. I would be. I’ll keep my fingers crossed that you are able to find the key to the kingdom!

2 Likes

Although I can understand your frustration truly I still think this is a good technology for most of the diabetes world… we lost sight of how far off the normal path of t1 diabetes we really are sometimes— typical patient out there yo-yos all day long between 50 and 500 or so… and something like this could be a godsend for them…

6 Likes

Really?

You don’t even want to know what the typical t1 running around out there lives like… it’s awful. I honestly don’t even want to describe it to you because you’re young and inpressionable and I don’t want you thinking “if thousands of other people get away with it I could too”

These people on forums like this are self selecting groups of people who are pushing for tight control-- they aren’t the norm unfortunately

https://t1dexchange.org/pages/study-reveals-poor-disease-control-among-adolescents-and-young-adults-with-type-1-diabetes/ Just glanced at that where they say the average adolescent a1c is a 9. Roughly, that means that for every 5, there’s a 13

6 Likes