Design Optimal Modified Internal Model Controller of Blood
Glucose for Type I Diabetes
Ekhlas H. Karam, Eman H. Jadoo
Abstract— Type I diabetic patients is a chronic condition marked by an abnormally large level of glucose in the blood. Persons with diabetes characterized by no insulin secretion within the pancreas (fi-cell) which also referred to as insulin-dependent diabetic Mellitus (IDDM). The treatment of type I diabetes counting on the delivery of exogenous insulin to succeed in the blood glucose level near the natural ranges (70-110mg/dL). In this paper, a Modified Internal Model Controller (MIMC) has been developed based on three different nonlinear functions to control the concentration of blood glucose levels under a disturbing meal. The parameters of the proposed control design are optimized by using Chaotic Particle Swarm Optimization (CPSO) technique. The model which is used to represent the artificial pancreas is a minimal model for Bergman. Simulations, based on MATLAB/Simulink, were performed to verify the performance of the proposed controller. The results showed the effectiveness of the proposed MIMC in controlling the behavior of glucose deviation to a sudden rise in blood glucose.
Keywords— Type 1diabetes,Internal Model Control (IMC), Bergman minimal model, Chaotic Particle Swarm Optimization (CPSO), BGL.
i. Introduction
Diabetes mellitus is one of the most important chronic diseases which results from a high blood sugar for a long time due to insufficient insulin generation in the blood [1]. The concentration of glucose in the bloodstream is naturally regulated by two hormones: insulin and glucagon. Both of these hormones are secreted by p-cells and a cells in the Langerhans islands of the pancreas, respectively. The concentration of glucose ranges from 70 to 110 (mg / dl). Accordingly, there are two states, hyperglycemia (glucose concentration is above the normal ranges) and hypoglycemia (low glucose concentration than the normal ranges) [2]. Diabetes is classified into two common types. Type 1 diabetes mellitus (T1DM) is caused by the autoimmune destruction of (P-cells) in the pancreas that produce insulin deficiency. Therefore, patients with insulin-dependent Type 1 diabetes mellitus, they need insulin injections to regulate the external glucose concentration they have to a normal level. Type 2 diabetes begins with insulin resistance, a condition in which cells do not respond to insulin properly. This model is noninsulin-dependent diabetes-dependent diabetes. The most common cause is excessive body weight and not enough exercise [3].
The close loop control system is designed to normalize the high blood glucose level for diabetes patients. The closed-loop of the blood glucose control system, one needs the use of a glucose sensor that can measure blood glucose level. This information will passed to a control system to calculate the necessary insulin delivery rate to keep the blood glucose level in a stable range and hence a mechanical pump can deliver the desired amount of insulin. As shown in Fig.(1) the closed-loop method is more reliable in maintaining the level of blood glucose and also is close to normal pancreas [4].
L______________________I
Fig.(1): Closed loop insulin regulation system block.
The internal model controller (iMc ) is one of the well-known based controls and has been widely used to design the biomedical systems because of simplicity, strength and good control performance. therefore has been widely used to design the feedback controller for type i diabetes in order to determine the delivery of exogenous insulin to reach the blood glucose level near the normal range of insulin delivery. Different IMC has been used suggested to feedback controller for insulin delivery as PSO-PD & PSO-IMC controller [2] and EIMC (Enhances Internal model Controller) [5], optimal IMC controller based on Genetic Algorithm (GA) [6] as well as robust SMC controller with internal model controller (SMC-IMC) [7]. In this paper, optimal modified IMC is suggested and designed based on different nonlinear functions for the glucose concentration level control problem in diabetic patients under meal disturbance.
The paper is categorized into four sections. In Section 2, Bergman's minimal model has been formulated. Section 3 presents the internal model controller (IMC) and the modified internal model controller (MIMC). In section 4, simulation results have been provided with thorough discussion. Finally, the conclusion is presented in section 5.
II. Insulin-Glucose Regulation model
Different mathematical models have been proposed to understand the dynamics of diabetes and to correlate the relationship between glucose and insulin distribution models that help design a diabetes
model. Among these models, the minimal Bergman model, a common reference model in the literature, approaches the dynamic response of blood glucose concentration in a diabetic to insulin injections. Bergman model consists of three differential equations as follows [3, 6]:
G(t) = -Pl(G(t) - Gb) - X(t)G(t) + D(t) X(t) = -p2X(t) + p3(I(t) - lb)
i(t) = -n(I(t) + Ib) + y[G(t) - h] + t + u(t)
(1)
where G(t) is the plasma glucose concentration in [mg/dL], X(t) proportional to the insulin concentration in the remote compartment [1/min], I(t) is the plasma insulin concentration in [mU/dL], and u(t) is injected insulin rate in [mU/min], (p1,p2,p3,n,h,y) are parameters of the model. The term, y[G(t) - h]+ in the third equation of this model, serves as an internal regulatory function that formulates insulin secretion in the body, which does not exist in diabetics, the u(t) represent the rate of exogenous insulin . The value of p1 will be significantly reduced; therefore it can be approximated as zero [9,10]. The D(t) is disturbance signal (meal disturbance) can be modeled by a decaying exponential function of the following form [7]:
D(t) = Aexp(t - tmeal)
(2)
The nonlinear mathematical model (Eq.(1)) become linear around steady state values of the model the transfer function of overall system is given below [10]:
G(s) _ u(s)
G(s)
u(s)
(s+p1) + (s+p2) + (s+n)
(3)
-P3Cb
S3 + S2(n+Pi+P2) + s(npi+np2 + PlP2)+PlP2n
(4)
III. Classical Internal Model Control (CIMC) Design
The IMc is a method that depend on using plant model to build the controller. It is a commonly used technique that provides a transparent mode for the designing and tuning of various types of control architecture. The IMC has many advantages including the simple structure and only parameter tuning. Due to simple design principle and convenient parameter tuning [11]. The block diagram of internal model control is given below (Fig.2).
Fig.(2): Classical Internal Model Control.
The Q(s) is the primary controller IMC transfer function, u(s) is manipulated variable, r(t) the reference
input and (s) is the approximate linear reduction model.
The process model (s), must first be factored into invertible and non-invertible parts, that is [11]: Gp(s) = Gp+(s) x Gp_(s) (5)
where Gp +(s )is non-invertible part containing all nonminimum phase elements (delays and right half plane (RHP) zeros).And Gp _(s )is a invertible model without delays and right hand zero .
Then using only the invertible component of the process model,
( ) ( ) (6) (the controller is the inverse of the process model) Augment ( ) with an IMC filter, ( ). The final IMC controller is defined as:
Qc(s) = Gp _(s)-1 x f(s) (7)
with
f(S ) = (8)
In order to design the IMC the parameters value of (Table I) are used, the approximate transfer function for glucose insulin regulatory mechanism becomes:
( )
-0.00155
SA 3 + 0.3099 SA2 + 0.01209s + 0.0001037
(9)
The above equation is reduced to second order transfer function by using Matlab command (reduce instruction), therefore the resulted reduction equation is:
Gp(S) =
aos+fl! 0.003055 s - 0.001205
s2+b1s+b2 s2+ 0.04111 s+0.0003642
(10)
In order to simplified the design of IMC, the zero of Eq.(10) numerator is replaced by scalar k as illustrated in Eq.(11):
gp(s) =
bç)S+ bi
s*+ais+a2 s*+mis+m2
The obtained transfer function become:
gp(s) =
s + 0.03799S+ 0.0003291
Therefore, the IMC controller qc(s) is:
gp(s) =
s + 0.03799S+ 0.0003291 - 0 .0 0 l 0 8 9(ÂS+1)2
(11)
(12)
(13)
The filter time constant 2 is must be selected, in this paper this parameter is tuned by Chaotic Particle swarm optimization (CPso) algorithm.
TABLE I. Bergman Minimal Model Parameters [9].
Parameter normal Patientl Patient2 Patient3
Pi 0.0317 0 0 0
P2 0.0123 0.02 0.0072 0.0142
Ps 4.92 5.3 X 2.16 X 9.94 X
10"6 10"6 10"5
n 0.2659 0.3 0.2465 0.2814
Y 0.0039 - - -
h 79.0353 - - -
Gb 70 70 70 70
h 7 7 7 7
IV. Modified Internal Model Controller (MIMC) In this section a modified internal model controller structures are developed to regulate the blood glucose concentration as shown in Fig.(3). Where the CIMC is modified by adding a simple nonlinear function /( e( t)), thus the performance of the overall controlled system will be enhanced. Three nonlinear are used, the first /( e( t)) is [12 ]:
/(e(0) = mi * ( 1 - em2e(t)) ( ) ( ) ( )
(14)
(15)
where e( t) is the error between the normal blood glucose concentration level (r ( t)) and the actual blood glucose level (y (t)) and (m, m2) are small positive numbers which can be tuned by using the CPSO algorithm as shown below:
Fig. (3): The MIMC controller block diagram.
The second nonlinear function /( e( t)) is: /(e(t)) =K„tanh(e(t)) (16)
where ( ) is tangent hyperbolic function which is nonlinear function, the parameters is positive numbers tuned by the CPSO algorithm. The third nonlinear function is /aZ(.) [13]:
/a/(e,a,5) = { "a)'
lei < S
(17)
Fig.(4) depicts the characteristics of the /a/(e , a, 5) function. The parameters (5, a) are tuned by CPSO algorithm.
V.
Fig. (4): Block diagram of /aZ(e , a, 5) function characteristics.
Chaotic Particle Swarm Optimization (CPSO) Algorithm
The Particle Swarm Optimization algorithms (PSO) is the common evolutionary techniques. Which is adopt a random sequence for their parameter. The PSO algorithm is initialized with a population of candidate solutions which is called a particle. N particles are moving around in a D-dimensional search space of the problem [14].
The position of the i th particle at the i th iteration is represented by Xj( t) = (Xj 1,Xj2,...,XjD).The velocity for particle can be written as ( )
the
| e | i gn( e), | e | > 5 where 5 is a small number used to express the length of the linear part, and 0 < a < 1.
(v j 1,v¿2,...,v jD).The best position that has so far been visited by the particle is represented as
p i=(p j ¿2,...,p jD) which is also called pbest. The global best position attained by the whole swarm is called the global best (gbest) and represented as
( )=( ). The velocity vector at the
iteration is represented as ( )=( ). At the
next iteration, the velocity and position of the particle are
calculated according to (21,22) ( ) ( ) ( ( ) ( ))
c2r2(gb e s t j( 0 -Xj( 0) (18)
X( t + 1 ) = x( t) + v j( t) (19)
Where c^, c2 are called acceleration coefficients. w is called inertia weight, and are random value in the range [0, 1].
The parameters w, r and r2 is the key factors that effected the convergence behavior [15]. In the Chaotic Particle Swarm Optimization algorithms (CPSO) the parameters ci and c2 are modified by using logistic map based on the following equation:
M(t + 1 ) = /¿*M(t) * ( 1-M(t)) 0<M(t)<1
(20)
Where ( ) generated randomly for each independent run and . Then introduce a new velocity update as in
equations (21). ( ) ( ) ( ( ) ( )) (
) ( ( ) ( )) (21)
important advantages of the chaotic optimization algorithm (COA) are summarized as: easy implementation, short execution time and speed-up of the search. Observations, however, reveal that the COA also has some problems including: (i) COA is effective only for small decision spaces; (ii) COA easily converges in the early stages of the search process. Therefore, hybrid methods have attracted attention by the researchers [16] The flowchart that represented this algorithm illustrated below.
^—Healthy Person
——Basal Value
Fig.(6): Glucose output of a normal person and patient (open-loop glucose regulatory system).
It can be noted from Fig. (6) that the glucose value of the normal person is stabilized at the basal (desired=70) level, while the patient's glucose level remains dangerous outside the range. secondly the simulation of Bergman model controlled by (CIMC, MIMC with the three nonlinear functions) are carried out dynamically for three patients (see Table (I)) with the initial conditions 290, 200 and 180 mg/dl for patients 1, 2 and 3, respectively. The parameters of meal glucose disturbance of Eq.(2) is A = 0 . 5 start at tm e a i = 400min. The optimal parameters for CIMC, and MIMC tuned by CPso algorithm are illustrate by Table (II). The results for this simulation are shown in Figs. (7-11).
TABLE II the optimal parameters for CIMC, and the suggested MIMC tuned by CPso algorithm.
Fig.(5): General flowchart of the CPSO algorithm.
VI. Simulation and Results The closed-loop system simulates using MATLAB to prove the suggested design confirmation. The simulation result is based on meal glucose disturbance of Eq.(2) and the numerical values of the parameters used in this paper are given in Table I. Firstly the system of (Eq.1) without controller has been simulated for normal and patient person to show the difference between their glucose regulatory systems, the results for this simulation are shown in figure (5).
Controller Parameter Value
Classical IMC A 9.93
MIMC Structure #1 mi 0.65
m2 0.054
MIMC Structure #2 k-n 0.0134
MIMC Structure #3 a 0.45
S 0.5
220 ¡200
E
ïiao
c 160
S
-
0
O 140
3 120
O a
ï. '0«
-CIMC -MIMC St ucture #1 ucture #2 ucture #3 U*
-MIMC SI
100
93 70
№ 69.95
410^.415 420 4! 5 430 077 \ 877. 374
\
I—I
900 1000
0 100 200 300 400 500 £00 700
tlme(min)
Fig.(7): Glucose regulatory system for patientl with CIMC and the suggested MIMCs.
Fig.(10): Insulin infusion rate for patient2 with CIMC and the suggested MIMCs.
Fig.(8): Insulin infusion rate for patient1 with CIMC and the suggested MIMCs.
400 500 600 limefiri n)
Fig.(11): Glucose regulatory system for patient3 with CIMC and the suggested MIMCs.
E
o 100
o 1100
_ CIMC MIMC Structure «1
- MIMC Structure t2 MIMC Structure » Basal Value
94 (V
92 70
90 69-895
410 420 430 69.99
— K 963 963.5 964\^ 64.5 961
-
I_1
400 300 eoo tlme(mln)
Fig.(9): Glucose regulatory system for patient2 with CIMC and the suggested MIMCs.
_J0
E
I* 0) ra
20
c o
<n
a is t
c
3 10
1 -CIMC -MIMC Structure #1 MIMC Structure *1
1
J ft
* \ 35
t.5 \
A
32
38 3 40
40 CO 80 1 400 405 410 415
500 time(min)
900 1000
Fig.(12): Insulin infusion rate for patient3 with CIMC and the suggested MIMCs.
The comparison between performance of the CIMC and three different MIMC structures all for the three patients are shown in Table III to Table V. It can be noticed from Figs (7 to 12) and Table III to Table V that the CIMC gives performance of maximum glucose level for all patients and the MIMC structure#3 shows the best robustness characteristics than all the other controllers with less glucose level for the three patients In addition, the rate of insulin injection rate simulation results confirmed that the proposed controller has a good promising performance in terms of insulin injection rate and TM in comparison with the results of other researches.
TABLE III. The simulation result's evaluation parameters for patient 1.
TABLE IV. The simulation result's evaluation parameters for patient 2.
TABLE V. The simulation result's evaluation parameters for patient 3.
VI. Conclusions
In this paper, a simple modified internal model controller has been suggested based on three nonlinear function and CPSO algorithm. The performance analysis of the suggested control strategy concerning plasma glucose-insulin stabilization is comprehensively demonstrated by computer simulations. To validate the robustness of the suggested controller, the diabetic patient is exposed to external disturbance, that is, a meal. The closed-loop system has been simulated for different patients with different parameters, in the presence of the food intake disturbance and it has been shown that the glucose level is stabilized at its base value in a reasonable amount of time. The effectiveness of the suggested controller compared with the classical IMC are verified by simulation results for three different patients.
Acknowledgment
The authors thank all the colleagues in the Computer Engineering Department, College of Engineering, Mustansiriyah University, for their unlimited support.
References
[1] Basher, A. S. (2017). "design fuzzy control system for blood glucose level for type-1 diabetes melitus patients using GA a simulation study" , MSc.thesis, The Islamic University-Gaza.
[2] Malik, S. F. J. M (2018). "Particle swarm optimisation based blood glucose control in type1 diabetes ", MSc.thesis, Kaunas University of Technology.
[3] Parsa, N. T., Vali, A. R., & Ghasemi, R. (2014). "Back stepping sliding mode control of blood glucose for type I diabetes". World Academy of Science, Engineering and Technology, International Journal of Medical, Health, Biomedical, Bioengineering and Pharmaceutical Engineering, 8(11), 779-783.
[4] Basha, A., & Vivekanandan, S. (2017). "Evolution of diabetic control identification in lieu of continuous glucose monitoring technology"A Review. International Journal of Applied Engineering Research, 12(16), 6102-6107.
[5] Ramprasad, Y., Rangaiah, G. P., & Lakshminarayanan, S. (2004). "Enhanced IMC for Glucose Control in Type I diabetic patients". IFAC Proceedings Volumes, 37(9), 487-492.
[6] Sivaramakrishnan, N., Lakshmanaprabu, S. K., & Muvvala, M. V. (2017). "Optimal Model Based Control for Blood Glucose Insulin System Using Continuous Glucose Monitoring". Journal of Pharmaceutical Sciences and Research, 9(4), 465.
[7] Abu-Rmileh, A., Garcia-Gabin, W., & Zambrano, D. (2010). "A robust sliding mode controller with internal model for closed-loop artificial pancreas". Medical & biological engineering & computing, 48(12), 1191-1201.
[8] Fisher, M. E. (1991). "A semiclosed-loop algorithm for the control of blood glucose levels in diabetics". IEEE transactions on biomedical engineering, 38(1), 57-61.
The controller used ts(mi n .) МЛР£%
CIMC 520.64 6.6 0.0218
MIMC Structure #1 521.81 7.4 0.1583
MIMC Structure #2 520.1 6.11 0.022
MIMC Structure #3 508.04 3.3 0.026
The controller used ts(mi n .) МЛР£%
CIMC 590.93 22.5 0.054
MIMC Structure #1 590.47 21.6 0.0132
MIMC Structure #2 590.78 21.8 0.0364
MIMC Structure #3 586.59 19.3 0.0045
The controller used ts(mi n .) МЛР£%
CIMC 574.99 15.6 0.0127
MIMC Structure #1 574.54 14.8 0.0023
MIMC Structure #2 574.85 15 0.005
MIMC Structure #3 562.94 8.8 0.0002
[9] Yadav, J., Rani, A., & Singh, V. (2016). Performance analysis of fuzzy-PID controller for blood glucose regulation in type-1 diabetic patients. Journal of medical systems, 40(12), 254.
[10] Hassan, S. M., & Riaz, R. A. (2017). "Closed loop blood glucose control in diabetics". Biomedical Research, 28(16), 7230-7236.
[11] Rosmin, Norzanah "Internal Model Control (IMC) design for a stall-regulated variable-speed wind turbine system", 2015. Ph.D. Thesis. © Norzanah Rosmin.
[12] Liu, D., Che, C., & Zhou, Z. (2011, August). Permanent magnet synchronous motor control system based on auto disturbances rejection controller. In 2011 International Conference on Mechatronic Science, Electric Engineering and Computer (MEC) (pp. 8-11). IEEE.
[13] Chen, W. H. (2004). Disturbance observer based control for nonlinear systems. IEEE/ASME transactions on mechatronics, 9(4), 706-710.
[14] Wang, D., Tan, D., & Liu, L. (2018). "Particle swarm optimization algorithm: an overview". Soft Computing, 22(2), 387-408.
[15] Hadi, E. A. (2019). "Multi Objective Decision Maker for Single and Multi Robot Path Planning." , MSc.thesis ,University of Technology, Iraq.
[16] Hosseinpourfard, R., & Javidi, M. M. (2015). Chaotic pso using the lorenz system: An efficient approach for optimizing nonlinear problems. Çankaya Universitesi Bilim ve Muhendislik Dergisi, 12(1).
Ekhlas H. Karam received the BSc in Computer Engineering from the Mosul University, Mosul, Iraq, MSc in Control Engineering and the PhD in Mechatronics Engineering from University of Technology, Baghdad, Iraq. She is an Assistant Professor with the Computer Engineering Department, Mustansiriyah University, Baghdad, Iraq. Her interested areas are Robotic System, Different Controller Design, Optimization Methods, Image Processing and FPGA. Email: ek_karam@yahoo.com
Eman H. Jadoo received the BSc in Computer Engineering from Mustansiriyah University, Baghdad, Iraq, in 2013. Currently she is completing her M.S. study in the Department of Computer Engineering, Mustansiriyah University, Baghdad, Iraq. Her current research interests include Control Systems, Optimization Methods, and FPGA. Email: eman hassony24@yahoo.com