## 4 Network Performance
### XMesh
\begin{table}
\begin{tabular}{c c c c c} \hline
**Period** & **P1** & **P1a** & **P2** & **P2a** \\ \hline \multirow{2}{*}{**Range**} & August 2011– & 15 September 2011– & March 2012– & 1 July 2012– \\  & February 2012 & 20 October 2011 & August 2012 & 4 August 2012 \\ \hline \multirow{2}{*}{**Description**} & Before IRIS motes & Sub-period of P1 & After IRIS motes & Sub-period of P2 \\ \hline \multirow{2}{*}{**Deployed Nodes**} & 40 & 40 & 42 & 42 \\ \hline \multirow{2}{*}{**Daily Connected Nodes**} & 39 & 37 & 41 & 41 \\ \cline{2-5}  & **Avg.** & 24 & 22 & 34 & 36 \\ \cline{2-5}  & **Min.** & 4 & 4 & 4 & 25 \\ \hline \end{tabular}
\end{table} 
Table 3: Definitions of the two XMesh evaluation periods and the two sub-periods, including time range, number of deployed nodes, and daily connected nodes (maximum, average, and minimum). from the same node is generated. This assumption limits the interval in which packets could be duplicated and it is denoted as the _effective interval_. Due to the fact that in XMesh there is no synchronization and no global notion of time in the motes, the timestamp of each packet is assigned when they are received at the gateway. Based on this, a delay is defined, denoted as \(\partial T\), which represents the time duration between the moment a packet is generated and the moment the packet is received at the gateway, including processing, queuing, transmission, and propagation delays along the path. This value is considered in the effective interval to avoid any misclassification caused by delays during transit in the network. The procedure is presented in Algorithm 1. ```
Input: Packets from the same node ordered by time and marked as valid packets Output: Packets marked either as valid or duplicate Begin \(\mathit{pkt}_{i}=\mathit{nextValidPacket}()\)do//loop on \(\mathit{pkt}_{i}\)  While \(\mathit{pkt}_{i}\) is valid AND \(\mathit{pkt}_{j}=\mathit{nextValidPacket}()\)do//loop on \(\mathit{pkt}_{j}\)  If \(\left|\mathit{pkt}_{i}.\mathit{time}-\mathit{pkt}_{j}.\mathit{time}\right|<T- \partial T\) then // \(\mathit{pkt}_{j}\) is in the effective interval of \(\mathit{pkt}_{i}\)  If \(\mathit{pkt}_{i}.\mathit{content}==\mathit{pkt}_{j}.\mathit{content}\) then //\(\mathit{pkt}_{i}\) and \(\mathit{pkt}_{j}\) have the same content  Mark \(\mathit{pkt}_{j}\) as a duplicate of \(\mathit{pkt}_{i}\)  End  Else //\(\mathit{pkt}_{j}\) is on the next interval  Break loop on \(\mathit{pkt}_{j}\)  End End \(\mathit{pkt}_{i}=\mathit{nextValidPacket}()\) //end loop on \(\mathit{pkt}_{i}\) End
```  
**Algorithm 1**Identifies and Removes Duplicate Packets  
The algorithm validation was performed using the node health data as truth data. Using the node health packet counter, the truth values for duplicate packets received at the gateway were identified. Then, the counter information was removed from the received node health packets and the duplication deletion algorithm was executed. Obtained results indicate that the algorithm does not misclassify any valid packet as a duplicate, giving zero false positives; however, the algorithm may not identify some real duplicates (_i.e._, false negatives). The percentage of received duplicate packets calculated for both XMesh evaluation periods, based on an experimental \(\partial T\) equal to 2 min, are presented in Table 4. Based on the results obtained from this validation using the node health data, we believe that the devised duplication deletion algorithm should achieve similar effectiveness for both the sensor data and neighbor health data packets. An additional observation, with respect to the duplicate packets received, is that the percentage is higher for node health data, compared to those of the sensor data. This could be explained as an effect of the end-to-end acknowledgement QoS mechanism used in XMesh, which may increment the number of retransmissions for this type of packet. However, with the information available it is not possible to determine the exact number of retransmissions associated to each packet type.