## 5 Reliable Data Forwarding Algorithm
### Simulation Results  
The reliable data forwarding algorithm was simulated with ZigBee and TUTWSN. ZigBee uses only the primary link, as including alternative links would have required significant modifications to the standard. TUTWSN maintains one alternative link.  
Figure 21 and Figure 22 shows the end-to-end reliability with different offered loads in ZigBee and TUTWSN, respectively. As TUTWSN do not suffer from hidden nodes, the results are identical to the case that did not use the algorithm when the PER is 0%. When packet errors occur, the scheme is able to deliver a packet reliably until the network congests and packets are dropped due to full buffers.  
The effect of practical buffer size limitations with 15 s packet generation interval (15 B/s aggregate load) is presented in Figure 23 and Figure 24. The reliable forwarding algorithm has better reliability with the same buffer space than the cases that did not use the algorithm.  
The availability with 12 source nodes and 40 s packet generation interval (5.5 B/s aggregate load) is presented in Figure 25 and Figure 26. With the reliable forwarding, the interval that is required to reach a certain availability is significantly smaller at higher PER values. In ZigBee, the interval for 99.9% availability does not increase drastically until after 30% PER. The similar PER threshold without the reliable data forwarding was 20%.  
Figure 20: Complexity of different routing schemes with a route consisting of 5 hops. Only one hop is experiencing packet errors.  
Figure 21: The effect of network load to the goodput in ZigBee using the reliable data forwarding.  
Figure 22: The effect of network load to the goodput in TUTWSN using the reliable data forwarding.  
Figure 23: The effect of buffer size to the reliability in ZigBee using the reliable data forwarding algorithm (12 sources, 15 B/s offered load).  
The end-to-end latencies with and without the reliable data forwarding algorithm in ZigBee are presented in Figure 27. The algorithm does not increase latency, when the PER is 15%. On the higher error  
Figure 24: The effect of buffer size to the reliability in TUTWSN using the intermediate buffering scheme algorithm (12 sources, 15 B/s offered load).  
Figure 25: Availability in ZigBee using the reliable data forwarding (12 sources, 5.5 B/s offered load).  
Figure 26: Availability in TUTWSN using the reliable data forwarding (12 sources, 5.5 B/s offered load).  
rate, latency increases due to retransmissions. Without the algorithm, network congests after 70 B/s offered load (latency rises rapidly in the figure) at 30% PER. With the algorithm, the congestion occurs earlier at 50 B/s, thus indicating that the algorithm causes 30% overhead.?From the results we conclude that the algorithm is feasible for all purposes up to 30% PER. On a higher PER, the overhead and latencies increase significantly and the suitability of the algorithm depends on the application scenario. That is, the algorithm is still usable for example on lightly loaded measurement networks.  
According to simulations, the reliable data forwarding algorithm guarantees reliability when the network traffic is sufficiently low. The drawback of the algorithm is that it slightly increases traffic due to retransmissions, which can lead to congestion. However, with the realistic PER values of 0%-30% the congestion occurs only slightly earlier than in the network without the algorithm. The effect of such congestion could be reduced by limiting the maximum buffering time for a packet on a node. Additionally, different buffering priorities would enable low latencies for high priority traffic.