mDARAL: A Multi-Radio Version for the DARAL Routing Algorithm

Smart Cities are called to change the daily life of human beings. This concept permits improving the efficiency of our cities in several areas such as the use of water, energy consumption, waste treatment, and mobility both for people as well as vehicles throughout the city. This represents an interconnected scenario in which thousands of embedded devices need to work in a collaborative way both for sensing and modifying the environment properly. Under this scenario, the majority of devices will use wireless protocols for communicating among them, representing a challenge for optimizing the use of the electromagnetic spectrum. When the density of deployed nodes increases, the competition for using the physical medium becomes harder and, in consequence, traffic collisions will be higher, affecting data-rates in the communication process. This work presents mDARAL, a multi-radio routing algorithm based on the Dynamic and Adaptive Radio Algorithm (DARAL), which has the capability of isolating groups of nodes into sub-networks. The nodes of each sub-network will communicate among them using a dedicated radio frequency, thus isolating the use of the radio channel to a reduced number of nodes. Each sub-network will have a master node with two physical radios, one for communicating with its neighbours and the other for being the contact point among its group and other sub-networks. The communication among sub-networks is done through master nodes in a dedicated radio frequency. The algorithm works to maximize the overall performance of the network through the distribution of the traffic messages into unoccupied frequencies. The obtained results show that mDARAL achieves great improvement in terms of the number of control messages necessary to connect a node to the network, convergence time and energy consumption during the connection phase compared to DARAL.


Introduction
The rapid growth of Smart Cities among academics and public organizations is leading to numerous research projects [1][2][3]. Its rise involves the development of embedded devices, powering techniques and communication technologies. This work focuses on the challenge that communication technologies represent. This challenge has been intensively studied, as it is a large area of knowledge, which covers every aspect of the communication itself, such as traffic, collision reduction, data rates

Routing Algorithms and Multi-Radio Techniques for WSN
Smart City and Internet of Things (IoT) projects require the use routing algorithms to create the network topology. Several routing methods are used in these scenarios, like multicast, mesh or graphed based, clustering algorithms focused on improving the QoS, the energy consumption, the traffic reduction, the network lifetime, or the network adaptability. Our proposal, DARAL, falls within the clustering-based routing algorithms. Despite the fact that these algorithms are mainly hierarchical cluster-tree algorithms, there also exist interesting alternatives like the one proposed by Liu et al. in [15], Saravanan et al. in [16] or the one proposed by Wang et al. in [17].
It is usual to find two different roles for the nodes of a cluster-based network, a central node or cluster-head and another node, usually called the end-node. Clusters are formed by at least one cluster-head and several end-nodes. In the pure cluster tree algorithms, the cluster-head receives the traffic from all of the end-nodes, and sends it to the proper destination. Furthermore, it is also responsible for the communications between other cluster-heads from clusters with lower/higher hierarchy level. However, clustering mesh-like algorithms allow end-node to end-node communication, reducing the bottle neck in cluster-heads [18]. Therefore, the role selection mechanism is a fundamental aspect of these algorithms. There exist different cluster-head selection mechanisms that cover different approaches depending on different parameters such as location, Link Quality Indicator [19] (LQI) or residual energy [20]. In addition to the diversity of scenarios, there are also a wide number of different approaches to hierarchical cluster-based routing algorithms. Every routing algorithm intends to improve a particular group of parameters related to a specific scenario.
However, Machado et al. discussed in their article the dynamical nature of a Smart City or IoT scenario [21]. Therefore, routing solutions for those applications should take into account different traffic patterns such as one-to-many, many-to-one and many-to-many. Gkelias et al. [22] proposed a many-to-many routing algorithm which uses the multi-user gain capability of Multiple-Input Multiple-Output (MIMO) by controlling the number of ongoing transmissions in order to increase the end-to-end throughput and, thus, to guarantee the required QoS constraints. These concepts have led most of the proposals for Smart Cities or IoT applications to use two well-known routing algorithms: an Ad-Hoc On Demand Vector (AODV) and IPv6 Routing Protocol for Low-Power and Lossy Networks (RPL), due to their appropriate performance in these scenarios. Recent hierarchical routing algorithms such as DARAL [5] have proved themselves as interesting alternatives to the commonly used protocols.
AODV is an on-demand routing algorithm that discovers routes according to the network necessities. It uses request and reply messages to find the shortest path between the sender and the receiver. The network connections create a mesh structure, where all the nodes present the same hierarchy level. On the other hand, RPL routes are formed around a central node, which acts as a network root or network coordinator. This node broadcasts messages with its information in order to expand the network range as well as to keep the nodes connected. However, neither of these two protocols is ideally designed to be used in a Smart City scenario. AODV does not optimize the traffic overhead (the control messages sent to form the routes), obtaining poor energy consumption results, and RPL does not present an efficient consumption either, as it was discussed in [23]. Consequently, DARAL intended to solve the lack of these protocols.
DARAL can be described as a centralized non-beaconing routing algorithm based on dynamic clustering, which is achieved using the sub-network concept. A node must be defined as the network root or coordinator. Its neighbour nodes can connect to it using different roles, either as end nodes (ENs) or as virtual coordinators (VCs). Each VC is responsible for creating and maintaining a sub-network that is identified with a virtual identification (vID) as was described in [24]. A node will be treated as an EN when the link quality between it and its coordinator is higher than a certain threshold. If the quality is worse than this value, the node acquires the role of virtual coordinator, which will try to expand the network, creating a sub-network around it. Each VC can be connected to new ENs or VCs, producing a multi-level hierarchy of sub-networks. Therefore, the network is similar to a tree topology, where VCs are the element of a branch and ENs act as leaves in the tree. The dynamic role selection process (DSRP) is the most important aspect of the network formation. The appropriate number of VCs will depend on the scenario, so the threshold level is adaptable to each deployment.
However, neither AODV, nor RPL, nor DARAL are fully designed to be used under a high-density environment, like Smart Cities or even the IoT. The high spectrum occupancy requires new techniques in order to provide adaptability to the network environment [25,26]. As it was described in [27], new radio developments are based on multi-radio systems, where a radio senses its electromagnetic environment and can dynamically adjust some of its parameters to improve the communication, which leads to a dynamic environment where the routing process acquires a great complexity. The nodes need to be aware not only of their neighbouring initial conditions but also of their current status. New routing protocols need to be developed in order to provide this functionality.
As it has been previously described, the actual routing algorithms have some drawbacks in terms of efficient convergence time, optimized energy consumption and minimal control overhead during the network set-up phase. Therefore, we propose an improvement of the DARAL routing algorithm which takes advantage of multi-radio and multi-channel techniques selection in order to maximize the throughput of the network, maintaining or even improving the convergence time, energy consumption and control overhead during the set-up phase of the network.

