Optimized type-2 fuzzy controller based on IoMT for stabilizing the glucose level in type-1 diabetic patients

Due to advancements in existing Internet of Medical Things (IoMT) systems and devices, the blood glucose level (BGL) for type-1 diabetic patients (T1DPs) is effectively and continually monitored and controlled by Artificial Pancreas. Because the regulation of BGL is a very complex process, many efforts have been conducted to design a powerful and effective controller for the exogenous insulin infusion system. The main objective of this study is to propose an optimized interval type-2 fuzzy (IT2F) based controller of artificial pancreas for regulation BGL of T1DP based on IoMT. The proposed controller should avoid the risk of hyperglycemia and hypoglycemia situations that T1DP faces during the infusion of exogenous insulin. The main contribution of this work is using meta-heuristic method called grey wolf optimizer (GWO) to tune the footprint of uncertainty for IT2F’s membership functions to inject the proper dose of insulin under different conditions. The nonlinear extended Bergman minimal model (EBMM) with uncertainty is used to represent the blood glucose regulation and represent the dynamics of meal disturbance in T1DP. The effectiveness and the performance of the proposed controller are investigated using MATLAB/Simulink platform. Simulation results show that the proposed controller can avoid both severe hypoglycemia and hyperglycemia for nominal parameters of the model, in addition to model under the presence of both parametric uncertainty and uncertain meal disturbance.

Since the discovering of insulin by Frederick G Banting, Charles H Best and JJR Macleod, many efforts have been conducted sequentially to regulate of blood glucose level (BGL) for type-1 diabetic patients (T1DPs).BGL in a human body must be naturally within the physiological range of 70-180 mg/dl 1,2 .Regulation of BGL is a very complex process that comes through the interaction of several feedback mechanisms of many vital organs such as liver, brain, intestines, pancreas, and others 3 .The traditional therapy (open loop control method) of treating patients with type-1 diabetic mellitus (T1DM) is based on measuring the BGL of patient several times daily using blood glucose meter and if the BGL is at high values, then according to the values of the measurements the right dose of exogenous insulin is calculated and then it is infused subcutaneously into patient to lower the BGL 4 .But

