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

2019 International Conference on Information Systems and Computer Science (INCISCOS)

Comparison between PID-Fuzzy and Numerical


Methods based on linear Algebra controllers for
Glucose control in Type 1 Diabetes treatment.
Bryan Moreano, Juan Pumisacho Oscar Camacho, Danilo Chavez
Facultad de Ingeniería Eléctrica y Electrónica Facultad de Ingeniería Eléctrica y Electrónica
Escuela Politécnica Nacional Escuela Politécnica Nacional
Quito, Ecuador Quito, Ecuador
{bryan.moreano, juan.pumisacho}@epn.edu.ec {oscar.camacho,danilo.chavez}@epn.edu.ec

Abstract–- The main problem of treatment in Type 1 Diabetes


The most effective treatment for T1DM involves the
Mellitus is to maintain glycemia between Normal levels in order to
reduce possible long-term nervous and vascular complications. A provider of insulin. On the other hand, insulin cannot be taken
possible solution for this is an Artificial Pancreas because it orally because all the ingested proteins are reduced to fragments
automatically provide enough insulin amount during the day. In into the stomach. Thus, insulin will lose its properties.
recent years, a variety of PIDs and MPC controllers have been Therefore, insulin can only be administered parenterally, that
developed for the proper functioning of the artificial pancreas. is, subcutaneously or intravenously. An artificial pancreas has
This paper presents the design and evaluation of two controllers, meant an improvement for patients with T1DM in their
a Numerical Methods based on Linear Algebra and a PID-Fuzzy. lifestyle, since it not only allows a stricter control of the levels
The simulation is based on 3 meals per day and different of glucose present in the blood, but also it avoids the discomfort
parametric variations. The simulation analysis shows that PID-
that patients have at the time of injecting insulin through the
Fuzzy maintains blood glucose levels better than the NMLA. The
controllers are compared using several performance indexes such
day.
as: settling time, ISE and TVu. Finally, a noise source has been The artificial pancreas (AP) is known as a closed control
added to the glucose sensor in order to see how the controllers are loop, which combines a real-time monitoring system for
affected.
glucose, an insulin pump and a control algorithm. This system
Keywords-–Artificial Pancreas, Type 1 Diabetes Mellitus, PID, automates the ingest of insulin based on the blood glucose
Feedforward, Fuzzy controller, Numerical Methods response of the patient trying to emulate the performance of a
healthy pancreas [4].
I. INTRODUCTION The main design problem for this type of system is eliminate
According to the World Health Organization (WHO) in the hyperglycemia and hypoglycemia episodes; also the
World Report on Diabetes, worldwide is estimated that 422 investigators should consider the parametric variations that are
million people had diabetes in 2014 [1], which is equivalent to found naturally in this systems [5]. Parametric variations occur
a prevalence of 8.5% of the adult population, and in developing due to insulin sensitivity, insulin action times and the amount
countries the number of people with diabetes will increase by of carbohydrates consumed, all these parameters changes
150% in the next 25 years. The large increase in the number of through the day even in healthy people. Other physiological
people with diabetes is due to the increase in the number of factors to be considered are atypical levels of glycemia, changes
people with overweight, obesity and in general physical in emotional state, atypical consumption of food, among others.
inactivity. There are several physiological glucose-insulin models
Type 1 Diabetes Mellitus (T1DM) affects 5% to 10% of among which we can name Ackerman’s model and Bergman’s
population who has Diabetes. Moreover, it affects mainly to Minimum model [6], these models have been based on
children and adolescents. This type of Diabetes is caused by an investigations in short periods of time without considering
autoimmune reaction in which the body’s defense system eating meals and the mood changes of the different patients.
attacks the beta cells in the islets of Langerhans of the pancreas, Therefore, the Roman Hovorka model [7] has been chosen,
these cells are responsible for the production of endogenous because the studies have been carried out on the parametric
insulin, and for this reason the blood glucose levels are variations of the model over a period of 12 weeks applied to 8
abnormal. Normal glucose levels are between 70 mg/dl and 120 patients, who underwent glucose regulation through a
mg/dl, before every meal, and up to a maximum of 180 mg/dl predictive control and food intake correction with the bolus
after eating meal [2]. People with diabetes are out of glucose calculator. From this study it is obtained a 7 equations Glucose-
levels, high levels (Hyperglycemia) and low levels Insulin model.
(Hypoglycemia) [3].

978-1-7281-5581-4/19/$31.00 ©2019 IEEE 156


