# An Energy-Efficient Approach to Enhance Virtual Sensors Provisioning in Sensor Clouds Environments
## 5 Performance Evaluation  
To evaluate ACxSIMv2, we have implemented a middleware, using Java language, according to the architecture described in Figure 8. The middleware is modularized to facilitate the sharing of its modules between different computers (servers). However, ours test have been performed on an Ubuntu Linux Operational System, running in VirtualBOX VM, with 8 GB of memory RAM.  
In Figure 8, the back-end module has two main components: a server and a database. The server receives the users queries and searches for virtual sensors already registered in the database. It is also responsible to instantiate ACxSIMv2 module when provisioning is necessary. ACxSIMv2 communicates with sensor layer via drivers located in the driver layers. For each WSN there must be a driver responsible to interface the WSN's sink node. In this work, as we intend to evaluate ACxSIMv2 in scenarios with a large number of nodes, we choose to simulate WSN, using Sinalgo Framework ([[https://sourceforge.net/p/linalg/wiki/Home/](https://sourceforge.net/p/linalg/wiki/Home/)]([https://sourceforge.net/p/linalg/wiki/Home/](https://sourceforge.net/p/linalg/wiki/Home/))). We have implemented a drive to interface Sinalgo simulations.  
Although we have used a simulated WSN, the nodes generates real data obtained from two different datasets: (i) Intel Lab Data ([[http://db.csail.mit.edu/labdata/labdata.html](http://db.csail.mit.edu/labdata/labdata.html)]([http://db.csail.mit.edu/labdata/labdata.html](http://db.csail.mit.edu/labdata/labdata.html))); and (ii) Green Orbs Dataset [56; 57]. Intel Lab dataset consists of the measurements of 54 sensor nodes measured every 31 s between 28 February and 4 April 2004. The Green Orbs Dataset contains the measurements from 271 nodes taken from sensor nodes deployed in a forest during 3-8 August 2011. For both datasets, we have considered the temperature, humidity, light, and battery voltage values. However, all nodes do not have the same number of measurements (possibly due to errors or failures in the sensor-reading process). Therefore, to properly evaluate the performance of the proposed solution, the same number of measurements is considered for each node. We have taken the first 5000 measurements for the Intel Lab dataset, and the first 248 for the Green Orbs. The original datasets contain missing or outliers/noisy values, which were interpolated with the average of the values from the previous and subsequent measurements. The summary of the deployments is shown in Table 2.  
Figure 8: Middleware modularized architecture  
We have first evaluated ACxSIMv2 itself, focusing on how the performance metrics are affected by changes in the values of \(THRESHOLD\) parameter. Then, we have compared it with our previous work (ACxSIMv1) to verify how the new approach enhanced the clustering and sensor node selection process. Finally, we also have compared ACxSIMv2 with LEACH protocol [30]. In the LEACH protocol, only cluster heads communicate with the sink node, and each sensor node has probability \(P\) of being elected cluster head. The cluster heads receive all measurements from nodes in their clusters and generate an aggregate value from them. In this work, the _mean_ is considered as the aggregation function. LEACH is considered because it is a classical protocol for cluster formation in traditional WSN. The single-hop (direct) communication [58] was used as a benchmark case. In the single-hop communication, each node transmits its measurements directly to the sink node. Considering the measurements transmitted by each node in the Intel Lab Dataset, the total energy consumption in the single-hop communication was 1122.92 mJ, and the total number of sent packets were 270,000. In the Green Orbs dataset the total energy consumption was 279.51 mJ, and the total number of sent packets were 67,208.