# A Network Architecture and Routing Protocol for the MEDIcal WARNING System
## 6 Implementation and Performance Evaluation
### Analysis of the Experimental Results  
This subsection presents the results of the experimental assessment of the MEDIWARN communication system. The used performance metrics are the Round Trip Time (RTT) and the Packet Loss Ratio (PLR). The RTT is the time difference between the message sending time at the sender and the reception time of the relevant ack at the same node, measured at the application layer, calculated according to Equation (1):  
\[RTT=AckArrivalTime-SendTime \tag{1}\]  
The PLR, measured at the application layer, is expressed as a percentage of the total number of transmitted messages, according to Equation (2),  
\[PLR=\Big{(}\frac{n_{lostMsg}}{n_{txMsg}}\Big{)}\times 100=\Big{(}1-\frac{n_{rxMsg}}{ n_{txMsg}}\Big{)}\times 100 \tag{2}\]  
where \(n_{txMsg}\), \(n_{lostMsg}\) and \(n_{rxMsg}\) are the number of transmitted, lost and correctly received messages relevant to an end node. Note that a message is considered lost if either the message or the ack is lost. Table 1 shows the maximum and the average RTT measured for each end node and the corresponding confidence interval calculated at 95%. The RTT gives an estimation of the network timings. Figure 4: The scenario considered for the experimental assessment. As expected, the highest average RTT values are obtained by the end nodes that are furthest from the receiver, i.e., N5 and N6, as their way to the destination and vice versa traverses the highest number of hops. The average RTT measured at the nodes N3 and N4 is slightly lower than the one at nodes N1 and N2, although the latter are closer to the sink. In fact, despite being closer to the sink in terms of hop distance than N3 and N4, the higher channel load in the coverage area of the N1 and N2 nodes negatively impacts the channel backoff time, and therefore the timing performance of the IEEE 802.11 CSMA/CA MAC layer. As a result, on average the RTT decreases with the number of hops between the sender and the receiver. However, the channel load also affects the RTT, and therefore in the monotone increasing trend that relates the number of hops to the RTT slight variations can be observed. In Figure 5, which shows the number of messages transmitted and received by each relay node during the experimental assessment, it can be seen that the highest channel load is found nearby the relay nodes R1 and R2, while the load significantly decreases with the distance from the sink. Moreover, the results in Table 1 show that, in the assessed scenario, the maximum RTT is in the order of hundreds of milliseconds, and therefore it stays below the transmission period. As a result, all the messages delivered to their destination will be used for real-time monitoring and displayed on the screen that shows the current patients' conditions. Table 2 shows the PLR measured for each end node. \begin{table}
\begin{tabular}{c c c} \hline \hline
**End Node** & **Max RTT (ms)** & **Avg RTT (ms)** \\ \hline N1 & 200.34 & 10.04 \(\pm\) 0.38 \\ N2 & 214.40 & 10.38 \(\pm\) 0.42 \\ N3 & 151.32 & 7.33 \(\pm\) 0.31 \\ N4 & 196.94 & 8.03 \(\pm\) 0.32 \\ N5 & 157.51 & 11.19 \(\pm\) 0.57 \\ N6 & 220.19 & 11.46 \(\pm\) 0.56 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Maximum and average RTT values measured by each end node during the experimental assessment. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**End Node** & N1 & N2 & N3 & N4 & N5 & N6 \\ \hline
**PLR (\%)** & 0.33 & 1.00 & 0.89 & 0.83 & 2.61 & 3.89 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: PLR for each end node. Figure 5: The workload measured by each relay node in the considered scenario during the experimental assessment. The PLR values obtained are always below 4%. As expected, the hop distance of the nodes from the sink affects the PLR, i.e., the higher the distance, the higher the PLR. However, the low values of the maximum RTT allow retransmitting the messages with a low probability of missing their deadlines. The second factor that affects the PLR is the channel load.