# DARAL: A Dynamic and Adaptive Routing Algorithm for Wireless Sensor Networks
## 5 Conclusions  
This paper presents a new routing algorithm focused on the architecture of Smart City, where the locality principle is exploited. We analysed three key parameters for the Smart City, the convergence time of a network, the number of messages necessary to connect a node to the network (control overhead) and the energy consumption during the set-up phase. We carried out intense simulations to analyse and validate the routing algorithm, and to compare it with other well-known algorithms like \(AODV\) and \(RPL\). After analyzing the results in detail, the use of \(DARAL\) reduces the convergence time in small and medium scenarios for different densities, as well as in large scenarios with low and medium densities. For large scenarios with high density, \(O\)-_RPL_ produces the best results, but \(DARAL\) shows better results for different scenarios and under different conditions, being more tolerant and stable to variations in  
Figure 14: Comparison of the energy consumption in small-, medium- and large-size scenarios during the set-up phase. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**ND** & **Algorithm** & **Avg. \(\pm\) dev Small-** & **Avg. \(\pm\) dev Medium-** & **Avg. \(\pm\) dev Large-Scenario** \\ \hline
5 & O-RPL & 7.62e+04 \(\pm\) 5.99e+04 & 1.09e+05 \(\pm\) 7.08e+04 & 3.32e+05 \(\pm\) 2.11e+05 \\
5 & AODV & 3.36e+03 \(\pm\) 817.03 & 8.49e+03 \(\pm\) 1.13e+03 & 1.43e+04 \(\pm\) 955.44 \\
5 & DARAL & 574.88 \(\pm\) 61.14 & 702.17 \(\pm\) 112.57 & 870.02 \(\pm\) 81.90 \\
10 & O-RPL & 1.39e+04 \(\pm\) 3.69e+04 & 7.20e+03 \(\pm\) 1.55e+04 & 4.14e+03 \(\pm\) 611e+03 \\
10 & AODV & 3.31e+03 \(\pm\) 1.08e+03 & 7.88e+03 \(\pm\) 907.87 & 1.44e+04 \(\pm\) 1.09e+03 \\
10 & DARAL & 555.51 \(\pm\) 67.48 & 712.61 \(\pm\) 88.69 & 850.43 \(\pm\) 59.11 \\
15 & O-RPL & 7.89e+03 \(\pm\) 2.49e+04 & 3.78e+03 \(\pm\) 1.18e+04 & 96.15 \(\pm\) 190.41 \\
15 & AODV & 3.29e+03 \(\pm\) 677.98 & 7.25e+03 \(\pm\) 901.97 & 1.42e+04 \(\pm\) 1.04e+03 \\
15 & DARAL & 527.38 \(\pm\) 74.86 & 716.27 \(\pm\) 62.52 & 896.59 \(\pm\) 59.13 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Average energy consumption (mWs) in small-, medium- and large-size scenarios during the set-up phase. the node density conditions. For example, _DARAL_ convergence time remains under 100, 67 and 50 s for large-, medium- and small-size scenarios, respectively. _O-RPL_ shows a wider range between low and high densities, reaching a maximum of 3022.7 s and a minimum of 0.76 s. _AODV_ is also consistent in terms of stability, but results in the worst performance of these experiments. _AODV_ results seem also to be dependent on the number of nodes, scaling from 100-120 to 640-688 s for the different scenarios, and resulting in a better performance for small scenarios with high density, being anyway slightly worse than _DARAL_. Another performance analysis of _DARAL_, which is also based on a comparison between routing algorithms, is the control overhead. The results of this analysis show that _AODV_ and _O-RPL_ need too many messages to form the network graph, requiring more than 1500 messages in some conditions. _DARAL_ needs an average of around 100 messages for large-size scenarios, but being specially optimized for medium density conditions, whereas _O-RPL_ uses a wide range, which goes from 1055 for large-size scenarios to more than 5300 messages for small-size scenarios. It is possible to see the significance of _DARAL_ due to its low standard deviation, maintaining a good performance in terms of messages for the set-up phase, and being the better option for low- and medium-density scenarios. The last analysis is related to the energy consumption, showing an overall better performance of _DARAL_ also in terms of significance. _O-RPL_ shows a high energy consumption under low-density conditions, but with a major improvement under high-density conditions, regardless of the scenario size. _AODV_ shows a number of nodes-related consumption, showing also a certain stability with respect to the density conditions.