# A Co-Design-Based Reliable Low-Latency and Energy-Efficient Transmission Protocol for UWSNs
## 5 Design of Data Transmission Protocol
### Network Maintenance and Updating  
After network initialization, each sensor node maintains a neighbor table which includes the knowledge of its two-hop neighbors and their pairwise distances. To estimate the distance between a sender and its neighbor nodes, we combine the path attenuation model [29], the channel strength and the transmission strength that are obtained from the received data packets. The path attenuation model is  
\[A(l,f)=A_{0}l_{k}a(f)l \tag{9}\]  
where \(f\) is acoustic communication frequency, \(l\) is the distance between two nodes, \(A_{0}\) is a unit-normalizing constant, \(k\) is a propagation factor that represents the geometry of propagation, here \(k=1.5\)[30], and \(a(f)\) is the absorption coefficient. If expressed in \(dB\), the underwater acoustic path loss is  
\[10\log A(l,f)/A_{0}=k10\log l+l10\log a(f) \tag{10}\]  
Defined by the Thorps formula [31], the following form is often used for low-frequency signals.  
\[10\log a(f)=0.002+0.11f^{2}/(1+f^{2})+0.011f^{2} \tag{11}\]If a hydro-acoustic signal of frequency \(f\) is transmitted with power \(P\) along an unblocked path, the received signal strength is \(P/A(l,f)\)[8], so we can roughly estimate the distance between two nodes by the received signal strength.  
The relationship between Doppler scale shift and relative velocity between any pair of nodes is \(v=ac\), where \(v\) is the relative velocity, \(a\) is the Doppler scale shift, and \(c\) is the sound speed. Relative velocity estimations based on Doppler shifts can achieve a promised performance from the obtained data. For example, [32] reached a 0.1 m/s deviation for node speed with a maximal velocity of 5 m/s. We leveraged the Doppler measurement to estimate the relative velocity.  
Now we have the method to calculate the distance and the relative velocity between every two connected nodes. As mentioned before, nodes have constant transmission and receiver power, which means the attainable range is unchanged. Based on this feature, a node can estimate the time when its neighbors will be out of range. If a node has not received a package from a neighbor during the estimated time, the corresponding entry is removed from the neighbor table and the node broadcasts the updated neighbor table to its neighbors. Otherwise, the node will update the relative velocity and the distance about this neighbor using the current information from recently received packets.  
There may be a situation where a neighbor is in the neighbor table when the node sends the data packet, however this neighbor actually moves out of the transmission range of the node. In this case, the neighbor table of the node is not fresh anymore and this neighbor can no longer receive packets from the node. In addition, the conflict between nodes may lead to a forwarder's failure to receive the packet. If all chosen forwarders fail, we call this a transmission failure. We therefore put a failure counter on every node to record the number of transmission failures. If the number of failures counted for the node \(n\) is more than 3, it will activate a partial update by broadcasting a probe packet to its one-hop neighbors. The probe packet will not cause flooding like network initialization and the neighbors of the node will not forward probe packet again.  
In summary, when a neighbor is predicted to be out of range or the failure count of the neighbor is more than 3, the node will perform a partial update. A global update will be triggered periodically.