Skip to main content
Journal of Diabetes Science and Technology logoLink to Journal of Diabetes Science and Technology
. 2021 Dec 3;16(1):19–28. doi: 10.1177/19322968211059149

Incorporating Prior Information in Adaptive Model Predictive Control for Multivariable Artificial Pancreas Systems

Xiaoyu Sun 1, Mudassir Rashid 2, Nicole Hobbs 1, Rachel Brandt 1, Mohammad Reza Askari 2, Ali Cinar 1,2,
PMCID: PMC8875040  PMID: 34861777

Abstract

Background:

Adaptive model predictive control (MPC) algorithms that recursively update the glucose prediction model are shown to be promising in the development of fully automated multivariable artificial pancreas systems. However, the recursively updated glycemic prediction models do not explicitly consider prior knowledge in the identification of the model parameters. Prior information of the glycemic effects of meals and physical activity can improve model accuracy and yield better glycemic control algorithms.

Methods:

A glucose prediction model based on regularized partial least squares (rPLS) method where the prior information is encoded as the regularization term is developed to provide accurate predictions of the future glucose concentrations. An adaptive MPC is developed that incorporates dynamic trajectories for the glucose setpoint and insulin dosing constraints based on the estimated plasma insulin concentration (PIC). The proposed adaptive MPC algorithm is robust to disturbances caused by unannounced meals and physical activities even in cases with missing glucose measurements. The effectiveness of the proposed adaptive MPC based on rPLS is investigated with in silico subjects of the multivariable glucose-insulin-physiological variables simulator (mGIPsim).

Results:

The efficacy of the proposed adaptive MPC strategy in regulating the blood glucose concentration (BGC) of people with T1DM is assessed using the average percent time in range (TIR) for glucose, defined as 70 to 180 mg/dL inclusive, and the average percent time in hypoglycemia (<70 and >54 mg/dL) and level 2 hypoglycemia (≤54 mg/dL). The TIR for a cohort of 20 virtual subjects of mGIPsim is 81.9% ± 7.4% (with no hypoglycemia or severe hypoglycemia) for the proposed MPC compared with 73.9% ± 7.6% (0.2% ± 0.1% in hypoglycemia and 0.1% ± 0.1% in level 2 hypoglycemia) for an MPC based on a recursive autoregressive exogenous (ARX) model.

Conclusions:

The adaptive MPC algorithm that incorporates prior knowledge in the recursive updating of the glucose prediction model can contribute to the development of fully automated artificial pancreas systems that can mitigate meal and physical activity disturbances.

Keywords: artificial pancreas systems, latent variable model, missing data, model predictive control, type 1 diabetes

Introduction

The time-varying dynamics and diurnal variations in the metabolic system challenge the closed-loop control of blood glucose concentration (BGC) in people with type 1 diabetes mellitus (T1DM).1,2 Automated insulin delivery systems, also called artificial pancreas (AP) systems, can adjust control parameters throughout the day to handle the diurnal metabolic variations. More advanced adaptive control algorithms are proposed that can automatically adjust the control parameters or update the underlying predictive model based on detected glycemic events.3 -7 Recent developments in adaptive control of BGC in people with T1DM can further improve glycemic control by better matching the insulin dose decisions to the requirements of the subject.6,8,9

Several adaptive control algorithms are proposed for automated insulin delivery systems, ranging from updating the control parameters over days, such as run-to-run control approaches,10 -12 to frequently adapting the parameters with each new glucose measurement. As the parameters of the glycemic predictive model are recursively updated with each new glucose measurement, the adaptive model parameters automatically recalibrate to better represent the current glycemic dynamics and incorporate the glycemic effects of unmeasured disturbances such as unannounced meals, spontaneous physical activity, psychological stress, and sleep. The recursively updated modeling paradigm enables the adaptive model to automatically capture and predict into the future the glycemic effects of the unmeasured disturbances.13,14 A limitation of adaptive modeling techniques is that the prior knowledge from historical data cannot be readily integrated in the recursive identification of the model parameters.

Recurring meals and physical activities are disturbances that present significant challenges to the tight control of BGC, particularly when these disturbances are not announced to the AP system by the user.5,15,16 One advantage of the adaptive modeling techniques that update the model parameters frequently with each new glucose data is that the glycemic effects caused by disturbances can be automatically characterized by the adaptive modeling techniques.3,5,13 During exercise, glycemic dynamics change rapidly as insulin sensitivity can increase several fold during exercise. Adaptive modeling techniques can capture the rapid temporary changes as well as the slow daily changes in the glycemic dynamics. However, such adaptive modeling techniques typically emphasize the fast learning of new glycemic effects as they are observed in the glucose-insulin dynamics. With the focus on real-time learning from the current data, the adaptive models do not typically incorporate prior knowledge of the glycemic effects of the disturbances from historical data. Incorporating prior knowledge on the glycemic effects of disturbances in the recursive identification of the model parameters has the potential to improve the accuracy of the predictive model and achieve better glycemic control.

