# A Vibration Based Automatic Fault Detection Scheme for Drilling Process Using Type-2 Fuzzy Logic
## 2 Type-2 Fuzzy Logic Modeling Technique
 \tag{9}\]  
where \(z\) represents vibration state vector associated with vibration at time interval \(t\). In addition, \(A_{i},B_{i}\) and \(D_{i}\) are constants. The identity matrices are 0 and \(I\), respectively. \(B_{i}\) represents the constant input matrix to define the controller. Now the continuous-time model is transformed into discrete-model by keeping both the control force and cutting forces constant during the sampling period \(T_{s}\),  
\[U_{ctrl}(t){=}U_{ctrl}(kT_{s}),\ \ \ v(t)=v(kT_{s}),\ \ \ kT_{s}\leqslant t \leqslant\leq(k+1)T_{s} \tag{10}\]  
The time model in the discrete domain is represented using Equations (8) and (10) as:  
\[Z_{dis}(k+1)= A_{d}Z_{dis}(k){+}B_{d}U_{ctrl}(k){+}D_{d}v(k) \tag{11}\]  
Now, the state vector is illustrated as \(Z_{dis}(k)\), the state matrix is \(A_{d}=e^{A_{i}T}\), and the input vector is \(B_{d}=\left(\int e^{A_{i}\tau_{d}}d\tau\right)B_{i}\). In addition, \(u_{c}(k)\) is the scalar input. The associated nonlinearity is embedded in the cutting forces represented by \(v(k)\). In addition, \(D_{d}\) represents the matrix to define the cutting force. _Type-2 Takagi-Sugeno(IT2 T-S) Fuzzy System_  
Fuzzy Technique description: For example, if \(A_{1i}\cdots,A_{6i}\), \(B_{1i}\), \(B_{3i}\), \(B_{3i}\) are type-2 fuzzy sets, then the type-2 fuzzy set \(A\) with the membership function \(G_{A}\) is defined as  
\[A=\{(x,\xi),G_{A}(x,\xi)\ |\ \forall xeR,\forall\xi eM_{x}\subseteq[0,1]\} \tag{12}\]  
where \(\xi\) is an auxiliary variable, \(0\leqslant G_{A}(x,\xi)\leqslant 1\), \(M_{x}\) is the primary membership function. For the type-2 fuzzy set \(A\),  
\[A=\int_{x\in X}\int_{\xi\in M_{x}}G_{A}(x,\xi)/(x,\xi) \tag{13}\]  
The integral \(\int\) of the classical fuzzy set becomes the sum \(\sum\). The upper and lower membership functions are defined as \(G_{A}^{u}(x_{1},\varsigma)\) and \(G_{A}^{l}(x,\varsigma)\). They describe the upper and lower bounds of the uncertainties. For \(i\)-th rule and the point \(x_{1}\), the crisp input is fuzzified in the interval of \([f_{i}^{i}(x_{1}),f_{i}^{u}(x_{1})]\),  
\[ \begin{array}{l}f_{i}^{u}(x_{1})=G_{A_{1i}}^{u}(x_{1},\varsigma)*G_{A_{2i}}^{u }(x_{1},\varsigma)*G_{A_{3i}}^{u}(x_{1},\varsigma)\\ f_{i}^{l}(x_{1})=G_{A_{1i}}^{l}(x_{1},\varsigma)*G_{A_{2i}}^{l}(x_{1}, \varsigma)*G_{A_{3i}}^{l}(x_{1},\varsigma)\end{array}  \tag{14}\]  
where \(*\) denotes the \(t\)-norm operator, it can be the minimization. For all \(l\) rules, type-2 fuzzy inference engine aggregates with the fuzzified inputs and infers another type-2 fuzzy set,  
\[G_{O}(y)=\sqcup_{x\in X}[G_{A}(x)\sqcap G_{B}(x,y)] \tag{15}\]  
where \(G_{O}(y)\) represents the membership function of the fired rule, which is expressed by extended sup-star composition. For details on it, please refer to [51]. We use the type-reduction method to convert \(G_{O}(y)\) into a type-1 fuzzy set. This technique captures more information about rule uncertainties than does the defuzzified value (a crisp number), and seems to be as fundamental to the design of fuzzy logic systems that include linguistic uncertainties (that translate into rule uncertainties) as variance is to the mean in case of probabilistic uncertainties. The centroids associated with type-2 fuzzy sets are calculated. For the \(i\)-th rule, the centroid of \(j\)-the output fuzzy rule is \(y^{i}_{lj}=[y^{i}_{lj},y^{i}_{rj}]\), \(y^{i}_{lj}\) and \(y^{i}_{rj}\) are the most left and right points. The type-2 fuzzy sets are reduced to the type-1 fuzzy set with the interval \([y^{i}_{lj},y^{i}_{rj}]\). The most popular technique for type-reducing an interval type-2 fuzzy set is the Karnik-Mendel (KM) iterative procedure. The outcome of type-reduction of an interval type-2 fuzzy set is an interval type-1 set considering the criteria that the centroid is placed between the two endpoints. The iterative methodology is a superior technique in order to find these endpoints. The centroid of the type-1 set is considered to be the centre of this interval.