Automated blood glucose regulation for nonlinear model of type-1 diabetic patient under uncertainties: GWOCS type-2 fuzzy approach

2.1 EBMM of T1DP

Because it is less complex than the others and keeps the minimal state variables necessary to describe the relationship between glucose and insulin for diabetic patient, an intravenous glucose tolerance test (IVGTT) of the Bergman minimal (BM) model [15] is regarded as the most popular in research on artificial pancreas. The three differential equations with its states will model the complete behavior of glucose and insulin kinetics for patients. The first one indicates BGL, where the other one reveals the remote insulin, and the last equation indicates plasma insulin level.

To model the behavior of meal disturbance in BM model, a new equation with a new state variable has been added in the extended Bergman minimal model (EBMM) to constitute the dynamics of meal [33].

Thereby the mathematical equations of the EBMM are as follow and also the meaning of variables and parameters of EBMM are explained in Table 1:

$$\dot_ = - p_ \left( - G_ } \right) - x_ x_ + x_$$

(1)

$$\dot_ = - p_ x_ + p_ \left( - I_ } \right)$$

(2)

$$\dot_ = - p_ \left( - I_ } \right) + u\left( t \right)$$

(3)

Table 1 Meaning of variables and parameters of EBMM2.2 Type-2 fuzzy logic system

T2FLC is a T2FLS based controller, the superiority of T2FLS over FLS comes through its ability to model uncertainties about any variable in the system and minimize its impact, that's why the benefits of T2FLS appear strongly in applications that are exposed to uncertainties. Modeling uncertainties needs a method to measure dispersion about the variable (how the points that constitute the uncertainties about the variable are distributed and spanned) [50]. So a set of numbers is needed rather than a single specific number in FLS to capture more information about uncertainties about any variable in the system. T2FLS saves this method to model uncertainties and can effectively minimize its impact while the ordinary FLS has limited capabilities in this regard [50].

Figure 2 shows fuzzy set (FS) denotes "A" of an ordinary FLS, the membership grade of any given point \(x^ \in X\) on the universe of discourse X equal to u′ which is a single specific number.

Fig. 2figure 2

The FS "A" can be expressed mathematically as:

$$A = \left\ \left( x \right)} \right)\quad \forall x \in X} \right\}\quad }\quad A = \int\limits_} \left( x \right)}}}$$

(5)

\(\smallint\) Denotes union over all admissible x, μA(x) is the membership grade of x ∈ X in A and it takes just one value from the constraint \(0 \le \mu_ \left( x \right) \le 1\).

A T2FS denotes "\(\tilde\) " of T2FLS is depicted in Fig. 3. It is resulted from blurring the membership function (MF) of FS of Fig. 2 [51], the membership grade of x′ on T2FS is a set of numbers takes their values from the intersection of the vertical line at x′ in the U axis. It can be assigned at each point resulted from the intersection of the vertical line at x′ an amplitudes distribution that can construct a three dimension type-2 membership function (T2MF) as shown in Fig. 4, its axis are \(x, u, \mu_}} \left( \right)\) which characterizes a T2FS. Those amplitudes distribution in \(\mu_}} \left( \right)\) axis is not necessary that all of them be equal.

Fig. 3figure 3

Blurred MF of FS of an ordinary FLS

Fig. 4figure 4

"\(\tilde\)" can be expressed mathematically as [51]:

$$\tilde = \left\ \right),\mu_}} \left( \right)} \right) \quad \forall x \in X,\quad \forall u \in J_ \left[ \right]} \right\}\quad }\quad \tilde = \mathop \smallint \limits_ \mathop \smallint \limits_ \frac}} \left( \right)}} \right)}} u \in J_ \left[ \right]$$

(6)

\(\) Denotes union over all admissible x and u, and \(\mu_}} \left( \right)\) is a T2MF that characterizes a T2FS, it takes their values from the constraint \(0 \le \mu_}} \left( \right) \le 1\).

Jx Is the primary membership of x in \(\tilde\), also called the domain of a secondary membership of x in \(\tilde\).

The membership grades of the primary membership of x in \(\tilde\) are called the secondary membership of x in \(\tilde\) and also called the vertical slices in \(\mu_}} \left( \right)\) axis.