DOI 10.1109/INCISCOS49368.2019.00033
Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.
The most common controls algorithm for glycemic Where ‫ݔ‬ଵ ሺ‫ݐ‬ሻ, and‫ݔ‬ଶ ሺ‫ݐ‬ሻ, in (U), represent the amount of
regulation in the artificial pancreas are Model Predictive insulin in the first and second absorption compartment;‫ݑ‬ூ ሺ‫ݐ‬ሻ,
Control (MPC) and PID [8], MPC present satisfactory results in (U/h), represents the infusion rate of exogenous insulin at a
but has the disadvantage of having a high computational cost time ‫ܺ ;ݐ‬ሺ‫ݐ‬ሻ, in (mU/l), represents the insulin concentration;
when carrying out the tests [9]. In the case of PID controller, it ‫ݐ‬௠௔௫ǡூ஺ , in (min), represents the maximum time of effective
is not a robust controller, and it is not reliable for parametric insulin concentration;ܹ, in (kg), is the body’s weight of the
variations. Therefore, in this paper are settled new control patient; ‫ܴܥܯ‬ூ , in (l/kg/min), represent the metabolic clearance
alternatives that try to solve these problems. rate of effective insulin.
This paper presents the design and tuning of two controllers C. Meal absorption dynamics.
that include a Feedforward controller. First, PID-Fuzzy is
proposed to improve the control action of a classical PID and The third subsystem describes the meal absorption
the second controller developed is a Numerical Methods based dynamics and it is represented by the following equations:
on Linear algebra (NM&LA). These controllers are compared ݀ܽଵ ሺ‫ݐ‬ሻ ͳ
using settling time, ISE and TVu as performance indexes.  ൌെ ܽ ሺ‫ݐ‬ሻ ൅ ߜ௧ೕ ሺ‫ݐ‬ሻ ‫ ீݑ כ‬ሺ‫ݐ‬ሻǡሺͷሻ
Finally, A noise source has been added to the glucose sensor in ݀‫ݐ‬ ‫ݐ‬௠௔௫ǡீ ଵ
order to see how the controllers are affected. ݀ܽଶ ሺ‫ݐ‬ሻ ͳ
 ൌ ሾܽ ሺ‫ݐ‬ሻ െ ܽଶ ሺ‫ݐ‬ሻሿǡሺ͸ሻ
Section II of this paper detail the equations present for the ݀‫ݐ‬ ‫ݐ‬௠௔௫ǡீ ଵ
mathematical model which describes the behavior of the
glucose-insulin model. In section III, the design and tuning of ͷǤͷͷ͸ ‫ܽ כ ீܣ כ‬ଶ ሺ‫ݐ‬ሻ
ܷெ ሺ‫ݐ‬ሻ ൌ ǡ ሺ͹ሻ
the two controllers are presented. In section IV, the results are ‫ݐ‬௠௔௫ǡூ஺ ‫ܹ כ ீܸ כ‬
shown after having performed the simulation applying to the
glucose-insulin model. Finally, the conclusions obtained from Where ܽଵ ሺ‫ݐ‬ሻ, and ܽଶ ሺ‫ݐ‬ሻ, in (g), represents the amount of
this paper are presented in the last section. carbohydrates in the first and second compartment;ܷெ ሺ‫ݐ‬ሻ, in
(mmol/l/min), represent the glucose concentration rate of
II. MATHEMATICAL MODEL change;‫ݐ‬௠௔௫ǡீ , in (min), represent the maximum time of
This paper uses the mathematical model presented by appearance rate of glucose;‫ ீݑ‬ሺ‫ݐ‬ሻ, in (min), represent the
Roman Hovorka in [7], it consists of 7 equations, with 5 state amount of carbohydrates in time;‫ݐ‬௠௔௫ǡூ஺ , in (min), represents
variables, this model is divided into 3 subsystems. The insulin the maximum time of effective insulin concentration;‫ ீܣ‬,
infusion is considered as input, the intake of carbohydrates as unitless, represents the fractional biovariability; ܸீ , in (l/kg),
input disturbance and concentration of glucose in blood as represents the plasma glucose pool size;ܹ, in (kg), is the
output of the model. body’s weight of the patient.
A. Blood Glucose concentration III. CONTROLLERS
The first subsystem represents the kinematics of continuous
The main goal of the controller is to maintain
monitoring of blood glucose concentration, given by the
normoglycemia within 70 mg/dl to 180 mg/dl.
following equation:
The control structure for both controllers is the following:
݀‫ܩ‬ሺ‫ݐ‬ሻ
ൌ െܵூ ሺܺሺ‫ݐ‬ሻ െ ܺ௕ ሻ ൅ ܷெ ሺ‫ݐ‬ሻ െ ‫ܭ‬ሺ‫ܩ‬ሺ‫ݐ‬ሻ െ ‫ܩ‬௕ ሻǡሺͳሻ
݀‫ݐ‬ ‹•–—”„ƒ ‡

