Constrained Versus Unconstrained Model Predictive Control for Artificial Pancreas

The technological advances reached in the last years released portable devices with high computational capabilities and able to overcome the relevant hardware limitations of the past artificial pancreas (AP) applications. In view of this, the choice of an unconstrained saturated model predictive control (S-MPC) can be reconsidered. A constrained MPC (C-MPC) is formulated here as a finite-horizon optimal control problem and it is retuned, as well as the S-MPC, using the new UVA/Padova simulator. A new calibration procedure is used to consider clinically significant performance indices. The C-MPC and the S-MPC are tested in silico on the 100 adult patients of the new simulator. Its capability to better represent real-life conditions allows to evaluate the MPCs in more realistic scenarios. The C-MPC outperforms the S-MPC in terms of average glucose, time spent in tight range, and time above 180 mg/dL. An acceptable increase of the time below 70 mg/dL to 4% is present for 25% of the patients, but the time in severe hypoglycemia remains equal to 0%. The development of a patient-tailored C-MPC is proposed as future development to mitigate these hypoglycemia phenomena.


I. INTRODUCTION
T YPE 1 diabetes (T1D) is a pathology characterized by high blood glucose levels (BGLs) due to the absence of insulin production, the hormone that allows the glucose utilization. In order to avoid the long-term complications associated with this prolonged status, called hyperglycemia (BGL > 180 mg/dL), subjects affected by T1D need exogenous insulin injections. On the other side, a not optimal and excessive insulin treatment can lead to hypoglycemia phenomena (BGL < 70 mg/dL) associated with short-term high-risk complications, such as coma.
The main goal of subjects affected by T1D is to maintain their BGL in the euglycemic range ([80, 140] mg/dL), avoiding both hypoglycemia and hyperglycemia phenomena. The so-called artificial pancreas (AP) is a closed-loop system composed of a subcutaneous (sc) glucose sensor, an sc insulin Manuscript  pump, and a control algorithm with the aim of defining an optimal insulin therapy to maintain the patient glucose in the euglycemic range or at least inside the safe range of [700, 180] mg/dL. Several research projects on AP were founded by the Juvenile Diabetes Research Foundation (JDRF), the European Commission (EC), and the National Institutes of Health (NIH) (see [1], [2], [3], [4], [5], [6], [7], [8], [9], [10]) to design an effective and efficient AP. This is a challenging goal since the sc-to-sc glucose-insulin system is characterized by significant interindividual and intraindividual variability, nonlinearities, and time delays due to the sc nature of both actuator and sensor. In the literature, different control techniques have been studied with this purpose such as proportional integrative derivative (PID) [11], [12], [13], [14], [15], fuzzylogic [16], [17], [18] controllers, and model predictive control (MPC) strategies [13], [19], [20], [21], [22], [23], [24], [25], [26], [27]. The PID algorithm analyzes the deviation of the measured glucose from the desired target to compute the insulin amount to deliver; the fuzzy algorithm quickly mimics the insulin doses computed by clinical experts based on monitoring data, while the MPC algorithm optimized the insulin delivery by predicting the future glucose levels via a glucose-insulin model (for a comprehensive review of the AP, see [28], [29], [30]). These algorithms have been validated extensively in silico due to the availability of reliable population simulators, such as the UVA/Padova simulator. In 2017, a new version of the UVA/Padova simulator (S2017) [31] was released, able to describe the glucose response to hypoglycemia, the counter-regulation [32], the intraday variability of the insulin sensitivity (IS), and the meal intestinal absorption rate that considers the circadian variability of IS and the dawn phenomena [33].
The linear saturated MPC (S-MCP) proposed in [34] obtained promising results both in vivo [9], [10], [35] and in silico [34], [36], [37], using the previous version of the UVA/Padova simulator (S2013) [32]. Although the glucose-insulin system has important constraints both on the input (pump saturation) and on the state (BGL limitations), this algorithm does not consider explicitly the constraints in order to avoid online optimization or memory demand of an explicit MPC. Some a posteriori saturations are then applied to consider the system bounds dealing with, at the same time, the relevant hardware and regulatory limitations that characterized the application in the past years. With the new advances in the development of portable devices with high computational capabilities, these restrictions can be relaxed and a constrained MPC (C-MPC) approach can be reconsidered. A C-MPC was proposed in [36] with the formulation of a finite-horizon optimal control problem (FHOCP). The C-MPC considers control bounds based on the clinical knowledge acquired during the clinical trials (see [8]) that were designed to avoid potentially dangerous situations such as, e.g., hypoglycemia or hyperglycemia phenomena, extremely aggressive reactions of the controller due to glucose rising and ketone bodies formation. A comparison between S-MCP and C-MPC [36] showed comparable performance of the two algorithms in silico when tested on S2013. For this reason, the S-MPC was preferred for clinical trials in the past years.
The goal of this article is to explore if, in view of the relaxation of the hardware and regulatory limitations and the availability of the S2017 more adherent to the real metabolic response of the diabetes population, the use of a constrained optimization can outperform the performances obtained with a posteriori saturations.
In this work, first, the clinically validated S-MPC (CvS-MPC) [34] is tested on the new and more challenging S2017, showing the limitation of the state-of-the-art solution. Then, the S-MPC and the C-MPC are tuned on the S2017 optimizing a new clinically based cost function to consider clinical performance indices such as in [38]. A new compact index of the quality of glucose regulation is also proposed by considering the clinical indices defined in [39] and [40]. Finally, the comparison between these three approaches in nominal and perturbed scenarios is reported.
This article is organized as follows. In Section II, the design of the S-MPC and C-MPC is reported in detail together with the calibration procedure to tune the MPCs. In Section III, the results are reported with the description of the simulation environment and the performance indices used to analyze them. Finally, the conclusions are drawn in Section IV.

