Next Article in Journal
A Surrogate-Assisted Intelligent Adaptive Generation Framework for Cost-Effective Coal Blending Strategy in Thermal Power Units
Next Article in Special Issue
SDD-LawLLM: Advancing Intelligent Legal Systems Through Synthetic Data-Driven Fine-Tuning of Large Language Models
Previous Article in Journal
A VANET, Multi-Hop-Enabled, Dynamic Traffic Assignment for Road Networks
Previous Article in Special Issue
Comprehensive Data Augmentation Approach Using WGAN-GP and UMAP for Enhancing Alzheimer’s Disease Diagnosis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Exploiting Personalized Observation Frequency for Proportional Integral Derivative-Based Diabetes Management

by
Phuwadol Viroonluecha
1,*,
Esteban Egea-Lopez
1 and
Jose Santa
2
1
Department of Information and Communications Technologies, Universidad Politécnica de Cartagena, 30202 Cartagena, Spain
2
Department of Electronics, Computer Technology and Projects, Universidad Politécnica de Cartagena, 30202 Cartagena, Spain
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(3), 560; https://doi.org/10.3390/electronics14030560
Submission received: 20 December 2024 / Revised: 21 January 2025 / Accepted: 28 January 2025 / Published: 30 January 2025

Abstract

:
People with type 1 diabetes (T1D) need to monitor their blood glucose level frequently and use insulin to regulate it. T1D typically develops in young individuals and requires lifelong insulin injections for glycemic control. High or low blood glucose levels can lead to serious health issues. To address the challenges posed by regular monitoring and manual insulin injections, automated glucose control methods have been developed. Various insulin regimes are used to manage blood sugar levels, such as traditional regimes that involve one or two injections per day or multiple daily injection therapy, which offers more flexibility in the diet and dosage but still requires patients to monitor their carbohydrate intake and insulin injections. A proportional integral derivative (PID) controller is an automated glucose control method that is commonly used in commercial and research settings due to its simplicity and robustness. However, despite its effectiveness, this method can be affected by external factors like food, exercise, and illness. This study proposes to set an individualized observation frequency (OF) per user for the PID controller for blood glucose control in T1D. Optimizing the OF improves the PID controller’s performance, maintaining or elevating median glucose levels. Tuning the OF offers a simple and effective enhancement for the widely used PID controller.

1. Introduction

Type 1 diabetes (T1D) is a medical condition that affects the immune system and causes the destruction of liver beta cells in the pancreas, which are responsible for producing insulin. This results in insulin deficiency, which prevents glucose from entering cells to be used for energy. Individuals with T1D must monitor their blood glucose levels frequently and use insulin to regulate their blood sugar levels. If blood glucose levels are too high (hyperglycemia) or too low (hypoglycemia), it can lead to severe health problems such as kidney failure, blindness, or heart attack. Therefore, individuals with T1D must take appropriate steps to avoid such complications. Basal–bolus (BB) insulin delivery is the standard method used to manage glucose levels in individuals with T1D [1]. Basal insulin represents continuous background insulin delivery, which mirrors the body’s innate insulin production between meals and during periods of rest. Its purpose is to sustain stable blood glucose levels during fasting periods. Bolus insulin, on the other hand, is administered in response to meals or to correct elevated blood sugar levels. It acts rapidly to reduce post-meal glucose spikes. The combination of basal and bolus insulin therapy aims to regulate blood glucose within a predefined target range, simulating the natural physiological response to food ingestion. The specific regimen and dosages are tailored to the individual’s diabetes type, lifestyle, and personal requirements. Continuous Glucose Monitoring (CGM) is a technology that provides real-time measurements of glucose levels [2]. It consists of a small sensor inserted under the skin, a transmitter that sends data to a receiver or smartphone, and an interface that displays glucose levels in real time. While BB insulin delivery combined with CGM technology can improve glucose management, manual insulin injections several times per day can be a burden, particularly for children at school [3] or the elderly.
To address the challenges posed by the need for regular monitoring and manual insulin injections for people suffering from T1D, several methods for automated glucose control have been developed. One such approach is closed-loop control with artificial pancreas (AP) systems, which completely remove the need for human intervention [4]. These systems incorporate an insulin pump and a control algorithm to regulate injections. The control algorithms employed in AP systems are typically either proportional integral derivative (PID) controllers or model predictive controllers (MPCs) [5,6,7,8,9,10,11]. Both approaches have proven to be effective and are widely used in practice. In particular, the PID controller is the most commonly used control algorithm in both commercial and research applications, due to its simplicity and robustness. However, despite their effectiveness, these methods are sensitive to external factors such as the food intake, exercise, and illness, which can significantly impact their control effectiveness. This underscores the importance of continuous monitoring and the need for robust algorithms that can account for these external factors to ensure optimal glucose control.
The solution proposed in this paper aims to enhance the performance of the PID controller in managing the blood glucose level. To address the limitations of PID control, we introduced a novel approach by incorporating an individualized OF into the PID algorithm. This involved determining the frequency of glucose observations which were fed to the PID and used in the control loop. This new OF hyperparameter was optimized for each patient based on their insulin response times. This work was partially presented in the PhD thesis of Phuwadol Viroonluecha [12].
By adjusting the OF, our solution capitalizes on the simplicity and robustness of the PID controller. Optimizing the OF offers a practical and effective means to enhance the PID controller’s performance and maintain optimal blood glucose levels. This approach not only improves glucose regulation for patients with T1D but also increases the time in range (TIR), which is the percentage of time that a person’s blood glucose levels are within a target range [13]. This is important because the TIR is a strong predictor of long-term health outcomes in T1D, such as heart disease, stroke, and kidney disease. By improving the TIR, this approach can help people with T1D live longer and healthier lives.
The remainder of this paper is organized as follows. Section 2 encompasses a review of glycemic control methods and their associated works. Section 3 and Section 4 describe our experimental setup in the T1D simulation and the methodology employed to determine the individual OF and generate data using the PID controller and the OF. This is followed by an overview of the results from our PID and OF experiments in Section 5. Then, we discuss the results obtained and present possible future directions in Section 6. Lastly, we conclude the paper in Section 7.

2. Background and Related Work

2.1. PID-Based Glycemic Control

Automatic insulin pumps with CGM have been developed to reduce the burden of glycemic control and deliver optimal insulin doses based on current blood glucose levels, allowing patients to live independently without worrying about administering insulin injections. Such systems are called closed-loop controllers or APs. Most commercially available insulin pumps use a PID algorithm to regulate blood glucose levels [7]. A PID controller is a feedback control system that adjusts the output of a system to maintain a stable blood glucose level by regulating the insulin release. The basic concept of PID control involves continuously monitoring a system’s output, comparing it to a desired setpoint, and making adjustments to bring the output closer to the setpoint. In the context of blood glucose control, the PID controller adjusts insulin delivery to maintain blood glucose levels within a target range. The PID controller comprises three components: the proportional component, which adjusts the output based on the current error between the desired and actual blood glucose levels; the integral component, which considers the accumulated error over time; and the derivative component, which predicts future errors based on the current rate of change. The PID controller combines these three terms to calculate the control signal that adjusts insulin delivery. The controller continually monitors blood glucose levels, calculates the error, and adjusts the control signal accordingly. By fine-tuning the proportional, integral, and derivative gains, the PID controller aims to achieve precise and stable blood glucose control. Although PID controllers can regulate blood glucose levels, they may face difficulties in adapting to changes in the food intake and require customization for individual patients [14,15].

