# Recurrent Self-evolving Takagi–Sugeno–Kan Fuzzy Neural Network (RST-FNN) Based Type-2 Diabetic Modeling

Quah En Zhe, Arif Ahmed Sekh, Chai Quek, Dilip K. Prasad

► To cite this version:

Quah En Zhe, Arif Ahmed Sekh, Chai Quek, Dilip K. Prasad. Recurrent Self-evolving Takagi–Sugeno–Kan Fuzzy Neural Network (RST-FNN) Based Type-2 Diabetic Modeling. 4th International Conference on Intelligence Science (ICIS), Feb 2021, Durgapur, India. pp.125-136, 10.1007/978-3-030-74826-5_11. hal-03741726

HAL Id: hal-03741726

https://inria.hal.science/hal-03741726v1

Submitted on 1 Aug 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Recurrent Self-evolving Takagi–Sugeno–Kan
Fuzzy Neural Network (RST-FNN) based
Type-2 Diabetic Modeling

Quah En Zhe<fnref n="1" />, Arif Ahmed Sekh*<fnref n="2" />, Chai Quek<fnref n="1" />, and Dilip K. Prasad<fnref n="2" />

**Abstract.** Diabetes mellitus affected an estimated 463 million people in the year 2019. The number of diabetic patients is projected to increase to an alarming figure of 700 million by the year 2045, out of which 90 – 95% of them are expected to be type 2 diabetes mellitus (T2DM) patients. The research presented an alternative way of state-of-the-art insulin therapy using manual insulin infusion. The T2DM model that simulates the body reaction of a T2DM patient has been developed using real human clinical data that uses insulin pump therapy. The proposed system uses a closed-loop control together with fuzzy gain scheduling and recurrent self-evolving Takagi–Sugeno–Kang fuzzy neural network (RST-FNN). Such a system will help the patient remove the need for manual insulin infusion. This proposed system will record the blood glucose level and predict the next iteration’s blood glucose level. The change in blood glucose level will help detect the food intake (carbohydrates) with reference to the gain scheduler and the controller will communicate with the insulin pump to infuse the corresponding amount of insulin.

**Keywords:** Type-2 diabetes · Insulin therapy automation, · Diabetes modeling

# 1 Introduction

Food that is consumed will be broken down into glucose, which makes its way into the bloodstream and is converted into energy to support cell function and growth [1]. For glucose to be transported into the cells, insulin, which is automatically produced by the pancreas, must be present. Thus, insufficient amount or poor quality insulin will result in the cells not getting the essential energy needed to function properly.

In a healthy person, the pancreas releases sufficient glucagon or insulin to regulate low blood glucose and high blood glucose respectively, thus maintaining normoglycemia - a state of normal blood glucose level. When blood glucose level remains low over a long period of time, hypoglycemia occurs [2]. On the contrary, when blood glucose level remains high over a long period of time, hyperglycemia

<footnote n="1">¹ Nanyang Technological University, Singapore
ashcquek@ntu.edu.sg</footnote>

<footnote n="2">² UiT The Arctic University of Norway, Tromsø, Norway
{arif.ahmed.sekh,dilip.prasad}@uit.no</footnote>
occurs. Either condition can put the patient in great danger and ultimately death, if not treated in time [3; 4]. Fig. 1 demonstrates how this balance is achieved.

Diabetes mellitus, or more commonly known as just diabetes, is the inability of the body to produce sufficient insulin to help glucose enter the body's cells, resulting in high glucose levels in the bloodstream that cannot be utilized by the cells. In Type-1 Diabetes Mellitus patients (T1DM), this is caused by the pancreas' inability to produce insulin due to β-cells destruction. In Type-2 Diabetes Mellitus (T2DM) patients, the insulin produced by the pancreas is insufficient or of poor quality, and this is also known as insulin resistance [5]. T1DM affects approximately 5-10% of the diabetes patients and T2DM affects approximately 90-95% [6]. Apart from the direct risk diabetes patients face, they are exposed to increased risks of other diseases or ailments indirectly caused by the effects of diabetes [7]. Patients have a higher propensity of getting stroke, renal (kidney) failure, visual impairment and blindness, tuberculosis or the need to have their lower limbs amputated [8]. One of the most common and effective ways of treating diabetes is through insulin therapy. Insulin therapy consists of two different modes, subcutaneous injection and insulin pump. Insulin pump therapy has been gaining popularity as it helps patients to significantly improve on their glycemic control [9]. To further improve the lives of diabetic patients, automating the insulin pump to behave like an artificial pancreas by releasing the correct amount of insulin without the need for human intervention would be a major milestone. This would reduce or even remove the risk of poor carbohydrate estimation that often results in hypoglycemia or hyperglycemia in current patients.