Where ‫ܩ‬ሺ‫ݐ‬ሻ, represents blood glucose concentration in


(mmol/l); ܵூ , is the sensitivity to insulin in (mmol/l/min per
‡‡†ˆ‘”™ƒ”†
mU/l); ܺ௕ , is the basal insulin concentration in (mU/l) to which ‘–”‘ŽŽ‡”
the glucose must be constant; ‫ܩ‬௕ ,is the basal level of blood

glucose concentration in (mmol/l); ‫ܭ‬, is the rate of self- ‡–‘‹–

ȭ ‘–”‘Ž

ȭ ”‘ ‡•• —–
regulation that brings the level of glucose to the value of ‫ܩ‬௕ Ǧ

B. Action and absorption of inulin.


The second subsystem represent the action and absorption
Fig. 1. System Structure
of insulin a it is represented by the following equations:
݀‫ݔ‬ଵ ሺ‫ݐ‬ሻ ͳ ‫ݑ‬ூ ሺ‫ݐ‬ሻ In order to design the different controllers for this work, the
 ൌെ ‫ ݔ‬ሺ‫ݐ‬ሻ ൅ ǡሺʹሻ approximation of first order with delay (FOPDT) will be used,
݀‫ݐ‬ ‫ݐ‬௠௔௫ǡூ஺ ଵ ͸Ͳ
the parameter for this approximation are obtained using the
݀‫ݔ‬ଶ ሺ‫ݐ‬ሻ ͳ reaction curve method, Smith [10], the following equations are
 ൌെ ൫‫ ݔ‬ሺ‫ݐ‬ሻ െ ‫ݔ‬ଶ ሺ‫ݐ‬ሻ൯ǡሺ͵ሻ used for this method:
݀‫ݐ‬ ‫ݐ‬௠௔௫ǡூ஺ ଵ
‫ି ݁ܭ‬௧బ௦
ͳͲͲͲ ‫ݔ כ‬ଶ ‫ܩ‬ሺ‫ݏ‬ሻ ൌ ሺͺሻ
ܺሺ‫ݐ‬ሻ ൌ ǡ ሺͶሻ ߬‫ ݏ‬൅ ͳ
‫ݐ‬௠௔௫ǡூ஺ ‫ܴܥܯ כ‬ூ ‫ܹ כ‬

157

Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.
‫ ܭ‬ൌ  οܵȀο‫ܧ‬ሺͻሻ Then, when applying (16) to the transfer function in (8), we
have:
߬ ൌ ͳǤͷሺ‫ݐ‬ଶ  െ ‫ݐ‬ଵ ሻሺͳͲሻ ‫ܭ‬
‫ܩ‬ሺ‫ݏ‬ሻ ൌ ሺͳ͹ሻ
‫ݐ‬଴ ൌ  ‫ݐ‬ଶ  െ ߬ሺͳͳሻ ሺ߬‫ ݏ‬൅ ͳሻሺ‫ݐ‬଴ ‫ ݏ‬൅ ͳሻ
Where ‫ ܭ‬is the static gain of the system, ߬ is the time When working in equation (17), we have:
constant, ‫ݐ‬଴ is the dead time, ‫ݐ‬ଵ is the time at 28,3% of the final
value and ‫ݐ‬ଶ is the time at 63.2% of the final value. ܻሺ‫ݏ‬ሻ ‫݇ܭ‬஻
‫ܩ‬ሺ‫ݏ‬ሻ ൌ ൌ ଶ ሺͳͺሻ
ܷሺ‫ݏ‬ሻ ‫ ݏ‬൅ ݇஺ ‫ ݏ‬൅ ݇஻
A. PID Fuzzy Controller
Where:
Fuzzy controller has a great flexibility and tolerance to
inaccuracies since it is based on natural language, where the ߬ଵ ൅ ߬ଶ ͳ
interpretation of the process variable with language statements ݇஺ ൌ ǡ݇஻ ൌ ሺͳͻሻ
߬ଵ ߬ଶ ߬ଵ ߬ଶ
easily relates the use of logical operators such as AND and OR
with the measures of action to take, which are a set of rules The equation (18), can be expressed as follows:
designed for effective process control [11]. ‫ݕ‬ሷ ൅ ݇஺ ‫ݕ‬ሶ ൅ ݇஻ ‫ ݕ‬ൌ ‫݇ܭ‬஻ ‫ݑ‬ሺʹͲሻ
In order to achieve a better response of the plant compared Expressing (20) in state variables, it is obtained:
with a Linear PID, Galan, in [12], proposes a PID-Fuzzy with
the following structure: ‫ ݕ‬ൌ ‫ݕ‬ଵ ሺʹͳሻ

 ‘–”‘ŽŽ‡” ‫ݕ‬ሶ ൌ ‫ݕ‬ଵሶ ൌ ‫ݕ‬ଶ ሺʹʹሻ