Multi-Radio Dynamic and Adaptive Routing Algorithm (mDARAL)
This work focuses on expanding the features of DARP, adapting the DARAL algorithm to make it usable within a multi-radio and multi-channel environment. Based on the analysis of DARP, it has been observed that the clustering and the use of virtual sub-networks is suited very well to a multi-radio environment. Moreover, the development of DARP is focused on Smart Cities, where the density and number of nodes tend to increase, thus the multi-radio scheme seems an interesting option for future developments.
First of all, it has been intended to keep the functionality of DARAL (dynamical clustering based on the link quality between nodes), but including the required mechanisms to make possible handling a second radio. Moreover, other interesting features from DARAL are maintained, like the sub-network structure, the parallel execution on each sub-network and the Dynamical Role Selection Process (DRSP) algorithm used in the original DARP protocol.
Based on DARAL, we have carried out a deep analysis of the multi-radio scenarios, concluding that some of the basic features such as the state machine or the link quality indicator (LQI) based route selection algorithm offer a promising base for the development of a native multi-radio network protocol.
The virtual sub-network concept developed in DARAL is exploited to support a pre-defined control channel. As long as the devices use a multi-radio approach (considering multi-radio as the use of two radios), one of the radios is assigned to this control channel and the other one to the communication within the sub-network, as it is shown in Figure 1. This behaviour involves only virtual coordinators (VCs) being suitable to use both radios regularly. For end nodes (ENs), the second radio is usually switched off and it would be switched on only for some specific operations like channel migration or channel analysis. This modification to be able to use different radios leads to changes in several parts of DARAL and DRSP, which are explained in detail as follows.

Cluster Creation Using the DRSP Algorithm in a Multi-Radio Environment
Despite the fact that the role selection is still based on the link quality indicator between a VC and an EN, mDARAL leads to several minor changes in this process. When an EN starts to send an Association Request message waiting for an answer of a VC, it uses the control channel (CC) as it is set as the standard pre-defined communication channel. VCs include, in the Association Reply message, information about the secondary channel or local channel (LC) use within its sub-network, being the information stored for the selection process. Consequently, once a node has selected a VC as a parent, it turns off its primary radio and sends the Association Reply Acknowledgement through the secondary radio using the local channel information received during the association polling process. Figure 2 shows a graphical UML (Unified Modeling Language) description of the algorithm, including the radio status changes.  Figure 3 shows a particular example, where node EN-A connects to node VC 2 , answering through channel LC 2 . It is important to mention that every Association Reply contains the information about the LC for that VC, thus the node running DRSP stores this information for all the gathered answers while it is trying to get connected to the network.
This strategy tries to reduce the power consumption of ENs, keeping only one radio active during most of the communication time.

