# A Vibration Based Automatic Fault Detection Scheme for Drilling Process Using Type-2 Fuzzy Logic
## 2 Type-2 Fuzzy Logic Modeling Technique
For (27), the implementation of the learning laws takes place in the following manner:  
\[ \begin{split}\omega_{li}(k+1)-\omega_{li}(k)=-\Psi_{1}(k)e_{\text {mod}}(k)\alpha_{li}^{T}(Z_{dis}(k))\\ \omega_{ui}(k+1)-\omega_{ui}(k)=-\Psi_{2}(k)e_{\text{mod}}(k) \alpha_{ui}^{T}(Z_{dis}(k))\\ \omega_{lm}(k+1)-\omega_{lm}(k)=-\Psi_{1}(k)e_{\text{mod}}(k) \alpha_{lm}^{T}(Z_{dis}(k))\\ \omega_{um}(k+1)-\omega_{um}(k)=-\Psi_{2}(k)e_{\text{mod}}(k) \alpha_{um}^{T}(Z_{dis}(k))\\ \omega_{lj}(k+1)-\omega_{lj}(k)=\\ -\Psi_{1}(k)[B_{d}u_{c}(k)]e_{\text{mod}}(k)\alpha_{lj}^{T}(Z_{ dis}(k))\\ \omega_{uj}(k+1)-\omega_{uj}(k)=\\ -\Psi_{2}(k)[B_{d}u_{c}(k)]e_{\text{mod}}(k)\alpha_{uj}^{T}(Z_{ dis}(k))\\ \end{split}  \tag{31}\]  
\(\Psi_{1}(k)\) and \(\Psi_{2}(k)\) are stated by the equations mentioned below:  
\[ \begin{split}\Psi_{1}(k)=\left\{\begin{array}{ll}\dfrac{\Psi_{ 1}(k)}{1+\tau_{1}(k)}&\text{if }\parallel e_{i}(k+1)\parallel>\frac{1}{\sigma_{1}} \parallel e_{i}(k)\parallel\\ 0&\text{if }\parallel e_{i}(k+1)\parallel<\frac{1}{\sigma_{1}} \parallel e_{i}(k)\parallel\\ \Psi_{2}(k)=\left\{\begin{array}{ll}\dfrac{\Psi_{2}(k)}{1+\tau_{2}(k)}& \text{if }\parallel e_{i}(k+1)\parallel>\frac{1}{\sigma_{2}} \parallel e_{i}(k)\parallel\\ 0&\text{if }\parallel e_{i}(k+1)\parallel<\frac{1}{\sigma_{2}} \parallel e_{i}(k)\parallel\end{array}\right.\end{split} \right.\end{split} \tag{32}\]  
also \(0<\Psi_{1}(k)\leq 1\) and \(0<\Psi_{2}(k)\leq 1\), The dead-zone parameter is represented by \(\sigma_{1}\) and \(\sigma_{2}\). Again, \(\tau_{1}(k)\) and \(\tau_{2}(k)\) are represented by:  
\[ \begin{split}\tau_{1}(k)=&\parallel\alpha_{li}^{T}(Z_{ dis}(k))\parallel^{2}+\parallel\alpha_{lm}^{T}(Z_{dis}(k))\parallel^{2}\\ +&\parallel\alpha_{lj}^{T}(Z_{dis}(k))[B_{d}u_{c}(k) ]\parallel^{2}\\ \tau_{2}(k)=&\parallel\alpha_{ui}^{T}(Z_{dis}(k))\parallel^{2}+ \parallel\alpha_{um}^{T}(Z_{dis}(k))\parallel^{2}\\ +&\parallel\alpha_{uj}^{T}(Z_{dis}(k))[B_{d}u_{c}(k) ]\parallel^{2}\end{split}  \tag{33}\]  
The modeling error \(e_{\text{mod}}(k)\) satisfies the equation below:  
\[e_{\text{mod}}(k)=\hat{Z}_{dis}(k)-Z_{dis}(k) \tag{34}\]\(\hat{Z}_{dis}(k)\) is the state of the fuzzy model, also from Equation (29):  
\[ \begin{split}(\sigma_{1}+\sigma_{2})\hat{Z}_{dis}(k+1)=\sum_{i=1}^{p }\hat{\omega}_{i}(Z_{dis}(k))+\sum_{i=1}^{p}\hat{\omega}_{m}(Z_{dis}(k))\\ +\sum_{i=1}^{p}\hat{\omega}_{j}(Z_{dis}(k))[B_{d}u_{c}(k)]+ \Omega\end{split}  \tag{35}\]  
where \(\sigma_{1}\) and \(\sigma_{2}\) are positive constants, and \(\sigma_{1},\sigma_{2}>1\) are design parameters. In order to analyze the stability of the training algorithm (31), the dynamics of the modeling error \(e_{\text{mod}}(k)\) are required. Thus, (35) can be expressed as:  
\[ \begin{split}(\sigma_{1}+\sigma_{2})Z_{dis}(k+1)=\sum_{i=1}^{p} \omega_{i}^{*}(Z_{dis}(k))+\sum_{i=1}^{p}\omega_{m}^{*}(Z_{dis}(k))\\ +\sum_{i=1}^{p}\omega_{j}^{*}(Z_{dis}(k))[B_{d}u_{c}(k)]+ \Omega\end{split}  \tag{36}\]  
\[ \begin{split}(\sigma_{1}+\sigma_{2})Z_{dis}(k+1)=\frac{1}{2} \omega_{li}^{*}(k)\alpha_{li}^{T}(Z_{dis}(k))\\ +\frac{1}{2}\omega_{ui}^{*}(k)\alpha_{ui}^{T}(Z_{dis}(k))+\frac{1 }{2}\omega_{lm}^{*}(k)\alpha_{lm}^{T}(Z_{dis}(k))\\ +\frac{1}{2}\omega_{um}^{*}(k)\alpha_{um}^{T}([PERSON]_{dis}(k))+\frac{1 }{2}\omega_{lj}^{*}(k)\alpha_{lj}^{T}(Z_{dis}(k))[B_{d}u_{c}(k)]\\ +\frac{1}{2}\omega_{uj}^{*}(k)\alpha_{ilj}^{T}(Z_{dis}(k))[B_{d}u_ {c}(k)]\end{split}  \tag{37}\]  
\[+(\epsilon_{li}+\epsilon_{ui})+(\epsilon_{lm}+\epsilon_{um})+(\epsilon_{lj}+ \epsilon_{uj})[B_{d}u_{c}(k)]+\Omega\]  
where \(\omega_{li}^{*}(k),\omega_{ui}^{*}(k),\omega_{lm}^{*}(k),\omega_{um}^{*}(k), \omega_{lj}^{*}(k)\) and \(\omega_{uj}^{*}(k)\) are unknown optimal weights, \(\epsilon_{li}\), \(\epsilon_{ui}\), \(\epsilon_{lm}\), \(\epsilon_{um}\), \(\epsilon_{lj}\) and \(\epsilon_{uj}\) are approximation errors, such as \(\sum_{i=1}^{p}\omega_{i}^{*}(Z_{dis}(k))=\frac{1}{2}\omega_{li}^{*}(k)\alpha_ {li}^{T}(Z_{dis}(k))\)  
\[