# A Hybrid Unequal Clustering Based on Density with Energy Conservation in Wireless Nodes
## 3 The Proposed HCD Algorithm
### Protocol Performance
#### 3.2.1 Cluster Initialization
Since the main aim of the proposed protocol was to increase the maximum lifetime of the network by eliminating maximum control messages and reducing overhead which leads to the reduced energy consumption of networks nodes. The number of rounds in a major slot and the number of major slots in data transmission should be optimized. In order to determine the abovementioned optimized numbers, the simulation was performed several times. Considering the structure of the proposed method, we preferred to set the amount of the mentioned parameter to the highest value of FND. According to Figures 5 and 6 we considered the count of rounds as 6 and the count of the major slot as 7. The optimum FND average was obtained in different simulations. According to the simulation results, it can be seen that each data transmission stage consists of 7 portions of the major slot including 6 rounds, one CH rotation, and one adjustment route. Overall, during the data transmission stage, data was transmitted in 42 rounds and we aimed to remove the majority of the network overhead. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **The Amount** \\ \hline E\({}_{\text{elec}}\) & 50 nJ/bit \\ E\({}_{\text{fs}}\) & 10 pJ/bit/m\({}^{2}\) \\ E\({}_{\text{mp}}\) & 0.0013 pJ/bit/m\({}^{4}\) \\ E\({}_{\text{DA}}\) & 5 nJ/bit/message \\ Data packet size & 1000 byte \\ Packet header size & 25 byte \\ Control message size & 50 byte \\ RL\({}_{\text{max}}\) & 10–160 m \\ \(\alpha\), \(\beta\) & 0.333 \\ Initial energy & 0.5–1.5 j \\ Number of rounds in a Major slot & 6 \\ Number of Major slots in the data transmission stage & 7 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Parameters used in the simulation. For results and considered parameters refer to Figure 2. Figure 2 demonstrates the protocol performance considering the number of rounds and major slots. According to the results of Figure 5, we set the number of rounds and a major slot in Figure 2.

One of the most important parameters in clustering is to determine the radius. The radius of the nodes in each layer of the proposed protocol is intentionally considered as different sizes. Thus, the value of \(\lambda\) in Equation (4) in the first layer is equal to 1, in the second and third layers is 1.25, and in the fourth layer is 1.75. Thus, the clusters which are closer to the BS are smaller and the CH can have more energy for relaying and routing other CH packets to the BS. To determine the \(RL_{max}\) parameter in the Equation (4) we carried out various simulation runs with different \(RL_{max}\) values to obtain the optimum value for \(RL_{max}\) parameter. Two of the important factors in IoT-based wireless nodes are the number of CH and the size of clusters, which are dependent on the radius of the nodes. The simulation results for different scenarios are shown in Figure 7.

Figure 5: Network lifetime under different rounds in different major slots at data transmission stage for scenario #1 with \(\text{RI}_{\text{max}}=100\) and initial energy = 1 J.

Figure 6: Network lifetime under different rounds in different major slots at data transmission stage for scenario #2 with \(\text{RI}_{\text{max}}=100\) and initial energy = 1 J. ### Network Stability and Network Lifetime

In order to increase efficiency and throughput, we must transmit more data to the BS and, in this case, it is necessary to prevent node death. Therefore, efficiency and throughput can be improved by increasing network stability. In Tables 4 and 5, the performance of the stability period and the network lifetime involving FND, 10% PND, 20% PND, HND, and LND of the protocols was determined for the first and second scenarios. In both scenarios, the proposed protocol had better performance compared to ECDC, HUCL, and EADUC-II algorithms. Our proposed method had significantly improved performance with very high stability in two different spaces. HCD gets help from the information of neighbor nodes for clustering and uses intercluster and intracluster as well as multihop transmission appropriately.