Summary
An automatic insulin dosing mechanism composed of an insulin pump, continuous glucose monitor (CGM), and dose controller, is close to a mechanical cure for Type 1 diabetes. The dose controller is an integral part of the system, and can be designed using a range of techniques from the field of control systems engineering. The AP controller project proposed here would be to research, design, and test dose controllers on virtual patients. If software testing is successful, the controller can be implemented cheaply in hardware as a proof of concept.
Type 1 diabetes is an autoimmune disease which causes the destruction of insulin producing cells in the body. In healthy people, these insulin-producing cells regulate blood glucose levels. People with type 1 diabetes must manually regulate their blood glucose level. Variations in blood glucose result in a variety of adverse physical and mental effects; management of blood glucose is therefore the principal challenge of type 1 diabetes.
Continuous glucose monitors (CGMs) have enabled automated, high frequency, real-time readings of blood glucose levels. To dose insulin, people with type 1 diabetes use either imprecise manual injections via syringe, or precise dosing via insulin pump. Dosing insulin to regulate blood glucose levels is currently a manual process.
The combination of a CGM, an insulin pump, and an automated dose controller is known as a ”Closed Loop System.” Such systems have historically been limited by the imprecision of blood glucose measurement, but they are increasingly viable as sensor technology improves. The logic of the automated dose controller is often referred to as an AP or AP controller, standing for artificial pancreas.
The sensors, infusion sites, and devices required for a closed-loop system are inconvenient, but they enable a functional cure not yet available through biological methods.
The AP Controller project is to implement and test one or more viable insulin dose controller schemes, which would robustly manage blood glucose under a wide variety of intrinsic and external conditions. Intrinsic conditions are differences in insulin resistance and glucose response between patients. External conditions are manual dosing, arbitrary glucose variations caused by meals or exercise, and missed or miscalibrated sensor readings.
The project will be split into three phases. The first phase will be to implement the software patients and a set of comprehensive tests, from which the performance of the control schemes can be compared. The second phase will be to implement and test control schemes in software. The third phase will be to implement the control schemes into hardware. A summary of the higher-order goals is shown in table 1.
Phase | Goal | Category |
Preliminary | ||
∙ Faculty advisor recruitment | admin |
|
∙ Student recruitment | admin |
|
∙ Finalized Winter ’20 Roadmap | admin |
|
∙ Product: Project Proposal and Winter ’19 roadmap |
||
Phase 1 | ||
∙ Implement ”no controller” test case in patient simulator | software |
|
∙ Implement benchmarks for control schemes | software, bio-eng |
|
∙ Product: Phase 1 Design Report |
||
Phase 2 | ||
∙ Review literature re: control schemes | control, bio-eng |
|
∙ Implement control scheme | software |
|
∙ Benchmark and compare control scheme(s) | control, bio-eng |
|
∙ Alter control schemes, test | control, bio-eng |
|
∙ Fundraising for hardware | admin |
|
∙ Product: Phase 2 Design report |
||
Phase 3 | ||
∙ Obtain hardware | admin |
|
∙ Develop hardware testing (response simulated) | hardware |
|
∙ Port control scheme(s) to hardware | software |
|
∙ Test control schemes in hardware | control, software |
|
∙ Product: Phase 3 Design Report |
||
The number of students in the project will determine the timeline of these phases. With just one student: phase 1 could be completed by mid-winter 2020; phase 2 by mid-spring 2020; and the final phase by end of spring into summer of 2020.
Additional students with additional skills would help not only accelerate the timeline but also expand its scope. More models could be compared and more robustly tested. Once the test apparatus is in place, the work could be made parallel – each student could implement their own controller, and then those controllers could be tested against one another.
We will use the FDA approved software simulator, UVA/Padova [4]. A 30-patient (10 adults, 10 children, 10 elderly) version of the simulator is freely available as a python library called simGlucose [7]. Therefore, the codebase of the project will be written primarily in Python 3.
Benchmarking will be composed of an evaluation of the simulation data after a long simulated test period (24 - 48 hours). Benchmarks for controller performance will need to be devised; possibilities include total time in acceptable range, severity of hypoglycemic events, severity of hyperglycemic events, stability of blood glucose. Models will be scored based on a combination of these factors.
CGM noise, missed readings, exogenous changes to blood glucose, and changes to insulin sensitivity can be simulated to test the stability of the controller.
Controllers in closed-loop systems generally fall into two classes: Model Predictive (MPC) and Proportional-Integral-Derivative (PID) controllers. While PID controllers are simpler, MPC controllers have yielded the most promising results in the field. A range of different schemes have been clinically tested – MPC, PID, and some hybrids. And many more have been tested in software. [3, 1]
As a first stage (phase 2), we will implement an already-existing MPC controller. At later stages, we will improve the controller to better suit the AP problem.
Experimenting with controllers using commercial hardware is typically not possible. However, some older model Medtronic pumps1 have been reverse-engineered to be controlled using a 915MHz radio module, which is available from several different manufacturers. The controller itself can run on a Raspberry Pi Zero WH. The pump/controller interface is available under an MIT license from the OpenAPS project [5]. It is also written in Python 3. The pump, radio, and controller hardware are inexpensive, and a complete kit can be purchased for a student budget (under $1000).
Implementing the scheme in hardware, rather than solely in software, is attractive. Since the AP would be a wearable device, implementing as much of it in hardware as possible would provide another important engineering constraint for the model – power, because the complexity of the controller will have direct implications on power usage. Further, it provides a real “proof-of-concept,” a tangible final milestone.
This project is compatible with the ABET student outcomes:
A. an ability to identify, formulate, and solve complex engineering problems by applying principles of engineering, science, and mathematics
The process of selecting and designing a controller for an AP will present a significant engineering challenge. The constraints of the AP problem are unique and will require a solid understanding of control theory and programming. A biological understanding of the response of blood glucose to insulin and environmental factors will be required. Finally, designing the hardware interfaces – particularly the hardware interface with the software patient model – will be an additional challenge.
B. an ability to apply engineering design to produce solutions that meet specified needs with consideration of public health, safety, and welfare, as well as global, cultural, social, environmental, and economic factors
Incidence of Type 1 is increasing throughout the developed word for unclear reasons. The disease affects 1.25 million people in the United States, many of them children. [2, 6] A full closed-loop AP system is the cutting edge of diabetes care – for now, the closest we have to a cure. An robust AP controller is an essential piece.
Also, any medication which can be mechanically delivered and the effects thereof measured on a continuous basis can be controlled in a similar manner. The design (interface between delivery and measurement device) and constraints (incomplete measurements, non-recoverable delivery) of the AP system may partially be shared by other medications in other contexts.
C. an ability to communicate effectively with a range of audiences
A single-person project would require close communication with project advisors, sponsors, and the general public. We will need literacy in multiple areas: engineering, biological science, and project management. If the project recruits multiple students, communication between team members will be not only a core priority, but essential to a successful outcome.
D. an ability to recognize ethical and professional responsibilities in engineering situations and make informed judgments, which must consider the impact of engineering solutions in global, economic, environmental, and societal contexts
Safety is the largest challenge of the artificial pancreas, because insulin, once delivered, cannot be removed. Hypoglycemia, caused when too much insulin is delivered, causes impairment in the best case and death at worst. On the other hand, hyperglycemia causes both short-term and long-term damage. While there is no physical risk for this project, minimizing both frequency and severity of hypoglycemia events will be a core constraint, just as it would be in a real closed-loop system.
E. an ability to function effectively on a team whose members together provide leadership, create a collaborative and inclusive environment, establish goals, plan tasks, and meet objectives
To accomplish the multiple phases of the project, a significant amount of planning will be required. Due to the interdisciplinary nature of the project, extensive collaboration between team members and advisers will be required. If multiple students are recruited, they will need to work together to succeed, because the team would need to work across disciplines.
F. an ability to develop and conduct appropriate experimentation, analyze and interpret data, and use engineering judgment to draw conclusions
A large amount of data will be produced from the software simulations. Interpreting this data to inform the design of the controller will be a central challenge of the project.
G. an ability to acquire and apply new knowledge as needed, using appropriate learning strategies.
The AP problem has been studied since the 1970 [1] – a wide body of research has been produced about the design of AP controllers in particular.
FrancisJ. Doyle et al. “Closed-Loop Artificial Pancreas Systems: Engineering the Algorithms”. In: Diabetes Care 37.5 (2014), pp. 1191–1197.
Edwin A.M. Gale. “The Rise of Childhood Type 1 Diabetes in the 20th Century”. In: Diabetes 51.12 (2002), pp. 3353–3361.
Roman Hovorka. “Closed-loop insulin delivery: from bench to clinical practice”. In: Nature Reviews Endocrinology 7.7 (Feb. 2011), pp. 385–395. issn: 1759-5037. doi: 10.1038/nrendo.2011.32. url: http://dx.doi.org/10.1038/nrendo.2011.32.
Chiara Dalla Man et al. “The UVA/PADOVA Type 1 Diabetes Simulator”. In: Journal of Diabetes Science and Technology 8.1 (Jan. 2014), pp. 26–34. issn: 1932-2968. doi: 10.1177/1932296813514502. url: http://dx.doi.org/10.1177/1932296813514502.
OpenAPS. 2019. url: https://openaps.org/.
Christopher C. Patterson et al. “Trends and cyclical variation in the incidence of childhood type 1 diabetes in 26 European centres in the 25 year period 1989–2013: a multicentre prospective registration study”. In: Diabetologia 62.3 (Nov. 2018), pp. 408–417. issn: 1432-0428. doi: 10.1007/s00125-018-4763-3. url: http://dx.doi.org/10.1007/s00125-018-4763-3.
Jinyu Xie. Simglucose v0.2.1. 2018. url: https://github.com/jxx123/simglucose.