2.2. Related Work

Most commercially available closed-loop controllers or APs use either PID or MPC algorithms to regulate blood glucose levels [6,7,16]. These controllers usually require the user to manually input information about their meal intake and exercise activity, making them hybrid closed-loop systems [7]. Examples of U.S. Food and Drug Administration (USFDA)-approved products that use PID controllers and MPCs include MiniMed systems, Control IQ, and Dexcom [17].
A drawback of PID controllers is that they do not handle variability in the food intake very well. They struggle to respond promptly when the patient eats, and as a result, they depend on receiving notifications when it is time for a meal [5,14]. On the other hand, MPCs use a mathematical model to predict and control blood glucose levels. Di Ferdinando et al. [10] and Borri et al. [11] modeled the endogenous insulin delivery rate (IDR) with nonlinear differential difference equations (DDEs). However, these models are usually only applied to type 2 diabetes mellitus (T2DM) patients. The use of MPCs in T1D blood glucose control has drawbacks due to their complexity, requiring precise patient models and facing computational challenges [18]. They are sensitive to model errors and struggle with long-term adaptation to changing dynamics [19]. Both PID and MPC-based commercial products use Predictive Low-Glucose Suspend (PLGS) technology to address overnight hypoglycemia by predicting glucose concentration trends and suspending insulin delivery before hypoglycemia occurs [7].
Therefore, while PID and MPC algorithms are commonly used, they have limitations. PID controllers, for instance, can depend on external inputs like meal notifications to obtain good performance, and MPC solutions can lead to high computational costs. Various improvements to basic PID control have been proposed, such as insulin feedback (IF) to increase efficiency [8,9]. IF, which involves adapting the insulin delivery to metabolic changes resulting from daily activities, has been proven to enhance the performance of PID control systems. In our current study, we aimed to explore the impact of varying the OF within an interval across different age groups and individuals. This investigation sought to determine if adjusting the OF can lead to a reduction in the time in range, as well as the further control of hyperglycemia and hypoglycemia. This approach builds upon our prior research [20], which demonstrated that using different OFs improved the results of reinforcement learning (RL) for blood glucose control. That work was further improved by removing the need for online observation in RL, which is a challenge in real-life applications, by using offline RL [21]. In this study, we compare PID-OF with the original PID and its variations, including those integrating the Harrison–Benedict meal generation algorithm and insulin feedback (IF). Additionally, we benchmark PID-OF against state-of-the-art machine learning-based approaches, such as Trajectory-PPO and Decision-PPO, to provide a more comprehensive evaluation of its performance. Our contribution introduces a PID with an OF hyperparameter, aiming to address these issues by adapting PID control to individualized patient dynamics, potentially improving its performance and reducing the complexity compared to traditional and machine learning approaches. Our approach reduces the need for external inputs such as carbohydrate (CHO) information, exercise, or illness considerations, potentially enhancing the control system’s autonomy and reducing the reliance on user-provided data.

3. Materials and Methods

In this study, the focus was on the utilization of PID parameters and meal schedules in experiments conducted using the Python version of the UVA/PADOVA T1D simulator, SimGlucose [22], along with the introduction of a novel hyperparameter, the OF. The study began with an assessment of the conventional PID parameters as presented by Fox et al. [14], which operate under a 5-minute observation interval (i.e., data points are observed every 3 minutes). In previous research [20], we saw that changing the OF of a RL agent could improve the glucose control performance, so we wanted to investigate if this also applies to PID control. However, using different OF values also required determining their optimal PID parameters. The optimization framework Optuna [23] was utilized to determine new PID parameters by adjusting the observation interval to the insulin response based on age. The aim of this study was thus to investigate and evaluate personalized OF values to enhance the regulation of blood glucose levels in virtual patients with diabetes. We compared the OF adaptation with other commonly used variations of the PID including the use of Harrison–Benedict meal generation [14] and IF [8]. The results and discussions of the experiments are presented to further explore the impact of individualized OF values on glucose control and highlight potential limitations.

4. Implementation Strategy

4.1. Environment and Experiment Setup

In order to determine the optimal PID parameters ( K p , K i , K d ) to control blood glucose levels in individuals with T1D without taking into account meal announcements, we conducted experiments using the Python version of the UVA/PADOVA T1D simulator, SimGlucose [22]. This virtual environment provided 30 patients, divided into three age groups, adults, adolescents, and children, with 10 patients per group. The CGM readings were taken every three minutes by default, with an insulin infusion corresponding to the CGM readings; that is, the original insulin infusion corresponded to a CGM reading every three minutes. However, with the OF hyperparameter, we could adjust and reduce the infusion frequency for individual patients. We limited the allowed BG level range to between 10 and 1000 mg/dL, and the simulations were terminated if the BG level exceed this range, signaling a catastrophic event.

4.2. Simulation Duration

The simulation period was set to 10 days, consistent with prior studies evaluating glycemic control systems [14,20,21,24,25]. This duration has been shown to effectively capture key performance metrics, including the TIR, hypoglycemia, and hyperglycemia, while balancing these with the computational feasibility. By focusing on 10-day evaluations, we could robustly assess the controller’s adaptability to day-to-day variability in blood glucose dynamics across diverse patient profiles. While longer simulation periods, such as 30-60 days, could provide additional insights, the 10-day period offered a practical trade-off between computational efficiency and robustness in the evaluation.

4.3. Evaluation of Ordinary PID for Type 1 Diabetes Blood Glucose Regulation

First, we adopted the PID parameters from Fox et al. as implemented in the SimGlucose environment, which enabled us to evaluate the baseline glucose control of virtual patients with T1D. The setpoint in this simulation was 112.517, which was the target BG level for the PID controller. This value is the optimal point in Clarke’s blood glucose risk index [26]. SimGlucose does not implement the different effects of basal and bolus insulin injections, so we treated them similarly in our study. According to Bergenstal [27], CGM systems can transmit glucose readings to a receiver, insulin pump, phone, or watch at intervals ranging from 1 to 15 min. However, the specific frequency of CGM readings and insulin infusion intervals may vary depending on the device and the clinical setting. In our study, we set the CGM reading and insulin infusion intervals to three minutes, meaning that a CGM reading was received every three minutes, and then insulin was infused based on that reading. This approach provided a relatively high-resolution representation of BG levels and insulin delivery. This experimental design was used as the baseline to understand the current effectiveness of PID-based BG control.

