# Service-Aware Clustering: An Energy-Efficient Model for the Internet-of-Things
## 3 Performance Evaluation  
Different experiments were conducted to compare the performance achieved by the SAC protocol/algorithm to the family of LEACH protocols/algorithms (LEACH and LEACH-C) and more recent clustering protocols/algorithms, DECSA and MOCRN. The experiments were conducted in a realistic sensor network environment where distributed signaling using Contiki/Cooja and centralized clustering were run in two different threads, but communicating through a sink interface: a SAC thread tasked to execute the SAC algorithm and report to the Cooja thread for routing table set up and a Cooja thread tasked to achieve distributed signaling and packet forwarding. It then reports to the SAC thread for routing configuration computation. Therefore, the experimental sensor network  
Figure 8: The service-aware clustering (SAC) algorithm.  
environment used in this paper mimics the IoT network management model in Figure 3, but with the routing and topology information being exchanged between the cloud of sensor nodes and the gateway through the sink interface. The centralized simulative environment was designed based on the different formulas described in the SAC model and the parameters of the hybrid IoT architecture in Section 2, while the distributed signaling was emulated in a Contiki/Cooja environment using the experimental setup described by Table 2.  
Table 2 above outlines the experiment runtime. In short, unless otherwise specified, the networks are each given a 120-s period to allow for the network to settle; thereafter, the network is run for eight minutes to give a total simulation runtime of 1000 s. Each node will periodically send a packet containing the string \"Hello from node\" as its packet data. Since each node is given 880 s to send the data at a period of 30 s, the nodes will each send 29 packets of data to be collected by the sink. For the various experiments, all of Cooja's existing profiling tools were used as experimentation tools. Emulation timers and node real-time timers were used as experimentation tools for time-sensitive experiments. For discerning between control plane traffic and data plane traffic, the packets were flagged accordingly. The packets would then trigger a counter, which would hold a value that shows how many times a packet of that particular classification occurred as traffic during simulation runtime. For some of the experiments, one single network was considered, and for others, several networks of different sizes were considered with the objective of evaluating the scalability of the different protocols/algorithms. For all networks, we considered 80% of normal nodes (CSN nodes) and 20% of hybrid nodes (HSN nodes). For each beacon interval, called the \"epoch\", a high level description of the sensor network environment mimicking the interplay between the centralized and distributed provisioning processes illustrated by Figure 3 is briefly described as follows:  
For each epoch:  
1. Using the Contiki/Cooja environment, build the signaling tree.
2. Upload topology to the gateway through the sink interface.
3. Compute the efficient routing configuration \(\mathcal{R}_{ef}\) using centralized clustering.
4. Download the routing information in the sensor nodes through the signaling interface.
5. Build forwarding tables on the nodes based on the provisioning information received through distributed signaling.
6. Emulate data forwarding in the Contiki/Cooja environment and record statistics.