Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2024 Feb 1.
Published in final edited form as: Control Eng Pract. 2022 Nov 25;131:105386. doi: 10.1016/j.conengprac.2022.105386

Adaptive Personalized Prior-Knowledge-Informed Model Predictive Control for Type 1 Diabetes

Xiaoyu Sun a, Mudassir Rashid b, Mohammad Reza Askari b, Ali Cinar a,b
PMCID: PMC9730892  NIHMSID: NIHMS1853141  PMID: 36506413

Abstract

This work considers the problem of adaptive prior-informed model predictive control (MPC) formulations that explicitly incorporate prior knowledge in the model development and is robust to missing data in the output measurements. The proposed prediction model is based on a latent variables model to extract glycemic dynamics from highly-correlated data and incorporates prior knowledge of exponential stability to improve the prediction ability. Missing data structures are formulated to enable model predictions when output measurements are missing for short periods of time. Based on the latent variables model, the MPC strategy and adaptive rules are developed to automatically tune the aggressiveness of the MPC. The adaptive prior-knowledge-informed MPC is evaluated with computer simulations for the control of blood glucose concentrations in people with Type 1 diabetes (T1D) using simulated virtual patients. Due to the variability among people with T1D, the hyperparameters of the prior-knowledge-informed model are personalized to individual subjects. The percentage of time spent in the target range is 76.48% when there are no missing data and 76.52% when there are missing data episodes lasting up to 30 mins (6 samples). Incorporating the adaptive rules further improves the percentage of time in target range to 84.58% and 84.88% for cases with no missing data and missing data, respectively. The proposed adaptive prior-informed MPC formulation provides robust, effective, and safe regulation of glucose concentration in T1D despite disturbances and missing measurements.

Keywords: model predictive control, adaptive control, partial least squares, prior knowledge, artificial pancreas, type 1 diabetes

1. Introduction

Predictive modeling and control of biomedical and physiological systems is challenging due to the complex multivariable interactions, numerous unmeasured disturbances, and lack of frequent on-line measurements. The 5 control of blood glucose concentrations (BGC) in people with Type 1 diabetes (T1D) grapples with these challenges, where limited feedback information from glucose measurements is used to compute the optimal amount of insulin to administer for regulating the BGC of the subject. T1D is a chronic disease that affects the lives of 15 per 100,000 people globally, and causes several co-morbidities and significant financial burden [1]. To maintain BGC within the safe range (70-180 mg/dL), accurate computation of insulin doses is critical [2]. Despite the efforts in developing algorithms for insulin dosing and automated insulin delivery systems, under- and over-estimation of the insulin dosage (input actuation) can occur, causing hyperglycemia (BGC > 180 mg/dL) or hypoglycemia (BGC < 70 mg/dL). Hyperglycemia can cause long-term complications in the vascular system, kidneys, eyes, and nerves. Hypoglycemia causes acute immediate problems triggered by energy shortage in the brain that can lead to disorientation, fainting, diabetic coma, and death [3].

The artificial pancreas (AP) system automates insulin delivery using a sensor (continuous glucose monitoring [CGM] system), an actuator (insulin pump), and control algorithm [4]. Various control algorithms are investigated in simulation and clinical studies for use in AP systems, ranging from proportional-integral-derivative control [5, 6, 7], fuzzy-logic-based systems [8, 9], model predictive control (MPC) [10, 11, 12, 13, 14, 15, 16], iterative learning control [17], and reinforcement learning approaches [18, 19, 20]. Among the proposed control techniques, MPC has gained popularity in the commercially available hybrid closed-loop AP systems that require user inputs. Although AP system development is progressing rapidly, many algorithms are limited in their ability to regulate BGC because of: (i) variability among the population of people with T1D; (ii) time-varying changes in the glucose-insulin system dynamics; (iii) delayed action of insulin administered due to the slow absorption of subcutaneous infused insulin; (iv) unmeasured disturbances such as unannounced meals, physical activities, and psychological stress; (v) and discontinuities or communication interruptions in the glucose measurements [3]. Recent advances in diabetes technologies and MPC algorithms enabled explicitly incorporating dynamic constraints to consider the long-term effects of administered insulin. Adaptive models and control objectives facilitated the handling of variations among subjects and within individual subjects. Fully automated AP systems, adaptive models and control, and additional variables to capture the effects of unmeasured disturbances in multivariable AP systems remain open research topics.

The glucose prediction models proposed can be divided into three categories: physiological models, data-driven models, and hybrid models that combine physiological and data-driven models. Physiological models are developed based on the understanding of the transport and relations of glucose with different hormones like insulin and glucagon [21, 22, 11, 23]. Data-driven models identify the relations between the input and output variables to characterize the system dynamics using approaches ranging from prediction error methods and maximum likelihood estimation to complex nonlinear kernel-based approaches and neural networks. To address the complexity and non-linearity of glycemic dynamics, models based on machine learning and deep learning techniques, such as convolutional neural networks and long short-term memory neural networks, are personalized to individual subjects by either training the models on subject-specific data or using transfer learning approaches [24, 25, 26, 27]. The prediction power of machine learning and deep learning techniques is dependent on the quantity of training data, and the intra-subject variations are often neglected because updating the model parameters on-line is prohibitive for real-time applications.

In addition to capturing the variability among subjects and time-varying dynamics, adaptive modeling and control techniques can also characterize the effects of unmeasured disturbances. Modeling temporal variations and disturbances, such as physical activity and acute psychological stress, typically involves the use of simple linear models that can be readily updated on-line. Recursively updated autoregressive moving average (ARMA) models can characterize the current glycemic dynamics, including the effects of unmeasured disturbances, through recursive least squares to update the model parameters at every sampling time [28]. ARMA models with exogenous inputs (ARMAX) are also investigated and demonstrate strong prediction ability [4, 2, 29]. Recent studies compared the predictive performance of linear regression models and deep learning models, with good performance achieved using recursive linear models that are updated on-line with each new measurement sample [30, 31].

Linear models based on multivariate statistical techniques such as partial least squares (PLS) and canonical correlation analysis (CCA) are capable of identifying the relationships between input and output variables from high-dimensional redundant observations [32, 33, 34]. Historical observations of variables in a past moving window are commonly used as model inputs to characterize the system dynamics. The length of the past window determines model complexity and flexibility, which balances the trade-offs between the bias and variance of the identified model. A model with high flexibility can be developed with a short past window, though the information on the system dynamics may not be completely captured over the short time window. The bias of the model decreases as the past window length is increased, yet redundant information that can compromise the prediction accuracy of the model may be introduced if the past window length is too large [35, 32]. Achieving a balanced trade-off between the model flexibility and complexity by selecting the proper window length is critical. Prior knowledge of the system dynamics, such as the exponential stability, can improve the reliability and prediction ability of the identified model. However, prior knowledge is seldom taken into consideration during the modeling process [35, 36, 37].

Adapting the control algorithm in response to variations in the system dynamics, in addition to recursively updating glucose prediction models, can further improve the control performance [38]. Run-to-run control and iterative learning control strategies improve the control performance by adaptively tuning the insulin doses and the BGC target range after every ”batch” that lasts for specified time duration [17, 38]. Evaluating the glucose regulation performance attained by the AP system on the preceding day, the control algorithm can be modified to be relatively more aggressive or conservative to reach an optimal balance between efficiency and safety. Incorporating information from historical data on the regular routines and daily patterns of people with T1D, the controller can be enhanced with anticipated future disturbances in glucose concentration predictions [39].

The transient dynamics and glucose variability are considered in adaptive rules used to update the hyper-parameters of the control algorithm, such as penalty weights in the objective function of the MPC algorithm and time-varying constraints on the insulin infusion rate [14, 29, 40]. Achieving optimal control of BGC with fully automated AP systems requires adaptive rules that can be personalized to a subject’s unique glucose-insulin dynamics. Another challenge to develop fully automated AP systems is the reliability of CGM measurements, upon which the computation of the insulin dosage is dependent for feedback information of BGC. However, CGM data are susceptible to outliers, measurement bias, and missing values due to unstable wireless communications, which can deteriorate the effectiveness of the AP system and increase the risk of adverse outcomes.

Motivated by the above considerations and challenges in the development of fully automated AP systems, a novel personalized adaptive MPC (paMPC) strategy is proposed for BGC regulation to mitigate the unmeasured disturbances caused by unannounced meals and physical activities, and missing CGM data. A novel MPC formulation is proposed using a glucose concentration prediction model identified with multivariate statistical modeling techniques where the latent variables that significantly influence model quality are determined by a modified PLS method, named as regularized partial least squares (rPLS) model [37]. In Section 2, the rPLS model integrating prior knowledge on stability of the system is discussed, leading to a model with better quality and prediction ability. The stability is encoded as exponentially decreasing model weights and can be readily achieved by modifying the rate of reduction of weights, an effective mechanism particularly for multivariate input models, which provides a balance between the trade-offs of model complexity and flexibility. The rPLS model is further combined with missing data framework that is commonly used in batch process modeling to enable the prediction of future values for BGC when some data are missing. In Section 3, the recursively updated glucose prediction model is employed as the basis for a personalized MPC (pMPC) formulation to compute the optimal insulin dosing for maintaining BGC within the safe range. Adaptive rules are developed and incorporated to yield a personalized and adaptive version of the MPC (paMPC) that proactively responds to the system variations to provide tighter control of BGC. The parameters for developing the adaptive laws and hyper-parameters in the paMPC formulation are personalized to account for inter-subject differences using demographic information provided by each person. Simulation studies reported in Section 4 comparatively evaluate the effectiveness of the proposed pMPC and paMPC approaches, followed by a discussion in Section 5. Finally, concluding remarks are provided in Section 6.

