# Distributed Routing and Channel Selection for Multi-Channel Wireless Sensor Networks +
## 4 Multi-Channel Routing in WSNs
### Preliminaries  
We define the battery _health-metric_\(H\) of a node to represent its remaining battery lifetime, i.e., the estimated time until its battery is depleted under its currently estimated energy usage. We assume \(H\propto\frac{B}{\mathcal{I}}\), where \(B\) is the remaining capacity of the battery and \(\mathcal{I}\) represents the estimated current drawn at the node. Based on the experimentally validated model [42], the current drawn in each node can be calculated as follows:  
\[\mathcal{I} = \frac{I_{B}T_{B}}{I_{B}}+M.I_{Dt}T_{Dt}+N.\frac{I_{B}T_{Bx}}{I_{B} }+O.I_{Dt}T_{Dt}+F.I_{Dt}T_{Dt}+\frac{I_{B}T_{x}}{I_{D}}+\eta_{P}.I_{P}T_{P} \tag{1}\]  
where \(I_{x}\) and \(T_{x}\) represent the current drawn and the duration, respectively, of the event \(x\); and \(T_{B}\) represents the beacon interval. The various events are defined as follows. Transmission/reception of beacons is denoted by \(B_{t}/B_{r}\), data transmit/receive is denoted by \(D_{t}/D_{r}\) and processing and sensing are denoted as \(P\) and \(S\), respectively. \(O\) and \(F\) are the overhearing and forwarding rates, respectively, and \(N\) is the number of neighbors. \(M\) is the rate at which a node transmits its own packets. If there are no retransmissions, then \(M=\frac{1}{I_{D}}\), where \(T_{D}\) is the data interval. \(\eta_{P}\) represents the number of times that a node wakes per second to check whether the channel is busy, and is set to 8 in our application. We assume that each node is able to estimate all the dynamic parameters that are used in Equation (1), by periodic assessment of its overheard and forwarded traffic.  
In this work, we assume that the battery capacity \(B\) is estimated from the battery voltage. We consider MICAz nodes, which operate in a voltage range of 2.7 V to 3.3 V [46]. Experimental data from _ParadiseNet_ indicates that the discharge curve for alkaline cells [47] under typical usage (i.e., \(<\)1 mA average current) is approximately linear within this range. This is illustrated in Figure 6. The actual battery voltage is related to the ADC reading as follows: \(V_{bat}=\frac{1.223\times 1024}{\text{ADC reading}}\). Thus, assuming that the capacity is 100% when the battery voltage is greater than or equal to 3 V (ADC reading = 417 from MICAz voltage sensor), and 0% when it drops below 2.6 V (ADC reading = 482), the battery capacity can be estimated as \(B=\min\left(100,\frac{482-\text{ADC reading}}{0.65}\right)\). Although this is not an accurate estimate, it provides a computationally simple assessment of the battery health by estimating the battery voltage and the other current usage paramters in equation (1).  
To estimate the quality of a route, we use the _expected number of transmissions (ETX)_ that is used in CTP. An ETX is the expected number of transmission attempts required to deliver a packet successfully to the receiver. Hence, a low ETX value indicates a good end to end quality of a route, and vice versa. In our scheme, ETX is calculated similar to [17]. The sink always broadcasts an ETX = 0. Each node calculates its ETX as the ETX of its plent plus the ETX of its link to the parent. A node \(i\) chooses node \(j\) as its parent among all its neighbors if ETX\({}_{ij}\) + ETX of \(j<\text{ETX}_{ik}+\text{ETX}\) of \(k\)\(\forall k\
eq j\), where ETX\({}_{ij}\) and ETX\({}_{ik}\) are the ETX of link \(i\)\(\rightarrow\)\(j\) and \(i\)\(\rightarrow\)\(k\) respectively.  
Figure 6: Battery discharge curve of a typical node in _ParadiseNet_.