## 3 Type-2 Fuzzy Logic System
The secondary membership grades of IT2 FLS all equal 1, that is to say, for any \(x=x^{\prime}\), \(f_{x^{\prime}}(u)\equiv 1\). Type-2 carries the UMFs, LMFs, and FOU. The FOU is uncertainty in the primary membership grades of a type-2 MF, which consists of a bounded region; the UMF is a subset that has the maximum membership grade of the FOU, and the LMF is a subset that has the minimum membership grade of the FOU. The two-dimensional \(\mu_{\tilde{A}}(x,u)\) is referred to as the footprint of uncertainty (FOU) of \(\tilde{A}\):  
\[FOU(\tilde{A})=\bigcup_{x\in X}J_{x}=\{(x,u)|u\in J_{x}\subseteq[0,1]\} \tag{4}\]  
where \(J_{x}\) is the primary membership of \(\tilde{A}\); here the lower MF (LMF) \(\underline{\mu}_{\tilde{A}}(x)\) and upper MF (UMF) \(\overline{\mu}_{\tilde{A}}(x)\) comprise the FOU, where [39]:  
\[\underline{\mu}_{\tilde{A}}(x)=LMF(\tilde{A})=\inf\{u|u\in[0,1],\mu_{\tilde{A}} (x,u)>0\} \tag{5}\]  
And,  
\[\overline{\mu}_{\tilde{A}}(x)=UMF(\tilde{A})=\sup\{u|u\in[0,1],\mu_{\tilde{A}} (x,u)>0\} \tag{6}\]  
There are two types of T2 FLSs as Mamdani and Takagi-Sugeno [34]. Here the focus is on Mamdani-type as it is more popular than Takagi-Sugeno. Therefore, the rules of IF-THEN [40] can be written as:  
\[\tilde{R}^{l}:IF\quad x_{1}\ \text{is}\ \tilde{F}_{1}^{l}\quad\text{and}\...\quad x_{p}\ \text{is}\ \tilde{F}_{p}^{l}\quad THEN\quad y\ \text{is}\ \tilde{G}^{l}\quad l=1,...,N \tag{7}\]  
Or in another way:  
\[\tilde{R}^{l}:\tilde{F}_{1}^{l}\times...\times\tilde{F}_{p}^{l}\to\tilde{G}^{ l}=\tilde{A}^{l}\to\tilde{G}^{l} \tag{8}\]  
where \(l\) is the rule number, \(x_{i}\) and \(\tilde{F}_{i}^{l}\) are the \(i^{th}\) (\(i=1,...,p\)) input and antecedent set of rule \(l\), respectively, \(G^{l}\) are consequent sets and \(A\) is the input fuzzy sets, while \(y\) is the input and \"\(\sim\)\" shows that the fuzzy set is a type-2 fuzzy set. According to Equation (8), the output of inference engine for each rule can be defined as [34]:  
\[\mu_{\tilde{B}^{l}}(y)=\mu_{\tilde{A}^{l}\to\tilde{G}^{l}}(x,y)=\mu_{\tilde{F} _{1}^{l}(x_{1}^{\prime})}\cap...\cap\mu_{\tilde{F}_{p}^{l}}(x_{p}^{\prime}) \cap\mu_{\tilde{G}}(y)=\left[\bigcap_{i=1}^{p}\mu_{\tilde{F}_{i}^{l}}(x_{i}^{ \prime})\right]\cap\mu_{\tilde{G}}(y) \tag{9}\]  
While adopting the popular centroid TR [41], the firing output set \(\tilde{B}^{l}\) is generated from by each fuzzy rule and the corresponding consequent IT2 FLS, i.e.,  
\[\tilde{B}^{l}:\left\{\begin{aligned} FOU(\tilde{B}^{l})=\left[\underline {\mu}_{\tilde{B}^{l}}(y\ |\ x^{\prime}),\overline{\mu}_{\tilde{B}^{l}}(y\ |\ x^{\prime})\right]\\ \underline{\mu}_{\tilde{B}^{l}}(y\ |\ x^{\prime})=\underline{\mu}_{ \tilde{B}^{l}}(y\ |\ x^{\prime})\cap\underline{\mu}_{\tilde{G}^{l}}(y)\\ \overline{\mu}_{\tilde{B}}(y\ |\ x^{\prime})=\overline{\mu}_{\tilde{B} ^{l}}(x^{\prime})\Here \(\cup\) indicates the maximum operation. Then the type-reduced set \(Y_{c}(x^{\prime})\) can be obtained by computing the centroid \(C_{\bar{B}}\) of \(\bar{B}\) :  
\[Y_{c}(x^{\prime})=C_{\bar{B}}(x^{\prime})=\frac{1}{[l_{\bar{B}}(x^{\prime}),r_{ \bar{B}}(x^{\prime})]} \tag{12}\]  
To find the final crisp output value for the inference process, the aggregate type-2 fuzzy set is first reduced to an interval type-1 fuzzy set, which is a range with lower limit and upper limit. This interval type-1 fuzzy set is commonly referred to as the centroid of the type-2 fuzzy set. In theory, this centroid is the average of the centroids of all the type-1 fuzzy sets embedded in the type-2 fuzzy set. In practice, it is not possible to compute the exact values of lower and upper limits. Instead, iterative type-reduction methods are used to estimate these values. Here the two points \(l_{\bar{B}}(x^{\prime})\) and \(r_{\bar{B}}(x^{\prime})\) can be calculated by common type-reduction algorithms such as Karnik-Mendel (KM) [42], Enhanced Karnik-Mendel (EKM) [43] and weighted EKM [44].