# A Novel Cross-Layer Routing Protocol Based on Network Coding for Underwater Sensor Networks
## 5 Performance Evaluation
### Effects of Loop Filter Parameters  
In this section, we will discuss the impact of loop filter parameters. The design of loop filter parameters is an important part in our protocol and the convergence rate and stability of loop filter can greatly affect the protocol adaptation to the channel variance. We set a simple four nodes data transmission scenario to verify the adaptation of NCRP. There is one sending node, two relay nodes and a destination node in this simulation. These nodes are distributed in a straight line and the distance between each two neighborhood nodes is 400 m, so the total transmission range is 1200 m. The number of data packets in a block is \(K=60\) and the initial window size \(W_{0}=N=80\). We keep the value of \(K\) unchanged but the window size \(W_{i}\) (the output packets \(N\) in each node for the \(i\)th block) varies with channel changes. We will analyze the following five cases:  
* Case 1: \(k_{1}\)=\(2^{-7}\), \(k_{2}\)=\(2^{-2}\).
* Case 2: \(k_{1}\)=\(2^{-8}\), \(k_{2}\)=\(2^{-2}\).
* Case 3: \(k_{1}\)=\(2^{-8}\), \(k_{2}\)=\(2^{-3}\).
* Case 4: \(k_{1}\)=\(2^{-6}\), \(k_{2}\)=\(2^{-3}\).
* Case 5: \(k_{1}\)=\(2^{-9}\), \(k_{2}\)=\(2^{-3}\).  
Here \(k_{1},k_{2}\) are from Equation (9). Figure 10 shows the window size estimation curve for case 1 and case 3. From the figure we can see that NCRP can obtain the redundant information and complete convergence in a short period of time. However, different nodes may converge to different values. For the source node, it need to send about 80 packets to relay node 1 for successful decoding. This is because there is a certain packet loss rate in the underwater channel and the source node is the only sender for relay node 1. For other nodes, we do not need to send so many packets any more because a large proportion of packets have already been sent by the previous nodes and the receivers only need a few supplementary packets for successful decoding. So the relay nodes only need to send about 20 packets which is much less than that sent by the source node. Figure 10a shows the window estimation curve for case 1 and we can see clearly that the window size estimation can complete convergence very fast (within 10 sending times). However, the value fluctuates fiercely. In addition, Figure 10b shows that the parameter settings of case 3 may extend the time for convergence but the curve seems much more stable than that of case 1.  
Next we will discuss the performance of different loop filter parameters. For the sake of easy observation, we focus on the convergence curve of relay node 2. We will analyze the convergence rate and variance under different cases. The results are shown in Figure 11. From the figure we can see that case 5 has the minimal variance while the variance in case 4 is the largest. It means that a  
Figure 9: The percentage of packets for successful decoding in 500 trials.  
pair of small \(k_{1}\) and \(k_{2}\) can reduce the adverse effect of channel noises and lead to a stable window estimation value. However, the convergence speed of case 5 is the lowest which means small \(k_{1}\) and \(k_{2}\) decrease the effect of feedback value and lead to a long time for loop convergence. Considering the practical requirements in most underwater applications, we prefer case 3 which is a tradeoff between convergence speed and stability.