‡ ‫ݕ‬ሷ ൌ ‫ݕ‬ଵሷ ൌ ‫ݕ‬ଶሶ ሺʹ͵ሻ
+
””‘” —œœ›‘–”‘ŽŽ‡” ȭ ሺ–ሻ Then, the system from (20) can be represented based on its
†—
̴̴̴  +
†– † †‡
states variables by the following matrix:
‫ݕ‬ሶ Ͳ ͳ ‫ݕ‬ଵ Ͳ
‫–†׬‬ ‹ ൤ ଵ ൨ ൌ ൤ ൨ቂ ቃ ൅ ൤ ൨ ሾ‫ݑ‬ሿሺʹͶሻ
‫ݕ‬ଶሶ െ݇஻ െ݇஺ ‫ݕ‬ଶ ‫݇ܭ‬஻
Fig. 2. PID-Fuzzy controller scheme. By applying the Euler method to equation (24), we have:
‫ݕ‬ଵ௡ାଵ ‫ݕ‬ଵ௡ Ͳ ͳ ‫ݕ‬ଵ௡ Ͳ
To perform the design of the PID-Fuzzy controller, it is ቂ‫ݕ‬ ቃ ൌ ቂ‫ ݕ‬ቃ ൅ ܶ଴ ൜൤ ൨ቂ ቃ ൅൤ ൨ ሾ‫ݑ‬௡ ሿൠሺʹͷሻ
ଶ௡ାଵ ଶ௡ െ݇஻ െ݇஺ ‫ݕ‬ଶ௡ ‫݇ܭ‬஻
needed to know the parameters of a PID (Dahlin) as seen in
[13], with this parameter the following equations will be used: The recommended sampling time will be in the range of:
ఛ ఛ
ͲǤͷ ߬ ൏ ܶ଴ ൏
‫ܭ‬௣ ൌ ൬ ൰ሺͳʹሻ ଵ଴ ଶ
‫ݐ ܭ‬଴
Then, (25) can be expressed as follows:
ܶ௜ ൌ ߬ሺͳ͵ሻ ௬భ೙శభ ି௬భ೙
Ͳ ் ‫ݕ‬ଶ௡
ܶௗ ൌ ͲǤͷ‫ݐ‬଴ ሺͳͶሻ ൤ ൨ ሾ‫ݑ‬௡ ሿ ൌ ቎௬మ೙శభబି௬మ೙ ቏ െ ቂെ݇ ‫ ݕ‬െ ݇ ‫ ݕ‬ቃሺʹ͸ሻ
‫݇ܭ‬஻ ஻ ଵ௡ ஺ ଶ௡
ͳ ்బ
‫ܥ‬௉ூ஽ ሺ‫ݏ‬ሻ ൌ ‫ܭ‬௣ ൬ͳ ൅ ൅ ܶௗ ‫ݏ‬൰ሺͳͷሻ
ܶ௜ ‫ݏ‬ Then, an arrangement is made as follows:
B. Numerical Methods based on Linear Algebra controller ‫ݕ‬ଵ௡ାଵ െ ‫ݕ‬ଵ௡
െ ‫ݕ‬ଶ௡
In order to design a Numerical Methods based on Linear Ͳ ܶ଴
൤ ൨ ሾ‫ݑ‬௡ ሿ ൌ ൦‫ݕ‬ ൪ ሺʹ͹ሻ
Algebra controller three steps are shown [14]: ᇣ ‫݇ܭ‬
ᇤᇥ஻ ଶ௡ାଵ െ ‫ݕ‬ଶ௡
൅ ݇஻ ‫ݕ‬ଵ௡ ൅ ݇஺ ‫ݕ‬ଶ௡
஺ ܶ଴
ᇣᇧᇧᇧᇧᇧᇧᇧᇧᇧᇤᇧᇧᇧᇧᇧᇧᇧᇧᇧᇥ
• Represent the system equations in its state variables. ஻
• Stablish the system as a problem to solve a system of
Initial conditions must be established for the system in (27),
linear equations.
in order to have an exact solution, for this we use concepts of
• Stablish the necessary conditions in order to the
linear algebra, specifically the parallelism between two vectors
systems has an exact equation.
is used as follows:
For this controller it is needed to have the model (FOPDT) ‫ܣ‬ଵଵ ‫ܤ‬ଵଵ
 ൌ ሺʹͺሻ
