# Receding Horizon Control of Type 1 Diabetes Mellitus by Using Nonlinear Programming

Authors: Hamza Khan; József K. Tar; Imre Rudas; Levente Kovács; György Eigner
Journal: Complexity
 (2018)

---

## Abstract

Receding Horizon Controllers are one of the mostly used advanced control solutions in the industry. By utilizing their possibilities we are able to predict the possible future behavior of our system; moreover, we are able to intervene in its operation as well. In this paper we have investigated the possibilities of the design of a Receding Horizon Controller by using Nonlinear Programming. We have applied the developed solution in order to control Type 1 Diabetes Mellitus. The nonlinear optimization task was solved by the Generalized Reduced Gradient method. In order to investigate the performance of our solution two scenarios were examined. In the first scenario, we applied “soft” disturbance—namely, smaller amount of external carbohydrate—in order to be sure that the proposed method operates well and the solution that appeared through optimization is acceptable. In the second scenario, we have used “unfavorable” disturbance signal—a highly oscillating external excitation with cyclic peaks. We have found that the performance of the realized controller was satisfactory and it was able to keep the blood glucose level in the desired healthy range—by considering the restrictions for the usable control action.


---

## Body

## 1. Introduction

The advanced control solutions have inevitable role in today’s medical practice regarding the control of physiological processes [1]. Many control solutions are under development that can be used for various kinds of control problems. Advanced control methods have been successfully applied for physiological regulation problems, for example, control of anesthesia [2, 3], angiogenic inhibition of cancer [4, 5], immune response in presence of human immunodeficiency virus [6], and regulation of blood glucose (BG) level [7–10] as well.Diabetes Mellitus (DM) is the collective name of several chronic diseases connected to the metabolic system of the human body. In most of the cases, the DM condition appears due to the issues related to the insulin hormone [11]. The insulin is the key hormone which makes the glucose molecules possible to enter from the blood into the glucose consuming cells through the insulin-dependent gates on the cell-wall [12].There are many types of DM. The most dangerous is the Type 1 DM (T1DM) where the metabolic system is not able to function normally due to the lack of insulin. Type 2 DM (T2DM) is the most widespread kind of DM and it occurs mostly because of the lifestyle. In this case usually the blood glucose and insulin levels continuously increase over a long period of time. Due to the extreme glucose and insulin load the cells become resistant to the insulin over time. In order to compensate this condition the body produces more and more insulin that leads to the “burnout” of the pancreaticβ-cells that produce the hormone. At this point the T2DM turns into T1DM. Other frequently occurring type is the Gestational DM (GDM) from which women may suffer during pregnancy. Usually, this condition is temporary; however, sometimes it turns into T2DM and becomes permanent [13–15].In case of DM the application of these kinds of advanced control techniques has high importance. Due to the nature of the phenomenon to be controlled the researchers on the field have to face many challenges such as high nonlinearities, model and parameter uncertainties, and even time-delay effects, as well. However, regardless the type of DM a few common control goals can be defined: keeping the glycemia (the BG level) in a the healthy range; totally avoiding the hypoglycemic periods; and avoiding the high BG variability as much as possible [16–18].In this research we have investigated the T1DM. As we mentioned, T1DM is the most dangerous condition because the patients need external insulin intake in order to keep their metabolic status on appropriate level. In this case the patient’s pancreaticβ-cells are terminated by the immune system of the patient during an autoimmune reaction. As a consequence, these patients are not able to produce insulin—which leads to short term starving, coma, or even death [11]. Furthermore, the appropriate treatment—how the insulin is administered—is also important to avoid long term side effects, for example, the chronic failure of peripheric vasculature [13].By using advanced control techniques not just acceptable control action but higher treatment quality can be obtained. The selected control methods have to handle the already mentioned unfavorable effects—such as the nonlinearities and so on—as well. In case of T1DM many solutions are available; however, all of them have their own limitations, simplifications, and restrictions—thus, none of them are general [10]. In these days from control point of view the most beneficial approach is the Artificial Pancreas (AP) concept. This idea aims to imitate the regular operation of the pancreas from the insulin production point of view, namely, administering insulin demands on the needs determined by the BG level [19]. Thus, we have to face contradictory requirements: the generalization and personalization as well.One of the mostly used algorithms is the modified proportional-integral-derivative (PID) solutions due to their simplicity and flexibility. Moreover, several clinical trials have been done by using this methodology and investigate its effectivity [20–22]. Linear Parameter Varying (LPV) model-based solutions have high importance, since the uncertainties can be handled with high efficiency by them [7, 9, 23]. The Tensor Product (TP) model-based techniques also represent interesting directions, since they can be combined by Linear Matrix Inequality (LMI) based control and LPV methodology as well [24, 25].The most frequently used method is the Model Predictive Control (MPC) regarding the control of DM [19, 26–28]. MPC is a widely used approach in various research fields as well [29–32]. In general the goals of the MPC applications are tracking and stabilization [33]. In case of an MPC the actual value of the control signal u
(
k
) is obtained by solving an open-loop control problem over a finite horizon. Of course, some feedback is present because the starting point of the next horizon is the last realized point of the previous one. The type of the optimal control problem depends on the type of the control task. The classical MPC is realized in a framework of cost-function-based optimal control where the dynamics of the system to be controlled can be considered as a set of constraints. Furthermore, the cost function regularly contains terms which depend on the tracking error and the control signal itself. Optionally, a cost contribution that depends on the tracking error at the end of the horizon can be added as well.In case of the Receding Horizon Control (RHC) via Nonlinear Programming (NP) based approximation the state variables and the control inputs of the system are considered over a discrete time grid. At each point of the grid the Lagrangian multipliers determine the reduced gradient which is driven into zero numerically to find the optimal solution. This solution consists of the estimated values of the state variables and control signals over the finite horizon. In that case if the dynamic model of the system is not precise, the optimal design can be used only for consecutive finite horizons since the actual state of the controlled system propagates according to its exact dynamics. In order to minimize the effects coming from the inaccuracies the actual measured state variable from the end of the previous horizon is applied as starting point for the next one in the next horizon-length design [34]. The RHC framework can be hardly combined with the Lyapunov function based control. However, certain approaches can be found in the literature where the Lyapunov stability [35] and RHC were successfully combined for specific cases [36–39].Alternative solutions also exist which can be used instead of Lyapunov’s stability theorem. The Robust Fixed Point Transformation (RFPT) based control [40, 41] uses Banach’s fixed point theorem [42] to transform the control problem into a fixed point problem which can be solved iteratively. This method allows designing a robust iterative adaptive controller which can avoid the main limitations of RHC if these are combined.In this study we present the first part of our research, namely, the design of an appropriate RHC controller on NP basis which can be completed by RFPT in our further work.The paper is structured as follows. First, the applied diabetes model is introduced. After that, the RHC design based on the NP approach is presented. Then, the results are introduced with their discussion. Finally, we conclude our work and provide an outline regarding our further research.