II. MPC DESIGN
In this section, the S-MPC and C-MPC proposed in this work are formally described. The model used in both MPC strategies is the linearization of the average model of the UVA/Padova simulator: the CvS-MPC was designed using the population model included in S2013 [32], while the new approaches proposed in this work use the S2017 [31]. Note that, as in [34], the model is a 13-state linear model (n = 13) obtained via linearization from the metabolic nonlinear model of the average patient of each specific population. In particular, the linearization is performed around the equilibrium associated with the working point (G b , u b ) defined by the basal glucose (G b ) and the basal insulin (u b ) of the average in silico patient. The model is not personalized to the specific patient, while the control individualization is performed via the tuning of the MPC cost function. This procedure is introduced for both the strategies in Section II-C, including the new calibration approach based on new clinically based performance indices. All the MPC strategies proposed in this work implement a hybrid closed-loop schema, requiring the announcement of the meals with an estimation of their carbohydrate content by the patient. Then, part of the meal can be compensated by a meal bolus as feedforward action exploiting the knowledge of the conventional therapy and the remaining part can be modified by the MPC as needed. The detailed meal compensation schema can be found in [41].

A. Saturated Model Predictive Control
The S-MCP proposed in [34] uses a linear discrete-time model with sample time T s to predict future sc glucose (output) as a function of the subcutaneously injected insulin (input) and the meal intake (disturbance). It is represented by the following equations: where x(k) ∈ R n is the state, y(k) = CGM(k)−G b (mg/dL) is the difference between the sc glucose (CGM) and the glucose basal value (G b ), and u(k) = i(k) − u b (k) (pmol/kg) is the difference between the injected insulin (i) and its basal value (u b ) that could be time-varying. The insulin is normalized by the patient body weight (BW). d(k) (mg) represents the meal. The S-MPC predicts the future glucose profile using model (1) and the information about carbohydrates and insulin delivered to the patient. Based on this prediction, the optimal insulin therapy is obtained by minimizing the following cost function: where q > 0 represents the output weight to be tuned by the user and N is the prediction horizon. Moreover, ∥x(k + N )∥ P = x(k + N ) ′ P x(k + N ), where P, as suggested in [42], is a nonnegative definite matrix computed by solving the following discrete-time Riccati equation: and the following conditions hold. 1) y 0 (k) =ỹ(k) − G b (mg/dL) is the difference between the reference value (ỹ) of the sc glucose and the glucose basal value. 2) u 0 (t) =ũ(k)−u b (k) (pmol/kg) is the difference between the reference value (ũ) of the insulin profile and the insulin basal value. The referencesỹ andũ are specific clinical parameters known for each patient since they represent the desirable glucose target and the conventional insulin therapy defined by the physician, respectively. A glucose target can range between 80 and 130 mg/dL depending on the specific patient characteristics [43].
In order to avoid the online optimization or the computational and memory burden of an explicit MPC for constrained systems, no constraints are explicitly considered in the S-MPC formulation and the closed-form solution exploiting the Lagrange formula can be applied. In fact, defining the predicted vector as Y (k) = y(k + 1) · · · y(k + N − 1) x(k + N ) ′ it can be written as a function of the initial state x(k), the vector of future insulin administrations U (k), and the vector of future meals D(k). In particular, these vectors will be defined as ′ and the prediction vector results will be defined as with Defining the matrix Q and the reference vectors the cost in (2) can be replaced by The vector of future optimal inputs can be found zeroing the gradient of (9) and it is given by the following formula: which depends on the state at sample time k, the output and control variable future references, Y 0 (k) and U 0 (k), and the future vector, D(k).
Applying the receding horizon (RH) principle, the timeinvariant S-MPC control law can be derived as where the gains are The state x(k) of the model, in general, is not measurable, and thus, a Kalman filter (KF), which exploits the model knowledge and the information included in past insulin injections, is added.

