Artificial Pancreas: Avoiding Hyperglycemia and Hypoglycemia for Type One Diabetes

Amer B. Rakan, Taghreed MohammadRidha, Shibly Ahmed AL-Samarraie


The objective of this work is to automatically regulate glycemia of Type 1 Diabetes Mellitus (T1DM) avoiding both hyperglycemia and hypoglycemia risks. A positive state feedback controller was designed previously to regulate Blood Glucose Concentration (BGC) in the fasting phase maintaining the system in the positively invariant set (PIS). The drawback of this positive controller is that when tested in the postprandial phase it couldn’t avoid hyperglycemia. Therefore, in this work, the positive state feedback controller was developed to avoid both hypoglycemia and hyperglycemia maintaining the system inside the PIS. Meal disturbance is estimated by a sliding mode perturbation observer to be included in the control law. Such that meal effect is canceled early enough preventing glycemia from raising to hyperglycemia, but the positivity of the new controller isn’t guaranteed. Therefore, a hybrid controller is designed to switch to the previous positive controller whenever the new controller has a negative action. A positive control is essential in this problem since the control input (insulin) can only be infused and it cannot be taken back from the bloodstream in case of any overdoses. The hybrid positive controller is tested in silico on five virtual T1DM patients. The results shown that the average percentage of time for glycemia over 180mg/dl (3.6%), normal range (80-120mg/dl) (78.2%), and below (80mg/dl) (0%) from overall simulation time. In conclusion, the hybrid positive control law succeeded to maintain the system inside the PIS avoiding hypoglycemia and preventing hyperglycemia keeping BGC in normal range rejecting meal disturbance.


Type 1 Diabetes Mellitus (T1DM); positively invariant set; sliding mode perturbation observer; hybrid control.

Full Text:



N. Magdelaine et al., “Hypoglycaemia-free artificial pancreas project,†IET Syst. Biol., vol. 14, no. 1, pp. 16–23, 2020, doi: 10.1049/iet-syb.2018.5069.

N. Magdelaine et al., “A long-term model of the glucose-insulin dynamics of type 1 diabetes,†IEEE Trans. Biomed. Eng., vol. 62, no. 6, pp. 1546–1552, 2015, doi: 10.1109/TBME.2015.2394239.

M. J. Schoelwer et al., “Predictors of Time-in-Range (70–180 mg/dL) Achieved Using a Closed-Loop Control System,†Diabetes Technol. Ther., vol. 23, no. 7, pp. 1–7, 2021, doi: 10.1089/dia.2020.0646.

A. Nath, R. Dey, and C. Aguilar-Avelar, “Observer based nonlinear control design for glucose regulation in type 1 diabetic patients: An LMI approach,†Biomed. Signal Process. Control, vol. 47, pp. 7–15, 2019, doi: 10.1016/j.bspc.2018.07.020.

K. Menani, T. Mohammadridha, N. Magdelaine, M. Abdelaziz, and C. H. Moog, “Positive sliding mode control for blood glucose regulation,†Int. J. Syst. Sci., vol. 48, no. 15, pp. 3267–3278, 2017, doi: 10.1080/00207721.2017.1381893.

A. Nath and R. Dey, “Robust observer-based control for plasma glucose regulation in type 1 diabetes patient using attractive ellipsoid method,†IET Syst. Biol., vol. 13, no. 2, pp. 84–91, 2019.

P. Abuin, P. S. Rivadeneira, A. Ferramosca, and A. H. González, “Artificial pancreas under stable pulsatile MPC: Improving the closed-loop performance,†J. Process Control, vol. 92, pp. 246–260, 2020, doi: 10.1016/j.jprocont.2020.06.009.

Z. Cao, R. Gondhalekar, E. Dassau, and F. J. D. Iii, “Extremum Seeking Control for Personalized Zone Adaptation in Model Predictive Control for Type 1 Diabetes,†vol. 9294, no. c, pp. 1–12, 2017, doi: 10.1109/TBME.2017.2783238.

B. K. Abd-Al Amear, S. M. Raafat, and A. Al-Khazraji, “Glucose controller for artificial pancreas,†2019 Int. Conf. Innov. Intell. Informatics, Comput. Technol. 3ICT 2019, pp. 1–6, 2019, doi: 10.1109/3ICT.2019.8910295.

A. El Fathi, V. Gingras, and B. Boulet, “The artificial pancreas and meal control: an overview of postprandial glucose regulation in type 1 diabetes,†IEEE Control Syst. Mag., vol. 38, no. February, pp. 67–85, 2018.

