## 4 Simulation Results  
In this part, we simulate the proposed scheme to validate the proposed scheme through Matlab. The UAV trajectory simulation parameters and information propagation environment parameters are summarized in Table 1. These channel parameters are set according to the 3 GPP propagation environment, which are almost consistent with those in [16; 37; 38].  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Values** \\ \hline Time slot & 1 s \\ Maximum speed of UAV & 10 m/s \\ Horizontal height of UAV & 100 m \\ Starting position of UAV & (100, \(-500\)) \\ Ending position of UAV & (100, \(500\)) \\ Position of BS & (\(-50\), \(0\)) \\ Position of EVE & (0, \(0\)) \\ Position of User & (\(200\), \(0\)) \\ Path-loss for LoS channel & \(35.6\ +\ 22.0\times\lg(d)\) \\ Path-loss for NLoS channel & \(32.6\ +\ 36.7\times\lg(d)\) \\ Transmission bandwidth & 180 kHz \\ Noise power spectral density & \(-170\) dBm/Hz \\ Maximum transmission power & 10 dBm \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation parameters.  
Figure 2 plots the horizontal locations of the UAV. We can observe that the UAV gradually flies to EVE at the starting node to reflect the signal near EVE and reduces the power that can be received by the EVE. After departure, UAV flies closely to GU to enhance the signal power received at GU. In the straight line among EVE, BS and GU, UAV flies to the closest position of EVE to reflect the signal energy more precisely. At the same time, the RIS reflection reduces the power to the EVE and ensures the SINR of GU.  
In Figure 3, it can be observed that the maximum secure transmission rate can be obtained for the proposed algorithm compared with the other schemes. When there is no trajectory optimization and only straight-line flight, the secrecy rate will decrease. When the phase is random and only directional reflection, the secure rate will also decrease. The transmission rate of secure information can be improved by approximately 81% compared to that under the random phase. In addition, we can also observe that the secure transmission rate is lowest when the relay reflection without RIS and the BS transmits the signal directly to GU. We can see that when the BS does not use beamforming, the secure transmission rate is lower than that of the eavesdropping elimination method. The eavesdropping elimination method is correlated with the eavesdropping channel of the RIS, and less correlated with the channel from the BS to the RIS. Therefore, the performance without beamforming is only slightly lower than that of the eavesdropping elimination method.  
In Figure 4, it is obvious that the maximum average secure transmission rate increases with the increase in the maximum transmission power and the number of elements. It can be observed that RIS has the greater impact on the secure transmission rate than that of the transmit power. However, when the transmit power is high enough, the average secure transmission rate will increase slowly, limited by the channel power gains. The secrecy rate tends to be flat when the power reaches 2.5 dbm.  
Figure 2: The trajectory of the UAV.  
Figure 5 shows the secure transmission rate versus the number of reflection units for different methods. It can be seen that the performance of all three methods improves as the number of reflected units increases. The performance of Algorithm 1 is better than the eavesdropping elimination method due to the beamforming enhanced state of the reflection channel. Its performance reaches an upper limit when the number of reflection units reaches 60. The performance of the random phase is worse than that of all the other methods, and its performance improvement is less than that of the other two when the number of reflection units is increased by the same amount.  
Figure 4: Maximum secure transmission rate with the power and the number of elements.  
Figure 3: Maximum secure transmission rate with iteration times.