1) Kalman Filter:
The KF is used to estimate the glucose-insulin state using past information about glucose, insulin, and carbohydrates. In order to design it, the discrete linear system (1) with sample time T s K has to be extended by considering the noises; in particular, it can be written as where is a multivariate zero-mean white Gaussian noise with covariance matrix V and the initial state x 0 = x(0) is assumed to be a zero-mean Gaussian random variable independent of v, where The steady-state KF can be written aŝ where and P is the unique positive definite solution of the algebraic Riccati equation According to the separation principle, the estimated statex is used in (12) and the control law can be written as By properly tuning Q KF and R KF , the controller can be made less sensitive to sensor noise.

2) A Posteriori Saturations:
The idea behind the a posteriori saturations is to apply to the S-MPC suggestion some input constraints based on solid clinical evidence in order to improve the control and increase the patient safety. The design of these constraints is not trivial; in fact, they can lead to hypoglycemia phenomena if a too high insulin amount is delivered, requiring an external carbohydrate administration to restore the healthy status of the patient. On the other hand, leaving the patient without insulin for long periods may lead to high glucose levels and associated complications. In order to avoid these situations, a series of input saturations has been designed.
a) Future-high insulin saturation: This saturation is added in order to obtain a less aggressive control law by exploiting the RH criterion. In particular, the idea is guaranteeing the possibility to reduce, if needed, the insulin injection with respect to the optimal suggestion computed at the previous iteration. Hence, if a future suggestion involves injecting less than a certain percentage (β) of the basal, the current suggestion will be reduced accordingly to the following formula: where u o (k) represents the S-MPC suggestion as defined in (17) and u o (k + i), in which i = 1, 2, . . . , N β − 1 is the (i + 1)th element of the vector U o (k), β > 0 is a tunable parameter, and N β ≤ N specifies the time interval where the future insulin is considered. Moreover, in order to obtain a less aggressive control law, the past suggested insulin (u(k − i), i = 1, 2, . . . , N HL ), the last insulin meal bolus (i Bl ), and the current patient's glycemia (y(k)) are used to augment the saturation criteria by imposing also this condition where α > 0 is a tunable parameter, y th is a defined glucose threshold, CF is the correction factor, a patient's clinical wellknown parameter, and N HL ≤ N specifies the time interval in which the past insulin is considered. b) Insulin pump saturation: The sc insulin delivery is subject to the physical limitations of the pump. For example, the injected insulin cannot be removed and a limited amount of insulin can be injected at each time k. The lower insulin constraint specifies the minimum quantity of injectable insulin, equal to −u b , since the model is linearized around the equilibrium point (u b , 0, G b ), while the maximum limit that can be suggested by the controller at time k will be reported asū k . The pump saturation can then be expressed as c) Ketone bodies saturation: If a patient experiences high glucose levels after being left without insulin for long periods, there is the possibility to encounter the ketone bodies formation. This saturation is meant to guarantee that a minimum quantity of insulin is always delivered to the patient when his/her glucose level exceeds a specific security BGL threshold, G. Thus, it can be defined as where G is the chosen security threshold and γ > 0 is a tunable parameter. Since the UVA/Padova simulator does not include the ketone bodies formation, the tuning of this constraint is entirely based on real data [34]. d) Maximum insulin variation saturation: It is added to obtain a smoother control law by limiting the maximum variation between the current controller suggestion and the previous one. It is active only during fasting periods and it can be defined as with ζ > 0 as tunable parameter. Then, the final insulin suggestion proposed by the S-MPC will be u S-MPC (k) = u mvsat (k).

