## 5 Simulation and Experiment
### Simulation
#### 5.1.1 Simulation and Analysis of ILEACH and TGA Algorithms  
In this section, we verify the advantages of the ILEACH algorithm and TGA algorithm in generating a UAV flight path. Without loss of generality, we took the coordinate data contents of three classical datasets (Solomon benchmark datasets R201, C201, and RC201), 100 nodes in each dataset, to test the performance of the TGA algorithm for the route optimization problem. Among them, the node locations of C201 data are relatively concentrated, while those of R201 data are relatively scattered, and those of RC201 data are uniform. The basic GA algorithm and TGA algorithm were, respectively, run 30 times. Their results are shown in Table 4. The results show that the optimal solution and average solution obtained by the TGA algorithm are better than the GA algorithm. Among them, in the three data sets, the optimal solution of the TGA algorithm is 64.83%, 65.30%, and 73.67% less than the GA algorithm respectively, and the average solution is 71.71%, 71.88%, and 74.36% less than the GA algorithm, respectively. It is because the addition of the local search update mechanism improves the quality of the solution. In terms of convergence rate, the average convergence algebra of the TGA algorithm is less than that of the GA algorithm, and the convergence effect of the GA algorithm is not obvious within 200 generations. This may be because the genetic algorithm is sensitive to the initial solution, and the initial solution of TGA is generated by the TLBO algorithm, which is more accurate than the initial solution randomly generated by the traditional GA algorithm. Figure 10 shows the convergence process of the basic genetic algorithm and TGA algorithm to solve the data sets R201, C201, and RC201. As the number of iterations increases, the total distance of the two algorithms decreases. The TGA algorithm obviously converges within 200 generations, while the GA algorithm has a slow convergence rate, almost no convergence, and the optimization effect is quite different from the TGA algorithm. The simulation results show that the TGA algorithm has obvious advantages in optimization result and convergence rate, regardless of the density of node distribution. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Datasets**} & \multicolumn{4}{c}{**TGA**} & \multicolumn{4}{c}{**GA**} \\ \cline{2-7}  & **Optimal Solution (m)** & **Average Solution (m)** & **Average Convergence Algebra** & **Optimal Solution (m)** & **Average Solution (m)** & **Average Convergence Algebra** \\ \hline
**R201** & 707.5 & 712.1 & 60 & 2011.6 & 2517.3 & 164.7 \\
**C201** & 723.3 & 735.4 & 79.3 & 2084.5 & 2615.5 & 159.7 \\
**RC201** & 696.5 & 701.6 & 87.5 & 2646.2 & 2737.2 & 194.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results obtained using GA and TGA. To verify the advantages of combining ILEACH and TGA algorithms (ILEACH-TGA), we uniformly randomly distributed 200 wireless sensor nodes in an area of 10 km \(\times\) 10 km and used a UAV for data collection. The coordinate of the UAV's take-off point was (5000, 5000). The LEACH and ILEACH algorithms were used for clustering, and UAV path planning was performed with the GA and TGA algorithms, according to the clustering results, respectively. The averaged results of 30 runs are shown in Figure 11.  
Figure 11: Average path length comparison. Figure 10: Convergence comparison for (a) R201); (b) C201; and (c) RC201. It can be seen that the average distance of the planned path by ILEACH-TGA is significantly smaller than the other methods. The average path length of LEACH-GA is the largest, which is slightly larger than that of ILEACH-GA. In the case of using the same path optimization algorithm and only changing the clustering algorithm, the results of ILEACH are better than LEACH. It is because the distance factor from the node to the UAV take-off point is added to the ILEACH algorithm.