## 4 Performance Evaluation
### Simulation  
Simulation experiments were conducted to analyze the performance of REL using the Castalia Framework [32], which is a widely used network simulator for WSNs based on OMNET++ simulator [33]. The simulations were carried out and repeated 20 times with different random seed numbers in order to obtain a confidence interval of 95%. Due to limited available nodes in the testbed, simulation experiments were conducted to evaluate the REL and compare its performance with AODV and LABILE in terms of energy-efficiency, latency and data delivery in a large-scale scenario, _i.e._, using a monitoring area of 100 m \(\times\) 100 m and up to 200 nodes. AODV is a standard reference, where can be considered as a benchmark solution for flat routing protocols and scenarios. The LABILE protocol presents an assessment strategy based on end-to-end link quality, thus making it suitable and essential for assessing and comparing its performance with REL. The values for energy and LQI thresholds in the simulations were collected in the testbed experiments. Table 1 shows the threshold values and other simulation parameters. The topology was generated by using BonnMotion [34] tool, where nodes are uniformly distributed in the simulation. Figure 7: Network lifetime in testbed experiments. (**a**) AODV, (**b**) REL. Similar to LQI and energy thresholds, REL has also a hop count threshold, which cannot be found in the testbed experiments due to of the limited number of nodes. Thus, simulation experiments were performed to find \(HCdiff_{max\_allow}\), which is able to provide a reasonable number of alternate routes without affecting the latency and PDR. Figure 8 shows PDR for different values of \(HCdiff_{max\_allow}\), which ranges from 2 to 10 hops. All possible values have a PDR higher than desired, _i.e._, 80%. There is a need to choose a suitable value for \(LQI_{th}\), which creates a large number of possible routes to be used for the load balancing scheme. However, values higher than 6 hops create more routes and the signaling overhead can have an effect on the network lifetime and latency. On the basis of our results, the most suitable values for \(HCdiff_{max\_allow}\) are 2 and 4 hops. In the case of our simulation experiments, we chose \(HCdiff_{max\_allow}\) of 4 hops to avoid a small number of alternate routes. The value 4 is able to consider more routes and achieve a better PDR result, as shown in Figure 8. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline Simulation Area & 100 m \(\times\) 100 m \\ Total Number of Nodes & 100 \\ Simualtion Time & 60 min \\ Basestation Location & (50, 50) \\ Topology & Uniform \\ Inter Packet Interval & 2 s \\ Initial Energy & 18,729 J (2 AA batteries) \\ \(E_{th}\) & 2 \\ \(LQI_{th}\) & 220 \\ \(HCdiff_{max\_allow}\) & 4 \\ Radio Model & CC2420 \\ \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 8: Simulation results of \(HCdiff_{max\_allow}\). Starting with the scenario of Table 1, other configurations were setup to assess the performance of REL compared with AODV and LABILE. The additional scenarios included configurations that changed the number of nodes to 20, 40, 60, 80, and 200. The purpose of this variation was to have scenarios with different node traffic demands as expected in real IoT systems. During our data analysis, the scenario with 20 nodes was used to check the accuracy of the simulation results, by comparing them with the testbed experiments. Additionally, the scenarios that have a different number of nodes create alternate routes that are useful to evaluate the load balancing and energy-efficiency mechanisms. The performance of REL was compared with AODV and LABILE in terms of network lifetime, latency and PDR. The WSNs/IoT applications have typically heterogeneous traffic characteristics, which can be file transfer or sensing data. Given this fact, protocols developed for these scenarios should regard the latency as an important metric.