as seen in (8) [14], then the Taylor approach is applied in the ‫ܣ‬ଵଶ ‫ܤ‬ଵଶ
denominator, the Taylor approach states that the delay of the ‫ݕ‬ଵ௡ାଵ െ ‫ݕ‬ଵ௡
system can be represented in the following way: Ͳ െ ‫ݕ‬ଶ௡
ܶ଴
 ൌ‫ݕ‬ െ ‫ݕ‬ ሺʹͻሻ
ͳ ‫݇ܭ‬஻ ଶ௡ାଵ ଶ௡
൅ ݇஻ ‫ݕ‬ଵ௡ ൅ ݇஺ ‫ݕ‬ଶ௡
݁ ି௧బ௦ ൌ ሺͳ͸ሻ ܶ଴
‫ݐ‬଴ ‫ ݏ‬൅ ͳ
‫ݕ‬ଵ௡ାଵ െ ‫ݕ‬ଵ௡
Ͳ ൌ െ ‫ݕ‬ଶ௡ ሺ͵Ͳሻ
ܶ଴

158

Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.
‫ݕ‬ଵ௡ାଵ െ ‫ݕ‬ଵ௡ ೤భೝ೐೑೙శభ ష಼ೣ ቀ೤భೝ೐೑೙ ష೤భ೙ ቁష೤భ೙
‫ݕ‬ଶ௡ ൌ ሺ͵ͳሻ ଵ ା௄௜ή்బ ή௘೅೙ ି௬మ೙
ܶ଴ ‫ݑ‬ ൌ  ௄௞ ቌ
೅బ
൅
ಳ ்బ
Then from (24), ‫ݕ‬ଶሶ is expressed as a linear equation as
follows:
‫݇ܭ‬஻ ‫ ݑ‬ൌ ‫ݕ‬ଶሶ ൅ ݇஻ ‫ݕ‬ଵ ൅ ݇஺ ‫ݕ‬ଶ ሺ͵ʹሻ ݇஻ ‫ݕ‬ଵ௡ ݇஺ ‫ݕ‬ଶ௡ ቍ (45)
From (32) we have ‫ݑ‬, as follows:
C. Feedforward Controller
ͳ ‫ݕ‬ଶ௡ାଵ െ ‫ݕ‬ଶ௡
‫ ݑ‬ൌ ൬ ൅ ݇஻ ‫ݕ‬ଵ௡ ൅ ݇஺ ‫ݕ‬ଶ௡ ൰ሺ͵͵ሻ To design a Feedforward controller the equations proposed
‫݇ܭ‬஻ ܶ଴
by Marchetti, in [15], the information of two transfer function
Then we replace ‫݊ʹݕ‬൅ͳ with ‫݊ݖ݁ʹݕ‬൅ͳ this will be the are used. The first, ‫ܩ‬஽ is FOPDT model of the plant, and
sacrificed variable, since the values taken by this variable will second, ‫ܩ‬௙௙ , is FOPDT model of the perturbation that represent
force the system to have an exact solution and will make the the effect of the disturbance ‫ܦ‬ሺ‫ݏ‬ሻ,‫ܩ‬௙௙ is the feedforward
error of tracking the output zero, as follows: controller, like this:
ͳ ‫ݕ‬ଶ௘௭௡ାଵ െ ‫ݕ‬ଶ௡ ݇ௗ ݁ ି௧బ೏௦
‫ ݑ‬ൌ ൬ ൅ ݇஻ ‫ݕ‬ଵ௡ ൅ ݇஺ ‫ݕ‬ଶ௡ ൰ሺ͵Ͷሻ ‫ܩ‬஽ ሺ‫ݏ‬ሻ ൌ ሺͶ͸ሻ
‫݇ܭ‬஻ ܶ଴ ߬ௗ ‫ ݏ‬൅ ͳ
Then, we use Taylor approach: Then we use the following equation for feedforward design:

‫݊ݖ݁ʹݕ‬൅ͳ ൌ ‫ ݊ݖ݁ʹݕ‬ሺ͵ͷሻ ‫ܩ‬஽ ሺ‫ݏ‬ሻ ݇ௗ ߬‫ ݏ‬൅ ͳ ିሺ௧ ି௧ ሻ௦


