# Turbofan Engine Health Prediction Model Based on ESO-BP Neural Network
## 3 Model Construction
### ESO Optimization Process  
The overall framework of the proposed ESO-BP prediction model is illustrated in Figure 7. The implementation of ESO optimization involves the following specific steps:  
1. Employ grid search to determine the optimal number of neurons in the hidden layer and establish the optimal structure for the BP neural network model. 2. Initialize the parameters for ESO, define the dimensions and value ranges of the search space based on the optimal model structure, and specify the population size, maximum iteration count, and fitness function using Equations (10)-(12). 3. Randomly generate the initial population, compute the fitness value for each individual, and identify the elite sets for both the male and female populations. 4. In the early iterations, the populations enter the exploration phase due to the quantity of food being lower than 0.25. In this phase, individuals in both the male and female populations randomly select an elite guider and move to positions near it. The exploration phase is presented in Equation (13) [16]. \[X_{i}(t+1)=X_{elite}(t)\pm 0.05\times\exp\left(\frac{-f_{elite}}{f_{i}} \right)\times\left((l_{u}-l_{l})\times rand+l_{l}\right)\] (13) Here, \(X_{i}\) is the \(i\)-th individual position and \(t\) is the current iteration count. \(X_{elite}\) is the position of a randomly selected elite guider in an elite set. \(f_{elite}\) is the fitness of the elite guider. \(f_{i}\) is the fitness of the \(i\)-th individual. \(l_{u}\) and \(l_{l}\) are the upper and lower bounds of the problem, respectively. 5. In the later stages of iteration, the populations enter the exploitation phase when the food quantity exceeds 0.25. In this phase, the behavior of the populations is influenced by the temperature. If the temperature is greater than the threshold, both male and female individuals move toward the population's optimal position (food). If the temperature is lower than the threshold, there is a 40% probability that male and female populations engage in conflict, and a 60% probability that they engage in mating. The snake fight stage is defined in Equations (14) and (15). The snake mating stage is defined in Equations (16) and (17). The calculation for updating the worst individual is defined in Equation (18). \[X_{i,m}(t+1)=X_{i,m}(t)\pm 2\times\exp\left(\frac{-f_{best,f}}{f_{i,m}} \right)\times rand\times\left(Q\times X_{best,f}-X_{i,m}(t)\right)\] (14) \[X_{i,f}(t+1)=X_{i,f}(t)\pm 2\times\exp\left(\frac{-f_{best,m}}{f_{ i,f}}\right)\times rand\times\left(Q\times X_{best,m}-X_{i,f}(t)\right)\] (15) \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter Name** & **Value** \\ \hline Limit of the solution space & [\(-\)2, 2] \\ Population size & 10 \\ Iterations & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameter values of ESO. \[X_{i,m}(t+1)=X_{i,m}(t)\pm 2\times\exp\left(\frac{-f_{i,j}}{f_{i,m}}\right) \times rand\times\left(Q\times X_{i,f}(t)-X_{i,m}(t)\right) \tag{16}\]  
\[X_{i,f}(t+1)=X_{i,f}(t)\pm 2\times\exp\left(\frac{-f_{i,m}}{f_{i,f}}\right) \times rand\times\left(Q\times X_{i,m}(t)-X_{i,f}(t)\right) \tag{17}\]  
\[X_{worst}=l_{l}+rand\times(l_{u}-l_{l}) \tag{18}\]  
In Equations (14)-(18), \(X_{i,m}\) and \(X_{i,f}\) are the positions of the \(i\)-th individual in the male and female populations, \(X_{best,m}\) and \(X_{best,f}\) are the positions of the optimal individuals in the male and female populations, \(f_{best,m}\) and \(f_{best,f}\) are the fitness values of the optimal individuals in the male and female populations, \(f_{i,m}\) and \(f_{i,f}\) are the fitness values of current male or female individuals, and \(Q\) is the food quantity defined in Equation (2) [16]. Generate reverse populations using Equation (4). If there is a new individual with better fitness, the ESO algorithm will replace the original agent with the new individual. Continuously adjust the position of the snake agent until reaching the maximum iteration count, obtaining the optimal spatial position.