Physical activity is another challenge (besides meals) that may hinder individuals with T1DM from achieving their glycemic control targets.13,17,18 The glycemic effects of physical activity vary based on the intensity, duration, and type of physical activity.19,20 The challenges to glycemic control caused by physical activity can be mitigated manually by suspending insulin delivery ahead of planned exercise or increasing the glucose setpoint target. An automated approach involves incorporating physiological measurements from physical activity trackers to systematically inform AP systems of the glycemic disturbances due to planned or spontaneous physical activities. The multivariable AP systems can automatically analyze the physiological measurements to estimate the type and intensity of the physical activity and respond appropriately by increasing the glucose setpoint target and suggesting consumption of supplemental rescue carbohydrates to avert any predicted hypoglycemia events.

A major development in automatically compensating for planned and spontaneous physical activity is the use of machine learning with physiological data from physical activity trackers to estimate refined metrics that capture the characteristics of the physical activity. 21 The refined estimates of energy expenditure computed from the multiple physiological measurements collected using a wristband device can better characterize the modality and intensity of the physical activity (see Appendix A). The energy expenditure estimates provide reliable inputs to the predictive models, though the time-varying nature of the delays in the glycemic effects of the disturbances must be accommodated by the modeling framework.

In this work, we developed a novel model predictive control (MPC) algorithm based on latent variable (LV) models for adaptive control of BGC in people with T1DM. The time-varying glycemic dynamics are modeled as instances of repetitive periods with a specified time duration. A regularized partial least squares (rPLS) method is proposed that incorporates prior information from historical data. By incorporating prior information, the properties of the glycemic predictive model are improved, and fewer LVs are needed for predicting the future glucose concentration trajectory. An adaptive MPC is further developed for regulating glycemic levels under the disturbance of unannounced meals and low-to-moderate intensity physical activities. In addition, dynamic trajectories for the glucose setpoint and constraints on the plasma insulin concentration (PIC) are integrated in the MPC algorithm to achieve better control of the BGC and reduce the risk of glycemic excursions. The performance of the proposed adaptive MPC strategy is compared with an MPC algorithm based on an autoregressive exogenous (ARX) model using the multivariable glucose-insulin-physiological variables simulator (mGIPsim) 22 where the effects of physical activity on glycemic dynamics are modeled and physiological variables such as energy expenditure are provided as simulator outputs for use in the in silico evaluation of multivariable glucose control system.

Methods

Glucose Prediction Model

Accurate glucose prediction models are essential for the development of robust AP systems that increase time-in-range (TIR) and other glycemic target outcomes. In this work, an adaptive LV model is used in the design of multivariable AP system, with the novel adaptive model incorporating prior information to improve prediction ability. Estimates of the PIC (I) , a direct representation of the concentration of insulin in the bloodstream, are shown in our previous work to be more reliable than the conventional insulin-on-board curves in quantifying the amount remaining from previous insulin administration. Moreover, estimates of energy expenditure (E) , which are computed using machine learning models employing multiple physiological measurements such as heart rate, heart rate variability, galvanic skin response, and skin temperature, are more accurate in quantifying the amount of energy consumed during physical activity compared with the raw physiological variables. The estimates of PIC and EE are shown to be valuable inputs in forecasting the future BGC values.13,23 These variables are considered as inputs of the glucose prediction model along with historical continuous glucose monitoring (CGM) data (g) and the estimates of the meal effect (M) . The meal effect parameter represents the rate of appearance of glucose in the bloodstream from gut absorption, which is estimated using a nonlinear observer and a glucose-insulin model (see Appendix B). 8

Consider an arbitrary ith sample in training data X and Y as xiT=[giL+1:i,IiL+1:i,MiL+1:i,EiL+1:i] and yiT=gih+1:i , where L is the length of past window and h represents prediction horizon. The subscript a:b indicates all elements from sampling time a to sampling time b . The latent structures for developing the LV model can be extracted by the rPLS method (see Appendix C), where prior knowledge of the glucose prediction model can be explicitly incorporated while computing the LVs. Given the glucose prediction model and new input sample z , the first l LVs denoted by τ and the corresponding output y^ can be estimated as

τT=zTW(PTW)1 (1)
y^T=τTQT (2)

where W , P , and Q are the weight matrices.

Missing CGM measurements present a challenge for recursive modeling approaches as it causes incongruent data series that are not amenable for identification algorithms. To fully automate the multivariable AP system, a recursively updated glucose prediction model is developed (Figure 1). The missed CGM data are replaced by the corresponding reconciled values that are used in the estimation of the PIC and the meal effect parameters. As data loss persists and the time interval for the missing data extends, the predictions of future glucose predictions become less accurate, which then propagates to the estimation of PIC and meal effect parameters. The proposed modeling approach facilitates a straightforward technique to overcome the limitations of inaccurate estimation of PIC and meal effect parameters by arranging all the actual CGM measurements and estimated PIC and meal effects in an aggregated vector as z* , while all the inaccurate variables, including the missing CGM data, PIC and meal effect parameters estimated with predictions of the CGM data in an aggregated vector z# .24 -26 For a new input z where some of the variables are missed or estimated according to the prediction of the CGM data, the new data can be rearranged as zT=[z*T,z#T] , and the LVs τ of the new input z can be estimated using the known part z* as

Figure 1.

Figure 1.

Flowchart of glucose prediction model with missed CGM measurement. Abbreviation: CGM, continuous glucose monitoring.

τT=z*Tθ (3)

where θ=(X*TX*)1X*TT is the coefficient matrix and X* contains the same variables with z* in X . When the actual measurements of the missing data become available, the missing CGM data can be replaced by the actual or interpolated values, whereas the PIC and meal effect parameter can be updated using the interpolated CGM data. Finally, the glucose prediction model can be expressed as