## 2. Type 1 Diabetes Mellitus Model

During our research we have applied a modified Minimal Model [43] which originates from the model of Bergman [46]. This model has several beneficial properties, such as simplicity, good transformability, and flexibility and it is based on simpler biological considerations. The main goal of the model is to describe the glucose-insulin dynamics, namely, to define the connection between the blood glucose and insulin levels. However, in order to characterize the daily life of a T1DM patient this model has to be extended with additional submodels. These submodels are the absorption of the external glucose and insulin intakes. During the daily routine these substances are not directly injected to the blood stream—however, this can occur in case of persistent hospitalization. Instead, the carbohydrate is consumed via food intake and the insulin is entered through the extracellular tissue matrix under the skin [13]. Thus, their appearance does not contain sharp peaks: it happens through longer dynamics.The glucose and insulin absorption are described by (1)–(4), respectively. These submodels originate from the Cambridge model [44], but we applied them in appropriate dimensions to insert them into the core model. The core model is described by (5)–(7).(1)
D
˙
1
t
=
-
1
τ
D
D
1
t
+
1000
A
g
M
w
G
V
G
C
·
d
t
,
(2)
D
˙
2
t
=
-
1
τ
D
D
2
t
+
1
τ
D
D
1
t
,
(3)
S
˙
1
t
=
-
1
τ
S
S
1
t
+
1
V
I
u
t
,
(4)
S
˙
2
t
=
-
1
τ
S
S
2
t
+
1
τ
S
S
1
t
,
(5)
G
˙
t
=
-
p
1
+
X
t
G
t
+
p
1
G
B
+
1
τ
D
D
2
t
,
(6)
X
˙
t
=
-
p
2
X
t
+
p
3
I
t
-
I
B
,
(7)
I
˙
t
=
-
n
I
t
-
I
B
+
1
τ
S
S
2
t
.The state variables in (1)–(7) have the meaning and purpose as follows. D
1
(
t
) mg/dL and D
2
(
t
) mg/dL are the primary and secondary compartments belonging to glucose, where the time constant τ
D determines how long it takes for the meal to be absorbed after consumption in time. S
1
(
t
) mU/L and S
2
(
t
) mU/L are the primary and secondary compartments belonging to insulin, where the time constant τ
S determines how long it takes the insulin to be absorbed after injection (to the extracellular space) in time. Variable G
(
t
) mg/dL is the blood glucose (BG) concentration—the so-called glycemia—and I
(
t
) mU/L is the blood insulin concentration and X
(
t
) 1/min is the insulin-excitable tissue glucose uptake activity—which describes the connection between the blood’s glucose and insulin levels, respectively.From system engineering point of view the external glucose, namely, the food intake, can be handled as disturbance. In this cased
(
t
) g/min is the disturbance input. It can be inserted to D
1
(
t
) via (
(
1000
A
g
)
/
(
M
w
G
V
G
)
)
C complex which describes the bioavailability of the glucose from complex carbohydrates. The control signal u
(
t
) mU/min—the injected insulin—is directly connected to S
1
(
t
). More detailed description of the used model parameters can be found in Table 1 and in [43–45].Table 1
The applied parameters of the models in this study [43–45].
Notation
Value
Unit
Description
G
B
110
mg/dL
Basal glucose level
I
B
1.5
mU/L
Basal insulin level
p
1
0.028
1/min
Transfer rate
p
2
0.025
1/min
Transfer rate
p
3
0.00013
L/(mU min)
Transfer rate
n
0.23
1/min
Time constant for insulin disappearance
B
W
75
kg
Body weight
V
I
0.12B
W
L
Distribution volume of insulin
V
G
0.16B
W
L
Distribution volume of glucose
M
w
G
180.1558
g/mol
Molecular weight of glucose
A
g
0.8
-
Glucose utilization
C
18.018
mmol/L
Conversion rate between mmol/L and mg/dL
τ
D
40
min
Carbohydrate (CHO) to glucose absorption constant
τ
S
55
min
Insulin absorption constant


