## 4 Performance Analysis of QoS Metrics
### Analysis of Throughput Considering Data Encryption and Deployment Scenario  
The baud rates define how fast the data transfers, i.e., the data transfer rate through serial ports. Thus, it is one of the primary and important factors of the overall throughput of communication. However, other parameters, such as the size of the packets and the deployment scenario, which controls the transmission medium and LoS, may limit the data throughput significantly. The data throughput of the Zigbee protocol can reach up to 250 Kbps depending on the number and types of nodes, transmission medium, operating frequency, and allocated bandwidth [54]. However, it greatly varies and is reduced down to 4.5-5 Kbps in a real-world scenario for point-to-point communication with actual transceivers as presented by [55]. This study by [PERSON] et al. considered only the baud rates and packet size as the performance parameters of throughput. However, it is also important to understand how the throughput changes with deployment scenario and the data encryption. Thus, our work performed these studies and presents a comprehensive analysis of throughput. For indoor scenarios, the study was performed by deploying the coordinator node at C\({}_{1}\) and the end node at E\({}_{30}\), which was at 30 m distance from each other as depicted by Figure 4. For the outdoor study, the deployment scenario was the same, but it always maintained a direct LoS and was implemented in an open parking lot to experience usual outdoor interference. Figure 14 presents the throughput vs. packet size at three different baud rates--9600, 57,600, and 115,200 for two different deployment scenarios. The study shows that the throughput performances of non-encrypted communication are slightly better than that of encrypted communication for both indoor and outdoor deployment. This is because of the increased data overheads due to encryption and also because of the additional time, it takes for encrypting and decrypting the data, which is evident from the current consumption and latency study as presented earlier in Sections 4.1.2 and 4.3. On the other hand, transmission throughput is highest for the highest possible baud rate of 115,200 with the module XBee S2C for all the different packet sizes and deployment scenarios and it is lowest for the lowest considered baud rate of this study, which is 9600. Thus, the highest possible baud rate that is supported by the network devices is always preferred. For 10 and 60 bytes/packet with 115,200 bps, AES encryption decreases the throughput by 13.92% and 3.84%, respectively, for indoor deployment, which is 8.89% and 2.77%, respectively, for outdoor deployment. It is evident from the analysis that the percent decrease in throughput due to encryption is significantly improved for larger packet sizes for both scenarios. This happens as the data overhead for the encryption remain the same even though the encrypting and decrypting times vary with the variations of the packet sizes. It is another important aspect and interesting topic to study how the throughput is affected by the indoor deployment i.e., the non-LOS medium, multi-path  
Figure 13: RTL performances of one-hop and two-hop communication with and without AES encryption. propagation, and interference of the co-existing technologies, such as Wi-Fi and other RF technologies on the same ISM band. The throughput increases by 8.89% and 3% for 10 and 60 bytes/packet, respectively, when the network deployment scenario switches from indoors to outdoors for non-encrypted communication, which is 13.92% and 4.08% for encrypted communication. However, the overall throughput of the network can be increased significantly by deploying more router nodes, but this will increase the latency and the overall network cost. This is the tradeoff of the throughput and latency, which plays a great role in Zigbee network designing.