# Topology-Aware Anchor Node Selection Optimization for Enhanced DV-Hop Localization in IoT
## 6 Simulation and Results Analysis
### Comparison of Localization Errors in Non-Uniform Network Topologies  
To evaluate the effectiveness of the proposed algorithm, the original DV-Hop [38] and GWODV-Hop algorithms [39] were chosen for comparison. Both the DV-Hop and GWODV-Hop algorithms utilize all anchor nodes for localization, with GWODV-Hop substituting the least squares method with the GWO algorithm to solve the distance equations. In contrast, the proposed algorithm uses the BGWO algorithm to exclude anchor nodes with large distance errors, relying only on a subset of dominant anchor nodes and the GWO algorithm for localization of unknown nodes. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Node deployment & random \\ Monitoring region & 100 m \(\times\) 100 m \\ Sensor nodes & 100 \\ Anchor nodes & 30 \\ Communication range & 20 m \\ Channel Irregularity Degree (DOI) & 0.05 \\ Number of iterations in the GWO & 50 \\ Population size of the GWO & 30 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 3: Three representative non-uniform network topologies. (**a**) C-type network; (**b**) O-type network; (**c**) W-type network. (1) Normalized localization error of unknown nodes  
Figure 4 illustrates the localization errors of unknown nodes for the three comparison algorithms under non-uniform network topologies. As shown in the figure, the original DV-Hop algorithm exhibits the worst localization accuracy in non-uniform networks, while both GWODV-Hop and the proposed algorithm demonstrate significant improvements in accuracy. In C-type and O-type networks, the accuracy of all three localization algorithms fluctuates to varying degrees. Although GWODV-Hop achieves higher accuracy for certain individual unknown nodes, the overall localization error of the proposed algorithm is significantly lower than that of GWODV-Hop. In the W-type network, the normalized localization error of the proposed algorithm fluctuates around 0.5, while some localization results of unknown nodes in GWODV-Hop exhibit larger deviations. The results confirm that network obstacles significantly affect the localization performance of the original DV-Hop algorithm. By utilizing the global optimization capability of intelligent optimization algorithms, localization errors can be minimized. Additionally, applying the proposed algorithm to eliminate anchor nodes heavily influenced by obstacles can further enhance the localization accuracy of unknown nodes. (2) Impact of total number of nodes on localization performance  
Under the simulation conditions outlined in Section 6.1, the total number of sensor nodes in the network was gradually increased from 100 to 160, while other parameters remained unchanged. Figure 5 illustrates the normalized localization errors of each algorithm across the three network topologies. As seen in Figure 5, as the total number of nodes increases, the localization errors of the original DV-Hop, GWODV-Hop, and the proposed algorithm decrease, with the proposed algorithm consistently yielding the lowest error. Specifically, in the O-type network, the increase in the total number of nodes has the most significant impact on localization accuracy, with the rate of error reduction being notably faster than in the C-type and W-type networks. Furthermore, the performance gap between the proposed algorithm and GWODV-Hop is more pronounced in the C-type and W-type networks, but the difference in localization errors gradually narrows in the O-type network. Table 2 presents the average normalized localization errors of the original DV-Hop, GWODV-Hop, and the proposed algorithm across the three network topologies for total node counts ranging from 100 to 160. The experimental results confirm that the localization accuracy of all algorithms is sensitive to changes in the total number of nodes, with the proposed algorithm achieving the best performance across all three network topologies. Figure 4: Normalized localization error of unknown nodes.