The research motivations and objectives of the article are: (i) to design a computational model for T2DM that can mimic actual blood glucose concentration levels based on a real T2DM patient's data, (ii) design a neural network based system to predict blood glucose level, and (iii) design an automated system for insulin pump therapy.

To archive the research objectives, we have designed a computational model for T2DM that can mimic actual blood glucose concentration levels based on a real T2DM patient's data. The area of focus for the T2DM model would be the inclusion of the insulin profile that is used by the T2DM patient and finding the optimal constant glucose uptake value. The research also seeks to verify the new T2DM model through comparison with real patient data and design a closed-loop circuit control to remove human intervention regarding insulin input. In addition, a recurrent network will be introduced to allow accurate prediction of blood glucose levels to reduce the time taken in administration of insulin.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Glucose balance procedure.</figcaption></figure>
The article is organized as follows: Section 2 discuss the proposed pipeline and detail of the type-2 diabetes simulator, recurrent TSK fuzzy neural network, and the automated insulin control system. Section 3 discusses the results containing the dataset, simulation results, and results on clinical data. Finally, Section 4 presents the conclusion of the article.

## 2 Proposed Method

The proposed method consists of five modules as shown in Fig. 2. Firstly, a virtual type-2 diabetes patient simulator is used for generating training data. The parameters of the simulator are estimated using genetic algorithm (GA) [10]. Next, a Recurrent TSK Fuzzy Neural Network (RST-FNN) [11] is trained to predict the suitable insulin dose based on the health parameters of the patient. Finally, a control system is designed to deliver the suitable amount of insulin dose. Here we discuss each module in detail.

<figure><img src="image_3.png" /><figcaption>Fig. 2. Proposed type-2 diabetes modeling and insulin injection automation system.</figcaption></figure>

### 2.1 Type-2 Diabetes Simulator (T2DS):

The proposed T2DS is based on GlucoSim [12], which is primarily used for Type-1 diabetes simulation. Here, we proposed a few modification of the system. We propose a submodel of total glucose utilization (TGU), that primarily consists of two parts: (A) insulin and glucose dependent utilization and (B) insulin and glucose independent utilization. Eq. 1 and 2 indicate the calculations of the total glucose utilization rate:

$$TGU = k \cdot I_A \cdot G_B + CNU + (1 - e^{-G_B/kg.body.weight}) \quad (1)$$

$$\frac{dTGU}{dt} = -\frac{1}{T_{I_A}(I_{BD} - I_A)}, \quad I_A(t = 0) = I_{B_0} \quad (2)$$

where, $I_A$= effective insulin concentration or activity, $I_{BD}$= circulating blood insulin concentration delayed by $T_{D,TGU}$, $T_{D,TGU}$= pure time delay for the total
glucose utilization, $T_{IA}$= first order time constant for insulin action activation, $G_B$= circulating blood glucose concentration, $k$ = rate constant for the total glucose utilization. $CNU$= glucose and insulin independent utilization rate, $I_{B0}$= initial blood insulin concentration. The parameter $k$ is the most important parameter in the computational model for T2DS. It denotes the constant rate of total glucose uptake and also reflects the degree of insulin resistance (IR) which is a unique characteristic in T2DS. The value of $k$ is positively correlated to IR and can be expressed as $k \propto \frac{1}{IR}$. This representation shows that if the T2DM patient has a high IR, he/she possesses a smaller glucose uptake rate, resulting in the need to utilize a larger amount of insulin to help to convert glucose into energy in the cells. In other words, the higher the IR value, the higher the $k$ value. To find the optimal value of $k$, we have used GA. The objective is to maximize the rate of TGU, hence, eq. 2 is used as the fitness function for the GA.

GA is used to find the optimal value of $k$. We have used 70% crossover rate, 0.1% mutation rate, 100 population size. We have used 1000 generations selecting the top 10 chromosome for next generation. The upper and lower bounds of each variable are $K = [0.00, 0.001]$, $I_A = [14000, 500]$, $G_B = [200, 30]$, $CNU = [2.0, 0.5]$, and $TGU = [500, 80]$. After running GA, optimal value of $k$ is found as 0.000222.