## 3. A Nonlinear Programming Approach with regard to the Receding Horizon Controller

### 3.1. Nonlinear Programming in General

The numerical approximation of a given problem can be considered in the following way:(I)
Determination of a discrete time grid which is dense enough from the given application point of view as{
t
0
,
t
1
=
t
0
+
Δ
t
,
…
,
t
n
+
1
=
t
n
+
Δ
t
,
…
,
t
F
}, where F
∈
N. Here t
0 belongs to the initial and t
F belongs to the final time instant of the motion to be taken into account, respectively.
(II)
Assume that the nonlinear equation of the system to be controller isx
˙
(
t
)
=
f
(
x
(
t
)
,
u
(
t
)
), where x
(
t
)
∈
R
M is the state and u
(
t
)
∈
R
K is the input vector, respectively. Furthermore, the x
0
≡
x
(
t
0
) initial condition of the system is given.
(III)
Consider thatx
N
(
t
i
) is the nominal trajectory to be tracked by the states of the system over time. Here x
N
(
t
i
)
≡
x
i
N in the given time grid determined by (I).
(IV)
The nominal prescribed trajectory cannot be exactly realized during the execution of the control task. However, several restrictions—in order to enforce the realization of this trajectory—can be prescribed by using a predefinedJ
(
x
(
t
)
,
u
(
t
)
) cost function in each point of the grid.
(V)
J
(
x
(
t
)
,
u
(
t
)
)
≥
0 is able to express several requirements, although these are often contradictory. It can be constructed as the sum of nonnegative terms which can be the differentiable functions of the control signal and the state variables—expediently. The drastic control signals can be avoided as well by prohibiting them via the cost function.
(VI)
Terminal conditions can be embedded into the prescription depending only onx
F in the last step t
F.
(VII)
During an optimal control approach,∑
i
=
0
F
-
1
‍
J
(
x
i
,
u
i
)
+
Φ
(
x
F
) has to be minimized, where Φ
(
x
F
) is an extra weight that belongs to the last point of the trajectory.
(VIII)
The cost function∑
i
=
0
F
-
1
‍
J
(
x
i
,
u
i
)
+
Φ
(
x
F
) cannot be arbitrarily minimized due to the specificities of the system to be controlled. In the minimization the state propagation equation must be considered as a constraint. In order to process this constraint the Lagrangian multipliers can be used as follows.
(IX)
x
˙
(
t
) can be expressed from the state propagation equation and as a numerical approximation (
x
i
+
1
-
x
i
)
/
Δ
t
≈
f
(
x
i
,
u
i
). By using this estimation, the control task can be expressed in the following way:(8)
m
i
n
x
1
,
…
,
x
F
u
0
,
…
,
u
F
-
1
∑
i
=
0
F
-
1
J
x
i
,
u
i
+
Φ
x
F
s
u
b
j
e
c
t
t
o
x
i
+
1
-
x
i
Δ
t
-
f
x
i
,
u
i
=
0
,
and{
λ
0
,
…
,
λ
F
-
1
} are the Lagrangian multipliers—which are used in accordance with the optimization task to be solved by the reduced gradients method.