Related works
Recently, there have been numerous mathematical models that contribute to describe the behavior of glucoseinsulin physiological system for T1DP 8,9 , which is in general classified into two types, intravenous, and subcutaneous based on the way of the measurements of insulin and glucose 10 .Many efforts have been made nowadays to design an effective and robust control algorithm for AP based on linear control approaches and nonlinear control approaches.The linear control approach such as PID controllers are given in 2 , that are suggested to prevent excessive intake of exogenous insulin.An adaptive PID algorithm using metaheuristic technique to stabilize the glucose level in blood for T1DP is proposed in 11 .Other controller technique like an inverse optimal control (IOC) that integrates neural identification, a multi-step prediction (MSP) technique, and Takagi-Sugeno (T-S) fuzzy inference is designed in 12 .While the nonlinear control approaches were proposed to regulate the BGL such as terminal synergetic controller and state feedback linearization based controller 13 , arbitrary-order sliding mode based robust controller 14 , backstepping sliding mode controller and super-twisting controller 15 , observer based nonlinear controller 16 , robust observer based adaptive controller 1 , finite-time robust feedback controller based using backstepping approach 17 , integral backstepping controller, backstepping controller 18 , fuzzy logic based controller 19 .
In most of the aforementioned studies, an intravenous glucose tolerance test (IVGTT) of Bergman minimal model 9 is considered the most abundant in research related to artificial pancreas, as it is less complex compared to the others while maintaining the minimum state variables necessary to constitute the complete behavior of glucose-insulin physiological system for T1DP.It consists of three differential equations with three states; the first refers to BGL, the second refers to remote insulin, and the latter refers to plasma insulin level.The controllers were created using a Bergman minima model in the majority of the research described above.The mathematical model of glucose-insulin in diverse situations, however, might not be accurate.Also, many conventional methods do not guarantee stability and amny research use evolutionary-based controller learning techniques, which have a high computing cost and lack any stability requirements.Besides, large dynamic disturbances are ignored in most controller techniques.
When the dynamics of the system to be controlled are too complex, nonlinear, time varying, and the system has a large number of inputs and outputs and it has a time delay 20,21 , many variables will affect the performance of the system.Thereby the derivations of the mathematical model of the system which is may deduced from (mechanical laws, physical laws, and so on) in the form of differential and difference equations become too complicated and challenging, and in most situations it would be imprecise to constitute the complete behavior of the real system.
Based on the foregoing, linear control approaches which in many cases depend primarily on the mathematical model of the system would fail to meet the desired performance of the controlled system [22][23][24][25][26] .So, type-2 fuzzy logic controller (T2FLC) which is a type-2 Fuzzy based controller 27,28 is very appropriate to obtain the desired performance of the controlled system due to the internal structure of type-2 fuzzy logic system (T2FLS) which have the capability to model the uncertainties in the system and minimize the effect of it [29][30][31][32] .
Uncertainties are often found in the control system in more than one aspect, we will list some of them: (1) the lack of precision and accuracy of the sensors which are used to support the system with the needed measurements, thereby the data based on these measurements are noisy.(2) Disturbances caused by the surrounding environment such as electromagnetic interference which is related to the stability of the system since it affects directly on data transmission from sensors to controller and from controller to actuators.(3) In fuzzy logic system (FLS) based controller, we use linguistic variables in the antecedent and consequent part of rule base which means that we express variables with words rather than number, these words can be a rich source of uncertainties as words can mean different things to different people (4) Modeling of complex-nonlinear systems causes modeling uncertainties 20,21,33 .
In this study an interval type-2 fuzzy based controller is proposed with the conjunction of meta-heuristic method called grey wolf optimized 34 for regulation of BGL for T1DP.The extended Bergman minimal model (EBMM) with uncertainty is used to represent the blood glucose dynamic behavior of T1DP 16 .The superiority of IT2FLC is minimizing the effect of uncertainties in the system which is depending primarily on the selecting of footprint of uncertainty (FOU) of interval type-2 fuzzy set (IT2FS) for each inputs and output of the proposed controller.So, these FOUs of IT2FLC are tuned using the GWO and the objective function of GWO is minimized during the optimization process in order to decrease the effect of both parametric uncertainty and uncertain meal disturbance to stabilize BGL within the standard safe level.Thereby, GWO contributes essentially in regulation of BGL for T1DP.Then, the performance and the effectiveness of the proposed controller are studied under four different cases of T1DP using Matlab/Simulink platform.Morever control variability grid analysis (CVGA) is used to evaluate the quality of the proposed controller within 24 h of 100 typ1 1 patients.Three distinct meals 5 mg/dl/min for breakfast, 8 mg/dl/min for lunch, and 8 mg/dl/min dinner are provided for each of 100 T1DPs at 480 min (8 am), 720 min (12 am), and 1200 min (8 am) respectively to observe the response and the efficiency of the optimized IT2FLC under different conditions for various patients.Simulation results show that the proposed controller can avoid both severe hypoglycemia and hyperglycemia for nominal parameters of the model, in addition to model under the presence of both parametric uncertainty and uncertain meal disturbance.The contributions of this work are: • An effective IT2F controller for Extended Bergman minimal model of T1DP is developed • An optimal fuzzy compensator is created while taking into account the difficult conditions, including esti- mating errors, meal impact, and dynamic disturbance by noisy signals.
• The FOU for IT2F controller is tuned using GWO, that can perfectly manage the uncertainty and perturba- tions in the model • Conducting several scenarios for different patients to show the superior and performance of the proposed controller The rest of this paper is organized as follows: in Section "Methods", we introduce the EBMM of T1DP, the related concepts of IT2FS and metaheuristic technique called GWO is introduced.The simulation of different scenarios for blood glucose situation based on IT2 FSs is presented in Section "Proposed system for regulation of BGL"; Section "Simulation results" provides the four different scenarios for Type-1 diabetic patients; Section "Discussion" provides discussion for the simulation results and analyzes the evolution process of blood glucose situation; Section "Conclusions" concludes the paper.
Extended Bergman minimal model of T1DP.The original mathematical model of Bergman minimal model is consists of three differential equations with three state variables, the first refers to BGL 9 , the second refers to remote insulin, and the latter refers to plasma insulin level, Bergman minimal model has been extended to include fourth equation with fourth state variable to represent the dynamics of meal disturbance, thereby the state space representation of the nonlinear EBMM is as follow 16 : where, x 1 refers to the BGL (mg/dl), x 2 refers to the remote insulin ( min −1 ), x 3 refers to the plasma insulin level (mU/l), x 4 refers to the meal disturbance (mg/dl/min), the initial state of x 4 refers to amount of glucose in the meal, u(t) refers to the rate of exogenous insulin infusion which replaces the natural insulin in the normal body (mU/l/min) , G b refers to the basal value of BGL which expresses the value at which the BGL stabilizes after glucose is absorbed, I b refers to the basal value of plasma insulin level which expresses the value at which insulin level stabilizes after insulin is released to lower BGL in blood stream , p 1 refers to glucose effectiveness (min −1 ) , the ratio p 3 p 2 refers to insulin sensitivity ( l (mU) ) , p 4 refers to insulin degradation rate (min −1 ) , and p 5 refers to the rate of appearance of meal disturbance in plasma glucose (min −1 ).
The nominal values and range of parameters for the extended Bergman minimal model (EBMM) are shown in Table 1 16 .

