# Research on the Flight Performance of Biomimetic Moth Based on Flapping Function Control
## 3 Calculation and Simulation
### Simulation of the Impact of Key Parameters on the Performance of Flapping-Wing Aircraft  
Through the simplified kinematic modeling analysis, it can be seen that the flapping function has three controllable parameters: flapping amplitude, flapping frequency, and mid-position angle. According to the mathematical modeling analysis, the lift generated by the flapping motion is positively correlated with \(\phi_{max}\) and \(f\), and negatively correlated with \(|\phi_{0}|\). The following will use the XFlow software for simulation calculation to verify the analysis results. Simulation calculations will be performed from five angles: the impact of flapping amplitude \(\phi_{max}\), flapping frequency \(f\), and mid-position angle \(\phi_{0}\) on aerodynamic characteristics. It will further delve into how the quick return feature affects the aerodynamic properties at various flapping frequencies \(f\). It will further explore the steering capabilities influenced by the differential flapping amplitude between the left and right wings, focusing on the wing's flapping amplitude \(\phi_{max}\). Firstly, a simple 3D model of the flapping-wing aircraft is completed. A rigid wing with a unilateral wingspan of about 330 mm and a maximum chord length of about 360 mm is designed, as shown in Figure 3. The left and right wings are driven by the left and right servos, respectively. The output shaft of the servo is at a \(15^{\circ}\) angle with the centerline of the flapping-wing aircraft so that the wing has a certain rotation during flapping, as shown in Figure 4b, with the black wing representing the ventral surface of the wing. \begin{table}
\begin{tabular}{c c c c} \hline
**Changing Parameter** & **Value Range** & **Relationship with Average Lift** & **Conclusion** \\ \hline \(f\) & \(\left\lfloor 0,+\infty\right\rangle\) & \(\bar{F}_{L}\propto f^{4}\) & The larger \(f\) is, the larger \(\bar{F}_{L}\) will be \\ \(\phi_{max}\) & \(\left\lfloor 0,\pi/2\right\rfloor\) & \(\bar{F}_{L}\propto\phi\)\(\phi_{maxmax}\) & The larger \(\phi_{max}\) is, the larger \(\bar{F}_{L}\) will be \\ \(\phi_{0}\) & \(\left[-\pi/18,\pi/18\right]\) & \(\bar{F}_{L}\propto cos\phi_{0}\) & The larger \(|\phi_{0}|\) is, the smaller \(\bar{F}_{L}\) will be \\ \hline \end{tabular}
\end{table} 
Table 1: Analysis of key parameters. Figure 3: Dimensions of Rigid wing. The blue * represents the measurement point. In the XFlow software, a 3D virtual wind tunnel is built as an aerodynamic simulation platform, and the parameter settings are shown in Table 2. The simplified 3D model of the flapping-wing aircraft is imported into the virtual wind tunnel. The main body of the flapping-wing aircraft is fixed, and the centerline is located in the virtual wind tunnel plane \(xOz\). The angle between the centerline and the wind tunnel \(x\)-axis is called the pitch angle, and the default pitch angle is \(10^{\circ}\). The left and right wings make rigid body motions and oscillate periodically around the output shaft of the left and right servos. The periodic reciprocating flapping motion of the wing is controlled by setting the function of the angle of rotation of the wing around its own \(x\)-axis, which corresponds to the output shaft of the servo over time. This function is the flapping function. The flapping function inspired by the flapping behavior of Lepidoptera insects is shown in Equation (15), which is composed of two segmented sine functions smoothly connected. \[\phi=\phi\big{(}t^{\prime}\big{)}= \begin{cases}-\phi sin\Big{(}\frac{t^{ \prime}\times\pi}{T_{1}}+\varphi_{1}\Big{)}_{0 max}&0\leq t^{\prime}<T_{1}\\ -\phi sin\Big{(}\frac{t^{\prime}\times\pi}{T_{2}}+\varphi_{2}\Big{)}_{0 max}&T_ {1}\leq t^{\prime}<T\end{cases}