## 5 Optimization Results
However, the lack of flight time causes the UAV to lose the tendency to dive for 50 time slots, which only has 1.37 bits/s/Hz average capacity, and the average capacity comparison is demonstrated in Table 4.  
Figure 5: The comparison of the UAV trajectories between PPO and DQN methods for different flight times without fog. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Flight Time** & **RIS (bits/s/Hz)** & **DF (bits/s/Hz)** \\ \hline PPO \(N=150\) & 4.05 & 2.64 \\ PPO \(N=100\) & 3.91 & 2.52 \\ DQN \(N=150\) & 3.87 & 2.49 \\ DQN \(N=100\) & 3.77 & 2.46 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of 150 and 100 flight times without fog. Figure 7 demonstrates the comparison of the results with 150 time slots between the different fog conditions, whose radii are 15 m and 20 m. Compared to DQN, PPO achieves better performance due to avoiding overestimation in Q-networks. Under the same total flight time, all of the trajectories show the tendency to avoid to entering the fog even when the radius of fog is changed and also show the tendency to decrease to the lowest altitude limitation. Table 5 shows the comparison of average capacity among the trajectories when different fog conditions are assumed. We can see that due to avoiding the fog, the UAV moves far from the area with maximum average capacity, the trajectory with the highest average capacity is reached when the fog does not exist, and the fog with the largest radius causes the lowest average capacity of trajectory. \begin{table}
\begin{tabular}{l c} \hline \hline
**Fight Time** & **Average Capacity (bits/s/Hz)** \\ \hline PPO \(N=150\) & 3.92 \\ PPO \(N=100\) & 3.77 \\ PPO \(N=50\) & 1.37 \\ DQN \(N=150\) & 3.77 \\ DQN \(N=100\) & 3.64 \\ DQN \(N=50\) & 1.17 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of 150, 100, and 50 flight times with \(\tau_{f}=15\) m fog. Figure 6: The comparison of the UAV trajectories between PPO and DQN method for different flight time with fog \(r_{f}=15\) m.  
Figure 8 exhibits the trajectories comparison with altered flight time as 100 and 60 in the presence of fog with \(r_{f}=15\) m located at \((0,20,65)\) m. The starting and ending points of the UAV are also adjusted to \((-20,30,80)\) m and \((20,30,80)\) m, respectively. As shown in Table 6, the PPO-based optimization method maintains its ability to make UAV trajectory operating avoiding and diving, yielding the average capacity of 3.91 bits/s/Hz and 3.09 bits/s/Hz for 100 and 60 time slots, respectively. On the other hand, the DQN strategy, while effective, demonstrates a lower performance with average capacities of 3.48 bits/s/Hz and 3.02 bits/s/Hz for 100 and 60 time slots, respectively. The results underline the efficiency of the proposed PPO-based trajectory optimization, validating its ability to better avoid overestimation for improved performance. Figure 8: The comparison of the UAV trajectories between PPO and DQN methods with different flight time slots, where \(G[1]=(-20,30,80)\) m and \(G[N]=(20,30,80)\) m.  
Figure 7: The comparison of the UAV trajectories between PPO and DQN method for 150 flight time with different fogs. As shown in Figure 9 and detailed in Table 7, the PPO optimization method still outperforms DQN under the conditions of irregular fog, achieving an average capacity of 4.31 bits/s/Hz and 3.73 bits/s/Hz for 150 and 100 flight time respectively. As comparison, the DQN method still achieves lower average capacities, reaching only 3.61 bits/s/Hz and 3.51 bits/s/Hz for the same flight time. These results reaffirm the superiority of the PPO method in efficiently learning and converging to an optimal UAV flight strategy. Moreover, these findings underscore the fact that a larger number of flight times (150 compared to 100) provides the UAV with more options for path selection, thereby leading to better performance in both PPO and DQN cases.