Design of interval T2FLC for regulation of BGL of T1DP.
In 1975 Zadeh realized the deficiencies of type-1fuzzy sets (ordinary fuzzy sets) in handling uncertainties in the system.After that the concept of T2FSs is introduced as an extension of the concept of ordinary fuzzy sets 27 .It is well known that a FLS is characterized by its fuzzy sets, so a FLS that is described using at least one T2FS in antecedent or consequent part of its rule-base is called T2FLS 28 .The feasibility of T2FLS appears strongly in the applications that subjected to uncertainties, so many efforts have been made to get benefits from T2FLS and to facilitate the complex mathematical operations associated with it so that researchers and engineers can use it in solving problems of many different applications in various areas.
Type-2 fuzzy sets.Consider the triangle T1FS A in Fig. 2, the membership function of any given point on the universe of discourse ( X) x′ ∈ X is a single specific number u′ where µ A (x′) = u′ .And as explained in details in 28 , So in order to model uncertainties about any variable, It is required a way to measure the dispersion about (1) www.nature.com/scientificreports/ the variable (how the points that constitute the uncertainties about the variable are distributed and spanned), as in probability density function, variance is needed to provide a measure of dispersion about the mean, so a set of numbers is needed rather than a single specific number in T1FS to capture more information about uncertainties, consequently.T1FSs has limited capabilities to model such uncertainties.

