Long-Term Glucose Forecasting Using a Physiological Model and Deconvolution of the Continuous Glucose Monitoring Signal

(1) Objective: Blood glucose forecasting in type 1 diabetes (T1D) management is a maturing field with numerous algorithms being published and a few of them having reached the commercialisation stage. However, accurate long-term glucose predictions (e.g., >60 min), which are usually needed in applications such as precision insulin dosing (e.g., an artificial pancreas), still remain a challenge. In this paper, we present a novel glucose forecasting algorithm that is well-suited for long-term prediction horizons. The proposed algorithm is currently being used as the core component of a modular safety system for an insulin dose recommender developed within the EU-funded PEPPER (Patient Empowerment through Predictive PERsonalised decision support) project. (2) Methods: The proposed blood glucose forecasting algorithm is based on a compartmental composite model of glucose–insulin dynamics, which uses a deconvolution technique applied to the continuous glucose monitoring (CGM) signal for state estimation. In addition to commonly employed inputs by glucose forecasting methods (i.e., CGM data, insulin, carbohydrates), the proposed algorithm allows the optional input of meal absorption information to enhance prediction accuracy. Clinical data corresponding to 10 adult subjects with T1D were used for evaluation purposes. In addition, in silico data obtained with a modified version of the UVa-Padova simulator was used to further evaluate the impact of accounting for meal absorption information on prediction accuracy. Finally, a comparison with two well-established glucose forecasting algorithms, the autoregressive exogenous (ARX) model and the latent variable-based statistical (LVX) model, was carried out. (3) Results: For prediction horizons beyond 60 min, the performance of the proposed physiological model-based (PM) algorithm is superior to that of the LVX and ARX algorithms. When comparing the performance of PM against the secondly ranked method (ARX) on a 120 min prediction horizon, the percentage improvement on prediction accuracy measured with the root mean square error, A-region of error grid analysis (EGA), and hypoglycaemia prediction calculated by the Matthews correlation coefficient, was 18.8%, 17.9%, and 80.9%, respectively. Although showing a trend towards improvement, the addition of meal absorption information did not provide clinically significant improvements. (4) Conclusion: The proposed glucose forecasting algorithm is potentially well-suited for T1D management applications which require long-term glucose predictions.


