## 5 Proposed Dynamic Cluster Head Election Algorithm
### Proposed Dynamic Re-Clustering and Self-Organization Method
#### 5.2.2 Dead Nodes and Re-Clustering Organization
On the other hand, the LEACH protocol calculates and compares the remaining energy for a CH candidate with all other sensor nodes, causing shortening of the network lifetime and adding more burdens to the network. On the other hand, the LEDCHE-WSN algorithm checks the remaining energy only to ensure that a CH candidate is alive, without adding a burden in calculation and comparison for the remaining energy of the CH candidate with all the other sensor nodes. As a result, the experiments in the coming sections prove the simplicity and lightness of the proposed algorithm compared to the most recent studies. #### 6.2.1 Energy Consumption and Network Lifetime

The total energy consumption measures the energy consumed by each node in forwarding packets to sink nodes, which indicates the network lifetime wasted by the protocols. The calculation of Average Energy Consumption uses Equation (6). \[\text{Average Energy Consumption}[\text{j}]=\frac{\text{Total Energy consumption}}{\text{Total Number of received packets}} \tag{6}\]

Figure 7 plots the total energy consumption per node, including the nodes ID. As may be seen, it can be noted that the proposed LEDCHE-WSN protocol reduced the total energy consumption of the sensor nodes by approximately 32% when compared to the LEACH protocol, and 8% when compared to the FBCFP protocol for the 100 \(\times\) 100 m network size. This can occur for several reasons. First, it can occur due to deleting failed or dead nodes from the network topology during the re-clustering process to address the black holes and routing delay problems, which was resulting in a waste of time and energy due to additional control messages for useless nodes, if they are not deleted from the topology list. Second, it can happen due to relieving regular nodes from the processes of selecting the next CH node. Instead, it was assigned all the previous functions to the rechargeable SN nodes, contrary to what happened in the previous studies, especially in the FBCFP protocol. Finally, the reduced energy consumption could be due to the fact that, checking \begin{table}
\begin{tabular}{c c} \hline \hline
**Value** & **Parameter** \\ \hline CARRIER\_SENSE\_ONLY & CCA \\ \hline \(-95\) & Packet Reception Power Threshold (dBm) \\ \hline \(-85\) & Receiver Sensitivity (dBm) \\ \hline \(100\) & Sensor Range (m) \\ \hline \(250\) & Data Rate (Kbps) \\ \hline \(1200\) & Simulation Time (s) \\ \hline NetSim & Simulator \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._the remaining energy in LEDCHE-WSN is performed only to ensure that, the CH candidate is alive. Whereas the FBCFP and LEACH protocols calculate and compare the remaining energy for a CH candidate with all other sensor nodes, causing in shortening the network lifetime and adding more burdens to the network. This figure presents the total energy consumption for each node when the last node of the LEACH protocol are dead, and the simulation time is finished (1200 s is the simulation time, as shown in Table 2). A good load balance is estimated inside the proposed protocol by monitoring the total energy consumption for each node. From Figure 7, it is observed that the total energy consumption in the proposed protocol, until the simulation time is finished, is much more regular and the energy is distributed more equally among network sensors than total energy consumption for the benchmarks, which means energy distribution in the proposed protocol is better, therefore, proves the efficiency of the proposed protocol. According to [18], considering results for 100 nodes, the HEED protocol improves the LEACH protocol network lifetime by 8%, the FLCFP protocol improves the LEACH by 10%, and the FBCFP protocol improves the LEACH by 25%. This means that the proposed protocol LEDCHE-WSN overcomes the performances of LEACH, HEED, FLCFP, and FBCFP in terms of network lifetime.