## 4 Experiments
### Effect of Sleep Modes on Packet Loss  
We first examine the impact of putting nodes to sleep mode on packet loss, which is mainly due to the packets lost during the intervals between the instant that a neighbour goes to sleep and the time that it discovers that the neighbour is sleeping (no hello messages have been received during the time-out interval), after which it will start queuing the packets; packets may also be lost while the neighbour is entering the suspended state and is still replying to the hello messages but does not process the incoming traffic.  
In Figure 5 the packet loss is plotted _versus_ the proportion of time that nodes are ON, which is  
\[R_{on}=\frac{T_{on}^{avg}}{T_{cycle}} \tag{1}\]  
where \(T_{on}^{avg}=(T_{on}^{max}+T_{on}^{min})/2\) is the average time the nodes are ON.  
For the purposes of analysis, we take into consideration only experiments 2-6 and exclude the two extremes where the nodes are always OFF (experiment 1) or always ON (experiment 7). We observe that for the experiments 2-6, the packet loss is relatively stable, approximately 12%. This is expected, since we send traffic at a low rate to avoid network congestion and therefore packet loss is mainly due to the time it takes for a node to discover that a neighbour is asleep and start queuing the outgoing packets. Thus, packet loss seems to depend on the frequency of the hello messages and the timeout interval set. For comparison reasons, we repeated the experiments with \(T_{cycle}=50s\) and the same values of \(R_{on}\) (details described in Section 4.3) and as we can see in Figure 5 (right side) the packet loss is again relatively stable, at approximately 6%. This suggests that indeed the packet loss depends on the time it takes for a node to realise that a neighbour is asleep and is stable for the same \(T_{cycle}\), while for larger \(T_{cycle}\) the packet loss is smaller as the total number of times the nodes are turned OFF are fewer. For our experiments, the hello messages between neighbours were sent every 1 s and the timeout was double that value, so as to avoid falsely identifying a neighbour as asleep and creating unnecessary queues. The packet losses could potentially be further reduced if the nodes signalled their neighbours just before they entered a sleep state.  
Figure 4: Histogram of delay measurements of experiment 6.  
Figure 6 shows the average number of times that the nodes are turned ON/OFF in all experiments. The intermediate nodes turn ON/OFF approximately 125 times during each experiment, with the exception of experiments 1 and 7 where either all nodes are constantly ON or nodes are kept OFF until the end of the experiment. This was expected since we have kept the \(T_{cycle}\) constant. This allows consistency and enables us to compare the QoS values of the difference experimental cases and also justifies the relatively stable values of the packet losses mentioned before. Also, the measured fraction of packets that find an open path to the destination without queuing in any of the intermediate nodes are shown in Figure 7.  
Figure 5: Network average packet loss _versus_ average ON rate \(R_{on}\) for \(T_{cycle}=25s\) and \(T_{cycle}=50s\).  
Figure 6: Total number of times that nodes were turned OFF/ON during each experiment.