y^=Qτ=Qθ1Tz*1+Qθ2TI=A1I+C1 (4)

where y^ represents the prediction of future CGM data (mg/dL) with prediction horizon h, and I represents the future (h2) PIC values (mU/L). A1 and C1 are the coefficient matrix and constant vectors, respectively.

As the insulin infusion rate, administered as either basal or bolus insulin, is the manipulated variable by the insulin pump, it is critical to relate the subcutaneous infused insulin to the PIC estimates. The insulin absorption model reported by Hovorka et al 27 (Appendix D) is adopted for this purpose, and it can be expressed as

I=A2u+C2 (5)

where I represents the future (h2) PIC values (mU/L) and u is insulin infusion rates (mU/min), and A2 and C2 are the coefficient matrix and constant vectors, respectively.

Adaptive MPC Strategy

The multivariable AP system aims to maintain glycemic levels within the safe range by minimizing the deviation of the predicted CGM data y^ from its desired reference trajectory ysp . The PIC quantifies the concentration of insulin in the bloodstream and is a significant factor for achieving euglycemic regulation and preventing hypoglycemia.8,28 Therefore, the adaptive MPC formulation explicitly considers the PIC in calculating the optimal insulin infusion rate. The control problem of the proposed adaptive MPC algorithm is formulated as

minuJ=(y^ysp)TQy(y^ysp)+(IIsp)TQI(IIsp)+uTQuus.t.y^=A1I+C1I=A2u+C2IminIImaxuminuumax (6)

where I denotes the future PIC estimations constrained by Imin and Imax , and u is the manipulated insulin infusion rates, incorporating the basal and bolus insulin infusion, which is constrained in the range formed by umin=0U/min and umax=6U/min , though the bolus administered by the pump never exceeds the threshold of 6 U every sampling time. The desired PIC, Isp=β0+β1y^ , and its boundaries Imin=βL0+βL1y^ and Imax=βU0+βU1y^ (Figure 2—top) are kept consistent with previous studies8,23 where the effectiveness of PIC boundaries in reducing the risk of hypoglycemia is demonstrated, and Ψ=[β0,β1,βL0,βL1,βU0,βU1] are the hyperparameters that are tuned to improve the control performance and reduce the risk of hypoglycemia. Matrices, Qy=5×102×IPH2 , QI=104×IPH2 where IPH2 is a (PH2)×(PH2) identity matrix, and Qu=(PIC/PICb)2 are the penalty weight matrices for glycemic, PIC, and insulin infusion rate terms, respectively, with Qu dynamically tuned according to the concentration of insulin present in the plasma. Qu increases along with PIC to make the adaptive MPC controller less aggressive if there is sufficient insulin present in the plasma, as illustrated in Figure 2 (bottom). The parameter PICb is the PIC with subject specified basal insulin infusion rate at steady state.

Figure 2.

Figure 2.

Illustration of desired PIC, PIC constraints, and plasma insulin risk. (NormalizedPIC=(PIC/PICb)) . Abbreviation: PIC, plasma insulin concentration.

As the CGM data deviate from the specified reference trajectory due to disturbances such as meals and physical activity and the BGCs do not revert back to the target (setpoint) immediately, there is a likelihood of overcorrection due to an overdosage of insulin infusion. To accommodate the slowly evolving dynamics of disturbances that cause CGM data to deviate from target, a first-order setpoint variation equation is employed that is designed to reduce the risk of hypoglycemia12,29 as the BGCs are considered to dynamically transition to the constant control target following a first-order differential equation rather than return to the control target immediately (constant setpoint). Thus, in this work, the first-order dynamic change of the setpoint ysp over the prediction horizon is defined as a first-order differential equation:

ysp=(yyc)et/tc+y (7)

where y is the latest value of BGC, yc is the defined constant control target, t=kTs , k=1,,h , and tc is the time constant that adjusts the time it takes for BGC to return to yc which is set to 110 mg/dL and tc is set to 120 minutes. Both the target yc and tc are dynamically changed in response to meal and physical activity to achieve better control performance. In contrast, the constant setpoint ysp over the control horizon is defined as ysp=yc .

Handling unannounced meals is a major challenge for the fully automated multivariable AP systems because the CGM data values increase rapidly after carbohydrate consumption, and hyperglycemia remains a risk without premeal boluses that require user announcements for meals. The variations in CGM data can be analyzed to detect the rapid changes in glycemic dynamics caused by the glucose appearance in the bloodstream. 8 Specifically, the first-order deviation of the CGM data can have a large positive value when PIC is low, and the glucose utilization is smaller than glucose absorption. In addition, the second-order deviation is larger than a positive threshold at the beginning of the rapid increase of CGM measurements caused by the glucose absorption from gut. Thus, personalized thresholds for the first- and second-order deviations of CGM measurements are defined and used for indicating meal effects on glycemic dynamic.