4.4. Optimizing PID for Blood Glucose Regulation with Harrison–Benedict Meal Generation Algorithm

It should be noted that in the original SimGlucose environment, meals are generated by a simple random probability for six meals, including breakfast, lunch, dinner, and three snacks. This approach can result in meal calculations that are highly fluctuating, not realistic, and difficult to control. Thus, to solve this issue, we incorporated the Harrison–Benedict meal generation algorithm, introduced in [14], into the SimGlucose environment. This algorithm calculates the estimated daily carbohydrate consumption for each individual based on their basal metabolic rate (BMR). The BMR is calculated based on factors such as sex, weight, height, and age. The estimated daily carbohydrates were divided into six potential meals: breakfast, lunch, dinner, and three snacks. The probability of occurrence and expected size of each meal was set to match the estimated BMR.

4.5. Optimizing PID for Blood Glucose Regulation with Insulin Feedback

To account for the fact that insulin in the blood can suppress subsequent insulin production (referred to as IF), we also considered a control method called the PID with IF (PID-IF) based on Huyett et al. [8]. This method takes into account the current plasma insulin concentration and modifies the insulin delivery accordingly. The formula used is
a d ( k ) = ( 1 + γ / K p i ) a k γ I p ( t )
where γ represents the degree of insulin delivery suppression by the current plasma insulin (assumed to be 0.5), K p i is the normalized insulin concentration in units (set to 1), and I p ( t ) is a model of insulin’s pharmacokinetics, adapted from Palerm et al. [9], given by
I p ( t ) = I B K p i ( τ 2 τ 1 ) ( e t / τ 2 e t / τ 1 )
In this equation, I B represents the insulin injected in the previous action, and τ 1 and τ 2 are time constants (measured in minutes) associated with insulin’s subcutaneous absorption, which are set to 55 and 70, respectively.

4.6. Selection of Optimization Algorithm for PID with Observation Frequency Hyperparameter

In addition to IF, we introduced a new hyperparameter called the OF, which determines the frequency of glucose observations and its impact on the insulin response. The introduction of this hyperparameter was motivated by the observation in our previous study [20] that it improved the learning process of RL agents. In that work, an OF was selected based on observations of the human insulin response time for 10 different insulin doses for each patient group, resulting in OF values of 45 min for adults, 30 min for adolescents, and 15 min for children. That is, the typical response time to insulin was of that order for each group. Now, our goal is to evaluate the use of the OF individualized to each patient. This new hyperparameter has the advantage that, if useful, it could be implemented easily on real devices.
Changing the OF required us to find new optimal PID parameters for each frequency. We used Optuna to find those parameters.
The optimization algorithms available in the Optuna framework are the Tree-Structured Parzen Estimator (TPE) [28], covariance matrix adaptation evolution strategy (CMA-ES) [29], and Gaussian process (GP) [30]. Next, we briefly describe these three algorithms:
The Tree-Structured Parzen Estimator [28] is a probabilistic machine learning algorithm that uses Bayesian optimization to determine the optimal parameters for a given problem. It is the most common optimization method in machine learning [31], particularly in hyperparameter tuning, as it offers a trade-off between exploration and exploitation by balancing the sampling of different regions of the search space.
The covariance matrix adaptation evolution strategy [29] is a derivative-free optimization algorithm that is particularly well suited for nonlinear and non-convex optimization problems. It uses information about the covariance matrix of the search space to guide the optimization process and is known for its ability to handle noisy and multi-modal optimization problems.
The Gaussian process [30] is a machine learning method for regression and classification problems. It models the distribution of a target variable as a Gaussian process, allowing for predictions about the target variable at any given input location. In the context of optimization, the GP can be used as an optimization algorithm to determine the optimal parameters for a given problem by modeling the relationship between the parameters and the objective function. The GP offers a powerful framework for global optimization and is particularly useful in high-dimensional optimization problems.
Therefore, first, optimization algorithm selection was conducted on adult#001 over a five-day evaluation period, with 1000 trials, to assess the efficacy of the optimization algorithms. Two sets of K p , K i , and K d ranges were used, as indicated in Table 1. The metric of euglycemia was employed to evaluate the performance of each algorithm. The results indicated that the TPE was most able to find the best set of hyperparameters when applied to PID-IF with a euglycemia score of 0.714, followed by the GP. Meanwhile, the CMA-ES terminated prematurely in the first set of PID ranges and was not able to find a good set of hyperparameters in the second set. Based on these findings, the TPE was selected as the method for determining the optimal PID values for each individual patient.
The TPE was selected for its ability to efficiently optimize high-dimensional, non-convex hyperparameter spaces, making it particularly well suited for the constraints of glycemic control simulations. The TPE prioritizes regions of the search space with higher likelihoods of improvement, which is advantageous given the computational demands of the problem. While additional validation across diverse patient profiles is warranted, its probabilistic model-based approach is expected to generalize well, providing robust optimization across various conditions.

4.7. Optimizing PID for Blood Glucose Regulation with Personalized Observation Frequency

After selecting the TPE optimization algorithm, we utilized the Optuna framework to find the optimal PID parameters for each patient. The original values of K p , K i , and K d from Fox ( F v ) were used as an upper bound, F v × 5 , and a lower boundary, F v × 0.5 , for PID-IF. The found parameters are shown in Table A1 in Appendix A. Thereafter, we conducted 1000 trials with the same PID parameter range as the previous step, but with the addition of the new parameter, the individualized OF for each patient in the range of 0 to 60 min. The evaluation metric for this step was the euglycemia percentage, and we selected the highest value for each patient. The results are shown in Table A2 in Appendix A. After this step, we found the optimal values for the four PID hyperparameters required by PID-OF, K p , K i , and K d and the OF. In the following section, we describe the evaluation process, where each patient was tested using the found parameters, and the system was compared with other PID variants.

5. The Evaluation of the System Using a Simulation

In this section, we describe how we performed an evaluation of each patient with the found parameters by running 20 episodes of insulin delivery control. Each episode simulated 10 days of glucose control using the implemented insulin delivery controller, and the metrics of interest included the episode length, percentage of euglycemia, hyperglycemia, and hypoglycemia, and Clarke’s risk index. We compared the following PID variants: the PID, which utilizes Fox’s original parameters for a 5-minute OF; PID-Har, which incorporates Harrison–Benedict meal generation; PID-IF, which adds IF and a group OF (by a group OF, we refer to the use of a different OF not determined per patient but for each age group, as discussed in Section 4.6) to PID-Har; and PID-OF, which extends PID-IF by individualizing the OF values for each patient. These methods were applied to all the virtual patients provided by SimGlucose, in the following three groups: adolescents, adults, and children. The results of these evaluations are analyzed and presented to demonstrate the impact of the OF in insulin delivery control for glucose control and to identify areas for improvement.

