Robust Data-Driven Control of Artificial Pancreas Systems Using Neural Networks

  • Souradeep Dutta
  • Taisa KushnerEmail author
  • Sriram Sankaranarayanan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11095)


In this paper, we provide an approach to data-driven control for artificial pancreas systems by learning neural network models of human insulin-glucose physiology from available patient data and using a mixed integer optimization approach to control blood glucose levels in real-time using the inferred models. First, our approach learns neural networks to predict the future blood glucose values from given data on insulin infusion and their resulting effects on blood glucose levels. However, to provide guarantees on the resulting model, we use quantile regression to fit multiple neural networks that predict upper and lower quantiles of the future blood glucose levels, in addition to the mean.

Using the inferred set of neural networks, we formulate a model-predictive control scheme that adjusts both basal and bolus insulin delivery to ensure that the risk of harmful hypoglycemia and hyperglycemia are bounded using the quantile models while the mean prediction stays as close as possible to the desired target. We discuss how this scheme can handle disturbances from large unannounced meals as well as infeasibilities that result from situations where the uncertainties in future glucose predictions are too high. We experimentally evaluate this approach on data obtained from a set of 17 patients over a course of 40 nights per patient. Furthermore, we also test our approach using neural networks obtained from virtual patient models available through the UVA-Padova simulator for type-1 diabetes.