Introduction
Type 1 diabetes (T1D) is an autoimmune condition characterized by elevated blood glucose levels due to the lack of endogenous insulin production [1]. People with T1D require exogenous insulin delivery to regulate glucose levels. Current therapies for T1D management require measuring capillary glucose levels several times per day and the administration of insulin by means of multiple daily injections (MDI) or continuous subcutaneous insulin infusion (CSII) with pumps. More recently, the improvement on accuracy of subcutaneous continuous glucose monitoring (CGM) has enabled access to virtually continuous glucose concentrations measurements (e.g., every 5 min), glucose trends, and their retrospective analysis. In addition, real-time CGM devices include alerts and alarms for concentrations outside of specified ranges and/or rapid changes in glucose. Clinical data suggest that CGM can improve overall glucose control, as measured by glycated haemoglobin (HbA1c) [2], and can reduce the burden of extreme glucose values (hypo-and hyperglycaemia) [3]. In addition, CGM technology has opened the door to new technologies for managing glucose levels such as sensor-augmented insulin pumps with low-glucose insulin suspension [4] and the artificial pancreas [5]. One additional benefit of the CGM technology is that it facilitates the forecasting of blood glucose levels, and consequently, enables pre-emptive action to avoid undesired events, such as hypoglycaemia and hyperglycaemia.
Glucose forecasting in T1D is a relatively mature field with several algorithms having been proposed, and comprehensive and extensive reviews published, which provides a taxonomy of the different types of existing algorithms [6][7][8]. In particular, four main types of approaches were identified depending on the type of model being used: physiological models [9], data-based models [10][11][12], hybrid models [13], and control relevant models [14][15][16]. Another distinction that can be done among the existing algorithms is based on the type of inputs being considered. A significant proportion of these algorithms use CGM data as the unique source of information to forecast glucose levels [17], while other algorithms use additional exogenous inputs such as meal intake and insulin doses [9], and only a few of them take into account physical exercise [18]. Furthermore, additional information such as meal absorption information could potentially further improve such accuracy [19]. Regarding the prediction horizon, most of the algorithms focus on short-term predictions (i.e., <60 min) [20], with fewer works focusing on longer prediction horizons [9,21,22]. Of note, it has been shown that for short prediction horizons (e.g., 30 min), differences in the forecasting accuracy among different algorithms is marginal [23]. Although short-term prediction horizons have been proven to be useful for applications such as predictive glucose alerts and low-glucose suspension systems [4], they are usually not sufficient for other applications such as closed-loop insulin delivery [5] and insulin dosing decision support [24]. Hence, there is a need for further investigation of this topic.
Finally, there has been a recent increase in the use of machine learning techniques for glucose forecasting [12,22,25]. However, these techniques tend to require a significant amount of data in order to be trained, which might be a limiting factor in clinical practice. A proof of this interest is the recent organisation of the Blood Glucose Level Prediction Challenge as part of the 3rd International Workshop on Knowledge Discovery in Healthcare Data [26], and a recent publication of a literature review [8].
As a result of this research effort, commercial applications have started to appear embedded within sensor-augmented insulin pumps (e.g., Medtronic MiniMed 640G with Smart Guard; Tandem t:slim X2 TM with Basal-IQ Technology) which have been proven to reduce nocturnal hypoglycaemia by using predictive glucose alerts and a predictive low-glucose insulin suspension system [27,28].
In this paper, we hypothesise that a glucose prediction algorithm based on a physiological model of glucose-insulin dynamics and a deconvolution technique using CGM data to estimate the model states is a good candidate for performing long-term glucose predictions. In addition, we hypothesise that adding information about meal absorption can enhance prediction accuracy. The presented algorithm is currently being clinically evaluated as part of the safety system of a mobile-based decision support system for T1D management within the framework of the European project PEPPER (Patient Empowerment through Predictive PERsonalised decision support) [29].

Methods
The proposed glucose prediction algorithm is based on the composite minimal model of glucose-insulin regulation in T1D [30] that uses deconvolution of the CGM signal to estimate some of the model states. In particular, the states of the gastrointestinal model are estimated using the technique proposed by Herrero et al., which has been proven to be an effective way to estimate the glucose rate of appearance from mixed meals [31]. Then, meal information (i.e., carbohydrate amount and absorption type) and insulin boluses are considered as exogenous inputs. Note that, although more complex models are available in the literature [32], the employed composite minimal model was chosen because of its trade-off between simplicity, which facilitates the parameter identification task, and ability to capture the complex glucose-insulin dynamics. The effectiveness of the employed composite model was evaluated by Gillis et al. for glucose prediction using a Kalman filter technique [33] and by Herrero and associates for detecting faults in insulin pump therapy [30].

Composite Minimal Model
The employed composite model of glucose regulation in T1D is composed of the minimal model of glucose disappearance proposed by Bergman and colleagues [34], and the insulin and carbohydrate absorption models proposed by Hovorka et al. [35].

Minimal Model of Glucose Disappearance
The minimal model of glucose disappearance [34] is described by the equations: where G(t) is the glucose concentration at time t; X(·) is the insulin action; R a (·) is the glucose rate of appearance from ingested meals; I(·) is the plasma insulin concentration; S G is the fractional glucose effectiveness; S I is the insulin sensitivity, which models the ratio between endogenous glucose production and glucose uptake; p 2 is the insulin action rate; G b is the basal glucose; V is the distribution volume; and W is the subject's body weight.

Insulin Absorption Model
The plasma insulin concentration is estimated by means of the subcutaneous insulin absorption model proposed by Hovorka et al. [35], which is described by the following equations.
where S 1 (·) and S 2 (·) are the subcutaneous short-acting insulin compartments, I(·) denotes the plasma insulin concentration, the input u I NS (·) represents the subcutaneous insulin infusion, t maxI is the time to maximum insulin absorption, V i is the distribution volume of insulin and k e is the decay rate.

