## 5 Simulation and Results Analysis
Figure 2: First node death when parameters \(\rho\) and \(\gamma\) are varied. (**a**) The value of \(\rho\) varies from 0.2 to 3; (**b**) The value of \(\gamma\) varies from 0.2 to 0.8. Meanwhile, it can be noted that EDCA-H can obtaina stabler period than LEACH-C and SEP with the increase of \(\rho\) and \(\gamma\). For multi-level heterogeneous networks, we define that the nodes' initial energy is distributed randomly in the range of \([E_{0},3E_{0}]\), where normal nodes are equipped with initial energy \(E_{0}\). In addition, the total initial energy of the different level heterogeneous networks remains similar in each scenario. Figure 4 shows the comparison of the number of active sensor nodes in each round. A sensor node is considered as active if its residual energy is not zero and also can communicate with the adjacent nodes within its communication range. Sometimes a few CHs die quickly due to improper load balancing. As a result, a few sensor nodes are unable to find any CH within their range, though the sensor nodes still may have some residual energy. It can be observed that our proposed method can obtain a longer lifetime than other protocols. Figure 3: 10% nodes die when parameter \(\delta\) and \(\gamma\) are varying. (**a**) The value of \(\rho\) varies from 0.2 to 3; (**b**) The value of \(\gamma\) varies from 0.2 to 0.8. As the LEACH algorithm does not consider the difference of nodes' initial energy in heterogeneous wireless sensor networks, it makes good use of additional energy from the advanced nodes. The stabilization period is very short in DCHS and the nodes died according to a fixed rate. We find that our algorithm achieves the highest lifetime compared with the other approaches. Specifically, our algorithm improves the lifetime by 17.83% compared with DCHS and 8.79% compared with SEP. The improvement is less significant compared with SEP because SEP divides the area into several sectors in order to minimize the transmission distance from sensors to CHs as well as to balance the cluster size. However, EDCA-H can outperform LEACH-C in terms of effective amount of data as shown in Figure 5.  
In addition, we investigate the number of active nodes under the condition of different network size as shown in Figure 6. When the number of nodes increases in the initial deployment, the number of active nodes fluctuates within a narrow range for EDCA-H. This is because the node's sensing distance and the area being monitored are fixed, and the number of active nodes for covering the entire network should not vary much. However, due to the lack of an effective mechanism which can make most of redundant nodes around the border of clusters turn to a sleep state, the number of border nodes increases as the number of nodes in the initial phase increases. Then, relatively  
Figure 4: Number of active nodes over time. Figure 5: The number of messages received by base station over time. many more redundant nodes are distributed around the edge of clusters consume more energy than EDCA-H.  
As can be seen from Figure 7, the number of active nodes demonstrates different degrees of decline as the sensing distance increases to ensuring a high coverage ratio for the whole network. This is because the larger the distance between sensing nodes, the greater the coverage of a single node is. Moreover, to preserve the network coverage, a smaller number of dead nodes is not as as important as a more even distribution of dead nodes. EDCA-H can make use of a rather smaller number of active nodes to achieve a highly valid coverage area. We also see that the number of active nodes in SEP decreases rapidly when the nodes' sensing distance increases. In the scenario of 100 sensors initially distributed in the network, the proportion of active nodes in EDCA-H is less than LEACH-C by about 8.37%, and also less than SEP by about 47.5%.