5.1. Episode Length

Table 2 presents the results of various methods used to control blood glucose levels in virtual patients with diabetes. The results indicate that for the child group, the standard PID method had an episode length of 9.6 days with a 95% confidence interval of 0.047, suggesting that only some episodes reached 10 days in the evaluation. On the other hand, the mean episode length was 10 days in the evaluation for all other methods and groups. This suggests that all PID control methods incorporating Harrison–Benedict meal generation were effective in controlling blood glucose levels for all groups.

5.2. Time in Range and Risk Index

We ran simulations on all available patients over 20 rounds, with each round lasting for 10 days. From Figure 1 and Figure 2, it can be observed that each method demonstrated improvement. The incorporation of Harrison–Benedict meal management, followed by IF and a personalized OF, resulted in an upward trend in the TIR, as indicated by the chart on euglycemia. In the case of the personalized OF in the PID-OF method, although the method’s performance was comparable to that of PID-IF, the TIR and fluctuations in hypoglycemia showed a decrease in comparison to the other methods.
The risk index, as demonstrated in Figure 3, also reflected the trend of the TIR, indicating that the integration of supportive methods led to a reduction in the risk index. Specifically, the PID-OF method demonstrated a notable decrease in the fluctuations in hypoglycemia in all age groups, leading to the conclusion that IF and the OF play a significant role in the regulation of blood sugar levels through insulin administration. Although the performance of PID-IF and PID-OF was similar, the personalized OF in PID-OF helps further in reducing the fluctuations in the risk index to a greater extent.

5.3. PID with Personalized Observation Frequency over 24 h Period for Each Patient

Figure A1, Figure A2, and Figure A3 in Appendix B show the average BG levels depicted with PID-OF for each patient over a period of 24 h. Three reference stripes with distinct colors have been used to differentiate the risk levels of the BG. The green stripe represents the TIR within the range of 70–180 mg/dL, while the orange stripe represents BG levels in the range of 181–250 mg/dL. The red stripe includes BG values below 69 mg/dL or above 250 mg/dL. The best performers in terms of BG control were adolescent#001 and child#005, as they maintained their BG level within the TIR for the entire day. On the other hand, several patients from all age groups were found to have spent some time outside the TIR, in either the orange or red zones. This observation highlights that the PID remains only a relatively effective method for BG control in all age groups.

5.4. Statistical Validation of PID-OF Performance

To validate the efficacy of the PID-OF approach, statistical analyses were conducted comparing key metrics with the baseline PID controller. An independent t-test was performed on metrics including the time in range (euglycemia), hyperglycemia, hypoglycemia, risk indices, and insulin dosage. From Table 3, it can be seen that PID-OF demonstrated statistically significant improvements in euglycemia (T-stat = −13.45, p < 0.001), hyperglycemia (T-stat = 14.81, p < 0.001), and the risk index (T-stat = 12.66, p < 0.001). Additionally, significant reductions were observed in the High Blood Glycemic Index (HBGI; T-stat = 13.02, p < 0.001), Low Blood Glycemic Index (LBGI; T-stat = 4.36, p < 0.001), and average daily insulin dosage (T-stat = −3.33, p < 0.001). Although improvements in hypoglycemia were not statistically significant (p = 0.071), PID-OF significantly reduced extreme glucose levels, including the minimum (BGMin) and maximum (BGMax) blood glucose. These findings underscore the potential of PID-OF to enhance glycemic stability, reduce risks associated with hyperglycemia and hypoglycemia, and optimize insulin administration, thereby improving the safety and efficacy of blood glucose management in type 1 diabetes.

5.5. Benchmarking PID-OF Against Transformer-Based Systems

To establish a more robust benchmark for the proposed PID-OF method, we compared its performance against recent transformer-based offline RL systems, namely Trajectory-PPO and Decision-PPO, as presented in prior studies [21]. These state-of-the-art models represent advanced machine learning-based approaches for BG management. The comparison was performed on key metrics, including the TIR, hyperglycemia, hypoglycemia, and risk index (RI), along with their respective confidence intervals (CIs). Table 4 summarizes the results.
The results demonstrated that PID-OF performs competitively with Trajectory-PPO and significantly outperforms Decision-PPO on most metrics. Specifically, we found the following:
  • Time in Range: PID-OF achieved a TIR of 67.94 % , nearly identical to that of Trajectory-PPO ( 68.27 % ) and substantially higher than that of Decision-PPO ( 50.48 % ).
  • Hyperglycemia: PID-OF exhibited 25.15 % hyperglycemia, which was higher than that of Trajectory-PPO ( 22.47 % ) but significantly lower than that of Decision-PPO ( 38.75 % ), reflecting its ability to maintain better upper glucose control compared to Decision-PPO.
  • Hypoglycemia: PID-OF demonstrated superior performance in minimizing hypoglycemia, achieving the lowest rate ( 6.91 % ) compared to Trajectory-PPO ( 9.26 % ) and Decision-PPO ( 10.76 % ).
  • Risk Index (RI): PID-OF achieved the lowest overall risk index ( 9.09 ), outperforming both Trajectory-PPO ( 10.41 ) and Decision-PPO ( 24.08 ).
These findings highlight that PID-OF, while simpler and more computationally efficient, delivers comparable or superior performance to advanced machine learning-based systems such as Trajectory-PPO and Decision-PPO. This underscores the potential of PID-OF as a practical and effective solution for real-time blood glucose management in T1D, particularly in scenarios where computational resources or large-scale training data are limited.

6. Discussion of Results