‫ܩ‬௙௙ ሺ‫ݏ‬ሻ ൌ െ ൌ ݁ బ೏ బ ሺͶ͹ሻ
‫݊ͳݕ‬൅ͳ െ ‫݊ͳݕ‬ ‫ܩ‬ሺ‫ݏ‬ሻ ݇ ߬ௗ ‫ ݏ‬൅ ͳ
‫݊ݖ݁ʹݕ‬൅ͳ ൌ ‫ ݊ݖ݁ʹݕ‬ൌ ሺ͵͸ሻ
ܶͲ In (47), after several tests, can be considered as a static
Feedforward controller, since it is enough for the required
Then in order to reduce the error, the following must be performance:
fulfilled: ݁݊൅ͳ ൏ ݁݊ , the error is defined as: ݇ௗ
‫ܩ‬௙௙ ሺ‫ݏ‬ሻ ൌ ሺͶͺሻ
݁௡ ൌ ‫ݕ‬ଵ௥௘௙௡ െ ‫ݕ‬ଵ௡ ሺ͵͹ሻ ݇
݁݊൅ͳ ൌ ‫݂݊݁ݎͳݕ‬൅ͳ െ ‫݊ͳݕ‬൅ͳ ሺ͵ͺሻ IV. RESULTS
Then, to reduce the error: For Table 1, the parameters for the FOPDT were obtained
from (9), (10) and (11) and are shown in Table I:
݁௡ାଵ ൌ ‫ܭ‬௫ ή ݁௡ ሺ͵ͻሻ
TABLE I. PLANT PARAMETERS FOPDT
In (39), ‫ܭ‬௫ Will take values between 0 and 1. Also in (39),
we will replace (37) and (38), as follows: Parameter Value
‫ݕ‬ଵ௥௘௙௡ାଵ െ ‫ܭ‬௫ ൫‫ݕ‬ଵ௥௘௙௡ െ ‫ݕ‬ଵ௡ ൯ െ ‫ݕ‬ଵ௡ ࣎ ሺ݉݅݊ሻ 274.3955
‫ݕ‬ଶ௘௭௡ାଵ ൌ ሺͶͲሻ ࢚૙ ሺ݉݅݊ሻ 145.0545
ܶ଴
࢑ ሺ݉݃Ȁ݈݀ ‫ܷ ݎ݁݌‬Ȁ݄ሻ -297.99
In order to improve the response of the controller, we will
add the integral term: As seen in section III, in PID-Fuzzy, we follow the equations

and we obtain the tuning parameters for PID controllers as
‫ ݉ݎ݁ݐ݈ܽݎ݃݁ݐ݊ܫ‬ൌ ‫ ݅ܭ‬ή ܶ଴ ෍൫‫ݕ‬ଵ௥௘௙௜ െ ‫ݕ‬௜ ൯ ሺͶͳሻ follow:
௜ୀ଴
TABLE II. PID PARAMETERS
From (41) the following change must be made in order to
implement the integral term: Parameter Value
‫ ݉ݎ݁ݐ݈ܽݎ݃݁ݐ݊ܫ‬ൌ ‫ ݅ܭ‬ή ܶ଴ ή ்݁௡ ሺͶʹሻ ࡷࢉ -0.0060
ࢀ࢏ 373.1779
Where ்݁௡ is the accumulated error, and is given by the
following equation: ࢀࢊ 68.1756
்݁௡ ൌ ݁௡ ൅ ்݁௡ିଵ ሺͶ͵ሻ Also, for this controller we must add the fuzzy controller, for
Then, in (40), the integral term in (42) must be added, as this part we have two inputs ݁ (error) and ݀݁ (error derivative),
follows: as follows:
௬భೝ೐೑೙శభ ି௄ೣ ൫௬భೝ೐೑೙ ି௬భ೙ ൯ି௬భ೙
‫ݕ‬ଶ௘௭௡ାଵ ൌ ൅ ‫ܶ݅ܭ‬଴ ்݁௡ ሺͶͶሻ
்బ

Finally, in (34), we replace (44) and we have ‫ݑ‬, as follows:

159

Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.
‡ ‡ ‡ The disturbance for the consumption of food is divided in
ͳ
three meals for the day, the recommended amount of
carbohydrates for most adults with DM1 is 40-60 [g] according
ͲǤͷ to [16] [17], each meal has a duration of 10 minutes, the
distribution is as follows:

Ͳ TABLE V. FOOD CONSUMPTION DAILY


ǦͲǤ͸ ǦͲǤͶ ǦͲǤʹ Ͳ ͲǤʹ ͲǤͶ
Meal Carbohydrates Time
7:30-7:40
Fig. 3. Fuzzy input membership function for ݁ Breakfast 40 (g)
(450-460 min)
12:30-12:40
†‡ †‡ †‡
Lunch 60 (g)
(750-760 min)
ͳ
20:00-20:10
Dinner 40 (g)
(1200-1210 min)

ͲǤͷ When applying the controller to the Glucose-Insulin model,


with nominal parameters from [7] , the following results are
obtained as shown:
Ͳ
ǦͲǤ͵ ǦͲǤʹ ǦͲǤͳ Ͳ ͲǤͳ ͲǤʹ ͲǤ͵ ͲǤͶ ͲǤͷ ͲǤ͸