B. Constrained Model Predictive Control
The FHOCP representing the C-MPC is defined as where U o (k) is the computed optimal control vector (10) and J (x(k), u(·), k) is the controller cost function (2). The saturations described in Section II-A2 have to be converted into constraints for the FHOCP. According to the RH criterion, the FHOCP must be solved at each sample time k, but only the first element of the optimal control vector is applied to the system. The FHOCP and the constraints have to be converted into a QP problem as described next. 1) QP Optimization Problem: Given the matrices A c , B c , and M c , and the vectors Y (k), U (k), D(k), Y 0 (k), and U 0 (k) defined for the S-MPC strategy, the cost function (2) can be rewritten as where only the terms that affect the minimization problem, since they depend on U (k), have been considered (arg min U (k) J = arg min U (k)J ). The system states vector x(k) ∈ R n is estimated by the KF described in Section II-A1. The tuning of the q parameter is obtained with the calibration procedure described in Section II-C. The FHOCP (22) can be converted in the QP problem where 2) Constraints: The a posteriori saturations presented in Section II-A2 are here rewritten as input constraints for the C-MPC: they are combined where possible to make the problem definition more compact.
a) Insulin constraint: This constraint includes the futurehigh insulin saturation and the insulin pump saturation. It can be expressed as with the same parameters used in the saturation definition. c) Maximum insulin variation constraint: This constraint corresponds to the maximum insulin variation saturation and can be summarized as with the parameter ζ already defined for the saturations case.
3) Implementation: The insulin constraints are implemented through the matrices ∈ R N ×1 , ∈ R N ×1 , A HL ∈ R N ×N , and B HL ∈ R N ×1 of (23) defined as . . .  ) and A HL has a number of ones diagonals equal to N HL .
The maximum insulin variation constraint is implemented by imposing The ketone bodies constraint requires a mixed-integer implementation, so in order to avoid it, this constraint is the only one applied as a saturation downstream the controller suggestions as in (21) where u o (k) is the first element of the U o (k) vector in (23) and u C-MPC (k) = u ket (k) is the final CMPC suggestion. The C-MPC has been implemented using the MATLAB 1 quadprog function.