βm={yc1ifyc0,andy0yc2ifyc0,andy>00ify<c0Ψ=βmΨ (8)

where c0 , c1 , and c2 are patient specified parameters, and y and y are the first- and second-order deviation of the CGM measurement computing from the latest four samples.

After meals, a higher PIC is preferred as insulin facilitates the transport, storage, and utilization of blood glucose and prevents individuals from experiencing hyperglycemia, which can be achieved by a more aggressive controller during meal absorption periods. Therefore, the control target Yc and the time constant tc are modified to be 90 mg/dL and 45 minutes, respectively, for 15 minutes after the meal effects are detected and to be 100 mg/dL and 60 minutes, respectively, for an additional 15 minutes such that the AP system can provide more insulin to the individual to mitigate the rapid increase resulting from absorption of carbohydrates.

During low to moderate intensity of physical activities, glucose utilized by muscle tissues can increase four- to fivefold. In addition, physical activity has prolonged effects on the glucose-insulin dynamics, and variations in insulin sensitivity can last for several hours after exercise. Thus, it is critical to reduce the PIC during and after exercise, which is achieved by switching the control target to larger values. In this work, Yc is modified to be 160 mg/dL during exercise and reduces to 110 mg/dL exponentially over time after exercise. Meanwhile, the time constant tc is set to be 180 minutes during exercise to prevent overdosing of insulin and reduce the risk of hypoglycemia caused by physical activity.

To prevent hypoglycemia events, a simple hypoglycemia predictive alarm strategy is developed based on the predictions of the future BG values. If any predicted value of the 20-mins-ahead BG predictions is lower than 70 mg/dL and a hypoglycemia alarm has not been triggered within the last 10 minutes, then a hypoglycemia predictive alarm warning is raised, and 10 g of rescue carbohydrates is suggested by the algorithm to the subject to prevent the forecasted impending hypoglycemia (rescue carbs suggested are given in simulations).

Results

The proposed adaptive MPC algorithm is evaluated over 13-day-long simulations after initialization using the mGIPsim software for T1DM that has 20 in silico subjects, which also facilitates studying the glycemic variations caused by diverse types and durations of physical activities. For the purposes of comparative evaluations, an MPC algorithm based on an autoregressive with exogenous input (ARX) model 30 is developed and compared with the proposed adaptive MPC strategy based on the LV model. The comparative ARX-based MPC solves the same optimal control problem and the model predicts the future glucose trajectory using the same input variables to the glucose prediction model as the MPC based on the LV model, including historical CGM measurements, estimates of PIC and meal effects, and energy expenditure. Moreover, MPC configurations where the setpoints are constant values rather than dynamic trajectories generated from the first-order differential equations (Equation 7) are also studied. The nominal values for the simulation scenarios are summarized in Table 1 where the in silico subjects conduct one bout of physical activity (treadmill running or stationary biking exercise) each day. In addition, daily variations are introduced by adding random changes in the start time, duration, and characteristics of meals and physical activities. Furthermore, the CGM communication was assumed to be interrupted on average 2.5 times per day, with the missing data interval lasting anywhere between 5 and 35 minutes. The window size L is set to be 36, the number of LVs l is 3, and prediction horizon h is 12 for short-term glycemic regulation which is the same as the control horizon. The hyperparameters of the kernel matrix are [λg=145,ηg=0.1,λI=145,ηI=0.99,λM=145,ηM=0.99,λE=145,ηE=0.99] as determined by cross-validation, where the values of the hyperparameters are found such that the mean square error in the glucose predictions of a validation data set is minimized.

Table 1.

Summary of Simulation Scenario (Characteristics: Carbs [g] for Meal, Speed [mph] for Treadmill, and Power [W] for Stationary Bike Physical Activity) (Mean ± Standard Deviation).

Events Start time Duration (minutes) Characteristics
Meal Breakfast 08:00 ± 15 15 ± 5 45 ± 20 (g)
Lunch 12:20 ± 15 25 ± 5 70 ± 20 (g)
Dinner 19:00 ± 15 30 ± 5 80 ± 20 (g)
Snack 21:30 ± 15 15 ± 5 30 ± 20 (g)
Exercise Treadmill 10:30 ± 5 25 ± 5 5 ± 0.5 (mph)
Bike 16:30 ± 5 35 ± 5 65 ± 10 (W)

The average glycemic trajectories of the four tested MPC strategies are compared in Figure 3 and the performance indexes for the 20 in silico subjects are summarized in Table 2. The safety and effectiveness of the MPC strategies are illustrated by evaluating the percentage of time spent in different glycemic ranges and the statistical values of the controlled glucose trajectories. Specially, the desired (safe) TIR for CGM values reported is defined to be between 70 and 180 mg/dL, while level 2 hypoglycemia occurs if the CGM data are not more than 54 mg/dL. 31 The average percent time in safe range is 81.9% for the proposed MPC method based on rPLS model using first-order setpoint, compared with 77.9% when the setpoint is constant. Furthermore, for the proposed MPC strategy based on rPLS model using first-order trajectory, all the subjects are in zone B of control variability grid, which is the sub-optimal zone (zone A is the optimal zone).

Figure 3.

Figure 3.

Comparison of average glucose trajectories and insulin boluses of 20 virtual subjects for different MPC strategies. Abbreviation: MPC, model predictive control.

Table 2.

Performance Index of Various MPC Strategies Across 20 Virtual Subjects. (Mean ± Standard Deviation).

Setpoint
Constant
First-order
MPC strategy rPLS ARX rPLS ARX
Percentage (%) of time in BGC (mg/dL) range [40, 54] 0 ± 0 0.1 ± 0.1 0 ± 0 0.1 ± 0.1
(54, 70) 0 ± 0 0.2 ± 0.1 0 ± 0 0.2 ± 0.1
[70, 180] 77.9 ± 10.9 74.4 ± 7.5 81.9 ± 7.4 73.9 ± 7.6
(180, 250] 20.2 ± 8.9 21.7 ± 4.7 17.1 ± 6.3 22.2 ± 4.7
(250, 400] 1.9 ± 2.3 3.6 ± 3.4 1.0 ± 1.4 3.6 ± 3.5
BGC (mg/dL) [2.5%, 97.5%] [105.3, 176.6] [100.0, 182.7] [102.0, 167.0] [100.7, 183.7]
Mean 143.1 ± 19.7 144.6 ± 11.4 138.2 ± 9.6 145.3 ± 11.7
Minimum 74.2 ± 4.7 54.6 ± 8.0 74.1 ± 3.6 54.7 ± 8.3
Maximum 275.7 ± 32.5 291.6 ± 37.9 259.1 ± 27.3 289.5 ± 35.3
No. of subjects in regions of control variability grid analysis Zone A 0 0 0 0
Zone B 20 19 20 19
Zone C 0 0 0 0
Zone D 0 1 0 1
Zone E 0 0 0 0
Average rescue carbs (g) per day 3.4 ± 2.2 4.0 ± 2.0 4.2 ± 3.7 3.9 ± 1.8
No. of predicted hypoglycemia alarms 4.45 ± 2.9 5.25 ± 2.6 5.5 ± 4.8 5.1 ± 2.4
Total number of actual hypoglycemic events 4 210 3 214

Abbreviation: MPC, model predictive control; rPLS, regularized partial least squares; ARX, autoregressive exogenous; BGC, blood glucose concentration.

The comparison of glycemic trajectories and bolus insulin for the different MPC strategies for a select subject of the mGIPsim software (Figure 4) illustrates that the BGC is tightly regulated within the safe range by the proposed adaptive MPC algorithm based on rPLS model. In contrast, the MPC approach based on the ARX model can result in an overdose of insulin when CGM data are missing, leading to level 2 hypoglycemia (Figure 4, around 16:15 pm). Also, no rescue carbohydrate treatment is needed for the proposed adaptive MPC strategies based on rPLS model as no hypoglycemia is predicted.

Figure 4.

Figure 4.

Comparison of glucose trajectories and insulin boluses of four MPC strategies for subject 12. (△represents hypoglycemia alarm and o represents missing CGM data. Black: ARX-Constant; Orange: ARX-First-Order; Blue: rPLS-Constant; Red: rPLS-First-Order). Abbreviations: MPC, model predictive control; CGM, continuous glucose monitoring; ARX, autoregressive exogenous; rPLS, regularized partial least squares.

The TIR for the 30 virtual subjects of the University of Virginia (UVa)/Padova metabolic simulator is 66.8% ± 13.0% for the proposed MPC compared with 65.4% ± 15.5% for an MPC based on a recursive ARX model. Moreover, the proposed MPC results in 0.1% ± 0.2% of the time spent in hypoglycemia and 0% ± 0.1% of the time spent in level 2 hypoglycemia, compared with the MPC based on a recursive ARX model that results in 0.3% ± 0.4% in hypoglycemia and 0.1% ± 0.1% in level 2 hypoglycemia. (Detailed comparison of results with the UVa/Padova metabolic simulator is reported in Appendix E.)

Discussion

Unannounced meals, spontaneous physical activity, and missing data in the CGM measurements are some of the challenges facing the development of fully automated AP systems. The performance of the proposed adaptive MPC strategy in regulating postprandial BGC, exercise-induced hypoglycemia, and missing values in CGM data is highlighted. The proposed adaptive MPC algorithm based on rPLS model outperforms the MPC approach based on ARX models across all the virtual subjects as the proposed approach maintains the BGC within the safe range for longer time without causing additional hypoglycemia events (P = 7.08 × 109 for TIR while using the first-order trajectory and P = .007 for TIR while using the constant trajectory). In addition, the postprandial BGCs are more tightly controlled by the proposed adaptive MPC as illustrated in Figure 3.

The proposed MPC method using first-order dynamics in reference trajectories results in no hypoglycemia events occurring over the 13-day-long closed-loop in silico study and TIR improved significantly comparing to MPC with constant setpoint based on rPLS model (P = .002). In contrast to the adaptive dynamic setpoint trajectories, a few episodes of hypoglycemia are observed when employing a constant setpoint (Table 2) even though 10 g rescue carbs is given to the subject when hypoglycemia is predicted within 20 minutes. Furthermore, some level 2 hypoglycemia episodes occur in the simulations with the MPC based on ARX model using both constant and first-order setpoints even if rescue carbs are given. The proposed adaptive MPC algorithm based on the novel rPLS model where first-order setpoint is adopted has the potential to reduce the risk of hyperglycemia events, as well. The average percentage of time spent in hyperglycemia decreases significantly (18.1%) compared with MPC based on rPLS model where constant setpoint is adopted and the average maximum BGC is lower (259.1 mg/dL). Moreover, all the subjects are in Zone B of the control variability grid analysis, which indicates that the proposed adaptive MPC strategies are effective and stable in regulating BGC without requiring user announcements for meals and physical activity, and in the presence of missing CGM data.

The proposed adaptive MPC strategy with the incorporation of first-order setpoints is demonstrated to simultaneously decrease both the time in hypoglycemia and hyperglycemia. Better regulation performance is achieved by the proposed adaptive MPC algorithm, especially when the CGM value is missing (Figure 3). The short-term communication interruptions of CGM signals have less effect on the proposed adaptive MPC as the missing CGM data that are replaced by the corresponding predictions can be excluded in the modeling process. This advantage of the proposed approach is particularly beneficial because the proposed rPLS model can explicitly handle missing data. The new rPLS modeling approach also yields more accurate glucose predictions compared with the ARX model.

The proposed rPLS-based MPC approach is compared with the ARX-based controller using both the US Food and Drug Administration (FDA)-accepted UVa/Padova metabolic simulator (Appendix E) and the mGIPsim software. The difference in the performance between the two simulators is due to the sensitivity of the hyperparameters to noise in the glucose measurements. The UVa/Padova metabolic simulator has a noisy glucose output, and our adaptive glucose modeling and control algorithms rely on the first- and second-order derivatives of the glucose measurements to determine the hyperparameters of the algorithm. Therefore, the improvement in the TIR for the desired glycemic range is not as pronounced in the UVa/Padova simulator due to the detrimental effects of the noise in the glucose measurements, whereas the mGIPsim simulator demonstrates a greater improvement in the rPLS-based MPC compared with the ARX-based control algorithm. Despite the sensitivity of the performance of the algorithm to noise in the glucose measurements, the rPLS-based algorithm demonstrates robustness because it performs well relative to the ARX-based control algorithm with lower risk of hypoglycemia.

Hypoglycemia is predicted for all the four tested MPC strategies, leading to hypoglycemia alarms and suggestion to consume 10 g rescue carbs. On average, hypoglycemia events are forecasted 4.45 to 5.5 times across the 13-day-long closed-loop in silico study (Table 2). For the two MPC strategies based on rPLS model, most hypoglycemia is predicted to happen during or after exercise, which indicates that more advanced strategies for dealing with effects of physical activity has the potential to further improve the performance of the proposed MPC strategies. In contrast, when the MPC controller based on ARX model is used, some hypoglycemia alarms are observed after some missing CGM values, and a large insulin bolus is suggested by ARX-model-based MPC (Figure 4). The results further display the capability of the proposed rPLS-model-based MPC while facing missed CGM data.

Despite the advances in LV modeling and the proposed adaptive MPC approach, sometimes high postprandial BGCs are observed due to the conservative estimation of the optimal insulin infusion rate (Figure 4). This is mainly because the hyperparameters for defining the setpoint are highly dependent on the first- and second-order derivates of CGM measurements. However, this method is maintained simply for computational considerations. Overestimation of bolus insulin can happen if the variation in CGM data is caused by noise but it is interpreted as the effects of meals. Thus, it is possible to further improve the control performance of the proposed adaptive MPC algorithm by adopting more sophisticated meal detection approaches from CGM data or signals from wearable devices. Moreover, it is possible to control the BGC within a tighter range by tuning the hyperparameters for generating the first-order setpoint trajectory, particularly as the objective of the optimal control problem is to minimize the errors between the predicted glucose and the setpoint trajectories. A more aggressive controller has the potential to reduce the hyperglycemia excursions of BGC after meals by delivering larger dose of insulin to the subject once a meal is detected. However, the controller should be tuned carefully to avoid increasing the risks of hypoglycemia. In addition, it is worthwhile considering the time intervals between meal and physical activities. If the exercise starts sooner after the consumption of meals which may occur in real life or snacks are consumed during the physical activity, the peaks of postprandial BGC will be reduced. Finally, it is important to enhance the strategies for tuning the hyperparameters according to the first- and second-order deviation of the CGM measurement and specify the period of meal and exercise. The data from wristband may help improve meal detection when arms move during meals. And smart glasses which is not considered in our work can also help improve meal detection.

Conclusions

The novel adaptive MPC algorithm based on the rPLS model can serve as a foundation for the development of a fully automated multivariable AP system that is robust to meal and physical activity disturbances. The proposed method can provide accurate estimations of the future CGM trajectory by excluding inaccurate information caused by missing CGM in the modeling process. The proposed adaptive MPC algorithms use setpoint trajectories with first-order dynamics tuned according to meal and exercise detection to provide effective glycemia control without causing additional hypoglycemia. The proposed adaptive MPC algorithm is tested with 20 virtual subjects of the mGIPsim software. The results illustrate the effectiveness and safety of the proposed adaptive MPC algorithm in regulating BGC and preventing hypoglycemia in the presence of missing CGM measurements and disturbances caused by unannounced meal and physical activity. The performance of the proposed MPC strategy should be further evaluated in clinical studies. The performance may be different as the events in a clinical study are usually more complex than simulation studies.

Supplemental Material

sj-docx-1-dst-10.1177_19322968211059149 – Supplemental material for Incorporating Prior Information in Adaptive Model Predictive Control for Multivariable Artificial Pancreas Systems

Supplemental material, sj-docx-1-dst-10.1177_19322968211059149 for Incorporating Prior Information in Adaptive Model Predictive Control for Multivariable Artificial Pancreas Systems by Xiaoyu Sun, Mudassir Rashid, Nicole Hobbs, Rachel Brandt, Mohammad Reza Askari and Ali Cinar in Journal of Diabetes Science and Technology

Acknowledgments

The work of Xiaoyu Sun was supported by the China Scholarship Council under grant 201906080136. Funds provided by the Hyosung S. R. Cho Endowed Chair at Illinois Institute of Technology to Ali Cinar are gratefully acknowledged.

Footnotes

Abbreviations: AP, artificial pancreas; ARX, autoregressive model with exogenous inputs; BGC, blood glucose concentration; CGM, continuous glucose monitoring; LV, latent variable; MPC, model predictive control; PIC, plasma insulin concentration; rPLS, regularized partial least squares; T1DM, type 1 diabetes mellitus; TIR, time in range.

Declaration of Conflicting Interests: The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding: The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by funds provided by China Scholarship Council to Xiaoyu Sun (201906080136) and funds provided by the Hyosung S. R. Cho Endowed Chair to Ali Cinar at Illinois Institute of Technology. Financial support by JDRF under grant 2-SRA-2017-506-M-B made possible through collaboration between the JDRF and The Leona M. and Harry B. Helmsley Charitable Trust is gratefully acknowledged.

Supplemental Material: Supplemental material for this article is available online.

References

  • 1. Rashid M, Hajizadeh I, Samadi S, et al. Automated closed-loop insulin delivery: system components, performance, and limitations. Glucose Monit Devices. 2020:293-326. doi: 10.1016/b978-0-12-816714-4.00015-6. [DOI] [Google Scholar]
  • 2. El Fathi A, Raef Smaoui M, Gingras V, Boulet B, Haidar A. The artificial pancreas and meal control: an overview of postprandial glucose regulation in type 1 diabetes. IEEE Control Syst. 2018;38(1):67-85. doi: 10.1109/MCS.2017.2766323. [DOI] [Google Scholar]
  • 3. Turksoy K, Quinn L, Littlejohn E, Cinar A. Multivariable adaptive identification and control for artificial pancreas systems. IEEE Trans Biomed Eng. 2014;61(3):883-891. doi: 10.1109/TBME.2013.2291777. [DOI] [PubMed] [Google Scholar]
  • 4. Hajizadeh I, Rashid M, Cinar A. Plasma-insulin-cognizant adaptive model predictive control for artificial pancreas systems. J Process Control. 2019;77:97-113. doi: 10.1016/j.jprocont.2019.03.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Turksoy K, Bayrak ES, Quinn L, Littlejohn E, Cinar A. Multivariable adaptive closed-loop control of an artificial pancreas without meal and activity announcement. Diabetes Technol Ther. 2013;15(5):386-400. doi: 10.1089/dia.2012.0283. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Askari MR, Hajizadeh I, Rashid M, Hobbs N, Zavala VM, Cinar A. Adaptive-learning model predictive control for complex physiological systems: automated insulin delivery in diabetes. Annu Rev Control. 2020;50:1-12. doi: 10.1016/j.arcontrol.2020.10.004. [DOI] [Google Scholar]
  • 7. Messori M, Kropff J, Del Favero S, et al. Individually adaptive artificial pancreas in subjects with type 1 diabetes: a one-month proof-of-concept trial in free-living conditions. Diabetes Technol Ther. 2017;19(10):560-571. doi: 10.1089/dia.2016.0463. [DOI] [Google Scholar]
  • 8. Hajizadeh I, Rashid M, Samadi S, et al. Adaptive personalized multivariable artificial pancreas using plasma insulin estimates. J Process Control. 2019;80:26-40. doi: 10.1016/j.jprocont.2019.05.003. [DOI] [Google Scholar]
  • 9. Boiroux D, Duun-Henriksen AK, Schmidt S, et al. Adaptive control in an artificial pancreas for people with type 1 diabetes. Control Eng Pract. 2017;58:332-342. doi: 10.1016/j.conengprac.2016.01.003. [DOI] [Google Scholar]
  • 10. Owens C, Zisser H, Jovanovic L, Srinivasan B, Bonvin D, Doyle FJ. Run-to-run control of blood glucose concentrations for people with type 1 diabetes mellitus. IEEE Trans Biomed Eng. 2006;53(6):996-1005. doi: 10.1109/TBME.2006.872818. [DOI] [PubMed] [Google Scholar]
  • 11. Wang Y, Liu T, Zhao Z. Advanced PI control with simple learning set-point design: application on batch processes and robust stability analysis. Chem Eng Sci. 2012;71:153-165. doi: 10.1016/j.ces.2011.12.028. [DOI] [Google Scholar]
  • 12. Wang Y, Zhang J, Zeng F, et al. “Learning” can improve the blood glucose control performance for type 1 diabetes mellitus. Diabetes Technol Ther. 2017;19(1):41-48. doi: 10.1089/dia.2016.0328. [DOI] [PubMed] [Google Scholar]
  • 13. Hobbs N, Hajizadeh I, Rashid M, Turksoy K, Breton M, Cinar A. Improving glucose prediction accuracy in physically active adolescents with type 1 diabetes. J Diabetes Sci Technol. 2019;13(4):718-727. doi: 10.1177/1932296818820550. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Xie J, Wang Q. A data-driven personalized model of glucose dynamics taking account of the effects of physical activity for type 1 diabetes: an in silico study. J Biomech Eng. 2019;141(1). doi: 10.1115/1.4041522. [DOI] [PubMed] [Google Scholar]
  • 15. Dovc K, Macedoni M, Bratina N, et al. Closed-loop glucose control in young people with type 1 diabetes during and after unannounced physical activity: a randomised controlled crossover trial. Diabetologia. 2017;60(11):2157-2167. doi: 10.1007/s00125-017-4395-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Lee H, Buckingham BA, Wilson DM, Bequette BW. A closed-loop artificial pancreas using model predictive control and a sliding meal size estimator. J Diabetes Sci Technol. 2009;3:3(5):1082-1090. www.journalofdst.org. Accessed November 12, 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Uebelacker LA. Closed-loop control with unannounced exercise for adults with type 1 diabetes using the ensemble model predictive control. J Process Control. 2017;176(1):139-148. doi: 10.1016/j.jprocont.2019.05.017.Closed-Loop. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. Garcia-Tirado J, Colmegna P, Corbett JP, Ozaslan B, Breton MD. In silico analysis of an exercise-safe artificial pancreas with multistage model predictive control and insulin safety system. J Diabetes Sci Technol. 2019;13(6):1054-1064. doi: 10.1177/1932296819879084. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19. Colberg SR, Laan R, Dassau E, Kerr D. Physical activity and type 1 diabetes: time for a rewire? J Diabetes Sci Technol. 2015;9(3):609-618. doi: 10.1177/1932296814566231. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Tagougui S, Taleb N, Rabasa-Lhoret R. The benefits and limits of technological advances in glucose management around physical activity in patients type 1 diabetes. Front Endocrinol (Lausanne). 2019;9. doi: 10.3389/fendo.2018.00818. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. Sevil M, Rashid M, Maloney Z, et al. Determining physical activity characteristics from wristband data for use in automated insulin delivery systems. IEEE Sens J. 2020;20(21):12859-12870. doi: 10.1109/JSEN.2020.3000772. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Rashid M, Samadi S, Sevil M, et al. Simulation software for assessment of nonlinear and adaptive multivariable control algorithms: glucose–insulin dynamics in Type 1 diabetes. Comput Chem Eng. 2019;130:106565. doi: 10.1016/j.compchemeng.2019.106565. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Hajizadeh I, Rashid M, Samadi S, et al. Adaptive and personalized plasma insulin concentration estimation for artificial pancreas systems. J Diabetes Sci Technol. 2018;12(3):639-649. doi: 10.1177/1932296818763959. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Folch-Fortuny A, Arteaga F, Ferrer A. Assessment of maximum likelihood PCA missing data imputation. J Chemom. 2016;30(7):386-393. doi: 10.1002/cem.2804. [DOI] [Google Scholar]
  • 25. Golshan M, MacGregor JF, Bruwer MJ, Mhaskar P. Latent Variable Model Predictive Control (LV-MPC) for trajectory tracking in batch processes. J Process Control. 2010;20(4):538-550. doi: 10.1016/j.jprocont.2010.01.007. [DOI] [Google Scholar]
  • 26. Nelson PRC, Taylor PA, MacGregor JF. Missing data methods in PCA and PLS: score calculations with incomplete observations. Chemom Intell Lab Syst. 1996;35(1):45-65. doi: 10.1016/S0169-7439(96)00007-X. [DOI] [Google Scholar]
  • 27. Hovorka R, Canonico V, Chassin LJ, et al. 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]
  • 28. Hajizadeh I, Rashid M, Cinar A. Considering plasma insulin concentrations in adaptive model predictive control for artificial pancreas systems. Proc Annu Int Conf IEEE Eng Med Biol Soc EMBS. 2018;2018:4452-4455. doi: 10.1109/EMBC.2018.8513296. [DOI] [PubMed] [Google Scholar]
  • 29. Marchetti G, Barolo M, Jovanovic L, Zisser H, Seborg DE. An improved PID switching control strategy for type 1 diabetes. IEEE Trans Biomed Eng. 2008;55(3):857-865. doi: 10.1109/TBME.2008.915665. [DOI] [PubMed] [Google Scholar]
  • 30. Zhao C, Dassau E, Jovanovič L, et al. Predicting subcutaneous glucose concentration using a latent-variable-based statistical method for type 1 diabetes mellitus. J Diabetes Sci Technol. 2012;6(3):617-633. doi: 10.1177/193229681200600317. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31. Turksoy K, Hajizadeh I, Hobbs N, et al. Multivariable artificial pancreas for various exercise types and intensities. Diabetes Technol Ther. 2018;20(10):662-671. doi: 10.1089/dia.2018.0072. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

sj-docx-1-dst-10.1177_19322968211059149 – Supplemental material for Incorporating Prior Information in Adaptive Model Predictive Control for Multivariable Artificial Pancreas Systems

Supplemental material, sj-docx-1-dst-10.1177_19322968211059149 for Incorporating Prior Information in Adaptive Model Predictive Control for Multivariable Artificial Pancreas Systems by Xiaoyu Sun, Mudassir Rashid, Nicole Hobbs, Rachel Brandt, Mohammad Reza Askari and Ali Cinar in Journal of Diabetes Science and Technology


Articles from Journal of Diabetes Science and Technology are provided here courtesy of Diabetes Technology Society

RESOURCES