Glucose Absorption Model
The glucose rate of appearance (R a ) is calculated according to the gastrointestinal absorption model by Hovorka et al. [35], which is represented by the equations: where R a1 (·) denotes the glucose appearance in the first compartment, R a (·) represents the rate of glucose appearance, the model input u CHO (·) denotes the carbohydrate intake amount, t maxG is the time to maximum glucose rate of appearance and A g is the carbohydrate bioavailability.

Accounting for Meal Absorption
Meal composition has a profound effect on blood glucose levels [19]. Therefore, taking this information into account can potentially enhance glucose estimation and forecasting accuracy. To account for this information in a practical way from the user's perspective, meals were classified as fast, medium and slow absorption. In particular, fast-absorption meals were considered to have more than 60% of the area under the curve (AUC) of the rate of glucose appearance (R a ) profile and appeared within the first two hours after the meal ingestion; slow-absorption meals with less than 80% of AUC of the R a profile appeared within four hours, and medium-absorption meals in the middle. To take meal absorption information into account within the employed glucose absorption model, the time-to-maximum absorption rate t maxG is redefined for the duration of each meal as follows: wheret maxG is the time-to-maximum absorption rate accounting for the meal absorption; t l and t d represent the time shift on the time-to-maximum absorption rate due to different meal absorption rates; and u ABS is the absorption type of the meal (fast, medium and slow). In particular, t l and t d were fixed to 20 min based on experiments carried out using the UVa-Padova simulator [36]. Figure 1 shows the average R a profiles corresponding to the fast, slow and medium meals, as per definition above, from the UVa-Padova simulator for a 60 g intake of carbohydrates.

Glucose Prediction Algorithm
The proposed glucose prediction algorithm uses a discretised version of the presented composite model (Equations (1)- (7)). For this purpose, a forward Euler's configuration with 1 min step size is used to simulate the model.
Let: First, the model states are initialised as x(k − 1) = G CGM (·) 0 0 0 0 0 0 , being G CGM (·) the current CGM measurement. Then, Equation (9) is evaluated M times, M being the number of minutes elapsed between two consecutive CGM measurements (e.g., 5 min → five times). In parallel, the model states of the gastrointestinal model (Equations (6) and (7)) are estimated in real-time by applying a deconvolution of the CGM signal using the technique proposed by Herrero et al. [31]. In particular, the glucose rate of appearance (R a (·)) in the second compartment is estimated as: where G CGM (·) is the derivative of the glucose measurements calculated as the slope of the linear regression of three consecutive glucose values, and X(·) is the insulin action calculated with Equation (2). In order to reduce the influence of the measurement disturbance, the derivative is bounded by |Ḡ (·)| ≤ 1 mg/dL per min. To further reduce the effect of sensor noise onR a (·), a moving average filter is applied to the signal: whereR a (·) is the filtered signal and n is the length of the moving window (n = 3). Then, the glucose appearance in the first compartment is estimated by: whereR a (·) is the derivative ofR a (·) approximated by calculating the slope of the linear regression of three consecutive values.
Then, the estimated model states being used for forecasting purposes are calculated by means of a weighted average between the calculated states with the discretised model (R a and R a1 ) and the states estimated by deconvolution (R a andR a1 ) as follows: where Q 1 ∈ [0, 1] is a tuning parameter that allows putting more weight on the model estimation or on the estimation by the deconvolution technique. Similarly, the blood glucose state being used for forecasting purposes is calculated as: where Q 2 ∈ [0, 1] is a tuning parameter that allows putting more weight on the model estimation (G(·)) or on the CGM measurement (G CGM (·)). Note that Q 1 and Q 2 are constant. In particular, we used Q 1 = Q 2 = 0.5 when identifying the model parameters and Q 1 = Q 2 = 0.7 when testing the model since these were the values leading to better population results. Finally, the model states are updated as: and the model is valuated over the predefined prediction horizon (PH) to obtain the forecasted states is the desired forecasted glucose value. Figure 2 shows a graphical representation of the described glucose forecasting algorithm.