C. MPC Calibration: Tuning of the Aggressiveness
The diabetes population presents a significant interindividual variability that requires patient-tailored AP systems. The limited amount of available information and the limitation about the feasible tests applicable to each subject make the individualization a not trivial procedure. Thus, in the MPC versions proposed in this work, the few critical parameters of the algorithm are kept fixed and the personalization is obtained by tailoring the cost function (2). This choice is justified by the low correlation between parameters such as the control horizon N or the KF weights with the single patients since they are mainly related to the quality of the sensor and the model included in the filter. In the proposed algorithms, the control horizon N is kept equal to 1 h and the KF weights (Q KF and R KF ) are set on the base of simulated and clinical insulin-meal-glucose profiles as reported in [34]. These matrices should be retuned if the quality of the model or the sensor changes significantly. Note that, as proposed in [42], the use of the solution of the Riccati equation in the final cost term [see (2)] provides a good approximation of the infinite-horizon cost. After these considerations, two elements can be personalized: the model and the parameter q. Since a patient-tailored model with high prediction performances is not available for the new in silico population, in this work, the aggressiveness of the MPC is individualized via the tuning of the parameter q.
The calibration procedure aims to find an appropriate tradeoff between a too mild control characterized by hyperglycemia and the risk of hypoglycemic episodes due to an aggressive regulation.
Exploiting the possibility to perform potentially dangerous test on the in silico patients of the UVA/Padova simulator, the tuning of q is done through the iterative procedure represented in Fig. 1 on the in silico population. Several one-day simulations are performed using different values of q for each patient, in order to find the optimal q o for the specific individual, based on a specific cost function. The updating strategy can be performed in different ways: e.g., minimizing the distance on the control variability grid analysis (CVGA) [44] with respect to an optimal point as reported in [41] or optimizing some clinical indices as proposed in this work. The updating law presented in [33] is used in this work for the update of the parameter q at each iteration exploiting clinically significant indices. It can be described as follows: where q(k) is the value of the parameter at the kth iteration, the constants k 1 , k 2 , and k 3 are the gains, G b T is the glycemic target, T th is a percentage of T c b acceptable for the patient, and T c b , T a , and G m are the performance indices. In particular, T c b is the percentage of time spent below a certain threshold T c b , T a is the percentage of time spent above 180 mg/dL, and G m is the average glucose concentration reached by the patient in the considered scenario. This new updating law is proposed to consider the clinical indices of satisfying glucose regulation as recognized by the major exponent of the AP community [39], [40].
At the end of this procedure, a vector of q o is obtained for the entire in silico population and it is correlated to some wellknown clinical parameters through a linear regression function. In [34], the selected clinical parameters were BW and the timeinvariant carbohydrate-to-insulin ratio (CR), while in view of the new time-variant population, additional parameters have to be considered. In particular, in this work, the values of the CR in the four daily intervals (CR 1 , CR 2 , CR 3 , and CR 4 ) have been added to the possible regressors vector φ(i). Other time-variant parameters could be considered for future improvement, such as u b and CF. The linear tuning rule for the weight q is defined as where q o is the patient's optimal weight computed during the calibration procedure, φ(i) is the vector of clinical parameters for the ith patient, θ is the parameter vector to be estimated, and ϵ(i) is an error term. Using linear stepwise regression, the most correlated parameters of φ and the values of vector θ are derived. Then, q o for a real patient j can be estimated as where α ∈ (0; 1] is a tunable parameter to increase the conservativeness of the controller. Both S-MPC and C-MPC have been calibrated using the S2017 [31], while the CvS-MPC used the regressors reported in [34] and was tuned on S2013.

A. Simulator and Scenarios
In this work, the S2017 [31] is used to test the proposed MPC algorithms. This simulator has been approved by the Food and Drug Administration (FDA) and used to test insulin therapies in silico as an alternative to animal testing since it demonstrated to be able to represent the glucose patterns observed in human studies on T1D patients [45]. The simulator is equipped with a virtual population composed by 300 subjects, with 100 adults, 100 adolescents, and 100 children, ensuring to represent the interpatient variability characteristic of the real T1D population. In this work, 100 adult subjects are considered. The S2017 [31] includes also the intrapatient variability, representing glucose variations of IS during the day and allowing a realistic simulation. The S2017 allows to implement multiple-day scenarios with intraday variability of IS and new distributions of CR at   TIME IN RANGE, T tr : TIME IN TIGHT RANGE, T a : TIME ABOVE RANGE, T b : TIME BELOW RANGE, T h : TIME  IN SEVERE HYPOGLYCEMIA, LBGI: LOW BLOOD GLUCOSE INDEX, AND HBGI: HIGH BLOOD GLUCOSE INDEX. FOR A  COMPLETE DESCRIPTION, SEE SECTION III-B breakfast, lunch, and dinner. This simulator has been used by more than 30 sites in academia and companies involved in T1D research, and more than 70 articles were published in peer-reviewed journals [31]. The measurement error model used in this work to simulate the CGM measurements on the S2017 is the autoregressive model proposed in [34], which was identified as exploiting 141 datasets relative to the 47 patients enrolled in the CAT AP@home trial [8]. This model describes the total measurement error, including wearing issues in addition to noise and drift usually considered.
All the algorithms considered in this work are tested on the 100 in silico adults of the S2017 undergoing two 30-h realistic in silico scenarios in nominal and robustness conditions. The patient's diet involves three meals per day: breakfast at 7:30, lunch at 14:00, and dinner at 20:00 containing 60, 50, and 70 g of CHO, respectively. The closed loop is activated after 2 h from the beginning of the simulation to collect enough data for the KF initialization. In order to represent a realistic scenario, the MPCs are tested also in robustness conditions adding a random uncertainty of ±50% about the carbohydrate content announced at mealtime. These settings are chosen in order to mimic the habits occurring in real life, such as those observed in [35]. In case of potentially dangerous low BGL values (BGL < 65 mg/dL), the protocol prescribes a rescue carbohydrate dose of 16 g, called hypo-treatment (ht). Two ht are separated by at least 30 min.

B. Performance Metrics, Statistical Analysis, and MPC Parameters
The performance metrics used in this work have been selected following the consensus endpoints for AP trial described in [39] and [40]. They include the average BGL Median [25th, 75th] percentiles for non-Gaussian distributed data and mean (±SD) otherwise are reported for the various indices. The gaussianity and homoscedasticity of the data distributions are evaluated through the Lilliefors test and twosample F-test, respectively. In order to assess the significant Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.   TIME IN RANGE, T tr : TIME IN TIGHT RANGE, T a : TIME ABOVE RANGE, T b : TIME BELOW RANGE, T h :  TIME IN SEVERE HYPOGLYCEMIA, LBGI: LOW BLOOD GLUCOSE INDEX, AND HBGI: HIGH BLOOD GLUCOSE INDEX. FOR  A COMPLETE DESCRIPTION, SEE SECTION III-B differences, the more appropriate statistical test is selected based on the properties of the data distributions. If at least one distribution is non-Gaussian, the Wilcoxon ranksum test is used; if both distributions are Gaussian and homoscedastic, a two-sample t-test is performed; otherwise, if the homoscedasticity is not satisfied, the two-sample t-test with Satterthwaites approximation is used.
A new compact glucose control index (GCI) is here proposed to have a unique index representing the overall performance. The GCI is defined as follows: and combines the most relevant indices (T r , T tr , T a , and T b ) with different weights in order to penalize more the time in hypoglycemia than in hyperglycemia. This index spans between −100%, the worse case in which the glucose remains below 70 mg/dL all the time, and +100%, the best case in which the patient is always in a tight range. Finally, the daily mean glucose profiles of the 100 in silico patients on the proposed scenario are reported for the CvS-MPC, S-MPC, and C-MPC configurations.
The CvS-MPC design is reported in [34]

C. Results
The CvS-MPC was tested in silico in [34] using S2013 and reporting in the worse case mean indices equal to A = 142.38 mg/dL and T a = 15.58% with T b = 1.38%, while it obtained median A = 160.2 mg/dL and mean T a = 33.3% with mean T b = 1.9% when tested in one-month clinical trial in free-living conditions [9]. The discrepancy between these results highlights the limitation of S2013 and it motivates the  Table I for the nominal scenario (sc-N). The patients have a percentage of time in the desired target range of 85.51% with 61.53% of the time in tight range, but the subjects experience both hyperglycemia and hypoglycemia: even if the average mean is satisfying (127.05 mg/dL), the population presents high SD (34.85 mg/dL) and excessive time above and below the safe range (T a = 7.67% and T b = 5.83%). In particular, 25% of the patients present a time in severe hypoglycemia (T h ) greater than 4.37%. The same consideration can be drawn by analyzing the results obtained with the meal variation scenario (sc-MV), as reported in Table II. The S-MPC limited the time above (T a = 5.03%) and does not present significant hypoglycemia (T b = 0%) for sc-N. The average glucose is slightly increased by 6.64% (135.49 mg/dL), but the time in target is increased to 94.17% (+10.13%) with 67.65% (+9.95%) in the tight range. The S-MPC is affected by a moderate decrease in the performance for the sc-MV (Table II), which is still in line with these considerations.
The C-MPC presents the best performance for both scenarios with respect to the other two algorithms, as reported in Tables I and II; it is able to obtain an average glucose of 128.4 mg/dL and reaches a time in target of 93.31% with 71.97% in tight target. The time above the range is decreased with respect to S-MPC by 31.41% (T a = 3.45%) and the time below the range remains equal to 0. All these improvements are statistically significant and are summarized by the GCI index shown in Fig. 2. It is important to notice that with respect to S-MPC, the C-MPC improves all the considered indices, with a slight increment of SD by 3.41% and a decrease of T r by 0.91%. Moreover, 25% of the patients report T b ≥ 3.15% in the nominal case, which can be considered an acceptable price as reported by the ADA guidelines [43] to lower the average glucose by 5.20%. It is important to note that, however, the time spent in severe hypoglycemia remains equal to 0 (T h = 0%). In the robustness case, T b exceeds the limit of 4% set as a goal by the ADA. However, this scenario is very challenging since it includes a wrong estimation of each meal amount of 50%; in these  worse case conditions, T b slightly above the threshold could be accepted. The glucose profiles of the CvS-MPC, S-MPC, and C-MPC are compared in Figs. 3 and 4 for the sc-N and sc-MV, respectively; it is clear that the C-MPC is able to outperform the other two techniques in both scenarios. From the glucose representation, it is possible to note that the most problematic conditions for the C-MPC occur after dinner with a higher risk of hypoglycemia. Analyzing in detail the characteristics of the patients that experience hypoglycemia phenomena with C-MPC, the average population model used in the MPC resulted not effective in terms of prediction performances. The prediction obtained for two patients is reported as examples in Figs. 5 and 6; it can be seen that for Patient A, the model always overestimates the glucose justifying the too aggressive behavior of the C-MPC that creates hypoglycemia phenomena. For Patient B, the glucose is overestimated only in a subinterval of the simulation (7:00-16:00) where hypoglycemia is present, while the prediction is in line with the real data elsewhere.
A possible solution to the too aggressive effect of the C-MPC on this limited subgroup of patients can be the use of a patient-tailored model, giving rise to a personalized AP. In fact, a less aggressive tuning of the MPC would also  worse the other performance indices of the C-MPC. The authors explored different identification approaches in [46], [47], [48], [49], and [50], but from the analysis of Fig. 6, it is possible to note that the glucose-insulin dynamics, for this patient, are well represented by the average model in part of the day and not elsewhere. This fact highlights the need of more complex models, such as multiple model predictors [47], in order to handle the time-variant nature of these patients. This identification approach is not trivial and is currently under study for the entire population; it represents a future development of this work.

IV. CONCLUSION
The new technological advances in the development of portable devices with high computational capabilities overcome the relevant hardware and regulatory limitations that characterized the AP applications in the past years. Unconstrained MPC solutions were preferred to constrained ones so far in order to avoid online optimization, based on the comparable results obtained with the unconstrained and constrained versions. The availability of a new simulator more adherent to the real-life scenario allows a new evaluation of the previously presented MPCs and to reconsider the improvements that the C-MPC can lead to the control problem. The new version of the UVA/Padova simulator, S2017, calls for retuning of the algorithms that have to consider the new time-variant dynamics.
In this work, a new calibration procedure based on clinically based performance indices is proposed in order to optimize the clinical indices recognized as indicators of good glucose control by the AP community. A new performance index is also reported to combine these statistics in a compact way easily evaluable by physicians. The S-MPC and C-MPC approaches are compared in order to evaluate the best choice considering the new features represented in the S2017. A comparison with the state-of-the-art clinically validated during monthly trials in free-living conditions is also reported for completeness. The C-MPC resulted to be the best approach to obtaining improvements in terms of average glucose, time spent in tight range, and time above 180 mg/dL. An acceptable increase of the time below 70 mg/dL is present for 25% of the patients, but the time in severe hypoglycemia remains equal to 0%. The practical relevance of this work consists in the statistical-based validation of the proposed control strategy for the entire diabetes population described by the UVA/Padova simulator. However, any stability and convergence analysis could be done only on a particular patient by assuming the knowledge of the individual parameters of his/her nonlinear model that is impossible to be satisfied in practice.
From a preliminary analysis of the patients characterized by not satisfactory control performances using the C-MPC, an inadequate prediction capability of the population model was detected and calls for patient-tailored models. Given the time-variant nature of the new S2017, the identification methods presented in the literature have to be reconsidered and adapted to these new characteristics. The patient-tailored models proposed in [46], [47], and [48] can be exploited to improve the C-MPC approach.