# An Energy-Efficient and Obstacle-Avoiding Routing Protocol for Underwater Acoustic Sensor Networks
## 4 Design of Energy-Efficient and Obstacle-Avoiding Routing Protocol
### The Priority-Based Forwarding Method  
To prevent the selected best forwarding relay from suffering failures which result in retransmissions, the current node broadcasts the data packets to all the nodes in the candidate forwarding relay set. However, two or more candidate forwarding relays may receive the same packet and repeatedly send it, resulting in a waste of energy. To reduce this waste of energy, we set a  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{4}{c}{**(1) The linguistic level of PDRA is short.**} \\ \hline
**RER/CIA** & **Minimum** & **Medium** & **Maximum** \\ \hline Low & Medium & Medium & Weak \\ Medium & Good & Good & Weak \\ High & Excellent & Good & Weak \\ \hline \multicolumn{4}{c}{**(2) The linguistic level of PDRA is long.**} \\ \hline
**RER/CIA** & **Minimum** & **Medium** & **Maximum** \\ Low & Bad & Medium & Weak \\ Medium & Medium & Medium & Weak \\ High & Medium & Good & Weak \\ \hline \hline \end{tabular}
\end{table}
Table 2: The rules based on inference engine.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**No.** & \(Re\left(n_{s}^{j}\right)\) & \(cos\theta\left(n_{s}^{j}\right)\) & \(P_{d}\left(n_{s}^{j}\right)\) & **Probability** \\ \hline
1 & 0.600 & 0.500 & 0.400 & 0.700 \\
2 & 0.600 & 0.500 & 0.500 & 0.600 \\
3 & 0.300 & 0.600 & 0.700 & 0.500 \\
4 & 0.800 & 0.700 & 0.600 & 0.467 \\
5 & 0.450 & 0.700 & 0.600 & 0.380 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The examples of the result of the fuzzy operation.  
Figure 6: Membership function of the probability.  
waiting time for each candidate forwarding node with the rule that nodes with larger \(p\) (\(n_{s}^{j}\)) has higher priority and lower waiting time. When a candidate forwarding relay receives a packet from the current node, it needs to overhear the forwarding status of the packet within the waiting time. If a node with a higher priority has forwarded the same data packet within the waiting time, other lower priority forwarding relays will discard this packet.  
The calculating method of the waiting time is described in detail below. Each candidate forwarding relay of the current node obtains its forwarding probability through the fuzzy logic-based forwarding relay selection method. And each of the candidate forwarding relays sets a waiting time according to its own forwarding probability. The waiting time is calculated as:  
\[H_{d}\left(n_{s}^{j}\right)=\left(1-p\left(n_{s}^{j}\right)\right)\left( \frac{R_{m}}{v_{sound}}\right)+\frac{R_{m}-d\left(n_{s}^{j}\right)}{v_{sound}} \tag{10}\]  
where \(p\) (\(n_{s}^{j}\)) is the probability that the sensor node is responsible for forwarding packets, \(R_{m}\) is the pre-defined maximum transmission distance, \(d\) (\(n_{s}^{j}\)) denotes the distance between the current node and its neighbor node \(n_{s}^{j}\).  
From Equation (10), it is observed that the first term reflects the relationship between the waiting time and \(p\) (\(n_{s}^{j}\)): the candidate forwarding relay with larger forwarding probability (higher priority) has less waiting time, which means that it is preferential to forward the data packet. The candidate forwarding relays overhear the packet transmission situation in their respective waiting times. If the data packet has been sent by a higher priority forwarding relay, the remaining forwarding relays discard the same data packet. The candidate forwarding relay broadcasts the data packet to the nodes in its own candidate forwarding relay set after its respective waiting time if the packet has not been discarded. Each transit hop forwarding the packets use the priority-based forwarding method until the data packet arrives the destination node.