# Rolling-Element Bearing Fault Diagnosis Using Advanced Machine Learning-Based Observer
## 4 Proposed Algorithm for Fault Diagnosis in Rolling-Element Bearing
### Advance Sliding Mode Observer for Fault Estimation  
Based on Equation (19) for FAL modeling of the REB, the SMO is proposed based on Equation (21). \[\left\{ \begin{array}{c}\hat{J}_{s-SMO}(k+1)=\left[\sigma_{s}\hat{J}_{s-SMO}(k )+\sigma_{o}\hat{J}_{o-SMO}(k)+\sigma_{i}\hat{I}_{i}(k)\right]+\hat{\varphi}_{ SMO}(k)+\sigma_{p}(J_{o}(k)-\\ \hat{J}_{o-SMO}(k))+\sigma_{sM}sgn\left(\hat{J}_{o}(k)-\hat{J}_{o-SMO}(k) \right)\\ \hat{J}_{o-SMC}(k+1)=\left(\lambda\right)^{T}\hat{J}_{s-SMO}(k)\end{array} \right., \tag{21}\]  
In addition, the equation to define fault estimation based on the SMO is:  
\[\hat{\varphi}_{SMO}(k+1)=\hat{\varphi}_{SMO}(k)+\sigma_{p}\left(\hat{J}_{o}(k )-\hat{J}_{o-SMO}(k)\right)+\sigma_{sM}sgn\left(\hat{J}_{o}(k)-\hat{J}_{o-SMO} (k)\right). \tag{22}\]  
where \(\hat{J}_{s-SMO}(k),\hat{J}_{o-SMO}(k),\hat{\varphi}_{SMO}(k)\), and \(\left(\sigma_{s},\sigma_{o},\sigma_{i},\sigma_{p},\sigma_{SM}\right)\) are the sliding mode system state estimation, sliding mode output estimation, sliding mode fault estimation, and coefficients, respectively. The SMO is a robust and stable technique for fault diagnosis in bearings, however, this technique suffers from the chattering phenomenon. To reduce the effect of the chattering, the following function is introduced:  
\[Z=\sigma_{x}\|J_{o}(k)-\hat{J}_{o-SMO}(k)\|^{0.5}sgn\left(\hat{J}_{o}(k)-\hat{ J}_{o-SMO}(k)\right), \tag{23}\]  
Figure 4: The estimation accuracies in the abnormal condition. (**a**) Real and estimated signals by three techniques, and (**b**) the estimation signal’s error by three techniques. where \(Z\) and \(\sigma_{x}\) are new the observation definition and coefficient, respectively. If the unknown conditions are estimated \((\Delta+\varphi)\), the SMO error goes to zero in a finite time. \[\left\{ \begin{array}{c}\sigma_{x}\|J_{o}(k)-\int_{o-SMO}(k)\|^{0.5}sgn\Big{(}J _{o}(k)-\int_{o-SMO}(k)\Big{)}-\delta\\ \dot{\delta}=\sigma_{x_{0}}\times sgn\Big{(}J_{o}(k)-\int_{o}(k)\Big{)}\end{array}  \right., \tag{24}\]  
Here, \(\sigma_{x_{0}}\) and \(\dot{\delta}\) are the respective coefficient and the variable for the super-twisting variable. Therefore, based on Equation (23), this technique can improve the performance of fault estimation in the unknown condition. Therefore, to reduce the chattering phenomenon, the ASMO state-space and the fault estimation equation can be represented in Equations (25) and (26). \[\left\{ \begin{array}{c}\hat{J}_{s-HSMO}(k+1)=\Big{[}\sigma_{s}\hat{J}_{s-HSMO }(k)+\sigma_{o}\hat{J}_{o-HSMO}(k)+\sigma_{i}J_{i}(k)\Big{]}+\phi_{HSMO}(k)+\\ \sigma_{p}\Big{(}J_{o}(k)-\ \hat{J}_{o-HSMO}(k)\Big{)}+\sigma_{HSM}sgn\Big{(} \Big{(}J_{o}(k)-\hat{J}_{o-HSMO}(k)\Big{)}\Big{)}^{\frac{2}{3}}\\ \hat{J}_{o-HSMC}(k+1)=(\lambda)^{T}\hat{J}_{s-HSMO}(k)\end{array} \right., \tag{25}\]  
\[\left\{ \begin{array}{c}\hat{\phi}_{HSMO}(k+1)=\hat{\phi}_{HSMO}(k)+\sigma_{p }\Big{(}J_{o}(k)-\hat{J}_{o-HSMO}(k)\Big{)}+\sigma_{HSM}\times sgn\\ \big{(}J_{o}(k)-\hat{J}_{o-HSMO}(k)\Big{)}+\sigma_{x}\|J_{o}(k)-\ \hat{J}_{o-HSMO}(k)\|^{0.5}sgn\Big{(}J_{o}(k)-\hat{J}_{o-HSMO}(k)\Big{)}- \delta\\ \dot{\delta}=\sigma_{x_{0}}\times sgn\Big{(}J_{o}(k)-\int_{o}(k)\Big{)}\end{array}  \right.. \tag{26}\]  
Here, \(\hat{J}_{s-HSMO}(k),\hat{J}_{o-HSMO}(k),\hat{\phi}_{HSMO}(k)\), and \((\sigma_{x},\sigma_{HSM})\) are the advanced sliding mode system state estimation, advanced sliding mode output estimation, advanced sliding mode fault estimation, and coefficients, respectively. To find the sliding gain, the estimation error is calculated based on the following equation. \[\left\{