When all of the vertical slices in \(\mu_}} \left( \right)\) axis equal 1, then the resulting T2MF is an interval type-2 membership function (IT2MF) as shown in Fig. 5 that characterizes an interval type-2fuzzy set (IT2FS) [52].

Fig. 5figure 5

\(\tilde\) Can be expressed mathematically as [52]:

$$\tilde = \int\limits_} } \right)}}J_ \left[ \right]} }$$

(7)

The shaded region on the x − u plane in Fig. 5 is the FOU, the FOU is a complete description of an IT2FS, this is because the secondary grades of IT2FS equal to 1, and thereby it conveys no new information [52]

The FOU in the primary memberships of \(\tilde\) is the union of all primary memberships that is:

$$FOU\left( } \right) = \bigcup\nolimits_ }$$

(8)

The FOU for an IT2FS is shown in Fig. 6, it is bounded from the above and below by a two ordinary MFs that are called lower MF and upper MF, and are denoted \(\underline}} }} \left( x \right),\overline}} }} \left( x \right),\forall x \in X\) respectively.

Fig. 6figure 62.2.1 Interval type-2 fuzzy logic system

Over the years a lot of efforts have been made to facilitate the complex mathematical operations accompanying T2FLS so that researchers and engineers can utilize it in solving problems of many different applications in various areas [53]. The mathematical operations accompanying T2FSs are very complex and time consuming while it is simple to IT2FSs (IT2FSs is considered a special case of general T2FSs)[52], since it needs to can use IT2FSs that we are just familiar with the mathematical operations of ordinary FSs such as union, intersection, and complement. That is why IT2FLS that is characterized by its IT2FSs have gained popularity among many practitioners and engineers. Consequently IT2FLS have been contributed in different applications: in [54] it controls restricted crossing U-turn traffic, in [55] it simulates the driver's operating habits of intelligent vehicles control, in [56] its application in handling map matching uncertainties for airport ground movements, and In [57] regulate the mean arterial blood pressure for hypertensive patients with different health status conditions.

The structure of IT2FLS is shown in Fig. 7 [38]. It is almost the same as for ordinary FLS, its rule-base is composed of (IF–THEN) rules as for FLS but now some or all of its antecedent and consequent parts are of IT2FS. It differs from FLS in that the output of the fuzzifier block is IT2FSs, consequently the fuzzy output sets of inference engine block is IT2FSs. Since most applications like in a control system require a single crisp number from the output of the controller rather than a set of numbers in order to can take a control action, the defuzzifier block in FLS is replaced by output processing block which internally consists of two blocks the first which converts IT2FS to FS that is called type-reducer and the second is just a defuzzifier as in FLS to convert FS to a single crisp number.

Fig. 7figure 7

There are many algorithms one can use to perform type-reduction, Karnik–Mendel (KM) algorithm [58] is the popular one it is simple and converges to the exact solution but it is iterative and computationally intensive. So in this paper we will utilize enhanced iterative algorithm with stop condition (EIASC) to perform type-reduction as EIASC can save more 50% computational cost over KM algorithm particularly when number of rules N ≤ 100 [59].

Now in the following subsections we will explain in details how to proceed in each stage of IT2FLS that will be incorporated into IT2FLC to obtain accurate-safe regulation of BGL for T1DPs.

2.2.2 Rule-base of ITFLS

Zadeh rule-base is considered in this paper, the structure of rule-base for IT2FLS remains the same as for FLS. The only difference is some or all of its antecedent and consequent parts are of IT2FS, the structure of the general Zadeh rule for IT2FLS which has p inputs \(x_ \in X_ , \ldots .,x_ \in X_\), and one output y ∈ Y is as follow [52]:

$$R^ IF\,x_ \,is\,\tilde_^ \quad and \cdots and\quad x_ \,is\,\tilde_^ ,\, THEN\,y\,is\,\tilde^ ,\quad l = 1, \ldots ., N.$$

where N is number of rules, l is the rank of rule, \(\tilde_^ \ldots \ldots ..\tilde_^\) are IT2FSs, and \(\tilde^\) is IT2FS which is an interval set is expressed in the form of endpoints centroid of a consequent of IT2FS [34], where \(\tilde^ = \left[ ^ ,\underline ^ } \right]\).

