# Fuzzy-Logic Based Distributed Energy-Efficient Clustering Algorithm for Wireless Sensor Networks
## 5 Simulation and Analysis
Hence, this kind of CH election based on distances randomness is an applicable method to be used in distributed networks. The proposed EEDCF does not choose the distance as the input of fuzzy variable, which may increase the possibility that some of the CHs are far away from the BS. Instead, this will economize the energy consumption for all the nodes communicating with BS in every CH election. From the experimental results, we can figure out that the consideration regarding the factor of distance from nodes to BS does not effectively reduce the overall energy consumption quite well in the implementation of the distributed clustering algorithm, especially for large scale networks. Network energy consumption is a major factor in reflecting network performance. The system life cycle is also directly affected by the energy consumption of the networks. Figure 11 compares the energy consumption of the three algorithms in Scenario 1. From EADEEG to DFLC, and to EEDCF, the gradient of energy consumption curves is gradually slowing down, which is due to the usage of the fuzzy logic algorithm and increasingly reasonable optimization of CH election mechanism. We also extracted the real-time residual energy data of some designated rounds from Figure 11, and they are shown in Table 6. In the 1500 th round, the total residual energy in EEDCF is 2.94 J more than that in DFLC, and 6.60 J more than that in EADEEG. In the 2000 th round, the total residual energy in EEDCF is 3.05 J more than that in DFLC, and 7.44 J more than that in EADEEG. As we can see, the energy gaps between the three algorithms become bigger and bigger with the increase of round. Moreover, the proposed algorithm considers the load balancing problem in multi-hop communication mode, and introduces neighbor nodes' residual energy as the additional fuzzy input variable, which can balance data forwarding pressure as much as possible to each sensor node in the network, and weaken the influence of the hotspots problem on the network performance. Compared to the two other algorithms, the proposed algorithm gets the lowest energy consumption finally. In Scenario 2, we can get almost the same analysis result from Figure 12, and the gaps of curves slope difference between the three algorithms in energy consumption are even more obvious when compared with that in Scenario 1. Then, we can figure out that, under the conditions of high node density, considering the residual energies of neighbor nodes can effectively optimize the network energy consumption. Further, Table 7 shows the real-time residual energy data of some designated rounds extracted from Figure 12 in detail. Figure 10: Number of round corresponding to different proportions of dead nodes of the network in Scenario 2. Figure 11: Comparison of system energy consumption of the three algorithms in Scenario 1 (The vertical axis denotes the energy of the system, and the horizontal axis denotes the round number). \begin{table}
\begin{tabular}{l c c c} \hline \hline  & **EADEEG/J** & **DPLC/J** & **EEDCF/J** \\ \hline
1000 Rounds & 35.35 & 37.06 & 38.01 \\
1500 Rounds & 16.13 & 19.77 & 22.73 \\
2000 Rounds & 3.79 & 8.18 & 11.23 \\
2500 Rounds & 0.31 & 2.47 & 3.97 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: System residual energy in Scenario 1. Figure 12: Comparison of system energy consumption of the three algorithms in Scenario 2 (The vertical axis denotes the energy of the system, and the horizontal axis denotes the round number). Figure 13 indicates the data transmission result of the three algorithms in Scenario 1. The EEDCF algorithm evenly divides the data fusion and data forwarding tasks in the cluster as much as possible to each node, which can improve load balance of the whole network and prolong the average lifetime of each node. Therefore, the EEDCF obtains the most effective data transmission among the three algorithms.