### 3.2. The Applied Cost Function

During the development of the appropriate cost function—which fits to the given problem—the specificities of model (1)–(7) should be taken into account.The main limitation coming from the model is the amount of injectable insulin and the fact that we have only one control signal. The control signals at the grid points of the horizon are independent variables in the optimization problem. However, the application of a specific form of limitation on them—a “bias”—is reasonable. Thus, the control signal in this construction should be limited in accordance with the phenomenon to be controlled. Instead of the control signal itself, another variable should be selected as independent variable to avoid the initial value problems causing the rough numerical approximation at the beginning of the optimization. This is caused by the high nonlinearity in the model.Another property of the model is that only the blood glucose levelG
(
t
) can be measured. Thus, only this state variable can be embedded into the cost function to be developed. We do not have internal information about other state variables of the process to be controlled.Accordingly we have applied a more specific form of the (8) cost function:(9)
m
i
n
G
1
,
…
,
G
F
v
0
,
…
,
v
F
-
1
∑
i
=
0
F
-
1
J
G
i
,
u
i
+
Φ
G
F
s
u
b
j
e
c
t
t
o
x
i
+
1
-
x
i
Δ
t
-
f
x
i
,
u
i
=
0
,where u
i
=
u
b
i
a
s
+
t
a
n
h
(
v
i
).We have developed a strongly nonlinear cost function in which all requirements can be embedded against the control action to be reached during control.(10)
J
G
,
u
=
d
e
f
G
N
-
G
A
1
α
1
+
B
u
A
2
α
2
,
(11)
Φ
G
F
=
d
e
f
G
f
i
n
a
l
N
-
G
f
i
n
a
l
A
3
α
3
.The tracking error in (10) and (11), namely, the deviation of the realized blood glucose level G
(
t
) from the nominal blood glucose level G
N
(
t
), can be calculated as G
i
N
-
G
i at the grid points. The absolute value of this difference can be determined by parameters A
1 and A
3 that contribute the belonging level of “penalty” prevailing in the cost function. In that case if α
1
>
1 and α
3
>
1 beside |
G
N
-
G
|
<
A
1 and |
G
f
i
n
a
l
N
-
G
f
i
n
a
l
|
<
A
3, the contribution to the cost function is low. However, if |
G
N
-
G
|
>
A
1 and |
G
f
i
n
a
l
N
-
G
f
i
n
a
l
|
>
A
3 then due to the power terms the contributions to the cost of these terms are drastically increasing. The α
1 and α
3 weighting terms can be used for different purposes. α
1
=
α
3
=
1 provides proportional contribution; namely, the pure deviation will be better prohibited. However, if α
1
,
α
3
<
1, then the smaller deviations will be prohibited relatively better than the bigger ones. The role of A
2 and α
2 parameters are similar; namely, the applied control input can be prohibited by applying them. The B parameter allows modifying the enforcement of the effect of the control signal in the cost function.


### 3.3. Applied Nonlinear Programming Solver

In order to implement the reduced gradients based optimization as Nonlinear Programming task various software products can be used. Due to its complex embedded nonlinear solvers and the easy-to-use property we have selected the Microsoft’s EXCEL (MS EXCEL). The MS EXCEL’s “Solver” module is produced by an external firm Frontline Systems, Inc. There are various solutions implemented into the Solver module, including the Generalized Reduced Gradient (GRG) method which can be used in the given case as well. The GRG is based on [47, 48] and its usability has been proved in various fields of research. For example, it was successfully applied for macroeconomic optimization problems [49], operational research problems related to economics [50], optimization problems regarding transportation [31], decision prediction models [51], optimal control problems in continuous time domain [52], and so on.The optimization framework was built up by using the “Visual Basic” packages of the software “MS EXCEL 2016” under “Windows 10” operating system. The functional dependencies have been constructed in Visual Basic, and the grid points, parameters, and so forth have been defined on dedicated Worksheets—by using these data the Solver can be easily set up.


