# A Novel Cross-Layer Routing Protocol Based on Network Coding for Underwater Sensor Networks
## 5 Performance Evaluation
### Effects of Degree Distribution
However, the interaction of these two factors constraints the design of degree distribution. In order to further improve the decoding performance, we increase the probability of one-degree packets and high degree packets in the next simulations. Without loss of generality, we simulate and analyze the following six degree distributions. * Case 1: Degree value = [1 4 6], Degree probability distribution = [0.300 0.175 0.525], Average degree = 4.15, \(N_{r\max}\) = 6. * Case 2: Degree value = [1 4 6], Degree probability distribution = [0.400 0.175 0.425], Average degree = 3.65, \(N_{r\max}\) = 6. * Case 3: Degree value = [1 4 6], Degree probability distribution = [0.500 0.075 0.425], Average degree = 3.35, \(N_{r\max}\) = 6. * Case 4: Degree value = [1 4 6], Degree probability distribution = [0.600 0.175 0.325], Average degree = 3.25, \(N_{r\max}\) = 6. * Case 5: Degree value = [1 2 5 6], Degree probability distribution = [0.300 0.175 0.200 0.325], Average degree = 3.60, \(N_{r\max}\) = 6. * Case 6: Degree value = [1 4 6], Degree probability distribution = [0.500 0.075 0.425], Average degree = 3.35, \(N_{r\max}\) = 8. Figure 7 presents the coding efficiency \(\eta\) (the number of original data packets/the number of encoded packets, \(0\leq\eta\leq 1\)) of different degree distributions in one sender situation. If \(\eta\) is close to 1, it means that the sender only needs to send a few packets for decoding messages successfully. From the results we can see that a relatively low average degree is needed to complete the decoding process. However, if the average degree is too small, data packets cannot be covered effectively and the decoding efficiency reaches a low value. The value of \(N_{r\max}\) also affects the coding efficiency. A larger \(N_{r\max}\) may lead to a relatively low \(\eta\) because the nonuniform distribution level of data packets selection is higher and some data packets may only have small chances to be included in the output encoded packets. Next we discuss the performance of two sender case. In the two senders case, each sending node sends packets to the receiver with equal probability. Figure 8 presents the results under this assumption. Compared with two nodes data transmission in Figure 7, the three nodes coding scheme is a bit inefficient. This is because the two senders have a certain probability of sending duplicated  
Figure 6: Average number of needed output packets for different probabilities of one-degree packets distribution. packets. This probability is higher when we increase the number of low degree encoded packets. From the results we can also see that a large \(N_{r\max}\) in case 6 can reduce the duplicated packets sending and improve the coding efficiency in the two senders case. From the Figures 7 and 8 we can conclude that case 3 can work well in both scenarios and we will use case 3 in the following simulations. To further verify the effectiveness of our chosen degree distribution, we present the statistical data of case 3 in perfect channel. The results are shown in Figure 9. From this figure we can see that the decoding process can complete successfully within 100 received packets at a high probability. Although the two sender case performs worse than one sender case, the probability of over 120 encoded packets is less than 5%. So the choice of our degree distribution can satisfy our design. For practical applications, the choice of degree distribution should consider the channel condition and node density. If the channel condition is good and few nodes can be used for auxiliary transmission, we prefer low average degree distribution and vice versa.