## 2 Materials and Methods' Theoretical Basis and Diagnostic Model
### RCMDE with GA Optimized  
Dispersion entropy (DE) [21] is an index proposed by [PERSON] in 2016 to quantify the regularity of time series, which can effectively detect changes in noise bandwidth, frequency, and amplitude. Compared with the Permutation Entropy (PE) and Sample Entropy (SE), it has been widely used in the fault diagnosis of reciprocating compressors. The calculation process is as follows:  
1. For a given time-series length \(N\), time series \(x=\{x_{1},x_{2},\ldots,x_{N}\}\) is mapped to \(y=\{y_{1},y_{2},\ldots,y_{N}\}\) by the normal distribution function (9): \[y_{i}=\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{jr}e^{\frac{-(i-\mu)^{2}}{2a ^{2}}}dt\] (9) where \(\mu\) represents the mathematics expectation and \(\sigma^{2}\) represents the variance. 2. \(y\) is mapped to \(z\) by linear transformation (10): \[z_{j}^{c}=R\big{(}c\cdot y_{j}+0.5\big{)}\] (10) where \(c\) is the number of categories and \(R(\cdot)\) represents the integer function. 3. The embedding vector is calculated as follows: \[z_{i}^{m,c}=\Big{\{}z_{i}^{c},z_{i+d}^{c},\ldots,z_{i+(m-1)d}^{c}\Big{\}},i=1,2, \ldots,N-(m-1)d\] (11) where \(m\) is the embedded dimension and \(d\) is the time delay. 4. Calculate each spread mode \(\pi_{v_{0}v_{1}\ldots v_{m-1}}(v=1,2,\ldots,c)\); if \(z_{i}^{c}=v_{0},z_{i+d}^{c}=v_{1},\ldots,\)\(z_{i+(m-1)d}^{c}=v_{m-1}\) then the polling mode of \(z_{i}^{m,c}\) is \(\pi_{v_{0}v_{1}\ldots v_{m-1}}\). Since \(\pi_{v_{0}v_{1}\ldots v_{m-1}}\) is composed of \(c\) bits and each bit has value \(m\), the corresponding spread mode has value \(c^{m}\). 5. Calculate the probability \(p\big{(}\pi_{v_{0}v_{1}\ldots v_{m-1}}\big{)}\) of each dispersion mode \(\pi_{v_{0}v_{1}\ldots v_{m-1}}\): \[p\big{(}\pi_{v_{0},v_{1},\ldots,v_{m-1}}\big{)}=\frac{Number\big{(}\pi_{v_{0}v _{1}\ldots v_{m-1}}\big{)}}{N-(m-1)d}\] (12) where \(Number\big{(}\pi_{v_{0}v_{1}\ldots v_{m-1}}\big{)}\) represents the number of maps from \(z_{i}^{m,c}\) to \(\pi_{v_{0}v_{1}\ldots v_{m-1}}\). 6. The expression for time-series dispersion entropy with embedding dimension \(m\), time delay \(d\), and category \(c\) is as follows: \[DE(X,m,c,d)=-\sum_{\pi=1}^{c^{m}}p\big{(}\pi_{v_{0},v_{1},\ldots,v_{m-1}} \big{)}\ln\big{(}p\big{(}\pi_{v_{0},v_{1},\ldots,v_{m-1}}\big{)}\big{)}\] (13)  
Multi-scale dispersion entropy (MDE) is an improved version of DE. For the initial time series \(u=\{u_{1},u_{2},\ldots,u_{L}\}\), where \(L\) is the length of the time series, the initial sequence \(u\) is built into coarse-grained time series by Equation (14). \[x_{j}^{\tau}=\frac{1}{\tau}\sum_{b=(j-1)\tau+1}^{j\tau}u_{b},\bigg{(}1\leq j \leq\bigg{\lfloor}\frac{L}{\tau}\bigg{\rfloor}=N\bigg{)} \tag{14}\]  
MDE is defined by Equation (15)  
\[MDE(X,m,c,d)=DE(y_{j}^{(\tau)},m,c,d) \tag{15}\]  
RCMDE is proposed by [PERSON] to improve the stability of MDE, and the calculation steps of RCMDE are as follows [22]:  
1. Coarse-grained sequence \(u\) is constructed from original data: \[x_{k,j}^{\tau}=\frac{1}{\tau}\sum_{b=k+\tau(j-1)}^{k+j\tau-1}u_{b}\] (16)
2. For each scale \(\tau\), RCMDE is defined as: \[RCMDE(x,m,c,d,\tau)=-\sum_{\pi=1}^{c^{m}}\overline{p}\big{(}\pi_{v_{0}v_{1} \ldots v_{m-1}}\big{)}\cdot\ln\big{(}\overline{p}\big{(}\pi_{v_{0}v_{1}\ldots v _{m-1}}\big{)}\big{)}\] (17)  
Nevertheless, the selection of parameters of RCMDE is often manually determined, and the setting range is \(c^{m}<N\). In the literature [23], the embedding dimension \(m\) is set as 2 or 3 and the time delay \(\tau\) is set as 1. In order to obtain a more appropriate value of RCMDE, GA is employed in this paper to optimize its parameters. As for the fast global search ability and wide adaptability, GA has been applied to the optimization of various parameters [24]. With GA, the theory of biological evolution and genetics are simulated to conduct global search for the optimal solution to the problem. GA is employed to optimize the data length \(x\), embedding dimension \(m\), and time delay \(\tau\) in RCMDE.