# ABORt: Acknowledgement-Based Opportunistic Routing Protocol for High Data Rate Multichannel WSNs
## 3 Acknowledgement-Based Opportunistic Routing Protocol
### ABORt Routing Metric Computation  
In convergecast data transmission scenarios, the final destination of collected data is the sink node. However, due to the limited communication range of sensor nodes, in most cases, the sink is out of the range of most nodes in the network. Thus, nodes have to use multi-hop communication to transmit their collected data. Multi-hop communication uses a routing protocol that relies on a routing metric to select next hop neighbors to which data will be forwarded. The routing metric of ABORt is based on average packet queueing delay.  
The average queueing delay for each node is calculated when the node transmits data packets. At first, we need to use a default routing approach to start data transmission and then replace progressively this default routing approach by ABORt routing. Therefore, before evaluating ABORt routing metric, nodes use the minimum hop count routing to forward data. After the neighborhood discovery phase, each node selects a next hop neighbor towards the sink using the minimum hop  
Figure 1: The 1-hop, 2-hop and 3-hop neighbors of node 8 are coloured in green and yellow. The predecessor of node 8 is node 5 coloured in yellow. The reception frequency of each node is labelled. All nodes have one reception channel except the sink, which has 3.  
count routing metric. In addition, each node builds a top-list neighbors table that contains all of its next hop neighbors with the minimum hop count route. In order to ensure load balancing, for each data packet to transmit, a node will randomly choose one neighbor in the top-list and forward its packet to this neighbor.  
For each node, each generated or forwarded packet is enqueued and will be transmitted following the First In First Out (FIFO) policy. For each node, whenever a data packet is enqueued for transmission, the time is recorded using the node local clock. When the same packet is dequeued, the time is also recorded. The difference between the dequeued and enqueued instants is the packet queueing delay. We calculate the average value of the queuing delay over the last ten packets (ten packets is a value obtained through heuristics showing that smaller values create oscillations, and bigger values prevent nodes from accurately updating its delay), and we call it node delay \(d\). If the node has not dequeued ten packets yet, \(d\) is the average value of already dequeued packets. To make the queueing delay average more representative of the recent traffic conditions, we use a weighing factor of 2 for the 5 most recently dequeued packets. The formula of node delay calculation is presented in Equation (1):  
\[\text{Node delay}=\frac{\sum\limits_{i=1}^{5}queueingdelay(i)+\sum \limits_{i=6}^{10}2\times queueingdelay(i)}{15}, \tag{1}\]  
where _queueing delay (i)_ is the difference between dequeuing instant and queueing instant of packet (i).  
Once a node has already dequeued ten packets, it uses a sliding interval where the oldest queueing delay is deleted and the new one is inserted. Doing so helps to be sure that each node always records the time of the most recent dequeued ten packets. Node delay \(d\) is used to calculate path delay \(D\). For each node, \(D\) is the average time that packets are estimated to spend from this node to the sink. Sink 1-hop neighbors have the same value of node and path delays.