The results presented in Table 2 and the accompanying figures indicate that a conventional PID approach can effectively regulate blood glucose levels to above 60% of the TIR for adults and adolescents, but it fails in children, who experience these events more frequently, making it difficult to maintain optimal control for more than eight days. We can conclude that incorporating Harrison–Benedict meal generation is effective for all groups and especially for children. The incorporation of IF and the OF hyperparameter in the PID-OF method led to a reduction in the fluctuations in hypoglycemia and an upward trend in the TIR, as indicated by the euglycemia chart in Figure 1. The best performers in terms of BG control were adolescent#001 and child#005, who maintained their BG levels within the TIR for the entire day, as can be seen in Appendix B.
Our proposed PID-based blood glucose control system, based on the proposed PID-OF, performs in line with the PID system presented by Fox et al. [14] and Emerson et al. [25]. As summarized in Table 5, PID-OF outperformed the PID performance of Emerson et al., and comparing it with Fox et al., while the TIR was slightly better, our solution did not report any catastrophic event.
For a more comprehensive comparison, we reviewed recent studies on the commercial CGM and insulin pump systems from Medtronic, namely the Minimed 640G and 670G, which utilize the PID with IF [32] and have a reading and insulin delivery interval of 5 min [33]. The results for Minimed 640G in adults showed a TIR of about 59.5% with 4% hypoglycemia [34], while the Minimed 670G achieved a TIR of 67% with 2.8% hypoglycemia for adolescents, a TIR of 74% with 3.4% hypoglycemia for adults [35], and a TIR of 65% with 3% hypoglycemia for children [36]. Our results show that PID-OF kept the median at similar or higher levels for all groups and could improve the TIR for some patients. Notably, this approach only requires a simple adjustment that involves changing the OF for PID control, which is relatively straightforward and does not involve complex or challenging modifications. Implementing such an adjustment is feasible and manageable, making it a practical solution for improving blood glucose control.
Further benchmarking analysis was conducted against machine learning-based approaches, namely Trajectory-PPO and Decision-PPO. These methods, which represent state-of-the-art transformer-based offline RL systems, provide additional context for evaluating PID-OF’s performance. The results show that PID-OF achieved a comparable TIR of 67.94% to Trajectory-PPO’s 68.27%, while significantly outperforming Decision-PPO’s TIR of 50.48%. Furthermore, PID-OF demonstrated a lower hypoglycemia (6.91%) and risk index (9.09) compared to both Trajectory-PPO (9.26% hypoglycemia, 10.41 risk index) and Decision-PPO (10.76% hypoglycemia, 24.08 risk index). These comparisons underscore the robustness of PID-OF in delivering reliable blood glucose control with fewer computational demands than machine learning-based methods.
These findings demonstrate the effectiveness of the PID-IF and PID-OF methods for BG control. However, it should be noted that most individuals with diabetes aim for a TIR of at least 70% of readings [25]. Achieving this benchmark will require the further optimization of PID-OF and the exploration of alternative approaches, such as hybrid control strategies that integrate machine learning techniques like RL to dynamically adapt control parameters. Such an integration could enable PID-OF to respond more effectively to sudden changes in blood glucose dynamics, such as those caused by stress, illness, or physical activity, which were not accounted for in the current study.
An additional limitation of this study was the exclusion of external variables such as stress and physical exercise, which are known to significantly affect blood glucose dynamics. The current study utilized the SimGlucose simulator, which is based on the UVA/Padova model and does not account for these variables. Addressing these factors would require integrating alternative physiological models or extending the existing simulation framework. Future research should explore these extensions to evaluate the robustness of PID-OF under conditions that more closely mimic real-world scenarios. This line of investigation could also support further advancements toward achieving TIR goals and optimizing glycemic control strategies.
Moreover, the reliance on SimGlucose simulations introduced another limitation. While SimGlucose provides a robust platform for initial testing, it cannot fully replicate the complexities of real-world diabetes management. These include the variability introduced by patient-specific behaviors, environmental factors, and other physiological variables. To address this, future work should include validation using advanced simulators or real-world clinical trials to better understand the effectiveness of PID-OF in diverse scenarios.
Lastly, the dietary simplifications inherent in the use of the Harrison–Benedict meal generation algorithm must be acknowledged. Although this algorithm provides a structured and consistent approach to modeling meals, it does not capture the variability of real-world dietary patterns, such as irregular meal timings, varying carbohydrate content, and unpredictable snacking behavior. These oversimplifications may impact the robustness of the proposed method. Incorporating more sophisticated dietary models or patient-specific meal data in future studies would provide a more comprehensive evaluation of PID-OF’s performance under real-world dietary conditions.
By addressing these limitations, future research can improve the applicability and effectiveness of PID-OF, advancing the field of glycemic control and enhancing outcomes for individuals with diabetes.

7. Conclusions

Given the relevance of the PID in the design of commercial and research solutions aimed at creating artificial pancreas systems, this work evaluated the inclusion of additional features to enhance the traditional PID model and improve its performance. The approach followed an incremental method, starting with the integration of an enhanced meal intake algorithm, followed by the incorporation of an IF model. Finally, a new simple technique was proposed to assess the varying impact of the insulin delivery frequency on patients’ blood glucose levels at different observation frequencies. Therefore, in this paper, we investigated the impact of incorporating an individualized OF into the PID control algorithm for blood glucose control in T1D. We found that optimizing the OF can significantly improve the performance of the PID controller for some patients, and it can maintain similar or higher median blood glucose levels for all patients. Our results also showed that tuning the OF is a simple and effective method to enhance the performance of the PID controller, which is widely used due to its simplicity and robustness. While PID control is effective in many cases, achieving optimal blood glucose control can be challenging in dynamic and uncertain environments. To address these challenges, it is worth considering alternative approaches, such as RL methods. In a previous study [20], we explored the potential of RL for blood glucose control, highlighting its advantages and limitations. Given these findings, we will use PID methods as our baseline in future research as we continue to explore new and innovative methods for controlling blood glucose levels in patients with diabetes.

Author Contributions

P.V. and E.E.-L. conceived the methods, P.V. and E.E.-L. conducted the tests, P.V., E.E.-L. and J.S. analyzed the results, and P.V. and E.E.-L. wrote the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Grant TEC2017-84423-C3-2-P (ONOFRE-2), funded by the Agencia Estatal de Investigación (AEI) and co-financed by the European Regional Development Fund (ERDF), Grant PID2020-112675RB-C41 (ONOFRE-3), funded by the Ministerio de Ciencia e Innovación (MCIN) and the Agencia Estatal de Investigación (AEI), and Grant RYC-2017-23823, funded by the Ministerio de Ciencia e Innovación (MCIN), the Agencia Estatal de Investigación (AEI), and co-financed by the European Social Fund (ESF) under the initiative “ESF Investing in your future”. The work of Phuwadol Viroonluecha was supported by the Predoctoral Grant PRE2018-084260, funded by the Agencia Estatal de Investigación (AEI) under the Formación de Personal Investigador (FPI) program. Additional funding was provided by Grant CNS2022-136150 (WILLIOT) and Grant PID2023-148104OB-C42 (ONOFRE-4), funded by the Ministerio de Ciencia e Innovación (MCIN), the Agencia Estatal de Investigación (AEI), and co-financed by the European Regional Development Fund (ERDF). Finally, this work was also supported by Grant 22228/PDC/23 (MovIoT), funded by the Fundación Séneca—Agencia de Ciencia y Tecnología de la Región de Murcia.

Data Availability Statement

Data for this article can be found online at https://doi.org/10.17605/OSF.IO/GJ783.

Acknowledgments

This work was partially presented in the PhD thesis of Phuwadol Viroonluecha [12].

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Parameters