Fig. 4. Fuzzy input membership function for ݀݁

For the output we follow the rules Nde (Negative


derivative), Zde (Zero derivative) and Pde (Positive derivative),
as follow:

TABLE III. FUZZY RULES BASE FOR ܱ


ࢋሺ࢚ሻ
Fuzzy Rules
Nde Zde Pde
Ne No No Zo
ࢋሺ࢚ሻ Ze No Zo Po
Pe Zo Po Po

   Fig. 6. PID-Fuzzy and Numerical Method based on Algebra Lineal


ͳ
glucose response.

ͲǤͷ
In Fig. 6, both controllers are in the normoglycemia levels,
which is the controller objective, it is seen that PID-Fuzzy has
a better performance because it has a better value in the second
Ͳ
ǦͲǤͶ ǦͲǤ͵ ǦͲǤʹ ǦͲǤͳ Ͳ ͲǤͳ ͲǤʹ ͲǤ͵ ͲǤͶ
peak it is far from the hypoglycemia episode. In the Table VI it
can be seen maximum and minimum values of glucose peak and
Fig. 5. Fuzzy input membership function for ܱ the when it occurs.
The tuning value parameters for the control NMLA are TABLE VI. PEAK GLUCOSE VALUES
presented in the Table IV, and these were found with a
minimization method. Glucose Levels
Minimum Maximum
TABLE IV. PARAMETERS FOR NM&LA
Controllers
Value Time Value Time
ሺ࢓ࢍȀࢊ࢒ሻ ሺ࢓࢏࢔ሻ ሺ࢓ࢍȀࢊ࢒ሻ ሺ࢓࢏࢔
Parameter Value
PID-Fuzzy 75.90 1090.41 177.9 849.38
ࡷ࢞ 0.83
NM&LA 70.74 1090.42 175.4 849.64
ࢀ 57
Once the response of the controllers is presented, it is
ࡷ࢏ 0.00000095
important to show the controllers efforts, in order to know their
Finally, the ‫ܩ‬௙௙ ሺ‫ݏ‬ሻ constant for feedforward controller is performance. The response of the controllers are adequate
obtained, this value was obtained by trying a series of values, because there is no negative values during their performances
as follow: (A negative value would indicate taking out insulin from the
patient). These results are shown in Fig. 7 and their values in
݇ௗ Table VII.
‫ܩ‬௙௙ ሺ‫ݏ‬ሻ ൌ ൌ ͸ǤʹሺͶͻሻ
݇

160

Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.
As shown in Fig. 8, for PID-Fuzzy controller, when
applying change in nominal parameters in the glucose response
appear two hyperglycemia episodes, for the first episode
exceeds in 23.4 (mg/dl), and for the second episode it exceeds
in 6.8 (mg/dl). Also, for Numerical Method based on Algebra
Lineal controller, there are three hyperglycemia episodes with
values of 2.3 (mg/dl), 40.5 (mg/dl) and 10.5 (mg/dl) above
normal.
In order to know the performance of both controllers a white
noise signal has been added to the sensor, this noise signal, has
a magnitude value of 10% of the output signal. The noise signal
is seen in Fig. 9 and the performance of both controllers are
shown in Fig.10 and Fig. 11 respectively.
As seen in Fig. 10; both controllers keep the output into the
Fig. 7. Controllers effort. ranges, but the control effort of Numerical Method based on
Linear Algebra is less affected than the PID-Fuzzy as seen in
TABLE VII. PEAK INSULIN VALUES Fig. 11, therefore, the noise signal does not affect in a
remarkable way in its control effort.
Insulin
Minimum Maximum
Controllers
Value Time Value Time
ሺࢁȀ࢓࢏࢔ሻ ሺ࢓࢏࢔ሻ ሺࢁȀ࢓࢏࢔ሻ ሺ࢓࢏࢔ሻ

PID-Fuzzy 0.0103 666.739 0.6313 752.129


NM&LA 0.01534 951.55 0.6334 752.701

In Table VIII, the comparison parameters of the controllers


proposed are shown, these parameters are: index ISE, Integral
Square Error; TVu, control effort; and Settling Time.

TABLE VIII. PARAMETERS COMPARISON

Settling
Controllers ISE (x૚૙૟ ) TVu
Time

PID-Fuzzy 1.138 2.9587 2089.65


Fig. 9. Noise Signal
NM&LA 1.227 3.1950 2312.12

To see the performance of the controller, one scenario was


simulated. This scenario considers modelling error of:
ܵூ ,insulin sensitivity, underestimation of 30%; and ‫ݐ‬௠௔௫ǡூ஺ ,
time at the maximum insulin concentration, underestimation of
20%. The results can be appreciated in Fig. 8.