Suppose we have an IT2FLS with four rules N = 4, two inputs x1, x2 and one output y. The domain of input x1 consists of two triangular IT2MFs \(\tilde\) and \(\tilde\) as shown in Fig. 8. The domain of input x2 consists of two triangular IT2MFs \(\tilde\) and \(\tilde\) as shown in Fig. 9. And the domain of output y consists of four triangular IT2MFs \(\tilde^ , \tilde^ ,\tilde^\), and \(\tilde^\) as shown in Fig. 10, then the four rules are:

$$\begin & R^ IF\,x_ \,is\,\tilde\quad and\quad x_ \,is\,\tilde,\,THEN\,y\,is\,\tilde^ \\ & R^ IF\,x_ \,is\,\tilde\quad and\quad x_ \,is\,\tilde,\,THEN\,y\,is\,\tilde^ \\ & R^ IF\,x_ \,is\,\tilde\quad and\quad x_ \,is\,\tilde,\,THEN\,y\,is\,\tilde^ \\ & R^ IF\,x_ \,is\,\tilde\quad and\quad x_ \,is\,\tilde,\, THEN\,y\,is\,\tilde^ \\ \end$$

Fig. 8figure 8Fig. 9figure 9Fig. 10figure 102.2.3 Fuzzifier of IT2FLS

It performs fuzzification process which converts crisp inputs into IT2FSs. It is the same as for the fuzzification of ordinary FSs, but now we have for each point in the universe of discourse two interval membership values rather than one membership value in the FSs, both of them are calculated from the intersection of the vertical line with the lower MF and upper MF respectively. For example when \(x_ = x_^\) and \(x_ = x_^\), then the vertical line at \(x_^\) intersects \(\tilde\) within the two interval values \(\left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right]\) also intersects \(\tilde\) within the two interval values \(\left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right]\). The vertical line at \(x_^\) intersects \(\tilde\) within the two interval values \(\left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right]\) also intersects \(\tilde\) within the two interval values \(\left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right]\). Thereby the interval values that deduced from the fuzzification process of the inputs are:

$$\begin \mu_}} \left( ^ } \right) & = \left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right] \\ \mu_}} \left( ^ } \right) & = \left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right] \\ \mu_}} \left( ^ } \right) & = \left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right] \\ \mu_}} \left( ^ } \right) & = \left[ _}} \left( ^ } \right),\overline_}} \left( ^ } \right)} \right] \\ \end$$

2.2.4 Inference engine of IT2FLS

It deduces the clipped IT2FS 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 ITFLS stage) and this process also called rule firing. Consequently we have for each rule of IT2FLS two interval firing level, lower firing level \(\underline ^\) and upper firing level \(\overline^\) [38, 50]. Then it combines all the clipped IT2FSs consequents of the fired rules into one overall IT2FS that constitutes the output of the inference engine which is the input to the output processing block. Interval type-2 mamdani fuzzy system and minimum t-norm operator are considered, so the two firing interval for the four rules are:

$$\begin \left[ $}} ^ ,\bar^ } \right] &= \left[ $}} _}} \left( ^\prime } \right),\underset$}} _}} \left( ^\prime } \right)} \right],min\left[ _}} \left( ^\prime } \right),\bar_}} \left( ^\prime } \right)} \right]} \right]\\ \left[ $}} ^ ,\bar^ } \right]& = \left[ $}} _}} \left( ^\prime } \right),\underset$}} _}} \left( ^\prime } \right)} \right],min[\bar_}} \left( ^\prime } \right),\bar_}} \left( ^\prime } \right)} \right]]\\\left[ $}} ^ ,\bar^ } \right] &= \left[ $}} _}} \left( ^\prime } \right),\underset$}} _}} \left( ^\prime } \right)} \right],min\left[ _}} \left( ^\prime } \right),\bar_}} \left( ^\prime } \right)} \right]} \right]\\ \left[ $}} ^ ,\bar^ } \right] &= \left[ $}} _}} \left( ^\prime } \right),\underset$}} _}} \left( ^\prime } \right)} \right],min\left[ _}} \left( ^\prime } \right),\bar_}} \left( ^\prime } \right)} \right]} \right]\end$$

