Abstract
Background
Closed-loop control of type 1 diabetes is receiving increasing attention due to advancement in glucose sensor and insulin pump technology. Here the function and structure of a class of control algorithms designed to exert control to range, defined as insulin treatment optimizing glycemia within a predefined target range by preventing extreme glucose fluctuations, are studied.
Methods
The main contribution of the article is definition of a modular architecture for control to range. Emphasis is on system specifications rather than algorithmic realization. The key system architecture elements are two interacting modules: range correction module, which assesses the risk for incipient hyper- or hypoglycemia and adjusts insulin rate accordingly, and safety supervision module, which assesses the risk for hypoglycemia and attenuates or discontinues insulin delivery when necessary. The novel engineering concept of range correction module is that algorithm action is relative to a nominal open-loop strategy—a predefined combination of basal rate and boluses believed to be optimal under nominal conditions.
Results
A proof of concept of the feasibility of our control-to-range strategy is illustrated by using a prototypal implementation tested in silico on patient use cases. These functional and architectural distinctions provide several advantages, including (i) significant insulin delivery corrections are only made if relevant risks are detected; (ii) drawbacks of integral action are avoided, e.g., undershoots with consequent hypoglycemic risks; (iii) a simple linear model is sufficient and complex algorithmic constraints are replaced by safety supervision; and (iv) the nominal profile provides straightforward individualization for each patient.
Conclusions
We believe that the modular control-to-range system is the best approach to incremental development, regulatory approval, industrial deployment, and clinical acceptance of closed-loop control for diabetes.
Keywords: artificial pancreas, closed-loop control algorithms, continuous glucose monitoring, diabetes, modeling
Introduction
People with type 1 or type 2 diabetes face a life long optimization problem: to maintain strict glycemic control without increasing their risk for hypoglycemia.1–3 The engineering challenge related to this problem is to design algorithms using automated insulin delivery to exert optimal closed-loop control of glucose fluctuations. Since the early studies of continuous external glucose regulation (e.g., BioStator4), two primary approaches have emerged: the use of classic proportional-integral-derivative (PID) algorithms and modern methods based on predictive models of glucose metabolism. The first studies using subcutaneous insulin delivery and continuous glucose monitoring (CGM) employed PID control.5,6 Model predictive control (MPC) has been receiving considerable attention7–10 due to its many clinical and engineering advantages. Following the logic of MPC, we argue that progress toward automated closed-loop control will be accelerated greatly by a structured modular approach to building artificial pancreas (AP) components. Specifically, we envision a system of control modules responsible for basal rate, premeal and correction insulin boluses, and hypoglycemia prevention. These modules will be informed by biosystem observers providing information about the patients' glycemic state. A modular approach to closed-loop control development would have a number of advantages that include, but are not limited to:
Incremental testing of modules in parallel or consecutive studies
Incremental regulatory approval, industrial deployment, and clinical acceptance of system features
User flexibility—each system observer or control module could be used separately or within an integrated control system, depending on patients' or physicians' choice
The first step toward a modular artificial pancreas system is the development of control to range, defined as insulin treatment for diabetes, which
Optimizes glucose control to within a certain target glucose range through the avoidance of extreme glucose fluctuations, specifically via prevention of hypoglycemia and reduction of postprandial hyperglycemia
Is based on CGM and continuous subcutaneous insulin delivery via an infusion pump
Consequently, we propose an algorithm aiming to achieve control to range that is composed of two interacting modules:
Range correction module (RCM)
Safety supervisor module (SSM)
The emphasis is more on “what the algorithm does” rather than on “how the algorithm does it.” The main purpose is to define a modular architecture for control to range and give specifications for the design of its modules. Ideally, the proposed architecture will provide a framework within which several different algorithms may be integrated, provided that they comply with the “what to do” specifications: SSM and RCM may be implemented in different ways as long as the specifications are fulfilled.
To provide a proof of concept of the modular architecture, we then introduce a particular implementation of these modules within a hierarchical architecture of an AP system and illustrate their action via computer simulation of typical use cases run on our in silico system, which has been previously introduced and accepted by the Food and Drug Administration (FDA) as a platform for preclinical experiments with closed-loop control algorithms.11,12
Fundamental Principles of Control to Range
The basic principles of operation of the RCM and SSM are as follows:
Both modules receive blood glucose (BG) and insulin data in real time
The RCM assesses continuously the risk for incipient hyper- or hypoglycemic deviations from the predefined range and adjusts insulin delivery rate as appropriate
The SSM assesses continuously the risk for hypo-glycemia and attenuates the insulin delivery rate when necessary [e.g., exerts braking action or employs insulin-on-board (IOB) constraints]
Both the RCM and the SSM permit and account for external insulin manipulation, e.g., basal rate, boluses, or pump shutoff initiated by the patient
The SSM has override authority over the actions of the RCM and over any external patient-initiated insulin delivery
Therefore, the control actions can be summarized as follows:
If the risk for hyper- or hypoglycemic deviations from the defined range is detected, based on CGM and delivered insulin, the RCM corrects insulin dosing accordingly
If the risk for hypoglycemia is detected based on a BG that is too low and/or excess IOB, the SSM reduces or discontinues insulin delivery (braking action or cessation)
Both modules suggest significant corrections to insulin delivery only if the relevant risks are detected.
The most likely control-to-range scenario would include action of both the RCM and the SSM. It is expected that over time the combined action of the RCM and the SSM will gradually improve the control of type 1 diabetes to within the desired range. This improvement could also be based on “learning” algorithms, such as run-to-run control (anticipated in future implementations of control to range).
Modular Design of Control to Range
The modular architecture of the proposed control-to-range algorithm is shown in Figure 1 and involves decomposition of control, estimation, and signal managementfunctions into multiple timescales. Algorithmic processes will run at three distinct timescales: (1) “continuous time,” defined by the fastest possible rate at which information can be provided by the system's physical layer (e.g., AP hardware interface platform, such as the APS described later13); (2) “real time,” defined by the rate at which BG management control updates are computed (e.g., 15-minutesamples); and (3) “off line,” referring to the fact that some data processing (patient individualization) will take place prior to but not during the patient's time under closed-loop control. Each timescale defines a “layer” of the overall architecture within which the control, estimation, and signal management functions will run (Figure 1).
The control function of the continuous time layer is the SSM responsible for the prevention of hypoglycemia and comprising algorithms that decide whether to reduce or discontinue the insulin infusion recommendations from the real-time layer, based on continuous time data.
The control function of the real-time layer is the RCM informed by a nominal open-loop strategy (basal and premeal boluses), in which a discrete-time, likely individualized, model of glucose–insulin kinetics is used to compute an optimized correction of nominal open-loop therapy.
The off-line layer of modular architecture serves to assess all available patient data to compute a patient-specific model of the glucose–insulin kinetics, a nominal open-loop strategy (basal and premeal boluses), and control aggressiveness parameter value.
The SSM and the RCM are detailed later. It is important to note that, while in the proposed design these two modules work in cooperation, they can also be deployed individually or sequentially in commercial medical devices. We anticipate that modular design will be the key to future sequential regulatory approval, deployment, and clinical acceptance of automated control-to-range treatment of diabetes.
Safety Supervision Module
Safety supervision is a natural component of any (open- or closed-loop) external glucose control. In control-to-range applications the SSM prevents hypoglycemia by modifying insulin delivery when a risk for hypoglycemia is detected. More generally, the SSM can act as a supervisor in any sensor-pump system.
The SSM is based on a combination of constraints using our established risk analysis of blood glucose data14 and knowledge of active insulin, e.g., using IOB constraints15 and “power brakes,16” making the best possible use of glucose and insulin data. Specifically, the signal management function of the continuous time layer is a data coordinator that serves to relay CGM and pump information to the estimation and control functions within the continuous time layer and also up to the real-time layer (Figure 1). The estimation function of the continuous time layer will receive frequent information about metabolic measurements (continuous glucose) and treatment (insulin injections) and will make internal calculations that assess the risk of hypoglycemia directly and/or indirectly. If the risk of hypoglycemia is high, the SSM intervenes by gradually reducing or discontinuing insulin delivery. Simulation experiments with a doubling insulin delivery rate show that power brakes alone prevent over 95% of otherwise imminent hypoglycemic episodes.16
Range Correction Module
The key concept of the RCM is the notion of a nominal open-loop profile. The nominal open-loop profile is a treatment strategy determined for each person off-line from patient records or observation, which is believed to be routine or typical for this individual. As described later, the RCM acts by introducing corrections to the nominal treatment strategy. This is a fundamental difference from typical control to target because no specific target glucose is pursued and control actions are limited to corrections of a predetermined nominal profile.
In terms of implementation within our modular architecture (Figure 1), each time step of the discrete time model embedded in the RCM will correspond to 15 minutes of real time. The estimation function of the real time layer is performed by a state update module, which maintains an internal representation of the patient's state based on a patient model identified off-line. The signal management function of the real-time layer is performed by a filtering module, which accepts 1- or 5-minute samples from the continuous time layer and produces appropriate 15-minute inputs to the state update module (Figure 1).
With this understanding, and in order to better characterize the control-to-range action of the RCM, we contrast RCM to control to target.
Control to target calls for integral action (e.g., such as found in PID control5) and will take action (insulin correction) continuously as long as the glucose is not exactly equal to the target value. Moreover, constraints on injected insulin and glucose concentration should be explicitly taken into account in the optimization problem. Finally, in order to reach control to target, an unbiased CGM system is needed. In contrast, a control-to-range objective is easier to reach and thus a simpler algorithm is required. In particular,
The RCM only computes corrections with respect to the nominal open-loop strategy: in fact, the actual pump command is the algebraic sum of a fixed open-loop nominal strategy (basal and premeal boluses), known to the RCM, and closed-loop control corrections decided by the RCM.
No integral action is included.
A simple linear model is used.
Constraints are not considered explicitly but are replaced by the SSM, which may override the control actions suggested by the RCM whenever the risk for hypoglycemia is encountered.
The aggressiveness of control actions is individualized so as to optimize a control-to-range performance index, such as the control variability grid analysis,17,18 which allows optimization with respect to a well-defined glucose range by jointly minimizing the risks for hypo- and hyperglycemia.
Reference glucose range varies according to the nominal open-loop profile, with different limits for night time, postprandial periods, etc. This approach reduces the likelihood of control action when glucose readings are within range.
Physical Layer [Artificial Pancreas Software (APS)]
The APS provides a flexible tool to conduct clinical trials in a clinical research center setting without the need to deal directly with the communication protocols of sensors, pumps, and controllers, as well as unified data log and human machine interface. The software shall call the controller every control cycle and the APS database can be queried by both SSM and RTC layers. The APS has been accepted by the FDA for use in closed-loop investigational systems.13
A Proof of Concept: Use Cases
In this section, a proof of concept of the feasibility of our control-to-range specifications is given by a specific SSM and RCM implementation. According to the modular paradigm, this is just one possible realization of the proposed architecture. Alternative algorithms for one or both the modules could be used, provided that they meet the aforementioned specifications.
The SSM is based on the computation of the low BG risk function proposed elsewhere14 given by
In our SSM, the insulin suggested by the RCM is multiplied by 1/(1 + risk(BG)).
The RCM is based on the unconstrained linear model predictive control algorithm described elsewhere,19 where more details are available. Its main feature is that, knowing a well-tuned open-loop therapy (given by the ensemble of basal insulin and premeal boluses), the quadratic cost function penalizes the glycemia error with respect to the nominal glycemia associated with the open-loop therapy. In this way, RCM does not rely on a constant set point but on a time-varying profile. For instance, the unavoidable postmeal rise of glycemia is accounted for so that excessive insulin delivery is avoided as long as the glucose rise resembles the nominal one. Although this particular implementation of RCM and SSM cannot be shown to defend a priori boundaries, it is a practical strategy to maintain and possibly recover the desired glucose range in the face of uncertainties and disturbances.
Note that in this implementation, the state update module is rather simple because the input–output nature of the considered MPC algorithm does not require a real observer but just a register of past input and output values.
The proposed control-to-range strategy is illustrated by means of four in silico experiments conducted on a virtual patient.11,12 All experiments start at 10:00, with the patient at a basal glucose value (140 mg/dl). An open-loop therapy consisting of basal insulin delivery and premeal boluses, proportional to meal amounts, was optimized via trial-and-error experiments on the virtual patient. The four experiments are described here.
Open loop in nominal conditions (Figure 2). This experiment shows that in nominal conditions (e.g., nominal meals and nominal insulin sensitivity), a control-to-range objective may be achieved by means of a well-calibrated open-loop therapy. However, as highlighted by subsequent experiments, an entirely different picture arises when nominal conditions are perturbed.
Control to range vs open loop with perturbed meals (Figure 3). Closed-loop control starts at 13:00. Actual meals differ from nominal ones so that the open-loop therapy is no longer optimal: the first two meals are greater than the nominal ones while the third is smaller and delayed by 30 minutes. In response to meal confirmation, RCM administers an appropriate insulin bolus based on nominal meal size according to the nominal open-loop profile (Figure 3; see the plot at 18:00). However, if an incipient hyperglycemic deviation is identified, as happens at 18:30, RCM increases the insulin delivery rate above the nominal open-loop basal level. Conversely, after identifying an incipient hypoglycemic deviation, as happens at 7:30, RCM attenuates the insulin delivery rate below the nominal basal level for open-loop control. On two occasions, at 1:00 and 8:00, hypoglycemia risk is detected and the SSM enforces attenuation of insulin delivery. Overall, control to range is more robust than open-loop therapy because it applies corrections in order to cope reactively with unexpected deviations from nominal profiles of glycemia, meals, and insulin.
Control to range vs open loop with nominal meals and perturbed insulin sensitivity (Figure 4). In this experiment, insulin sensitivity is 25% higher than the assumed nominal insulin sensitivity and, as a result, open-loop therapy fails to prevent hypoglycemia. Both RCM and SSM act to maintain glycemia within the range. On three occasions, at 14:00, 20:00, and 9:45, hypoglycemia risks are detected and the SSM enforces attenuation of insulin delivery. Again, control to range is more robust than open-loop therapy.
Control to range vs open loop with perturbed meals and perturbed insulin sensitivity (Figure 5). In this experiment the perturbations described in the two previous experiments occur simultaneously. Open-loop control cannot avoid a severe hypoglycemic episode after the third meal. However, joint action of the RCM and SSM achieves a more effective glycemic regulation. In particular, on three occasions the SSM prevents possible hypoglycemia. In this difficult experiment under conditions that are far from nominal, control to range proves more robust than open-loop therapy in preventing hypoglycemia.
Conclusions
Compared to traditional control-to-target algorithms, a control-to-range algorithm, made of the combination of SSM and RCM, is easily implementable on current commercial devices because there is no need for real-time parameter estimation or iteration procedures. Individualization is accomplished easily via the nominal profile of each person and can be based on a few clinical parameters (as experimented successfully in silico19 and in vivo20,21) or on an informative screening visit. Model individualization via ARX modeling22,23 can be used as well. These properties greatly simplify implementation of the control actions and accelerate the path toward regulatory approval and clinical application.
We have to note that the output of a dynamic system with delays cannot be guaranteed to be maintained within a precise target range by applying control actions only when the output goes outside the range. Thus, in order to guarantee that glycemia is maintained within target range, the RCM and the SSM will need to begin making corrections to insulin delivery while the BG is still within target range. This means that elevated risks for hypo- or hyperglycemia will be anticipated while the BG is still within target range—a notion that is inherent with our risk analysis theory.14
Acknowledgment
This study was supported by the Juvenile Diabetes Research Foundation Artificial Pancreas Project. The authors thank Dr. Aaron Kowalski, director of the Artificial Pancreas Project, for inspiring the discussion of control-to-range strategies; John Lum, Jaeb Center, for constructive comments and stimulus to provide in silico use cases; and Chiara Toffanin, University of Pavia, for technical support in running in silico experiments.
Abbreviations
- AP
artificial pancreas
- APS
artificial pancreas software
- BG
blood glucose
- CGM
continuous glucose monitoring
- MPC
model predictive control
- FDA
Food and Drug Administration
- IOB
insulin on board
- PID
proportional-integral-derivative
- RCM
range correction module
- SSM
safety supervisor module
References
- 1.Cryer PE. Hypoglycaemia: the limiting factor in the glycaemic management of Type I and type II diabetes. Diabetologia. 2002;45(7):937–948. doi: 10.1007/s00125-002-0822-9. [DOI] [PubMed] [Google Scholar]
- 2.The Diabetes Control and Complications Trial Research Group. The effect of intensive treatment of diabetes on the development and progression of long-term complications of insulin-dependent diabetes mellitus. N Engl J Med. 1993;329(14):978–986. doi: 10.1056/NEJM199309303291401. [DOI] [PubMed] [Google Scholar]
- 3.UK Prospective Diabetes Study (UKPDS) Group. Intensive blood-glucose control with sulphonylureas or insulin compared with conventional treatment and risk of complications in patients with type 2 diabetes (UKPDS 33) Lancet. 1998;352(9131):837–853. [PubMed] [Google Scholar]
- 4.Clemens AH, Chang PH, Myers RW. The development of Biostator, a Glucose Controlled Insulin Infusion System (GCIIS) Horm Metab Res. 1977;(Suppl 7):23–33. [PubMed] [Google Scholar]
- 5.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: 10.2337/db06-0419. [DOI] [PubMed] [Google Scholar]
- 6.Weinzimer SA, Steil GM, Swan KL, Dziura J, Kurtz N, Tamborlane WV. Fully automated closed-loop insulin delivery versus semiautomated hybrid control in pediatric patients with type 1 diabetes using an artificial pancreas. Diabetes Care. 2008;31(5):934–939. doi: 10.2337/dc07-1967. [DOI] [PubMed] [Google Scholar]
- 7.Parker RS, Doyle FJ, 3rd, Peppas NA. A model-based algorithm for blood glucose control in Type I diabetic patients. IEEE Trans Biomed Eng. 1999;48(2):148–157. doi: 10.1109/10.740877. [DOI] [PubMed] [Google Scholar]
- 8.Hovorka R, Canonico V, Chassin LJ, Haueter U, Massi-Benedetti M, Orsini Federici M, Pieber TR, Schaller HC, Schaupp L, Vering T, Wilinska ME. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol Meas. 2004;25(4):905–920. doi: 10.1088/0967-3334/25/4/010. [DOI] [PubMed] [Google Scholar]
- 9.Dua P, Doyle FJ, 3rd, Pistikopoulos EN. Model-based blood glucose control for type 1 diabetes via parametric programming. IEEE Trans Biomed Eng. 2006;53(8):1478–1491. doi: 10.1109/TBME.2006.878075. [DOI] [PubMed] [Google Scholar]
- 10.Magni L, Raimondo F, Bossi L, Dalla Man C, De Nicolao G, Kovatchev BP, Cobelli C. Model predictive control of type 1 diabetes: an in silico trial. J Diabetes Sci Technol. 2007;1(6):804–812. doi: 10.1177/193229680700100603. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Dalla Man C, Rizza RA, Cobelli C. Meal simulation model of the glucose-insulin system. IEEE Trans Biomed Eng. 2007;54(10):1740–1749. doi: 10.1109/TBME.2007.893506. [DOI] [PubMed] [Google Scholar]
- 12.Kovatchev BP, Breton MD, Dalla Man C, Cobelli C. In silico preclinical trials: a proof of concept in closed-loop control of type 1 diabetes. J Diabetes Sci Technol. 2009;3(1):44–55. doi: 10.1177/193229680900300106. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Dassau E, Zisser H, Palerm CC, Buckingham BA, Jovanovič L, Doye FJ., 3rd Modular artificial β-cell system: a prototype for clinical research. J Diabetes Sci Technol. 2008;2(5):863–872. doi: 10.1177/193229680800200518. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Kovatchev BP, Straume M, Cox DJ, Farhi LS. Risk analysis of blood glucose data: a quantitative approach to optimizing the control of insulin dependent diabetes. J Theor Med. 2000;3:1–10. [Google Scholar]
- 15.Ellingsen C, Dassau E, Zisser H, Grosman B, Percival MW, Jovanovic L, Doyle FJ., 3rd Safety constraints in an artificial pancreas β cell: an implementation of model-predictive control with insulin on board. J Diabetes Sci Technol. 2009;3(3):536–544. doi: 10.1177/193229680900300319. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Patek SD, Breton MD, Hughes C, Kovatchev BP. Control of hypoglycemia via estimation of active insulin, glucose forecasts, and risk-based insulin reduction. Proceedings of the 2nd Advanced Technology & Treatment for Diabetes; Athens, Greece. 2009. [Google Scholar]
- 17.Magni L, Raimondo F, Dalla Man C, Breton MD, Patek S, De Nicolao G, Cobelli C, Kovatchev BP. Evaluating the efficacy of closed-loop glucose regulation via control-variability grid analysis. J Diabetes Sci Technol. 2008;2(4):630–635. doi: 10.1177/193229680800200414. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Clarke WL, Kovatchev BP. Statistical tools to analyze continuous glucose monitor data. Diabetes Technol Ther. 2009;11(Suppl 1):S45–S54. doi: 10.1089/dia.2008.0138. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Magni L, Forgione M, Toffanin C, Dalla Man C, De Nicolao G, Kovatchev B, Cobelli C. Run-to-run tuning of model predictive control for type I diabetic subjects. J Diabetes Sci Technol. 2009;3(5):1091–1098. doi: 10.1177/193229680900300512. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Bruttomesso D, Farret A, Costa S, Marescotti MC, Vettore M, Avogaro A, Tiengo A, Dalla Man C, Place J, Facchinetti A, Guerra S, Magni L, De Nicolao G, Cobelli C, Renard E, Maran A. Closed-loop artificial pancreas using subcutaneous glucose sensing and insulin delivery, and a model predictive control algorithm: preliminary studies in Padova and Montpellier. J Diabetes Sci Technol. 2009;3(5):1014–1021. doi: 10.1177/193229680900300504. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Clarke WL, Anderson SM, Breton MD, Patek SD, Kashmer L, Kovatchev BP. Closed-loop artificial pancreas using subcutaneous glucose sensing and insulin delivery and a model predictive control algorithm: the Virginia experience. J Diabetes Sci Technol. 2009;3(5):1031–1038. doi: 10.1177/193229680900300506. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Dassau E, Herrero P, Zisser H, Buckingham B, Jovanovic L, Dalla Man C, Cobelli C, Vehí J, Doyle F. Implications of meal library and meal detection to glycemic control of type 1 diabetes mellitus through MPC control. Proceedings of the 17th IFAC World Congress; 2008; Seoul, Korea. pp. 4228–4233. [Google Scholar]
- 23.Finan DA, Palerm CC, Doyle FJ, 3rd, Seborg DE, Zisser H, Bevier WC, Jovanovic L. Effect of input excitation on the quality of empirical dynamic models for type 1 diabetes. AIChE J. 2009;55:1135–1146. [Google Scholar]