**Insulin Submodel-based simulation** : To further improve the GlucoSim model, we propose an insulin submodel that simulates closer to reality. To do that, we must first understand the profile of Actrapid (Actrapid is a solution for injection that contains the active substance human insulin). This requires an understanding of the onset, peak, and duration of Actrapid. Here, we will use a fixed onset, peak and duration of 30 minutes, 90 minutes and 480 minutes. Next, we need a mathematical formula to calculate the amount of insulin being infused into the body at each interval. As it would be very computationally complex to model the full graph, it would be split into three parts (as shown (a),(b),(c) in Fig. 3(b)) to simplify the problem as presented in Fig. 3(a), for an example of 10 units of insulin bolus. Fig. 3(b) illustrates the modelled insulin release.

<figure><img src="image_4.png" /><figcaption>**Fig. 3.** (a) Function to calculate proposed insulin submodel. (b) Example of the division.</figcaption></figure>

This is noted that there is a need for different amounts of insulin infusion based on the requirements of the T2DM patient. Thus, we need to be able to
<figure><img src="image_5.png" /><figcaption>Fig. 4. (a) Proposed six layred Self-evolving TSK Fuzzy Neural Network. (b) Proposed type-2 diabetes modeling and insulin injection automation system.</figcaption></figure>

make the equation (Fig. 3(a)), which is based on 10 units of insulin bolus, flexible to be able to handle this requirement. Here, we made the assumption that the difference between each interval of insulin infusion is constant. This need for different amounts of insulin infusion can be resolved through the Eq. 3.

$$ insulin = \frac{bolus}{10} \times f(x) \qquad (3) $$

where $f(x)$ is calculated from equation (Fig. 3(a)) with the proposed insulin submodel. The optimal value of $k$ is 0.000265, and used in experiments.

## 2.2 Recurrent Self-evolving TSK Fuzzy Neural Network (RST-FNN) for Prediction

Recurrent neural fuzzy networks are being used to solve temporal and dynamic problems. It brings the low-level learning and computational power of neural networks into fuzzy systems and provides the high-level human-like thinking and reasoning of fuzzy systems into neural networks. The main advantage of recurrent neural network over the feedforward neural network is the ability to involve dynamic elements in the form of feedback as internal memories to make the output history-sensitive [11].

Fig. 4 illustrates the RST-FNN predictive model, which is a recurrent network. This model starts with an empty rule base with subsequent new rules added to be based on a novel fuzzy clustering algorithm which is completely data-driven. Membership functions that are highly overlapping are merged while obsolete rules are constantly pruned to maintain a compact fuzzy rule base that is relevant and accurate.

Most of the existing recurrent networks like Elman network [13] and Hopfield Network [14] do not have the capability to prune irrelevant rules by forgetting the obsolete data. Over time, these irrelevant rules may degrade the quality of the overall model, which may lead to poor prediction results. In contrast, the RST-FNN has the ability to forget/unlearn by implementing a rule pruning algorithm, which applies a 'gradual' forgetting approach and adopts the Hebbian learning mechanism behind the long-term potentiating phenomenon in the brain. RST-FNN does not require prior knowledge of the number of clusters or rules present in the training data set.
As shown in Fig. 4(a), the six-layered RST-FNN model defines a set of TSK-type IF THEN fuzzy rules. The fuzzy rules are incrementally constructed by presenting the training observations {..., (X(t), d(t)), ...} one after another, where X(t) and d(t) denote the vectors containing the inputs and the corresponding desired outputs respectively at any given time, which is represented by t. Each fuzzy rule in RST-FNN has the form shown in Eq. 4:

$$ 
\begin{array}{l}
R_k: IF(x_1 \text{ is } L_{1,j_i^k}) \dots AND (x_i \text{ is } L_{i,j_i^k}) \\
\text{THEN } f_k = b_{0k} + b_{1kx_1} + \dots + b_{ikxi} + \dots + b_{nkxn}
\end{array}
\qquad (4)
$$

