# Service-Aware Clustering: An Energy-Efficient Model for the Internet-of-Things
## 3 Performance Evaluation
### Sensor Network Lifetime: Average Lifetime and Scalability  
The sensor network lifetime \(t_{N}\) can be defined as the sum of the initial energy of all sensor nodes divided by the total energy dissipated per node. It can be expressed as follows:  
\[t_{N}=\frac{\sum_{i=1}^{N}E_{i}}{E_{tx}^{CM}+E_{sens}^{CM}+(m+l)E_{Tx}^{CH}+E_ {DA}*k*m+E_{tx}^{CH}} \tag{8}\]  
Figure 12: Energy consumption. (**a**) Alive nodes: BS at the center; (**b**) Alive nodes: BS is outside. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**BS at the Center** & **DECSA** & **MOCRN** & **SAC** \\ \hline FND (round) & 332 & 391 & 448 \\ LND (round) & 728 & 831 & 968 \\ \hline
**BS Outside** & **DECSA** & **MOCRN** & **SAC** \\ \hline FND (round) & 255 & 298 & 361 \\ LND (round) & 556 & 746 & 802 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Network lifetime: first node to die (FND) and last node to die (LND). where \(E_{i}\) is the initial energy of each sensor node and Nis the number of sensor nodes in a network. The lifetime of a normal sensor node \(t_{CM}\) and the lifetime of a cluster head node \(t_{CH}\) are given as follows:  
\[ \begin{split} t_{CM}&=\frac{E_{i}^{CM}}{E_{tx}^{CM}+E_ {sens}^{CM}}\\ t_{CH}&=\frac{E_{i}^{CH}}{((m+l)E_{rx}^{CH}+E_{DA}*k*m) +E_{tx}^{CH}}\end{split}  \tag{9}\]  
Objective: We conducted a set of experiments to evaluate the average lifetime of the sensor networks of different sizes ranging from 100 nodes-500 nodes. We also evaluated the time till the last node dies (LND) for the same network configurations and the scalability of the algorithms when applied to a 500-node network and when scalability is expressed in terms of the optimal number of clusters. Network: Sensor networks of different sizes ranging from 100-500 nodes were considered for these experiments with the base station located at the center of the network. Results: The results presented in Figure 13a reveal that the average network lifetime achieved by SAC for 100 sensor nodes is 10.8% higher than DECSA and 2.4% higher than MOCRN. Moreover, SAC's average lifetime was 23.7% higher than DECSA and 5.3% higher than MOCRN when the number of nodes was increased to 500. The reason is that sensor nodes are able to communicate with their cluster heads through a short distance due to the uniform distribution of cluster heads within the network. Finally, the method used for the selection of cluster heads considered the node location and the residual energy of the nodes, while DECSA selects cluster heads based on residual energy only, and MOCRN is based on distance. A similar performance pattern was revealed by Figure 13b for the last node to die, showing that SAC outperforms the two other algorithms. The optimal number of clusters is another important parameter, which can be determined by deriving the total energy consumed in the whole network \(E_{total}=KE_{cluster}\) with respect to the the number of clusters \(K\). In our case, the energy consumed in a cluster consists of the energy consumed by the cluster head \(E_{H}\), and the member nodes \(E_{N}\) in a given round is given by \(E_{cluster}=E_{H}+(C_{k}-1)E_{N}\), while the total energy consumed in the whole network is expressed by \(E_{total}=KE_{cluster}\). Assuming that \(E_{total}\) is the total energy cost for sensor nodes to transmit a bit of data to their respective cluster heads and \(E_{F}=\frac{E_{D}A}{k}\) the energy dissipation for aggregating one bit of data packets, the total energy \(E_{total}\) will be expressed by:  
\[ \begin{split} E_{total}&=\ 2(V-K)E_{else}+(V-K)\epsilon_{fs} \frac{M^{2}}{6K}+VE_{F}+KE_{elc}+K\epsilon_{amp}d_{toBS}^{4}\end{split}  \tag{10}\]  
Figure 13: Average network lifetime. (**a**) Average network lifetime; (**b**) Last node to die (LND). The optimal number of clusters is determined by setting the derivative of \(E_{total}\) with respect to K to zero. This gives:  
\[