Artificial Pancreas - RAEE 2017 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Model based Control of Artificial Pancreas under

Meal Disturbances
Suleman Ata Zeashan Hameed Khan
Department of Electrical Engineering, Department of Electrical Engineering,
Riphah International University, I-14, Islamabad, Pakistan Bahria University, E-8, Islamabad, Pakistan
[email protected] [email protected]

Abstract—In this paper, a model based feedback control system modified if necessary (for example, in the case of
equivalent to the functioning of a natural pancreas in human implementation) [4]. Basal insulin requirements differ from
body is designed to monitor and control its blood glucose level patient to patient and also at different instant of time on the
(BGL). For a diabetic patient, an insulin dose is required to same day.
maintain the glycemic control. The idea of an artificial pancreas
consists of a glucagon pump and an insulin infusion, through
which glucagon/insulin is entered into the patient’s body, based
on the most recent blood glucose level (BGL) as sensed by the
continuous blood glucose monitoring. Initially, the system
response is tested by applying a step input and then a PID
controller is tuned for keeping glucose level within the safe
ranges. Multiple classical and advanced controllers have been
tested to figure out the best result. Optimal performance
requirements are achieved with an MPC controller and glucose
level tracking is performed under unknown but realistic
exogenous meal disturbance. The simulation results show that the
patient safety can be enhanced through implementing a real-time
MPC strategy. Figure 1: BGL monitoring system with implanted continous blood sensor

Fig. 1 shows the continuous feedback system to monitor


Keywords— Artificial Pancreas; Diabetes; Insulin Infusion; the blood glucose level. There were different schemes in
Glucagon Infusion; Simulation
adjusting the monitoring tool with patients body for example,
I. INTRODUCTION with the waist, or fastened with the arm. Several controllers
The artificial pancreas is the technology controlling the have been proposed so far in the literature. For example in [5],
BGL of diabetic patients by providing the insulin and glucose a robust H-infinity based controller of blood sugar is proposed
to avoid hyperglycemia and hypoglycemia state. Insulin as a to withstand various disturbances. Though, the robust
vital hormone is secreted by the beta cells in the pancreas, controller obtained by such methods is of higher order and it
which reduces the concentration of glucose in the blood by requires model order reduction to approximate it equal to the
suppressing the production of sugar in the liver and promote plant’s order. Some researchers also proposed nonlinear and
the use of glucose [1]. On the other hand, by using the alpha adaptive control algorithms as in [6], [7]. Such complex
cells, it secretes glucagon in the pancreas and increases the algorithms are not found suitable for real time precision
concentration of glucose in the blood by converting glycogen control of biomedical systems. Some classical techniques e.g.
stores in the liver into glucose and release into the PID control is also applied to this problem with some robust
bloodstream. The second pump secretes glucagon by the alpha design techniques to ensure performance [8]. Some individual
cells in the pancreas and increases the concentration of analysis includes design of PID and predictive controller as a
glucose in the blood by converting glycogen stores in the liver separate effort [9-11]. However, a comparison of such
into glucose and release into the bloodstream. In healthy approaches is found missing to evaluate the efficacy and
people, level of glucose in the blood is controlled tightly by performance of the blood sugar controller. We intend to
these two hormones [2, 3]. propose a comparison of two popular algorithms i.e.
Insulin therapy using pump was first proposed in late proportional-integrator-derivative (PID) and model predictive
1970s, in which fast-acting insulin is delivered continuously control (MPC) so that a choice for real time control algorithm
by a portable pump. Insulin is supplied in the subcutaneously is evident from the simulation results.
via implanted thin cannula attached to a reservoir through a This paper is organized as follows: Section 2 describes
tube. The pump injects insulin in two ways. First, the basal the dynamics of diabetes mellitus (DM); Section 3 defines the
delivery is a 24 hours continuous infusion, at a variable rate system model and basic parameters, Section 4 details about
pre-programmed in the reservoir control pump and can be the control algorithm and simulation results. Section 5
compares the performance of PID and MPC controller under

978-1-5386-2234-6/17/$31.00 ©2017 IEEE