B. Moreano and J. Pumisacho, “Comparison between PID-Fuzzy and Numerical Methods based on linear Algebra controllers for Glucose control in Type 1 Diabetes treatment.,†2019 Int. Conf. Inf. Syst. Comput. Sci., pp. 156–162, 2019, doi: 10.1109/INCISCOS49368.2019.00033.

A. K. Patra, A. K. Mishra, and P. K. Rout, “Backstepping Model Predictive Controller for Blood Glucose Regulation in Type-I Diabetes Patient,†IETE J. Res., vol. 66, no. 3, pp. 326–340, 2020, doi: 10.1080/03772063.2018.1493404.

A. H. González, P. S. Rivadeneira, A. Ferramosca, N. Magdelaine, and C. H. Moog, “Stable impulsive zone model predictive control for type 1 diabetic patients based on a long-term model,†Optim. Control Appl. Methods, vol. 41, no. 6, pp. 2115–2136, 2020, doi: 10.1002/oca.2647.

C. Cobelli et al., “Advancing Our Understanding of the Glucose System via Modeling: A Perspective,†IEEE Trans. Biomed. Eng., vol. 61, no. 5, pp. 1577–1592, 2014.

T. Mohammadridha, P. S. Rivadeneira, J. E. Sereno, M. Cardelli, and C. H. Moog, “Description of the Positively Invariant Sets of a Type 1 Diabetic Patient Model,†17th CLCA Lat. Am. Conf. Autom. Control., 2016.

T. MohammadRidha, P. S. Rivadeneira, N. Magdelaine, M. Cardelli, and C. H. Moog, “Positively invariant sets of a T1DM model: Hypoglycemia prediction and avoidance,†J. Franklin Inst., vol. 356, no. 11, pp. 5652–5674, 2019, doi: 10.1016/j.jfranklin.2019.03.022.

L. F. S. Rinaldi, Positive linear systems Theory and Application, vol. 50. 2011.

T. Mohammadridha, P. S. Rivadeneira, M. Cardelli, N. Magdelaine, and C. H. Moog, “Towards hypoglycemia prediction and avoidance for Type 1 Diabetic patients,†2017 IEEE 56th Annu. Conf. Decis. Control. CDC 2017, doi: 10.1109/CDC.2017.8264264.

J. E. Sereno, M. A. Caicedo, and P. S. Rivadeneira, “Artificial pancreas: Glycemic control strategies for avoiding hypoglycemia,†DYNA, vol. 85, no. 207, pp. 198–207, 2018, doi: 10.15446/dyna.v85n207.71535.

S. Ahmed, Y. K. Al-nadawi, M. H. Mshari, and M. M. Salih, “Electronic Throttle Valve Control Design Based on Sliding Mode Perturbation Estimator †,†IJCCCE, vol. 15, no. 2, pp. 65–74, 2015.

J. S. V. I. Utkin, J. Guldner, Sliding Mode Control in Electro-Mechanical Systems. London, Taylor & Francis Group. 2009.

A. Falah, A. J. Humaidi, A. Al-dujaili, and I. K. Ibraheem, “Robust Super-Twisting Sliding Control of PAM- actuated Manipulator Based on Perturbation Observer Robust Super-Twisting Sliding Control of PAM- actuated Manipulator Based on Perturbation Observer,†Cogent Eng., vol. 7, no. 1, pp. 1–30, 2021, doi: 10.1080/23311916.2020.1858393.

S. A. Al-samarraie, “A Chattering Free Sliding Mode Observer with Application to DC Motor Speed Control,†2018 Third Sci. Conf. Electr. Eng., pp. 259–264, 2018.

C. Clason, A. Rund, and K. Kunisch, “Systems & Control Letters Nonconvex penalization of switching control of partial differential equations,†Syst. Control Lett., vol. 106, pp. 1–8, 2017, doi: 10.1016/j.sysconle.2017.05.006.

M. I. Tomera, “Hybrid Switching Controller Design for the Maneuvering and Transit of a Training Ship,†Int. J. Appl. Math. Comput. Sci., vol. 27, no. 1, pp. 63–77, 2017, doi: 10.1515/amcs-2017-0005.

E. D. Lehmann and T. Deutsch, “A physiological model of glucose-insulin interaction in type 1 diabetes mellitus,†J. Biomed. Eng., vol. 14, no. 3, pp. 235–242, 1992, doi: 10.1016/0141-5425(92)90058-S.

S. F. Fadhel and S. M. Raafat, “H ∞ loop Shaping Robust Postprandial Glucose Control for Type 1 Diabetes,†Eng. Technol. J., vol. 39, no. 02, pp. 268–279, 2021.



Published by INSIGHT - Indonesian Society for Knowledge and Human Development