## 5 Prediction Modeling and System Optimization
### Testing the Performance of the ANN Models  
Simulation experiments of different loads were carried out through the established multi-subsystem coupling model (15) and collected dynamic data of inlet temperature, pressure, and exhaust flow. Then the data on temperature, pressure, and flow were preprocessed under a stable state of each load segment. A total of 47 groups of experimental data were obtained and are listed in Table 5. A total of 24 experimental data sets were selected as the training dataset, and the other 23 experimental data sets were used to test the ANN model. The conventional ANN model and the modified ANN model using PSO were both trained by the training data. After a lot of trial and error, the initial fixed learning rate was selected as 0.2 and the number of hidden layers was eight. The particle cycle number was 60. The number of iterations was 40. During \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**No** & \(P_{1\text{-in}}\) **(kPa)** & \(P_{2\text{-in}}\) **(kPa)** & \(P_{2\text{-out}}\) **(kPa)** & \(T_{1\text{-in}}\) **(K)** & \(T_{2\text{-in}}\) **(K)** & \(Q\) **(m\({}^{3}\)/h)** & \(\eta_{1}\) **(\%)** & \(\eta_{2}\) **(\%)** \\ \hline
1 & 101 & 270.4 & 677.1 & 316.8 & 325.0 & 693.3 & 100 & 100 \\
2 & 101 & 265.6 & 597.3 & 313.3 & 329.5 & 600.8 & 88.5 & 88 \\
3 & 101 & 263.6 & 571.0 & 311.7 & 325.0 & 580,7 & 84.5 & 83 \\
4 & 101 & 250.5 & 521.4 & 315.7 & 323.6 & 540.9 & 77 & 78.5 \\
5 & 101 & 273.7 & 540.2 & 309.6 & 327.6 & 567.7 & 82 & 74.5 \\ ⋮ & ⋮ & ⋮ & ⋮ & ⋮ & ⋮ & ⋮ & ⋮ \\
46 & 101 & 242.7 & 414.6 & 309.9 & 322.5 & 421.5 & 62 & 62 \\
47 & 101 & 236.7 & 374.0 & 309.7 & 318.4 & 400.4 & 56 & 56 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Part of the training and test data. the training process, it was found that the BP neural network with PSO-optimized initial parameters converges faster. After the training process was completed, both ANN models were tested with the 23 experimental data sets. A prediction performance comparison of the ANN models with and without PSO is presented in this subsection. Figure 18 displays the comparison of the test results of the conventional ANN model and the experimental data. It can be seen that the overall prediction trend is acceptable. To further evaluate the conventional ANN model, prediction errors are shown in Figure 19. It can be concluded that the ANN model had high prediction errors at some points. As can be seen in Figure 19a, the maximum prediction absolute error of the first-stage load ratio reached up to \(-0.12\), and the maximum prediction absolute error of the second-stage load ratio was \(-0.1\). Most of their absolute prediction errors were between \(-0.05\) and \(0.05\). Figure 19b indicates the relative prediction errors. It can be observed that their relative prediction errors were in the range of \(-12\%\) to \(8\%\). To improve the prediction precision, particle swarm optimization is used to optimize the initial weight and threshold of the ANN model. Figure 20 shows a comparison of ANN test results with PSO and experimental data. Compared with Figure 18, ANN predictions with PSO matched better with the experimental data. Therefore, it can be concluded from Figures 18 and 20 that the ANN model established in this work shows great robustness no matter whether PSO is adopted or not. Figure 21 displays the prediction errors of the ANN model with PSO. It can be seen that the prediction errors of the ANN model with PSO were lower than without PSO, as shown in Figure 21. Most of the absolute prediction errors of the ANN model with PSO were between \(-0.02\) and \(0.02\), while  
Figure 19: **(a)** Prediction absolute error of conventional ANN model; **(b)** relative prediction error of conventional ANN model. Figure 18: Comparison of conventional artificial neural network (ANN) predictions and experimental data; **(a)** the first stage; **(b)** the second stage. the relative prediction errors ranged from \(-2\%\) to \(2\%\). Compared with the experimental data, the maximum relative error was less than \(4\%\).