# A Novel Cross-Layer Routing Protocol Based on Network Coding for Underwater Sensor Networks
## 5 Performance Evaluation
### Effects of Degree Distribution  
In this part, we discuss the effects of different degree distributions and present a rough optimal degree distribution for our design based on the simulation results. Firstly, we discuss the effects of one-degree packets. The channel models here are considered to be a perfect channel (PER = 0) and an erasure channel (PER = 0.2), respectively. The number of original data packets is set to 60 and we calculate the average value of 500 trials for each test. Figure 6 presents the average number of needed output packets \(N_{out}\) under different probabilities of one-degree packets distribution \(\rho_{1}\). Here we limit the maximum number of data packets in an output packet \(N_{\rho\max}\)=6 and then the length of code vector can be shortened to 48 bits. Without loss of generality, other degree probability distributions are set to \(\rho_{i}=(1-\rho_{1})/\big{(}N_{\rho\max}-1),i=2,\cdots N_{\rho\max}\). In addition, we define \(N_{\rho\max}=6\) in this simulation, which is the maximum number of times that a data packet can be used in all output encoded packets. When there is only one sender under perfect channel, the average number of needed packets fluctuates smoothly with varying one-degree packet distributions. As we have discussed in Section 4.3.2, the start and continuation of decoding rely on the reception of one-degree packets. If the number of one-degree packets is not enough, the receiver needs more output packets for successful decoding. However, too many one-degree packets may lead to high probability of decoding failure because only a few output packets have overlap between each other. The decoder is inefficient as a large number of received packets have already been recovered by the receiver. This situation is extremely obvious when the channel have a certain packet error rate and \(\rho_{1}\) is close to 1. The number of needed output packets is over three times of the original data packets in this case. As we use joint coding/decoding method, we should consider the situation when the received packets come from several independent nodes. The following assumptions are set in the next simulation: There are three nodes involved in data transmissions, one for receiver and the other two are senders. In this two senders case, each sending node sends packets to the receiver with equal probability. From Figure 6 we can see clearly that the performance of two sender case is more sensitive to the number of one-degree packets compared with one sender situation. If the output packets contain too many one-degree packets and the average degree is too low, the sender need to send much more packets so that all the original data packets are chosen at least once in the received encoded packets. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Data Rate & 10 kbps \\ Center Frequency & 12 kHz \\ Bandwidth & 10 kHz \\ Mode Type & \(FSK\) \\ Packet Error Rate Model & \(ns3::\textit{LunPhyPerNoCode}\) \\ Signal Noise Model & \(ns3::\textit{LunPhyCalcSintDefault}\) \\ Acoustic Propagation Speed & 1500 m/s \\ UAN Propagation Model & \(ns3::\textit{LunPropyModelThorp}\) \\ MAC Model & _CWMAC_ \\ Mobility Model & _RandomWalk2 Dmobilitymodel_ (speed: 2\(\sim\)4 m/s, directions \\  & are choosen randomly) \\ Energy Model & _Acousticdemenergymodel_ (TX: 50 W, RX/Idle:158 mW, \\  & Sleep:5.8 mW) \\ Transmission Output Power & 147 dB _reu_ Pa \\ Required SNR for Signal Acquisition & 10 dB _reu_ Pa \\ Payload of DATA & 64 Bytes \\ Number of Data Packets in Each Block & 60 \\ Deployment Region & 3D region of 1.5 \(\times\) 1.5 \(\times\) 1 (length \(\times\) breadth \(\times\) depth) km\({}^{3}\) \\ Node Number & 10-50, nodes are randomly deployed \\ Sink Node Position & \((1500,1500,0)\) m \\ Source Node Position & \((0,0,1000)\) m \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation Parameters. From the above analysis we can see that the decoding performance can be improved with more one-degree packets and higher average degree value.