Glucose-Insulin Minimal Model
Block diagram corresponding to the proposed glucose forecasting algorithm. The whole diagram is executed every time a glucose value (G CGM ) (continuous glucose monitoring (CGM)) is received. Then, the physiological model represented by the green blocks is evaluated over the prediction horizon (PH) to obtain the forecasted glucose (G(k + PH)).

Model Parameter Identification
The proposed prediction algorithm can be individualised by identifying some of the model parameters by using retrospective data. Since identification of all model parameters is difficult due to identifiability problems, some of the parameters, which are known to have less inter-subject variability, were fixed to mean populations values (i.e., S G , V, V i , k e , p 2 , A g ) [37], while others were set by using a priori known information from the subjects, such as body weight (W) and basal glucose (G b ). Finally, parameters S I , t maxI and t maxG were identified by using an optimisation technique that minimises the mean absolute relative difference (MARD) between the predicted glucose (G(k + PH)) and the corresponding glucose measurements (G CGM (k + PH)). Matlab fmincon constrained optimisation routine was employed for this purpose. Constraints for the identified parameters were S I ∈ [0.001, 0.005] min −1 per µU/mL, t maxI ∈ [50, 140] min and t maxG ∈ [50,140] min. Note that parameters S I , t maxI and t maxG were identified for each one of the evaluated prediction horizons. Table 1 shows the employed values for the model parameters indicating which ones are a priori known and which ones are identified. Table 1. Values of the parameters used in the forecasting algorithm. * indicates parameters that are identified and * * indicates parameters that are known from a priori information from the subjects. The rest of the parameters are fixed to mean population values obtained from the scientific literature [31,35].

Baseline Algorithms
In order to compare the performance of the proposed algorithm, validated and commonly employed glucose forecasting algorithms from the literature were chosen. In particular, a third-order auto regression with exogenous input (ARX) method was chosen because it has shown good performance when compared to other algorithms and it is easy to implement [23]. Then, a latent variable with exogenous input (LVX) method was selected because it has showed superiority when compared against other existing techniques and its source code is publicly available [38]. Of note, more recent algorithms, such as [9,21], could have also been chosen, but their complexity of implementation and difficulty in replicating the reported results was the main reason for not doing so.

Clinical Data Testing
To test the proposed algorithm, a two-week clinical dataset obtained from 10 adult subjects with T1D undergoing a clinical trial carried out at Imperial College Healthcare NHS Trust, London, UK evaluating the benefits of an advanced insulin bolus calculator was employed [39]. In particular, one week worth of data per participant was used for parameter identification purposes (mean ± std: 1897 ± 143 data points) (physiological model-based (PM) algorithm), while the other week was employed for testing purposes (mean ± std: 1909 ± 124 data points). Since no reliable information about meal composition was available, the assumption that breakfast and snacks were fast absorption meals, and lunch and dinner were medium absorption meals, was made. Note that not having such information might limit the benefits of accounting for meal absorption information. In an ideal scenario, CGM measurements are received every 5 min. However, it is common to have gaps in the data. In order to minimise the impact of such gaps in the proposed method, a modified Akima cubic Hermite interpolation method was employed for data imputation purposes.