where $X = [x_1, ..., x_i, ..., x_n]^T$ represents the numeric inputs of RST-FNN, $L_{i,j_i^k}(j_i = 1, ..., j_i(t), k = 1, ..., K(t))$ denotes the $j_{th}$ linguistic label of the input $x_i$ that is part of the antecedent of rule $R_k$. $j_i(t)$ is the number of fuzzy sets of $x_i$ at time $t$. $K(t)$ is the number of fuzzy rules at time $t$, $f_k$ is the crisp output of rule $R_k$, $n$ is the number of inputs, and $[b_{0k}, ..., b_{nk}]$ represents a set of consequent parameters of rule $R_k$. As seen in Fig. 4, the RST-FNN network is modelled as a multiple-input-single-output (MISO) network, requiring multiple inputs at Layer I and producing a single output at Layer VI with the intermediate layers being hidden from the user.

## 2.3 Automated Insulin Control System

The automated insulin control system proposed in [15] is an open-loop control system where no feedback is available to immediately inform the user whether the amount of input insulin, had achieved its task of reaching the desired output, normoglycemia. It is based on the estimated food intake and to infuse the corresponding amount of insulin. If the T2DM patient detects a high blood glucose level a period after the initial insulin infusion, the T2DM patient would then be required to infuse insulin again to bring down his/her blood glucose level as the initial infusion was insufficient. A closed-loop control (automated insulin infusion) with feedback is proposed here. The feedback from the blood glucose sensor would be able to help the system identify the amount of carbohydrate in the food intake and hence infuse the appropriate corresponding amount of insulin. Fig. 4(b) illustrates the proposed closed-loop control system that is being presented in this article. The two main modules of the proposed system are Insulin Response Model (IRM) and the prediction algorithm that are connected via feedback.

To reduce the risk of incorrect amount of insulin infusion in the open-loop design reported in [15], closed-loop design is capable of detecting the amount of carbohydrates in unknown food intake based on the blood glucose records and matching the pattern against the training data. Using the predicted food intake, the insulin response model would inform the insulin pump to release the corresponding amount of insulin to maintain normoglycemia.

**Insulin Response Model (IRM):** There are two proposals for the implementation of the IRM. The first proposal is when a constant amount of insulin
is infused into the body to neutralise the increasing blood glucose level. For example, from (t) to (t + 5) there was an increase in 0.1 mmol/L, where t is the time. Based on this increase, the IRM refers to a table or formula and pumps in the corresponding amount of insulin to neutralise this increase.

The second proposal is when the amount of insulin infused into the body is dependent on the prediction of food intake. Based on the same example stated above, the system is to predict the food intake by referencing the increase of blood glucose level to a lookup table or formula which indicates the food intake. The amount of insulin infused would then be decided based on the model reported in [16].

The initial risk of the first proposal is the long onset of 20-30 minutes with Actrapid. Without the aid of insulin for 30 minutes, the blood glucose level of the T2DM patient will potentially rise to a much higher level. When the insulin takes effect, it is insufficient to control the blood glucose level as the insulin dose is only sufficient for the initial increase in blood glucose level, which is lower as compared to 30 minutes later. This will result in the insulin consistently trying to keep on the increasing blood glucose level.

The subsequent risk is when the blood glucose level is nearing its peak; the blood glucose level is increasing at a decreasing rate, but the insulin reservoir is still high due to the onset. This insulin reservoir will then take effect when the blood glucose level is declining (30 minutes after infusion), resulting in a dangerous steep drop in blood glucose level. For example, the gradient of points (t + 40) and (t + 45) is 0.1 and the corresponding amount of insulin will be infused based on the lookup table or formula. At points (t + 45) and (t + 50), the gradient is -0.1. This implies that the peak is at (t + 45) and no insulin should be infused. However, the insulin infused at (t + 45) will only take effect after the onset at (t + 75), causing a steep drop in blood glucose level. This has the potential to cause the T2DM patient to experience hypoglycemia.

The initial risk of the second proposal is similar to the initial risk of the first proposal due to the long onset of 20-30 minutes taken for insulin to take effect. However, instead of neutralising every increase in blood glucose level which results in the need for the insulin to constantly “catch up”, the second proposal causes a later one-time insulin infusion due to the need to monitor the blood glucose level pattern and matching it against a lookup table or formula to predict the food intake. As a result, there will still be a risk of the T2DM patient going into hyperglycemia before insulin takes effect. With the predicted food intake, the corresponding insulin can be calculated using the [16] and infused into the body. To reduce the time required to find the pattern, a prediction algorithm can be introduced to predict the following insulin level.

# 3 Results and Discussion