Fig. 10. Numerical Method and Algebra Lineal control and PID-Fuzzy
glucose response with noise Signal.

Fig. 8. Numerical Method and Algebra Lineal control and PID-Fuzzy


glucose response for Scenario 1.

161

Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.
1,» Revista Iberoamericana de Automática e Información Indusrial,
vol. 7, nº 2, pp. 5-20, 2010.
[5] D. Calupiña, A. Garcia, O. Camacho y A. Rosales, «Non-linear PID and
Dynamic SMC for the Artificial Pancreas control in the treatment of
Type 1 Diabetes,» IEEE Third Ecuador Technical Chapters Meeting
(ETCM), 2018.
[6] I. A. Cisneros , «Modelos matematicos para la Diabetes,» Universidad
de Cantabria, Cantabria, 2014.
[7] Y. Ruan and E. Wilinska, "Modeling Day-to-day Variability of
Glucose-Insulin Regulation over 12-Week Home use of closed -loop
Insulin Delivery," IEEE Transactions on Biomedical Engineering, pp.
1412-1419, 2017.
[8] J. E. Sereno, M. A. Caicedo, P. S. Rivadeneira y O. E. Camacho, «In
Silico Test for MPC and SMC Controllers Under Parametric Variations
in Type 1 Diabetic Patients,» Argentine Conference on Automatic
Control (AADECA), 2018.

Fig. 11. Controllers effort when noise is added.


[9] J. M. Maciejowki, Predictive Control with Constraints, Pretince Hall,
2000.

When comparing the results obtained with those in [5] both [10] C. A. Smith, Principles and Practice of Automatic Process Control,
1987.
investigations can be compared because these used the same
[11] D. Jauregui, O. Camacho y D. Chavez, «A Comparison of Fuzzy
model (Hovorka), when working with nominal parameters in Moving Sliding Mode,» IEEE Third Ecuador Technical Chapters
[5] the DSMC controller is out of range in Normoglycemia Meeting (ETCM), 2018.
values and both controllers (NPID and DSMC) have bigger [12] R. Galan, «Análisis y Comparación de sistemas de control PID y PID
settling times than those shown in this investigation. Difuso en logica reconfigurable,» Control Inteligente, vol. 4, nº 10, pp.
43-48, 2000.

V. CONCLUSIONS [13] C. Smith y A. Corripio, Principles and Practice of Automatic Process


Control, 1987.
Two controllers were developed and analyzed for the [14] M. Cartagena , R. Pillajo, O. Camacho, A. Rosales y G. Scaglia, «A
Artificial Pancreas control in the treatment of Type 1 Diabetes. Linear Algebra Controller Approach for Systems with Inverse
The proposed controllers, PID-Fuzzy and Numerical Method Response,» INCISCOS, 2018.
based on Algebra Lineal control, presented satisfactory results; [15] G. Marchetti y M. Barolo, «feedforward-feedback glucose control
strategy,» Process Control, vol. 18, nº 2, pp. 149-162, 2008.
because they did not present episodes of hyperglycemia or
hypoglycemia. [16] American Diabetes Assoiciation, «All About Carbohydrate Counting,»
2009.
When parametric variations are included in the model, the [17] National Diabetes Services Scheme, «Carbohydrates counting and
performance of the controllers is affected, which leads possible diabetes,» Diabetes Australia, Australia, 2016.
to episodes of hypoglycemia and hyperglycemia.
The Numerical Method based on Linear Algebra control
effort is not affected in an appreciable way when adding a noise
source in the glucose sensor. On the other hand, PID fuzzy
control effort presents peaks which can reduce the life of the
glucose sensor.
ACKNOWLEDGMENTS
Authors thank to Robotic and Intelligent Systems Laboratory
(LARSI) of EPN and the project PIJ 17-10 for their sponsorship
in this work.

REFERENCES

[1] World Health Organization, Global Report on Diabetes, 2016.


[2] Hormone Health Network, «Diabetes and Hipoglycemia,» Hormone
Health Network, Virginia, 2011.
[3] M. M. Vilas, "Factores psicosocio-inmunogeneticos en pacientes
diabeticos con complicaciones vasculares," Plasticidad y Restauracion
Neurologica, vol. 5, no. 2, pp. 139-151, 2006.
[4] J. Bondia, J. Vehi, C. C. Palerm y P. Herrero, «El Páncreas Artificial:
Control Automático de infusión de Insulina en Diabetes Mellitus Tipo

162

Authorized licensed use limited to: National Institute of Technology Patna. Downloaded on February 17,2024 at 09:26:42 UTC from IEEE Xplore. Restrictions apply.

You might also like