In Silico Testing
In order to evaluate the potential benefit of using meal absorption within the proposed algorithm, a modified version of the UVa-Padova T1DM simulator (v3.2) [36] was employed. Intra-day variability was emulated by modifying some of the parameters of the model described in [32]. In particular, meal variability was emulated by introducing meal-size variability (CV = 10%), meal-time variability (STD = 20) and uncertainty in the carbohydrate estimation (uniform distribution between −30% and +20%) [40]. Meal absorption rate (k abs ) and carbohydrate bioavailability ( f ) were considered to vary by ±30% and ±10% respectively. To account for variability in meal composition, the 33 available meals in the simulator were considered. Note that each cohort (adults, adolescent and children) has 11 different meals. In addition, 16 new meals obtained by using the technique for estimating the rate of glucose appearance proposed by Herrero et al. in [31] were included. Details about the mixed meal library are provided in Appendix A. By using the absorption classification criteria introduced in Section 2.2, of the 49 considered meals, 31 were classified as fast absorption, 15 as medium absorption and three as slow absorption. Finally, intra-subject variability in insulin absorption model parameter (k d , k a1 , k a2 ) was assumed as ±30% [41,42]. The 10 available adult subjects were used for this purpose. The open-loop insulin therapy provided by the simulator was employed to generate the datasets. A two-week scenario with a daily pattern of carbohydrate dose intake of 7 am (±20 min) (70 g), 13 pm (±20 min) (100 g) and 7 pm (±20 min) (80 g) was chosen. The first week of data was used for the parameter estimation (2016 data points), while the second week works for testing purposes (2016 data points).

Evaluation Metrics
To measure the forecasting accuracy of the evaluated algorithms, the root mean square error (RMSE), and error grid analysis (EGA) [43], were used. RMSE is calculated as: where G(k + PH) is the forecasted glucose value as indicated in Section 2.3, G CGM (k + PH) is the corresponding CGM measurement, and N is the total number of glucose data pairs. EGA is employed to represent the clinical significance of the error between the forecasted glucose value and the actual measurement. In particular, the A region of EGA corresponds to accurate glucose predictions, meaning that forecasted glucose values deviates less than ±20% from the actual CGM measurements (i.e., |G(k + PH) − G CGM (k + PH)| ≤ 20% G CGM (k + PH)), or when both the forecasted and the actual measurements indicate hypoglycaemia (i.e., G(k + PH) ≤ 70 mg/dL and G CGM (k + PH) ≤ 70 mg/dL). The B region corresponds to forecasted values with a deviation from the CGM measurements larger than 20% (i.e., |G(k + PH) − G CGM (k + PH)| ≥ 20 % G CGM (k + PH)) but would not lead to inappropriate treatment (see regions C,D,E). The C region represents forecasted glucose values are more than 100 mg/dL below the actual measurement (i.e., G(k + PH) ≤ G CGM (k + PH) − 100 mg/dL), or forecasted glucose is indicating hypoglycaemia while the CGM measurements is between 130 and 180 mg/dL (i.e., G(k + PH) ≤ 70 mg/dL and 130 mg/dL ≤ G CGM (k + PH) ≥ 180 mg/dL). Finally, the D region represents the zone with forecasted glucose values in the target range while the actual measurement is out of the target range (i.e., 70 mg/dL ≤ G(k + PH) ≥ 180 mg/dL and G CGM (k + PH) ≤ 70 mg/dL || G CGM (k + PH) ≥ 180 mg/dL). The E region corresponds to potentially clinically dangerous glucose predictions, meaning forecasted glucose indicating hypoglycaemia while CGM measurements indicating hyperglycaemia (i.e., G(k + PH) ≤ 70 mg/dL and G CGM (k + PH) ≥ 180 mg/dL), or when forecasted glucose indicate hyperglycaemia while CGM measurements indicate hypoglycaemia (i.e., G(k + PH) ≥ 180 mg/dL and G CGM (k + PH) ≤ 70 mg/dL).
In addition, the efficiency of the algorithm at predicting hypoglycaemia was evaluated by the Matthews correlation coefficient (MCC), defined as: where TP denotes the number of true positives, i.e., predictions of hypoglycemic events that are confirmed to be actual episodes of hypoglycemia, with a hypoglycemic event being defined as three consecutive glucose values below 70 mg/dL; FN denotes the number of false negatives, i.e., missed predictions of hypoglycemic events; TN denotes the number of true negatives, i.e., correct prediction of glucose values above 70 mg/dL; and FP denotes the number of false positives, i.e., false predictions of hypoglycemic events. Assessment of statistical significance for between-method differences was performed, with 0.1%, 1% and 5% confidence levels, using a paired t-test as implemented in Matlab.
Finally, prediction horizons of 30, 60, 90, and 120 min were employed to compare the studied algorithms.