Parameters Nominal value Range
On the other hand, T2FS have the capability to effectively model the uncertainties in the system, T2FS is obtained with blurring the type-1 membership function of T1FS in Fig. 2 by shifting the points on the triangle either to the left or to the right and not necessarily by the same amounts as illustrated in Fig. 3.Then, at a specific value of X say x′ ∈ X , there is no longer is a single value for the membership function (u′) ; instead, the member- ship function takes on values wherever the vertical line intersects the blur.Those values don't need be weighted in the same way; hence, it can be assigned an amplitude distribution to all of those points.Doing this for all x ∈ X , a three-dimensional membership function-a type-2 membership function -is created that characterizes a T2FS." Consequently it is obtained three dimensional type-2 membership function its axes are x, u, µ A (x, u) as illustrated in Fig. 4. Therefore, due to the new third dimension, T2FS can capture more information about the uncertainties about the variable, and thus it can effectively model uncertainties in the system.
Figure 5 illustrates in µ A (x, u) − u plane that the amplitudes distribution resulted from the intersection of the vertical line at x′ with the blurred membership function in Fig. 3 is not necessary that all of them be equal.www.nature.com/scientificreports/However when all amplitudes distribution (vertical slices) in µ A (x, u) axis equal to 1, then the resulting type-2 membership function is an interval type-2 membership function (T2MF) that characterizes an interval T2FS. Figure 6 illustrates the three dimensional IT2MF whose axes are x, u, µ A (x, u) in which all amplitudes dis- tribution (the vertical slices) in µ A (x, u) axis equal to 1.
Here is the following some notation and definitions listed with comprehensive details in 28 , we will mention some briefly, it will help us to use and communicate about T2FSs: In Fig. 2 if A is a T1FS, it may be expressed as: And also can be expressed as: where µ A (x) is the membership grade of x ∈ X in A which is a single specific number, it takes just one value from the constraint 0 ≤ µ A (x) ≤ 1 , and denotes union over all admissible x.In Fig. 4 A is a T2FS, is expressed by: In which 0 ≤ µ A (x, u) ≤ 1 Also A can be expressed as: where µ Ã(x, u) is a type-2 membership function that characterizes a T2FS, and denotes union over all admis- sible x and u.J x Is the primary membership of x in A , also called the domain of a secondary membership of x in A.
The memberships of the primary membership of x in A are called the secondary membership of x in A and also called the vertical slices in µ A (x, u) axis.
The amplitude of a secondary membership is called a secondary grade.When all of the vertical slices in µ A (x, u) axis equal 1 (the secondary grades equal 1), then the resulting T2MF is an interval T2MF that characterizes an interval T2FS, Ã can be expressed by: The FOU in the primary memberships of A is the union of all primary memberships that is: The shaded region on the x − u plane in Fig. 4 is the FOU.For an interval T2FS the FOU is a complete descrip- tion of an interval T2FS, this is because the secondary grades of an interval T2FS equal to 1, thereby it conveys no new information.The FOU for an interval T2FS is shown in Fig. 7, it is bounded from the above and below by a two type-1 membership functions that are called lower membership function and upper membership function, and are denoted µ A (x) , µ A _ (x) , ∀xǫX respectively.
Interval type-2 fuzzy logic system.Unfortunately the mathematical operations that are associated with T2FSs are very complex and time consuming while it is simple to interval T2FSs 28 which is considered a special case of the general T2FSs as it needs to can use interval T2FSs that we are just familiar with the mathematical operations of T1FSs such as: union, intersection, and complement.Consequently interval T2FLS that is characterized by its interval T2FS have gained popularity among many practitioners and engineers, and for this, interval T2FLS have been contributed in different applications in different fields 32 .
The structure of interval T2FLS is shown in Fig. 8 ,it is almost the same as for its counterpart T1FLS, its rule-base is composed of (IF-THEN) rules as for T1FLS but now some or all of its antecedent and consequent parts are of interval T2FS, it differs from T1FLS in that the output of the fuzzifier block is now of interval T2FSs, consequently the fuzzy output sets of inference engine block is now of interval T2FSs, and as the case for most applications like in a control system, it requires a single crisp number from the output of FLS rather than a set of numbers in order to can take a control action, so the defuzzifier block in T1FLS is replaced by output processing block which internally consists of two blocks, the first which converts interval T2FS to T1FS is called type-reducer and the second is just a defuzzifier as in T1FLS to convert T1FS to a single crisp number.
In general there are two ways to go from interval T2FSs to a crisp number, the first one is to use typereducer + defuzzification method which first converts interval T2FSs to T1FS then a defuzzification is run to convert T1FS to a crisp number, the second is called direct defuzzification method which converts interval T2FSs directly to a crisp number without the need of using a type-reduction, in this paper we will use typereducer + defuzzification method.
There are many algorithms one can use to perform type-reduction, Karnik-Mendel (KM) algorithm 28 is the popular one, it is simple and converges to the exact solution, but it is iterative and computationally intensive, so in the last few years a lot of researches have been provided in attempt to reduce the computational cost associated with KM algorithm such as enhanced KM algorithm which can reduce more than 39% in computational time over KM algorithm, and an enhanced iterative algorithm with stop condition (EIASC) which can save more 50% computational cost over KM algorithm particularly when number of rules N ≤ 100.
Also for Mamdani interval T2FLS, Wu-Mendel proposed a method called the Wu-Mendel uncertainty bounds to approximate the type -reduced set to avoid the iterative algorithms, it calculates four centroids which is called (boundary type-1 fuzzy systems) for an interval T2FLS, it depends only on the upper and lower firing level of each rule and the endpoints centroids of each rule consequent, but in this method we still have to use KM algorithm to obtain the endpoints centroids of each rule consequent which have to be done once.
In this paper we will focus on using EIASC algorithm to perform type-reduction to get a crisp number from interval T2FLS.Now in the following subsections we will explain in details how to implement each stage of interval T2FLS that will later incorporate into interval T2FLC for regulation of BGL of T1DP to get a crisp number from inter-valT2FSs, and for further clarification we will support the explanation of each following stage with a specific numerical example that will last during the explanation of each stage.
Rule-base of interval TFLS.In this paper we will use Zadeh rule-base, and as we mentioned earlier the structure of rule-base for interval T2FLS remains the same as for T1FLS counterpart, the only difference is some or all of its antecedent and consequent parts are of interval T2FS, the structure of the general Zadeh rule for interval T2FLS which has p inputs x 1 ∈ X 1 , . . .., x p ∈ X p , and one output y ∈ Y is as follow 28 : For example we suppose that we have an interval T2FLS with four rules N = 4 , two inputs x 1 ,x 2 and one out- put y , the domain of input x 1 consists of two triangular interval T2MFs A and B , the domain of input x 2 consists of two triangular interval T2MFs C and D , and the domain of output y consists of four triangular interval T2MFs G 1 , G 2 , G 3 , and G 4 as shown in Fig. 9, then the four rules are: Fuzzifier of interval T2FLS.It performs fuzzification process which converts crisp inputs into interval T2FSs, it is the same as for the fuzzification of T1FSs, but now we have for each point in the universe of discourse two interval membership values rather than one membership value in the T1FSs, both of them are calculated from the intersection of the vertical line with the lower membership function and upper membership function respectively.For example when x 1 = x 1 ′ = −0.07 and x 2 = x 2 ′ = 0.09 , then the vertical line at x 1 ′ intersects A within the two interval values µ ) , thereby the interval values that deduced from the fuzzification process of the inputs are: R l : IFx 1 is Fl 1 and . . .andx p is Fl p , THENyis Gl , l = 1, . . ., N. www.nature.com/scientificreports/Inference engine of interval T2FLS.It is the same as for the inference engine of T1FLS, it deduces the clipped interval T2FS consequent for the output variable of each rule in the rule-base for a given crisp value of the input variables (those values that we get from the fuzzifier of interval TFLS stage) and this process also called rule firing, consequently we have for each rule of interval T2FLS two interval firing level, lower firing level f l and upper firing level f l 28 , then it combines all the clipped interval T2FSs consequents of the fired rules into one overall fuzzy set that constitutes the output of the inference engine which is the input to the output processing, We assumed to use interval type-2 mamdani fuzzy system and minimum t-norm operator, so the two firing interval for the four rules are: Now we have got the values for the firing interval of each rule, then f l for each rule is t-normed with lower membership function of G l and f l for each rule is t-normed with upper membership function of G l to get a clipped interval T2FS consequent from each rule, and after that the clipped interval T2FS consequent of each rule are combined together (using union operator) into one overall clipped interval T2FS as shown in Fig. 10.
Type-reduction and defuzzification of IT2FSs.It was supposed just as for T1FLS after we got the resulted clipped interval T2FS that we can as usual run one of the defuzzification methods to get the crisp output, but for the interval T2FLS the union of the clipped interval T2FSs of each rule become a big issue with regarding to the computational complexity as it requires additional computational time and memory storage particularly with a real time applications such as a control system 31 .So instead of type-reducer + defuzzification method is used to combine the firing interval of each rule with the corresponding rule consequent and get the crisp output, there are many methods to do that: Centroid, Height, and Center-of-sets type-reducer + defuzzification method.In this paper we will use center-of-sets (COS) method for an interval type-2 Mamdani fuzzy system in which the firing interval of each rule is combined with the corresponding endpoints centroids of its consequent.By using this method we get the COS type-reduced-set denoted Y cos (x′) for an interval type-2 mamdani fuzzy system Where: N is number of rules; L and R are the switch points that Satisfy: y l and y r can be computed using EIASC algorithm , after that we can easily get the crisp output of interval type-2 mamdani fuzzy system from the following formula But before we go through EIASC algorithm we have to first calculate for each rule the endpoints centroids of its consequent by using the KM algorithm which is calculated only once using the Matlab function "cen-troidIT2" 35 as follow: where G l , G l are the two endpoints centroids of the consequent G l and l = 1, . . . . . ., N.
• EIASC algorithm for computing y l : (a) Sort G l (l = 1, . . . . . ., N) in increasing order and call the sorted G l by the same name, but now Vol www.nature.com/scientificreports/ • EIASC algorithm for computing y r : (a) Sort G l (l = 1, . . . . . ., N) in increasing order and call the sorted G l by the same name, but now Using EIASC algorithm and consequently we can now compute the crisp output of interval type-2 Mamdani fuzzy system from the following formula: Grey wolf optimizer.The parameters, wi, wi1, wi2 of interval T2FLC are tuned using GWO algorithm 34 .
GWO imitates the leadership hierarchy and hunting mechanism of grey wolves in nature, the hunting mechanism includes three steps: (1) Searching and approaching the prey.(2) Encircling, and harassing the prey until it stops moving.(3) Attacking the prey.
The leadership hierarchy of grey wolves in the herd includes four types of grey wolves like alpha, beta, delta, and omega.The dominance of the leadership hierarchy decrease from alpha to omega where is the leader that responsible for making decisions, Beta help alpha in making decisions enhances the commands of alpha in the herd and gives the feedback to alpha, Omega has to submit to alpha, beta and delta, it plays the role of scapegoat, and it is considered the lowest rank in the herd, Delta has to submit to alpha and beta but it dominates omega, it constitutes the category of elders, scouts, caretakers, sentinels, and hunters.
The mathematical model of GWO depends on three main rules: (1) Searching for prey and Leadership hierarchy Searching process for prey is always guided by the positions of Alpha ( α ), beta ( β ), and delta ( δ ), grey wolves diverge from each other during searching process and converge to attach prey when it stops moving.So during optimization (hunting) α is considered the best fittest solution, β as the second best solution, and δ as the third best solution, and the rest of solutions is considered as omega ( ω ) that follows alpha, beta, and delta.
(2) Encircling and harassing prey Encircling behavior of grey wolves during hunting (optimization) can be modeled with following equations 34 . where: X p refers to the position vector of the prey, − → X refers to the position vector of a grey wolf, t refers to the current iteration.
(3) Attacking process Grey wolves update their positions guided by α, β , and δ , they start to attack the prey when it stops moving, the process can be modelled with following equations The flowchart for the GWO is shown in Fig. 11.The fitness value for each search agent is calculated from the objective function that is considered the criteria most influential during optimization to obtain the desired parameters of the controller, it may be minimized or maximized to obtain the desired response of the controller.

