# An Energy-Efficient and Robust Multipath Routing Protocol for Cognitive Radio Ad Hoc Networks
## 4 Energy-Efficient and Robust Multipath Routing
### Route Decision  
At the destination, when RREQ packets are received from multiple paths, they must be sorted according to their energy efficiency and stability. This helps categorize the paths as primary and backup paths. We use a cost function, a combination of energy and stability metrics, to evaluate the paths. The cost function has no dimension (even though the residual energy is measured in Joules and the route stability is measured in seconds). That is, as for the evaluation of candidate paths, we have taken into account only the numeric values of residual energy and route stability and used them in the cost function. For both residual energy and route stability, the higher is the better. Hence, they are summed up. The path with the highest cost function is chosen as the primary path, and that with the second-highest cost function is used as the backup path. The cost function is as follows:  
\[\text{Cost Function}(\text{CF})=a\cdot E_{res}+b\cdot S, \tag{8}\]  
where \(E_{res}\) and \(S\) are the residual energy and stability of the path, respectively, and \(a\) and \(b\) are \(\alpha/E_{init}\) and \(\beta/S_{\max}\), respectively, with the condition of \(\alpha+\beta=1\). The two constants \(\alpha\) and \(\beta\) are the weight factors of residual energy and stability, respectively. It should be noticed that \(E_{init}\) is the sum of the initial energy of nodes in the path (i.e., \(E_{init}=\sum_{n=1}^{m}E_{init}(n)\)), where \(E_{init}(n)\) is the initial energy of node \(n\) in the path of \(m\) nodes, and \(S_{\max}\) is the sum of the average ON/OFF period of links in the path (i.e., \(S_{\max}=\sum_{l=1}^{k}T_{on}(l)+T_{off}(l)\)), where \(T_{on}(l)+T_{off}(l)\) is the average ON/OFF period of link \(l\) in the \(k\)-hop path. The values of \(\alpha\) and \(\beta\) are assigned according to the significance of residual energy and stability in the target application. In our performance simulation in Section 5, \(\alpha=0.5\) and \(\beta=0.5\) by default. The residual energy of the path refers to the sum of the residual energy for every node on the path, and it is given by  
\[E_{res}=\sum_{n=1}^{m}E_{res}(n), \tag{9}\]  
where \(E_{res}(n)\) is the residual energy of node \(n\), and \(m\) is the number of nodes in the path including the source and the destination. In order to avoid the selection of severely energy-deprived nodes, we set up a threshold energy level such that the nodes with energy level below threshold are not included in the route during route discovery process. This strategy is intended to achieve an even load distribution over the network. \(E_{res}(n)\) is the difference of the initial energy of node \(n\) (\(E_{init}(n)\)) and the total energy consumed by node \(n\) (\(E_{con}(n)\)) as indicated below:  
\[E_{res}(n)=E_{init}(n)-E_{con}(n), \tag{10}\]  
The transmission of a packet from one node to the next relay node is an energy-consuming process. Energy is consumed not only at the transmission but also at the receiving side. If the transmission and reception occur through different channels, a considerable amount of energy is involved in the switching process. The energy incurred in channel switching is proportional to the frequency difference between the channels [25]. Likewise, a dominant proportion of radio energy is consumed when the radio is listening to the channel in order to receive possible data. Often, idle listening cost is speculated to be 50-100% of the energy required for the receiving purpose. Therefore, we consider all aforementioned factors to gauge the energy. If we neglect overhearing and assume data transmission to be completely along the path specified, the energy consumed by a node, \(E_{con}\), can be calculated by  
\[E_{con}=E_{tx}+E_{rx}+E_{swt}+E_{idle}. \tag{11}\]  
where \(E_{tx}\), \(E_{rx}\), \(E_{swt}\), and \(E_{idle}\) are represented as follows:* \(E_{tx}\) is the energy required for transmitting a packet and is given by \(E_{tx}\) = (1.65 \(\times\) packet size in bits)/(2 \(\times\) 10\({}^{6}\)) J.