Clinical Data Results
Baseline characteristics of the 10 selected participants (one male and nine female) had a median (interquartile range (IQR)) age of 29 The distribution of the identified model parameters for the selected 10-adult cohort is S I = 0.0033 ± 0.0015 min −1 per µU/mL, t maxI = 78.36 ± 16.52 min and t maxG = 85.23 ± 24.86 min. Table 2 shows the results corresponding to the 10 adult cohort for baseline algorithms (LVX and ARX) and the proposed method, without accounting for meal absorption information (PM) and accounting for it (PM MA ). In order to show the consistency of the results at the individual level, the RMSE results for each of the evaluated subjects are presented in Appendix B (Table A4). The normality of the reported data distributions was evaluated by means of the Shapiro-Wilk test and, in all cases, the null hypothesis for an α = 0.05 was not rejected. Table 2. Results corresponding to the 10-adult population expressed as Mean ± STD for the studies algorithms and different PH in minutes. Assessment of statistical significance between adjacent rows is indicated with * for p < 0.001, + for p < 0.01, and ‡ for p < 0.05.

In Silico Results
The distributions of the identified model parameters for the selected in silico cohort of 10 adults with T1D, expressed as Mean ± STD, are: S I = 0.00275 ± 0.0014 min −1 per µU/mL, t maxI = 114.6 ± 21.6 min and t maxG = 68.9 ± 6.8 min. Table 3 presents the results corresponding to the 10-adult cohort for each one of the selected baseline algorithms (LVX and ARX) and the proposed method, without accounting for meal absorption information (PM), and accounting for it (PM MA ). Table 3. Results corresponding to the 10-adult virtual population expressed as Mean ± STD for the studies algorithms and different PH in minutes. Assessment of statistical significance between adjacent rows is indicated with * for p < 0.001, + for p < 0.01 and ‡ for p < 0.05.

Discussion
Results obtained with both clinical data ( Table 2) and in silico data (Table 3) are consistent at showing that, when compared to commonly employed glucose forecasting algorithms (LVX and ARX), the proposed PM algorithm is superior on all evaluated prediction horizons. As observed in Figure 3, such superiority is more evident at longer prediction horizons, and in particular, when looking at the MCC. In the context of predictive glucose alarms, this improvement would be translated into a system with less false alarms and missed alarms, while in an automatic insulin delivering system, it could be translated into better glucose control.
This improvement in forecasting accuracy at longer horizons might be attributable to the use of a physiological model, which is able to better account for the long-term glucose-insulin dynamics when compared to purely data-driven based approaches.
As observed in Tables 2 and 3, the inclusion of meal absorption information into the PM MA method did not yield significant improvements in the forecasting accuracy. Although additional meals were included into the UVA-Padova simulator to increase its inter-meal variability, such variability might still not be enough to show the benefits of the proposed approach. Note that the presented mixed-meal model library in Appendix A is per se a scientific outcome that can be used in other applications [44].
It is worth noting that, when comparing against the baseline algorithms, the proposed method shows better performance on the real cohort than on the in silico. Our hypothesis to explain this fact is that our method is better at capturing the complexity of the real world glucose-insulin dynamics as a result of using a deconvolution technique for state estimation.
Although the proposed approach has been proven to be superior to some of existing forecasting algorithms, there are still some scenarios were there is a significant mismatch between the predicted glucose and the actual glucose, e.g., Figure 4 around 15:00 h. This might be explained by the presence of an unaccounted perturbation such as physical exercise. Note that for this particular scenario, a closed-loop control algorithm, such as Model Predictive Control, could lead to sub-optimal results, but this is a limitation inherent to this type of feedback controller.
Finally, unlike recently proposed machine learning methods, which require a significant amount of data to be trained, the proposed methods requires a relatively small dataset (e.g., one week), which makes it practical for clinical applications.

