## 2 Materials and Methods
### Feature Engineering
#### 2.1.1 Time-Domain Signal Feature Engineering  
The standard deviation (\(SD\)) can display the degree of dispersion between the data and its data group. The degree of dispersion of the vibration signal within the interval can be measured.  
\[SD=\sqrt{\frac{1}{N-1}\sum_{i=1}^{N}(x_{i}-\mu)^{2}}\,,\,\,i=1,\,2,\,3,\ldots,N \tag{1}\]  
where \(N\) is the total number of data points; \(x_{i}\) is a series of data and \(\mu\) is its mean value.  
The root mean square (\(RMS\)) is used to calculate the mean difference between data and a dataset. It is a statistical method that is often used in the processing of the direct current, sine waves, and normally distributed multi-frequency signals. It can be used as a method to evaluate the energy level of the current and voltage in the dataset interval.  
\[RMS=\sqrt{\frac{\sum_{i=1}^{n}x_{i}^{2}}{n}},i=1,\,2,3,\ldots \tag{2}\]  
Sample entropy (SE) [8] is used to measure the complexity of a time-series signal and has been applied in many fields. SE is a modification of approximate entropy (AE) and a powerful method used to analyze time-series signals. SE can measure the degree of chaos of the physical signal when the results are not relative to the size of the sample. In practice,a piece of the data signal is divided into multiple samples; then, the similarity between each sample and the other samples is assessed to determine the confusion degree of the signal in a certain time interval.  
A brief introduction of sample entropy is introduced as follows. Let the signal \(X\) for \(N\) data points be: \(x_{1},\ x_{2},x_{3},\ldots,x_{N}\). Then, dividing the data into every m data points yields the \(N-m+1\) subset. After segmentation, this can be arranged into a template space: \(X_{(N-m+1)\times(m)}\).  
\[X_{(N-m+1)\times(m)}=\left[\begin{array}{cccc}x_{1}&x_{2}&\ldots&x_{m}\\ x_{2}&x_{3}&\ldots&x_{m+1}\\ \vdots&\vdots&\ddots&\vdots\\ x_{N-m+1}&x_{N-m+2}&\ldots&x_{N}\end{array}\right] \tag{3}\]  
First, calculating the largest distance between each template \(d_{ij}\):  
\[d_{ij}=max(|X(i,1)-X(j,1)|,|X(i,2)-X(j,2)|,\ldots,|X(i,i+m-1)-X(j,j+m-1)|) \tag{4}\]  
From Equation (4), the largest distance can be determined using the Chebyshev Distance. Then, the Heaviside nonlinear function is used to calculate self-similarity \(D_{ij}\):  
\[D_{ij}=H\big{(}d_{ij}\big{)}=\left\{\begin{array}{ll}1,\ d_{ij<r}\\ 0,\ d_{ij\geq r}\end{array}\right. \tag{5}\]  
where \(r\) is the threshold, which is usually the proportion of the standard deviation of the signal. Using the standard deviation ensures that the result is not affected by the different scales of fluctuation. Moreover, the sum of all \(D_{ij}\) s divided by \(N-m\) (it is not divided by \(N-m+1\) because SE does not compare the distance itself).  
\[\delta_{m}(r,N)=\frac{\sum_{i=1}^{N-m}Dij}{N-m} \tag{6}\]  
Finally, by adopting \(m+1\) data points to build a new template space, and processing the data from Equations (3)-(6) to obtain \(\delta_{m+1}(r,N)\), the final value of sample entropy can be determined:  
\[SE(m,r,N)=-log\frac{\delta_{m}(r,N)}{\delta_{m+1}(r,N)} \tag{7}\]  
where \(m\) is the \(m\)th sample, \(r\) is the threshold, \(\delta\) is the sample value.