# mDARAL: A Multi-Radio Version for the DARAL Routing Algorithm
## 3 Multi-Radio Dynamic and Adaptive Routing Algorithm (mDARAL)
### 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 develop _mDARAL_ using physical metrics.  
[PERSON] 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  
\[minQoS=avgLQI_{X}\times rssiPctLst. \tag{1}\]  
Figure 3: Example of link selection and role adoption process.  
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, \(ratSnsqGAckRd_{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  
\[ratSnsqAckRd_{X}=\frac{numAnswers_{X}}{numNodes_{X}}. \tag{2}\]  
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).