Multi-Radio Management in mDARAL
This section details the changes in DARAL in order to achieve a multi-radio version. First of all, each VC creates its sub-network based on a random channel selection, excluding from this random selection the control channel which is isolated from the rest of the available channels for creating virtual sub-networks.
mDARAL has been designed to change the LC under two different scenarios. The former is associated with a timer specifically configured and triggered when the communication link has been lost. The latter is used when degradation in the link-quality is detected. The estimation of the link-quality is not a trivial task in these kinds of networks. The existing solutions applicable to wireless networks are not directly usable in WSNs [28]. Link-quality metrics can be classified in physical, such as Received Signal Strength Indication (RSSI), Signal-to-Noise Ratio (SNR), or LQI, and logical metrics (Packet Success Rate, Require Number of Packets, Expected Transmission Count, among others). The use of physical metrics has several advantages: (i) there are no additional costs because its measurement is directly done by the hardware of the radio; (ii) it is possible to obtain a measurement with a small number of packets for approximating the quality of the link; and (iii) there is no need for broadcasting packets in order to measure the link. Taking into account these reasons, we decided to develope mDARAL using physical metrics.
Srinivasan et al. [29] performed a study for comparing RSSI and LQI as link quality metrics. In this study, they concluded that RSSI is a promising indicator for measuring isolated packets. However, the mean LQI computed over many packets has a better correlation with Packet Delivery Ratio (PDR). In this work, we have decided to use the LQI parameter for getting an average value of the link quality along the network lifetime. For detecting when the LQI falls below a threshold, we use Equation (1). This equation uses the LQI measured during the connection phase, setting it as initial average LQI (avgLQI X ). Using this parameter jointly with a user-defined tolerance rssiPctLst, it is possible to set the minimum LQI level up to the channel migration that should be fired The selection of a new channel has been randomized for this version of mDARAL, excluding the control channel and the current channel from the potential channels. Figure 4 shows how the channel migration process is carried out using two new messages, Channel Change Request, sent by VCs, and Channel Change ACK, sent by ENs (see Appendix A for further information). A VC leads the channel migration, which will only be triggered if a fixed percentage of ENs in the sub-network falls below the minQoS value. This percentage is based on a new parameter, ratSnsngAckRd X , which is used in Equation (2), where numAnswers X is the number of nodes that have answered the request in a certain sub-network X, and (numNodes X ) is the total number of ENs in that sub-network. After starting the channel migration for the LC, the VC should receive the different ACKs from every node in the sub-network, confirming its connection in the new channel Finally, it is necessary to consider the possibility of a connectivity problem due to the channel migration. Therefore, a node, which is connected to a certain sub-network, could request the sub-network configuration anytime, using the CC and the messages VPAN Config Request and VPAN Config ACK (see the Appendix A for further information). In both cases, the VPAN (Virtual Private Ad hoc Network) concept is related to the sub-network created, and it is identified as vID (virtual identification).

