# Cross-Layer-Aided Opportunistic Routing for Sparse Underwater Wireless Sensor Networks
## 5 Protocol Analysis
### Reliability of Network Coding  
Network coding introduces coding overhead due to the coding matrix and the control information for coding. In systematic network coding, the overhead of coefficient matrix \(\mathbf{G}_{\mathrm{s}}\) can be calculated as below [60]. \[S_{coeffMatrix}=\sum_{n=1}^{N_{MBT}}n^{2}\cdot q \tag{35}\]  
The coding overhead \(R_{\alpha c}\) has two parts: the first part is coding parameters \(N_{out}\), \(EoLx\), and mask \(M_{cc}\); the second part is coding coefficients. We calculate \(R_{cc}\) as:  
\[R_{cc}=8\cdot\lceil(N_{MBT}+2\log_{2}((\lambda_{M}+1)N_{MBT})+N_{MBT}\cdot q)/8\rceil \tag{36}\]  
where \(\lambda_{M}\) represents the maximum transmission redundancy. Using Formula (8), we calculated the \(PER\) of different payload sizes with and without coding. Figure 6a shows the \(PER\) as a function of \(P_{b}\) for different packet sizes in the case that \(N_{MBT}\) is 16, \(\lambda_{M}=2\), and GF(8). When the packet size is large, the \(PER\) varies slightly for different \(P_{b}\). We can find that the \(PER\) only varies slightly for different \(P_{b}\) in case of typical packet size. Then, we use \(\Delta PER=PER_{cc}-PER_{normal}\) to represent the difference of \(PER\) after adding coding redundancy to a coded packet. Figure 6b shows that the \(\Delta PER\) varies for different \(PER\). As the channel lightly worsens, \(\Delta PER\) increases when \(PER\) is smaller than 0.6. As \(PER\) increases continuously, \(\Delta PER\) decreases with the increase of \(PER\). Thus, the coding redundancy lightly affects the link quality. To analyze the decoding performance of the Systematic Network Coding (SNC), we define the Packet Loss Rate (PLR) as the ratio of the number of packets lost at next-hop forwarders to the number of packets from the sender. We compare its PLR performance with that of Opportunistic Routing (OR) and Network Coding (NC) in two typical scenarios: (a) one forward link and (b) two forward links. We set the transmission redundancy \(\lambda_{M}\) to 1.0, the burst size \(N_{BT}\) with 16, and over Galois fields GF(2), GF(8), and GF(16). Figure 7 shows PLR versus PER for three strategies in different Galois fields when transmission redundancy \(\lambda_{M}\) is set to 1.0. When PER is small, all three mechanisms can nearly recover all the packets with high probability. As PER increases, the PLR performance of OR degrades heavily, while NC and SNC outperform NR on one forward link. In contrast, in the case of two forward links, OR shows better performance than NC while SNC remain  
Figure 6: (**a**) \(PER\) of transmission with and without coding versus \(P_{b}\) for different payload sizes; (**b**) the difference of \(PER\) (\(\Delta PER\)) varies with \(PER\) for different payload sizes. maintains better performance than the other two transmission strategies. In addition, the performance of SNC degrades slightly over the other two strategies as PER increases. Figure 8 shows the PLR of the three strategies versus transmission redundancy for different Galois fields when \(PER\) = 0.4. NC shows the worst performance compared with the other two strategies when the redundancy is small. The lack of coded packets with a small degree results in low decoding probability, since sufficient coded packets with NC to recover original data packets are required. In contrast, the more coded packets with degree 1 in SNC, the higher the decoding probability, and the performance of SNC is comparable to that of OR. As the redundancy increases, SNC outperforms the other two strategies. As can be seen from Figures 7 and 8, the performance of SNC with GF(8) is close to that of GF(16), and it is significantly better than that of GF(2) for poor channel conditions or high transmission redundancy. To improve the transmission reliability, we should let a relatively larger Galois field be used in SNC. Figure 8: PLR of three strategies versus transmission redundancy in different Galois fields when \(PER\) = 0.4: **(a)** one forward link; **(b)** two forward links.