**Training Data:** Training data is obtained through simulations with known food intake using the model mentioned earlier. We use six different amounts of food intakes; 15g, 30g, 45g, 60g, 75g and 90g of carbohydrates. These six
intakes are critical based on the clinical data but are not exhaustive for all cases. For each simulation, there will be two key attributes, carbohydrates (g) and blood glucose level (mmol/L). Based on these two key attributes, the initial two consecutive positive gradients and the difference of both gradients are recorded. Gradient = $\frac{y_i - y_{i-1}}{x_i - x_{i-1}}$ is used to calculate the gradient, where $(x_i, y_i)$ are data points. Positive gradients represent an increasing blood glucose level which is caused by the absorption of food by the body, thus only positive gradients are recorded. Finding the difference in gradients is also important as we need to ensure that the blood glucose level is increasing at an increasing rate, which represents the start of food absorption. When it starts to increase at a decreasing rate, it represents food absorption reaching its peak as food consumption has stopped for some time and there is less food to be absorbed by the body. This information is also recorded at different blood glucose levels to create a more comprehensive training data. Here, we use three common points of blood glucose levels; at 3.5, 5.5 and 8.0 mmol/L respectively.

As it is computationally complex and expensive to formulate a nonlinear equation that represents the insulin reaction at different blood glucose levels and food intake, using a fuzzy gain scheduling would be able to reduce the complex problem into a simpler state which can be handled more easily. One method of implementing gain scheduling is the classification of the raw data and breaking it down to be handled locally. This will not only reduce the effort to product the complex formula, but also reduce the time taken during runtime. We have used a two-step method for the classification of the training data. The first step is breaking down of multiple blood glucose level, looking at each blood glucose level as an individual rather than a whole. By passing on the blood glucose level parameter, it helps to narrow down the search function to a much smaller pool of data, making it more efficient. We have three categories of blood glucose levels here (3.5, 5.5 and 8.0 mmol/L). The second step is arranging the actual data from each test for standardisation. It will be stored in the order of [(gradient1) (gradient2) (difference between gradients)] format, where (difference between gradients) is from (gradient2) – (gradient1). The IRM is used to predict the unknown food intake by passing in the parameter [(current blood glucose level) (gradient1) (gradient2) (difference between gradients)]. As it is impossible to find an exact match during runtime unless the training data contains all possible permutations, we need to introduce another technique that would be able to help us link the input parameters to the training data. We use a fuzzy rule based for the task. The rules are:

Step 1: (a). IF (current blood glucose level) exists THEN return the column (b). IF (current blood glucose level) does not exist THEN return the column of the rounded-off value

Step 2: (a). IF (difference between gradients) is larger than 0.02 AND rounded-off to the nearest (difference between gradients) AND (gradient1) is less than 50% different, THEN return current level of (food intake)

(b). IF (difference between gradients) is larger than 0.02 AND rounded-off to the nearest (difference between gradients) AND (gradient1) is more than 50%
different, THEN return upper level of (food intake)

(c). IF (difference between gradients) is smaller or equal to 0.02 THEN do nothing

**Clinical Data:** The clinical data used in this project was obtained from KK Women's and Children's Hospital, Singapore. The data was collected from a T2DM patient using a continuous glucose monitoring system (CGMS) over a period of four days. Throughout this period, blood glucose readings, carbohydrate intakes and insulin inputs were recorded. Insulin inputs consist of two types, insulin basal rate and insulin bolus. The basal rate is a constant fixed insulin infusion that is pumped into the body through the insulin pump at intervals of one minute. The bolus is a single insulin infusion into the body based on carbohydrate intake. Both are unique to individuals and prescribed by the doctor. This is to aid T2DM patients' blood glucose levels in maintaining normoglycemia similar to that of a healthy person's. The insulin used in this study is Actrapid, a short-acting insulin. It will begin absorption into the bloodstream after 20-30 minutes (onset), peak after 90-120 minutes and have duration of about 8-12 hours. The information has been verified by experts. The T2DM patient involved in the study is obese, thus more glucose uptake is required to satisfy the daily requirements. In addition, obese people have higher risk of insulin resistance, hence making it necessary for more insulin consumption. The prescription given to the patients involved in this study is 1.5 units/hr of insulin for basal rate and 2.5 units per 15g of carbohydrate consumed.