Stability analyses.
In this section we shall prove asymptotic stability of interval T2FLC for regulation BGL of T1DP using Lyapunov theory 36 .Our target is to design the control signal U such that the BGL of T1DP x 1 follows the set BGL R , that is the error signal e → 0 as t → ∞ where: So the Lyapunov function candidate is chosen as www.nature.com/scientificreports/According to Lyapunov stability theory for the system to be asymptotic stable, V (e, ė) must be negative definite 36 .

Proposed system for regulation of BGL
The optimized IT2F controller is proposed to regulate the BGL of T1DP.The controller is assessed using EBMM which give an accurate model for the patient.The parameters of the EBMM are different from one patient to another so, the IT2F controller is not fixed and its parameters are tuned using metaheuristic technique.GWO is used to adjust the FOU of the membership functions of IT2F controller to cope with the change in the uncertainty and perturbations.Figure 12 shows the block diagram for regulation of BGL of T1DP using interval T2FLC with GWO based on IoMT.
The inputs of the controller are the error signal e and the change of error signal e , u is the output of control- ler, R refers to the desired BGL, and G refers to the measured BGL of T1DP.The surface output for inference of IT2F is shown in Fig. 13.Table 2 represents the knowledge base defining the rules for the desired relationship between the inputs and output.
Each of the signals e, e, u has its own FOU where s e , s ce , s u in Fig. 12 refers to width for FOU of interval T2MF for e, e, u respectively, we will tune the FOU of each signal to adjust the controller to cope with the uncertainty of the process.In this paper s e , s ce , s u of the proposed controller are tunning GWO technique to obtain the optimal response 34 .