This work was supported by the US National Science Foundation (NSF) through awards 1446900, 1646556, and 1815983. All opinions expressed are those of the authors and not necessarily of the NSF.


  1. 1.
    Abadi, M., et al.: Tensorflow: large-scale machine learning on heterogeneous distributed systems. CoRR abs/1603.04467 (2016).
  2. 2.
    Atlas, E., Nimri, R., Miller, S., Grunberg, E.A., Phillip, M.: MD-logic artificial pancreas system: a pilot study in adults with type 1 diabetes. Diab. Care 33(5), 1072–1076 (2010)CrossRefGoogle Scholar
  3. 3.
    Behl, M., Jain, A., Mangharam, R.: Data-driven modeling, control and tools for cyber-physical energy systems. In: Proceedings of the 7th International Conference on Cyber-Physical Systems, ICCPS 2016, pp. 35:1–35:10. IEEE Press, Piscataway (2016)Google Scholar
  4. 4.
    Bequette, B.W.: Algorithms for a closed-loop artificial pancreas: the case for model predictive control. J. Diab. Sci. Technol. 7, 1632–1643 (2013)CrossRefGoogle Scholar
  5. 5.
    Bergman, R.N., Urquhart, J.: The pilot gland approach to the study of insulin secretory dynamics. Recent Progress Hormon. Res. 27, 583–605 (1971)Google Scholar
  6. 6.
    Bergman, R.N.: Minimal model: perspective from 2005. Hormon. Res. 64(suppl 3), 8–15 (2005)Google Scholar
  7. 7.
    Bhat, N., McAvoy, T.J.: Use of neural nets for dynamic modeling and control of chemical process systems. Comput. Chem. Eng. 14(4–5), 573–582 (1990)CrossRefGoogle Scholar
  8. 8.
    Camacho, E., Bordons, C., Alba, C.: Model Predictive Control. Advanced Textbooks in Control and Signal Processing. Springer, London (2004). Scholar
  9. 9.
    Cameron, F., Niemeyer, G., Bequette, B.W.: Extended multiple model prediction with application to blood glucose regulation. J. Process Control 22(8), 1422–1432 (2012)CrossRefGoogle Scholar
  10. 10.
    Cameron, F., et al.: Inpatient studies of a Kalman-filter-based predictive pump shutoff algorithm. J. Diab. Sci. Technol. 6(5), 1142–1147 (2012)CrossRefGoogle Scholar
  11. 11.
    Chase, H.P., Maahs, D.: Understanding Diabetes (Pink Panther Book), 12 edn. Children’s Diabetes Foundation, Denver (2011). Available online through CU Denver Barbara Davis Center for DiabetesGoogle Scholar
  12. 12.
    Chee, F., Fernando, T.: Closed-Loop Control of Blood Glucose. Springer, Heidelberg (2007). Scholar
  13. 13.
    Chen, X., Dutta, S., Sankaranarayanan, S.: Formal verification of a multi-basal insulin infusion control model. In: Workshop on Applied Verification of Hybrid Systems (ARCH), p. 16. Easychair (2017)Google Scholar
  14. 14.
    Cobelli, C., Dalla Man, C., Sparacino, G., Magni, L., Nicolao, G.D., Kovatchev, B.P.: Diabetes: models, signals and control (methodological review). IEEE Rev. Biomed. Eng. 2, 54–95 (2009)CrossRefGoogle Scholar
  15. 15.
    Dalla Man, C., Camilleri, M., Cobelli, C.: A system model of oral glucose absorption: validation on gold standard data. IEEE Trans. Biomed. Eng. 53(12), 2472–2478 (2006)CrossRefGoogle Scholar
  16. 16.
    Dalla Man, C., Micheletto, F., Lv, D., Breton, M., Kovatchev, B., Cobelli, C.: The UVa/Padova type I diabetes simulator: new features. J. Diab. Sci. Technol. 8(1), 26–34 (2014)CrossRefGoogle Scholar
  17. 17.
    Dalla Man, C., Raimondo, D.M., Rizza, R.A., Cobelli, C.: Gim, simulation software of meal glucose-insulin model (2007)Google Scholar
  18. 18.
    Dalla Man, C., Rizza, R.A., Cobelli, C.: Meal simulation model of the glucose-insulin system. IEEE Trans. Biomed. Eng. 1(10), 1740–1749 (2006)CrossRefGoogle Scholar
  19. 19.
    Dutta, S., Jha, S., Sankaranarayanan, S., Tiwari, A.: Output range analysis for deep feedforward neural networks. In: Dutle, A., Muñoz, C., Narkawicz, A. (eds.) NFM 2018. LNCS, vol. 10811, pp. 121–138. Springer, Cham (2018). Scholar
  20. 20.
    Freeman, J.S.: Insulin analog therapy: improving the match with physiologic insulin secretion. J. Am. Osteopath. Assoc. 109(1), 26–36 (2009)Google Scholar
  21. 21.
    Garg, S.K., 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. Diab. Technol. Ther. 19(3), 1–9 (2017)CrossRefGoogle Scholar
  22. 22.
    Goodfellow, I., Bengio, Y., Courville, A.: Deep Learning. MIT Press, Cambridge (2016)Google Scholar
  23. 23.
    Griva, L., Breton, M., Chernavvsky, D., Basualdo, M.: Commissioning procedure for predictive control based on arx models of type 1 diabetes mellitus patients. IFAC-PapersOnLine 50(1), 11023–11028 (2017)CrossRefGoogle Scholar
  24. 24.
    van Heusden, K., Dassau, E., Zisser, H.C., Seborg, D.E., Doyle III, F.J.: Control-relevant models for glucose control using a priori patient characteristics. IEEE Trans. Biomed. Eng. 59(7), 1839–1849 (2012)Google Scholar
  25. 25.
    Hakami, H.: FDA approves MINIMED 670G system - world’s first hybrid closed loop system (2016)Google Scholar
  26. 26.
    Hovorka, R., et al.: Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol. Measur. 25, 905–920 (2004)CrossRefGoogle Scholar
  27. 27.
    Hovorka, R., et al.: Partitioning glucose distribution/transport, disposal and endogenous production during IVGTT. Am. J. Physiol. Endocrinol. Metab. 282, 992–1007 (2002)CrossRefGoogle Scholar
  28. 28.
    Hovorka, R.: Continuous glucose monitoring and closed-loop systems. Diab. Med. 23(1), 1–12 (2005)CrossRefGoogle Scholar
  29. 29.
    Katz, G., Barrett, C., Dill, D.L., Julian, K., Kochenderfer, M.J.: Reluplex: an efficient SMT solver for verifying deep neural networks. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 97–117. Springer, Cham (2017). Scholar
  30. 30.
    Koenker, R.: Quantile Regression. Econometric Society Monographs, no. 38, p. 342 (2005)Google Scholar
  31. 31.
    Kowalski, A.: Pathway to artificial pancreas revisited: moving downstream. Diab. Care 38, 1036–1043 (2015)CrossRefGoogle Scholar
  32. 32.
    Kushner, T., Bortz, D., Maahs, D., Sankaranarayanan, S.: A data-driven approach to artificial pancreas verification and synthesis. In: International Conference on Cyber-Physical Systems (ICCPS 2018). IEEE Press (2018)Google Scholar
  33. 33.
    Lomuscio, A., Maganti, L.: An approach to reachability analysis for feed-forward relu neural networks. CoRR abs/1706.07351 (2017).
  34. 34.
    Maahs, D.M., et al.: A randomized trial of a home system to reduce nocturnal hypoglycemia in type 1 diabetes. Diab. Care 37(7), 1885–1891 (2014)CrossRefGoogle Scholar
  35. 35.
    Medtronic Inc.: “paradigm” insulin pump with low glucose suspend system (2012). cf.
  36. 36.
    Nimri, R., et al.: Night glucose control with md-logic artificial pancreas in home setting: a single blind, randomized crossover trial-interim analysis. Pediatric Diab. 15(2), 91–100 (2014)CrossRefGoogle Scholar
  37. 37.
    Paoletti, N., Liu, K.S., Smolka, S.A., Lin, S.: Data-driven robust control for type 1 diabetes under meal and exercise uncertainties. In: Feret, J., Koeppl, H. (eds.) CMSB 2017. LNCS, vol. 10545, pp. 214–232. Springer, Cham (2017). Scholar
  38. 38.
    Patek, S., et al.: In silico preclinical trials: methodology and engineering guide to closed-loop control in type 1 diabetes mellitus. J. Diab. Sci. Technol. 3(2), 269–82 (2009)CrossRefGoogle Scholar
  39. 39.
    Pérez-Gandía, C., et al.: Artificial neural network algorithm for online glucose prediction from continuous glucose monitoring. Diab. Technol. Ther. 12(1), 81–88 (2010)CrossRefGoogle Scholar
  40. 40.
    Piche, S., Sayyar-Rodsari, B., Johnson, D., Gerules, M.: Nonlinear model predictive control using neural networks. IEEE Control Syst. 20(3), 53–62 (2000)CrossRefGoogle Scholar
  41. 41.
    Psichogios, D.C., Ungar, L.H.: Direct and indirect model based control using artificial neural networks. Indus. Eng. Chem. Res. 30(12), 2564–2573 (1991)CrossRefGoogle Scholar
  42. 42.
    Ruiz, J.L., et al.: Effect of insulin feedback on closed-loop glucose control: a crossover study. J. Diab. Sci. Technol. 6(5), 1123–1130 (2012)CrossRefGoogle Scholar
  43. 43.
    Steil, G.M., Rebrin, K., Darwin, C., Hariri, F., Saad, M.F.: Feasibility of automating insulin delivery for the treatment of type 1 diabetes. Diabetes 55, 3344–3350 (2006)CrossRefGoogle Scholar
  44. 44.
    Teixeira, R.E., Malin, S.: The next generation of artificial pancreas control algorithms. J. Diabetes Sci. Tech. 2, 105–112 (2008)CrossRefGoogle Scholar
  45. 45.
    Vanderbei, R.J.: Linear Programming: Foundations & Extensions, Second Edn. Springer, Heidelberg (2001)., cf.
  46. 46.
    Visentin, R., Dalla Man, C., Cobelli, C.: One-day Bayesian cloning of type 1 diabetes subjects: toward a single-day UVa/Padova type 1 diabetes simulator. IEEE Trans. Biomed. Eng. 63(11), 2416–2424 (2016)CrossRefGoogle Scholar
  47. 47.
    Wang, T., Gao, H., Qiu, J.: A combined adaptive neural network and nonlinear model predictive control for multirate networked industrial process control. IEEE Trans. Neural Netw. Learn. Syst. 27(2), 416–425 (2016)MathSciNetCrossRefGoogle Scholar
  48. 48.
    Weinzimer, S., Steil, G., Swan, K., Dziura, J., Kurtz, N., Tamborlane, W.: Fully automated closed-loop insulin delivery versus semiautomated hybrid control in pediatric patients with type 1 diabetes using an artificial pancreas. Diab. Care 31, 934–939 (2008)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  • Souradeep Dutta
    • 1
  • Taisa Kushner
    • 1
    Email author
  • Sriram Sankaranarayanan
    • 1
  1. 1.University of ColoradoBoulderUSA

Personalised recommendations