the meal disturbance effect, while Section 6 finally concludes manner algorithm continuously in response aimed at levels
the paper. glycemic glucose [13]. Closed-loop systems have the
prospective to transform diabetic care to next level and
II. DIABETIES MELLITUS AND ITS CONTROL improve the quality of life for diabetic patients as shown in
Diabetes is a life-long chronic disease and leading a cause Fig. 3 [14].
of death [12]. It deals with high blood sugar and a lack of
insulin as shown in Fig. 2.

x Type 1: In this case, the patients are not able to


produce insulin. Type 1 is only found in about 5% of
people of with diabetes.
x Type 2: For such patients counting approximately
95% of DM, they are able to produce insulin;
however, their bodies build up a resistance towards
the insulin secretion. Therefore, it is not sufficient to
control BGL within the good ranges. Figure 3: Closed-loop delivery system

It is important to note that for both Type 1 and Type 2 The method commonly used to check BGL is that the
patients, medicines (or insulin) are required to control glucose patients prick themselves to check their blood sugar levels.
level in the body. However, as there is no permanent healing The closest thing to the artificial pancreas is an insulin pump.
from diabetes, the medication must be continued life time
Table 1 Blood sugar reference ranges in fasting and random [6]
which is troublesome as injecting the insulin twice daily is
mg/dl Fasting After Eating 2-3 hours after
painful to most of the diabetic patients. Scientists and Eating
researchers have recommended an autonomous pancreas for Normal 80-100 170-200 120-140
the convenience of diabetic patients. However, since the Impaired 101-230 190-230 140-160
healthcare products need a much stringent requirements to Glucose
Diabetic 126+ 220-300 200+
pass various tests on patients before they are available in the
market, the need to obtain a safe and deterministic control
performance is a mandatory. This opens the research area to Where, the artificial pancreas takes the insulin pump to a
test and verify various algorithms for the control of artificial new level by adding real-time monitoring systems [15] , [16].
pancreas. Table 1 shows the reference values for blood sugar level in
healthy persons. Fig. 4 provides a graphical representation of
this variation for diabetic patients as compared to normal
persons.

Figure 4: Normal Blood Glucose Ranges & Blood Glucose Chart

Figure 2: Working of natural pancreas to maintain normal blood glucose level The closed loop system shown in Fig. 3 uses a computer
attached to the insulin pump to continuously measure glucose
Although, the sensors and pump technologies are in the blood and insulin in the body. The artificial pancreas is
progressing well, the gross challenge is to combine the two in going to make the lives of diabetes much more manageable. It
an automated manner. Delivery of closed-loop systems (often then uses algorithms to increase the insulin levels as the body
called "artificial pancreas") regulate glucose levels through a needs it. The artificial pancreas has four major parts including
combination of the two devices through sports dosing glucose sensors and transmitter that measures the level of
algorithm. It is altered insulin delivery every 1-15 minutes by glucose concentration in the body. The information is then
controlling glucose sensor based on the levels of glucose in a transmitted to a receiver that displays the glycemic levels for
the patients. An embedded controller calculates in real time, The simulation model is developed by taking values shown in
the required dose of insulin which is needed to compensate the Table 2. Using these values and adjusting the delays, an effort
increase in glycemic level. Furthermore, the embedded is made to make the plant more realistic/equivalent to the real
controller actuates the insulin pump via Bluetooth to release human body.
the appropriate dose of insulin into the patient [17], [18].

Table 2: Modified Bergman Model Parameters


Parameters Values
p1 0.0337 min-1

p2 0.0209 min-1

p3 7.5 u106 (PU / ml) 1

X U
0.0054P
ml
G 0.81 mg/ml
Gb 0.811 mg/ml
N 0.214 min 1
T 5 min

III. SYSTEM MODEL Figure 6: Block Diagram of Equivalent System with Disturbance
There are many researchers who have proposed the insulin-
glucose model of a human body. Bergman minimal model
equations are used to define relationship b/w concentration of
insulin, glucose and BGL [19].

dG(t )
 p1 >G(t )  Gb @  X (t )G(t )  >D(t )  C (t )@......(1)
dt
dX (t )
 p2 X (t )  p3 >I (t )  I b @......(2)
dt
dI (t )
n>I (t )  I b @  8>G(t )  h@ t  r (t )......(3)
t

dt

