# Adaptive Packet Coding for Reliable Underwater Acoustic Communications
## 5 RLPC-J-ARQ Scheme
\begin{array}{l}\rho^{(2)}_{\dot{k}+1,1}\leq\rho^{(3)}_{\dot{k},1}-T _{g}\\ \rho^{(2)}_{\dot{k},1}\leq\rho^{(3)}_{\dot{k}+1,1}-T_{g}\\ \sigma^{(4)}_{\dot{k},1}\leq\sigma^{(1)}_{\dot{k}+1}-T_{g}\\ \sigma^{(4)}_{\dot{k}+1,1}\leq\sigma^{(1)}_{\dot{k}+1,2}-T_{g}\\ \end{array} \right. \tag{28}\]  
Let \(\rho^{(1)}_{\dot{k},1}=0\); according to (28), the constraints about the initial time instant of the \((k+1)\)-th block are given as  
\[\left\{ \begin{array}{l}\rho^{(1)}_{\dot{k}+1,1}\leq 2T_{d}+T_{p}N^{(k)}_{1}-T _{p}N^{(k+1)}_{1}\\ \rho^{(1)}_{\dot{k}+1,1}\geq T_{p}N^{(k)}_{1}+2T_{g}+T_{\text{ACK}}\\ \end{array} \right. \tag{29}\]  
We set \(\rho^{(1)}_{\dot{k}+1,1}=T_{p}N^{(k)}_{1}+2T_{g}+T_{\text{ACK}}\). Namely, the sender sends the packets from the \((k+1)\)-th block immediately once it is allowed to send. Meanwhile, the number of packets from the \((k+1)\)-th block is also restricted,  
\[N^{(k+1)}_{1}\leq\left(2T_{d}-2T_{g}-T_{\text{ACK}}\right)/T_{p} \tag{30}\]  
To sum up, the constraints in our problem are as follows  
\[\left\{ \begin{array}{l}N^{(k+1)}_{1}\leq\left(2T_{d}-2T_{g}-T_{\text{ACK}} \right)/T_{p}\\ N^{(k)}_{\dot{i}+1}\leq N^{(k+1)}_{\dot{i}}\\ N^{(k+1)}_{\dot{i}+1}\leq N^{(k)}_{\dot{i}+1}\\ 1\leq i\leq M\\ \end{array} \right. \tag{31}\]  
According to (31), the number of transmitted packets for the \((k+1)\)-th block at the \(i\)-th transmission does not exceed that of for the \(k\)-th block at the \(i\)-th transmission. The number of transmitted packets for the \(k\)-th block at the \((i+1)\)-th transmission doe not exceed that of for the \((k+1)\)-th block at the \(i\)-th transmission. If \(N^{(k)}_{i}=0\) or \(N^{(k+1)}_{\dot{i}}=0\), of course, there are no constraints about the \(N^{(k+1)}_{\dot{i}}\) or \(N^{(k)}_{\dot{i}+1}\). Thus, the maximum number of transmitted packets in the \((i+1)\)-th transmission are given by \[B_{i+1}^{(k)}=\left\{ \begin{array}{ll}Q_{\rm{,}}&\mbox{if}\,N_{i}^{(k+1)}=0\\ N_{i}^{(k+1)},&\mbox{if}\,\,N_{i}^{(k+1)}>0\end{array} \right. \tag{32}\]  
\[B_{i+1}^{(k+1)}=\left\{ \begin{array}{ll}Q_{\rm{,}}&\mbox{if}\,N_{i+1}^{(k)}=0 \\ N_{i+1}^{(k)},&\mbox{if}\,N_{i+1}^{(k)}>0\end{array} \right. \tag{33}\]  
There is a difference from the RLPC-ARQ scheme. In the RLPC-ARQ scheme, the sender can adjust the number of transmitted packets freely based on the feedback ACK. However, in this case, the number of transmitted packets in each transmission is monotone decreasing. The transmission time duration for the \(i\)-th transmission is also different. For the first transmission, the transmission time duration is given by  
\[T_{1}=\rho_{k+1,2}^{(1)}=T_{p}N_{k,1}+2T_{g}+T_{\rm ACK}+T_{p}N_{k+1,1}+T_{\tau} \tag{34}\]  
For the \(i\)-th (\(1<i<M\)) transmission, if \(N_{i}^{(k+1)}>0\), according to Figure 2, the transmission time duration for the \(i\)-th transmission is given by  
\[T_{i}=\rho_{k+1,i+1}^{(1)}-\rho_{k+1,i}^{(1)}=T_{p}N_{k+1,i}+T_{\tau} \tag{35}\]  
In this case, it seems that the transmission time duration for the \(i\)-th transmission has nothing to do with the number of transmitted packets from the \(k\)-th block. However, \(N_{i}^{(k)}\) still affects the transmission time duration according to the constraints in (31). If \(N_{k,i}>0\) and \(N_{k+1,i}=0\), the transmission time duration should be  
\[T_{i}=\rho_{k,i+1}^{(1)}-\rho_{k+1,i}^{(1)} \tag{36}\]  
However, it is difficult to calculate \(\rho_{k,i+1}^{(1)}-\rho_{k+1,i}^{(1)}\) since it connects with the number of transmitted packets in the first \((i-1)\) transmissions. Thus, we let \(\rho_{k,i}^{(2)}+2T_{g}+T_{\rm ACK}\) approximate \(\rho_{k+1,i}^{(1)}\),  
\[T_{i}\approx\rho_{k,i+1}^{(1)}-\rho_{k,i}^{(2)}-2T_{g}-T_{\rm ACK}=2T_{d} \tag{37}\]  
In the same way, for the \(M\)-th transmission, we also set the penalty term, \(\pi(q_{M}^{(k)})\) and \(\pi(q_{M}^{(k+1)})\), where \(\pi(q_{M}^{(k)})\) is given in (14). The objective function is also given by  
\[J^{\prime}=\min_{N_{i}^{(k)},N_{i}^{(k+1)}}\sum_{i=1}^{M}\gamma^{i}T_{i} \tag{38}\]  
This problem is different from the problem in (15).