They work very well and generally offer positive outcomes for most people with Type 1 diabetes. They are called "hybrid" because they do not try to correct for carbs that you eat ("bolus"), rather they only try to adjust background insulin levels ("basal") and do some "mopping up" if you mis-dose for carbs you eat.
The main things holding them back are that:
- CGMs only measure glucose in interstitial fluid, which has a time-delay of 5-15 minutes from veinous blood glucose
- Injected insulin also takes roughly 5-15 minutes to start acting and peak action is after an hour.
That means your PID controller could have up to a 30 minute lag time to the system it's controlling. And let me tell you, blood glucose isn't a slow system. It can go from dangerously high to dangerously low in 30 minutes (or vice-versa).
The body has the advantage that its insulin is faster acting, it can sense blood glucose changes faster, and it can use other sensors (e.g. glucose receptors in the mouth can start insulin production before it ever hits the bloodstream).
There is virtually no immediate danger from high BGL (but medium to long term for sure!). High BGL over long time in Type-2 diabetes means there is actually too much insulin production for your own good, leading to high insulin resistance, leading to a situation where the cells aren't getting enough glucose at all. But this state takes some time to develop. Low BGL is the other way around: immediate danger, long term it's easier to buffer or control. Keep in mind those are generalizations. Don't take this as medical advice. Don't think I'm saying there is no need to react to high BGL.
It’s incredibly common, but you should be aware (you actually might be!) that type 1 diabetes and type 2 diabetes are incredibly different diseases, having almost nothing to do with one another apart from that they’re related to blood glucose. Even insulin-dependent type 2 is a very different ballgame to type 1.
I’m definitely not implying a ranking here or devaluing your experience with a serious chronic illness.
Anyway, I’m thick skinned about this, so this isn’t really about me. I’m just trying to let you know that you could engender negative reactions by being unaware of this common “sore spot”.
EDIT: Sorry, I see you’ve addressed this in a different comment, so you’re aware. All good, I’ll leave this up as general advice to others.
Whilst this is true chemically, it's the delivery mechanism that causes the delay. The chemical composition of insulins like Novorapid (which my daughter uses) are slightly faster than regular human insulin, but not nearly enough to account for the aforementioned (up to) 30 minute lag.
Huh, thanks, I was not aware that novorapid is faster than endogenous insulin (most graphs show it much slower, albeit when taken subcutaneous). I switched from Novorapid to Fiasp because of how long Novo took to act, funnily enough.
Also, moderate-fun fact: intramuscular injections, while a bit painful apparently, can release insulin much faster than subcutaneous. By much faster I mean Lantus/24hr insulin can make you hypo within an hour, as per what I read online on a particular post.
I very occasionally do this with Novorapid into my shoulder muscle (one needs a longer than usual needle for this) to drop a high blood glucose fast, for example after a failed infusion site at night.
It does feel weird, but it does work.
(This is not medical advice! This is dangerous! Ask your doctor!)
In my (non-human-medical) opinion, low blood sugar is on average better than high blood sugar, especially for patients who don't need to walk around unsupervised and operate heavy machinery (i.e. cats, dogs, small children). An adult Human body only has on the order of 3g of sugar circulating in its blood at any time. We can easily generate blood sugar from protein. It's much harder to eliminate high blood sugar. Even extreme overdoses of injected insulin often only result in a coma that the patients can often recover from on their own because they metabolize the insulin and generate the glucose. I'm not recommending that, of course!
Low blood sugar however, is an immediate problem, high blood sugar is a long-term problem. Getting the balance right is hard, especially for Type-1 Diabetes. In overweight Type-2 patients (like I was) usually the patient's liver is so good at generating glucose that it buffers a wider range of insulin dosages and you have more time finding the lowest sufficient dose. Insulin is bad for your health, it means too much glucose is deposited everywhere in your body, leading to all sorts of problems. But too much glucose in the blood is even worse, so...
And, if you have back to back hypo episodes, you will actually fry both your body's natural counterregulation (you deplete your glycogen store, which makes subsequent hypo events more severe) and your neurological response to hypo (you lose awareness that you are hypo). In the long term, after too many lows, you will lose your ability to recognize hypo entirely.
The brain/metabolism link runs deeep into the lizard brain. Real deep.
A non-diabetic with a 5.5% A1C is doing just fine. Someone with Type 1 with a 5.5% A1C is almost certainly critically endangering themselves and everyone on the road.
A BGL as low as to cause brain damage can only result from insulin overdose. And it must be quite a bit off, which means it is easier to avoid.
I also qualified everything with "on average". There are people, depending on habits and their particular circumstances/medical condition, who will have a harder time with the "rollercoaster" even compared to most type-1 diabetics. But that is what qualified diabetes assistents are supposed to help them with.
Also: I'm not a diabetic, but I studied veterinary medicine and know quite a bit about it also from a Human perspective.
But I have myself made the mistake of underestimating hypoglycemia. Growing up, I always had issues of under-dosing insulin, because my bodyweight was always increasing; it seemed like I could always get away with giving a bit more insulin. When I stopped growing in my early 20s, I kept on with the aggressive dosing (got frustrated with the high BG feeling!) and had a string of severe hypo incidents. I had no idea what was happening during these events, but not only that, my neurological response changed and I had hypoglycemic unawareness. And, since I was so aggressive with insulin, my counterregulation was gone, so doses and meals that used to end in 80mg/dL were now ending in 30 mg/dL. And because my neuro response changed after the first few, I would slip into complete unawareness even during a mild 55 or 60 mg/dL.
Unawareness feels like: gosh there is something going on but I don't know what. There's something that I urgently need right now (sugar), if only I could place it. I have to be somewhere (work) this morning, but I don't know where... Imagine having a vivid dream, in which something in the room (like a person talking next to you or a fan turning on or something) affects the dream. Now, while you're in the dream, try to figure out what and where that thing actually is. It can be very very difficult, because it's like, the bug is in the operating system.
You can easily die from this, and many people do, I think the common figure is 1 of 20 t1d end up dying this way. Overaggressive treatment after the honeymoon period ends, when growth stops, or when changing insulins (like moving from long-acting to the pump), or even just having a bad flu -- there are many ways to make this mistake. And it is not obvious at all when you are making this mistake.
So that is yet another challenge. You can actuate in only one direction: pushing BG lower. PID does actually work for this, but it is outperformed by algorithms that can explicitly consider a patient model (model predictive control, or MPC). I believe closed-loop algorithms using both PID and MPC have been tested on in vivo, and both have been brought to market, although of course all vendors are very tight-lipped about what their algorithm looks like.
If you are working in the AP space, you are looking at algorithm performance after an unannounced meal (patient doesn't tell you that he's eaten: how much do you dose?). You will test your algorithm in a virtual patient simulator first. Then, if you are lucky enough to work with the research hospital at your institution, you can test your algorithm on real patients in vivo.
The low bar for bringing an AP to the FDA is a provable safety envelope: you will never ever dose too much insulin. Ever. Even if your RL agent learns badly, even if your patient put honey over the CGM site before putting it on. Not having a negative result in the simulator is not enough -- you need a provable bound on dose.
This is why the majority of RL algorithms do not work. And why the problem is so hard. You have this super complex system, with a ton of metabolic unknowns. Unknowns over short timescales, like food response, exercise, illness, stress, and so on. And over long timescales, like your diet changes over time, your body changes, etc. And you have huge variation between patients, with different genetics, diet, and astrological sign between people. Boy it would be nice to learn those unknowns with a computer, which is what every RL paper says about the AP. But: if you get it wrong once, it's all over, and further, if you really want to play, you have to prove that you will never get it wrong.
That's why every AP system out there now is very conservative, and why none of them are using exotic ML techniques. And why, with the standard classical toolkit, the problem is very difficult.
Although it's a bit old, this is a pretty good overview of where the field is:
The CGM measures glucose in the interstitial fluid, and the pump injects insulin subcutaneously, while the pancreas secrets it directly into the blood stream. Even with the improvements we've made with synthetic insulin it just doesn't work as fast or as well as what we produce internally.
If you, the patient, take a glucose sensor, an insulin pump and tie them together with an app, you don't get to sue somebody if something fails and you die.
If a company takes all three of those, packages them together, and sells them, then that company is now liable when one of the pieces fails and you wind up dead.
The sad part is that AI/ML would be incredibly useful for all this. People could take pictures of their meals, upload their sleep and exercise data, and weigh themselves, feed all that into a cloud algorithm that could determine how you are likely to react and dial your insulin plan into your pump while feeding the glucose readings back to the cloud.
Sadly, I suspect none of this is going to happen in the US due to the liability. Maybe China will pull this off.
For starters: Insulin is quite long acting. Maybe 4 hours for some injected "short-acting" types. Regular insulin (like the one from the pancreas) acts for maybe 6 hours. The ratio of how much insulin you need for a given weight of carbs doesn't stay constant. If you inject too much insulin, if you raise your carb intake, that leads to a higher ratio. Physical exercise modifies the ratio in a short-term fashion. Inflammation, like from a cold or other infection, can raise the ratio significantly. You could model the situation with a bunch of differential equations, and that's what a lot of scientific
Most of these variables can't even be estimated precisely enough because there is too little data for too much variation. ML/AI is good at using information in the dataset that is hard to describe or see for Humans. But it can't use information that just isn't in the input data, it's not magic. For Type-2 diabetes there are relatively simple rules that work remarkably well. Type-1 is a lot harder, partly because a lot of the "buffering" of the system dynamics is missing.
Pictures of food are nowhere near near enough data to determine the carb content of a food. My SO has T1, and there have been times where there's been no visible change, and I can only taste a vague change in the taste of some food item and the changes it caused to their blood glucose were wildly different that what it had done previously.
Were I in that field as an engineer, I'd be all in favor of being very conservative - and it has nothing to do with liability.
But, how many people did your software improve the lives of?
This is the real problem with stuff like T1D automatic insulin control loops. You will likely kill some number of people through failure modes. However, how much better will the lives of those people whom you didn't kill be? T1D results in a lot of complications over time that, if they could be controlled, would result in a significant increase in quality of life for the survivors.
I actually had this discussion with a doctor who invented an asthma monitor for his daughter. It would automatically inform him and the school nurse as well as transmit the severity of event so the father could dispatch an ambulance immediately if it was really bad. I assure you it worked as well as it possibly could. However, nobody would touch turning it into a product because, at some point, the monitor was going to miss an event (bad detection, cellular system transmission failure, something) and some child was going to die and the liability was going to be enormous.
And that asthma monitor is a much easier case to discuss as it's all upside--the monitor failing doesn't kill anybody. Without the monitor, some number of children will die anyway. With the monitor, some number of those children will be saved.
Having this discussion about T1D is much more difficult.