# Research on High-Efficiency Routing Protocols for HWSNs Based on Deep Reinforcement Learning
## 5 Algorithm Simulation and Result Analysis
### Simulation Experiment of Energy Consumption with Varying BS Positions in HWSNs  
The comparative experiment of BS position changes in HWSNs is designed to verify the robustness of the energy efficiency optimization algorithms. In HWSNs, the positions of BSs may vary depending on different tasks. Under the same number of iterations, if the BS position changes, the proposed algorithm should still be able to operate efficiently and  
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline \multirow{2}{*}{**Algorithm**} & **Total Energy** & **Total Energy** & **Total Energy** & **Total Energy** & **Total Energy** \\  & **Consumption at** & **Consumption at** & **Consumption at** & **Consumption at** & **Consumption at** \\  & **500 Rounds** & **600 Rounds** & **700 Rounds** & **800 Rounds** & **900 Rounds** \\ \hline EEHCHR & 32,552.4 & 35,524.5 & 37,810.5 & 39,188.8 & 40,130.4 \\
2L-HMGEAR & 34,584.7 & 37,835.1 & 39,879.7 & 40,860.8 & 41,409.1 \\ NCOGA & 36,735.3 & 38,905.4 & 40,342.9 & 41,327.8 & 41,836.9 \\ DEEC & 36,155.6 & 38,899.8 & 40,308.8 & 40,932.4 & 41,352.2 \\ SEP & 28,880.9 & 32,622.0 & 35,630.9 & 37,978.7 & 39,596.1 \\ HDQN & 29,136.5 & 32,548.6 & 35,373.6 & 37,435.1 & 38,866.7 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Simulation data of total energy consumption in HWSNs (unit: mJ).  
Figure 9: Comparison of total energy consumption in HWSNs.  
consume less energy, demonstrating its robustness in energy efficiency optimization across various application scenarios of HWSNs. As shown in Figure 10, the HDQN algorithm is compared with five other algorithms to analyze the impact of BS position changes on energy efficiency optimization algorithms in HWSNs. The BS positions are set to (100, 100), (150, 150), and (200, 200). In these three BS positions, all six algorithms run for 700 rounds. The DEEC algorithm exhibits the highest total energy consumption, while the total energy consumption of the 2L-HMGEAR and NCOGA algorithms are similar, increasing as the BS position changes from (150, 150) to (200, 200). The SEP algorithm and the proposed HDQN algorithm show the best performance in terms of total network energy consumption, with the HDQN algorithm maintaining the lowest energy consumption across all three BS positions. The simulation results indicate that the HDQN algorithm demonstrates good robustness in energy efficiency optimization in various application scenarios with different BS positions.  
Table 5 presents the network energy consumption of various energy efficiency optimization algorithms after 700 rounds of operation in HWSNs with different BS positions. The SEP algorithm demonstrates relatively low energy consumption at all BS positions, with a particularly noteworthy performance at the BS position of (100, 100), where it consumes only 35,630.9 mJ, ranking second only to the proposed HDQN algorithm. The HDQN algorithm consistently exhibits the lowest energy consumption across the three BS positions. Specifically, at BS positions of (100, 100) and (150, 150), the HDQN algorithm reduces energy consumption by 257.3 mJ and 709.2 mJ, respectively, compared to the second-ranked SEP algorithm, representing reductions of 0.72% and 1.35%. At the BS position of (200, 200), the performance difference is most pronounced, with the HDQN algorithm achieving a 1392.6 mJ reduction in energy consumption compared to the SEP algorithm, representing a 2.13% reduction. This indicates that the HDQN algorithm employs a specialized energy efficiency optimization strategy for HWSNs and demonstrates good robustness across various application scenarios.  
Figure 10: Comparative chart of total energy consumption in HWSNs with varying BS positions.