Machine Learning and Network Methods for Biology and MedicineView this Special Issue
Research Article | Open Access
An Improved PID Algorithm Based on Insulin-on-Board Estimate for Blood Glucose Control with Type 1 Diabetes
Automated closed-loop insulin infusion therapy has been studied for many years. In closed-loop system, the control algorithm is the key technique of precise insulin infusion. The control algorithm needs to be designed and validated. In this paper, an improved PID algorithm based on insulin-on-board estimate is proposed and computer simulations are done using a combinational mathematical model of the dynamics of blood glucose-insulin regulation in the blood system. The simulation results demonstrate that the improved PID algorithm can perform well in different carbohydrate ingestion and different insulin sensitivity situations. Compared with the traditional PID algorithm, the control performance is improved obviously and hypoglycemia can be avoided. To verify the effectiveness of the proposed control algorithm, in silico testing is done using the UVa/Padova virtual patient software.
Diabetes, a disorder of endocrine metabolism, is an incurable disease. Diabetes affects millions of people in the world, and it is a disease with considerable complications including retinopathy, nephropathy, peripheral neuropathy, and blindness . According to a prediction produced by the International Diabetes Federation in 2014, approximately 387 million people suffered from diabetes worldwide by 2014 and about 592 million patients by 2035 . Thus, the maintenance of blood glucose concentration in a normal range is of critical importance for diabetic.
Type 1 diabetes is mainly due to the reason that the β-cell of pancreas cannot secrete insulin. They must rely on exogenous insulin to regulate blood glucose concentration. Currently, patients with type 1 diabetes are treated with either multiple daily injections (MDI) or continuous subcutaneous insulin infusion (CSII) delivering via an insulin pump . The CSII has shown more advantages than MDI method because of the increasing flexibility of diet, exercise, convenience, and precision . Various open-loop insulin pumps that are available in the market are programmable to deliver the required amount of insulin. However, a fully automated closed-loop insulin infusion system that can deliver appropriate amounts of insulin to patients without any manual interference is developing . The closed-loop system contains three main components, which are continuous glucose monitoring (CGM), intelligent controller, and insulin pump.
For open-loop insulin pump, a bolus calculator is used to calculate bolus insulin doses that can help diabetic regulate the postprandial blood glucose concentration. The bolus calculator takes into account many factors, such as current blood glucose, target blood glucose, amount of carbohydrate ingested, insulin sensitivity, correction factor (CF), and insulin : carbohydrate ratio (I : C) as well as duration of insulin action (“insulin on board (IOB)”) .
For closed-loop insulin pump, the real-time CGM system is already commercially available and the control algorithm is the key technique of precise insulin infusion. The control algorithm requires high robustness and reliability. There are various control algorithms including PID control , model predictive control (MPC) [7, 8], optimal control , adaptive control , and sliding mode control . Among those control algorithms, the PID controller is widely used in industrial control systems. The PID controller is attractive for blood glucose control based on the features of simple structure with few parameters, easy implementation, good adaptation, and robustness.
Many closed-loop control algorithms had not considered the IOB factor. A limitation of IOB can optimize the output of control algorithm and decrease the risk of hypoglycemia. As the open-loop insulin pump, the previous insulin administration may lead to hypoglycemia. So the IOB estimate is considered to limit the insulin infusion dose. In this paper, the improved PID control algorithm based on IOB estimate is introduced. Controller performance is evaluated in a simulation study under a physiological model and considered the carbohydrate ingestion and insulin sensitivity changed. Also, the UVa/Padova virtual patient software is used to verify the effectiveness of PID controller with IOB estimate.
The paper is organized as follows. In Section 2, a combinational complicated and detailed model of glucose-insulin kinetic is introduced, which is based on the Hovorka et al. and Dalla Man et al. model. The PID controller with IOB estimate is designed, and the performance is evaluated by simulation in Section 3. The in silico testing using ten virtual patients is discussed in Section 4. The final conclusion is located in Section 5.
2. Glucose-Insulin Mathematical Model
Mathematical models of glucose-insulin interactions have been studied for over the past 50 years. Simple linear models were proposed by Ackerman et al. . More complicated nonlinear models were proposed in later studies. In many of these models, compartmental modeling approach has been used. In this approach, the body is divided into compartments representing different organs or parts of the body and mass balance equations are derived for each compartment. The compartmental minimal model of Bergman et al.  has been widely used in many studies. More complicated compartmental models proposed by Cobelli and Mari , Hovorka et al. , and Dalla Man et al.  have considered more compartments for better understanding the behavior of different parts of the body. These models for glucose-insulin interactions have been widely used in studying the physiological behavior of diabetic patients.
In this paper, the glucose and insulin metabolic model refers to the model developed by Hovorka et al.  and Dalla Man et al. [16, 17]. The Hovorka model is a nonlinear compartmental model with three subsystems for glucose, insulin, and insulin action. The carbohydrate digestion and absorption model refers to Dalla Man’s model in this paper. The combinational model is close to a realistic patient model.
2.1. Glucose Subsystem
The glucose subsystem is divided into two compartments: masses of glucose in the accessible compartment and masses of glucose in the nonaccessible compartment. The core model is a two-compartment representation of glucose kinetics. Considerwhere and are the masses of glucose in the accessible and nonaccessible compartments, respectively. is the transfer rate constant from the nonaccessible to the accessible compartment. is the distribution volume of the accessible compartment. is the glucose concentration. is the endogenous glucose production extrapolated to the zero insulin concentration. is the total insulin-independent glucose flux, corrected for the ambient glucose concentration. is the renal glucose clearance above the glucose threshold of 162 mg/dL. The gut absorption rate is introduced in Section 2.4 of carbohydrate digestion and absorption model.
2.2. Insulin Subsystem
The insulin subsystem describes the insulin absorption and insulin action on glucose kinetics. The plasma insulin concentration is described bywhere is the fractional elimination rate and is the distribution volume.
2.3. Insulin Action Subsystem
The three insulin actions on glucose kinetics are represented bywhere , , and are the effects of insulin on glucose distribution/transport, glucose disposal, and endogenous glucose production, respectively; , , and are the deactivation rate constants; , , and are the activation rate constants.
The insulin sensitivities of glucose distribution/transport and glucose intracellular disposal are represented individually as follows:
2.4. Carbohydrate Digestion and Absorption
The carbohydrate digestion and absorption model consists of three-compartment nonlinear model, two for the glucose in the stomach solid and liquid and one for the glucose in the intestinal tract . Considerwhere is the amount of carbohydrate to be ingested, is the impulse function, is the rate of grinding coefficient in the stomach, is the rate of fractional coefficient with which the chyme enters the intestine, and is the rate constant of intestinal absorption.
3. PID Controller with IOB Estimate
3.1. Insulin-on-Board Estimate
The insulin on board is defined as the amount of administered insulin that is still active in the body. Some insulin pump estimates the IOB to correct the boluses in order to avoid hyper- or hypoglycemia . The IOB estimate is based on the insulin action curves. Here the IOB estimation is represented by a two-compartment dynamical model:where and are the two compartments and is the insulin dose. The constant is tuned for each patient so model replicates the corresponding . Figure 1 shows the insulin activity curves obtained with model for typical value, while Table 1 shows the corresponding values for typical values . The insulin action is different among each individual; there are many factors, such as exercise, stress, illness, and heat. The different insulin action curves are provided by insulin pump to calculate insulin bolus.
The insulin duration ranges from 2 h to 8 h; diabetes patient should choose a reasonable duration time. If patient sets the duration of insulin action time less than the actual time, it will increase the risk of hypoglycemia. The insulin pump indicates that there has been no longer active IOB and will infuse more insulin dose to consume blood glucose. On the other hand, if patient sets the duration of insulin action time longer than the actual time, it will increase the risk of hyperglycemia. The patient will take a smaller insulin dose than is necessary to regulate the blood glucose back to the set value.
3.2. Design of PID Controller with IOB Estimate
The structure of the PID controller with IOB estimate is demonstrated in Figure 2, where is the real blood glucose concentration of diabetes patient, is the measured blood glucose by glucose sensor, is the target blood glucose concentration, and is the final insulin infusion rate.
The control law is as follows:where is the closed-loop control output. is the error of the target blood glucose and the measured blood glucose. is the basal insulin infusion rate. There are three adjustable parameters: proportional gain (), integral time (), and derivative ().
The control output of insulin infusion rate is based on the IOB estimate and the constraint output of insulin infusion. Figure 3 shows the inner structure of control algorithm. The output of controller iswhere the gain is obtained as the average value of and the value is set as .
The IOB estimate is based on the error of the (6) and limit. In , the author proposed a method to calculate the limit. The value is obtained at time: , where is the amount of carbohydrate intake. Although each meal is different for a patient, the corresponding limits are practically equal. For different duration of insulin action, the value of is different. The error is
Based on (6) and (9), the time evolution of is governed bythat is,from (11), after infusing the insulin, the IOB increases quickly surpassing the ; hence . The switching turns to 0. When IOB falls under the , becomes a positive value and switches to 1. Under the control mode, switches between 0 and 1. We calculate the value during each 10 min period, and the gain is the average value of . So the proposed control algorithm can decrease the insulin infusion rate and avoid the hypoglycemia event.
In this paper, the upper constraint output of PID controller is considered. The upper constraint is based on the IOB estimate, correction factor, and I : C ratio. The significance of upper constraint is to avoid overinfusion of insulin. It is calculated by the following condition: where is the maximum constraint output of insulin infusion rate and is the amount of insulin needed to compensate for a given meal and is calculated by where is the mass of a given meal and I : C ratio is that 1 unit of insulin can consume the amount of CHO. is the amount of insulin needed to correct for a positive deviation from the target glucose concentration and is calculated by the following condition: where and are the current measured and target blood glucose concentrations, respectively. is the correction factor.
3.3. Simulation Results
Figure 4(a) shows the glucose responses using the proposed PID controller with and without limitation under the conditions. It can avoid the hypoglycemia event after three different meals ingested. When the estimated IOB reaches the limitation constraint, the switching law begins to take effect. The IOB dose falls below its limitation. Figure 4(b) shows the IOB dose responses with and without limitation.
Figure 5 shows the glucose responses under the h, and h, conditions. Under different duration of insulin action, the value of limitation needs to be calculated again. The simulation results indicate that the PID control with IOB estimate is effective and stabile for blood glucose control.
We all know that the insulin sensitivity (IS) is varied during a 24-hour period. The IS is employed for each of the three insulin sensitivity parameters in the Hovorka model. There are three values: , , and . The maximum and minimum values of varied randomly on a daily basis following uniform distributions. is equal to . is equal to . In our simulations, increases during 0–1000 min, and decreases after 1000 min. To an extent, it can test the performance of controller. Figure 6 compares the glucose responses for insulin sensitivity changes under the proposed controller. It can avoid the hyperglycemia or hypoglycemia.
In order to evaluate the performance of control algorithm, the blood glucose index (BGI) and standard deviation (SD) are adopted. The BGI is a metric proposed by Kovatchev et al. , to evaluate the risk for hypoglycemia and hyperglycemia. BGI is equal to LBGI + HBGI, where LBGI and HBGI are low and high BG readings, respectively. SD is the standard deviation of glucose concentration. The statistical results are given in Table 3. Both PID controller and PID controller with IOB estimate are analyzed under the different insulin sensitivity. In all situations, the proposed controller has smaller BGI and SD values compared with PID controller. It demonstrates that the improved controller performs well.
4. In Silico Test on Virtual Patient
In order to evaluate the performance of the proposed PID controller, the test is performed on ten virtual subjects using the UVa/Padova virtual patient software. The patients are assumed to have three meals in a day. The multiple meals are 30 g CHO at 7 a.m., 50 g at 12 p.m., and 40 g at 6 p.m.
In the simulation, the control-variability grid analysis (CVGA) provides a summary of the quality of glucose regulation for a virtual subject . CVGA plays an important role in the tuning of closed-loop glucose control algorithms and also in the comparison of their performance. Each subject presents by one data point for any given observation period. There are nine rectangular zones that are defined as follows: A-zone means accurate control, Lower B-zone means benign deviations into hypoglycemia, Upper B-zone means benign deviations into hyperglycemia, B-zone means benign control deviations, Lower C means overcorrection of hyperglycemia, Upper C means overcorrection of hypoglycemia, Lower D means failure to deal with hypoglycemia, Upper D means failure to deal with hyperglycemia, and E means erroneous control. Considering the sensor noise, the - coordinates of CVGA would be the 95% confidence bound of a virtual patient’s data.
The results indicate that 30% of virtual subjects are within A-zone and 70% of virtual subjects are within B-zone under the traditional PID controller as shown in Figure 7(a) and 80% of virtual subjects are within A-zone and 20% of virtual subjects are within B-zone under the PID controller with IOB estimate as shown in Figure 7(b). The results indicate that the PID controller with IOB estimate is effective and robust. The blood glucose can be regulated more accurately than the traditional PID controller. It is excellent performance in tight blood glucose control and avoiding the hypoglycemic.
An improved PID algorithm for blood glucose control is presented. The features of the proposed control algorithm are that the PID controller is based on the IOB estimate and the upper constraint. The control algorithm is evaluated using a combinational glucose-insulin mathematical model. The simulation results have demonstrated that the hypoglycemic events can be avoided and the glucose responses in a reasonable range under multimeal ingested and insulin sensitivity changed. The statistical results also indicate that the BGI and SD values are smaller compared with the traditional PID control. Based on the in silico test, the CVGA indicates that the proposed PID controller can regulate glucose in an accurate control range and reduce the risk of hypoglycemic. It is demonstrated to be very robust and effective. The simulations of this paper will provide useful theoretical basis for blood glucose control.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work was supported by the Fundamental Research Funds for the Central Universities, (Grant no. HIT. IBRSEM. 201307) and the program for Harbin City Science and Technology Innovation Talents of Special Fund Project (Grant no. 2014RFXXJ065).
- J. Li, Y. Kuang, and C. C. Mason, “Modeling the glucose-insulin regulatory system and ultradian insulin secretory oscillations with two explicit time delays,” Journal of Theoretical Biology, vol. 242, no. 3, pp. 722–735, 2006.
- G. Marchetti, M. Barolo, L. Jovanovic, H. Zisser, and D. E. Seborg, “An improved PID switching control strategy for type 1 diabetes,” IEEE Transactions on Biomedical Engineering, vol. 55, no. 3, pp. 857–865, 2008.
- H. Zisser, L. Robinson, W. Bevier et al., “Bolus calculator: a review of four ‘smart’ insulin pumps,” Diabetes Technology and Therapeutics, vol. 10, no. 6, pp. 441–444, 2008.
- K. Mythreyi, S. C. Subramanian, and R. Krishna Kumar, “Nonlinear glucose-insulin control considering delays-Part II: control algorithm,” Control Engineering Practice, vol. 28, no. 1, pp. 26–33, 2014.
- E. M. Watson, M. J. Chappell, F. Ducrozet, S. M. Poucher, and J. W. T. Yates, “A new general glucose homeostatic model using a proportional-integral-derivative controller,” Computer Methods and Programs in Biomedicine, vol. 102, no. 2, pp. 119–129, 2011.
- H. Lee and B. W. Bequette, “A closed-loop artificial pancreas based on model predictive control: human-friendly identification and automatic meal disturbance rejection,” Biomedical Signal Processing and Control, vol. 4, no. 4, pp. 347–354, 2009.
- L. Magni, D. M. Raimondo, C. Dalla Man, G. De Nicolao, B. Kovatchev, and C. Cobelli, “Model predictive control of glucose concentration in type I diabetic patients: an in silico trial,” Biomedical Signal Processing and Control, vol. 4, no. 4, pp. 338–346, 2009.
- I. Y. S. Chávez, R. Morales-Menéndez, and S. O. M. Chapa, “Glucose optimal control system in diabetes treatment,” Applied Mathematics and Computation, vol. 209, no. 1, pp. 19–30, 2009.
- M. Ottavian, M. Barolo, H. Zisser, E. Dassau, and D. E. Seborg, “Adaptive blood glucose control for intensive care applications,” Computer Methods and Programs in Biomedicine, vol. 109, no. 2, pp. 144–156, 2013.
- A. G. Gallardo Hernández, L. Fridman, A. Levant et al., “High-order sliding-mode control for blood glucose: practical relative degree approach,” Control Engineering Practice, vol. 21, no. 5, pp. 747–758, 2013.
- E. Ackerman, L. C. Gatewood, J. W. Rosevear, and G. D. Molnar, “Model studies of blood-glucose regulation,” The Bulletin of Mathematical Biophysics, vol. 27, no. 1, pp. 21–37, 1965.
- R. N. Bergman, L. S. Phillips, and C. Cobelli, “Physiologic evaluation of factors controlling glucose tolerance in man. Measurement of insulin sensitivity and β-cell glucose sensitivity from the response to intravenous glucose,” Journal of Clinical Investigation, vol. 68, no. 6, pp. 1456–1467, 1981.
- C. Cobelli and A. Mari, “Validation of mathematical models of complex endocrine-metabolic systems. A case study on a model of glucose regulation,” Medical and Biological Engineering and Computing, vol. 21, no. 4, pp. 390–399, 1983.
- R. Hovorka, V. Canonico, L. J. Chassin et al., “Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes,” Physiological Measurement, vol. 25, no. 4, pp. 905–920, 2004.
- C. Dalla Man, M. Camilleri, and C. Cobelli, “A system model of oral glucose absorption validation on gold standard data,” IEEE Transactions on Biomedical Engineering, vol. 53, no. 12, pp. 2472–2478, 2006.
- X. Gao, H. Ning, and Y. Wang, “Systematically in silico comparison of unihormonal and bihormonal artificial pancreas systems,” Computational and Mathematical Methods in Medicine, vol. 2013, Article ID 712496, 10 pages, 2013.
- C. Ellingsen, E. Dassau, H. Zisser et al., “Safety constraints in an artificial pancreatic β cell: an implementation of model predictive control with insulin on board,” Journal of Diabetes Science and Technology, vol. 3, no. 3, pp. 536–544, 2009.
- F. León-Vargas, F. Garelli, H. De Battista, and J. Vehí, “Postprandial blood glucose control using a hybrid adaptive PD controller with insulin-on-board limitation,” Biomedical Signal Processing and Control, vol. 8, no. 6, pp. 724–732, 2013.
- B. P. Kovatchev, W. L. Clarke, M. Breton, K. Brayman, and A. McCall, “Quantifying temporal glucose variability in diabetes via continuous glucose monitoring: mathematical methods and clinical application,” Diabetes Technology & Therapeutics, vol. 7, no. 6, pp. 849–862, 2005.
- L. Magni, D. M. Raimondo, C. Dalla Man et al., “Evaluating the efficacy of closed-loop glucose regulation via control-variability grid analysis,” Journal of Diabetes Science and Technology, vol. 2, no. 4, pp. 630–635, 2008.
Copyright © 2015 Ruiqiang Hu and Chengwei Li. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.