2. Glucose concentration prediction model

In this section, the rPLS model incorporating prior knowledge to improve the properties of the model is detailed. Then, missing data framework is incorporated to improve the robustness of glucose concentration prediction model to missing CGM data.

2.1. Glucose concentration prediction based on latent variables model

The performance of MPC is highly dependent on the prediction ability of glucose prediction model as the optimal control decision is made by minimizing the difference between predicted system output by the model (future BGC) and its desired future trajectory. Several factors can influence future BGC variations significantly: meal consumption increases BGC and insulin infusion reduces BGC as insulin promotes the transport and utilization of glucose in the bloodstream by insulin-sensitive cells, tissues and organs. Physical activity contributes to glucose fluctuation as well, where the effects are complex and BGC can change rapidly for different types, intensities, and durations of exercise [29, 41]. Therefore, historical CGM data with information on the dynamics of the BGC, plasma insulin concentration quantifying the insulin present in the bloodstream, gut absorption rate approximating the glucose absorbed from meals, and energy expenditure representing physical activity are chosen as the inputs of the model to predict the future BGC. Specifically, plasma insulin concentration and gut absorption rate are estimated using an unscented Kalman filter with an augmented physiological model. The unscented Kalman filter is able to handle the non-linearity in the physiological model and can incorporate physical constraints in the model states [42]. The energy expenditure is estimated using machine learning techniques that analyze signals collected by a wearable wristband device [43]. The wristband signals include blood volume pulse (and heart rate inferred from it), 3D-accelerometer data, galvanic skin response, and skin temperature. The glucose-insulin metabolism is a dynamic process and BGC is not only associated with the current model input, but is also affected by preceding values of the inputs. Therefore, to effectively model the glycemic dynamics and predict the future BGC values over the prediction horizon, the inputs xi and the corresponding outputs yi (future BGC) can be expressed as

xiT=[g(iLg+1),,g(i)],uI(iLI+1),,uI(i),uM(iLM+1),,uM(i),[uE(iLE+1),,uE(i)]yiT=[g(iPH+1),,g(i)] (1)

where g, uI, uM, and uE represent the BGC based on CGM, plasma insulin concentration, gut absorption rate, and energy expenditure, respectively. The corresponding past window lengths for different variates are denoted by Lg, Li, Lm, and LE, respectively, and PH is the prediction horizon.

For a collection of inputs XT = [x1, … , xn] and outputs YT = [y1, … , yn], the key objective for developing a data-driven prediction model is to find a reasonable representation of the relationship between X and Y. Strong multicollinearity in the data can cause ill-conditioning and render the identification of linear regression models sensitive to measurement noise. To eliminate the effects of information redundancy and ill-conditioning, multivariate statistical modeling techniques with latent variables are preferred. The rPLS approach is adopted to extract the latent variables and incorporate prior knowledge on the glycemic dynamics [37], leading to

maxtJrPLS=uTtδ2wTKws.t.t=Xw,w=1u=Yq,q=1 (2)

where t and u are the latent variables of the input data X and output data Y (respectively), w and q are the weights or the projection direction of the raw data, δ is the hyper-parameter estimated by cross-validation to negotiate the trade-offs between the two terms in the objective function (2). The regularization term is based on a kernel matrix K that incorporates the prior information of the model and improves the numerical properties of the model. The minimum prior knowledge of the system considered for modeling the glycemic dynamics is that the model is exponentially stable, which means that the magnitude of the weights for same variates should decay exponentially. The kernel matrix K can be designed as first-order stable spline kernel [35, 36]:

K=[Kg0000KI0000KM0000KE] (3)

where Kg, KI, KM, and KE are the kernel matrices for variates (inputs) g, uI, uM, and uE, respectively, with the assumption that the variates are independent. Each sub-kernel matrix can be defined separately, where the ijth element of the sub-kernel matrix is computed as

K(i,j)=λ1λ2max(i,j),η=[λ1,λ2] (4)

where λ1 is a positive parameter that tunes the magnitude of K and λ2 ∈ (0, 1) accounts for the exponential reduction property of model weight w. When K has elements with large values, the corresponding weight computed by the rPLS method tends to be small. As the weights become small enough, the corresponding input variable becomes redundant and has no contribution to the model. For the modeling process, as the contribution of an input to a latent variable becomes close to zero, the problem of tuning model complexity is transferred directly to tuning the hyper-parameters of the kernel matrix K, which is relatively simpler to achieve.

The solution of objective (2) can be achieved with the Lagrange multipliers method, which leads to

XTYq=δKw+λwwYTXw=λqq (5)

where λw and λq are the Lagrange coefficients. A sufficient number of latent variables can be extracted by deflating X and Y with latent variable t and the corresponding weight:

p=XTttTtX=XtpTY=YtqT (6)

where p is the loading vector of X..

The rPLS method is summarized in Algorithm 1. After extracting a sufficient number of latent variables, the glucose concentration prediction model can be expressed as

T=XW(PTW)1Y=TQT (7)

where T = [t1, … , tl] = [τ1, … , τn]T is the matrix containing l latent variables t and τi is the latent variable (also named as score) of the ith input sample Xi. P = [p1, … , pl], W = [w1, … , wl], and Q = [q1, … , ql] are the weight matrices. For a new input x, the output of the model can be estimated as

τT=xTW(PTW)1yT=τTQT (8)

As shown in Eq. (1), to predict the future PH values of BGC yT = [g(i + 1), …, g(i + PH)], the input xT = [g (i + PH − Lg + 1) , … , g (i + PH), uI (i + PH − LI + 1) , … , uI (i + PH) , uM (i + PH − LM + 1) , … , uM (i + PH) , uE (i + PH − LE + 1) , … , uE (i + PH)] are required. However, the variables [g (i + 1) , … , g (i + PH), uI (i + 1) , … , uI (i + PH), uM (i + 1) , … , uM (i + PH) ,uE (i + 1) , … , uE (i + PH)] are not available at sampling time i.

Define the unavailable variables in x as x# and observed variables as x*. It is still possible to estimate y if the score τ can be calculated by using x* only. For that purpose, it is critical to establish the relationship between τ and x* where the training input matrix X is first partitioned into two parts X = [X*, X#] where X* contains the same variables as x* and X# consists of all variables in x# [44, 45]. Then, the regression coefficient θ is computed by minimizing the residual between T and X*θ, which can be achieved by regularized least squares estimation as multicollinearity may exist in X* that can cause ill-conditioning, as

θ^=argminθJrLS=TXθ+δ1θTθ (9)

where δ1 is the regularization parameter that reduces the influence of ill-conditioning by introducing some estimation bias. With known regression coefficient θ, the score vector τ and corresponding BGC values y can be predicted as

τT=xTθyT=τTQT (10)

All variables are normalized to zero mean and unit variance at the beginning of the modeling process. It is possible to scale the regression coefficients rather than scaling the input x for predicting future BGC values after the model is obtained. Assuming that the regression coefficient T is scaled to estimate the future glucose values y from raw input x* and the scaled regression coefficient is defined as Θ. The PH future glucose values can be predicted

y^=Θx=[ΘgΘIΘMΘE]x+C0 (11)

where Θg, ΘI, ΘM, and ΘE are the regression coefficient for BGC values (g), plasma insulin concentration (uI), gut absorption rate (uM), and energy expenditure (uE), respectively. C0 = ymΘxm · ys ÷ xs is a constant vector where · and ÷ represents dot product and dot division, xm, xs, ym, ys are the means and standard deviations of X and Y, respectively.

Algorithm 1 Regularized partial least squares method
1.NormalizeXandYto zeros-mean and unit variance.Determine kernelhyper-parameterηand generate kernel matrixK.And seti=1.2.SetXi=XandYi=Y.3.Initializeuias the first column ofYi,and iterate the following processuntil convergence.wi=(δK+I)1XiTui;ti=Xiwi;wi=wiwi;qi=YiTtitiTti;qi=qiqi;ui=Yiqi.4.DeflateXandYaspi=XTtitiTti;X=XtipiT;Y=YtiqiT.5.Seti=i+1,and return to Step 2 until enough latent variables areextracted.

To facilitate the MPC design where the predictive model is formulated as a state space model, the glucose concentration prediction model is rearranged as

Xg,i+PH=AXg,i+BIuI,i+BMuM,i+BEuE,i+Dyi=CXg,i (12)