$Bolus = (\frac{2.5}{15} \times c)$, where $c = carbohydrate(g)$ is used to calculate the amount of insulin, in units needed based on the amount of carbohydrates consumed. To maintain the current blood glucose level, a pre-bolus of insulin would be recommended to mitigate the spike in blood glucose levels from the food consumed. With an onset of 20-30 minutes for Actrapid, a pre-bolus of insulin of a similar timing is recommended to allow the insulin to take effect together with the food consumed. Although the patient usually does the pre-bolus 5-10 minutes before food consumption, it is still within the acceptable range of time given for insulin infusion. Within this time frame, insulin can still serve its purpose of regulating the blood glucose level quickly enough not to cause any endangerment to the patient's life. Over these four days, the CGMS records the blood glucose level every five minutes. The normal range of blood glucose level is defined from 3.9-7.8 mmol/L. Blood glucose level above this range is labelled as hyperglycemia while blood glucose level below this range is considered as hypoglycemia. A prolonged period in either case is dangerous and would require immediate attention in returning the blood glucose level to normoglycemia.

**Results of the Simulation:** Here, we present the results of the proposed simulation engine. We have taken a real patient for a case study and put the similar value input to the simulator. In the best case, the simulator should produce a highly correlated observation. We have validated the simulator using the difference in peak and through. We also report the Pearson correlation among them. Fig. 5(a) shows the simulation using this insulin submodel and Fig. 5(b) represents the comparisons made against clinical data. From Table (Fig. 5(b)),
we can see that based on the peaks and troughs, the time difference between the data generated by the proposed insulin model and the clinical data are acceptable. The correlation is 0.57015.

<figure><img src="image_6.png" /><figcaption>**Fig. 5.** (a) Performance of the proposed T2DM patient simulation. (b) Difference of the simulation result and clinical data.</figcaption></figure>

**Results of the RST-FNN-based Prediction:** The proposed RSTSK is trained using the simulated data. Furthermore, based on the explanation given earlier, we split the simulated data into three parts and parts a and b are used as training data. The RST-FNN is configured using the parameter [`(t - 20)(t - 15)(t - 10)(t - 5)(t)(t + 5)`], where `(t + 5)` is the output of the prediction process and the rest are inputs. We have achieved Pearson's Correlation Coefficient 0.99 for the simulation and predicted values. Fig. 6(a) shows the comparisons between simulations based on the study, the proposed design with RST-FNN and the ideal situation. From Fig. 6(a), we can see that with the introduction of RST-FNN, the results edge closer to the ideal situation. This is due to the earlier insulin infusion which makes it more similar to the recommended timing for insulin infusion. We found a correlation value of 0.99783 compared to the ideal situation (recommended). Fig. 6(b) shows a case when the method fails to predict correctly. As we can see from Fig. 6(b), both graphs do not fit perfectly, but the general shape (peaks and troughs) show signs of similarity. The major differences can be spotted after each day's dinner (approximately time = 1700 and 3400). Based on the clinical data, the T2DM patient's blood glucose level fluctuates mainly around 3.9–7.8 mmol/L, which is normal, although occasionally it would dip below it.

## 4 Conclusion

The ultimate objective is to help T2DM patients manage and improve the disease as the implications of diabetes is not limited to the disease itself. This article is split into two major components, producing a relevant model that is capable of simulating a T2DM patient and designing a system that is capable of removing human intervention regarding insulin infusion. This allows to reduce
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** (a) Results of proposed RST-FNN based prediction. (b) A case when the prediction fails.</figcaption></figure>

human errors such as wrong estimation of food intake. The introduction of a closed-loop control helps provide feedback to the input, which allows the system to understand how different food intakes affect the blood glucose level. The system can then more accurately infuse the necessary amount of insulin to achieve the desired output. With the proposed design, we have managed to achieve a closer fit to the ideal situation as compared to manual infusion performed by the T2DM patient himself. The T2DM model and the proposed design provide a basis for future research on the modelling and automation of insulin infusion for T2DM patients. The design proposed in this article has illustrated that it is able to improve on the regulation of blood glucose level in T2DM patients.

Bibliography

[1] Stephanie Kullmann, André Kleinridders, Dana M Small, Andreas Fritsche, Hans-Ulrich Häring, Hubert Preissl, and Martin Heni. Central nervous pathways of insulin action in the control of metabolism and food intake. *The Lancet Diabetes & Endocrinology*, 8(6):524–534, 2020.

