## 4 Network Performance
### XMesh
With the information provided by the node health data in XMesh, duplicate packets generated at the origin node and duplicate packets created at forwarding nodes can be distinguished. This classification is possible because if duplicate packets are generated at the origin node, then the retransmission counter is updated before each attempt. Therefore, if a packet is received with the same sequence number (_i.e._, node health packet counter) and different content due to the retransmission counter increment, then it corresponds to a packet duplicated at the origin. Otherwise, if a duplicate has the same sequence number and the same content, then it corresponds to a packet duplicated by one of its forwarding nodes. The increment in the number of retransmissions of the forwarding nodes will be reflected in their own node health packets. In Figure 4(a), the cumulative distribution function (CDF) for the percentage of duplicate packets received from each node in the three packet types is presented. Around 95% of the nodes present less than 10% of duplicate packets and there are a few outlier nodes that can have up to 20%. It can also be seen that when comparing results for periods P1 and P2, there is a slight difference because a few nodes presented a higher number of duplicate packets during P1, including outlier nodes which were mostly due to hardware and software failures. Figure 4(b) shows the percentage corresponding to each type of duplicate based on the number of duplicate packets received at the sink: packets duplicated at the origin node or packets duplicated at forwarding nodes along the path. The results obtained reveal that during P1, on average, 95% of the duplicates received from each node correspond to packets that were duplicated along the path, and only the remaining 5% were duplicated at the origin nodes. During P2 the duplicates are reduced compared to P1; however, most of the received duplicate packets, around 85%, are associated to duplications along the path. These results reveal the possibility that duplicates, and therefore the number of retransmissions and dropped packets, may be associated to specific nodes in critical locations. Those critical nodes can be identified as the same nodes with higher percentages of duplicates at the origin node in Figure 4(a). This is because the critical nodes may be causing the duplications along the path for other nodes located farther from the base station, when attempting to forward their packets. Once duplicate packets are removed, the statistics included in the node health data can be used to get a better idea of the network behavior. As mentioned in the previous section, XMesh's node health statistics define counters for node generated packets, forwarded packets, retransmissions, and dropped packets. Based on these counter values, the following indicators were adopted: \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Period**} & **Node Health Data Duplicate \%** & **Node Health Data Duplicate \%** & **Sensor Data** & **Neighbor Health** \\  & **(with Seq. Number)** & **(with Our Algorithm)** & **Duplicate \%** & **Data Duplicate \%** \\ \hline P1 & 4.10\% & 4.04\% & 3.82\% & 3.65\% \\ P2 & 3.16\% & 3.07\% & 3.01\% & 3.08\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Percentage of duplicate packets received for each packet type per time period (\(\partial T=2\) min) during the two XMesh evaluation periods. _Packet Reception Rate (PRR):_ this value indicates the amount of data collected as the ratio between packets generated at an original sending node and packets received at the sink from that node, as defined in Equation (1). This indicator can also be computed for the entire network by aggregating the packets received and generated from all nodes, as shown in Equation (2), where \(N\) is the number of connected nodes in the network.