# Service-Aware Clustering: An Energy-Efficient Model for the Internet-of-Things
## 3 Performance Evaluation
### Sensor Network Lifetime: First and Last Node to Die  
Objective: This experiment was conducted to evaluate the network lifetime when defined in terms of the first node to die (FND) and the last node to die (LND) and the relative efficiency of the different protocols in terms of the number of nodes alive during the simulation period.  
Network: The network model used consisted of 100 nodes randomly distributed in a 100 m \(\times\) 100 m sensing area with 80 normal nodes and 20 hybrid nodes, where each hybrid node consumes 0.5 J more than the energy of a normal node. The initial energy of each node is 1 J, and the simulation time (round) runs for 1000 s. The average energy consumption of the nodes is taken every 100 s. The receiving and sending power of each node is 0.360 W and 0.395 W. The same parameters are used for all of the protocols. Two network configurations with the base station located differently were considered in order to evaluate the impact of the communication distance between the nodes and the base station on the network lifetime: one configuration with the base station located at the center of the network area and another one with the base station located outside the network area.  
Results: The results are presented in Figure 12 and Table 3. Figure 12 reveals that in general, the three protocols dissipate their energy using a similar pattern for both network configurations, with DECSA being the most energy-hungry protocol, followed by MOCRN and, lastly, SAC. The results  
Figure 11: Total energy consumption. (**a**) 50-node network; (**b**) 250-node network.  
Figure 10: Energy consumption per round. (**a**) 50-node network; (**b**) 250-node network.  
in Table 3 reveal a similar energy dissipating pattern for the LND and FND performance parameters. It can be seen from the table that when the base station is first placed at the center of the network, the first nodes die (FND) at the 332 th round in DECSA, 391 th round in MOCRN and at the 448 th round in SAC. Similarly, the last nodes die (LND) at the 728 th round, 831 th round and 968 th round in DECSA, MOCRN and SAC, respectively. It can be observed that with the base station located at the center of the network, the difference between the lifetimes of the three protocols is not significant due to the short communication distance between nodes and the base station. Thereafter, the base station was placed outside the network area at coordinate (50,180) m. Table 3 revealed in this case that the first nodes died at the 255 th round in DECSA, at the 298 th round in MOCRN and at the 361 th round in SAC, while the last nodes died at the 556 th round, the 746 th round and the 802 th round in the DECSA, MOCRN and SAC protocols, respectively. The two network configurations revealed the relative efficiency of SAC compared to DECSA and MOCRN. Such relative efficiency is a result of both service awareness and the application of a CH-to-CM cluster association model, where SAC uses the received signal strength (RSS), while MOCRN uses the hop count and DECSA the distance.  
It can be seen from the table above that SAC runs more rounds before the first and last node dies. The reason is that our algorithm considered parameters such as the current energy of the sensor nodes, service differentiation and the distance between the nodes during the election of new cluster heads. Hence, it performs better than the other two protocols.