Simulation results
In this section, the performance and the effectiveness of interval T2FLC in regulating BGL for EBMM of T1DP are investigated under four different scenarios using MATLAB/Simulink platform 37 .The challenges facing the proposed controller become more difficult the more we go from scenario 1 to scenario 4 to ensure its efficiency and robustness.Consequently, the main objective of the proposed controller is to lower BGL after a meal is provided to a T1DP more than 180 mg/dl from the state of hyperglycemia within 120 min to avoid post-prandial hyperglycemia, while it must preserve BGL not less than at any instance 50 mg/dl to avoid severe hypoglycemia.Also, the required.The parameters, s e , s ce , s u of interval T2FLC are equal to 0.0080217, 0.0045828, and 0.0013535 respectively.It was obtained from GWO algorithm with the configuration of 20 iteration numbers for each of 30 search agents, and minimization of the objective function that is equal to sum of integral absolute of error signal and integral absolute of control signal.
Scenario 1: In this Scenario, it is assumed that the simulation period is 800 min, the initial conditions of the state variables of extended BM model at t = 0min are x 1 = 250mg/dl reflects that T1DP is already in the state of hyper- glycemia, x 2 = 0min −1 , x 3 = 7mU/l ensuring that there is no insulin infusion before the starting of simulation, x 4 = 10mg/dl/min that means a large meal disturbance with a very high glucose content is provided at the start