Table A1. Optimal PID parameters with age group OF obtained using Optuna.
Table A1. Optimal PID parameters with age group OF obtained using Optuna.
Patient K p K i K d
adolescent#001−0.000291775−1.42915 ×   10 7 −0.01999
adolescent#002−0.000428201−1.43021 ×   10 7 −0.00987
adolescent#003−0.000187463−6.29647 ×   10 8 −0.00785
adolescent#004−0.000188523−1.12114 ×   10 7 −0.00912
adolescent#005−5.23529 ×   10 5 −1.76362 ×   10 7 −0.01109
adolescent#006−8.65727 ×   10 10 −2.96707 ×   10 11 −0.01167
adolescent#007−1.03457 ×   10 7 −8.77117 ×   10 8 −0.00846
adolescent#008−3.34156 ×   10 10 −8.98967 ×   10 12 −0.00927
adolescent#009−0.000118396−1.73358 ×   10 7 −0.00774
adolescent#010−2.237 ×   10 10 −5.3542 × 10−12−0.01215
adult#001−0.000255779−8.80847 ×   10 8 −0.01967
adult#002−0.000762343−1.35421 ×   10 7 −0.01966
adult#003−4.93202 ×   10 10 −1.32181 ×   10 7 −0.01304
adult#004−0.000187846−1.10494 ×   10 7 −0.00892
adult#005−0.000401528−1.12032 ×   10 7 −0.01999
adult#006−0.001015064−1.02666 ×   10 6 −0.02417
adult#007−0.002457841−9.76956 ×   10 6 −0.0179
adult#008−0.000164119−1.23146 ×   10 7 −0.01839
adult#009−0.0001885−1.64768 ×   10 7 −0.01997
adult#010−0.000165964−3.62289 ×   10 8 −0.01791
child#001−4.32616 ×   10 5 −4.99315 ×   10 7 −0.0012
child#002−2.43848 ×   10 5 −1.19047 ×   10 8 −0.0063
child#003−0.000114261−2.2317 ×   10 8 −0.0019
child#004−0.000122317−9.84608 ×   10 7 −0.00171
child#005−0.000144505−2.35487 ×   10 8 −0.01025
child#006−8.50475 ×   10 5 −4.07014 ×   10 7 −0.0017
child#007−6.38112 ×   10 5 −7.54145 ×   10 8 −0.00464
child#008−6.03971 ×   10 5 −1.14231 ×   10 7 −0.00226
child#009−6.68974 ×   10 5 −1.83219 ×   10 7 −0.002
child#010−8.80842 ×   10 6 −5.85201 ×   10 8 −0.00395
Table A2. PID parameters and personalized OF in minutes for each patient.
Table A2. PID parameters and personalized OF in minutes for each patient.
Patient K p K i K d OF
child#001−0.00015−1.50 ×   10 6 −0.0008427
child#002−8.69 ×   10 6 −1.10 ×   10 6 −0.0058818
child#003−0.00027−2.81 ×   10 7 −0.0015127
child#004−0.0001−8.21 ×   10 7 −0.001819
child#005−0.0009−6.29 ×   10 7 −0.0090515
child#006−0.00034−3.06 ×   10 6 −0.0009536
child#007−0.00033−1.73 ×   10 6 −0.0028121
child#008−0.00025−1.15 ×   10 6 −0.0015327
child#009−0.00021−2.13 ×   10 6 −0.0009118
child#010−4.51 ×   10 5 −2.85 ×   10 7 −0.002319
adolescent#001−0.00068−1.77 ×   10 6 −0.0193212
adolescent#002−0.00085−1.13 ×   10 6 −0.0071233
adolescent#003−0.00045−2.38 ×   10 6 −0.0031218
adolescent#004−0.00088−2.60 ×   10 6 −0.0058327
adolescent#005−0.00013−1.85 ×   10 6 −0.0092415
adolescent#006−1.48 ×   10 9 −6.18 ×   10 10 −0.011889
adolescent#007−4.06 ×   10 6 −1.95 ×   10 6 −0.0057318
adolescent#008−3.37 ×   10 9 −1.40 ×   10 10 −0.0101821
adolescent#009−5.97 ×   10 5 −2.87 ×   10 6 −0.0060215
adolescent#010−3.61 ×   10 9 −1.03 ×   10 10 −0.011849
adult#001−0.0034−7.01 ×   10 7 −0.0149260
adult#002−0.00117−2.71 ×   10 6 −0.0228633
adult#003−1.22 ×   10 9 −3.93 ×   10 6 −0.0099318
adult#004−0.00038−2.40 ×   10 6 −0.0035515
adult#005−0.00059−2.23 ×   10 6 −0.0200130
adult#006−0.00132−4.03 ×   10 6 −0.0132718
adult#007−0.00012−1.37 ×   10 5 −0.0085821
adult#008−0.00155−3.28 ×   10 7 −0.0136645
adult#009−0.00076−3.63 ×   10 6 −0.0174624
adult#010−2.97 ×   10 5 −3.36 ×   10 6 −0.0130118

Appendix B. The Average Blood Glucose Level over a Day

Figure A1. Average blood glucose level of adolescents over day obtained by using PID-OF method.
Figure A1. Average blood glucose level of adolescents over day obtained by using PID-OF method.
Electronics 14 00560 g0a1
Figure A2. Average blood glucose level of adults over day obtained by using PID-OF method.
Figure A2. Average blood glucose level of adults over day obtained by using PID-OF method.
Electronics 14 00560 g0a2
Figure A3. Average blood glucose level of children over day obtained by using PID-OF method.
Figure A3. Average blood glucose level of children over day obtained by using PID-OF method.
Electronics 14 00560 g0a3