Where:
ƒ G(t): Instantaneous glucose concentration
ƒ X(t): Effective amount of insulin used
Figure 7: Step Response of the System with disturbance
ƒ I(t): Instantaneous insulin concentration
ƒ Gb and Ib: Concentration of glucose
ƒ P1, P2, and P3: Model parameters IV. CONTROLLER DESIGN
ƒ n: Rate at which insulin is being injected In literature, various control algorithms exist which were
ƒ h: Lowest value of blood sugar aimed to control the BGL level in closed loop. These
ƒ Y: Rate of endogenous release of insulin algorithms have been tested in simulations and a few on
animals and on diabetic patients [20]. To control the response
of plant/patient’s glucose level, closed loop control is needed.
This controller will help to normalize the BGL in certain
limits and continuously monitor the output. The closed loop
diagram of an artificial pancreas with insulin and plant is
shown in Fig. 10.

Figure 8: Closed loop Diagram


Figure 5: Simulink Block Diagram
In the present work, we consider the generalized continuous
time system in state space form as:
x
x m (t ) Am xm (t )  Bmu (t ) ……. (4)
y Cm xm (t )

Figure 10: PID controller response with disturbance

Considering the general system representation in Eq. 4,


we assume a linear time invariant (LTI) system, which when
disturbed converges to zero; after the transient period,
showing the global asymptotical stability. The closed loop
system with initial conditions x(ti ) is observed as:
Figure 9: PID Auto-tune Parameters x(W ) e( ABK )W x(ti )
….. (6)
x
a) PID Controller: u (W )  Ke ( ABK )W x(ti )
PID controller is an all-purpose feedback control
mechanism which is widely used in multiple applications. The Suppose that the ‘K’ is selected such that the system is
purpose of the PID control algorithm for artificial pancreas is stable with all eigenvalues of the closed loop system
to control the insulin delivery rate by calculating glucose level Acl ( A  BK ) placed in the stable left half of the s-plane by
from three aspects namely the proportional component which x
is directly related to the error term, the integral component applying a finite u (W ) such that u (W ) decays to zero
which sums up the error and the derivative component which exponentially. Since the control is based on a predictor
handles the rate of change of the error. Matlab offers PID estimator, we assume that at time every instant t i , the state
auto-tune GUI for designers as shown in Fig. 9. Some
controllers include only a subset of the modules [21], [20]. variable x(ti ) is available as follows:
W
The generalized formula for the continuous time controller is
x ti  W ti e AW x(ti )  ³ e A(t W ) B u (J )dJ .….. (7)
x

given as in Eq. 4.
0
§ 1 · ……. (5) Whereas, the zero mean random disturbances (including
PID K p ¨¨1   Td ¸¸
© Ti ¹ the deterministic and stochastic disturbances) have zero
expected effect in the future prediction. Using the predicted
Table 3: Summary of PID Controller Parameters values of the state variable, the output prediction at time W is:
Parameter Value
P 51.16 y ti  W ti Ce AW x(ti )  CI (W )T K …... (8)
I 0.7589
D 860.22
N 12.2 It is desired to minimize the cost function J, which results
Rise time (sec) 12.5 in an optimal controller within the moving window which is
Settling time (sec) 38.9 expected to take the form:
Overshoot (%) 6.52
Peak value 1.07
Tp
§ ·
³ ¨© x t  W ti Qx ti  W ti  u (W )T R u (W ) ¸dW …… (9)
Gain Margin (dB) 40.3 x x
T
Phase Margin (deg) 63 J i
Closed loop stability Stable 0 ¹

Where, x (ti ) describes the state’s initial conditions. ‘Q’


