# Integrated Evaluation of Reliability and Power Consumption of Wireless Sensor Networks
## 6 Experimental Evaluation
### Models  
To validate the CPN and RBD models presented in Section 4, three experiments were executed. First experiment was carried out to validate the Consumption Application Model (see Section 4.1). In this experiment, we initially implemented a nesC application able to collect and send the temperature to another sensor node. By using EDEN, we generated the power consumption model of this application. Next, we directly measured the power consumption of the nesC application using an oscilloscope and compared the results against ones obtained by simulating the generated model. The results obtained by both methods are presented in Figure 15. The average difference between them was 6.71%. The hypothesis testing produced a \(p\)-value equal to 0.083238. As a consequence, for this experiment, we can assume that both methods return the same values. In the second experiment, we replicated an experiment found in the literature to validate the Consumption Network Model. The analysis carried out by [PERSON] et al. [21] has a WSN with one sink node (at the centre of the WSN), 20 sensor nodes that send a packet every 2 s and the energy level is set to 1 mJ. Regarding the adopted routing protocols, we selected the protocols DIRECT, FLOODING, GOSSIPING and LEACH as they are widely documented and used in WSNs. Besides that, we chose four criteria of analysis: FND (when the first node is dead), 20% (20% of nodes are dead), HND (half of the nodes is dead) and LND (the last node is dead). Figure 16 shows the percentage of the sensors nodes (\(x\)-axis) over the lifetime of the WSN (\(y\)-axis) using different protocols. As shown, the protocol FLOODING had the worst result, because it sends a packet in the broadcast. The protocol GOSSIPING had the second poorest result because it selects the next sensor node randomly. The protocol DIRECT and LEACH had the best results. Protocol DIRECT sends a packet directly to the sink node; however, the farthest nodes die earlier. Meanwhile, protocol LEACH creates clusters periodically in the WSN, balancing the power consumption among the sensor nodes. These results are comparable to ones obtained by [PERSON] et al. [21] except when half of the nodes are dead (HND), in which DIRECT had a better performance than the LEACH. More results about network aspects, such as network size and placement algorithms, were obtained in the sensitivity analysis as shown in Section 6.3. The previous experiment was also used to assess the reliability of the WSN, more specifically, a region with one sensor node located at 100 m from the sink node. First, we evaluated the power consumption of the WSN and, next, we assessed the reliability of the WSN, because the energy level of  
Figure 15: Power consumption of the application. the sensor node was used to calculate the reliability of them. The equation in the following was used to calculate the energy level:  
\[R_{t}=\left(level_{t}-0.5394\right)/0.2788\]  
where \(level\_t\) is the energy level at time \(t\) and the values 0.5394 and 0.2788 were defined by [18]. Additionally, the link communication was considered perfect, and its reliability was set to 1.0. Figures 16 and 17 show the WSN power consumption and the WSN reliability of the same experiment. As expected, the WSN reliability of the protocol FLOODING was the worst (see Figure 17) because the sensor node sends a packet in a broadcast. The protocol DIRECT had the second best result because the sensor node is far from the sink node and dies earlier. If the region was closer to the sink node, the protocol DIRECT could have the best WSN reliability. The protocol LEACH had the best result because it creates clusters: a sensor node (leader of the cluster) receives data from the other, aggregates the data and sends it to the sink node. As the leaders are elected from time to time, this mechanism helps to balance the power consumption. Protocol GOSSIPING was not considered because its reliability has an atypical behaviour: its reliability does not decrease following a pattern over time.