## 3 Simulation Analysis Using SSA for GREATEM Signal De-Noising
### Parameter Selection
#### 3.1.1 Window Length  
The first step in the SSA algorithm is to select the appropriate window length \(M\) to embed in the time trajectory matrix \(\mathbf{Y}\). The value of the window length \(M\) directly determines the de-noising effect. Generally speaking, the window length \(M\) should be less than half of the trajectory matrix length, which is determined by the properties of the matrix. Figure 2 shows the comparison result of the de-noising effect on the calculated theoretical GREATEM response of uniform half-space with power frequency noise, where the window length \(M\) is the value of 30, 350, 1500, and 2500, respectively. As shown in Figure 2, for the length of 5001 synthetic signals, the window length 30 is too small, the noise reduction effect is not ideal, and the signal still contains apparent noise. The window length 1500 or 2500 is too large, the separated signal decay ends prematurely, and the useful signal components are not properly retained. In applying the SSA method, some scholars usually take the window as half of the length of the trajectory matrix \(\mathbf{Y}\)[25; 26] and have achieved good results. Figure 2 concludes that this window selection method could not appropriately separate GREATEM signals and noise. Therefore, we study the window length selection in the de-noising of GREATEM data using the SSA algorithm. We select the window length M value interval in [10, 1000], the step length is 10, and use root means square error (RMSE) as the evaluation index. The smaller the RMSE, the better the separation effect. Figure 3 shows the signal separation results for different window lengths. We can conclude that the appropriate window length is not a specific value but an interval. Select the window length in this interval, and the separated GREATEM signal effect is similar. Therefore, we propose to use a particle swarm optimization (PSO) algorithm to select the appropriate window length \(M\) more accurately. The PSO algorithm is a kind of self-adaptive random optimization technology which has the characteristics of a simple iterative format and fast convergence to the optimal solution of the equation. The basic principle of the PSO algorithm is:  
1. Let \(m\) particles form a group in an S-dimensional search space, and the \(i\)th particle is represented as an S-dimensional vector \(\mathbf{X}_{i}=(x_{i1},x_{i2},\ldots,x_{i5}),i=1,2,\ldots,m\); then we substitute \(\mathbf{X}_{i}\) into the objective function to calculate the corresponding fitness value. 2. Let the optimal individual extremum of the current iteration of the \(i\)th particle be \(\mathbf{P}_{i}=(p_{i1},p_{i2},\ldots,p_{i5})\); the velocity is \(\mathbf{V}_{i}=(v_{i1},v_{i2},\ldots,v_{i5})\); the optimal global extremum of the particle swarm current iteration is \(\mathbf{P}_{g}=\left(p_{g1},p_{g2},\ldots,p_{g5}\right)\). Figure 2: Comparison of signals after de-noising with different window lengths in the SSA. 1. Update the speed and position of the \(i\)th particle in \(S\) dimension according to Equations (12) and (13). \[\mathbf{V}_{i}(t+1)=\omega\mathbf{V}_{i}(t)+c_{1}\mathbf{v}_{1}(\mathbf{P}_{i}(t)-\mathbf{X}_{i}(t))+ c_{2}\mathbf{v}_{2}\big{(}\mathbf{P}_{g}(t)-\mathbf{X}_{i}(t)\big{)}\] (12) \[\mathbf{X}_{i}(t+1)=\mathbf{X}_{i}(t)+\mathbf{V}_{i}(t+1)\] (13)  
In Equations (12) and (13), \(t\) is the number of iterations; \(\omega\) is the inertia weight, generally take \(\omega\ e\ [0.4,\ 1.0]\); \(c_{1}\) and \(c_{2}\) are learning factors, generally take \(c_{1},c_{2}\ e\ [0,\ 2]\); \(r_{1}\) and \(r_{2}\) are mutually independent and obey a pseudo-random number of the uniform distribution on \([0,1]\). Set the parameters to \(\omega=0.7\), \(c_{1}=c_{2}=2\), and the population size to 20. At the same time, the initial population position range is limited [10, 1000][27, 28]. Using permutation entropy as a fitness function of particle swarm optimization, the window length and fitness function curve shown in Figure 4 is obtained through 20 PSO algorithm iterations.