## 3.1. Nonlinear Programming in General

The numerical approximation of a given problem can be considered in the following way:(I)
Determination of a discrete time grid which is dense enough from the given application point of view as{
t
0
,
t
1
=
t
0
+
Δ
t
,
…
,
t
n
+
1
=
t
n
+
Δ
t
,
…
,
t
F
}, where F
∈
N. Here t
0 belongs to the initial and t
F belongs to the final time instant of the motion to be taken into account, respectively.
(II)
Assume that the nonlinear equation of the system to be controller isx
˙
(
t
)
=
f
(
x
(
t
)
,
u
(
t
)
), where x
(
t
)
∈
R
M is the state and u
(
t
)
∈
R
K is the input vector, respectively. Furthermore, the x
0
≡
x
(
t
0
) initial condition of the system is given.
(III)
Consider thatx
N
(
t
i
) is the nominal trajectory to be tracked by the states of the system over time. Here x
N
(
t
i
)
≡
x
i
N in the given time grid determined by (I).
(IV)
The nominal prescribed trajectory cannot be exactly realized during the execution of the control task. However, several restrictions—in order to enforce the realization of this trajectory—can be prescribed by using a predefinedJ
(
x
(
t
)
,
u
(
t
)
) cost function in each point of the grid.
(V)
J
(
x
(
t
)
,
u
(
t
)
)
≥
0 is able to express several requirements, although these are often contradictory. It can be constructed as the sum of nonnegative terms which can be the differentiable functions of the control signal and the state variables—expediently. The drastic control signals can be avoided as well by prohibiting them via the cost function.
(VI)
Terminal conditions can be embedded into the prescription depending only onx
F in the last step t
F.
(VII)
During an optimal control approach,∑
i
=
0
F
-
1
‍
J
(
x
i
,
u
i
)
+
Φ
(
x
F
) has to be minimized, where Φ
(
x
F
) is an extra weight that belongs to the last point of the trajectory.
(VIII)
The cost function∑
i
=
0
F
-
1
‍
J
(
x
i
,
u
i
)
+
Φ
(
x
F
) cannot be arbitrarily minimized due to the specificities of the system to be controlled. In the minimization the state propagation equation must be considered as a constraint. In order to process this constraint the Lagrangian multipliers can be used as follows.
(IX)
x
˙
(
t
) can be expressed from the state propagation equation and as a numerical approximation (
x
i
+
1
-
x
i
)
/
Δ
t
≈
f
(
x
i
,
u
i
). By using this estimation, the control task can be expressed in the following way:(8)
m
i
n
x
1
,
…
,
x
F
u
0
,
…
,
u
F
-
1
∑
i
=
0
F
-
1
J
x
i
,
u
i
+
Φ
x
F
s
u
b
j
e
c
t
t
o
x
i
+
1
-
x
i
Δ
t
-
f
x
i
,
u
i
=
0
,
and{
λ
0
,
…
,
λ
F
-
1
} are the Lagrangian multipliers—which are used in accordance with the optimization task to be solved by the reduced gradients method.


## 3.2. The Applied Cost Function