Now we have got the firing interval of each rule, then \(\underline ^\) for each rule is t-normed with lower membership function of \(\tilde^\) and \(\overline^\) for each rule is t-normed with upper membership function of \(\tilde^\) to get a clipped IT2FS consequent from each rule. After that the clipped IT2FS consequent of each rule are combined together (using union operator) into one overall clipped IT2FS as shown in Fig. 11.

Fig. 11figure 11

One overall clipped IT2FS

2.2.5 Type-reduction and defuzzification of IT2FSs

It was supposed just as for FLS after we got the resulted clipped IT2FS that we can as usual run one of the defuzzification methods to get the crisp output. But for the IT2FLS the union of the clipped IT2FSs of each rule becomes a big issue with regarding to the computational complexity as it requires additional computational time and memory storage particularly with real time applications such as a control system [38, 50].

So instead of that 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. 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 [38, 58].

By using this method we get the COS type-reduced-set denoted Ycos(x′) for an interval type-2 mamdani fuzzy system Where:

$$Y_ \left( } \right) = 1/\left[ ,y_ } \right],$$

(9)

$$y_ = \frac^ \overline^ \underline ^ + \mathop \sum \nolimits_^ \underline ^ \underline ^ }}^ \overline^ + \mathop \sum \nolimits_^ \underline ^ }},$$

(10)

$$y_ = \frac^ \underline ^ \overline^ + \mathop \sum \nolimits_^ \overline^ \overline^ }}^ \underline ^ + \mathop \sum \nolimits_^ \overline^ }},$$

(11)

N is number of rules, L and R are the switch points that.

Satisfy:

$$\begin \underline ^ & \le y_ \le \underline ^ \\ \overline^ & \le y_ \le \overline^ \\ \end$$

yl and yr can be computed using EIASC algorithm [59], after that we can easily get the crisp output of interval type-2 mamdani fuzzy system from the following formula

$$y = \frac + y_ }}.$$

(12)

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 [58] as follow:

$$\begin \tilde^ & = \left[ ^ , \overline^ } \right] \\ \tilde^ & = \left[ ^ , \overline^ } \right] \\ \tilde^ & = \left[ ^ , \overline^ } \right] \\ \tilde^ & = \left[ ^ , \overline^ } \right] \\ \end$$

where \(\underline ^ ,\overline^\) are the two endpoints centroids of the consequent \(\tilde^\) and \(l = 1, \ldots \ldots ,N\).

EIASC algorithm for computing yl [59]:

(a)

Sort \(\underline ^ \left( \right)\) in increasing order and call the sorted \(\underline ^\) by the same name, but now \(\underline ^ \le \underline ^ \le \cdots \le \underline ^\). Match the weights Fl (x′) with their respective \(\underline ^\) and renumber them so that their index corresponds to the renumbered \(\underline ^\).

(b)

Initialize

$$\begin a & = \mathop \sum \limits_^ \underline ^ \underline ^ , \\ b & = \mathop \sum \limits_^ \underline ^ , \\ y_ & = \underline ^ ,\quad L = 0. \\ \end$$

(c)

Compute

$$\begin L & = L + 1, \\ a & = a + \underline ^ \left( ^ - \underline ^ } \right), \\ b & = b + \overline^ - \underline ^ , \\ y_ & = \frac. \\ \end$$

(d)

If \(y_ \le \underline ^\), stop; otherwise go to step (c).

EIASC algorithm for computing yr [59]:

(a)

Sort \(\overline^ \left( \right)\) in increasing order and call the sorted \(\overline ^\) by the same name, but now \(\overline^ \le \overline^ \le \cdots \le \overline^\). Match the weights Fl(x′) with their respective \(\overline^\) and renumber them so that their index corresponds to the renumbered \(\overline^\).

(b)

Initialize

$$\begin a & = \mathop \sum \limits_^ \overline^ \underline ^ , \\ b & = \mathop \sum \limits_^ \underline ^ , \\ y_ & = \overline^ ,\quad R = N. \\ \end$$

(c)

Compute

$$\begin a & = a + \overline^ \left( ^ - \underline ^ } \right), \\ b & = b + \overline^ - \underline ^ , \\ y_ & = \frac, \\ R & = R - 1. \\ \end$$