b) Model Predictive Control (MPC)
MPC controller offers several additive advantages as it and ‘R’ are semi-positive definite weights describing the
performs many important tasks by respecting the input and optimal performance such that Q, R t 0 .
output constraints of the system, prevention against extreme
movement of the input variables as well as optimal set points c) MPC Design Results
for controlled state variables, while retaining other outputs The model predictive controller is designed to realize a
within preset limits [7]. Since, it is an estimation based closed loop control. In this paper, working and results of MPC
controller, it can be used for diagnosis and control controller is shown. MPC is a model based technique that uses
reconfiguration when a sensor or actuator is not available [9]. a generalized patient model to predict the correction for the
glycemic levels. In order to find out the correct insulin dosage, simulating this controller. Fig. 12 depicts the response of the
the MPC algorithm uses an optimized controller calculated at BGL control with MPC algorithm when a meal disturbance is
each sampling instant by minimizing a quadratic cost function. applied. The prediction horizon is selected as 30 samples
while control horizon is 2 samples for faster correction in real
time.
V. PERFORMANCE COMPARISON
Various control algorithms have been proposed including
classical controllers for linear systems e.g. PID, Lead/Lag
compensators as well as advanced optimal/robust control
algorithms such as H-infinity, MPC, H2 optimal controller,
sliding mode control and some soft algorithms like fuzzy and
neural network control. PID controllers are the most powerful
controller in classical control algorithms and widely used in
controlling glucose level abnormalities. Generally, PID
Figure 11: MPC Parameters selection operates on input tracking by finding the output error, i.e.
difference b/w desired BGL and current BGL. In the PID
This cost function includes the term that adjusts the set control, the integral part affects the amount of delivered
point i.e. the difference b/w the future value prediction for the insulin at much higher stage causing the over-dozed effect and
blood glucose level, the desired set point as well as the insulin increases the risk of hypoglycemia. Thus, in critical
required rate [22]. The prime benefit of this control scheme is biomedical applications such as the one under consideration,
that unlike PID, it can predict future glucose excursion and the glucagon insulation is required which is considered as the
able to act in a proactive fashion to evade the stage of unnecessary loss of glucagon [23]. The limitation of classical
hypoglycemic and hyperglycemic ensuring safety. approach algorithms (PID) indicate the need for advanced
control algorithms.
The anticipated performance for the two control methods
using a PID controller and an MPC is presented. Fig. 11
presents an optimized PID tuning results for BGL control in
the presence of disturbance. When compared with Fig. 12, it is
evident that the MPC controller offers less fluctuation in the
controlled variable and perfectly limits the disturbance.
VI. CONCLUSION
The paper presents a comparison of PID and MPC for the
application of an artificial pancreas. The results show that the
Figure 12: MPC Results MPC algorithm is more favorable and safe for the glycemic
control under fasting and overnight conditions in T1DM
Furthermore, MPC allows the control of the input and patients as it offers prediction based control of BGL and real
output constraints. Whereas, in design review, MPC auto- time adaptation in case of meal disturbances which provides
generated tests shows the controller’s internal stability, closed better regulation as compared to a fixed parameter PID
loop nominal stability, closed loop steady state gains and controller.
memory size for MPC data. If limits exceed in designing, than
the status of test performed changes to warning/fail otherwise
it shows ‘Pass’ in the status and results can be seen by

References [3] L. M. Huyett, E. Dassau, H. C. Zisser, and F. J.


