# Research on Optimization of Target Positioning Error Based on Unmanned Aerial Vehicle Platform
## 5 Simulation Experiment  
In order to verify the effectiveness of the improved dung beetle algorithm proposed in this study in enhancing the target positioning accuracy of UAVs, the Particle Swarm Optimizer (PSO), the Sparrow Search Algorithm (SSA), the Gray Wolf Optimizer (GWO), and the original dung beetle algorithms (DBO) are added to compare the optimization-seeking effects. This experiment is based on the Windows 11 operating system and the Matlab R2023b simulation platform. The constants are set to k = 0.1, b = 0.3, S = 0.5. The population size was set to 30, and 200 algorithm iterations were used in order to verify the reliability of the simulation results. In order to visualize the performance of each algorithm, the average of 100 Monte Carlo simulation results is taken to plot the change curve of each algorithm's objective function with the increase in the number of iterations, as shown in Figure 5.  
Figure 5 shows that although the CCDBO algorithm has a large value for initial adaptation, it converges rapidly during iteration and finally obtains the global optimal solution with the least adaptation. The results are better than those of the other optimization algorithms. The results of the objective function fitness values and the tuned optimal parameters for the DBO, CCDBO, GWO, PSO, and SSA algorithms with iterations of 100 and 200 are presented in Tables 1 and 2. Figure 4: CCDBO flowchart. In order to intuitively show how the CCDBO algorithm enhanced the target positioning accuracy of the UAV, this study adopts the Monte Carlo statistical method to simulate and analyze. We set each relevant parameter of the UAV as shown in Table 3 and measured a single target point. We employed the following procedure: (1) Firstly, the target point was measured without reference to the error, and the error-free latitude and longitude coordinates of the target point were obtained as in Figure 6a; the latitude and longitude were counted separately, and the statistical results are shown in Figure 7a. (2) The random number function provided by Matlab was used to generate the error terms obeying the respective probability distributions, (3) substituting the generated errors into Equation (14) to obtain the standard deviation of the errors of the target point, and conducting 10,000 simulations of the target point to obtain the unprocessed data and (4) processing the results according to the principle of equal influence and the original and improved dung beetle algorithms to deal with the errors, respectively, where the population size of dung beetles was 30 and 200 algorithmic iterations were used. (5) Substituting the generated error into Equation (14) to obtain the total error at the target point and performing 10,000 simulations of the target point to obtain the unprocessed data. (6) Processing the results according to the principle of equal influence, the dung beetle optimization algorithm, and the improved dung beetle algorithm for error processing, respectively, which correspond to Figures 6b-d and 7b-d, where the dung beetle population size is set to 30, and the number of algorithm iterations is 200. First, calculate the latitude difference and longitude difference between the simulation point and the true value point, then convert the difference to distance, and at the same time, calculate the straight line distance between the simulation point and the true value point; the calculation result is shown in Figure 8. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Number of Iterations** & **DBO** & **CCDBO** & **GWO** & **PSO** & **SSA** \\ \hline
100 & 1.46451 & 1.41776 & 1.44366 & 1.44158 & 1.48515 \\
200 & 1.43867 & 1.41086 & 1.42981 & 1.43327 & 1.44003 \\ \hline \end{tabular}
\end{table} 
Table 1: Statistical analysis of the objective function. Figure 5: Average simulation results.