[2] Harshal Deshmukh, Emma G Wilmot, Robert Gregory, Dennis Barnes, Parth Narendran, Simon Saunders, Niall Furlong, Shafie Kamaruddin, Rupmaisa Banatwalla, Roselle Herring, et al. Effect of flash glucose monitoring on glycemic control, hypoglycemia, diabetes-related distress, and resource utilization in the association of British clinical diabetologists (abcd) nationwide audit. *Diabetes care*, 43(9):2153–2160, 2020.

[3] Shujuan Li, Ying Hu, Xueying Tan, Dongwei Wang, Jingbo Hu, Ping Zou, and Li Wang. Evaluating dasiglucagon as a treatment option for hypoglycemia in diabetes. *Expert Opinion on Pharmacotherapy*, pages 1–8, 2020.

[4] David M Nathan, John B Buse, Mayer B Davidson, Ele Ferrannini, Rury R Holman, Robert Sherwin, and Bernard Zinman. Medical management of hyperglycemia in type 2 diabetes: a consensus algorithm for the initiation and adjustment of therapy: a consensus statement of the american diabetes association and the european association for the study of diabetes. *Diabetes care*, 32(1):193–203, 2009.

[5] Max C Petersen and Gerald I Shulman. Mechanisms of insulin action and insulin resistance. *Physiological reviews*, 98(4):2133–2223, 2018.
[6] WHO Definition. Diagnosis and classification of diabetes mellitus and its complications report of a who consultation part 1: Diagnosis and classification of diabetes mellitus. 1999. *World Health Organization, Geneva, Switzerland. WHO/NCD/NCS/99.2.* p, 59, 2017.

[7] Bo Zhu, Xiaomei Wu, Yifei Bi, and Yang Yang. Effect of bilirubin concentration on the risk of diabetic complications: a meta-analysis of epidemiologic studies. *Scientific reports*, 7(1):1-15, 2017.

[8] B Ruiza G Ang and GF Yu. The role of fructose in type 2 diabetes and other metabolic diseases. *Journal of Nutrition & Food Sciences*, 8(1):659, 2018.

[9] Beate Karges, Anke Schwandt, Bettina Heidtmann, Olga Kordonouri, Elisabeth Binder, Ulrike Schierloh, Claudia Boettcher, Thomas Kapellen, Joachim Rosenbauer, and Reinhard W Holl. Association of insulin pump therapy vs insulin injection therapy with severe hypoglycemia, ketoacidosis, and glycemic control among children, adolescents, and young adults with type 1 diabetes. *Jama*, 318(14):1358-1366, 2017.

[10] Hongqiang Li, Danyang Yuan, Xiangdong Ma, Dianyin Cui, and Lu Cao. Genetic algorithm for the optimization of features and neural networks in ecg signals classification. *Scientific reports*, 7:41011, 2017.

[11] A Aziz Khater, Ahmad M El-Nagar, Mohammad El-Bardini, and Nabila M El-Rabaie. Online learning based on adaptive learning rate for a class of recurrent fuzzy neural network. *Neural Computing and Applications*, 32(12):8691-8710, 2020.

[12] Fetanet Ceylan Erzen, Gülnur Birol, and Ali Cinar. Glucosim: A simulator for education on the dynamics of diabetes mellitus. In *2001 Conference Proceedings of the 23rd Annual International Conference of the IEEE Engineering in Medicine and Biology Society*, volume 4, pages 3163-3166. IEEE, 2001.

[13] S Ghosh, Bipan Tudu, Nabarun Bhattacharyya, and Rajib Bandyopadhyay. A recurrent elman network in conjunction with an electronic nose for fast prediction of optimum fermentation time of black tea. *Neural Computing and Applications*, 31(2):1165-1171, 2019.

[14] Jiu Yang, Lidan Wang, Yan Wang, and Tengteng Guo. A novel memristive hopfield neural network with application in associative memory. *Neurocomputing*, 227:142-148, 2017.

[15] Dessi P Zaharieva, Sarah McGaugh, Rubin Pooni, Todd Vienneau, Trang Ly, and Michael C Riddell. Improved open-loop glucose control with basal insulin reduction 90 minutes before aerobic exercise in patients with type 1 diabetes on continuous subcutaneous insulin infusion. *Diabetes Care*, 42(5):824-831, 2019.

[16] Wanda Rae Puckett. Dynamic modelling of diabetes mellitus. 1993.