where Xg,iT=[g(iLg+1),,g(i), uM (i – LM + 1) , … , uM (i) , uE (i – LE + 1) , … , uE (i)] is the state and yiT=[g(iPH+1),,g(i)] represents the model output consisting of PH BGC predictions, uI,iT=[uI(i+1),,uI(i+PH)], uM,iT=[uM(i+1),,uM(i+PH)], and uE,iT=[uE(i+1),,uE(i+PH)] are collections of future PH plasma insulin concentration, gut absorption rate, and energy expenditure values, respectively. The model coefficients are

A=[[0,I]000ΘgΘI1ΘM1ΘE10[0,I]00000000[0,I]00000000[0,I]0000],BI=[0ΘI20I0],BM=[0ΘM20I0],BE=[0ΘE20I],D=[0C00],CT=[0I0] (13)

where I and 0 are the identity and zero matrix with appropriate dimensions. At each sampling time, the training data X and Y can be updated and the future BGC values are predicted after updating the model parameters with rPLS using updated training data.

2.2. Glucose concentration prediction with missing CGM values

The CGM data, a critical signal for glucose prediction, is susceptible to missing values because of communication issues and sensor faults. The AP system cannot operate in automatic mode for extended periods of time without accurate estimations of future BGC values provided by glucose prediction model. In the case of sensor disruptions or missing CGm data, the current generation of AP systems revert to manual mode and manual user actions are expected until CGM data becomes available again. To predict future glucose values accurately and achieve an AP system robust to short-term missing CGM data, a glucose prediction model that can accommodate missing CGM data is developed. For the proposed glucose prediction model, plasma insulin concentration and gut absorption rate are estimated using the latest CGM data at every sampling time. Therefore, it is necessary to estimate the missing CGM data. However, simple extrapolation of CGM data or use of the last data before signal loss can be inaccurate when CGM data are missing or extrapolated, causing large estimation errors for the plasma insulin concentration and gut absorption rate, which are not reliable for modeling glycemic dynamics and predicting future BGC values. The variables associated with the sampling times of missing CGM data are treated as unavailable variables and grouped together with the future glucose values as x#. Similarly, the training input X and the regression coefficient matrix Θ are updated, where the regression coefficient for unavailable variables are assigned zero values.

The modifications to the development of the glucose prediction model when there may be missing CGM data are described below:

  1. If CGM data is missing:
    1. Substitute the missing CGM data by its estimation in previous step(s);
    2. Estimate the plasma insulin concentration and gut absorption rate values by using unscented Kalman filters;
    3. Do not update the parameters of the glucose prediction model;
  2. If CGM data becomes available after a short period of missing CGM data:
    1. Substitute the missing values by interpolated values;
    2. Re-estimate the plasma insulin concentration and gut absorption rate using interpolated glucose values;
    3. Update the parameters of the glucose prediction model;
  3. If CGM data is available and all missed CGM data are interpolated:
    1. Estimate plasma insulin concentration and gut absorption rate by using unscented Kalman filters;
    2. Update the parameters of the glucose prediction model;
  4. Predict the future glucose values by using Eq. (12);

  5. Proceed to processing the CGM information at the next sampling time;

The effect of missing data on BGC prediction accuracy can be reduced by adopting the missing data accommodation approach proposed. The AP system can become robust to short-term missing CGM data (1-6 consecutive missing values studied in this work) and operate without interruption to the automatic control.

3. Personalized Adaptive MPC strategy

In this section, the MPC strategy based on glucose prediction model that is robust to short-term missing CGM data is formulated. Then, the hyperparameters in the MPC are personalized to accommodate the inter-subject differences for enhancing BGC regulation. Adaptive control rules are further formulated according to the variations in CGM values to further improve the regulation of postprandial BGC.

3.1. MPC formulation

The optimal control decision is obtained by solving an MPC formulation problem where the output variables are driven as close as possible to their desired values by computing the manipulated variable values under constraints. The aim in glycemic control is to manipulate the insulin infusion rate so that the difference between predicted and target BGC values is minimized. Therefore, the objective function is expressed as

u^=argminuJMPC=j=1npQy[y^(i+j)ytrj(j)]2+j=1ncQI[u^I(i+j)uItrj(i+j)]2+j=1ncQu[u(i+j)]2s.t.Xg,i+PH=AXg,i+BIuI,i+BMuM,i+BEuE,i+Dy^i=CXg,iXP,i+1=APXP,i+BPu(i)u^I(i)=CPXP,iuImin(i+j)u^I(i+j)uImax(i+j)uminuumax (14)

where the prediction horizon np and the control horizon nc are equal to PH = 12 for short-term glycemic control. The three different terms in the objective function (14) are balanced by different weights, where Qy = 500, QI = 104, and Qu = 10−6 when the unit for the insulin infusion rate is mU/min, or Qu = 1 if the unit is U/min. so that appropriate amounts of insulin can be delivered as needed. umin = 0 mU/min and umax = 1200 mU/min are the lower and upper bounds of the insulin infusion rate, respectively, such that a maximum dose of 6 U insulin can be delivered at every sampling time, which is deemed appropriate to regulate the postprandial BGC for subjects whose insulin-to-carbohydrate ratio is in the normal range [46]. The constrains for plasma insulin concentration, uImin and uImax, and the desired value of plasma insulin concentration uItrj are specified as personalized quantities according to the demographic information of the subject, and ytrj is the trajectory of desired (target) glucose concentration values defined as a first-order equation (Fig. 1).

ytrj(i)=yc+[g(k)yc]eiTsTc,i=1,,ny (15)

where yc is the control target of BGC set at 110 mg/dL [47], which is modified to 150 mg/dL during exercise for reducing the risk of exercise-induced hypoglycemia and decreases to 110 mg/dL exponentially after the end of physical activity, that is

yc={150,if is exercising110+40ρnif exercise ended within two hours110otherwise} (16)

where ρ = 0.8 is the decay rate that is determined by preliminary studies and n is the number of samples following the end of exercise. Exercise is detected based on energy expenditure, which quantifies the intensity of physical activity and can be estimated based on heart rate, accelerometer, and galvanic skin response information in practice [48]. In Eq. (15), Ts = 5 min is the sampling time and Tc is the time constant that determines how fast the glucose concentration value is expected to return to the target value (setpoint). Tc = 180 min during exercise and 120 min otherwise. As estimated BGC values are getting close to the control target, a slower variation in glucose concentration values is preferred to achieve stable control of BGC and reduce the risk of hypoglycemia. During exercise, glucose utilized by muscle cells increases rapidly, which can lead to exercise-induced hypoglycemia, thus it is reasonable to have a higher control target and slower variation rate of the desired glycemic trajectory.

Figure 1:

Figure 1:

Illustration of desired glucose concentration trajectories (Tc= 120 min).

Eq. (17) in the objective function (14) is the discrete form of insulin absorption model proposed in [11] that is utilized to map the subcutaneous infused insulin to plasma insulin concentration as

XP,i+1=APXP,i+BPu(j)uI(i)=CPXP,i (17)

where XP,i = [S1 (i), S2 (i), uI (i)] T is the model state that contains two insulin transport compartments S1 and S2 and plasma insulin concentration (uI). The model parameters are defined as

AP=[1TsTmax00TsTmax1TsTmax00TsTmaxVI1Tske],BP=[Ts,0,0]T,CP=[0,0,1] (18)

where Ts is the sampling time which is 5 min in this study, Tmax and ke are the time-to-maximum absorption parameter and insulin elimination rate, respectively, and can be estimated on-line together with plasma insulin concentration and gut absorption rate using the extended state and parameter estimation via unscented Kalman filter at every sampling time [14]. The distribution volume of plasma insulin VI can be estimated directly from the subject’s body weight.

At every sampling time, a sequence of nc optimal insulin infusion rates are computed by solving the objective (14) and appropriate dose of insulin is delivered to the patient by insulin pump according to the first insulin infusion rate. The real-time optimization and insulin delivery process is repeated every 5 minutes. The future glucose predictions from the model are also used in hypoglycemia prediction and alarm system. A hypoglycemia warning alarm is triggered if a hypoglycemic event is predicted to happen within the next 20 minutes and consumption of 10 g fast-acting rescue carbs are recommended to the subject. In addition, the insulin flow is reduced or suspended to reduce the risk of hypoglycemia. If the hypoglycemia event is still being predicted after 10 minutes, another 10 g rescue carbs are recommended to the subject.

3.2. Controller personalization

The characteristics of glycemic dynamics, such as insulin sensitivity, vary significantly from one subject to another. Therefore, it is necessary to personalize the parameters of the controller to achieve effective glycemic regulation, in addition to using personalized glucose prediction models. In this work, the constraints and desired value of plasma insulin concentration are personalized, as plasma insulin concentration quantifies the amount of insulin in the plasma that affects the production, transport, and utilization of plasma glucose directly. In addition, the maximum amount of insulin bolus given in the last two hours is also personalized to enhance the safety of AP systems. The plasma insulin concentration is dynamically bounded based on BGC values, as more insulin is required to reduce BGC back to normal if BGC values are high. Otherwise, lower plasma insulin concentration is desired to avoid hypoglycemia. The boundaries and desired value for plasma insulin concentration are designed as (Fig. 2) [14]:

