Abstract
The technology needed to “close the loop,” that is, a system for continuous glucose monitoring and a pump that infuses insulin, are only 2 of the 3 components needed for each system for automated insulin delivery (AID), the other is a “translation” of the glucose information into the appropriate amount of insulin to be applied at a given point in time to keep glucose levels in the body in the target range. It might look straightforward to calculate the required insulin dose and control the pump to apply this immediately; however, once a given amount of insulin is in the body, it will be absorbed and become metabolically active. To avoid lowering glucose levels toward too low levels, the algorithms used to calculate the insulin dose have to take a number of other factors into account. This is needed to make sure that AID systems are not only efficient but also safe, that is, not only Time-in-Range should be maximal, also Time-below-Range should be minimal. The review characterizes the different types of AID algorithms that were developed in the last decades. Using a structured approach, the different algorithms are classified. A systematic evaluation of the performance of the different algorithms is missing, not only during the clinical development of AID systems, but also in daily practice. However, it might very well be that other factors determine which AID algorithms will be used in practice.
Keywords: insulin therapy, automated insulin delivery, continuous glucose monitoring
Introduction
Based on the physiology of glucose regulation in the human body, ideally insulin secretion of the beta cells in the pancreas would be replaced by a technological approached to offer a “cure” to patients with type 1 diabetes (PwD) with no endogenous insulin secretion. Such a system for automated insulin delivery (AID) consists mainly of 3 components: a system for continuous glucose monitoring in real-time (rtCGM), a system that allows insulin administration in a rapid and precise manner whenever needed (most often with an insulin pump), and an algorithm that “translates” the glucose information provided by the rtCGM system into an insulin dose to be applied by the insulin pump (or other devices) to keep glucose levels in the target range.1,2 Today such an algorithm is implemented on a smart phone or in the insulin pump, which have the calculation power and a display anyway.
Calculation of the optimal insulin dose requires to take a number of factors into account as there are significant deviations from the physiological situation in PwD with the current technical systems. This applies in particular to the delay in glucose signals measured by rtCGM systems in comparison to changes in blood glucose (BG) and the delayed insulin absorption from the subcutaneous depot into the blood stream. Additionally, the absorbed insulin—unlike in the human body—first acts in the periphery and not in the liver. Therefore, suppression of hepatic glucose production occurs too late and not to the same extent compared to the situation in healthy subjects. Furthermore, the extend and timing of the glucose lowering effect of the applied insulin is determined by its pharmacodynamic properties and not triggered/controlled by the BG levels like endogenous insulin secretion is controlled in a healthy human. Another difference is that no counteracting option is available if only insulin is applied by the AID system, that is, if BG tend to decline to too low levels, there is no measure to counteract and prevent hypoglycemia. In analogy to the physiological situation, this requires a technological option that includes infusion of glucagon. Currently the commercially available AID systems and most of those in clinical development have a “mono-hormonal” approach, that is, they apply insulin only. However, at least some academic sites and companies are active in the clinical development of a “bi-hormonal” AID system, which also controls infusion of glucagon.3-6 Such an AID system is better called a “Bionic Pancreas” or an “Automated Hormone Delivery System (AHD).” For better practicability an AHD system requires availability of approved stable liquid glucagon formulations.7-10
Another level of complexity are the discrepancies in glucose levels in blood and interstitial fluid (ISF) during rapid changes in glycemia.11,12 Mainly for historical reasons therapeutic decisions are based on BG levels until now; however, the glucose values measured by rtCGM systems represent ISF levels, which are calibrated to BG values. In the physiological situation the insulin secretion of the beta cells is based on the glucose levels in the ISF around them, not on the BG in the adjacent blood vessels. Blood is the transport system for glucose; however, apart from the amount of glucose taking up by the blood cells themselves, most of glucose metabolism takes place in the periphery. 13 Nevertheless, as a number of clinical studies and practical experience with AID systems showed that the calculations by the algorithms can be based on rtCGM values.14-16
Thus, algorithms for AID systems not only have to take a number of factors into account, also some kind of prediction of glucose changes in the near future is needed, to make sure that glucose levels remain the target range (70-180 mg/dl) most often.17,18 In the last decades a number of different algorithms for AID-systems were developed; however, these are based on a set of basic approaches which will be briefly presented in the following, their pro and cons will also be discussed.
The focus of this review is on the different types of algorithms used for AID systems, not on the different AID systems/products. The idea for this manuscript is based on frequent requests from diabetologists that ask for an overview of the algorithms used in AID systems. Diabetologists want these algorithms not to be described with mathematical formulas, but presented in a way that their function is understandable for people with limited mathematical understanding. So, subsequently not the technology used with the different AID systems, that is, which CGM system, insulin pump etc. is used is highlighted, but it is explained what the ideas are beyond the algorithms used and in which respect they differ.
Currently Commercially Available AID Systems
Reliable technical components for AID systems are available since the mid-2010s, on the part of insulin pumps anyway, but since then also on the part of rtCGM systems. Various developments have also been completed with respect to the algorithms, so that two hybrid AID systems are available on the United States and the EU market: since 2016 the MiniMed 670G (Medtronic, Northridge, CA, USA) and since 2019 the t:slim X2 CONTROL IQ (Tandem, San Diego, CA, USA). An AID system developed by the French company Diabeloop, which has a CE mark since 2019, is available in the EU only.19,20 The algorithm is installed on a handset and can be used in combination with a commercially available insulin pump (Kaleido, Utrecht, Netherlands) and rtCGM system (Dexcom G6). Due to a recently announced cooperation with Roche Diabetes Care other insulin pumps might be used with this AID system in the future. The CamAPX algorithm which was developed by researchers from the University of Cambridge has a CE mark since March 2020 and is also available in the EU only.21,22 The algorithm is installed as an App on a smartphone (Android); the PwD can use this as a hybrid AID system. The hardware used with this AID system is an insulin pump from Korea (Soil’s Dana) and a US rtCGM system (Decom G6, San Diego, CA, USA). A number of other AID systems are in late stages of the clinical development, for example, the system developed by Insulet (Omnipod 5) will come to the market soon.
Terminology
Until now most AID systems are using an insulin pump for insulin application, usually these are “conventional” pumps with a visible insulin infusion set; however, some systems (eg, the Insulet AID system) use a pump that is directly attached to the skin without a visible infusion set (“patch pumps”). Insulin therapy with pumps consist of two components: one more or less stable basal infusion to cover the insulin requirements between meals and during the night and a relatively high and short-term insulin infusion to cover prandial insulin requirements. All currently available AID systems require that the PwD activate the prandial insulin bolus manually, that is, they have to select the insulin dose themselves based on the amount of carbohydrates in the meal. Therefore, the current AID systems are also called hybrid AID systems (H-AID) to make clear that they do not represent a fully Automatic Insulin Delivery system.
Despite the fact the insulin therapy based on insulin pumps is called “continuous subcutaneous insulin infusion” (CSII), in practice the insulin is not infused continuously by the insulin pumps. Depending of the approach used by a given manufacturer, the insulin is applied by activating the pump in regular intervals for a variable time period (to be able to apply different insulin doses) or the pump is activated in irregular time intervals for a constant period of time. In case of low insulin requirements, it can happen with the latter approach that no insulin is infused for a considerably long period of time.
With AID systems the insulin delivery approach is somewhat different, the insulin pump is activated multiple times to apply the insulin dose calculated on a “minute-to-minute” (depending on the given AID system) basis in a short period of time. The amount of insulin applied by each of the “insulin pulses” is small, therefore they are also called “microboli.”
General Principles of Algorithms for AID Systems
Physiologically, glucose homeostasis is maintained by a system of interconnected, negative-feedback regulatory circuits. The beta cells and alpha cells represent the regulators and the secreted hormones (insulin and glucagon) the manipulated variables. The latter are supposed to adjust the controlled variable glucose to the set point, which is between BG levels of 70-180 mg/dl in PwD under optimal glucose control. However, due to the delays mentioned before, all processes of the controlled system run with a time delay. This means that in addition to the measured glucose concentration, various factors influencing glycemic regulation must be taken into account, such as the time-dependent absorption of carbohydrates and insulin (Figure 1). Also, the metabolic effect of insulin that was previously applied and is still metabolically active in the body has to be taken into account. 23
The models underlying the various AID algorithms are expressed in terms of differential mathematical equations that calculate the insulin infusion rate as a function of time and changing glucose concentration. An AID algorithm should not only calculate the insulin dose based on the most current glucose values, it should also predict the glucose concentration over the next 2 to 3 hours and take this projection into account. In the Addendum, the derivation of the equations for the “Proportional Integrative Differential” (PID) algorithm is given as an example. The current glucose values are used as initial conditions. Boundary conditions are insulin sensitivity and insulin action. If necessary, additional information about carbohydrate intake, physical activity and stress are also taken into account. In any case, the parameters included in the AID equations, must be adjusted. The degree of adjustments can be determined from the retrospective analysis of the glucose metabolism, but must be also used to calculate the expected glucose progression in advance. If, on the other hand, a self-learning AID algorithm is available in which the parameters are to be adjusted individually and depending on the situation, artificial intelligence methods are required in principle.
Different algorithms have been developed by different research groups, such as (Table 1):
Table 1.
Algorithm | Advantages | Disadvantages | Applied in |
---|---|---|---|
PID | - Simple and straightforward, only calculation of the individual components P, I, D | – Only insufficient suited for regulating large glucose rises and falls (eg, after meals, during physical activity) | - Medtronic MiniMed 670G/770G/ 780G |
- No complex simulation | - Only input of static parameters, such as insulin duration of action (information on pharmacokinetics according to insulin manufacturer) | ||
- Initial input of few parameters: Carb/Insulin factors, insulin action time | - Does not take into account inter- and intra-individual variability of patients | ||
– Great experience in controlling technical systems (eg, heating systems) | – No predictive calculation of the effect of insulin delivery on future glucose levels | ||
MPC | - Dynamic model of the control process, does justice to the dynamics of insulin delivery control | – Only conditionally suitable for regulating of large glucose rises and falls (eg, after meals, physical activity etc.) | - CamAPS FX (Cambridge App) |
- Prospective calculation of glucose level based on current insulin dosage (simulation by iteration) | – The complex model requires initial input of several parameters (eg, basal rate under CSII) | - iAP (Collaboration Universities Padova, Virginia, Santa Barbara) | |
– Dynamics of the effect of different insulin doses is taken into account | - Diabeloop DBLG1 (self-learning by applying methods of artificial intelligence) | ||
- Takes into account inaccuracies in glucose measurement and delays in insulin absorption | - Tandem CONTOL IQ | ||
- Insulet Omnipod 5 | |||
Fuzzy-Logic: MD-Logic (DREAMED) | - Simulates glucose regulation, adapted to physiological insulin delivery (combination of “Control to Range” and “Control to Goal”) | - Requires a fuzzy logic controller, in which treatment rules have to be implemented, making the development of the corresponding affiliation function is a challenge | - Cooperation with Medtronic regarding implementation in the future full AID system |
- Fuzzy logic approximates the physiological behavior of an individual patient (adaptation of control parameters) | |||
- Algorithm is self-learning | |||
- Suitable for regulation of large glucose rises and falls (eg, meals, physical activity) and thus also suitable for delivery of meal boli |
– the PID algorithm 14
– the Model Predictive Controller (MPC) algorithm,21,24 including modifications19, 25, 26
– the Hypoglycemic Predictive Algorithms (HPA) 26
– the Fuzzy Logic algorithm used by DreaMed (also called MD logic)27-29
– and neural networks. 30
Mathematically, all algorithms calculate an insulin infusion rate as a function of time and changing glucose concentration. The differences between the algorithms are in the way various parameters (insulin sensitivity, insulin action, carbohydrate intake, physical activity, stress, etc.) are taken into account and the extent to which predictive glucose values are calculated. However, it is of interest to note that the clinical results obtained when using the different models and algorithms in various AID system are quite comparable. At least some studies have shown that this is the case.20,31
PID Algorithm—Representation When Used in the MiniMed™670G System
This AID system is in use in the United States and in Europe for some years, therefore, the algorithm effective in it will be described in more detail. The 670G has 2 options: the “Manual Mode” and the “Auto Mode.” In manual mode, insulin is delivered for coverage of basal insulin requirements based on a fixed programmed basal rate profile. Prandial insulin boli are delivered manually by the PwD at the touch of a button. Coupled with a rtCGM system, this allows a “Sensor Augmented Pump Therapy” (SAP) to be performed, comparable to that provided by the MiniMed™ 640G system. The “Auto Mode” refers only to basal insulin delivery; however, the insulin dose delivered is adjusted automatically according to the current glucose demand (adaptive basal delivery). This means that the glucose values measured by the rtCGM system are converted into an insulin dose with the aid of the algorithm in such a way that a fixed glucose target value of 120 mg/dl is aimed to be reached.
The PID algorithm (see Addendum) implemented in the 670G for this purpose is, like all other algorithms, the implementation of the scheme of a closed-loop controlled by glucose values (Figure 1). 14 This algorithm is used widely in control engineering, for example for temperature control of a heating system. In such a system, if the room temperature is at or near the set target value, all 3 components of the algorithm acts simultaneously: The proportional component is the most intuitive one—if the temperature is 10°C below the target it delivers a given amount of heat, if the temperature is 5°C below the target, it delivers half of the heat. The integral component takes into account the all the past deviations (errors) from the target, so that it guarantees that at steady state the error becomes zero. The derivative component acts in proportion of the temperature rate of change, so that if the temperature is approaching the target (and the error is decreasing), the derivative of the error is negative and there is an attenuation of the action. This is important to avoid over- or under-shooting. The PID algorithm works in the same way for insulin delivery.
To activate the PID algorithm, a glucose value is transmitted by the rtCGM system every 5 min and based on this a microbolus is calculated by the algorithm. The determination of the bolus size can be made plausible by calculating a correction bolus, as is generally the case in insulin therapy. It is initially calculated from the difference between the current glucose value and the target value, multiplied by the insulin sensitivity factor (one unit of insulin lowers the glucose value by xx mg/dl). In the case of a correction bolus, it is still necessary to take into account how long the insulin is effective (this is derived from the pharmacodynamic properties of the given insulin) and how much actively acting insulin is still available in the blood stream/subcutaneous insulin depot. Consequently, the algorithm must know how long the insulin is effective - this is set in the system (eg, 3-4 hours for adults) and what the insulin sensitivity is. 23 The 670G AID system calculates the latter by averaging the daily insulin requirement (DIR) of the last 6 days and applying the 1800 rule. The 1800 number comes from pharmacology and is applied to rapid-acting insulin analogues. Insulin sensitivity (IS) is calculated from the quotient IS = 1800/DIR. The algorithm uses this to calculate how much insulin is needed to achieve the glucose target value of 120 mg/dl. It takes into account the duration of insulin action and the known time-action profile of the given insulin. The duration of action is divided into 5-minute segments, because a microbolus is delivered every 5 minutes. If, for example, an insulin action time of 3 hours is set, this would be 36 microboli during this time (every 5 min). However, only the first microbolus is delivered, as this calculation is repeated 5 minutes later. Furthermore, the effect of the previously delivered insulin is taken into account, as is the case, for example, with the bolus calculator “BolusWizard.”
The PwD using a 670G must therefore set the insulin action time as one of only two parameters to be set to start this AID system. It is important to mention: if the insulin action time is set shorter, the microboli are larger. Furthermore, it is important to know: since the algorithm accepts a certain tolerance, it also reliably regulates the circadian differences in IS that depend on the time of day.
The second parameter to be set is the time-of-day dependent carbohydrate factor, that is, how much insulin compensates for one “unit” of carbohydrate. This factor is primarily important for the management of the meal bolus, for which PwD manually enters the amount of carbohydrate in grams. The pump then calculates the suggested bolus that should be delivered. Up to 8 such factors can be set over the course of the day. Secondarily, this factor also has an effect on the regulation of basal insulin delivery: many boluses or even inadequate boluses (eg, due to an incorrect carbohydrate factor) have an effect on the daily insulin requirement and thus in turn on the IS factor, which is determined at 0:00 every day. In addition, too high glucose values (due to too low boluses) cause higher microboli. Of course, the algorithm tolerates some of this, but may not do so completely.
Usually prandial insulin bolus are delivered before meals, if necessary also with a push-to-eat interval in case pre-prandial glucose values are too high, especially at breakfast. Post-prandial insulin dosing, which is frequently used with “classic” intensified insulin therapy or CSII, sometimes leads to hyperglycemic values after the meal that require a correction bolus subsequently. It should be noted that basal insulin delivery is limited, that is, the 670G only deliver a maximum of approximately 2.5 times the average basal insulin amount when being in Auto Mode. This limitation prevents PwD from deliberately foregoing bolus delivery with food intake. One reason for this limitation is to avoid applying too high amounts of insulin to prevent a decline in glucose levels, which is in line with regulatory precautions raised by the FDA.
In case increased glucose levels occur that are not compensated for by the PID algorithm, a correction bolus can be called up. This is suggested by the AID system and aims to bring back the glucose values to a level of 150 mg/dl. Further regulation to 120 mg/dl is again performed by the PID algorithm. Under certain circumstances, such as during physical exercise, it is useful to temporarily change the target value. This can be increased to 150 mg/dl.
The algorithm of the 670G also includes a safety mode within the Auto Mode (Figure 2) (see User Instructions for the MiniMed 670G, Second Edition 2019). This ensures the safety of use of the 670G during automated insulin delivery and prevents the system from immediately reverting to the Manual Mode in case the metabolic situation is not entirely clear or glucose data are missing. In such a situation, the 670G requests the measurement a BG value and entering of the measurement result. In “Basal safe,” the insulin pump operates with a minimum basal insulin delivery, determined from the insulin dosage in Auto Mode. If the PwD does not respond to the alarm raised over a period of 90 minutes, the system switches to Manual Mode.
The PID algorithm in the 670G does not yet represent a form of artificial intelligence, even if the system is already “learning” to some extent. The constantly measured glucose concentration is the input signal. The PID algorithm calculates with data from the current glucose data, but does not simulate the glucose course ahead. For example, the duration of action of insulin is based on the known pharmacodynamic time-action profiles. Physiological data such as the regulation of glucose metabolism after physical activity or illness are not stored, processed and used later. The fact that the presently implemented PID algorithm is not more complex has also to do with the limitations given with the regulatory approval for this first hybrid AID system. It is understandable that safety aspects had the highest priority for the regulatory agency, since a commercial AID system should be able to be used by any PwD with the appropriate indication. Based on this, the safety mode will be most probably less strict with future AID systems.
Glucose Regulation According to the MPC model
Another AID algorithm often used for the control of variable processes is the Model Predictive Control (MPC).21,22,24 As its name suggests, it orients the insulin dose to be delivered at a given time to the glucose values expected thereafter, that is, a prediction of the glucose profile in the near future. That is, the MPC is a dynamic model that simulates the future behavior of the control process (namely, the insulin dose) as a function of the input signals (ie, glucose concentration). For this purpose, the time axis is divided into equidistant ranges and the glucose concentration is calculated for each of these ranges, as a function of the insulin dose (Figure 3). 32 If an insulin bolus (a microbolus in adaptive basal insulin delivery) is to be delivered, the algorithm calculates the future glucose values for each time segment based on the current glucose levels and the insulin still present in the body (“insulin on board”). The number of time segments depends on the frequency with which the glucose values are delivered and the duration of insulin action (eg, one rtCGM glucose value every 5 minutes, duration of insulin action 4 hours, results in 48 time segments). If these calculated glucose values are within the desired range, the microbolus is delivered. If they are not, however, the dose is changed, higher if the calculated glucose concentration is too high, lower if it is too low. This simulation is performed until the optimal glucose value is given for the selected dose in all time ranges (such a calculation takes fractions of seconds). A prerequisite for the simulation is that calculation rules and corresponding data, such as the duration of insulin action as a function of the dose, are implemented (eg, as data tables). Mathematical functions are stored for each of these states.
The hybrid solutions work on the basis of the MPC algorithm (ie, the basal insulin delivery is controlled adaptively according to the current glucose value, the PwD delivers the meal bolus manually):
– the hybrid AID system t:slim X2 CONTROL IQ (Tandem)
– the CamAPS FX algorithm
– the DBLG1 Diabeloop algorithm
– part of the PwD with AID systems build by themselves (do-it-yourself (DIY) AID systems (“looper community”)). 33
Diabeloop has gone beyond the MPC algorithm to make its software self-learning. 19 Artificial intelligence tools are used to analyze glucose data from each of the past two weeks. This retrospective analysis compares the resulting CGM profiles from glucose regulation, for example, glucose rises and falls at meals, including carbohydrate intake inputs made, meal boluses retrieved, postprandial excursions, etc. The effects of physical activity (intensity of exercise, change in IS during exercise, etc.) are also analyzed. Data from the patients’ medical history (age, duration of diabetes, triglycerides (which have an influence on IS)) are also included. Comparable glucose courses with comparable actions/activities are stored in a database and used by the algorithm. In principle, a personalization of the data in terms of glucose regulation takes place. The aim is to relieve PwD more and more from their therapeutic decisions and at the same time to avoid therapy errors. With artificial intelligence, this can be realized without being intellectually challenging for PwD. Without artificial intelligence, personalizing the input data for the algorithm is difficult, which some of the “loopers” implement at great expense due to their high level of expertise regarding their own glucose regulation.
In the future, the use of artificial intelligence will increasingly find its way into the algorithms of various manufacturers. This can be done in a similar way with fuzzy logic, for example.
AID Systems Controlled via “Fuzzy Logic” (MD-Logic for the Realization of a MDLAP)
The algorithms for AID systems presented so far (PID and MPC) take into account relatively roughly the situation of the individual PwD. However, this is characterized by non-linearity, complexity and uncertainty of the biological system, including its inherent dynamic regulation. It does not seem sufficient to comprehensively regulate subtly with one input parameter (glucose) and one output parameter (insulin delivery). In the hybrid AID systems commercially available up to now, these limitations are hardly noticeable, since only the basal insulin delivery (670G) and, if necessary, the correction boluses (MiniMed 780G, t:slim X2 CONTROL IQ) are regulated automatically. Both forms of insulin delivery are characterized by a relatively small bolus size (microboli), which is managed by a linear control algorithm. However, if large insulin boli are to be delivered automatically at mealtimes, the aforementioned challenges consist in establishing a nonlinear, almost physiological regulation. One way to overcome these is to apply the principles of fuzzy logic. This will be accessed in a future MDLAP system (Medical Doctor - Logic Artificial Pancreas). 34
If one thinks about computer logic, the first thing that comes to mind is the binary logic, which strictly distinguishes between: a statement is true (“1”) or a statement is not true (“0”). This logic is used to achieve unambiguous results and proofs and is applied in electronic circuits and generally in digital technology. The information “the water is warm” or the “water is not warm” is unambiguous for a computer. However, the information “warm water has the temperature of 40°C,” “non-warm water of 39.5°C” is not logical. Only a human being can feel this way. In principle, this is the basis of fuzzy logic which imitates the human way of thinking. In other words, it is used to describe fuzzy (not precisely subdivided) states, patterns, etc., for example a “little warm,” “quite warm,” or similar, fuzzy terms as they are stated by humans. Intermediate values are allowed in this logical world, not only yes or no: A “bit warm” is then for example “0.7 warm” and results from logical connections between two (binary) values, represented by operations with these fuzzy sets “AND” (formation of intersection sets), “OR” (formation of union sets), “NOT” (formation of complementary sets).
Graphically, a comparison of “binary logic” and “fuzzy logic” from the above example looks like this. In binary, any temperature above 40°C is warm and any temperature below that is cold. So it results in a step function. In fuzzy logic (eg, 0.5 warm, 0.65 warm, etc.), on the other hand, the intermediate values form a non-linearly increasing function that represents a smooth transition. So in the example described, 40°C is 1.0 warm, 25°C is 0.5 warm, 10°C is cold, so 0.0 warm.
With respect to control engineering applied to the control of a traffic light, with binary logic this always switches at a fixed time between “red” and “green.” Controlled with fuzzy logic, the system can take non-linear influences into account, such as traffic density, traffic flow due to the control of other traffic lights, etc. For this purpose, fuzzy rules apply, such as “if the traffic flow in one direction is almost uninterrupted, then stay at “green.” Thus, the current situation is taken into account by the fuzzy logic control.
Implementation of fuzzy logic into AID systems means taking into account the still effective insulin in the blood stream from previous insulin doses, the current glucose concentration, its change due to a further insulin delivery as well as the effect of influences for example, by physical activity. The fuzzy rules here are the treatment rules employed by a PwD (and his treating physician) and these then are, for example: “if the glucose level is too high, then deliver insulin” or (in the more complex case of an “AND” link): “if the glucose level is too high and the PwD is exercising, then do not deliver insulin.” Thus, MDLAP uses treatment rules are based on the knowledge of diabetologists. These rules are individualized for each PwD, taking into account his individual diabetes management, such as insulin delivery regimen, correction factors, insulin pharmacodynamics, and typical activities. Input parameters include past and future glucose trends and current and future glucose values calculated from rtCGM data. Initial parameters of each rule are:
1) change in basal rate and
2) proportion of prandial insulin bolus.
The goal is to maintain glucose levels between 80-120 mg/dl, this is supported by a control-to-target module (CTM). This is a detector to identify specific glucose dynamics in certain situations that require special treatment. These include, for example, meal times. As a result, the insulin dose is adjusted accordingly.
It can be concluded that via fuzzy logic an individually adapted, self-learning AID system is created, which was evaluated successfully in the DREAM studies. 34 In this way, a full AID system will be possible in the future, that is, one in which both, the basal and the bolus insulin administration will be regulated fully automatically. This is in line with the fulfillment of a long-held dream of PwD.
Summary
In principle, the different algorithms for AID systems are well known and understood; however, the challenge is to adapt them to all daily life situations of PwD. Due to the fact that insulin administration via the subcutaneous route means that insulin is applied in the wrong place with pharmacodynamic properties that do not correspond to physiology, “small” deviations from normoglycemia are to be expected. Consequently, each regulation represents a certain compromise, which must be made as acceptable as possible.
There is a need for good head-to-head studies comparing the effectiveness and safety of the different algorithms. Such clinical studies are needed to better understand what the ‘clinical’ performance of the different algorithms in practice are. The outcome of such studies depend also on a number of other factors, that is, measurement quality of the glucose sensor of the given CGM system, the algorithm implemented in it, the type of insulin pump used (the accuracy with which the insulin is applied), and which insulin is applied with which infusion pattern. As long as no such studies were performed, it is difficult to state which algorithm is better than the others.
Addendum
The approach to develop an algorithm for glucose-controlled insulin delivery will be exemplified by the PID algorithm. 14 In PID the P stands for proportional control, I for increment (or integral) control, and D for derivative control. These 3 phases correspond not only to an approach familiar from heating control, but also basically to the feedback behavior of beta cells (Figure 4), albeit just in reverse. In heating, the derivative phase mainly takes effect at low temperature values, the integral phase at values only slightly below the set temperature, and the proportional phase when the temperature is reached to maintain it. With AID systems the differential phase mainly occurs at very high glucose values, the integral phase when glucose values are slightly too high, and the proportional phase when the target glucose value is reached. If the glucose values are significantly below the target glucose value, no insulin is delivered, just as a heater no longer delivers heat if the temperature is high above the target value.
The phases are described mathematically as:
– Proportional phase (P) takes into account the difference between current glucose level and target glucose level (CSensor - CTarget): insulin delivery is proportional to glucose level:
(1) |
CSensor - glucose concentration sensor
CTarget - target value of glucose concentration
t – time
– Increment phase (I): this is proportional to the difference between CSensor – CTarget:
(2) |
- Response phase (derivative): insulin delivery is proportional to the rate of glucose change (D)
(3) |
dC/dt - change glucose concentration/time
The parameters Kp, TI, TD must be adjusted individually (when using a fuzzy logic, they are simulated mathematically). Here, the constant Kp (in mIE/min/mg/dl, IE - international insulin unit) determines the insulin secretion rate in response to the basal glucose level, the constant TI (in min) determines the proportion of the increment phase, and the constant TD determines the proportion of the derivative phase.
The total delivery algorithm is the sum of the 3 proportions (Figure 4):
(4) |
The necessary insulin dosage is calculated from the knowledge of the current glucose concentration, the glucose target value and the parameters Kp, TI, TD.
The model becomes more complex when the differences between glucose values in ISF and blood are taken into account. In glucose dynamics, glucose concentration CISF (indices ISF - interstitial fluid) measured in subcutaneous tissue is different from BG CB (indices B - blood). This can be captured with a continuity model (Figure 5).
The temporal change of glucose concentration in the subcutaneous ISF depends on the exchange of glucose between blood and ISF, represented by the glucose flow rates kBISF, kISFB and the efflux of glucose into the body cells k ISFZ (glucose consumption). An increase in insulin concentration increases glucose consumption by peripheral cells. It results in:
(5) |
CB - glucose concentration in blood
CISF - glucose concentration in the interstitium
VB - volume in blood
VISF - volume in the interstitium
kBISF - flow rate blood interstitium
kISFB - flow rate interstitium blood
kISFZ - glucose consumption in peripheral cells
The ratio of glucose concentration in ISF and blood represents the concentration gradient (CISF/CB). After glucose homeostasis is reached, the following follows for the glucose concentration in the ISF:
(6) |
The delay of the glucose concentration in the ISF compared to blood (“time-lag”) depends on the 2 flow rates kBISF and kISFZ and is:
(7) |
This time constant gives the time necessary to reach 63% of equilibrium. Using an enzymatic electrochemical glucose sensor results in a sensor current Isig proportional to the glucose concentration in the ISF:
(8) |
Here is a parameter expressing the sensor sensitivity (in nA/mg/dl). This is not constant for the entire duration of use, so it is time-dependent. Because the glucose sensor reading must be calibrated, the measured glucose concentration, taking into account the calibration factor Fkal, finally results in:
(9) |
When the PID algorithm is used, the following follows for the required insulin dosage per unit time with:
(10) |
FErr is the resulting error due to the deviation from BG, that is, the difference between current glucose concentration and glucose target value, Kp, TI, TD are the parameters from the PID model to be adjusted individually.
Furthermore, it should be considered that insulin delivery is subcutaneous, which is not taken into account with (10). In case of subcutaneous delivery, the ratio of sensor glucose CSensor glucose to blood glucose CB results to:
(11) |
Finally, the ratio of insulin level in blood IBlood to insulin dosage IDosis follows from this:
(12) |
with which the corresponding inulin bolus to be delivered is calculated.
Supplemental Material
Supplemental material, sj-docx-1-dst-10.1177_19322968211008442 for Algorithms for Automated Insulin Delivery: An Overview by Andreas Thomas and Lutz Heinemann in Journal of Diabetes Science and Technology
Footnotes
Abbreviations: AID, automated insulin delivery; AHD, Automated Hormone Delivery System; CGluc, glucose concentration; CIns, insulin concentration; CSII, continuous subcutaneous insulin infusion; CTM, control-to-target module; DIR, daily insulin requirement; H-AID, hybrid AID system; HPS, hypoglycemic predictive algorithms; ISF, interstitial fluid; IS, insulin sensitivity -Derivative; PwD, patient(s) with diabetes; rtCGM, real-time MD logic; DreaMed algorithm; MDLAP, medical doctor - logic artificial pancreas; MPC, model predictive control; PID, proportional-integrative continuous glucose monitoring; SAP, sensor augmented pump therapy.
Declaration of Conflicting Interests: The author(s) declared the following potential conflicts of interest with respect to the research, authorship, and/or publication of this article: AT was Scientific Manager of Medtronic Germany until April 2020. LH hold Shares in the Profil Institut für Stoffwechselforschung, Neuss, Germany. LH is consultant for a range of companies that develop new diagnostic and therapeutic options for the treatment of patients with diabetes.
Funding: The author(s) received no financial support for the research, authorship, and/or publication of this article.
ORCID iDs: Andreas Thomas https://orcid.org/0000-0002-6549-2793
Lutz Heinemann https://orcid.org/0000-0003-2493-1304
Supplemental Material: Supplemental material for this article is available online.
References
- 1. Hovorka R. Continuous glucose monitoring and closed-loop systems. Diabet Med. 2006;23(1):1-12. doi: 10.1111/j.1464-5491.2005.01672.x [DOI] [PubMed] [Google Scholar]
- 2. Fabris C, Kovatchev B. The closed-loop artificial pancreas in 2020. Artif Organs. 2020;44(7):671-679. doi: 10.1111/aor.13704 [DOI] [PubMed] [Google Scholar]
- 3. Russell SJ, El-Khatib FH, Nathan DM, Magyar KL, Jiang J, Damiano ER. Blood glucose control in type 1 diabetes with a bihormonal bionic endocrine pancreas. Diabetes Care. 2012;35(11):2148-2155. doi: 10.2337/dc12-0071 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4. Russell SJ, El-Khatib FH, Sinha M, et al. Outpatient glycemic control with a bionic pancreas in type 1 diabetes. N Engl J Med. 2014;371(4):313-325. doi: 10.1056/NEJMoa1314474 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5. Blauw H, Onvlee AJ, Klaassen M, van Bon AC, DeVries JH. Fully closed loop glucose control with a bihormonal artificial pancreas in adults with type 1 diabetes: an outpatient, randomized, crossover trial. Diabetes Care. 2021;44(3):836-838. doi: 10.2337/dc20-2106 [DOI] [PubMed] [Google Scholar]
- 6. El-Khatib FH, Russell SJ, Nathan DM, Sutherlin RG, Damiano ER. A bihormonal closed-loop artificial pancreas for type 1 diabetes. Sci Transl Med. 2010;2(27):27ra. doi: 10.1126/scitranslmed.3000619 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7. Russell SJ, El-Khatib FH, Nathan DM, Damiano ER. Efficacy determinants of subcutaneous microdose glucagon during closed-loop control. J Diabetes Sci Technol. 2010;4(6):1288-1304. doi: 10.1177/193229681000400602 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8. Hovelmann U, Bysted BV, Mouritzen U, et al. Pharmacokinetic and pharmacodynamic characteristics of dasiglucagon, a novel soluble and stable glucagon analog. Diabetes Care. 2018;41(3):531-537. doi: 10.2337/dc17-1402 [DOI] [PubMed] [Google Scholar]
- 9. Castle JR, Elander M. Long-term safety and tolerability of dasiglucagon, a stable-in-solution glucagon analogue. Diabetes Technol Ther. 2019;21(2):94-96. doi: 10.1089/dia.2018.0363 [DOI] [PubMed] [Google Scholar]
- 10. Wilson LM, Jacobs PG, Castle JR. Role of glucagon in automated insulin delivery. Endocrinol Metab Clin North Am. 2020;49(1):179-202. doi: 10.1016/j.ecl.2019.10.008 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11. Basu A, Dube S, Slama M, et al. Time lag of glucose from intravascular to interstitial compartment in humans. Diabetes. 2013;62(12):4083-4087. doi: 10.2337/db13-1132 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12. Kovatchev BP, Shields D, Breton M. Graphical and numerical evaluation of continuous glucose sensing time lag. Diabetes Technol Ther. 2009;11(3):139-143. doi: 10.1089/dia.2008.0044 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13. Siegmund T, Heinemann L, Kolassa R, Thomas A. Discrepancies between blood glucose and interstitial glucose-technological artifacts or physiology. J Diabetes Sci Technol. 2017;11(4):766-772. doi: 10.1177/1932296817699637 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14. Steil GM, Rebrin K, Darwin C, Hariri F, Saad MF. Feasibility of automating insulin delivery for the treatment of type 1 diabetes. Diabetes. 2006;55(12):3344-3350. [DOI] [PubMed] [Google Scholar]
- 15. Bergenstal RM, Garg S, Weinzimer SA, et al. Safety of a hybrid closed-loop insulin delivery system in patients with type 1 diabetes. JAMA. 2016;316(13):1407-1408. doi: 10.1001/jama.2016.11708 [DOI] [PubMed] [Google Scholar]
- 16. Petrovski G, Al Khalaf F, Campbell J, Fisher H, Umer F, Hussain K. From multiple daily injections to hybrid closed-loop system in ten days, utilizing a structured initiation protocol. J Diabetes Sci Technol. 2020;14(3):689-690. doi: 10.1177/1932296819895509 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17. Battelino T, Danne T, Bergenstal RM, et al. Clinical targets for continuous glucose monitoring data interpretation: recommendations from the international consensus on time in range. Diabetes Care. 2019;42(8):1593-1603. doi: 10.2337/dci19-0028 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18. Danne T, Nimri R, Battelino T, et al. International consensus on use of continuous glucose monitoring. Diabetes Care. 2017;40(12):1631-1640. doi: 10.2337/dc17-1600 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19. Quemerais MA, Doron M, Dutrech F, et al. Preliminary evaluation of a new semi-closed-loop insulin therapy system over the prandial period in adult patients with type 1 diabetes: the WP6.0 Diabeloop study. J Diabetes Sci Technol. 2014;8(6):1177-1184. doi: 10.1177/1932296814545668 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20. Benhamou PY, Franc S, Reznik Y, et al. Closed-loop insulin delivery in adults with type 1 diabetes in real-life conditions: a 12-week multicentre, open-label randomised controlled crossover trial. Lancet Digit Health. 2019;1(1):e17-e25. doi: 10.1016/S2589-7500(19)30003-2 [DOI] [PubMed] [Google Scholar]
- 21. Hovorka R, Allen JM, Elleri D, et al. Manual closed-loop insulin delivery in children and adolescents with type 1 diabetes: a phase 2 randomised crossover trial. Lancet. 2010;375(9716):743-751. doi: 10.1016/S0140-6736(09)61998-X [DOI] [PubMed] [Google Scholar]
- 22. Elleri D, Allen JM, Biagioni M, et al. Evaluation of a portable ambulatory prototype for automated overnight closed-loop insulin delivery in young people with type 1 diabetes. Pediatr Diabetes. 2012;13(6):449-453. doi: 10.1111/j.1399-5448.2012.00903.x [DOI] [PubMed] [Google Scholar]
- 23. Walsh J, Roberts R, Heinemann L. Confusion regarding duration of insulin action: a potential source for major insulin dose errors by bolus calculators. J Diabetes Sci Technol. 2014;8(1):170-178. doi: 10.1177/1932296813514319 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24. Bequette BW. Algorithms for a closed-loop artificial pancreas: the case for model predictive control. J Diabetes Sci Technol. 2013;7(6):1632-1643. doi: 10.1177/193229681300700624 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25. Dassau E, Atlas E, Phillip M. Closing the loop. Int J Clin Pract Suppl. 2010;(166):20-25. doi: 10.1111/j.1742-1241.2009.02274.x [DOI] [PubMed] [Google Scholar]
- 26. Dassau E, Cameron F, Lee H, et al. Real-time hypoglycemia prediction suite using continuous glucose monitoring: a safety net for the artificial pancreas. Diabetes Care. 2010;33(6):1249-1254. doi: 10.2337/dc09-1487 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27. Atlas E, Nimri R, Miller S, Grunberg EA, Phillip M. MD-logic artificial pancreas system: a pilot study in adults with type 1 diabetes. Diabetes Care. 2010;33(5):1072-1076. doi: 10.2337/dc09-1830 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28. Nimri R, Atlas E, Ajzensztejn M, Miller S, Oron T, Phillip M. Feasibility study of automated overnight closed-loop glucose control under MD-logic artificial pancreas in patients with type 1 diabetes: the DREAM project. Diabetes Technol Ther. 2012;14(8):728-735. doi: 10.1089/dia.2012.0004 [DOI] [PubMed] [Google Scholar]
- 29. Nimri R, Muller I, Atlas E, et al. MD-Logic overnight control for 6 weeks of home use in patients with type 1 diabetes: randomized crossover trial. Diabetes Care. 2014;37(11):3025-3032. doi: 10.2337/dc14-0835 [DOI] [PubMed] [Google Scholar]
- 30. Perez-Gandia C, Facchinetti A, Sparacino G, et al. Artificial neural network algorithm for online glucose prediction from continuous glucose monitoring. Diabetes Technol Ther. 2010;12(1):81-88. doi: 10.1089/dia.2009.0076 [DOI] [PubMed] [Google Scholar]
- 31. Brown SA, Kovatchev BP, Raghinaru D, et al. Six-month randomized, multicenter trial of closed-loop control in type 1 diabetes. N Engl J Med. 2019;381(18):1707-1717. doi: 10.1056/NEJMoa1907863 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32. Nikolaou M. Model predictive controllers: a critical synthesis of theory and industrial needs. Adv Chem Eng. 2001;26:131-204. [Google Scholar]
- 33. Heinemann L, Lange K. “Do It Yourself” (DIY)-automated insulin delivery (AID) systems: current status from a German point of view. J Diabetes Sci Technol. 2020;14(6):1028-1034. doi: 10.1177/1932296819889641 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34. Nimri R, Battelino T, Laffel LM, et al. Insulin dose optimization using an automated artificial intelligence-based decision support system in youths with type 1 diabetes. Nat Med. 2020;26(9):1380-1384. doi: 10.1038/s41591-020-1045-7 [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Supplemental material, sj-docx-1-dst-10.1177_19322968211008442 for Algorithms for Automated Insulin Delivery: An Overview by Andreas Thomas and Lutz Heinemann in Journal of Diabetes Science and Technology