## 4 Network Performance
### XMesh
\[PRR_{i}=\frac{received_{pkt{s_{i}}}}{generated_{pkt{s_{i}}}} \tag{1}\]  
\[PRR_{network}=\frac{\sum_{i}^{N}received_{pkt{s_{i}}}}{\sum_{i}^{N}generated _{pkt{s_{i}}}} \tag{2}\]  
_Packet Success Rate (PSR):_ this is an indicator to evaluate the probability that a packet has to be successfully transmitted to the parent node at any time, giving an estimate for the quality of the link as defined in Equation (3). Similarly, it can also be computed at the network level by aggregating the values from all nodes as shown in Equation (4). \[PSR_{i}=\frac{generated_{pkt{s_{i}}}+forward_{pkt{s_{i}}}-dropped_{pkt{s_{i}}}} {generated_{pkt{s_{i}}}+forward_{pkt{s_{i}}}+ retransmitted_{pkt{s_{i}}}} \tag{3}\]  
\[PSR_{network}=\frac{\sum_{i}^{N}generated_{pkt{s_{i}}}+forward_{pkt{s_{i} }}-dropped_{pkt{s_{i}}}}{\sum_{i}^{N}generated_{pkt{s_{i}}}+forwarded_{pkt{s_ {i}}}+ retransmitted_{pkt{s_{i}}}} \tag{4}\]  
The PRR and the PSR indicators provide two complementary measures about the network performance. The PRR reflects an end-to-end behavior and it is directly influenced by the WSN routing protocol; on the other hand, the PSR provides a measure of link quality between the sending node and its parent node, corresponding to a local characteristic. The PSR is influenced by both the routing protocol (_i.e._, parent selection) and the external environment (_i.e._, noise and interference causing packet corruptions and retransmissions). Figure 5: (**a**) CDF percentage of duplicate packets received per node for each packet type; (**b**) CDF percentage of each duplicate packet type: duplicates at the origin node and duplicates along the path. Consolidated results at the network level are presented in Table 5. It shows that there is a slight improvement in the network PRR during period P2 compared to period P1, although P1 has a higher PSR. The results for sub-periods, P1a and P2a, illustrate the impact of factors that arise from the long operational time periods. P1a reached the highest network PRR at 61.04%, a 74% increment compared to that of the full period P1. On the other hand, P2a only reached 42.16% network PRR, a 16% improvement compared to that of the entire period P2. This smaller difference in P2 indicates that during this period the network topology presented some additional problems that could be associated to increments in the network traffic. Similarly, the sub-periods show the potential performance of the network for longer time periods. Relating the above results with field observations, it was noticed that during P1 the network performance was highly impacted by more failures, resulting in major network partitions disconnecting nodes in Sites 2 and 3 from Site 1. During P2, with the additional two IRIS relay nodes, major network partitions between Site 1 and the remaining testbed were mostly resolved and the network performance was slightly increased. However, during that time the network was suffering some degradation of the link quality, reflected by the reduction of the PSR. As a reference for these results, the indoor experiment presented on [43] obtained 86% packet success rate for MicaZ motes running TinyOS. Although the WSN motes in the ASWP testbed are running a different routing protocol, this significant difference in the PSR reflects the impact of the outdoor environment on XMesh. The effect of the number of connected nodes in the network is illustrated in Figure 6, where the network PRR is plotted as a function of the number of connected nodes for each month in the time periods P1 and P2. It can be seen that for similar numbers of connected nodes, major changes in the network PRR occur, which are the result of variations in the network topology as different nodes leave and enter the network (e.g., after battery depletions and network maintenance). Examples of these observations are the highest PRRs in the figure, which correspond to 19 and 16 connected nodes, respectively; nevertheless, 20 connected nodes produced the lowest PRR during these time periods.