# A Vibration Based Automatic Fault Detection Scheme for Drilling Process Using Type-2 Fuzzy Logic
## 3 The Technique of Fault Detection  
A general fault dynamics equation is illustrated as [1]:  
\[f_{t}(y_{dis},\Phi)=\Gamma(k-k_{0})\Phi^{T}\Delta_{i}(k). \tag{49}\]  
In the above equation, the unknown fault magnitude is depicted by \(\Phi\in R^{p\times n}\). The fault dynamics time profile is represented by \(\Gamma(k-k_{0})\). The intention of using time profile factor is for extracting general occurring fault dynamics associated with the nonlinear system. The fault basis function, which is a known quantity, is stated as \(\Delta_{i}(k)\in R^{p}\). The time profile [54] is illustrated as:  
\[\Gamma(\tau)=\left\{ \begin{array}{cc}0,\ if\ \ \tau<0\\ (1-e^{-\bar{k}_{i}\tau}),\ if\ \tau\geq 0\end{array} \right\},i=1,2,\ldots N \tag{50}\]  
The rate of growth of fault is given by \(\bar{k}_{i}>0\). The relation depicting abrupt faults is given by:  
\[\Gamma(\tau)=\left\{ \begin{array}{cc}0,\ \ if\ \ \tau<0\\ 1,\ \ if\ \ \tau\geq 0\end{array} \right\},i=1,2,\ldots N \tag{51}\]  
where \(\tau\) is the time of fault occurrence, \(\tau=f(k-k_{0})\). For the purpose of monitoring the system represented by Equation (26), a fault detection observer is chosen as:\[ \begin{split}\hat{Z}_{dis}(k+1)=\sum_{i=1}^{p}\hat{\omega}_{k}(Z_{ dis}(k)A_{d}\hat{Z}_{dis}(k)\\ +\sum_{i=1}^{p}\hat{\omega}_{j}(Z_{dis}(k))\Big{[}\hat{f}_{t}(y_{ dis}(k),\hat{\Phi}(k))+B_{d}u_{c}(k)\Big{]}\\ +k_{f}[y_{dis}(k)-\hat{y}_{dis}(k)]\\ \hat{y}_{dis}(k)=\sum_{i=1}^{p}\hat{\omega}_{j}(Z(k))C_{d}\hat{Z} _{dis}(k)\end{split}  \tag{52}\]  
the representation of the system state is done in this manner \(\hat{Z}_{dis}(k)\in\)\(R^{n}\), \(\hat{y}_{dis}(k)\in R^{q}\) is the calculated output, and \(k_{f}\) illustrates the observer gain. In addition,  
\[ \begin{split} e_{z}(k)=Z_{dis}(k)-\hat{Z}_{dis}(k)\\ e_{y}(k)=y_{dis}(k)-\hat{y}_{dis}(k)\end{split}  \tag{53}\]  
represents the state residual and the output residual, respectively. Now, the error dynamics before the fault commencement are:  
\[ \begin{split} e_{z}(k+1)=\sum_{i=1}^{p}\hat{\omega}_{k}(Z_{dis}(k ))A_{d}e_{z}(k)\\ +\sum_{i=1}^{p}\hat{\omega}_{m}(Z_{dis}(k))-\sum_{i=1}^{p}\hat{ \omega}_{j}(Z_{dis}(k))k_{f}C_{d}e_{z}(k)\\ e_{y}(k)=\sum_{i=1}^{p}\hat{\omega}_{j}(Z(k))C_{d}e_{z}(k)\end{split}  \tag{54}\]  
In addition, the state and output residuals after the detection of the fault:  
\[ \begin{split} e_{z}(k+1)=\sum_{i=1}^{p}\hat{\omega}_{k}(Z_{dis}( k))A_{d}e_{z}(k)\\ +\sum_{i=1}^{p}\hat{\omega}_{m}(Z_{dis}(k))-\sum_{i=1}^{p}(\hat{ \omega}_{j}(Z_{dis}(k))k_{f}C_{d}e_{z}(k)-\hat{\Phi}^{T}\Delta_{i}(k))\\ e_{y}(k)=\sum_{i=1}^{p}\hat{\omega}_{j}(Z_{dis}(k))C_{d}e_{z}(k) \end{split}  \tag{55}\]  
where the parameter estimation error is signified by \(\hat{\Phi}=\Phi-\hat{\Phi}\). In addition, \(\hat{\Phi}^{T}\Delta_{i}(k)=\) discrete time approximation (ADT). Using the concept of Z-transform applied by [PERSON] et al. [55], the FD residual can be expressed as:  
\[ \begin{split} r(z)=(m_{1}+m_{2})[y_{dis}(z)-\hat{y}_{dis}(z)]\\ =(m_{1}+m_{2})e_{y}(z)\\ =(m_{1}+m_{2})\sum_{i=1}^{p}\hat{\omega}_{j}(Z_{dis}(k))C_{d}e_{ z}(z)\end{split}  \tag{56}\]  
\[ \begin{split} r(z)=(m_{1}+m_{2})\sum_{i=1}^{p}\hat{\omega}_{j}(Z_{ dis}(k))C_{d}\\ \times\Bigg{(}Z_{dis}I-\sum_{i=1}^{p}\hat{\omega}_{k}(Z_{dis}(k) )A_{d}+\sum_{i=1}^{p}(\hat{\omega}_{j}(Z_{dis}(k))k_{f}C_{d}\Bigg{)}^{-1}\\ \times\sum_{i=1}^{p}\hat{\omega}_{m}(Z_{dis}(k))\end{split}  \tag{57}\]where \(m_{1}\) and \(m_{2}\) are constant design matrix. The involved nonlinearity is represented by \(\sum\limits_{i=1}^{p}\tilde{\omega}_{m}(Z_{dis}(k))\). If the below mentioned conditions are satisfied, then it can be separated from the FD residual. Condition 1  
\[ \begin{split}\sum\limits_{i=1}^{p}\tilde{\omega}_{j}(Z_{dis}(k))C_ {d}=0\text{ and }\\ \sum\limits_{i=1}^{p}\tilde{\omega}_{j}(Z_{dis}(k))C_{d}\\ \times\left(-\sum\limits_{i=1}^{p}\tilde{\omega}_{k}(Z_{dis}(k) )A_{d}+\sum\limits_{i=1}^{p}(\tilde{\omega}_{j}(Z_{dis}(k))k_{f}C_{d})\right)= 0\end{split}  \tag{58}\]  
Condition 2  
\[