# Research on High-Efficiency Routing Protocols for HWSNs Based on Deep Reinforcement Learning
## 5 Algorithm Simulation and Result Analysis
### Simulation Experiment of Transmission Counts with Free-Space Energy Model in HWSNs  
According to the classic energy equation for wireless sensor networks, under the same node and operation round conditions, a higher number of transmissions using the free-space energy model indicates a more effective energy efficiency optimization strategy for HWSNs. As depicted in Figure 12, the HDQN algorithm is compared with five other algorithms (DEEC, 2L-HMGEAR, NCOGA, SEP, and EEHCHR) in terms of the number of transmissions using the free-space energy model across heterogeneous node counts of 100, 200, and 300. This comparison examines how the number of transmissions using the free-space energy model varies with an increasing number of nodes for these six algorithms. In the scenario with 300 nodes and identical initial conditions, the DEEC algorithm exhibits the lowest number of transmissions using the free-space energy model. The 2L-HMGEAR, NCOGA, and SEP algorithms show similar transmission counts, which are slightly lower than those of the EEHCHR and HDQN algorithms. Notably, the number of transmissions using the free-space energy model for all six algorithms increases steadily with the number of nodes, which is consistent with the expectation of increased communication activity as the network size grows. Importantly, the proposed HDQN algorithm consistently ranks first in the number of transmissions using the free-space energy model across different node counts (100, 200, and 300 nodes). This indicates that the HDQN facilitates more transmissions under the same energy conditions, thereby demonstrating superior energy efficiency optimization. This performance underscores that the HDQN algorithm enhances energy efficiency optimization in various application scenarios of HWSNs and exhibits robust performance across different network sizes.  
Table 7 illustrates variations in the number of transmissions using the free-space energy model across different scenarios, each involving varying numbers of heterogeneous nodes. Notably, the EEHCHR algorithm exhibits a relatively higher number of transmissions under the free-space energy model in all three scenarios, reaching 257,446 transmissions when the scenario includes 300 heterogeneous nodes. This observation suggests that the EEHCHR algorithm prioritizes direct information transmission between nodes that are spatially proximate to each other, thereby minimizing energy expenditure and enhancing data transmission efficiency. In contrast, the proposed HDQN algorithm achieves the highest number of transmissions using the free-space energy model across different node counts, with a remarkable 260,918 transmissions when 300 nodes are present. This represents a substantial 3472 transmissions more than the second-best EEHCHR algorithm, corresponding to a 1.35% improvement. These findings indicate that the HDQN algorithm not only effectively enhances information transmission efficiency in HWSNs but also demonstrates a robust adaptability across diverse scenarios characterized by varying numbers of heterogeneous nodes.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline  & \multicolumn{3}{c}{**Energy Consumption After 700 Rounds (mJ)**} \\ \cline{2-4}
**Algorithm** & **For 100 Nodes** & **For 200 Nodes** & **For 300 Nodes** \\ \hline EEHCHR & 4189.5 & 8314.2 & 13,354.8 \\
2L-HMGEAR & 2120.3 & 2296.4 & 3534.4 \\ NCOGA & 1657 & 3742.1 & 5056 \\ DEEC & 1691.2 & 3539.5 & 4897.7 \\ SEP & 6369.1 & 11,541.8 & 16,596 \\ HDQN & 6626.3 & 12,486.5 & 17,667.3 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Simulation data of energy consumption with varying node numbers in HWSNs (unit: mJ).