References

  1. Attri, B.; Goyal, A.; Gupta, Y.; Tandon, N. Basal-Bolus Insulin Regimen for Hospitalised Patients with COVID-19 and Diabetes Mellitus: A Practical Approach. Diabetes Ther. 2020, 11, 2177–2194. [Google Scholar] [CrossRef] [PubMed]
  2. Yu, J.; Cho, J.H.; Lee, S.H. The era of continuous glucose monitoring and its expanded role in type2 diabetes. J. Diabetes Investig. 2023, 14, 841–843. [Google Scholar] [CrossRef] [PubMed]
  3. Berget, C.; Driscoll, K.A.; Lagges, A.; Lange, S.; DiMeglio, L.A.; Hannon, T.S.; Woerner, S.E.; Iturralde, E.; Barley, R.C.; Hanes, S.; et al. Optimizing the use of continuous glucose monitoring in young children with type 1 diabetes with an adaptive study design and multiple randomizations. Contemp. Clin. Trials 2019, 82, 60–65. [Google Scholar] [CrossRef] [PubMed]
  4. Åm, M.K.; Teigen, I.A.; Riaz, M.; Fougner, A.L.; Christiansen, S.C.; Carlsen, S.M. The artificial pancreas: Two alternative approaches to achieve a fully closed-loop system with optimal glucose control. J. Endocrinol. Investig. 2023. [Google Scholar] [CrossRef]
  5. Bothe, M.K.; Dickens, L.; Reichel, K.; Tellmann, A.; Ellger, B.; Westphal, M.; Faisal, A.A. The use of reinforcement learning algorithms to meet the challenges of an artificial pancreas. Expert Rev. Med Devices 2013, 10, 661–673. [Google Scholar] [CrossRef]
  6. Trevitt, S.; Simpson, S.; Wood, A. Artificial Pancreas Device Systems for the Closed-Loop Control of Type 1 Diabetes. J. Diabetes Sci. Technol. 2016, 10, 714–723. [Google Scholar] [CrossRef] [PubMed]
  7. Schoelwer, M.J.; DeBoer, M.D. Artificial Pancreas Technology Offers Hope for Childhood Diabetes. Curr. Nutr. Rep. 2021, 10, 47–57. [Google Scholar] [CrossRef] [PubMed]
  8. Huyett, L.M.; Dassau, E.; Zisser, H.C.; Doyle, F.J. Design and Evaluation of a Robust PID Controller for a Fully Implantable Artificial Pancreas. Ind. Eng. Chem. Res. 2015, 54, 10311–10321. [Google Scholar] [CrossRef]
  9. Palerm, C.C. Physiologic insulin delivery with insulin feedback: A control systems perspective. Comput. Methods Programs Biomed. 2011, 102, 130–137. [Google Scholar] [CrossRef]
  10. Ferdinando, M.D.; Pepe, P.; Gennaro, S.D.; Palumbo, P. Sampled-Data Static Output Feedback Control of the Glucose-Insulin System. IFAC-PapersOnLine 2020, 53, 3626–3631. [Google Scholar] [CrossRef]
  11. Borri, A.; Pola, G.; Pepe, P.; Benedetto, M.D.D.; Palumbo, P. Symbolic Control Design of an Artificial Pancreas for Type-2 Diabetes. IEEE Trans. Control Syst. Technol. 2021, 30, 2131–2146. [Google Scholar] [CrossRef]
  12. Viroonluecha, P. Evaluation of Blood Glucose Level Control in Type 1 Diabetic Patients Using Online and Offline Reinforcement Learning. Ph.D. Thesis, Universidad Politecnica de Cartagena, Cartagena, Spain, 2023. [Google Scholar]
  13. Timmons, J.G.; Boyle, J.G.; Petrie, J.R. Time in Range as a Research Outcome Measure. Diabetes Spectr. 2021, 34, 133–138. [Google Scholar] [CrossRef]
  14. Fox, I.; Lee, J.; Pop-Busui, R.; Wiens, J. Deep reinforcement learning for closed-loop blood glucose control. In Proceedings of the Machine Learning for Healthcare Conference, Virtual, 7–8 August 2020; pp. 508–536. [Google Scholar]
  15. Ngo, P.D.; Wei, S.; Holubová, A.; Muzik, J.; Godtliebsen, F. Control of Blood Glucose for Type-1 Diabetes by Using Reinforcement Learning with Feedforward Algorithm. Comput. Math. Methods Med. 2018, 2018, 1–8. [Google Scholar] [CrossRef] [PubMed]
  16. Nimri, R.; Grosman, B.; Roy, A.; Nir, J.; Shvalb, N.F.; Kurtz, N.; Loewenthal, N.; Gillon-Keren, M.; Muller, I.; Atlas, E.; et al. Feasibility Study of a Hybrid Closed-Loop System with Automated Insulin Correction Boluses. Diabetes Technol. & Ther. 2021, 23, 268–276. [Google Scholar] [CrossRef]
  17. Biester, T.; Tauschmann, M.; Chobot, A.; Kordonouri, O.; Danne, T.; Kapellen, T.; Dovc, K. The automated pancreas: A review of technologies and clinical practice. Diabetes, Obes. Metab. 2021, 24, 43–57. [Google Scholar] [CrossRef]
  18. Chandrasekhar, A.; Padhi, R. Optimization Techniques for Online MPC in Android Smartphones for Artificial Pancreas: A Comparison Study. IFAC-PapersOnLine 2022, 55, 561–566. [Google Scholar] [CrossRef]
  19. Lopez-Zazueta, C.; Stavdahl, O.; Fougner, A.L. Low-Order Nonlinear Animal Model of Glucose Dynamics for a Bihormonal Intraperitoneal Artificial Pancreas. IEEE Trans. Biomed. Eng. 2022, 69, 1273–1280. [Google Scholar] [CrossRef] [PubMed]
  20. Viroonluecha, P.; Egea-Lopez, E.; Santa, J. Evaluation of blood glucose level control in type 1 diabetic patients using deep reinforcement learning. PLOS ONE 2022, 17, e0274608. [Google Scholar] [CrossRef]
  21. Viroonluecha, P.; Egea-Lopez, E.; Santa, J. Evaluation of Offline Reinforcement Learning for Blood Glucose Level Control in Type 1 Diabetes. IEEE Access 2023, 11, 104643–104655. [Google Scholar] [CrossRef]
  22. Xie, J. Simglucose v0. 2.1. 2018. Available online: https://github.com/jxx123/simglucose (accessed on 27 January 2025).
  23. Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A Next-generation Hyperparameter Optimization Framework. In Proceedings of the 25rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 2623–2631. [Google Scholar]
  24. Fox, I.; Wiens, J. Reinforcement Learning for Blood Glucose Control: Challenges and Opportunities. In Proceedings of the Reinforcement Learning for Real Life, An ICML Workshop, Long Beach, CA, USA, 14 June 2019. [Google Scholar]
  25. Emerson, H.; Guy, M.; McConville, R. Offline Reinforcement Learning for Safer Blood Glucose Control in People with Type 1 Diabetes. J. Biomed. Inform. 2023, 142, 104376. [Google Scholar] [CrossRef] [PubMed]
  26. Clarke, W.; Kovatchev, B. Statistical Tools to Analyze Continuous Glucose Monitor Data. Diabetes Technol. & Ther. 2009, 11, S–45–S–54. [Google Scholar] [CrossRef]
  27. Bergenstal, R. Understanding Continuous Glucose Monitoring Data. ADA Clin. Compend. 2018, 1, 20–23. [Google Scholar] [CrossRef]
  28. Bergstra, J.; Bardenet, R.; Bengio, Y.; Kégl, B. Algorithms for hyper-parameter optimization. Adv. Neural Inf. Process. Syst. 2011, 24, 2546–2554. [Google Scholar]
  29. Hansen, N. The CMA evolution strategy: A comparing review. Towards a New Evolutionary Computation: Advances in the Estimation of Distribution Algorithms; Springer: Berlin/Heidelberg, Germany, 2006; pp. 75–102. [Google Scholar]
  30. Rasmussen, C.E.; Williams, C.K. Gaussian Processes for Machine Learning; MIT Press: Cambridge, MA, USA, 2006. [Google Scholar]
  31. Rong, G.; Li, K.; Su, Y.; Tong, Z.; Liu, X.; Zhang, J.; Zhang, Y.; Li, T. Comparison of Tree-Structured Parzen Estimator Optimization in Three Typical Neural Network Models for Landslide Susceptibility Assessment. Remote Sens. 2021, 13, 4694. [Google Scholar] [CrossRef]
  32. Boughton, C.K.; Hovorka, R. New closed-loop insulin systems. Diabetologia 2021, 64, 1007–1015. [Google Scholar] [CrossRef]
  33. Kaufman, F.R.; Cohen, O. A Guide to Personal Continuous Glucose Monitoring; Medtronic: Dublin, Ireland, 2012. [Google Scholar]
  34. Bosi, E.; Choudhary, P.; de Valk, H.W.; Lablanche, S.; Castañeda, J.; de Portu, S.; Silva, J.D.; Ré, R.; de Groot, L.V.; Shin, J.; et al. Efficacy and safety of suspend-before-low insulin pump technology in hypoglycaemia-prone adults with type 1 diabetes (SMILE): An open-label randomised controlled trial. Lancet Diabetes Endocrinol. 2019, 7, 462–472. [Google Scholar] [CrossRef]
  35. Garg, S.K.; Weinzimer, S.A.; Tamborlane, W.V.; Buckingham, B.A.; Bode, B.W.; Bailey, T.S.; Brazg, R.L.; Ilany, J.; Slover, R.H.; Anderson, S.M.; et al. Glucose Outcomes with the In-Home Use of a Hybrid Closed-Loop Insulin Delivery System in Adolescents and Adults with Type 1 Diabetes. Diabetes Technol. Ther. 2017, 19, 155–163. [Google Scholar] [CrossRef] [PubMed]
  36. Forlenza, G.P.; Pinhas-Hamiel, O.; Liljenquist, D.R.; Shulman, D.I.; Bailey, T.S.; Bode, B.W.; Wood, M.A.; Buckingham, B.A.; Kaiserman, K.B.; Shin, J.; et al. Safety Evaluation of the MiniMed 670G System in Children 7–13 Years of Age with Type 1 Diabetes. Diabetes Technol. Ther. 2019, 21, 11–19. [Google Scholar] [CrossRef]