Scenario 2:
Here, a 100 virtual T1DPs are used in simulation in order to investigate the behavior of interval T2FLC under both parametric uncertainty of EBMM and random initial conditions of BGL that state variable x 1 changes randomly from 80 to 350 mg/dl.At start of each simulation period the parameters p 1 ,p 2 , p 3 , p 4 , and p 5 are randomly chosen from Table1 to constitute a 100 virtual T1DPs.The initial conditions of the state vari- ables of EBMM at t = 0 are x 2 = 0min −1 , x 3 = 7mU/l .Also it is assumed that T1DPs are in fasting condition that x 4 = 0mg/dl/min during the whole simulation period and the basal values for glucose and insulin are G b = 80mg/dl,I b = 7mU/l respectively.Scenario 3: The configuration of this scenario is as for scenario 2 except that a single meal disturbance with a very high rate of glucose absorption is provided at the start of each simulation that x 4 = 10mg/dl/min .So the objective of this case is to investigate the behavior of interval T2FLC for each of parametric uncertainties of extended BM model, random initial condition of BGL, and meal disturbance.
Scenario 4: Now, 100 different type-1 diabetic patients are tested with 1440 min running period to simulate a more realistic situation for different T1DPs.Consequently, the objective of this scenario is to investigate the behavior of the proposed controller within 24 h for different patients' daily life.So, a three different meals 5 mg/dl/min for breakfast, 8 mg/dl/min for lunch, and 8 mg/dl/min dinner are provided to each of 100 T1DPs at 480 min (8 am), 720 min( 12 am), and 1200 min( 8 am) respectively.At start of each simulation period the parameters p 1 ,p 2 , p 3 , p 4 , and p 5 are randomly chosen from Table1 to constitute a 100 virtual T1DPs, the initial conditions of the state variables are x 2 = 0min −1 , x 3 = 7mU/l , x 4 = 0mg/dl/min , and the basal values for glucose and insulin are G b = 80mg/dl,I b = 7mU/l respectively.

Discussions
In Scenario 1: Fig. 14a showed that the proposed controller lowered BGL more than 180 mg/dl from the state of hyperglycemia within 120 min in spite of a meal disturbance with a very high glucose content was provided at the start of the simulation, the shape of the meal disturbance is shown in Fig. 15, in addition BGL stabilized at basal glucose level of 80 mg/dl without any hypoglycemia at any instance as desired, as shown in Fig. 14b response of insulin infusion rate is always positive and smooth, it reflects that the proposed controller not complicated doesn't need any excessive method or algorithm to inject glucagon or glucose to avoid hypoglycemia.
In Scenario 2: with both parametric uncertainty and random initial conditions of BGL as shown in Fig. 16a the proposed controller lowered effectively BGL of all 100 virtual T1DPs more than 180 mg/dl within 120 min without any hypoglycemia at any instance.Also as shown in Fig. 16b the response of insulin infusion rate is still positive and smooth.
In Scenario 3: despite challenges facing the proposed controller in regulating BGL became more difficult with the addition of a large meal disturbance at the start of each simulation period for each of 100 virtual T1DPs, are completely smooth and devoid of aberrant fluctuations, making their implementation simple.Besides, the proposed controller is conducting to different 100 type-1 diabetic patients and it observed that 77% of the samples are almost centered at the basal glucose level 80 mg/dl and the rest are also within the accepted region.As for the future work an interval T2FLC with the conjunction of other optimization techniques such as whale optimization technique will be considered for regulating BGL of T1DPs.
Match the weights F l (x′ ) with their respective G l and renumber them so that their index corresponds to the renumbered G l .(b) Initialize (c) Compute (d) If y l ≤ G L+1 , stop; otherwise go to step (c).
Match the weights F l (x′ ) with their respective G l and renumber them so that their index corresponds to the renumbered G l .If y r ≥ G R , stop; otherwise go to step (c).
of the simulation.Also it is assumed that the basal values for glucose and insulin are G b = 80mg/dl , I b = 7mU/l respectively and the nominal values for parameters p 1 ,p 2 , p 3 , p 4 , and p 5 of EBMM from Table1 are used.
If e is positive sign and ė is a negative sign, it requires that:

Table 2 .
Rule base of error and change of error.