# An Energy-Efficient and Obstacle-Avoiding Routing Protocol for Underwater Acoustic Sensor Networks
## 4 Design of Energy-Efficient and Obstacle-Avoiding Routing Protocol
### Candidate Forwarding Relay Set Determination  
In the EOAR protocol, when sensor node has a packet to send, the current node perceives whether there is interference from any marine animals around it and broadcasts the packet to its neighbor nodes. When the current node perceives the presence of the marine animal, the current node broadcasts the packet that contains the interference information and the time-stamp to its neighbor nodes. The interference information is the geographical location information of the marine animal. When the current node does not perceive the presence of any marine animal, the current node broadcasts the packet with only the time-stamp to its neighbor nodes. If one neighbor node receives the packet, it extracts the interference information in the packet and combines its own geographical location to calculate whether it satisfies the constraint. If one neighbor node can satisfy all the constraints, then it labels itself as a candidate forwarding relay of the current node, otherwise this neighbor node will discard the packet. The collection of all the candidate forwarding relays of the current node is called candidate forwarding relay set of the current node. Note that the candidate forwarding relay set is calculated by the neighbor nodes of the current node, not the current node itself. Since the packet of EOAR contains time-stamp information and location information, this article uses a joint time synchronization and localization design for mobile underwater sensor networks (JSL) method [29] for time synchronization and obtaining the location information. When the current node perceives the presence of a marine animal, the first step to determine the candidate forwarding relay set is to calculate the interference area of the animal-nodes. The communication radius and the interference radius of the sensor nodes and the marine animal can obtain according to the above Equations (1) and (2). As shown in Figure 3, \(R_{1}\) and \(R_{2}\) represent the communication radius and interference radius of the marine animal, respectively. \(R_{3}\) and \(R_{4}\) represent the communication radius and interference radius of the sensor nodes, respectively. Define the interference radius between the marine animal and sensor nodes as \(R_{5}\). In order to prevent interference caused by the animal, it is necessary to ensure that there is no overlap between the interference area of marine animal and the communication area of sensor nodes, and also no overlap between the interference area of the sensor node and the communication area of marine animal. Therefore, the radius of animal-nodes interference area \(R_{5}\) = max \(\{R_{2}+R_{3}\), \(R_{1}+R_{4}\}\). Consider the location of the marine animal as the center of the sphere, \(R_{5}\) as the radius, and then the determined spherical area is the interference area of animal-nodes. After receiving the packet with the interference information, each neighbor node of the current node determines whether it is in the interference area of animal-nodes by calculation, and the neighbor node found itself in the interference area will be in the sleep mode to further save network energy consumption. Figure 2: Overview of the proposed EOAR protocol. After confirming the interference area of animal-nodes, EOAR specifies three constraints to determine the candidate forwarding relays from the neighbor nodes of the current node. * The first constrain is \(SNR\geq SNR_{0}\), where \(SNR_{0}\) is a preset signal to noise ratio threshold. * The second constrain is that if the current node perceive interference from any marine animal, the distance \(d_{s}^{j}\) from the neighbor nodes to the marine animal must satisfy the condition: \(R_{5}<d_{s}^{j}\leq R_{6}\). The range covered by the area formed by the new radius (which uses \(R_{5}+1000\) as the new radius \(R_{6}\)) may include the communication range of the neighbor nodes. * The third constrain is the included angle between the current node and its neighbor nodes.