During the development of the appropriate cost function—which fits to the given problem—the specificities of model (1)–(7) should be taken into account.The main limitation coming from the model is the amount of injectable insulin and the fact that we have only one control signal. The control signals at the grid points of the horizon are independent variables in the optimization problem. However, the application of a specific form of limitation on them—a “bias”—is reasonable. Thus, the control signal in this construction should be limited in accordance with the phenomenon to be controlled. Instead of the control signal itself, another variable should be selected as independent variable to avoid the initial value problems causing the rough numerical approximation at the beginning of the optimization. This is caused by the high nonlinearity in the model.Another property of the model is that only the blood glucose levelG
(
t
) can be measured. Thus, only this state variable can be embedded into the cost function to be developed. We do not have internal information about other state variables of the process to be controlled.Accordingly we have applied a more specific form of the (8) cost function:(9)
m
i
n
G
1
,
…
,
G
F
v
0
,
…
,
v
F
-
1
∑
i
=
0
F
-
1
J
G
i
,
u
i
+
Φ
G
F
s
u
b
j
e
c
t
t
o
x
i
+
1
-
x
i
Δ
t
-
f
x
i
,
u
i
=
0
,where u
i
=
u
b
i
a
s
+
t
a
n
h
(
v
i
).We have developed a strongly nonlinear cost function in which all requirements can be embedded against the control action to be reached during control.(10)
J
G
,
u
=
d
e
f
G
N
-
G
A
1
α
1
+
B
u
A
2
α
2
,
(11)
Φ
G
F
=
d
e
f
G
f
i
n
a
l
N
-
G
f
i
n
a
l
A
3
α
3
.The tracking error in (10) and (11), namely, the deviation of the realized blood glucose level G
(
t
) from the nominal blood glucose level G
N
(
t
), can be calculated as G
i
N
-
G
i at the grid points. The absolute value of this difference can be determined by parameters A
1 and A
3 that contribute the belonging level of “penalty” prevailing in the cost function. In that case if α
1
>
1 and α
3
>
1 beside |
G
N
-
G
|
<
A
1 and |
G
f
i
n
a
l
N
-
G
f
i
n
a
l
|
<
A
3, the contribution to the cost function is low. However, if |
G
N
-
G
|
>
A
1 and |
G
f
i
n
a
l
N
-
G
f
i
n
a
l
|
>
A
3 then due to the power terms the contributions to the cost of these terms are drastically increasing. The α
1 and α
3 weighting terms can be used for different purposes. α
1
=
α
3
=
1 provides proportional contribution; namely, the pure deviation will be better prohibited. However, if α
1
,
α
3
<
1, then the smaller deviations will be prohibited relatively better than the bigger ones. The role of A
2 and α
2 parameters are similar; namely, the applied control input can be prohibited by applying them. The B parameter allows modifying the enforcement of the effect of the control signal in the cost function.


## 3.3. Applied Nonlinear Programming Solver

In order to implement the reduced gradients based optimization as Nonlinear Programming task various software products can be used. Due to its complex embedded nonlinear solvers and the easy-to-use property we have selected the Microsoft’s EXCEL (MS EXCEL). The MS EXCEL’s “Solver” module is produced by an external firm Frontline Systems, Inc. There are various solutions implemented into the Solver module, including the Generalized Reduced Gradient (GRG) method which can be used in the given case as well. The GRG is based on [47, 48] and its usability has been proved in various fields of research. For example, it was successfully applied for macroeconomic optimization problems [49], operational research problems related to economics [50], optimization problems regarding transportation [31], decision prediction models [51], optimal control problems in continuous time domain [52], and so on.The optimization framework was built up by using the “Visual Basic” packages of the software “MS EXCEL 2016” under “Windows 10” operating system. The functional dependencies have been constructed in Visual Basic, and the grid points, parameters, and so forth have been defined on dedicated Worksheets—by using these data the Solver can be easily set up.


## 4. Results

In order to test the realized control framework we investigated two scenarios. In the first scenario 25 g CHO was considered—5 g over 5 minutes in each240
t
h time instant from the 60
t
h one.In the second scenario we considered50g CHO intake 10g over 5 minutes in each 240
t
h time instant from the 60
t
h time instant. In both cases 200 time horizons have been considered within 10 grid points; thus the total simulated time domain was 2000 minutes. The resolution Δ
t was 1 minute in accordance with the properties of the model.The applied cost-function parameters (which represent the control parameters in this regard) can be found in Table2.Table 2
The parameters of the applied cost function (10).
Scenario 1
Scenario 2
A
1
5 mg/dL
1 mg/dL
α
1
4
4
A
2
2 mU/min
15 mU/min
α
2
4
6
A
3
5 mg/dL
5 mg/dL
α
3
4
4
u
b
i
a
s
10 mU/min
50 mU/min
G
N
90 mg/dL
90 mg/dLIt should be noted that we have used permanent reference trajectories in both cases denoted byG
N
=
90mg/dL in (9)–(11).Therefore, in accordance with the aforementioned details, the goal of the control becomes to keepG
N
=
90 beside respecting the predefined u
b
i
a
s. In this manner—via the cost function—the deviations from these predefined values have been “punished”; namely, the value of the cost function became higher.During the examinations we have considered the following range of blood glucose as “healthy” in accordance with [11]: from 70 to 180 mg/dL.


### 4.1. Results of Scenario 1