Simulation Testbed
The present section describes the simulation environment used for the performance analysis of mDARAL, considering different scenarios and conditions. In order to simulate mDARAL, a widely used simulator like OMNeT++ [30] has been used. OMNeT++ is an event simulator, which is not specifically focused on WSN. Therefore, the well-known communication framework inetmanet [31] has been used. In order to use inetmanet properly, it has been necessary to modify the physical layer, notification board and battery modules, allowing the use of a second radio in the same module. These changes allow the detection of the radio status (sending, receiving, sleeping, disconnected) for each module.
The changes do not provide any special functionality, but they are necessary to operate the simulation model successfully. It is also necessary to remark that OMNeT++ does not provide an efficient utility to simulate multi-channel energy detection and the cost of doing it manually dramatically impacts the performance of the simulator. Due to this issue, this work has fired the channel migration through a timer, and it has selected the channel to migrate randomly from a set of channels, which has covered the 15 channels of IEEE 802.15.4, excluding the CC and the current LC. mDARAL is publicly available in [24].
Based on [1], a Smart City scenario proposal has been developed for the simulations carried out in the present work. The nodes for this Smart City scenario have been randomly distributed. The communication band chosen for these experiments has been the ISM 2.4 GHz from the IEEE802154RadioModel of inetmanet, using its beaconless mode. Due to the multi-radio nature of this study and to the single-radio model implementation available in inetmanet and OMNeT++, it has been necessary to create a new multi-radio version of the radio and the Medium Access Control (MAC) sub-modules under the NIC (Network Interface Card) module.  Additionally to the changes in these modules, some noise generator nodes have been added. These nodes generate noise in the form of messages in order to increase the traffic in the channels. The nodes are not recognised by any VC in the network, so they are not connected to the network focus of our study. From these nodes, 50% are fixed in their positions and the other 50% are mobile nodes, which change their positions every 30 s at a fixed speed of 1 m/s. Several experiments were carried out using the recommended configuration suggested in [5]. For simulation purposes, a timer (channel AliveTime) has been used, which defines the time channel migration for a sub-network, firing the channel migration process, and a parameter defining the number of nodes generating noise (numNoisyNodes), as a percentage of the number of total nodes present in the network. All the parameters related to the simulations are shown in Table 1 jointly with their values. Appendix A describes in detail the new parameters and messages of mDARAL. Smart City scenarios present different traffic conditions, which makes it necessary to define different traffic workloads for the present work. As it was carried out in our previous work, the node density (ND) is also considered for the present simulations, using 5, 10 and 15. These different ND factors result in the use of different area sizes such as 145 × 145 m or 700 × 700 m area. The traffic is not only defined by the ND, but the time interval (TI) between sending is also a critical factor in terms of traffic analysis. For this purpose, two statistically independent values have been considered: 1 and 30 s. Finally, it is necessary to mention that this work considers two different propagation models (PM) in order to develop a fair comparison. As it is shown in [26], the use of a deterministic and a probabilistic propagation model is recommended, so, for this work, the Free Space Model (FS) is selected as a deterministic model and the Log-Normal Shadowing (LNS) as a probabilistic model, resulting in a large comparison. The different scenarios simulated are shown in Table 2. Additionally, every scenario has been simulated 10 times, using different randomly generated scenarios.

Metrics Overview
This section presents the different metrics used for the present research, describing the parameters that have been measured.

Convergence Time
One of the main parameters studied in the present work is the convergence time, which has been calculated as the elapsed time since the node has been switched on until the node changes its internal state machine to CONNECTED or AWAITING. Finally, the convergence time is presented as the average of all the convergence times in the network.

Number of Control Messages Sent during the Set-Up Phase
Another one of the main parameters in this work is the number of control messages sent during the set-up phase, which is highly dependent on the number of control messages sent by each node. The control messages taken into account during the set-up phase are the ASSOCIATION_REQ and ASSOCIATION_REP. The result in terms of number of messages is obtained as the mean number of messages sent by all of the nodes.

Energy Consumption during the Set-Up Phase
The energy consumption has been measured during the set-up phase in order to measure the impact of multi-radio approaches during the network forming phase. It is necessary to point out the importance of intelligent energy management methods in cooperative transmissions such as the multi-radio systems presented in [32] by Sheng et al. They demonstrated that, through the use of power-allocation methods, it is possible to reduce the total power consumption while maintaining the required QoS, which is highly necessary for these systems. For this study, the processing time for the channel selection has been excluded, focusing exclusively on connection time of the network, regardless of the multi-radio configuration.
The different configuration parameters related to energy, such as battery capacity and consumption configuration, have been identically defined, obtaining directly comparable results in mWs. The energy consumption has been measured through a variable that has stored the remaining energy in its battery, allowing for calculating the energy used during the experiment. The result is presented as the mean of the energy consumption for all nodes in the net.

Results
The following section is focused on the performance analysis of mDARAL compared to DARAL under the simulation scenarios showed in Table 2. In these scenarios, several parameters, as in previous works [5], were taken into account. Thus, convergence time, number of messages and consumed battery during set-up time are the parameters used for comparison purposes between the mentioned protocols.
Attending to the obtained results in terms of number of messages (see Table 3 and Figure 6), mDARAL gets a larger amount of them except in small networks, during network set-up compared to DARAL, which is completely reasonable taking into account how mDARAL manages the connection messages. Analyzing the scenario formed by a large number of nodes with a node density of 15, it is noticed that DARAL needs 3.09 messages per node during the set-up compared to the 3.38 messages used by mDARAL for the Freespace propagation configuration. On the contrary, when the Log-Normal Shadowing configuration is used, both approaches reduce the average number of messages during the set-up with 3.91 and 2.91 for mDARAL and DARAL, respectively. Despite the number of messages being larger for mDARAL, during network set-up, the energy consumption is not penalized by this circumstance, as mDARAL optimizes the use of batteries under all testbed scenarios, especially when a Log-Normal Shadowing with a large number of nodes and node density equal to 15 is deployed.
The explanation of why mDARAL has a better energy consumption (see Table 4 and Figure 7) has to be focused while attending to how the radios are managed. As it was explained previously, mDARAL maintains one of the radios switched off as much time as possible, and, for the set-up time, the second radio is only used in order to acknowledge the connection of ENs through the LC, resulting in a minimum time usage of the second radio, considering that the first radio switches off at the same time that the second is switched on. Probably, the use of LCs, instead of the CC for the whole communication in the network, reduces the number of collisions, increasing the rate of packets successfully delivered. Therefore, the convergence time is also reduced, even though the number of control messages sent is increased. Table 3. Average number of control messages for small-, medium-and large-size scenarios under different propagation conditions. ND and PM stand for Node Density and Propagation Model respectively.

