## 4 Calculation and Verification of Dynamic Derivatives
### The Influence of Sample Size on the Accuracy of Dynamic Derivatives Prediction  
We explored the impact of sample size on the accuracy of dynamic derivatives prediction, with k = 0.06, 0.08, k = 0.05, 0.06, 0.08, and k = 0.04, 0.05, 0.06, 0.08 as training data, and k = 0.07 as testing data. Prediction results of aerodynamic force based on PSO-LSTM are shown in Figures 11-13. Prediction error values of aerodynamic data are shown in Table 5. Obviously, as the number of training data increase, the predicted aerodynamic force over time is closer to the CFD calculation results. This is because an increase in the number of training data will improve the learning ability of recurrent neural networks for flow-field features, especially details. But the increase in the number of training data will lead to an increase in training cost of the neural network. For the example in this section, after doubling the number of training data, the prediction accuracy of the pitching moment coefficient increased by 2.085%, the training time increased by 98.67%, and the improvement ratio of accuracy to time is 0.02.  
Next, we calculated the dynamic derivatives using the least-squares method based on the pitch moment coefficients obtained from three sets of training data. We used the integration method to solve the dynamic derivatives based on the calculation results of CFD. Table 6 shows the calculation results of dynamic derivatives. It can be concluded that high accuracy has been achieved with the training data of k = 0.05, 0.06, and 0.08. Calculation results of dynamic derivatives under the training data of k = 0.04, 0.05, 0.06, and 0.08 show no significant improvement compared to the identification results under the training data of k = 0.05, 0.06, and 0.08. Because the flow field is generally in a linear or weakly nonlinear state when calculating dynamic derivatives, and the changes in the flow field are relatively mild, a small number of training data can be used for modeling.  
Figure 10: Comparison of aerodynamic data obtained using PSO-LSTM and CFD (testing data: k = 0.08).  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Training Data** & **Aerodynamic Data** & \(\mathbf{\epsilon_{\text{rms}}}\) & \(\mathbf{\epsilon}\) & **Modeling Time (s)** \\ \hline \multirow{2}{*}{k = 0.06, 0.08} & \(C_{l}\) & 0.153\% & 0.521\% & 83.9 \\ \cline{2-5}  & \(C_{m}\) & 0.00237\% & 4.212\% & 83.1 \\ \hline \multirow{2}{*}{k = 0.05, 0.06, 0.08} & \(C_{l}\) & 0.049\% & 0.152\% & 126.8 \\ \cline{2-5}  & \(C_{m}\) & 0.00079\% & 2.131\% & 128.7 \\ \hline \multirow{2}{*}{k = 0.04, 0.05, 0.06, 0.08} & \(C_{l}\) & 0.043\% & 0.133\% & 166.4 \\ \cline{2-5}  & \(C_{m}\) & 0.00075\% & 2.127\% & 165.1 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Error of predicted data.  
Figure 11: _Cont_.  
Figure 11: Comparison of aerodynamic data obtained using PSO-LSTM and CFD (training data: k = 0.06, 0.08).  
Figure 12: Cont.  
Figure 12: Comparison of aerodynamic data obtained using PSO-LSTM and CFD (training data: k = 0.05, 0.06, 0.08).  
Figure 13: _Cont._  
Figure 13: Comparison of aerodynamic data obtained using PSO-LSTM and CFD (training data: k = 0.04, 0.05, 0.06, 0.08).