# A Novel Cooperative Opportunistic Routing Scheme for Underwater Sensor Networks
## 3 Opportunistic Void-Avoidance Routing Protocol
### Routing Algorithm
#### 3.5.1 Relationship between Packet Delivery Probability and Transmission Distance  
Assume node \(R_{i}\) intends to send a packet to the sink \(S\), and \(L(R_{i})=\{n_{1},n_{2},...,n_{c}\}\) shows the available candidates of node \(R_{i}\) (neighbouring nodes with lower hop count values), which are ordered increasingly based on their depth values. Let \(c=|L(R_{i})|\) denote the number of candidates in \(L(R_{i})\). Node \(R_{i}\) is aware of the packet delivery probability of its neighbours. For instance, if \(R_{i}\) has received a beacon from \(n_{k}\), \(1\leq k\leq c\), can calculate pairwise distance \(Dist(R_{i},n_{k})\) based on the receiving signal power from the beacon or by using the time of arrival (ToA) [23]. In this way, node \(R_{i}\) can calculate all pairwise distances between itself and its neighbouring nodes and add them to its neighbouring table. Thus, all nodes in \(L(R_{i})\) can be associated with a packet delivery probability \(P_{ik}\) (\(1\leq k\leq c\)), which can be calculated, as explained later in this section, based on the distance from node \(R_{i}\) to \(n_{k}\). Node \(n_{k}\) is a neighbouring node of \(R_{i}\) when \(P_{ik}>P_{T}\), where \(P_{T}\) represents a probability threshold. Otherwise, the sent packet cannot be decoded free of error. Moreover, we assume that the packet delivery probability on each acoustic link is independent.  
According to the model used in [14], the bit error probability over distance \(d\) can be calculated as follows:  
\[P_{e}(d)=\frac{1}{2}\left(1-\sqrt{\frac{SNR_{avg}(d,f)}{1+SNR_{avg}(d,f)}}\right) \tag{5}\]  
where \(SNR_{avg}(d,f)\) is the average signal-to-noise ratio over distance \(d\). The bit error probability increases by increasing the distance due to channel fading. Moreover, a packet (from node \(i\) to node \(j\)) with size \(n\) bits can be delivered over distance \(d\) with the probability \(P_{ij}\)[14]:  
\[P_{ij}=(1-P_{e}(d))^{n} \tag{6}\]  
Let \(F\) denotes \(R_{i}\)'s forwarding set, including all of the nodes used in the opportunistic data forwarding. Let \(r=|F|\) denote the number of nodes in \(F\). Now, our first goal is to select the subset \(F\) from \(L(R_{i})\) in a way that it can maximize the packet delivery probability and resolve the hidden terminal problem in the lossy underwater environment.  
Obviously, a packet transmission obtains more of a chance of delivery if more forwarding nodes are involved in the packet forwarding. With \(r=1\), only one node from \(L(R_{i})\) is selected for packet forwarding, and therefore, the successful delivery chance is limited to the packet delivery probability of a single node. For instance, in Figure 2, if we just select node \(n_{1}\), the delivery probability is equal to \(P_{1}\). A traditional routing protocol without opportunistic routing might ideally achieve \(max(P_{i1},P_{i2},...,P_{ic})\) packet delivery in each step towards the destination, which is not suitable for the lossy underwater acoustic channel. On the other hand, by maximizing the forwarding set size, _i.e._, \(r=c\), all neighbouring nodes with a lower hop count take part in the packet delivery. Although this certainly increases the chance of packet delivery, it also increases the energy consumption and also the network congestion. Moreover, involving nodes without considering the hidden terminal problem may result in redundant paths and packet collisions. The three-dimensionality of the underwater environment makes the hidden terminal problem even worse due to the existence of some neighbouring nodes in different directions.