# Research on Rolling Bearing Fault Diagnosis Method Based on ECA-MRANet
## 3 Fault Diagnosis Method Based on ECA-MRANet  
### Based on Improved Residual Block Feature Extraction  
#### 3.1.1 Convolutional Block Attention Module  
A Convolutional Block Attention Module (CBAM) [22], a fusion of Channel Attention and Spatial Attention Mechanisms, enables the network to dynamically prioritize crucial channel and spatial location information to achieve the optimal selection of features. CBAM network architecture is shown in Figure 6.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **IMF1** & **IMF2** & **IMF3** & **IMF4** \\ \hline Kurtosis & 2.5034 & 4.0990 & 4.7254 & 4.1869 \\ Envelope entropy & 9.8568 & 9.7111 & 9.6121 & 9.7259 \\ fit & 10.2562 & 9.9551 & 9.8237 & 9.9648 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Values of each modal index for VMD decomposition.  
Figure 5: VMD decomposition results for bearing inner ring fault signal. (**a**) Time domain diagram (**b**) frequency domain diagram.  
Figure 6: Schematic of CBAM.  
The Channel Attention Mechanism initially weighs the input feature \(F\) by employing global maximum pooling and global average pooling operations, yielding the channel information \(F_{max}^{c}\) and \(F_{avg}^{c}\) of the input features. Then, the multilayer perceptron (MPL) is used to lift and reduce the dimensionality of \(F_{max}^{c}\) and \(F_{avg}^{c}\), respectively. The Channel Attention Mechanism then activates the sum of the two features of the output of the multi-sensor MPL with the Sigmoid function to obtain the channel attention weight coefficients \(M_{c}\). Finally. The Channel Attention Mechanism multiplies the input feature \(F\) with the weight coefficients \(M_{c}\) to obtain the more refined feature \(F^{\prime}\), which is computed by the formula shown below:  
\[M_{c}=\sigma(Conv(Avgpool(F))+Conv(maxpool(F))) \tag{13}\] \[=(w_{1}(w_{0}(F_{avg}^{c}))+w_{1}(w_{0}(F_{max}^{c})))\]  
\[F^{\prime}=M_{c}\times F \tag{14}\]  
where \(w_{0}\in R^{c/r\times c}\) and \(w_{1}\in R^{c\times c/r}\) are the weight coefficients corresponding to the multilayer perceptron and \(\sigma\) are the Sigmoid functions.  
The Spatial Attention Mechanism performs global average pooling and global maximum pooling of the input features along \(F^{\prime}\) along the channel direction to obtain the global average \(F_{avg}^{s}\) and global maximum \(F_{max}^{s}\) of each channel, respectively. Subsequently, \(F_{avg}^{s}\) and \(F_{max}^{s}\) are concatenated along the channel direction to generate the two-channel feature maps. These feature maps are then passed through a convolution kernel of size \(7\times 7\) or \(7\times 1\) to achieve feature compression in the channel dimension. Finally, the output is activated using the Sigmoid function to obtain the spatial attention weight coefficient \(M_{s}\), which is calculated as shown below:  
\[M_{s}=\sigma\Big{(}f^{7\times 7}([Avgpool(F);maxpool(F)])\Big{)}=\sigma\Big{(}f^{7 \times 7}\Big{[}F_{avg}^{s};F_{max}^{s}\Big{]}\Big{)} \tag{15}\]  
\[F^{\prime\prime}=M_{s}F^{\prime} \tag{16}\]  
where \(f^{7\times 7}\) is the \(7\times 7\) convolution and \(\sigma\) is the Sigmoid function.