# BearingCog: A Bearing Fault Diagnosis Method under Variable Operational Conditions
## 3 Methodology
### Feature Extraction and Selection  
Though the vibration signal of rolling bearings is preprocessed by the VMD, it is difficult to distinguish the faults under large background noises. Hence, feature extraction is essential to obtain more effective fault information. Inspired by [26], statistical features under time-domain and spectral-domain are performed to detect the fault characteristics. In addition, the entropy is also imported to represent the energy change for condition monitoring. In this work, statistics features are utilized to reflect the fault status, which is presented in Table 1. Considering these features are measured in different scales, the max-min normalization algorithm is conducted in Equation (6).  
\[x_{norm}=(k_{\max}-k_{\min})\frac{x-x_{\min}}{x_{\max}-x_{\min}}+k_{\min}. \tag{6}\]  
where \(x_{\min}\) represents the maximum value of the variables, \(x_{\max}\) represents the minimum value of the variables. In addition, \(k_{\max}\) and \(k_{\min}\) represent the maximum and minimum values of the normalization range, respectively. Observed from the equation, the variable ranges from \(-1\) to \(1\) after normalization.  
Although numerous features are extracted, some of them are not sensitive to bearing faults. In other words, the redundant features are not qualified for model training. Hence, dimension reduction tools are performed to filter the relevant features. Among those, principal component analysis (PCA) is an effective dimension reduction technique, which belongs to the projection method. The idea of the PCA is to transform a series of possibly correlated elements into a smaller number of uncorrelated elements, which are defined as principal components (PC) [27]. After PCA, the vector dimension is shortened and the reserved PCs are mutually orthogonal. Thus, the orthogonal PCs are independent and sensitive to the bearing faults. In addition, compared with convolutional neural network (CNN) [7], stacked denoising autoencoder (SDA) [28], deep neural network (DNN) [29], and other dimensional-reduction methods, PCA algorithm has the advantages of low computational cost, unrestricted parameters, and strong interpretation of results [30]. The detailed algorithm of PCA is listed as follows:  
Step 1: Calculate the covariance matrix of the objective signal. The covariance matrix is denoted as \(\sum\) shown in Equation (7)  
\[\Sigma=E\Big{\{}(x-\overline{x})(x-\overline{x})^{T}\Big{\}},\ \Sigma\in\mathbb{R}^{N\times M}, \tag{7}\]  
where \(x\) represents the target discrete series, \(\overline{x}\) represents the corresponding mean vector of the series. \(E\) {.} represents an average operation for \(N\) data samples, \(M\) represents the length of the discrete series;  
Step 2: Search a matrix of eigenvectors denotated as \(\Lambda\) and diagonal elements of matrix \(D\). The matrix \(D\) is calculated as \(D=\Lambda^{-1}\Sigma\Lambda\);  
Step 3: Sort the eigenvectors of PCs by decreasing order;  
Step 4: Import the data into the directions of sorted eigenvectors by utilizing the dot product among the data and eigenvectors;Step 5: Select the first main PCs based on some specific criteria. Usually, the criteria are dependent on a 95% confidence interval.