# An Energy-Distance-Balanced Cluster Routing Protocol for Smart Microgrid IoT Sensing Networks
## 4 Algorithm Simulation and Analysis
39
40 end for
```  
**Algorithm 2**LEAD-RP  
The study stipulates that simulations will conclude once the proportion of non-functional nodes hits 95%, allowing for a more precise comparison of the effectiveness of various routing protocols. Within this research, three specific protocols--LEACH, HEED, \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Configuration** \\ \hline Base Station Location & (50 m, 150 m) \\ Energy Coefficient (\(\epsilon\)) & 4 pJ/(bit/m\({}^{2}\)) Node Initial Energy (\(E_{0}\)) & 0.005 J [21] \\ Transmission Energy per Bit (\(ETX\)) & 4 pJ/bit Reception Energy per Bit (\(ERX\)) & 60 pJ/bit \\ Data Fusion Energy per Bit (\(EDA\)) & 5 pJ/bit \\ Data rate (\(r\)) & 250 kbps (IEEE 802.15.4) \\ \(P_{\text{circuit}}\) & 60 mW \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Overview of simulation parameters. and the newly introduced LEAD-RP--are examined and contrasted based on metrics such as overall energy usage, the lifespan of the network, and aggregate data transmission. To reduce the randomness in simulation outcomes, the research sets the network sizes at two scales, with node counts at 100 and 300, providing insights into the protocols' efficiency across different network dimensions. The LEACH protocol was applied to form clusters and elect cluster heads. Cluster members selected their cluster heads based on a combination of factors including the residual energy of potential cluster heads, their distance from the BS, and the density of nodes in the surrounding area. This method ensured a balanced and energy-efficient network structure, addressing potential issues arising under high-node-density conditions. Observations gleaned from Figure 4 in this study provide a detailed comparison of energy efficiency across different networking protocols used in sensor networks, particularly focusing on LEAD-RP compared to the more traditional LEACH and HEED protocols. The data indicates that nodes operating under the LEAD-RP protocol consume energy at a slower rate than those utilizing LEACH or HEED. This reduced energy consumption is crucial as it directly extends the operational life of the nodes, delaying the onset of energy depletion. The improved performance of the LEAD-RP protocol is likely due to its refined cluster head selection process, which strategically incorporates factors such as the residual energy of nodes and their distances from each other, optimizing energy usage across the network. Further analysis provided by Figure 5 underscores the enhanced performance of the LEAD-RP protocol in terms of node longevity. Nodes using LEAD-RP exhibit a significantly extended lifespan before reaching the critical 95% energy depletion threshold, outperforming nodes using the LEACH protocol and showing slight but noticeable improvements over those using HEED. As the node count \(N\) increases, the LEACH protocol's vulnerabilities become more pronounced, with nodes reaching exhaustion between the 300 th and 400 th rounds of operation. On the other hand, the LEAD-RP protocol demonstrates robustness and stability, maintaining a lower mortality rate among the nodes over an extended period. Further insights are provided by Figure 6, which examines the data throughput capabilities of these protocols. Initially, the LEACH protocol may show promising throughput rates; however, this performance quickly diminishes as nodes begin to fail due to rapid energy depletion, significantly impacting the network's overall data transmission capabilities. In contrast, the LEAD-RP protocol, by virtue of its extended node lifespans and stable energy consumption, manages to sustain consistent and higher data throughput throughout the network's operational period. This consist  
Figure 4: Average number of cluster heads per round under different protocols (\(N=300\)). reliability of the network but also supports higher overall performance in terms of data handling and transmission.