Conclusions and Future Work
The proposed glucose forecasting algorithm based on a physiological model and a state estimation deconvolution technique is a potential solution for diabetes technology solutions that require long-term glucose predictions (e.g., 120 min), such as closed-loop insulin delivery and insulin dosing decision support. Future work to further improve the accuracy of the proposed algorithm includes accounting for circadian variations on insulin sensitivity [45] and the short-and long-term effect of exercise on insulin requirements [46]. Finally, online parameter estimation is another potential avenue for investigation.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Appendix A. Mixed-Meal Model Library
To build the employed mixed-meal model library within the UVa-Padova T1DM simulator [36], the scientific literature was reviewed for clinical trials studying the effect of meal composition on non-diabetic subjects, which included mean population plasma glucose and plasma insulin concentration data, meal composition, and body weight. In addition, the duration of the trial needs to be long enough to allow glucose and insulin levels at the end of the trial to return to basal conditions and the sampling rate needs to be high enough to capture glucose and insulin dynamics. Data from 16 mixed meals fulfilling the above criteria were found in scientific publications for healthy subjects. Table A1 shows the information for each of the selected mixed meals, average weight of the studied subjects and the corresponding bibliographic reference. To estimate the rate of glucose appearance (R a ) corresponding to the chosen meals, a simple technique for estimating R a proposed and validated by Herrero and colleagues was employed [31]. The employed technique, which is based on the glucose-insulin minimal model, only requires the identification of the insulin sensitivity from the minimal model, since it is based on the hypothesis that the rest of the model parameters can be considered to vary in relatively small ranges. This hypothesis originates from the experimental evidence that inter-subject variability of these parameters is not very large [37]. Figure A1 shows the estimated R a profiles. Then, the estimated R a profiles were fitted to the the gastrointestinal model of the UVa-Padova T1DM simulator [55], which equations are described below.
q sto2 (t) = −k empt (t)q sto2 (t) + k abs q sto1 (t), q gut (t) = −k abs (t)q gut (t) + k empt (t)q sto2 (t), where, q sto1 and q sto2 are the amounts of glucose in the stomach (solid and liquid phase, respectively), k 21 is the rate of grinding in the stomach, δ is the impulse function, D is the amount of ingested glucose, q gut is the glucose mass in the intestine, k abs is the rate constant of intestinal absorption, R a is the glucose rate of appearance in plasma, f is the fraction of the intestinal absorption which actually appears in plasma and k empt is the rate of gastric emptying, which is represented by a nonlinear function describing a slow down of glucose emptying rate and later recovery, based on available physiological knowledge and which depends on the total amount of glucose in the stomach as follows: where k min and k max are the minimal and maximal absorption rates respectively, b is the percentage of the dose q sto for which k empt decreases at (k max − k min )/2 and c is the percentage of the dose q sto for which k empt is back to (k max − k min )/2. Table A2 shows the identified gastrointestinal model parameters corresponding to the 16 mixed meals presented in TableA1. Finally, Figure A1 shows the curve fitting of 16 estimated R a profiles to the selected gastrointestinal model. To consider the model parameters identification satisfactory, the following conditions were required to hold, where the operator denotes the absolute difference between the reference and predicted Ra profiles for the corresponding metric:

•
Peak value: Ra peak ≤ 0.3 mg · min −1 · kg −1 • Peak time: T peak ≤ 20 min • Area-under-the-curve: AUC ≤ 30% • RMSE: RMSE ≤ 0.5 mg · min −1 · kg −1 Furthermore, the coefficient of variation (CV) provided by the Matlab lsqnonlin optimization routine was required to be CV < 50% and the coefficient of determination (R 2 ) to be above 0.8. Table A3 shows defined metrics for the evaluated R a profiles. Table A3. Metrics to evaluate the R a model fitting to reference R a profiles.

Meal
Ra peak T peak AUC RMSE R 2 mg · min −1 · kg −1 min % mg · min −1 · kg −1 -  Table A4 presents the RMSE results for each of the 10 adults in the clinical cohort corresponding to the baseline algorithms (LVX and ARX) and the proposed method, without accounting for meal absorption information (PM) and accounting for it (PM MA ).