# Emergency Communication System Based on Wireless LPWAN and SD-WAN Technologies: A Hybrid Approach
## 5 Scenario and Simulation Report
### Scenario 1: LPWAN Simulation  
To simulate the LoRa-based wireless network, we considered a scenario that requires real-time end-node tracking by measuring the 3-axis sensor position. The measurements are simulated on the Network Simulator 3 (NS3) using the LoRaWAN open-source module for the NS3 tool. The Packet Delivery Ratio (PDR) simulation results are shown below, along with the first deployed scenario. We used a two-story concrete building as the foundation  
Figure 4: ECS utilized architecture and network topology. Figure 5: Real-time Sensors: Data Visualization. for our hypothetical situation. The structure's measurements were 10 m by 20 m by 6 m, with each story standing 3 m tall. We took into account the fact that each floor had four rooms and that all outside walls had windows. This could represent a small industrial building where the employees carry the end nodes in their bags to use in emergencies. There are twenty nodes randomly installed inside the building, and a LoRa gateway on the second floor. For this case scenario, we did not consider any plastic or metal installations or other obstacles within the building. Figure 6 shows the 3D dimensions of the building's LoRaWAN topology. We used a Python script to accurately draw the nodes and gateway inside the building [48]. Table 5 contains the NS3 used 3-axes coordinates of the LoRa elements  
Each LoRa node was programmed to sample a 3-axe sensor every 5 min for 24 h. A 20-byte-long message containing the five-digit decimal precision position of the node was harvested from each sensor and used as the node's payload. LoRa modulation has six spreading factors (SF) from SF7 to SF12. SF influences time-on-air, data rate, battery life, and receiver sensitivity. Compared to a higher SF, for fixed bandwidth and coding rate, a lower SF provides a higher bit rate. In our simulation, we used SF7. The propagation loss  
Figure 6: LoRaWAN 3D Topology Inside Building. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**LoRa Element** & **X Position (m)** & **Y Position (m)** & **Z Position (m)** \\ \hline gateway & 10.0 & 5.0 & 5.0 \\ node 1 & 15.8 & 4.2 & 4.6 \\ node 2 & 3.1 & 7.7 & 4  
model we used was the Log-Distance Path Loss model, in which the path loss exponent was empirically set to 1.7 as the simulation is taking place indoors. The simulation also considers losses due to shadowing. The simulation provides information on the total number of packets sent throughout the network from each node to the gateway, the number of packets interfered with, the number of packets successfully re-received, the number of packets lost because there were not enough receiving nodes available to communicate with the gateway, the number of packets lost from the gateway because the signals were weak and below receiver sensitivity, and the number of packets lost by a busy transmitting gateway. The Packet Delivery Ratio (PDR) is calculated by dividing the total number of packets sent by the number of successful packets. A PDR of 96.7% (1) was attained for this example scenario with the gateway located at the building's geometric center. On the other hand, the Lost Packet Ratio (LPR) was 3.3% (2), but no packet was lost because of a bad connection between the nodes and the gateway. There were no low sensitivity losses or losses due to a busy gateway. Other experimental results have shown that LoRa technology may be considered stable in the worst fading case scenarios, where packet loss is 18% [49]. Additional research has demonstrated that the channel condition and packet collision can both have varying effects on LPR. The primary causes of LPR are the distance of transmitted data and the traffic patterns of the end devices. A summary of these findings and their implications provides crucial direction for future large-scale LoRaWAN network deployments [50]. In general, in LoRaWAN applications, an LPR between 2-10% is acceptable.