# RECRP: An Underwater Reliable Energy-Efficient Cross-Layer Routing Protocol +
## 3 RECRP Description
### Routing Phase
The central idea is that the sender encodes the message with a redundancy in the form of an ECCs include forward error correction (FEC) and automatic repeat request (ARQ). With FEC, the receiver corrects errors based on the received redundancy from the sender to minimize bit errors in the communication process. With ARQ, the sender is responsible for error correction by retransmitting unsuccessfully received packets to assure transmission reliability [33]. Since the error correction code is not the focus of this article, it is not considered in this paper. The number of times that a packet will be sent at least once successfully is expected to be \(\frac{1}{p(l,f,n,P)}\). Therefore, the expected energy consumption for the successful transmission of the packet is:  
\[10\text{log}N_{t}(f) =17-30\text{log}f, \tag{5}\]0  
where \(\Delta f\) is the channel bandwidth. Since we use BPSK to modulate the underwater acoustic data, a symbol duration can be coarsely calculated as the inverse of the channel bandwidth. In this way, the time taken to send a packet with the actual duration is simply given by the number of bits in the packet, divided by the binary symbol duration of the BPSK waveform in use, so the time taken to send a packet with a data length of \(n\) is \(n/\Delta f\). The next hop of the packet at node \(i\) is determined by the node level, residual energy, residual energy of neighbor nodes \(j\), and the distance evaluation between the current node and the neighbor node. These variables are denoted as \(l_{i}\), \(E_{i}\), \(E_{j}\), and \(L_{ij}\), respectively. In order to estimate the energy required to send a packet to the next hop, we need to calculate the distance between these two nodes. We use the distance between nodes \(i\) and \(j\), \(L_{ij}^{0}\), which is stored in the routing table, and the relative velocity between nodes \(i\) and \(j\), \(v_{ij}\), to estimate the distance between nodes \(i\) and \(j\), \(L_{ij}\). Assuming that the data updating time in the corresponding routing table is \(t_{0}\), and the current time is \(t\), then the distance between nodes \(i\) and \(j\) can be estimated as:  
\[10\text{log}N_{t}(f) =17-30\text{log}f, \tag{5}\]1  
where \(\alpha\) is a constant parameter that exceeds 1 to guarantee that the evaluated distance is larger than the real one to overcome the inaccurate distance estimation introduced by RSSI-based distance estimation and Doppler-based velocity estimation. We define the forwarding capability (nodes' lifetime) of a node as the number of packets it can forward, and take it as a metric. In this problem, it is assumed that the energy consumption of sending an ACK is \(K\) times (with \(K<<1\)) the energy consumption of the transmitted data packet,and the energy consumption of the next hop forwarding the data packet is consistent with the energy consumption of the node sending the packet. The lifetime of the next hop node can be expressed as:  
\[10\text{log}N_{t}(f) =17-30\text{log}f, \tag{5}\]2  
where \(E_{i}\) is the residual energy of node \(i\), \(E_{j}\) is the neighbor's residual energy, and \(l\) is the distance to the neighbor. Then, the problem can be formulated as a MILP model:  
\[ \begin{array}{l}\max\min\\ \{\frac{E_{i}-P_{e}(l,f,n,P)}{P_{e}(L_{ij},f,n,P)},\sum_{j}\frac{x_{ij}(E_{j}- (1+K)P_{e}(l,f,n,P))}{P_{e}(l,f,n,P)}\}\\ s.t.\hskip 28.452756 pt\mathcal{L}_{P}\leq P\leq\mathcal{U}_{P}\\ \mathcal{L}_{f}\leq f\leq\mathcal{U}_{f}\\ x_{i}H_{i}>x_{j}H_{j}\\ \sum_{j\in neighbour(i)}x_{ij}=1\\ x_{ij}\in[0,1]\end{array}  \tag{16}\]  
where \(\mathcal{L}_{P}\), \(\mathcal{U}_{P}\), \(\mathcal{L}_{f}\), and \(\mathcal{U}_{f}\) are lower and upper bounds of transmitting power and channel frequency, respectively. \(H_{i}\) is the node hop, and \(x_{ij}\) is a binary variable that indicates the next hop. If node \(j\) is the next hop, \(x_{ij}=1\), otherwise, 0. The significance of this optimization problem is to maximize the minimum forwarding capacity of the node and its neighbors after the message is forwarded.