In the following the results of Scenario 1 are presented. First, the disturbance signal is shown by Figure1. The applied—calculated—control signal can be seen in Figure 2. It is clear that the controller is able to administer the insulin in accordance with (9)–(11) where u
i
=
u
b
i
a
s
+
t
a
n
h
(
v
i
) is prevailed in the control action.Figure 1
Applied disturbance (CHO intake)—5g over 5 minutes at each 240
t
h time instant.Figure 2
Calculated control signals. (a) represents the whole time horizon. (b) shows a piece of the whole time horizon between0 and 40 minutes.
(a)
(b)Figures3 and 4 show the absorption of glucose and its appearance in the blood with the dynamics determined by the model. Figures 5 and 6 show the absorption of insulin from the interstitium and its appearance in blood.Figure 3
Variation of the first state of the glucose absorption subsystem.Figure 4
Variation of the second state of the glucose absorption subsystem.Figure 5
Variation of the first state of the insulin absorption subsystem.Figure 6
Variation of the second state of the insulin absorption subsystem.The main point can be seen on Figure7. The controller is able to satisfy the determined conditions and the BG level (G
(
t
)) is inside the predefined range—no hypo- and hyperglycemia occurred. The BG level approaches the selected reference trajectory (G
N) as it is expected.Figure 7
Variation of the blood glucose level over time.On Figures8 and 9 the variation of blood insulin level and the intermediate state variable can be seen. X
(
t
) determines how the blood insulin level affects the blood glucose level, namely, the connection between them.Figure 8
Variation of the insulin-excitable tissue glucose uptake activity over time.Figure 9
Variation of the blood insulin level over time.


### 4.2. Results of Scenario 2

The applied disturbance input in accordance with the detailed protocol can be seen in Figure10. In this case, we have applied higher inputs in order to be sure that the developed control framework is able to deal with unfavorable external excitation.Figure 10
Applied disturbance (CHO intake)—10g over 5 minutes at each 240
t
h time instant.Figure11 reveals the calculated and administered control signal. As it can be seen, its dynamics are significantly different from that of the previous case due to the different settings in the applied cost function.Figure 11
Calculated control signals. (a) represents the whole time horizon. (b) shows a piece of the whole time horizon between0 and 40 minutes.
(a)
(b)Figures12 and 13 represent the absorption of the glucose and its appearance in the blood with the dynamics determined by the model. Figures 14 and 15 show the absorption of insulin from the interstitium to the blood.Figure 12
Variation of the first state of the glucose absorption subsystem.Figure 13
Variation of the second state of the glucose absorption subsystem.Figure 14
Variation of the first state of the insulin absorption subsystem.Figure 15
Variation of the second state of the insulin absorption subsystem.The main result can be seen in Figure16. Though we have drastically increased the disturbance input signal the controller was able to deal with the situation and realized appropriate control action—without domain violation from the determined u
b
i
a
s point of view. The blood glucose level is inside the selected healthy range without any hypo- or hyperglycemia. Moreover, the BG level oscillated around the reference trajectory—G
N—as it was expected.Figure 16
Variation of the blood glucose level over time.Figures17 and 18 represent the variation of the blood insulin level and the intermediate state X
(
t
). Due to the higher frequency of the control signal these are oscillating with a higher frequency as well—which is directly reflected in the blood glucose level as well, since the X
(
t
) mediates the insulin’s effect on G
(
t
).Figure 17
Variation of the insulin-excitable tissue glucose uptake activity over time.Figure 18
Variation of the blood insulin level over time.


## 4.1. Results of Scenario 1

In the following the results of Scenario 1 are presented. First, the disturbance signal is shown by Figure1. The applied—calculated—control signal can be seen in Figure 2. It is clear that the controller is able to administer the insulin in accordance with (9)–(11) where u
i
=
u
b
i
a
s
+
t
a
n
h
(
v
i
) is prevailed in the control action.Figure 1
Applied disturbance (CHO intake)—5g over 5 minutes at each 240
t
h time instant.Figure 2
Calculated control signals. (a) represents the whole time horizon. (b) shows a piece of the whole time horizon between0 and 40 minutes.
(a)
(b)Figures3 and 4 show the absorption of glucose and its appearance in the blood with the dynamics determined by the model. Figures 5 and 6 show the absorption of insulin from the interstitium and its appearance in blood.Figure 3
Variation of the first state of the glucose absorption subsystem.Figure 4
Variation of the second state of the glucose absorption subsystem.Figure 5
Variation of the first state of the insulin absorption subsystem.Figure 6
Variation of the second state of the insulin absorption subsystem.The main point can be seen on Figure7. The controller is able to satisfy the determined conditions and the BG level (G
(
t
)) is inside the predefined range—no hypo- and hyperglycemia occurred. The BG level approaches the selected reference trajectory (G
N) as it is expected.Figure 7
Variation of the blood glucose level over time.On Figures8 and 9 the variation of blood insulin level and the intermediate state variable can be seen. X
(
t
) determines how the blood insulin level affects the blood glucose level, namely, the connection between them.Figure 8
Variation of the insulin-excitable tissue glucose uptake activity over time.Figure 9
Variation of the blood insulin level over time.