uInormmin(i)fmin(y^(i))uInormmax(i)fmax(y^(i))uInormtrj(i)ftrj(y^(i) (19)

where uInormmin, uInormmax, and uInormtrj are the normalized bounds and desired value of plasma insulin concentration, respectively, and uInormuIuIbasal where uIbasalubVIke is the steady state plasma insulin concentration, with subject specified basal insulin infusion rate ub.

Figure 2:

Figure 2:

Illustration of plasma insulin concentration bounds and desired value.

Even though the bounds and desired value of plasma insulin concentration are personalized by subject-specific basal insulin infusion rate, it is necessary to further tune the bounds and desired value by multiplying it with a scalar α to improve the control performance as insulin sensitivity varies significantly among people with T1D. The hyper-parameter α is personalized by using the demographic information of a person, including body weight, height, waist size, body mass index (BMI), insulin-to-carbohydrate ratio, and a correction factor. The relationship between α and the demographic information (Table. 1) are estimated by the kernel partial least squares method. In addition, the total bolus amount given within the last two hours is considered to improve the safety of the AP system as overdosing of insulin can cause hypoglycemia. The upper bound of the total bolus within the last two hours is personalized to be half of the total daily bolus insulin reported by the individual.

Table 1:

Demographic information and α (Mean±Standard Deviation).

Variable Value
body weight (kg) 80.3±11.8
height (cm) 173.0±3.9
waist size (cm) 92.5±11.7
body mass index (kg/m2) 26.8±3.3
insulin-to-carbohydrate ratio (g/U) 12.0±2.2
correction factor (mg/dL/U) 44.6±11.1
α 1.6±0.3

3.3. Adaptive rules

In the proposed AP system, manual meal announcement is not required. However, considerable increase in postprandial BGC can be observed when there is a significant delay between eating a meal and detecting the rise of BGC values. For the fully-automated AP, the regulation of postprandial glucose levels, especially the peak glucose values following meals, can be improved if the controller can be more aggressive and deliver more insulin to mitigate the effects of meals on glycemic excursions in the early stage of carbohydrate absorption. To achieve this, α is further tuned according to variation in CGM values:

α=αc+αaαa={αd,ifg.>00.2g.,ifg.0} (20)

where g is the first-order derivative of CGM values, and αc is the subject-specific hyper-parameter estimated by the kernel PLS method according to the demographic information of the subject. αd tunes the controller to be more aggressive or conservative based on the effect of meal detected by CGM values:

αd={0,ifg.<0ηg.,ifg.>0.1mgdLminandg¨>0.05mgdLmin20.9αd,otherwise} (21)

where g¨ is the second-order derivative of the CGM values and η is a subject specific parameter estimated from the demographic information of the subject. When a meal is detected from variations in CGM data, α can have a larger value and the controller trends to give larger insulin boluses to mitigate the rapid increase in BGC resulting from the absorption of meal. Then, α will decrease to the subject-specific αc smoothly so that the actual value and estimation of future plasma insulin concentration will always be within the defined bounds without causing infeasible solutions. When BGC is decreasing, less bolus insulin is suggested to reduce the risk of exercise-induced hypoglycemia as the insulin in the body cannot be removed while glucose utilization increases rapidly during physical activity.

The flow chart of the proposed AP system based on paMPC is shown in Fig. 3. At each sampling time, the personalized glucose concentration prediction model is adaptively updated according to the feedback information of BGC provided by CGM. The optimal insulin infusion rate is computed by solving the optimization problem (14) after adaptively adjusting the glycemic reference trajectory and constrains. And the optimal insulin infusion rate u (mU/min) is administered through basal and bolus insulin as

ubasal={u,ifuubub,otherwise}ubolus={0,ifuubTs(uub),otherwise} (22)

where ubasal (mU/min) is the basal insulin infusion rate, ubolus (mU) represents the bolus insulin dose, and ub (mU/min) is the basal insulin infusion rate provided by the subject.

Figure 3:

Figure 3:

Flow chart of the proposed artificial pancreas system.

4. Results

In this section, the prediction performance of the proposed glucose prediction model against missing CGM data is assessed. Then, the effectiveness and safety of the proposed MPC strategy, and its robustness to short-term missing CGM data are evaluated by in-silico studies challenged by unannounced meal, unannounced physical activity, and missing CGM data.

4.1. Performance of the glucose concentration prediction model

The robustness of the proposed glucose prediction model is evaluated by predicting the future glucose concentrations up to one hour (PH = 12) for 20 virtual subjects in the multivariable glucose-insulin-physiological variables simulator (mGIPsim) developed at Illinois Institute of Technology [49]. The performance of the glucose concentration model based on rPLS method where there is no missing CGM data (referred to as model 0) and the glucose prediction model where the missing CGM data are substituted by the preceding available CGM data (referred to as model 1) are compared with the outcomes of the proposed model. The length of past window for data augmentation is Lg = LI = LM = LE = 36 and the number of latent variables is 5 for all the three glucose concentration prediction models. The kernel hyper-parameters are determined via cross-validation and found to be λ1,g = Λ1,I = λ1,M = λ1,E = 145 and λ2,g = 0.1, λ2,M = λ2,M = λ2,E = 0.99. The missing CGM data is assumed to happen randomly and the missing data interval ranges from one to six samples to study the influence of short-term missing CGM data. Meanwhile, the prediction accuracy of the proposed model when the physiological parameters are not estimated correctly.

The prediction accuracy of the model is quantified by root mean squared error (RMSE) and the testing RMSE for the three glucose prediction models is summarized in Table 2. Compared to model 0, the RMSE of the proposed glucose prediction model for one-step-ahead prediction increased from 1.59 mg/dL to 1.92 mg/dL, while the RMSE increased to be 4.43 mg/dL when the missing CGM data is directly substituted by preceding available CGM data. Similarly, for thirty-minutes-ahead prediction (PH = 6), the RMSE for the proposed model increased slightly, from 9.85 mg/dL to 9.93 mg/dL, however, the RMSE for model 1 is 17.21 mg/dL which is considerably larger than the RMSE for model 0 and the proposed model. For one-hour-ahead prediction (PH = 12), the RMSE for the proposed model is 28.72 mg/dL in contrast to 31.85 mg/dL for model 0 and 40.57 mg/dL for model 1. When physiological parameter mismatch happens, the RMSE of the proposed glucose prediction increases slightly, however the RMSEs are not considerably different (0.52 < p < 96) as reported(Table B.1).

Table 2:

RMSE (mg/dL) for different glucose prediction models(Mean±STD, STD: standard deviation).

Model model 0 model 1 proposed model
PH=1 1.59±0.48 4.43±1.63 1.92±0.48
PH=6 9.85±4.96 17.21±5.22 9.93±2.02
PH=12 31.85±12.65 40.57±10.44 28.72±4.28

4.2. Performance of the proposed paMPC

The effectiveness and safety of the proposed MPC strategy, and its robustness to short-term missing CGM data are evaluated by a cohort of 20 virtual subjects in the multivariable glucose-insulin-physiological variables simulator where the effects of physical activity on glycemic dynamics are modeled and variables such as heart rate and energy expenditure are generated as outputs for use by multivariable AP systems [49]. Two simulation studies are conducted where the AP system is challenged by unannounced meals and physical activities. In the first study, there are no missing data. In the second study, the robustness of the proposed AP system to missing CGM data is studied. For both studies, the glycemic dynamics are under fully-automated control for 6 days where meal and physical activity scenarios are generated by using mean and standard deviation values defined in Table 3. The times, characteristics (amount/power/speed) and duration of the meals and physical activity vary randomly within a constrained distribution every day. The closed-loop study starts after one day of initialization in open-loop mode and the data collected (288 samples) are used to build the glucose prediction model. A total of 5 latent variables are extracted from the training data set where Lg = LI = LM = LE = 36 and PH = 12. The hyper-parameters of kernel matrix K are determined via cross-validation, and found to be λ1,g = λ1,I = λ1,M = λ1,E = 145 and λ2,g = 0.1, λ2,I = λ2,M = λ2,E = 0.99, which indicates that the weights for plasma insulin concentration, gut absorption rate, and energy expenditure are expected to decay faster compared the weight for CGM. Moreover, the effects of plasma insulin concentration, gut absorption rate, and energy expenditure on the future BGC predictions decreases as the prediction horizon increases. These relations are explicitly encoded in the model through the kernel matrix. And for the first case, the performance of the adaptive MPC (referred to as aMPC) in [14] is investigated as well.

Table 3:

Simulation Scenario Basis (Mean Standard Deviation).

Events Start Time Duration Characteristic
Meal Breakfast 8:00±15 20±5 60±20
Lunch 12:30±15 30±5 75±20
Dinner 19:00±15 30±5 60±10
Exercise Bike 16:30±5 30±5 60±10
Treadmill 10:30±5 30±5 5±10

Characteristic: Carbohydrate (g) for meal, Power (W) for bike, and Speed (mph) for treadmill. Daily values are generated based on the mean and STD values of the characteristics for various events.

The performance of the AP system is quantified by comparing the percentage of time spent in different BGC ranges: the BGC range 70 −180 mg/dL is defined as the target range, hypoglycemia and hyperglycemia are declared when BGC is lower and higher than the target range limits, respectively. Statistical information on BGC, including the minimum and maximum value of BGC during the 6-days closed-loop study, is reported along with the average BGC over the closed-loop period. The controller’s effect on glycemic dynamics is further analyzed by control-variability grid analysis [50] where the controller performance is divided into five distinct regions according to the distribution of CGM data: ideal BGC regulation is achieved when the closed-loop control results are in zone A, where the high BGC is in the range 110 – 180 mg/dL and the low BGC is in the range 110 – 90 mg/dL. Zone B is split in three regions: Upper B region with the high BGC in the range 180 – 300 mg/dL (hyperglycemia if BGC is over 180 mg/dL) and low BGC 110 – 90 mg/dL, Central B region with high BGC 180 – 300 mg/dL and low BGC 90 – 70 mg/dL (at the limit of hypoglycemia), and Lower B region with high BGC 110 – 180 mg/dL and low BGC 90 – 70 mg/dL. Performance yielding results in Zones A and B is targeted by all AP technologies, to evade hypoglycemia and keep hyperglycemia below 300 mg/dL after meals. To date the AP performance for various designs has been in Zone B. Zone C, zone D, and zone E are gradually worse performances and not desired. The total amount of insulin used, the number of rescue carbohydrates and hypoglycemic events over the period of closed-loop simulation study for all virtual subjects are also reported (Table 4).

Table 4:

Controller performance across 20 virtual subjects for closed-loop glycemic control with aMPC, pMPC, and paMPC strategies (Mean ± STD (standard deviation)) (* The minimum CGM value for the 5 hypoglycemia episodes during the whole simulation period with paMPC is 67 mg/dL ).

Missing CGM data: No Yes
MPC strategy used: aMPC pMPC paMPC pMPC paMPC
Time in Range (%) [40, 55) 0±0 0±0 0±0 0±0 0±0
[55, 70) 0±0 0±0 0±0 0±0 0.01±0.06
[70, 180] 71.18±5.15 76.48±7.50 84.58±7.65 76.52±7.58 84.88±7.36
(180, 250] 24.92±3.81 21.83±5.89 14.84±6.82 21.66±5.82 14.63±6.69
(250, 400] 3.90±3.92 1.69±2.08 0.58±0.91 1.81±2.19 0.47±0.81
CGM values (mg/dL) Minimum 83.9±5.51 74.9±1.48 74±2.58 74.81±1.48 73.42±2.67
Maximum 297.2±26.25 277.8±25.62 255.05±31.01 276.5±24.26 250.7±25.48
Mean 157.2±11.35 138.46±10.75 131.71±10.56 138.42±10.93 131.36±9.91
Total Amount of Insulin Infused (IU/day) 39.5±10.4 42.7±11.7 43.4±11.8 42.8±11.7 43.5±11.9
Total Rescue Carbohydrate Consumed (g) 505 10 60 20 90
Total Number of Hypoglycemia Events 0 0 0 0 5*

4.2.1. Simulation study without missing CGM values

In this scenario, the proposed controller is challenged by unannounced meals with carbohydrate ranges from 47 g to 93 g, and unannounced aerobic physical activities, treadmill run and stationary bike for 30 ± 5 min. The times and durations of meals and exercise varied randomly from day to day (Table 3). The performance of the aMPC, the proposed pMPC and the paMPC strategies are summarized in Table 4. Compared to aMPC, the percentage of time in target range is considerably larger for the pMPC and paMPC strategies. To maintain BGC within the target range, the aMPC suggested more rescue carbohydrate which drives the statistical values of BGC for aMPC are significantly larger compared to pMPC and paMPC. There are no hypoglycemic events during the entire closed-loop study for either MPC strategies as the CGM values are always higher than 70 mg/dL. However, the control performance improves significantly when the adaptive control rules in response to variations in CGM values and exercise are incorporated into pMPC strategy. Specifically, the average percentage of time in target range is 84.58% for the proposed paMPC, compared to 76.48% for pMPC, an improvement by 8.1%. And the percentage of time in hyperglycemia decreased from 23.52% to 15.42% with only 0.58% of CGM values over 250 mg/dL for the proposed paMPC. For the proposed paMPC, the average value of maximum and mean values of CGM values across 20 virtual subjects are 255.05 mg/dL and 131.71 mg/dL, respectively. In contrast, the average value of maximum and mean CGM values are 277.8 mg/dL and 138.46 mg/dL, respectively, 22.75 mg/dL and 6.75 mg/dL higher for pMPC compared to the paMPC. For both MPC strategies, all subjects are in zone B of the control-variability grid analysis, which is a clinically acceptable region for BGC regularization. The average of minimum CGM values are similar for both MPC strategies, and more rescue carbs are given to the 20 subjects while reducing the time in hyperglycemia over the 6-day study for the proposed paMPC.

The glycemic trajectories, bolus insulin doses, and basal insulin infusion rates for the MPC strategies across all 20 in-silico subjects are compared in Fig. 4 where the mean values and ranges of mean±standard deviation are shown. The glycemic trajectory during the night (from 12 AM to 8 AM) for both MPC strategies are similar and tightly controlled within the desired range. For the proposed paMPC strategy, the glycemic trajectory during daytime is lower compared to that for pMPC, especially in the postprandial periods. The bolus insulin doses and basal insulin infusion rates are significantly different during the day time for the two MPC strategies. Larger bolus doses are observed at the initial period of increase of CGM data resulting from carbohydrate absorption for the proposed paMPC. In comparison, bolus dosages are considerably smaller for pMPC over the entire postprandial period. The basal insulin infusion rate with pMPC is larger than the rate with paMPC strategy all the time.

Figure 4:

Figure 4:

Glucose concentration trajectory, bolus insulin doses, and basal insulin rates for 20 virtual subjects under closed-loop control with pMPC and paMPC strategies without missing CGM values.

4.2.2. Simulation study with missing CGM values

The robustness and performance of pMPC and paMPC algorithms are further assessed by randomly introducing missing CGM data to the AP system. Specifically, the interval of missing CGM data lasts for 5 to 30 min (1 to 6 consecutive samples). This is the most frequent range of missing data caused by communication errors. A faulty CGM sensor would leave the controller without information for a long time, up to two or more hours. Such faults seldom occur with the current generation of CGMs. Since that length of missing data would leave the controller too long without information, switching to manual control will be more appropriate for such long periods of missing data, and will not be considered in assessing the performance of the automatic control systems. The same meal and physical activity scenario used in simulation study without any missing CGM values is utilized for ease of comparison.

The average percentage of time in different BGC ranges, statistical information of CGM values, total amounts of insulin infused and rescue carbs consumed, and the number of hypoglycemia events during the 6-days simulation are summarized in Table 4. For the proposed paMPC strategy, the average time in target range (70-180 mg/dL) improves 8.36%, from 76.52% to 84.88%, compared to the pMPC strategy. A considerable decrease of time in hyperglycemia range (8.37%) is obtained by incorporating the adaptive rules into pMPC approach. Besides, the averaged maximum value of BGC drops from 276.5 mg/dL to 250.7 mg/dL which is at the threshold of level 2 hyperglycemia (250 mg/dL) and the mean of average BGC decreases from 138.42 to 131.36 mg/dL (by 7.06 mg/dL). Minimum BGC values for pMPC strategy is 70 mg/dL. Mild hypoglycemia rarely occurs and lasts for 5 samples, all 20 subjects are in the clinical sub-optimal region and the minimum CGM value is 67 mg/dL for the proposed paMPC during the whole simulation period. When the physiological variables are estimated incorrectly, the percentage of time in target range for the proposed paMPC is close to the situation where the variables are accurate (between 84.47% and 85.36%) and the statistics of CGM data are similar as well when variables mismatch is introduced.

To evaluate the performance of the pMPC and the paMPC strategies when some CGM values are missing, the mean of CGM trajectories for 20 subjects, bolus insulin doses, and basal insulin rates are compared in Fig. 5 along with the regions formed by mean±standard deviation. The percentage of time in target range of CGM trajectories for both MPC strategies is high (76.52% and 84.88%) and paMPC has better performance and returns the postprandial glucose trajectory to the desired range faster. During the period from midnight to 8 AM, euglycemic regulation is achieved by both MPC strategies even though some of CGM data were missing during the night. The patterns of bolus insulin and basal insulin infusion rate are different for the two MPC strategies, where larger bolus doses can be observed for the paMPC approach and more frequent smaller bolus doses are delivered for the pMPC strategy. The basal insulin infusion rate for pMPC method is usually higher than the basal insulin infusion rate for the paMPC approach.

Figure 5:

Figure 5:

CGM values, bolus, and basal insulin infusion rate for 20 virtual subjects with closed-loop control using pMPC and paMPC strategies with missing CGM values.

To investigate the influence of missing data on the AP system performance, the CGM, basal and bolus insulin trajectories, and hyper-parameter α of the paMPC strategy for subject 19 in the two case studies are compared in Fig. 6. The missing data interval ranges from 5 min to 30 min and the missing CGM values are replaced by estimated values. Overall, the differences between two glycemic trajectories, bolus insulin doses, basal insulin infusion rates, and α are negligible when there are no major disturbances. Specifically, when CGM values are missing during the night, before meals, and after postprandial periods where fluctuation in CGM values is not severe, the effects caused by missing CGM data are too small to be noticed. Even though the effects of missing CGM values during the period of carbohydrate absorption after meals where glycemic fluctuation is severe on α that adaptively tunes the aggressiveness and conservativeness of the proposed paMPC are comparably large, the differences in the controlled CGM trajectories in Fig. 6 are noticeable but relatively small.

Figure 6:

Figure 6:

Comparison of CGM trajectories, bolus insulin doses, basal insulin infusion rates, and α of subject 19 for closed-loop control with and without missing CGM values.

5. Discussion of Results

For the AP systems, CGM data is critical for closed-loop BGC regularization. However, missing CGM data happens frequently even though the CGM system is developing rapidly. Without an appropriate strategy for dealing with the missing CGM data, the prediction error increases significantly compared to the case where there is no missing CGM data (p < 10−5 for all PHs). By paying attention to the missing CGM data, the influence of missing CGM data on prediction accuracy of the glucose prediction model can be reduced significantly, specifically, the RMSEs for model 0 and the proposed model are rarely different for 6-steps-ahead prediction and 12-steps-ahead prediction (p = 0.94 and p = 0.21, respectively). Even though for one-step-ahead prediction, the RMSE for the proposed model is considerably larger compared to model 0, the confidence level is much smaller in contrast to the difference between RMSEs for model 1 and model 0 as the p value is 0.005 compared to 10−6. The results demonstrate that the proposed model is able to overcome the influence of short-term missing CGM data on glucose prediction. And even for the situations of mismatched physiological variables, the proposed glucose model achieves similar prediction accuracy with the model by using accurate physiological variables, which reveals the robustness of the proposed model.

The development of fully automated AP system is challenged by unannounced meal and physical activity due to the significant delay from carbohydrate absorption to BGC variation and CGM measurements, slow absorption of subcutaneous infused insulin, and missing CGM data.

With simulation scenarios involving diverse meals and medium-intensity physical activities, no hypoglycemic events occurred for both case studies (with and without missing CGM values) except that mild hypoglycemia seldom occurred (0.01% time in hypoglycemia range) with a minimum CGM value of 67 mg/dL. The percent of time in target range (euglycemia) and statistics for CGM values indicate that effective control of BGC regulation can be achieved by using the proposed pMPC strategy without requiring manual entry for meal and physical activity information. Performance metrics including percent of time in target range, minimum, maximum, and mean value of CGM values are not statistically different after missing CGM values are introduced into the system for testing the robustness of AP system with p values as 0.669, 0.626, 0.094, and 0.8221, respectively, for paired t-tests. For both studies with the pMPC strategy, predictive hypoglycemia alarms are triggered and rescue carbohydrates are given to the subject during the recovery stage of physical activity, when supplement of carbohydrates are usually performed in real life, indicating that the suggested rescue carbohydrates are reasonable and may be replaced by glucose supplements that a person with T1D routinely takes during or after exercise.

In both studies, the AP control system performance improves significantly with respect to all statistical metrics when adaptive rules are integrated into the pMPC strategy. As a consequence of adaptive control laws, the percentage of time in target range for euglycemia improves significantly for both cases where the p values are smaller than 10−7, and the peak and average values of CGM are reduced considerably (p < 10−4) even though more rescue carbohydrates were given to the subjects after physical activities. With significant improvement in regulation of postprandial CGM variations, the decreases in minimum CGM values are not significant (p = 0.023 and p = 0.029). In addition, for the proposed paMPC strategy, no significant differences of selected performance indexes (euglycemia percent of time in target range, mean, minimum, and maximum value of CGM values) are observed before and after the introduction of missing CGM values into the AP system (p = 0.288, p = 0.412, p = 0.256, and p = 0.145, respectively). Besides, when the critical physiological variables are incorrectly estimated, the influence of parameters mismatch on the performance of the proposed paMPC is insignificant (p > 0.2). When the insulin-to-carbohydrate ratio or basal insulin infusion rate is overestimated, mild hypoglycemia (CGM is always larger than 63 mg/dL) happened during the closed-loop study that is partially because of the fact that the estimated α increases slightly. This is reasonable because the cells are less sensitive to insulin for the patients whose insulin-to-carbohydrate ration and basal insulin infusion rate are larger, requiring the controller to be more aggressive to deliver more insulin to regulate BGC effectively. The results illustrate the advantages of the proposed paMPC strategy for BGC regulation with unannounced meal and physical activity, as well as missing CGM data, which is a critical feedback signal for fully automated AP systems.

Effective regulation of postprandial BGC is one of the major challenges for fully automated AP systems because of the delay between BGC variations and CGM readings, and slow absorption of subcutaneous infused insulin. The influence of adaptive rules aim to provide tighter regulation of postprandial BGC (Fig. 4 and Fig. 5). To mitigate the rapid increase of BGC resulting from carbohydrate absorption, the AP system is usually expected to be more aggressive to deliver enough bolus insulin in time such that postprandial BGC can be tightly controlled. As shown in Fig. 4 and Fig. 5, significant large bolus insulin doses can be observed after incorporating adaptive laws because g. and g¨ become higher than the personalized threshold leading to more aggressive control with larger α. As a consequence, peak glucose values after meal consumption are reduced significantly and postprandial BGC values return back to the safe range in a shorter time. The overall time spent in hyperglycemia range is much smaller compared to the cases where adaptive rules are not utilized (p < 10−7). A more detailed illustration of hyper-parameter α that regulate aggressiveness of paMPC strategy tuned by the adaptive control laws in response to variation of CGM values and physical activity is shown in Fig. 6. In response to carbohydrate absorption, both g. and g¨ will increase over the individualized threshold, indicating the occurrence of glucose absorption from the gut, and α increases to higher values to make the controller more aggressive and deliver more bolus insulin to mitigate the effects of meals. Then, hyper-parameter α decreases to constant values smoothly to avoid potential infeasible solutions for MPC problem. Glucose utilization increases rapidly during exercise, causing α to become smaller than its constant value and make the controller more conservative to reduce the risk of exercise-induced hypoglycemia. In summary, the results of simulation studies illustrate the efficiency of the proposed paMPC in regulating postprandial BGC by adopting adaptive rules rather than requiring manual meal announcements. However, the adaptive rules are highly dependent on CGM values and the control system performance may deteriorate if CGM data contains high levels of noise, which has been eliminated in current generations of CGMs.

6. Conclusions

In this work, personalized MPC strategy with adaptive control rules is proposed to provide effective and safe regulation of BGC for people with T1D. Prior knowledge is incorporated into the glucose concentration prediction model by encoding the exponential stability information with a kernel matrix to improve the prediction power of the model and provide accurate predictions of the future BGC values. The integration of the rPLS modeling technique and missing data structure enables the glucose concentration model to estimate future values of BGC that enhances the robustness of the model and facilitates the development of fully-automated AP system that can overcome the impact of short periods of missing CGM data. MPC strategies are developed for computing optimal doses of insulin where hyper-parameters are personalized to address the inter-subject variations. Adaptive rules based on variation of CGM values are developed and integrated into pMPC strategy to enhance the control performance of postprandial glucose concentration. The proposed pMPC and paMPC strategies are evaluated with simulation studies where the AP systems are challenged by unannounced high-carbohydrate meals, unannounced medium-intensity aerobic physical activities, and missing CGM data. The results indicate that the proposed paMPC strategy can provide tight control of BGC without requiring any manual announcement of meal and exercise, and is robust to short-term missing CGM data.

Highlights.

  • Adaptive personalized MPC for management of type 1 diabetes (T1D).

  • Presented prior-knowledge-informed glucose prediction model.

  • For T1D it is highly beneficial to incorporate adaptive rules.

  • Presented the MPC that is robust to missing data.

  • Glycemic dynamic varies significantly from one individual to another.

Acknowledgments

Funding was provided by NIH grant 1DP3DK101075. The work of Xiaoyu Sun was partially supported by the China Scholarship Council (grant 201906080136). Funds provided by the Hyosung S. R. Cho Endowed Chair at Illinois Institute of Technology to Ali Cinar is gratefully acknowledged.

Appendix

Appendix A. Definition of acronyms

The acronyms and their definitions are summarized in Table A.1.

Appendix B. Prediction accuracy of the proposed model

To investigate the robustness of the proposed glucose prediction model, 10% estimation error is introduced into the physiological variables. The hyper-parameters are the same as the situation when the physiological variables are estimated accurately and the testing RMSE of the model is summarized in Table B.1.

Appendix C. Robustness of the paMPC to parameters mismatch

The robustness of the proposed method to physiological variables mismatch is investigated by introducing 10% of estimation errors into the variables randomly during the one-week closed-loop study. The meal and physical activity scenarios are summarized in Table 3 and missing CGM data with intervals ranging from one sample to six samples is introduced randomly. The performance of the proposed method is quantified by evaluating the statistics and distribution of CGM data as well as the amount of insulin that is consumed (Table C.1).

Table A.1:

Definition of acronyms.

Acronym Definition
AP artificial pancreas
BGC blood glucose concentration
CGM continuous glucose monitoring
MPC model predictive control
pMPC personalized MPC
paMPC personalized adaptive MPC
PLS partial least squares
rPLS regularized partial least squares
RMSE root mean squared error
T1D type 1 diabetes

Table B.1:

RMSE of the proposed model with inaccurate physiological variables

Prediction
horizon
Accurate
physiological variables
Inaccurate Physiological variables
CR CF basal rate TDI
PH = 1 1.92±0.48 1.92±0.63 1.97±0.68 1.98±0.78 1.97±0.68
PH = 6 9.93±2.02 9.72±2.39 10.06±2.84 10.02±3.00 10.07±2.84
PH = 12 28.72±4.28 28.20±4.93 29.02±6.08 28.76±5.99 29.03±6.08

CR: Insulin-to-Carbohydrate Ratio; CF: Correction Factor; TDI: Total Daily Insulin.

Table C.1:

Controller performance across 20 virtual subjects for paMPC with physiological variables mismatch (Mean ± STD (standard deviation)).

MPC strategy used: CR CF Basal insulin TDI
Time in Range (%) [40, 55) 0±0 0±0 0±0 0±0
[55, 70) 0.03±0.13 0±0 0.22±0.31 0±0
[70, 180] 84.47±7.44 84.78±7.34 85.36±10.75 84.81±7.23
(180, 250] 14.94±6.64 14.68±6.63 13.53±9.38 14.72±6.61
(250, 400] 0.56±0.91 0.55±0.80 0.89±1.96 0.46±0.70
CGM values (mg/dL) Minimum 73.0±3.50 74.7±2.43 72.5±5.97 73.3±2.45
Maximum 252.8±26.05 252.9±25.38 248.7±31.82 251.8±25.95
Mean 132.0±9.98 131.8±9.72 129.8±17.02 131.7±9.60
Total Amount of Insulin Infused (IU/day) 43.4±10.2 43.3±10.2 44.2±10.6 43.4±10.2
Total Rescue Carbohydrate Consumed (g) 50 15 405 40
Total Number of Hypoglycemia Events 10 0 76 0

CR: Insulin-to-Carbohydrate Ratio; CF: Correction Factor; TDI: Total Daily Insulin.

Footnotes

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

Conflict of Interest

The authors do not have any conflict of interests

References

  • [1].Mobasseri M, Shirmohammadi M, Amiri T, Vahed N, Hosseini Fard H, Ghojazadeh M, Prevalence and incidence of type 1 diabetes in the world: a systematic review and meta-analysis, Health Promot Perspect 10 (2020) 98–115. doi: 10.34172/hpp.2020.18. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [2].Turksoy K, Littlejohn E, Cinar A, Multimodule, Multivariable Artificial Pancreas for Patients with Type 1 Diabetes: Regulating Glucose Concentration Under Challenging Conditions, IEEE Control Systems Magazine 38 (2018) 105–124. doi: 10.1109/MCS.2017.2766326. [DOI] [Google Scholar]
  • [3].Cinar A, Turksoy K, Advances in Artificial Pancreas Systems: Adaptive and Multivariable Predictive Control, Springer, 2018. [Google Scholar]
  • [4].Turksoy K, Quinn L, Littlejohn E, Cinar A, Multivariable Adaptive Identification and Control for Artificial Pancreas Systems, IEEE Transactions on Biomedical Engineering 61 (2014) 883–891. doi: 10.1109/TBME.2013.2291777. [DOI] [PubMed] [Google Scholar]
  • [5].Marchetti G, Barolo M, Jovanovic L, Zisser H, Seborg DE, An Improved PID Switching Control Strategy for Type 1 Diabetes, IEEE Transactions on Biomedical Engineering 55 (2008) 857–865. doi: 10.1109/TBME.2008.915665. [DOI] [PubMed] [Google Scholar]
  • [6].Huyett LM, Dassau E, Zisser HC, Doyle FJ, Design and Evaluation of a Robust PID Controller for a Fully Implantable Artificial Pancreas, Industrial & Engineering Chemistry Research 54 (2015) 10311–10321. doi: 10.1021/acs.iecr.5b01237. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [7].Steil GM, Rebrin K, Closed Loop System For Controlling Insulin Infusion, 2008. URL: http://www.google.com/patents/US7354420, US Patent 7,354,420.
  • [8].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 33 (2010) 1072–1076. doi: 10.2337/dc09-1830. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [9].Mauseth R, Lord SM, Hirsch IB, Kircher RC, Matheson DP, Greenbaum CJ, Stress Testing of an Artificial Pancreas System With Pizza and Exercise Leads to Improvements in the System’s Fuzzy Logic Controller, Journal of Diabetes Science and Technology 9 (2015) 1253–1259. doi: 10.1177/1932296815602098. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [10].Soru P, De Nicolao G, Toffanin C, Dalla Man C, Cobelli C, Magni L, MPC based Artificial Pancreas: Strategies for individualization and meal compensation, Annual Reviews in Control 36 (2012) 118–128. doi: 10.1016/j.arcontrol.2012.03.009. [DOI] [Google Scholar]
  • [11].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, Physiological Measurement 25 (2004) 905–920. doi: 10.1088/0967-3334/25/4/010. [DOI] [PubMed] [Google Scholar]
  • [12].Magni L, Raimondo DM, Bossi L, Man CD, De Nicolao G, Kovatchev B, Cobelli C, Model predictive control of type 1 diabetes: an in silico trial, Journal of Diabetes Science and Technology 1 (2007) 804–812. doi: 10.1177/193229680700100603. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [13].Gondhalekar R, Dassau E, Doyle FJ, Periodic zone-MPC with asymmetric costs for outpatient-ready safety of an artificial pancreas to treat type 1 diabetes, Automatica 71 (2016) 237–246. doi: 10.1016/j.automatica.2016.04.015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [14].Hajizadeh I, Rashid M, Samadi S, Sevil M, Hobbs N, Brandt R, Cinar A, Adaptive personalized multivariable artificial pancreas using plasma insulin estimates, Journal of Process Control 80 (2019) 26–40. doi: 10.1016/j.jprocont.2019.05.003. [DOI] [Google Scholar]
  • [15].Lee H, Buckingham BA, Wilson DM, Bequette BW, A Closed-Loop Artificial Pancreas Using Model Predictive Control and a Sliding Meal Size Estimator, Journal of Diabetes Science and Technology 3 (2009) 1082–1090. doi: 10.1177/193229680900300511. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [16].Jacobs PG, El Youssef J, Castle J, Bakhtiani P, Branigan D, Breen M, Bauer D, Preiser N, Leonard G, Stonex T, Ward WK, Automated Control of an Adaptive Bihormonal, Dual-Sensor Artificial Pancreas and Evaluation During Inpatient Studies, IEEE Transactions on Biomedical Engineering 61 (2014) 2569–2581. doi: 10.1109/TBME.2014.2323248. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [17].Wang Y, Dassau E, Doyle FJ, Closed-Loop Control of Artificial Pancreatic β-Cell in Type 1 Diabetes Mellitus Using Model Predictive Iterative Learning control, IEEE Transactions on Biomedical Engineering 57 (2010) 211–219. doi: 10.1109/TBME.2009.2024409. [DOI] [PubMed] [Google Scholar]
  • [18].Adnan J, Anas EF, Ahmad H, Long-term use of the hybrid artificial pancreas by adjusting carbohydrate ratios and programmed basal rate: A reinforcement learning approach, Computer Methods and Programs in Biomedicine 200 (2021) 105936. doi: 10.1016/j.cmpb.2021.105936. [DOI] [PubMed] [Google Scholar]
  • [19].Zhu T, Li K, Herrero P, Georgiou P, Basal Glucose Control in Type 1 Diabetes Using Deep Reinforcement Learning: An In Silico Validation, IEEE Journal of Biomedical and Health Informatics 25 (2021) 1223–1232. doi: 10.1109/JBHI.2020.3014556. [DOI] [PubMed] [Google Scholar]
  • [20].Tejedor M, Woldaregay AZ, Godtliebsen F, Reinforcement learning application in diabetes blood glucose control: A systematic review, Artificial Intelligence in Medicine 104 (2020) 101836. doi: 10.1016/j.artmed.2020.101836. [DOI] [PubMed] [Google Scholar]
  • [21].Bergman RN, Ider YZ, Bowden CR, Cobelli C, Quantitative estimation of insulin sensitivity., American Journal of Physiology-Endocrinology and Metabolism 236 (1979) E667. doi: 10.1152/ajpendo.1979.236.6.E667. [DOI] [PubMed] [Google Scholar]
  • [22].Toffolo G, Bergman RN, Finegood DT, Bowden CR, Cobelli C, Quantitative Estimation of Beta Cell Sensitivity to glucose in the Intact Organism: A Minimal Model of Insulin Kinetics in the Dog, Diabetes 29 (1980) 979–990. doi: 10.2337/diab.29.12.979. [DOI] [PubMed] [Google Scholar]
  • [23].Dalla Man C, Rizza RA, Cobelli C, Meal Simulation Model of the Glucose-Insulin System, IEEE Transactions on Biomedical Engineering 54 (2007) 1740–1749. doi: 10.1109/TBME.2007.893506. [DOI] [PubMed] [Google Scholar]
  • [24].D’Antoni F, Merone M, Piemonte V, Iannello G, Soda P, Auto-Regressive Time Delayed jump neural network for blood glucose levels forecasting, Knowledge-Based Systems 203 (2020) 106134. doi: 10.1016/j.knosys.2020.106134. [DOI] [Google Scholar]
  • [25].Li K, Daniels J, Liu C, Herrero P, Georgiou P, Convolutional Recurrent Neural Networks for Glucose Prediction, IEEE Journal of Biomedical and Health Informatics 24 (2020) 603–613. doi: 10.1109/JBHI.2019.2908488. [DOI] [PubMed] [Google Scholar]
  • [26].Dudukcu HV, Taskiran M, Yildirim T, Blood glucose prediction with deep neural networks using weighted decision level fusion, Biocybernetics and Biomedical Engineering 41 (2021) 1208–1223. doi: 10.1016/j.bbe.2021.08.007. [DOI] [Google Scholar]
  • [27].Yu X, Yang T, Lu J, Shen Y, Lu W, Zhu W, Bao Y, Li H, Zhou J, Deep transfer learning: a novel glucose prediction framework for new subjects with type 2 diabetes, Complex & Intelligent Systems (2021) 1–13. doi: 10.1007/s40747-021-00360-7. [DOI] [Google Scholar]
  • [28].Eren-Oruklu M, Cinar A, Quinn L, Smith D, Adaptive control strategy for regulation of blood glucose levels in patients with type 1 diabetes, Journal of Process Control 19 (2009) 1333–1346. doi: 10.1016/j.jprocont.2009.04.004, special Section on Hybrid Systems: Modeling, Simulation and Optimization. [DOI] [Google Scholar]
  • [29].Turksoy K, Hajizadeh I, Hobbs N, Kilkus J, Littlejohn E, Samadi S, Feng J, Sevil M, Lazaro C, Ritthaler J, Hibner B, Devine N, Quinn L, Cinar A, Multivariable Artificial Pancreas for Various Exercise Types and Intensities, Diabetes Technology & Therapeutics 20 (2018) 662–671. doi: 10.1089/dia.2018.0072. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [30].Zhang M, Flores KB, Tran HT, Deep learning and regression approaches to forecasting blood glucose levels for type 1 diabetes, Biomedical Signal Processing and Control 69 (2021) 102923. doi: 10.1016/j.bspc.2021.102923. [DOI] [Google Scholar]
  • [31].Xie J, Wang Q, Benchmarking Machine Learning Algorithms on Blood Glucose Prediction for Type I Diabetes in Comparison With Classical Time-Series Models, IEEE Transactions on Biomedical Engineering 67 (2020) 3101–3124. doi: 10.1109/TBME.2020.2975959. [DOI] [PubMed] [Google Scholar]
  • [32].Zhao C, Dassau E, Jovanovič L, Zisser HC, Doyle FJ, Seborg DE, Predicting subcutaneous glucose concentration using a latent-variable-based statistical method for type 1 diabetes mellitus, Journal of Diabetes Science and Technology 6 (2012) 617–633. doi: 10.1177/193229681200600317. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [33].Sun X, Rashid MM, Sevil M, Hobbs N, Brandt R, Askari M-R, Shahidehpour A, Cinar A, Prediction of Blood Glucose Levels for People with Type 1 Diabetes using Latent-Variable-based Model., in: KDH@ ECAI, 2020, pp. 115–119. [Google Scholar]
  • [34].He J, Wang Y, Blood glucose concentration prediction based on kernel canonical correlation analysis with particle swarm optimization and error compensation, Computer Methods and Programs in Biomedicine 196 (2020) 105574. doi: 10.1016/j.cmpb.2020.105574. [DOI] [PubMed] [Google Scholar]
  • [35].Pillonetto G, Dinuzzo F, Chen T, De Nicolao G, Ljung L, Kernel methods in system identification, machine learning and function estimation: A survey, Automatica 50 (2014) 657–682. doi: 10.1016/j.automatica.2014.01.001. [DOI] [Google Scholar]
  • [36].Chen T, On kernel design for regularized LTI system identification, Automatica 90 (2018) 109–122. doi: 10.1016/j.automatica.2017.12.039. [DOI] [Google Scholar]
  • [37].Sun X, Rashid M, Hobbs N, Askari MR, Brandt R, Shahidehpour A, Cinar A, Prior informed regularization of recursively updated latent-variables-based models with missing observations, Control Engineering Practice 116 (2021) 104933. doi: 10.1016/j.conengprac.2021.104933. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [38].Rashid M, Hajizadeh I, Samadi S, Sevil M, Hobbs N, Brandt R, Cinar A, Chapter 15 - Automated closed-loop insulin delivery: system components, performance, and limitations, in: Fabris C, Kovatchev B (Eds.), Glucose Monitoring Devices, Academic Press, 2020, pp. 293–326. doi: 10.1016/B978-0-12-816714-4.00015-6. [DOI] [Google Scholar]
  • [39].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, Annual Reviews in Control 50 (2020) 1–12. doi: 10.1016/j.arcontrol.2020.10.004. [DOI] [Google Scholar]
  • [40].Turksoy K, Cinar A, Adaptive control of artificial pancreas systems - a review, Journal of Healthcare Engineering 5 (2014) 1–22. doi: 10.1260/2040-2295.5.1.1. [DOI] [PubMed] [Google Scholar]
  • [41].Riddell MC, Zaharieva DP, Yavelberg L, Cinar A, Jamnik VK, Exercise and the Development of the Artificial Pancreas: One of the More Difficult Series of Hurdles, Journal of Diabetes Science and Technology 9 (2015) 1217–1226. doi: 10.1177/1932296815609370. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [42].Hajizadeh I, Rashid M, Turksoy K, Samadi S, Feng J, Frantz N, Sevil M, Cengiz E, Cinar A, Plasma Insulin Estimation in People with Type 1 Diabetes Mellitus, Industrial & Engineering Chemistry Research 56 (2017) 9846–9857. doi: 10.1021/acs.iecr.7b01618. [DOI] [Google Scholar]
  • [43].Sevil M, Rashid M, Hajizadeh I, Park M, Quinn L, Cinar A, Physical Activity and Psychological Stress Detection and Assessment of Their Effects on Glucose Concentration Predictions in Diabetes Management, IEEE Transactions on Biomedical Engineering 68 (2021) 2251–2260. doi: 10.1109/TBME.2020.3049109. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [44].Nelson PR, Taylor PA, MacGregor JF, Missing data methods in PCA and PLS: Score calculations with incomplete observations, Chemometrics and Intelligent Laboratory Systems 35 (1996) 45–65. doi: 10.1016/S0169-7439(96)00007-X. [DOI] [Google Scholar]
  • [45].Folch-Fortuny A, Arteaga F, Ferrer A, PCA model building with missing data: New proposals and a comparative study, Chemometrics and Intelligent Laboratory Systems 146 (2015) 77–88. doi: 10.1016/j.chemolab.2015.05.006. [DOI] [Google Scholar]
  • [46].Messori M, Paolo Incremona G, Cobelli C, Magni L, Individualized model predictive control for the artificial pancreas: In silico evaluation of closed-loop glucose control, IEEE Control Systems Magazine 38 (2018) 86–104. doi: 10.1109/MCS.2017.2766314. [DOI] [Google Scholar]
  • [47].Hajizadeh I, Rashid M, Cinar A, Plasma-insulin-cognizant adaptive model predictive control for artificial pancreas systems, Journal of Process Control 77 (2019) 97–113. doi: 10.1016/j.jprocont.2019.03.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [48].Sevil M, Rashid M, Hajizadeh I, Park M, Quinn L, Cinar A, Physical Activity and Psychological Stress Detection and Assessment of Their Effects on Glucose Concentration Predictions in Diabetes Management, IEEE Transactions on Biomedical Engineering 68 (2021) 2251–2260. doi: 10.1109/TBME.2020.3049109. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [49].Rashid M, Samadi S, Sevil M, Hajizadeh I, Kolodziej P, Hobbs N, Maloney Z, Brandt R, Feng J, Park M, Quinn L, Cinar A, Simulation software for assessment of nonlinear and adaptive multivariable control algorithms: Glucose–insulin dynamics in type 1 diabetes, Computers & Chemical Engineering 130 (2019) 106565. doi: 10.1016/j.compchemeng.2019.106565. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [50].Magni L, Raimondo DM, Man CD, Breton M, Patek S, Nicolao GD, Cobelli C, Kovatchev BP, Evaluating the Efficacy of Closed-Loop Glucose Regulation via Control-Variability Grid Analysis, Journal of Diabetes Science and Technology 2 (2008) 630–635. doi: 10.1177/193229680800200414. [DOI] [PMC free article] [PubMed] [Google Scholar]

RESOURCES