PM
ND Algorithm Avg ± Dev Small-Avg ± Dev Medium-Avg ± Dev Large-Scenario     Table 5 and Figure 8 show the behaviour of the convergence time for both routing algorithms, and also for the FreeSpace and the Log-Normal Shadowing configurations. In general terms, it can be seen how mDARAL reduces the time for creating the entire network under all the possible analyzed scenarios. For the FreeSpace configuration with a node density of 15, mDARAL gets an average improvement between 3.35× (Small) and 1.67× (Large), while, in the Log-Normal Shadowing configuration, the values are in a range from 2.56× (Small) to 1.43× (Large). Finally, as our previous works show, it would be convenient to calibrate the parameters of the algorithm in terms of energy consumption reduction. The convergence time has shown a higher impact on the energy consumption than the number of messages sent.

Conclusions
This paper presents an evolution of the DARAL routing algorithm focused on multi-radio environments like Smart Cities. We analyzed three key parameters for WSNs during the set-up phase: (i) the convergence time; (ii) the number of control messages (control overhead); and (iii) the energy consumption. We have carried out intense experiments intending to validate the multi-radio routing algorithm presented in this work. In order to make a fair analysis, a comparison with the single-radio protocol has been developed, considering different environmental factors within the process.
After the analysis of the results, it has been found that mDARAL presents a lower number of control messages during the set-up phase for small scenarios under different node densities and propagation models. For medium and large scenarios, the presented configuration of the algorithms results in a better performance of DARAL under different node densities and propagation conditions. It is necessary to point out that the differences between DARAL and mDARAL in terms of number of control messages sent are small enough to consider the results similar. The consistency of the results measured is very similar, going from 0.12 to 0.31 and it does not present any relevant difference. Taking into account the convergence time, it is noticed that mDARAL decreases the convergence time in all of the considered scenarios, even for different propagation conditions and densities. Moreover, mDARAL shows better results and consistency in terms of stability.
mDARAL shows a better energy consumption compared to DARAL under all the scenarios tested in this work. In our analysis, the propagation model seems to impact the consumption, resulting in the LogNormal Shadowing configuration having a larger difference between models. Finally, mDARAL presents an overall improvement in comparison with DARAL.
Operation code represents the control message identification used by DARAL and mDARAL, which counts 19 different messages, 15 from DARAL and an additional four from mDARAL, which are described below: • CHANGE_CHANNEL_REQUEST: it fires the channel migration process.
• CHANGE_CHANNEL_ACK: it confirms the reception of a CHANGE_CHANNEL_REQUEST frame.
• VPAN_CONFIG_REQUEST: it sends a request to the VC of a certain sub-network, requesting the configuration information of its sub-network (LC and vIDs). • VPAN_CONFIG_ACK: it confirms the reception of a VPAN_CONFIG_REQUEST frame, broadcasting the sub-network configuration details through the CC.
The following list presents the additional parameters of mDARAL, with respect to DARAL: • rrsiPctLst: This parameter defines the maximum percentage of link quality, in terms of LQI/RSSII, that the link can worsen. In addition, 100% of the signal is set by the initial LQI measurement used during the connection with the VC. • ratSnsngAckRd: This ratio sets the limit where the VC can start with the migration channel process. After receiving enough answers to the CHANGE_CHANNEL_REQUEST from the nodes in its sub-network, the VC changes its LC. • channel AliveTime: This timer defines the time that a node can wait without any answer once the migration channel process has been fired. After this time, the node requests the configuration of the sub-network to the VC, using a VPAN_CONFIG_REQUEST through the CC.
All of these parameters could be tuned, as in DARAL, by intelligent systems, making feasible their application to diverse scenarios, not only for Smart Cities, but also for IoT.