# Fault Diagnosis Method for Aircraft EHA Based on FCNN and MSPSO Hyperparameter Optimization
## 3 Multi-Strategy Hybrid Particle Swarm Optimization Algorithm (MSPSO)
### Multi-Strategy Hybrid Particle Swarm Optimization Algorithm
#### 3.2.3 Hybrid Variation Strategy  
As the algorithm iterates, many particles begin to aggregate and the particle population diversity decreases sharply, making the convergence velocity significantly slower in the later stages [30]. When the population diversity is too low, it is difficult for the algorithm to perform a normal operation. At this time, introducing a hybrid variation operator to increase the population diversity can promote further algorithm convergence.  
First, the diversity of the population was judged based on the mean centroid distance of the particles [31]:  
\[\text{Div}=\frac{1}{n}\sum\limits_{i=1}^{n}\sqrt{\sum\limits_{1}^{d}\bigl{(}x_ {ij}-\overline{x}_{\text{j}}\bigr{)}^{2}} \tag{14}\]  
where \(\text{Div}\) is the mean centroid distance of the particles, \(\overline{x}_{\text{j}}=\frac{1}{n}\sum\limits_{i=1}^{n}x_{ij}\) is the average value of all particles in the \(j_{th}\) dimension. A smaller value of \(\text{Div}\) indicates a high aggregative of the particles around the center. Adopting the hybrid variation strategy when \(\text{Div}\) decays to a certain value, i.e.,  
\[\text{Div}(t)\leq\alpha\text{Div}(0) \tag{15}\]  
where \(\text{Div}(t)\) is the mean centroid distance in the \(t_{th}\) generation, \(\text{Div}(0)\) is the initial mean center distance and \(\alpha\) is the threshold coefficient. The literature [32] shows that when the population diversity during the iterative process decreases to 1-5% of the initial population, the search capability of particles decreases, and the algorithm tends to fall into a local optimum. Therefore, in practical applications, the threshold coefficient is generally set to 0.01-0.05, considering convergence accuracy and velocity.  
After that, according to the variation rate \(p_{h}\), randomly select \(np_{h}\) particles in the original population for hybrid operation. The variation rate satisfies the following conditions:  
\[p_{h}=p_{h0}\biggl{(}1-\frac{t}{T}\biggr{)}^{2} \tag{16}\]  
where \(p_{h0}\) is the initial variation rate and \(T\) is the maximum number of iterations.  
The child particles generated by the hybridization operation are deposited in the hybridization pool, and the positions and velocities of the offspring are generated by random crossover of the parents according to the following formula.  
\[\begin{cases}\mathbf{x}_{i}^{*}=p_{b}\mathbf{x}_{i}+(1-p_{b})\mathbf{x}_{j}\\ \mathbf{x}_{j}^{*}=p_{b}\mathbf{x}_{j}+(1-p_{b})\mathbf{x}_{i}\\ \mathbf{v}_{i}^{*}=\frac{v_{i}+v_{j}}{|v_{i}+v_{j}|}|\mathbf{v}_{i}|\\ \mathbf{v}_{j}^{*}=\frac{v_{i}+v_{j}}{|v_{i}+v_{j}|}|\mathbf{v}_{j}|\end{cases} \tag{17}\]  
where \(p_{b}\) is a random number among \([0,1]\), \(\mathbf{x}_{i}^{*}\), \(\mathbf{x}_{j}^{*}\), \(\mathbf{v}_{i}^{*}\), \(\mathbf{v}_{j}^{*}\) are the position and velocity of the parents respectively; \(\mathbf{x}_{i}\), \(\mathbf{x}_{j}\), \(\mathbf{v}_{i}\), \(\mathbf{v}_{j}\) are the position and velocity of the children respectively.  
Finally, the parent particles are replaced with child particles to form a new population, and the new population will continue to iterate.