Figure 1. Comparative fractions of time spent in global glycemic states.
Figure 1. Comparative fractions of time spent in global glycemic states.
Electronics 14 00560 g001
Figure 2. Comparative fractions of time spent in glycemic states by group.
Figure 2. Comparative fractions of time spent in glycemic states by group.
Electronics 14 00560 g002
Figure 3. Comparative results for global risk index.
Figure 3. Comparative results for global risk index.
Electronics 14 00560 g003
Table 1. Summary of optimization algorithms.
Table 1. Summary of optimization algorithms.
AlgorithmKp RangeKi RangeKd RangeIFEugHyperHypo
CMA-ES Stopped before reaching 5 days
TPE−1.00 ×   10 2 −1.00 ×   10 6 −1.00 ×   10 1 Yes0.69810.27060.0313
GP 0.66640.30280.0309
CMA-ES Stopped before reaching 5 days
TPE−5.00 ×   10 3 −1.00 ×   10 7 −1.00 ×   10 2 No0.70080.27770.0215
GP 0.70040.24640.0532
CMA-ES 0.59700.40300.0000
TPE−5.00 ×   10 3 −1.00 ×   10 7 −1.00 ×   10 2 Yes0.71380.27820.0081
GP 0.69590.29290.0112
CMA-ES 0.41190.58810.0000
TPE−1.00 ×   10 4 −1.00 ×   10 8 −1.00 ×   10 3 No0.64850.34300.0085
GP 0.63770.36230.0000
Table 2. Comparison of percentage of episode length by method and group.
Table 2. Comparison of percentage of episode length by method and group.
MethodGroupAvg. EP LengthConfidence Interval
PIDadolescents100-
adults100-
children95.76±0.47
PID-Haradolescents100-
adults100-
children100-
PID-IFadolescents100-
adults100-
children100-
PID-OFadolescents100-
adults100-
children100-
Table 3. Statistical comparison between PID and PID-OF across key metrics.
Table 3. Statistical comparison between PID and PID-OF across key metrics.
MetricT-Statisticp-Value
Euglycemia−13.45 5.88 × 10 38
Hyperglycemia14.81 4.12 × 10 45
Hypoglycemia1.810.071
Risk Index (RI)12.66 1.26 × 10 33
High Blood Glycemic Index (HBGI)13.02 9.67 × 10 36
Low Blood Glycemic Index (LBGI)4.36 1.49 × 10 5
Magni Risk Index (MRI)8.14 1.84 × 10 15
Daily Insulin Dose−3.33 8.81 × 10 4
BGMin12.45 1.44 × 10 32
BGMax9.78 1.10 × 10 21
Table 4. Comparison of PID-OF with Trajectory-PPO and Decision-PPO on glycemic control metrics (mean ± CI).
Table 4. Comparison of PID-OF with Trajectory-PPO and Decision-PPO on glycemic control metrics (mean ± CI).
MethodEuglycemia (%)Hyperglycemia (%)Hypoglycemia (%)Risk Index
Trajectory-PPO 68.27 ± 0.84 22.47 ± 0.77 9.26 ± 0.77 10.41 ± 0.60
Decision-PPO 50.48 ± 1.45 38.75 ± 2.04 10.76 ± 1.42 24.08 ± 1.45
PID-OF 67 . 94 ± 0 . 79 25 . 15 ± 0 . 69 6 . 91 ± 0 . 36 9 . 09 ± 0 . 32
Table 5. Comparative results of our proposed method against others.
Table 5. Comparative results of our proposed method against others.
MethodMean of TIR (%)Catastrophic Event (%)
Our proposed PID-OF67.940.0
PID by Fox et al. [14]71.680.12
PID by Emerson et al. [25]61.60.0
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.

Share and Cite

MDPI and ACS Style

Viroonluecha, P.; Egea-Lopez, E.; Santa, J. Exploiting Personalized Observation Frequency for Proportional Integral Derivative-Based Diabetes Management. Electronics 2025, 14, 560. https://doi.org/10.3390/electronics14030560

AMA Style

Viroonluecha P, Egea-Lopez E, Santa J. Exploiting Personalized Observation Frequency for Proportional Integral Derivative-Based Diabetes Management. Electronics. 2025; 14(3):560. https://doi.org/10.3390/electronics14030560

Chicago/Turabian Style

Viroonluecha, Phuwadol, Esteban Egea-Lopez, and Jose Santa. 2025. "Exploiting Personalized Observation Frequency for Proportional Integral Derivative-Based Diabetes Management" Electronics 14, no. 3: 560. https://doi.org/10.3390/electronics14030560

APA Style

Viroonluecha, P., Egea-Lopez, E., & Santa, J. (2025). Exploiting Personalized Observation Frequency for Proportional Integral Derivative-Based Diabetes Management. Electronics, 14(3), 560. https://doi.org/10.3390/electronics14030560

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop