Abstract
Type 1 diabetes is an autoimmune disease that occurs when the immune system unintentionally attacks and damages cells in the pancreas, reducing the organ’s ability to produce insulin. An artificial pancreas is a technology that uses a pump to inject the appropriate amount of insulin subcutaneously after analysing information collected by sensors, including continuous blood glucose monitoring. Over the past thirty years, several methods for controlling an artificial pancreas have been investigated in clinical and simulation environments. The improved Hovorka model, a comprehensive nonlinear model that explains the effects of insulin on transport, disposal and endogenous synthesis in both accessible and inaccessible compartments for blood glucose control by insulin administration, is used for this research. The presented model has the characteristics of a switching nonlinear system. The work proposes to analyse different nonlinear control strategies for blood glucose regulation and shows the effectiveness of the linear model predictive control strategy compared to other nonlinear controllers used in the literature.
1. Introduction
Type 1 diabetes (T-1D), also known as juvenile diabetes or insulin-dependent diabetes, is one of the leading causes of death in adults and has become a global health problem. The incidence of diabetes mellitus has been steadily increasing for more than 50 years and has now reached crisis proportions. In 2019, diabetes affected (463 million) of the world’s population, and this number is expected to rise to (578 million) by 2030 and (700 million) by 2045 [1]. T-1D is a form of autoimmune disorder that causes the death of insulin-producing cells in the pancreas. As a result, insulin production is insufficient and exogenous insulin is required through daily injections. Insulin is released in response to a high blood glucose concentration (B-GC) and enables the transfer of glucose from the bloodstream into the body’s cells [2].
Hypoglycemia is a condition in which the B-GC is below the safe range, which can lead to a prolonged coma that eventually results in death. In contrast, hyperglycemia (B-GC is above the appropriate limit) leads to significant neurological damage, including visual impairment, cardiac arrest, renal failure and so on. Control of B-GC is crucial to avoid such fatal consequences [3]. The autoimmune loss of pancreatic beta cells leads to insulin insufficiency, so affected patients require lifelong insulin replacement treatment, where insulin is administered externally to mimic the effect of naturally produced insulin and maintain blood glucose levels in the normal range (70–140 mg/dL) [4]. To maintain B-GC despite daily perturbations, the artificial pancreas (AP) system was developed to automate data collection, decision making and insulin delivery for people with T-1D. An AP consists of three main components: sensors, algorithms for control and insulin infusion techniques (e.g., insulin pumps), as shown in Figure 1. The variables accessible throughout the control unit vary depending on the type of sensor used. Closed-loop glucose control for T-1D patients was first advocated over forty years ago [5].
Figure 1.
A representation of the essential elements of an artificial pancreas.
It has also been suggested that AP may be more effective than conventional insulin administration in regulating B-GC while reducing or eliminating the risk of hypoglycemia or hyperglycemia [6]. Previously, mathematical frameworks for diabetes were used to assess metabolic parameters such as insulin sensitivity. In recent years, various research groups have attempted to develop an AP using model-based controllers for managing T-1D. The mathematical model of the physiological process of absorption of insulin can be explained by a model-based controller for decision making to determine the appropriate insulin dose at a given time. In a model-based controller, a significant difference between the mathematical model and the real phenomena could lead to severe consequences for the patient, such as hyperglycemia or hypoglycemia [7,8].
The basic Hovorka model (BHM) is one of the proposed mathematical models for T1D that has been used in previous works for model-based controller design in artificial pancreas (AP) systems. While the dynamical system provides comprehensive equations useful for diabetes treatment, its representation of glucose–insulin interaction lacks mechanistic details compared to later refinements [9]. To maintain normal B-GC in T1D patients, nonlinear model predictive control (MPC) was incorporated into the BHM framework, with the MPC algorithm using the model’s predictions to optimise insulin delivery in real time [10]. Similarly, multiparametric MPC and proportional-integral (PID) controllers were used in [11,12] to achieve target values for B-GC using the BHM. The BHM was used to simulate B-GC levels in response to meal disturbances and insulin bolus perturbations [13]; however, its simplified assumptions may limit the accuracy of these predictions in real physiological scenarios.
In contrast, the improved Hovorka model (IHM) explicitly considers the link between insulin action and B-GC mass in accessible/inaccessible compartments. Its dynamic equations integrate all factors of glucose–insulin regulation and improve precision by better modelling physiological balance. The IHM outperforms the BHM in simulating glucose–insulin dynamics due to its refined structural assumptions. To maintain glycemic control, sliding mode control (SMC) and integral sliding mode controllers were deployed using the IHM, with gains optimized via genetic algorithms [14]. Similarly, MPC was applied to the IHM for B-GC regulation during meals [15], demonstrating its adaptability to advanced physiological models.
In [16], a dual-layer control method is used to provide a multivariate parameter fitting approach for long-term AP deployment. The multivariate optimisation strategy supported by Bayesian optimisation successfully solved the adaptation issue with an unknown objective function and constraints. The other solutions include: the active disturbance rejection control evaluated on the UVA/Padova T-1D simulator [17], the terminal synergetic controller [18], the robust fixed point transformation and the state feedback linearisation [19]. However, each control method has some limitations. For example, nonlinear approaches are often associated with higher computational complexity, which makes real-time implementation a challenge, especially in resource-constrained environments [7].
In recent years, researchers have also focused on the reliability of networked artificial-pancreas systems under communication constraints. Time delays, packet dropouts, and false-data-injection attacks can seriously compromise glycemic safety. For instance, a memory-based attack-tolerant T-S fuzzy control of networked artificial pancreas systems was proposed to mitigate false-data-injection effects [20]. Similarly, security threats and protective strategies have been investigated for the new generation of medical systems [21]. These studies highlight the growing need for control algorithms, such as the proposed MPC, that preserve robustness and feasibility under real-world disturbances and cyber-physical uncertainties.
The analysis performed on the IHM has shown that the model exhibits a switching behaviour that characterises the dynamics of the physiological systems involved in the process. The proposed research aims to investigate the effectiveness of the linear approximation of the IHM switching characteristic to enable the development of an MPC that balances control precision and computational efficiency. Switching dynamics is a system behaviour that changes in response to certain conditions, usually at certain threshold values of state variables. In physiological systems such as glucose regulation, these dynamics are crucial for the accurate simulation of the body’s physiological responses, which often exhibit nonlinear behavior. Models that incorporate switching dynamics can reflect abrupt changes in the control processes and thus increase their predictive power and informative value. By simplifying the controller design, the implemented technique can effectively stabilise the B-GC while minimising the computational effort generally associated with nonlinear MPC. In addition, the inclusion of soft and hard constraints on the input, output and insulin infusion rate improves control performance while maintaining health safety. These improvements suggest that the presented MPC method may be a more viable and efficient option for real-time B-GC regulation than existing nonlinear methods.
The innovations of the proposed study are highlighted in the following:
- Design of a linear MPC algorithm based on the switching dynamics of the IHM:The nonlinear switching properties of the IHM state space representation are leveraged through linear approximation in the proposed MPC. This approach maintains the prediction accuracy while significantly reducing the computational complexity compared to nonlinear MPC implementations.
- Analysis of constraint handling strategies: The effects of both hard and soft constraints on the control variables are systematically investigated through simulation studies, highlighting their impact on the overall control performance and system flexibility.
- Comprehensive performance evaluation: Detailed comparisons between the proposed controller and existing linear/nonlinear control approaches from the literature are included, providing quantitative evidence of improved effectiveness in glucose regulation.
- Perturbation and robustness analysis: The impact of meal-related perturbations and the robustness to parameter variations arising from patient variability are analyzed to demonstrate the effectiveness of the proposed solution under realistic operating conditions.
2. Improved Hovorka Model and Problem Statement
To overcome the limitations of the Hovorka model, Yusof et al. have presented in [22] a unique, physiologically appropriate mathematical representation of the glucose–insulin system using the Hovorka equations. The proposed model investigates the link between insulin activity and B-GC in accessible and inaccessible compartments. Differential equations are used to explain the relationship among each variable in the insulin and glucose control system, which increases accuracy and effectiveness while adequately modelling the equilibrium processes of the biological system [23]. The dynamic equations of the model, formalised using 8 state variables, are given in the following:
where insulin acts on both the accessible () and inaccessible () glucose compartments, via transport , disposal and endogenous synthesis . describes the plasma insulin concentration, while and represent the insulin sensitivity in the accessible and inaccessible compartments, respectively. is the control input, while , , , , , , , , for , , , and denote the model parameters which are described in Table 1. The non-insulin-dependent flow , and renal glucose disposal are defined in (5) and (6). The amount of glucose consumed by the blood vessels is represented by with a transfer rate of and can be expressed by the following equation:
where and represent the amount of bioavailable carbohydrate and the amount of carbohydrate consumed, respectively. G is the measurable B-GC and is expressed as:
where is the volume of insulin secretion and is the amount of insulin required for production in the bloodstream, defined as:
where represents the maximum duration of insulin absorption. The values of the model parameters considered in this work are given in Table 1; for further details, see [14].
Table 1.
Improved Hovorka model parameters.
Switching Dynamics in the Improved Hovorka Model
Analyzing the equations of the IHM (see Equation (1)), the dynamical system can be addressed as a switching nonlinear system that presents three different structures depending on the B-GC level. The non-insulin-dependent flow is denoted by , while the renal glucose disposal is given by and is defined as:
and,
According to the above values for and , there are three cases which need to be considered while analysing the state space equations:
- CASE I:
- CASE II:
- CASE III:
The IHM only exhibits nonlinearities in the equation in relation to B-GC (). After analysing the three cases and inserting the results obtained into the Equation (1), the nonlinearities are still present in the first case, while for the other two cases, it can easily be verified that a linear structure has been identified. The linearization point for the nonlinear case (CASE I) is chosen as , corresponding to the current value of the state variable, thereby enabling linearization along the actual system trajectory. The switching mechanism among the three linear models defined by Equations (7)–(9) is implemented according to the measured value of :
- Model 1 (Low-glucose region): mmol/L,
- Model 2 (Normal-glucose region): mmol/L,
- Model 3 (High-glucose region): mmol/L.
To avoid oscillations at the region boundaries due to noisy signals present in AP applications, a mmol/L hysteresis band is applied, that is, switching from Model 1 to 2 occurs only when mmol/L, and from Model 2 to 1 when mmol/L. This prevents chattering due to measurement noise. At the edges, continuity of the state vector is enforced, ensuring that insulin dynamics remain consistent across model transitions.
Control objective: The main control objective is to maintain the B-GC, represented as , at a certain reference level through the insulin injection and the rate of change of the control input The system must achieve this while complying with the physical and operational constraints [24,25]:
- Insulin infusion:
- B-GC:
- Insulin infusion rate:
Mathematically, the control problem involves the tracking of the desired output , where:
The control objective is to guarantee that approaches the reference value , i.e., , while satisfying the constraints of the system.
3. Methodology
3.1. Linearization and Discretization of the Improved Hovorka Model
To further simplify the model structure, the nonlinear system reported in CASE I has been linearised around a nominal operating point and . This yields a continuous-time linear state-space model.
The mathematical equation for CASE I is reported as follows:
- CASE I: (Nonlinear dynamics)The state variable representing the B-GC is defined as:For the sake of simplicity, we have assumed . Substituting all values of the model parameters into the above equation, we obtain:
The system is linearized around constant values and . Denoting the deviations from and as and , respectively one has . Taking into account that holds, the dynamics of take the form:
where H.O.T. represents the higher-order terms. Defining
and considering the constant term as a perturbation, the nominal (unperturbed) linearized dynamics can be formalised as:
Similarly, the output equation takes the form:
where:
In fact, (11) is the only equation of the IHM which includes a nonlinearity and linearization yields:
In general, the state space representation of the IHM varies according to the three cases of as shown in the following:
and . For the other two cases, the system is already linear and we can write the state matrices in a straightforward way. The controller is then designed by discretizing the continuous-time model of the system using a sampling time . The resulting discrete-time state-space model is utilized for the considered control algorithm. A representation of the dynamics of the discretized system can be expressed as follows:
where,
and x denotes the state of the linearized system. Here, , and represent the discretized system matrices. We selected as output the state variable that corresponds to the B-GC.
3.2. The Proposed Approach
MPC is a widely used control approach for artificial pancreas applications. It uses a mathematical model of individual blood glucose dynamics as a function of insulin availability and other parameters to predict future B-GC. This control technique generates personalized insulin dosing that can adapt to changing circumstances and perturbations while optimizing a cost function that includes control targets and constraints [26]. This study provides a formal linear-switching approximation of the IHM that explicitly characterizes the transitions among three physiological regimes. This enables the formulation of an equivalent piecewise-linear state-space model suitable for real-time constrained MPC synthesis. By simplifying the controller structure using a switching linear solution, this method can effectively maintain B-GC while reducing the computational overhead often associated with nonlinear MPC. In addition, the use of soft and hard constraints on input, output and insulin infusion rate improves control efficiency while maintaining health safety.
The previously formulated state space model can be used by the MPC to predict the time evolution of the system variables while using the control sequences to minimise the chosen cost function. In addition, the receding horizon technique calculates only the initial movement and uses the initial control sequence to generate the actuator commands [24,27].
The optimization problem solved by the MPC is formulated as follows:
where is the vector representing the variations in the control input across the control horizon at step k. Specifically, it illustrates how the insulin input varies at each stage, which is being improved to minimize the overall cost. is a mathematical expression that is obtained by multiplying matrices to calculate the predicted tracking errors. The prediction matrix H establishes the relationship between the control input and the future states of the system. Q is a weighting matrix that penalizes output deviations (e.g., B-GC) from the desired glucose level. R is a matrix that weights the magnitude of the control inputs (insulin doses). This matrix ensures that large and rapid fluctuations in insulin administration are avoided.
The term refers to the prediction error which is defined as follows:
where denotes the reference trajectory vector corresponding to the desired glucose concentration . are system constraints such as the insulin infusion rates together with appropriate blood glucose values, and the limits for the control inputs and outputs are represented by . The constraint matrix is denoted by W. This ensures that the solution complies with the physical constraints, e.g., that the blood glucose level remains within a safe range or that the upper or lower limit of the insulin infusion rates is not exceeded.
where
are accordingly lower and upper limit vectors for the control and state variable. The lower limit vector and the upper limit vector are defined as:
The lower constraint bound vector and upper constraint bound vector are considered as follows:
where
where n, np, nc, m and p represent the number of state variables, predictive horizon, control horizon, and numbers of inputs and outputs, respectively. I is the identity matrix and,
whereas,
The matrix H is reported in the following:
where is the identity matrix.
The proposed linear MPC formulation satisfies the standard MPC stability conditions discussed in [28] in a local sense. The controller minimizes a quadratic cost with weighting matrices and , yielding an optimal feedback law whose closed-loop eigenvalues lie strictly inside the unit circle, ensuring that is Schur stable. Under the assumption that the pair is stabilizable, this guarantees asymptotic stability of the closed-loop system. Although no explicit terminal constraint set is introduced, the neighborhood around the nominal equilibrium associated with the B-GC steady state effectively acts as a practically invariant region. Consequently, the proposed MPC scheme ensures local asymptotic stability of the closed-loop glucose–insulin dynamics, with bounded state trajectories and convergence of the B-GC toward the desired reference value. Moreover, the simulation results, as discussed in Section 4, corroborate the theoretical stability analysis, as all predicted glucose trajectories converge smoothly to the reference level without oscillations or constraint violations.
3.3. Implementation Using qpOASES
The MPC optimisation problem is solved using the qpOASES solver [29], a parametric active set solver [30] designed to effectively solve quadratic programming (QP) problems in real time. The parametric active set approach is a novel strategy for solving convex quadratic programming problems. The method consists of tracking the solution via a linear homotopy between a previously solved QP and the problem to be solved. Numerous interfaces to third-party software packages facilitate the application, even when using embedded computer hardware and microcontrollers typically used in artificial pancreas applications [31].
A scheme of the implementation of the MPC through the QP optimizer is shown in Figure 2. The block is used for solving QPs with time-varying Hessian and constraint matrices.
Figure 2.
Graphical representation of the MPC through qpOASES.
3.4. Baseline Approaches
In this study, we used three controllers as baselines to compare with the MPC: Double integral fast terminal sliding mode control (DFSM), presented in [32], the double integral sliding mode control (DIC), and PID, reported in [14]. DFSM is a nonlinear control strategy that combines the advantages of SMC as well as double integral action, resulting in robust performance and fast convergence, making it ideal for systems with significant nonlinearities and uncertainties. DIC is another nonlinear approach that improves stability and precision by integrating errors twice, resulting in minimised steady-state error and robustness [33]. The most common linear control strategy, PID control, balances proportional, integral, along with derivative action to achieve the desired control performance. Its simplicity and effectiveness in a variety of applications make it a desirable choice. However, PID control can present problems in nonlinear systems and often requires significant tuning of gains to achieve optimal results. By comparing these baseline controllers in the context of MPC, we attempt to illustrate the advantages and disadvantages of each technique under different control conditions.
4. Results and Discussion
In this section, we provide the simulation results and examine the effectiveness of the reported controllers under the given starting conditions and constraints.
The reference value mmol/L is taken into account by considering the safe range for B-GC between mmol/L (hypoglycemia) and mmol/L (hyperglycemia). The key performance indices evaluated include overshoot, settling time, integral time absolute error (ITAE) and integral time squared error (ITSE). The ITAE criterion is suitable for evaluating the overall dynamic response of the system and is considered as follows:
The ITSE criterion takes into account the squared error and provides information about the efficiency of the system at a steady state, given as:
The evaluation of the accuracy and transient behaviour of the proposed controllers is determined by comparing these indices. For the B-GC state variable , a dataset of 100 randomly selected initial values ranging from mmol/L to mmol/L was used. Whereas mmol/L and the remaining states up to 0 were considered for the following analyses [22,34]. This thorough investigation provides insight into the statistical performance of controllers and enables a robust assessment of their effectiveness in a variety of scenarios.
Figure 3 illustrates one representative simulation out of the 100 independent runs performed with randomly selected initial conditions within the safe B-GC range. The overall statistical evaluation of all runs is provided in Figure 4 and Figure 5, showing how the system responded to the initial conditions and constraints. An open-source qpOASES block was integrated into the MATLAB/Simulink R2024b environment to evaluate the proposed techniques for regulating B-GC in T-1D patients.
Figure 3.
Performance comparison for the considered control strategies (representative single run out of 100 simulations). Blue solid line: MPC; black dashed: DFSM; green dotted: DIC; magenta dash-dot: PID.
Figure 4.
Boxplot for ITAE under 100 random initial conditions within the safe range. Each box has the following features: The borders represent the 25th and 75th percentiles, the whiskers extend to the extremes of data points that the algorithm determines not to be outliers, and the outliers are indicated individually as ‘+’.
Figure 5.
Boxplot for ITSE under 100 random initial conditions within the safe range.
The number of future samples for which the controller attempts to minimise the costs is determined by . It must be large enough to capture transient responses and significant system dynamics, but must not be too large due to model mismatch and disturbances. A larger horizon increases both the performance and the computational requirements. The time window in which the control action is applied during optimisation is defined as the control horizon . As with , a longer control horizon increases both the computational effort and the performance. Therefore, suitable values should be defined that provide sufficient degrees of freedom to achieve satisfactory performance during the optimisation process. The hyperparameters used for the implemented controllers are listed in Table 2. The selection of MPC parameters follows standard tuning heuristics adapted to glucose–insulin dynamics. The prediction horizon corresponds to approximately 7 min of future system evolution, sufficient to capture insulin absorption delays. The control horizon is chosen shorter than to balance responsiveness and computational effort. Weighting matrices were tuned as and , where a larger R penalizes abrupt insulin changes and prevents oscillatory infusion rates. Practically, increasing Q accelerates convergence but may cause overshoot, while increasing R yields smoother but slower glucose regulation. The MPC with quadratic programming is used to work with linearised models that are simpler and discretised to increase computational efficiency. To achieve a discrete-time approximation, the model was discretised with a sampling time of .
Table 2.
Optimized parameter values for the MPC.
The time evolution of the B-GC for the considered control strategies is shown in Figure 3. The relevant characteristics for each controller are summarized in Table 3.
Table 3.
Performance indices: overshoot and undershoot (%), settling time (min.) and steady-state error (%). The % is evaluated with respect to the reference value imposed on the system.
Among the controllers evaluated, the DIC controller exhibited the largest overshoot of about 9.86%, whereas MPC showed a moderate overshoot of 5.40% with the smallest undershoot (1.60%) and the fastest settling time (155 min). DFSM and PID controllers deliver moderate maximum overshoots of around and , respectively. DFSM settles at 360 min and has a steady-state error of , while DIC settles at 400 min with an overshoot of and has a steady-state error of . In contrast to the other controllers presented, PID has the largest undershoot of around . These quantities have clear physiological implications. Overshoot and undershoot measure transient excursions above or below the reference glucose level, directly linked to temporary hyper- and hypoglycemic episodes. Settling time represents how rapidly the controller restores normoglycemia after perturbations, while the steady-state error quantifies the long-term deviation from the target. The proposed MPC achieves the shortest settling time with negligible steady-state error, indicating faster and safer convergence toward normoglycemia.
Both ITAE and ITSE have statistically performed over 100 simulations. These indicators are used as assessment tools to analyse the effectiveness of the controller in diabetes management. The ITAE emphasises error reduction during the initial settling process and penalises larger errors over time, as indicated in Equation (17). The ITSE, on the other hand, eliminates larger errors during the initial transient response, as defined in Equation (18). The ITAE and ITSE for the presented controllers are shown as boxplots in Figure 4 and Figure 5, respectively. The analysis illustrates that the MPC controller has the lowest ITAE and ITSE values, which is indicated by the narrow distribution of the data and the position of the median line in the lower quartile of the boxplot. This indicates that the MPC controller performs better than the other controllers for the indices analysed. After the MPC controller, the DFSM controller has higher ITAE and ITSE values, but still outperforms the DIC and PID controllers. In contrast, the PID controller has the highest ITAE and ITSE values of the four, suggesting less efficient error reduction. The boxplots show that MPC is the most efficient controller for error performance, followed by DFSM, while DIC and PID are less efficient. The main advantage of the proposed linear MPC lies in its reduced online computational burden compared with nonlinear MPC formulations while preserving comparable tracking accuracy. When implemented with qpOASES, the proposed controller requires approximately one-third of the computation time reported for nonlinear SMC-based solutions in [14], enabling feasibility for embedded processors of wearable AP devices. Moreover, unlike DFSM or DIC schemes, the linear MPC explicitly incorporates hard/soft constraints, guaranteeing physically safe insulin infusion within prescribed limits.
A typical control signal generated by the controllers presented for the simulation reported in Figure 3 is shown in Figure 6. The B-GC is high at the beginning, resulting in a certain value of insulin dosage. The infusion rates required to achieve the settling time shown in Table 3 for DIC, DFSM, MPC and PID are U/min, U/min, U/min and U/min, respectively.
Figure 6.
Control input as insulin infusion in patients for each proposed controller.
It is worth noting that although MPC injects a slightly higher insulin dose at the beginning, this behaviour stems from the controller’s predictive mechanism ensuring fast restoration of glucose levels while respecting the imposed hard bounds . MPC explicitly enforces physiological limits, preventing unsafe infusions even when the optimized action is more aggressive during transient phases.
In real applications, analysing the transient response and introducing safe operating ranges for certain state variables is essential to ensure the stability and safety of the control system, especially in situations with dynamic physiological processes.
4.1. Soft Constraints
In this section, we have identified specific behaviours of the controller that differ in dealing with hard and soft constraints. Soft constraints improve the feasibility of solving the optimisation problem. In situations where hard constraints may lead to an infeasible solution, soft constraints allow controlled violations to find an acceptable solution. In the case of adding soft constraints, the slack variable with penalty weight is inserted into the cost function for the problem under consideration, which can be expressed as follows:
where is chosen.
Figure 7 shows the behaviour of a state trajectory when it is subject to the effect of soft constraints and approaches the reference value. These soft constraints apply in particular to B-GC: the minimum value was set to mmol/L and the maximum value to mmol/L. The results show that when the trajectory converges, there is a case in which the soft boundary conditions are intentionally violated.
Figure 7.
Effects of soft constraints on the convergence of the B-GC state trajectory.
Regarding the hard constraints for the regulation of B-GC, in some cases, the controller arrived at infeasible solutions, e.g., in the case of tight constraints, which means that the controller did not succeed in solving the problem by fulfilling these hard constraints.
On the other hand, the controller is more flexible in the case of soft boundary conditions, but this was accompanied by a violation of the defined constraint mmol/L. Soft constraints are objectives that the controller prefers but does not necessarily have to fulfil, which gives it a certain flexibility to focus on the overall problem to be solved. The fact that the controller can function under these conditions, even though it occasionally violates the given constraints, shows that it can perform well even under slightly different conditions. This trade-off between constraint fulfilment and operational performance provides a useful insight into real-world applications of the controller and possible directions for developing better methods for dealing with challenging constraints.
4.2. Disturbance Analysis
To assess robustness, three meal-disturbance scenarios were simulated by introducing a glucose uptake term corresponding to 30 g, 60 g, and 80 g of carbohydrates at min, as shown in Figure 8. The MPC controller maintained B-GC within the safe range of – mmol/L, whereas the baseline methods, without any additional tuning, were unable to keep glucose within this threshold. Specifically, DIC and DFSM resulted in hyperglycemia, while the PID exhibited both hyperglycemic and hypoglycemic excursions. In contrast, the proposed controller rapidly compensated for the meal disturbance without violating insulin-delivery constraints. These results highlight the superior disturbance-rejection capability of the MPC framework. Future analyses will examine scenarios involving variable exercise and unannounced meals to further evaluate adaptive performance.
Figure 8.
Glucose regulation under 30 g, 60 g, and 80 g meal disturbances using the three baseline approaches (i.e., DIC, DFSM, PID) and the proposed MPC.
4.3. Robustness Analysis
To assess robustness to inter-patient variability, the main physiological parameters of the IHM were varied from their nominal values, following the ranges reported in [34]. Three virtual patients were generated, as summarized in Table 4. The results obtained with the proposed control strategy are shown in Figure 9, together with the baseline methods. Both DIC and DFSM drove the B-GC level dangerously close to the hypoglycemic threshold, and the PID controller even exceeded the lower bound. In contrast, MPC maintained all constraints without violations, demonstrating stable behavior despite parameter deviations. These findings confirm that the linear MPC framework effectively accommodates typical patient-to-patient variability without requiring retuning, an essential feature for clinical translation.
Table 4.
Model parameters defining the three virtual patients used in the robustness analysis.
Figure 9.
Comparison of the performance of the considered methods across three patient profiles, highlighting that the proposed approach achieves effective glucose regulation despite inter-patient variability.
5. Conclusions
The proposed study shows the comparison of different control techniques to regulate plasma glucose levels in T-1D patients within the normo-glycemic range and illustrates the efficacy of both linear and non-linear control strategies. The improved Hovorka model facilitates the implementation of MPC due to its mathematical formulation, which can be easily linearized, resulting in a control approach that outperforms more complex nonlinear strategies in the literature.
The implementation of the MPC-based approach using quadratic programming on the improved Hovorka model considers both hard and soft constraints. The comparative analysis was performed by implementing MPC together with DIC, DFSM and PID controllers. The evaluation was carried out through step response simulations, which allowed a consistent comparison of the dynamic performance of all control strategies under identical conditions.
Our investigation shows that the MPC controller performs better than the nonlinear DFSM and DIC controllers in terms of reducing ITAE and ITSE, minimising system overshoot and undershoot, and reducing steady-state errors. In addition, the linear PID controller proves to be the least efficient in terms of its performance indices, although it is widely used.
As far as the inclusion of constraints is concerned, there are cases in which the controller cannot provide feasible solutions when hard constraints are considered. On the other hand, the controller performed well in the case of soft constraints. This shows that the controller is able to deal with difficult constraints by introducing flexibility.
The present work relies on an in silico model. Implementation-related issues, including the impact of meal disturbances and inter-subject variability, have only been preliminarily explored. In addition, the linearization is based on nominal operating points that may vary in daily-life conditions. Future research will therefore address: (i) robust and adaptive extensions of the MPC to compensate for perturbations and parameter uncertainty; (ii) integration of time delays arising from sensor data acquisition and cybersecurity countermeasures; (iii) validation using the UVA/Padova simulator and clinical datasets to assess real-time applicability; and (iv) Implementation on microcontroller-based boards for hardware-focused analysis and evaluation of cost-effective real-time solutions.
Finally, future work will also include extending the proposed controller to other models with mathematical properties similar to those of the IHM.
Author Contributions
Conceptualization, methodology, investigation, and writing: I.S.M., S.K., L.P., M.S., R.C. and N.K.; software: I.S.M., S.K. and N.K.; Supervision and project administration: S.K., L.P., M.S. and R.C. All authors have read and agreed to the published version of the manuscript.
Funding
The authors did not receive support from any organization for the submitted work.
Data Availability Statement
Simulation data that support the findings of this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
The authors declare that they have no conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| T-1D | Type 1 Diabetes |
| B-GC | Blood Glucose Concentration |
| AP | Artificial Pancreas |
| BHM | Basic Hovorka Model |
| MPC | Model Predictive Control |
| PID | Proportional Integral Derivative |
| SMC | Sliding Mode Control |
| IHM | Improved Hovorka Model |
| QP | Quadratic programming |
| DFSM | Double Integral Fast Terminal Sliding Mode Control |
| DIC | Double Integral Sliding Mode Control |
| ITAE | Integral Time Absolute Error |
| ITSE | Integral Time Squared Error |
References
- Aschner, P.; Karuranga, S.; James, S.; Simmons, D.; Basit, A.; Shaw, J.E.; Wild, S.H.; Ogurtsova, K.; Saeedi, P. The International Diabetes Federation’s guide for diabetes epidemiological studies. Diabetes Res. Clin. Pract. 2021, 172, 108630. [Google Scholar] [CrossRef] [Scilit]
- Cinar, A. Advances in artificial pancreas control systems. J. Process Control 2019, 81, 221–222. [Google Scholar] [CrossRef] [Scilit]
- Cryer, P.E. Hypoglycemia, functional brain failure, and brain death. J. Clin. Investig. 2007, 117, 868–870. [Google Scholar] [CrossRef] [Scilit]
- Dixcy, S.D.; Nirojini, P.S.; Bharathi, J.; Shaz, A.A.; Durga, V.; Anjana, A. Artificial Pancreas’—A Game Changer. World J. Pharm. Res. 2022, 11, 92–107. [Google Scholar]
- Cinar, A. Artificial pancreas systems: An introduction to the special issue. IEEE Control Syst. Mag. 2018, 38, 26–29. [Google Scholar]
- Boughton, C.K.; Hovorka, R. Advances in artificial pancreas systems. Sci. Transl. Med. 2019, 11, eaaw4949. [Google Scholar] [CrossRef] [Scilit]
- Mughal, I.S.; Patanè, L.; Caponetto, R. A comprehensive review of models and nonlinear control strategies for blood glucose regulation in artificial pancreas. Annu. Rev. Control 2024, 57, 100937. [Google Scholar] [CrossRef] [Scilit]
- Lema-Perez, L.; Aguirre-Zapata, E.; Garcia-Tirado, J. Recent advances in mathematical models for the understanding and treatment of Type 1 Diabetes Mellitus. In Proceedings of the 2015 IEEE 2nd Colombian Conference on Automatic Control (CCAC), Manizales, Colombia, 14–16 October 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1–6. [Google Scholar]
- Som, A.M.; Mohd Sohadi, N.A.; Mohd Nor, N.S.; Ali, S.A.; Ahmad, M.A. Comparative Study between In-silico and Clinical Works on the Control of Blood Glucose Level in People with Type 1 Diabetes using Improved Hovorka Equations. bioRxiv 2022, 2022-09. [Google Scholar] [CrossRef] [Scilit]
- Hovorka, R.; Canonico, V.; Chassin, L.J.; Haueter, U.; Massi-Benedetti, M.; Federici, M.O.; Pieber, T.R.; Schaller, H.C.; Schaupp, L.; Vering, T.; et al. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol. Meas. 2004, 25, 905. [Google Scholar] [CrossRef] [Scilit]
- Kirubakaran, V.; Radkakrishnan, T.; Sivakumaran, N. Blood glucose concentration regulation in Type 1 Diabetics using multi model multi parametric model predictive control: An empirical approach. IFAC Proc. Vol. 2013, 46, 291–296. [Google Scholar] [CrossRef] [Scilit]
- Rahman, M.S.; Badal, F.; Alam, M.S.; Tanvir, M.; Khan, S.M.; Das, S. Effect of PID Controller on Blood Glucose Concentration for Varying Plasma Insulin, Independent Glucose Flux, Renal Glucose Clearance and Gut Absorption Rate. In Proceedings of the 2021 International Conference on Automation, Control and Mechatronics for Industry 4.0 (ACMI), Rajshahi, Bangladesh, 8–9 July 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1–6. [Google Scholar]
- Daud, N.A.M.; Mahmud, F.; Jabbar, M.H. Meal simulation in glucose-insulin reaction analysis using Hovorka model towards system-on-chip implementation. ARPN J. Eng. Appl. Sci. 2015, 10, 8927–8935. [Google Scholar]
- Mughal, I.S.; Patanè, L.; Xibilia, M.G.; Caponetto, R. Variable structure-based controllers applied to the modified Hovorka model for type 1 diabetes. Int. J. Dyn. Control 2023, 11, 3159–3175. [Google Scholar] [CrossRef] [Scilit]
- Som, A.M.; binti Mohd Yusof, N.F.M.; Ali, S.A.; Fuzil, N.S. Meal disturbance effect on blood glucose control for type 1 diabetes using improved Hovorka equations. Key Eng. Mater. 2019, 797, 158–167. [Google Scholar] [CrossRef] [Scilit]
- Shi, D.; Dassau, E.; Doyle, F.J. A multivariate Bayesian optimization framework for long-term controller adaptation in artificial pancreas. In Proceedings of the 2018 IEEE Conference on Decision and Control (CDC), Miami, FL, USA, 17–19 December 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 276–283. [Google Scholar]
- Cai, D.; Song, J.; Wang, J.; Shi, D. Glucose regulation for subjects with type 1 diabetes using active disturbance rejection control. In Proceedings of the 2019 Chinese Control Conference (CCC), Guangzhou, China, 27–30 July 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 6970–6975. [Google Scholar]
- Tašić, J.; Takács, M.; Kovács, L. Control Engineering Methods for Blood Glucose Levels Regulation. Acta Polytech. Hung. 2022, 19, 127–152. [Google Scholar] [CrossRef] [Scilit]
- Kovács, L.; Eigner, G.; Czakó, B.; Siket, M.; Tar, J.K. An opportunity of using Robust Fixed Point Transformation-based controller design in case of Type 1 Diabetes Mellitus. In Proceedings of the 2019 First International Conference on Societal Automation (SA), Krakow, Poland, 4–6 September 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–7. [Google Scholar]
- Yan, S.; Ding, L.; Cai, Y. Memory-based attack-tolerant T-S fuzzy control of networked artificial pancreas system subject to false data injection attacks. Fuzzy Sets Syst. 2025, 518, 109486. [Google Scholar] [CrossRef] [Scilit]
- Niu, Y.; Lam, S.K. Securing Automated Insulin Delivery Systems: A Review of Security Threats and Protectives Strategies. arXiv 2025, arXiv:2503.14006. [Google Scholar] [CrossRef] [Scilit]
- Yusof, N.F.M.; Som, A.M.; Ibrehem, A.S.; Ali, S.A. Parameter addition in interaction of glucose and insulin for type 1 diabetes. In Proceedings of the 2012 IEEE-EMBS Conference on Biomedical Engineering and Sciences, Langkawi, Malaysia, 17–19 December 2012; pp. 273–278. [Google Scholar]
- Som, A.M.; Yusof, N.F.M.; Ali, S.A.; Zawawi, N. Simulation work on blood glucose control for Type 1 diabetes using modified Hovorka equations. Pertanika J. Sci. Technol. 2019, 27, 1527–1538. [Google Scholar]
- Crecil Dias, C.; Kamath, S.; Vidyasagar, S. Blood glucose regulation and control of insulin and glucagon infusion using single model predictive control for type 1 diabetes mellitus. IET Syst. Biol. 2020, 14, 133–146. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Sala-Mira, I.; Diez, J.L.; Ricarte, B.; Bondia, J. Sliding-mode disturbance observers for an artificial pancreas without meal announcement. J. Process Control 2019, 78, 68–77. [Google Scholar] [CrossRef] [Scilit]
- Bequette, B.W. Algorithms for a closed-loop artificial pancreas: The case for model predictive control. J. Diabetes Sci. Technol. 2013, 7, 1632–1643. [Google Scholar] [CrossRef] [Scilit]
- Celikovic, S.; Kirchengast, M.; Rehrl, J.; Kruisz, J.; Sacher, S.; Khinast, J.; Horn, M. Model predictive control for continuous pharmaceutical feeding blending units. Chem. Eng. Res. Des. 2020, 154, 101–114. [Google Scholar] [CrossRef] [Scilit]
- Mayne, D.Q.; Rawlings, J.B.; Rao, C.V.; Scokaert, P.O. Constrained model predictive control: Stability and optimality. Automatica 2000, 36, 789–814. [Google Scholar] [CrossRef] [Scilit]
- Ferreau, H.; Potschka, A.; Kirches, C. qpOASES Webpage. 2007–2014. Available online: http://www.qpOASES.org/ (accessed on 15 November 2025).
- Ferreau, H.; Bock, H.; Diehl, M. An online active set strategy to overcome the limitations of explicit MPC. Int. J. Robust Nonlinear Control 2008, 18, 816–830. [Google Scholar] [CrossRef] [Scilit]
- Zavitsanou, S.; Chakrabarty, A.; Dassau, E.; Doyle, F.J. Embedded Control in Wearable Medical Devices: Application to the Artificial Pancreas. Processes 2016, 4, 35. [Google Scholar] [CrossRef] [Scilit]
- Mughal, I.S.; Patanè, L.; Caponetto, R. Blood Glucose Regulation in Type 1 Diabetes Through Optimized Nonlinear Control Strategies. In Proceedings of the 2023 IEEE International Conference on Metrology for eXtended Reality, Artificial Intelligence and Neural Engineering (MetroXRAINE), Milano, Italy, 25–27 October 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 593–598. [Google Scholar]
- Islam, Y.; Ahmad, I.; Zubair, M.; Shahzad, K. Double integral sliding mode control of leukemia therapy. Biomed. Signal Process. Control 2020, 61, 102046. [Google Scholar] [CrossRef] [Scilit]
- Hovorka, R.; Chassin, L.J.; Ellmerer, M.; Plank, J.; Wilinska, M.E. A simulation model of glucose regulation in the critically ill. Physiol. Meas. 2008, 29, 959. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).