Doyle, "The impact of glucose sensing dynamics
[1] Y. Wang, E. Dassau, and F. J. Doyle III, "Closed- on the closed-loop artificial pancreas," in American
loop control of artificial pancreatic-cell in type 1 Control Conference (ACC), 2015, 2015, pp. 5116-
diabetes mellitus using model predictive iterative 5121.
learning control," Biomedical Engineering, IEEE [4] R. Hovorka, K. Kumareswaran, J. Harris, J. M.
Transactions on, vol. 57, pp. 211-219, 2010. Allen, D. Elleri, D. Xing, et al., "Overnight closed
[2] F. J. Doyle, L. M. Huyett, J. B. Lee, H. C. Zisser, loop insulin delivery (artificial pancreas) in adults
and E. Dassau, "Closed-loop artificial pancreas with type 1 diabetes: crossover randomised
systems: engineering the algorithms," Diabetes controlled studies," Bmj, vol. 342, p. d1855, 2011.
care, vol. 37, pp. 1191-1197, 2014. [5] H. Aicha and A. Mourad, "H-infinity controller
design for blood glucose regulation in diabetes
patients in the presence of uncertain parameters," [17] M. Nomura, M. Shichiri, R. Kawamori, Y.
in Control, Engineering & Information Technology Yamasaki, N. Iwama, and H. Abe, "A
(CEIT), 2015 3rd International Conference on, mathematical insulin-secretion model and its
2015, pp. 1-6. validation in isolated rat pancreatic islets
[6] D. Boiroux, A. K. Duun-Henriksen, S. Schmidt, K. perifusion," Computers and biomedical research,
Nørgaard, N. K. Poulsen, H. Madsen, et al., vol. 17, pp. 570-579, 1984.
"Adaptive control in an artificial pancreas for [18] B. P. Kovatchev, M. Breton, C. Dalla Man, and C.
people with type 1 diabetes," Control Engineering Cobelli, "In silico preclinical trials: a proof of
Practice, 2016. concept in closed-loop control of type 1 diabetes,"
[7] R. Hovorka, V. Canonico, L. J. Chassin, U. ed: SAGE Publications Sage CA: Los Angeles,
Haueter, M. Massi-Benedetti, M. O. Federici, et CA, 2009.
al., "Nonlinear model predictive control of glucose [19] S. M. Furler, E. W. Kraegen, R. H. Smallwood,
concentration in subjects with type 1 diabetes," and D. J. Chisholm, "Blood glucose control by
Physiological measurement, vol. 25, p. 905, 2004. intermittent loop closure in the basal mode:
[8] L. M. Huyett, E. Dassau, H. C. Zisser, and F. J. computer simulation studies with a diabetic
Doyle III, "Design and evaluation of a robust PID model," Diabetes care, vol. 8, pp. 553-561, 1985.
controller for a fully implantable artificial [20] S. A. Weinzimer, G. M. Steil, K. L. Swan, J.
pancreas," Industrial & engineering chemistry Dziura, N. Kurtz, and W. V. Tamborlane, "Fully
research, vol. 54, pp. 10311-10321, 2015. automated closed-loop insulin delivery versus
[9] H. Lee and B. W. Bequette, "A closed-loop semiautomated hybrid control in pediatric patients
artificial pancreas based on model predictive with type 1 diabetes using an artificial pancreas,"
control: Human-friendly identification and Diabetes care, vol. 31, pp. 934-939, 2008.
automatic meal disturbance rejection," Biomedical [21] F. Chee, T. L. Fernando, A. V. Savkin, and V. Van
Signal Processing and Control, vol. 4, pp. 347- Heeden, "Expert PID control system for blood
354, 2009. glucose control in critically ill patients," IEEE
[10] H. Lee, B. A. Buckingham, D. M. Wilson, and B. Transactions on Information Technology in
W. Bequette, "A closed-loop artificial pancreas Biomedicine, vol. 7, pp. 419-425, 2003.
using model predictive control and a sliding meal [22] H. Lee, B. A. Buckingham, D. M. Wilson, and B.
size estimator," Journal of diabetes science and W. Bequette, "A closed-loop artificial pancreas
technology, vol. 3, pp. 1082-1090, 2009. using model predictive control and a sliding meal
[11] X. Qiao, F. Luo, and Y. Xu, "Robust PID Control size estimator," ed: SAGE Publications, 2009.
Design via Mixed Particle Swarm Optimization [23] G. Marchetti, M. Barolo, L. Jovanovic, H. Zisser,
Algorithm and Gap Metric," 2016. and D. E. Seborg, "An improved PID switching
[12] C. Ellingsen, E. Dassau, H. Zisser, B. Grosman, M. control strategy for type 1 diabetes," IEEE
W. Percival, L. Jovanovič, et al., "Safety Transactions on Biomedical Engineering, vol. 55,
constraints in an artificial pancreatic β cell: an pp. 857-865, 2008.
implementation of model predictive control with
insulin on board," Journal of diabetes science and
technology, vol. 3, pp. 536-544, 2009.
[13] S. H. Khan, A. H. Khan, and Z. H. Khan,
"Artificial Pancreas Coupled Vital Signs
Monitoring for Improved Patient Safety," Arabian
Journal for Science and Engineering, vol. 38, pp.
3093-3102, 2013.
[14] R. Bellazzi, C. Larizza, and A. Riva, "Temporal
abstractions for interpreting diabetic patients
monitoring data," Intelligent Data Analysis, vol. 2,
pp. 97-122, 1998.
[15] C. Cobelli, E. Renard, and B. Kovatchev,
"Artificial pancreas: past, present, future,"
Diabetes, vol. 60, pp. 2672-2682, 2011.
[16] F. H. El-Khatib, S. J. Russell, D. M. Nathan, R. G.
Sutherlin, and E. R. Damiano, "A bihormonal
closed-loop artificial pancreas for type 1 diabetes,"
Science translational medicine, vol. 2, pp. 27-32,
2010.

You might also like