## 4.2. Results of Scenario 2

The applied disturbance input in accordance with the detailed protocol can be seen in Figure10. In this case, we have applied higher inputs in order to be sure that the developed control framework is able to deal with unfavorable external excitation.Figure 10
Applied disturbance (CHO intake)—10g over 5 minutes at each 240
t
h time instant.Figure11 reveals the calculated and administered control signal. As it can be seen, its dynamics are significantly different from that of the previous case due to the different settings in the applied cost function.Figure 11
Calculated control signals. (a) represents the whole time horizon. (b) shows a piece of the whole time horizon between0 and 40 minutes.
(a)
(b)Figures12 and 13 represent the absorption of the glucose and its appearance in the blood with the dynamics determined by the model. Figures 14 and 15 show the absorption of insulin from the interstitium to the blood.Figure 12
Variation of the first state of the glucose absorption subsystem.Figure 13
Variation of the second state of the glucose absorption subsystem.Figure 14
Variation of the first state of the insulin absorption subsystem.Figure 15
Variation of the second state of the insulin absorption subsystem.The main result can be seen in Figure16. Though we have drastically increased the disturbance input signal the controller was able to deal with the situation and realized appropriate control action—without domain violation from the determined u
b
i
a
s point of view. The blood glucose level is inside the selected healthy range without any hypo- or hyperglycemia. Moreover, the BG level oscillated around the reference trajectory—G
N—as it was expected.Figure 16
Variation of the blood glucose level over time.Figures17 and 18 represent the variation of the blood insulin level and the intermediate state X
(
t
). Due to the higher frequency of the control signal these are oscillating with a higher frequency as well—which is directly reflected in the blood glucose level as well, since the X
(
t
) mediates the insulin’s effect on G
(
t
).Figure 17
Variation of the insulin-excitable tissue glucose uptake activity over time.Figure 18
Variation of the blood insulin level over time.


## 5. Discussion

In this research our main goal was to design a RHC which is able to control the given patient model and, further, to do that by developing such a RHC controller which can be effectively combined with the RFPT principles in our later work by using the detailed NP environment. These goals have been reached.In our first scenario we aimed to test the control environment under strict constraints—the collection of them can be found in Table2. In detail, A
1
,
A
3
=
5mg/dL and α
1
,
α
3
=
4 mean that we punished the deviation of G
(
t
) from G
N heavily above 5mg/dL during the control action and in the terminal points of the cycles. We applied not just a restriction on the value of u
(
t
) via u
b
i
a
s, but also we penalized the control signals above 2 mU/min as it is reflected in A
2 and α
2.In the second scenario we investigated the “robustness” of the controller by using highly oscillating, unfavorable disturbance input in a cyclic way. As in the previous case, the controller was able to perform well—beside all of the restrictions that have been considered.The main results can be seen in Figures7 and 16. It is clearly visible that the main requirement has been satisfied, since the BG level was kept by the controller in the healthy range.


## 6. Conclusions and Future Work

In this paper we have proposed a possible design scheme for RHC controller by using a NP approach in order to control Type 1 Diabetes Mellitus. We have applied the MS EXCEL’s embedded Solver solution which is based on the Generalized Reduced Gradient method in order to realize the control environment. Two different scenarios have been applied to test our approach—the results have been satisfactory.In the first scenario we applied “soft” disturbance and smaller penalties via the developed cost function in order to make sure that the controller design is possible and appropriate control action can be achieved by using the continuous optimization. In the second test scenario we used unfavorable, cycling disturbance signal with high amplitude to test the “robustness” of the proposed controller. The developed RHC controller was able to handle the load and provided satisfactory control action. Furthermore, in both cases the BG level was kept in the predefined healthy range.In our future work we are going to extend the developed RHC controller with an additional RFPT framework in order to empower it with adaptive property. We will investigate the solution from robustness, adaptivity, and other aspects’ points of view.



---

*Source: 4670159-2018-04-23.xml*