1. Introduction
Through the development of electronic devices and sensors, modern control systems are extensively used in medical applications. One of the challenging problems is the glucose regulation of type-I diabetes (T1D). Many people all over the world are suffering from this illness. In T1D, the pancreas cannot produce enough insulin, and then the blood glucose exceeds the desired range. Insulin is a vital hormone which supports the body’s cells in its slow conversion from glucose into energy. When conversion does not happen, the blood glucose level increases and it can reach a dangerous level. The patients with this condition should always inject insulin to stay alive [
1,
2].
The control systems for this problem can be categorized into three classes: No-sensor (open-loop) control systems, classical controllers, and neuro-fuzzy control systems. In the first case, the insulin is injected by a predefined plan [
3]. The main drawback of these methods is that the insulin injection plan can be different form one patient to another. Additionally, the effect of other illnesses of patients and other unpredicted activities are not considered. Generally, these methods do not result in the desired performance [
4].
The classic controllers that are frequently used for glucose regulation can be classified into three cases: PID controllers, sliding mode controllers (SMCs), and model-based predictive controllers (MPCs). For the PID control scheme, various approaches have been presented for optimization of the PID gains. For example, in the Ref. [
5], the PID controller was optimized by the Grasshopper optimization technique, and the quantity of injection times was investigated. In the Ref. [
6], the various approaches were reviewed, and the effect of meal conditions was investigated. In the Ref. [
7], the fractional-order PID was designed and its performance was studied in comparison with integer-order PID. Similar to the Ref. [
7], the genetic algorithm was employed in the Ref. [
8] to adjust the fractional-order PID controller, and the Bergman minimal model was employed for evaluation. Various versions of the SMC scheme have been applied to the glucose regulation problem. For example, the simple SMC scheme was developed in the Refs. [
9,
10] for glucose regulation. In the Ref. [
11], the output feedback SMC was designed to retain the glucose value in a desired level, and its performance was compared with the open-loop approaches. In the Ref. [
12], the particle-swarm optimization scheme was used to tune a SMC scheme, and it was shown that the glucose level was kept near to the desired range. The terminal SMC was developed in the Ref. [
13], and the effect of mathematical uncertainties was analyzed. The other control system which has frequently been reported in the literature for glucose regulation is the MPC system [
14]. Generally, the MPC methods result in better performance than the approaches discussed above.
In most of the aforementioned studies, the controller was designed on the basis of the Bergman model. To tackle the effects of an uncertain model, some fuzzy logic controllers (FLCs) have been developed [
15,
16]. In this class of controllers, fuzzy logic systems (FLSs) are often combined with the above-discussed controllers to estimate the uncertainties. For example, in the Ref. [
17], a FLS was used in the SMC scheme to develop the regulation performance. An FLS approach based on a deep learned scheme was suggested in the Ref. [
18] to predict the glucose level in a long-term horizon. In the Ref. [
19], the FLSs were used to estimate some uncertain functions in the Bergman model. In the Ref. [
20], the blood glucose situation was analyzed by FLSs, and the suitable insulin level was determined by the FLS model. In the Ref. [
21], an artificial pancreas was designed by the use of FLSs, and better performance of the FLS model was shown in comparison with the Bergman model.
The interval type-2 FLSs (IT2-FLSs) outperformed in comparison with the type-I counterparts [
22,
23]. In a few studies, IT2-FLSs have been used in glucose regulation problems. For example, the nephropathy predicting the use of type-2 FLCs was investigated in the Ref. [
24]. In the Ref. [
25], the IT2-FLSs were used for the estimation of glucose–insulin dynamics, and the controller was designed on the basis of a fuzzy model. The backstepping control scheme was developed by IT2-FLSs in the Ref. [
26], and the better performance of type-2 FLSs was shown. The diet recommendation system was designed in the Ref. [
27] by IT2-FLSs. In the Ref. [
20], an IT2-FLS-based controller was designed, and the effect of blood sugar was investigated. In the Ref. [
28], the glucose level was predicted, and then on the basis of the glucose level, the rate of insulin injection was determined by IT2-FLSs. In the Ref. [
29], the changes of model parameters were taken into account, and a IT2-FLS-based controller was designed and the better performance of IT2-FLSs was validated.
Recently, generalized type-2 FLSs have been developed to achieve better performance in noisy complicated problems [
30]. The superiority of GT2-FLSs compared to their conventional counterparts has been shown in engineering problems, such as medical systems [
31], classification problems [
32], financial systems [
33], control systems [
34], modeling applications [
35], forecasting problems [
36], and education systems [
37], among many others.
The review of previous studies has shown that some issues in this problem need to be studied further.
In most of the aforementioned studies, the controllers were designed by the use of a simple Bergman model. However, the mathematical model of glucose–insulin in various conditions may be unreliable.
Some conventional approaches do not have any stability guarantee.
In most studies, the evolutionary-based methods are employed for controller learning that imposes a high computational cost without any stability criteria.
In most other stable and robust controllers, such as SMCs, the minimal Bergman model is used and strong dynamic perturbations are neglected. Additionally, the Bergman mathematical model is used in the controller design.
The speed of glucose regulation in most studies is not desirable enough, and needs to be studied further.
Then, the main questions of the study are as follows:
How can we design a controller that does not depend on metabolism?
How can we improve robustness against the meal effect, patient activities, and other perturbations, such as the unknown illnesses of patients?
How can modeling of the metabolism be improved, considering all uncertainties?
From the above motivations, we designed a robust control system. The dynamics of insulin/glucose were completely unknown in the schemed approach. The uncertainties were online-approximated by the suggested GT2-FLS. The suggested GT2-FLS was online-tuned such that the insulin/glucose dynamic was stable and the glucose level reached the desired level. The effects of perturbations were compensated by the designed adaptive compensator. The main advantages of this study are:
The insulin/glucose metabolism is considered to be unknown.
An effective GT2-FLS with better estimation accuracy is developed for online metabolism estimation.
The suggested GT2-FLS is optimized at every glucose measurement considering the dynamic stability criteria.
The challenging conditions, such as dynamic perturbation by noisy signals, meal effect, and estimation errors are taken into account, and an adaptive fuzzy compensator is designed.
2. System Description and Problem Statement
Diabetes is a metabolic issue which is mainly classified into two categories: type-I and type-II diabetes. The autoimmune reaction of type-I diabetic patients destructs the beta cells, and consequently, insulin production is reduced. In type-II diabetes, the body is resistant to insulin. In general, in diabetes of any type, cells are unable to convert carbohydrates into energy needed by the body, leading to high blood glucose concentrations or hyperglycemia. Consistently high blood glucose levels over a long time can lead to chronic consequences, such as heart disease, kidney failure, blindness, stroke, and amputation. On the other hand, injecting a high dose of insulin into a diabetic patient causes a severe drop in blood glucose concentration or hypoglycemia, which can lead to anesthesia, coma, and even death in the diabetic patient. Glucose control is a vital problem in type-I diabetes.
The modified Bergman is frequently used for examination of the glucose control systems. This model has a complete structure that includes meal effects and patients’ daily activities. The system dynamics are given as [
38]:
where
,
,
,
,
,
,
,
and
are positive constants.
represents the rate of glucose metabolism.
G (
) and
(
) are the glucose and insulin levels in blood.
and
denote the impact of meals on blood glucose. The system dynamics are rewritten as:
where
is defined as
, and
are dynamic perturbations. The system dynamics are estimated as:
where
is the proposed FLS and
denotes the input vector of GT2-FLS, and
represents the fractional derivative of
by order
q. The
were chosen such that the polynomial
became Hurwitz-stable. The estimated error was defined as
. The control objective is that the system output is stabilized and converged to the normal level.
Figure 1 displays the general scheme of the suggested controller. A detailed diagram is given in
Figure 2.
3. Generalized Type-2 FLS
The glucose–insulin metabolism is a complicated dynamic system because it is perturbed by various unknown factors, such as unpredicted activities, the unknown effect of various meals, and the effect of a broad range of other illnesses. Regarding the high level of uncertainties in the glucose–insulin metabolism, in this paper, a new generalized FLS is suggested for modeling the dynamics. The generalized type-2 FLSs are the developed versions of interval type-2 FLSs. In GT2-FLS, the secondary memberships are not fixed values, but they are different at each primary membership. The main approach to formulate the GT2-FLSs is the use of the
-planes approach [
39]. In this method, a general MF is represented by some horizontal slices (see
Figure 3).
The glucose–insulin metabolism is identified using a GT2-FLS. In other words, by the use GT2-FLS, the dynamics of the glucose level is modeled, and then the suitable insulin rate is determined. The schematic of GT2-FLS is presented in
Figure 4. The details are provided below [
30].
Input layer: The inputs are considered to be and .
Membership layer: Each node of a membership layer represents a membership function (MF). Three Gaussian MFs are considered as
,
, and
(the
MF for the
input). The memberships are calculated as:
where
/
denotes the upper/lower bounds for the glucose level. Similarly, the memberships for the second input are computed as:
where
and
are the lower and upper boundaries for the glucose level.
Rules layer: The output of the rule layer is written as:
The upper firing degrees are calculated as:
Type reduction layer: The output is obtained by the use of a Nie–Tan-type reduction, as [
40]:
where
M and
H are the number of rules and slices, respectively.
The output layer: The output signal is written as:
where
are the rule section parameters.
Remark 1. The rules are optimized by the online stable learning laws (18). However, the MF parameters are fixed. It should be noted that the upper and lower bounds of MFs are chosen on the basis of the input variation range. 4. Controller Design
As shown in the block diagram of
Figure 2, the modified Bergman model is employed to evaluate the designed controller. The parameters of the Bergman model are different from one patient to another. Additionally, this model can be perturbed by various factors, such as patient activities, meal effects, and other diseases of the diabetic patient. Then, to model the uncertainties, the designed GT2-FLS is suggested. Using the GT2-FLS, the glucose–insulin metabolism is modeled. The suggested fuzzy model is not fixed, but it is adaptively changed based on the glucose measurement information. The GT2-FLS is optimized by learning rules that ensure the stability. By the estimated model, the regulation system is designed that guarantees global stability. To ensure the asymptotic stability, an adaptive compensator is also designed. The compensator works with the main controller in parallel. The main results are given in two theorems. First, the global stability is investigated, and then the compensator is designed.
Theorem 1. Considering the control signal (17) and adaptive learning rules (18), the closed-loop glucose–insulin system is globally stable.
where
represents the learning rate,
r is the glucose signal, and
are positive definite matrices, such that:
where
where
and
are arbitrary positive-definite matrices.
and
Z are defined as:
Proof. First, we should obtain a relation between measured glucose and injected insulin. Based on the Bergman model, the time derivative of
yields:
The time derivative of
in (
30) results in:
By replacing (
30) in (
31), we have:
From (
32), we take one higher-order derivative and obtain
as:
By replacing
, the Equation (
33) can be rewritten as:
The Equation (
34) is simplified such that the control signal term to be seen is clearly:
The nonlinear terms are denoted by one symbol, and then the Equation (
35) is rewritten as:
where
Considering the suggested GT2-FLS, the dynamics are estimated as:
where
is the suggested FLS,
is the input vector of GT2-FLS, and
q represents the value of fractional-order derivatives. The
are positive constants that are determined by the Hurwitz stability criteria. The estimation error
is defined as
.
From (
41), the estimation error
becomes:
By adding and subtracting the FLS with optimal parameters and the optimal
g in (
39), one has:
Considering the vector form representation of GT2-FLS (
can be written as
, see
Z in (
29)), the Equation (
40) can be rewritten as:
where
denotes the estimation error:
The
and
are defined as follows:
where
is the vector rule parameter that is defined in (
28). By applying the controller (
17) to the estimated system (
38), the dynamic of the tracking error becomes:
In the vector form, we have:
where
Consider the Lyapunov function as:
where
The time-derivative of (
54) results in:
By replacing (
45) and (
46), we have:
From (
55) and (
56),
becomes:
Equation (
61) can be rewritten as:
Form (
18), the Equation (
62) is written as:
From (
63), we have:
where
denotes the upper bound of
. The inequality (
64) can be rewritten as:
where
and
represent the maximum eigenvalues of
and
, respectively. From (
65), we see that the global stability can be derived considering the suitable
and
. This completes the proof. □
To ensure the asymptotic stability, an adaptive compensator is designed. The details are presented in Theorem 2.
Theorem 2. By updating the control signal and adaptive learning rules as (66) and (67), the asymptotic stability is ensured.
where
represents the fuzzy compensator, and
is the vector of compensator parameters.
Proof. Considering the updated controller (
66), we have:
Then in the vector form, we have:
Consider the Lyapunov function as:
The time derivative of (
54) results in:
By replacing the control signal (
66), and some simplifications,
becomes:
By tuning rules (
18), and Equations (
19), (
20) and (
42), one has:
By adding and subtracting
into (
74), one has:
By the tuning rule (
67), the inequality (
75) becomes:
From the fact that the is a positive term and represents an optimal negligible estimation error, then it can be derived that by the proper choosing of and , the asymptotic stability is ensured. □
5. Simulation
The designed glucose control system is examined by the use of the Bergman model of some patients under various conditions. In
Table 1,
Table 2 and
Table 3, the Bergman models are described. The trajectory of the glucose level in the case where there is no control signal is depicted in
Figure 5. We see that the glucose level rapidly exceeds the desired range.
To examine the capability of the designed controller, different initial glucose levels are considered. The glucose trajectory for three patients is given in
Figure 6,
Figure 7 and
Figure 8. We see that the glucose trajectory is perfectly regulated on an acceptable level.
For further examination, besides the unknown model, white noise was also applied on the Bergman model. The imposed noise strongly disturbs the glucose–insulin dynamics. It should be noted that in the modified Bergman model, another disturbance was also taken to account, namely, the meal disturbance. Similar to the first scenario, the glucose level trajectory in the case where there is no control signal is given in
Figure 9. As it can be observed, by the imposed noise, the dynamics become unstable and the glucose level rapidly exceeds the desired range. The performance is depicted in
Figure 10,
Figure 11 and
Figure 12 for the first, second, and third patients. We see that by the designed controller, the glucose level for all patients are well-converged to the desired trajectory.
To better verify the performance of the suggested method, a comparison with some other techniques is presented. The regulation accuracy is compared with proportional-derivative-integral fuzzy control (PID-FLC) [
42], and fuzzy self-adjusting control (SFLC) [
43]. For the comparison, just a normal condition under a meal effect was considered. The comparison of RMSE results is provided in
Table 4. Additionally, the trajectories of glucose level by various controllers are given in
Figure 13. We see that our designed controller results in better glucose regulation performance. It should be noted that under difficult noisy conditions, the conventional methods become unstable and cannot handle the high level of uncertainties.
The Sobol approach is often used for sensitivity analysis. The variance of output of the suggested fuzzy model is decomposed on its input variance. The sensitivity index is a number that ranges from 0 to 1. The bigger the index, the greater the effect. To compute the Sobol index, for patient 1, the data were saved form 0 until 5(h).
Table 5 shows the first-order sensitivity index values.
Remark 2. The main advantages of the designed scheme are that: (1) From one patient to another, there is no need for further changes in the controller. In other words, the controller has a self-organized scheme. (2) In addition to the unknown metabolism, the meal effect is also considered in the designing process. (3) The effect of basic perturbations, such as the abnormal activities of patients or other illnesses of the patients are taken into account, and compensated by the designed fuzzy supervisor.
Remark 3. The main drawback is that the rate of injected insulin was not optimal. In other words, there were no restrictions on the amount of injected insulin. In future studies, the optimality of injected insulin should be investigated further.
Remark 4. The designed controller considers the main restrictions of real-world conditions. Then it can be implemented to regulate the blood-glucose of type-I diabetic patients.