(d)

If \(y_ \ge \overline^\), stop; otherwise go to step (c).

The defuzzified crisp output of interval type-2 Mamdani fuzzy system is:

2.3 Design of IT2FLC for regulation of BGL for T1DP

Figure 12 shows the block diagram of IT2FLC for regulation of BGL for T1DP, the inputs to controller are the error signal e and the change of error signal Δe, u is the output of controller, R refers to the desired BGL, and G refers to the measured BGL for T1DP.

$$u = f\left( \right)$$

(13)

Seven IT2MFs of type Triangular are used for the error signal, change of the error signal and for the output signal as shown in Fig. 13 which are: Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero (ZR), Positive Small (PS), Positive Medium (PM), and Positive Big (PB).

Fig. 12figure 12

Block diagram of IT2FLC for T1DP

Fig. 13figure 13

IT2MFs for the error, change of the error, and the output signal

Table 2 represents the knowledge base defining the rules for the desired relationship between the inputs and output.

Table 2 Rule base of error and change of error

Each of the signals e, Δe, u has its own FOU where wi, wi1, wi2 in Fig. 12 refer to FOU of IT2MF for e, Δe, u respectively. We can tune FOU of each signal using GWOCS [44] to obtain wi, wi1, wi2.

During the optimization process the OF is minimized to meet the standard-safe response of BGL, The OF of GWOCS is chosen to be equal to mean absolute of error (MAE) signal.

$$OF = \frac^ \left| \right|}}$$

(15)

where N is sampling time.

2.3.1 Hyprid Grey wolf and Cuckoo search optimizer

In nature, the herd of grey wolves is divided into four main types, alpha, beta, delta, and omega [44]. The herd's alpha is regarded as the one in charge of making decisions. The beta is most likely the best choice to take over as alpha in the event that one of the other wolves passes away or gets too old. Beta supports alpha making its decisions, improves the order of alphas throughout the herd and provide alpha with feedback. Delta is a subordinate to alpha and beta, it supports alpha and beta during the hunting process, it governs and gives orders to omega wolves. Omega is the grey wolf with the lowest ranking in the herd. The omega serves as the scapegoat. They are the final wolves that are permitted to feed. The omega may not seem like a significant member of the herd, however it helps keep the dominance structure of the herd.

The hunting process of grey wolf in nature is divided into three main phases:

Exploring the position of prey, tracking it, and getting close to the prey.

Encircling the prey, and harassing it until it stops moving.

Attacking the prey.

In this study wi, wi1, wi2, the parameters of IT2FLC are tuned using GWOCS algorithm [44], it simulates the hunting process of grey wolf in nature for searching the prey with the conjunction of Cuckoo Search algorithm which is considered one of the meta-heuristic algorithms that draws its inspiration from nature. The population-based stochastic optimization technique known as CS is very effective at searching. The CS has memory automation that can assist in helping to record the neighborhood minimum and contribute in choosing the best. As a result, CS algorithm can more effectively than other techniques search through the designated search space for the most ideal value. Due to its varied lifestyles and encroachment on reproductivity, the cuckoo bird is a type of bird that CS algorithm draws inspiration.

So, the powerful ability of CS is used to improve the performance of GWO as CS updates the position of current search agent where after the calculation of \(\vec_ , \vec_ , \vec_\) (the three best candidate solution) instead of directly using the mean value of the three parameters to update the position of current search agent, the values of \(\vec_ , \vec_ , \vec_\) are first updated using Cuckoo search algorithm and then the position of the grey wolves is modified by \(\frac_ + \vec_ + \vec_ }}\). The pseudo code for the GWOCS is shown in Fig. 14.

Fig. 14figure 14

In the optimization process, the fitness value of each search agent is determined by an objective function. This function is considered to be the most important factor in acquiring the required controller parameters. The objective function can be minimized or maximized to obtain the controller's intended response.

2.4 Stability analysis

In this section stability analysis of IT2FLC for regulation of BGL for T1DP using Lyapunov function [60] is performed to determine the stability region of nonlinear system.

Our target is to design the control signal U such that the BGL of T1DP x1 fo

留言 (0)

沒有登入
gif