# On the Use of LoRaWAN for Mobile Internet of Things: The Impact of Mobility
## 3 Mobility Models and Methodology
### Methodology and Simulation Setup  
This research was carried out using the Framework for LoRa (FLoRa) [21] in combination with the INET framework [22], based on the OMNeT++ simulator [23]. FLoRa is an open-source simulation library that provides implementations for the LoRaWAN MAC and physical layers; it supports bidirectional communication between the components of the LoRaWAN architecture: end devices, gateway devices, and network servers. FLoRa provides models and implementations for all LoRa layer features, such as the spreading factor (SF), code rate, frequency, transmission power, and bandwidth. The impact of mobility on the performance of LoRaWAN for the mobile IoT was investigated comprehensively using simulation experiments. Random waypoint and Gauss-Markov mobility models were used to discover the possible effect of mobility on the overall performance of the LoRaWAN network. Furthermore, the stationary model was also used as the baseline, where LoRaWAN devices were kept static throughout the duration of the experiments. The stationary model is the conventional model most commonly used for simulating LoRaWAN networks; it was used here as a reference model for comparison purposes. In this study, two different main scenarios were considered--namely, a large-area scenario, and a small-area scenario--along with a varying mobility speed, different mobility models, and different message payloads. To simulate a large area, a grid square of 2000 m \(\times\) 2000 m was used; it contained four static gateways located at each corner of the square. The gateways were connected to the LoRa network servers. Figure 1 shows the placement of the gateways within the simulation area, as well as the overall structure of the simulated network. This scenario was used to investigate the effect of mobility for environments consisting of up to 5000 mobile end devices. Regarding the small simulation area, the study used a grid square of 1000 m \(\times\) 1000 m with two gateways placed at two opposite corners, facing one another, to cover most of the simulation area, as shown in Figure 2. However, the number of participating mobile devices for such scenarios was limited to 2500 end devices. Figure 1: Large network layout and gateway distributions. The collision and communication ranges for each end device are considerably reliant on many physical layer parameters, such as the transmission power, code rate, frequency, and bandwidth. Specifically, the transmission is regarded as successful when the received power is larger than the sensitivity of the receiving device. The received power is mainly affected by the amount of transmission power and the loss of signal, which can be caused by shadowing and attenuation. The log-distance model for path loss with shadowing [24] was used to model the calculation of path loss. This model relies on the distance between the sender and the receiver. The utilized path loss configuration parameters were derived from a real experiment that was performed in [25]. These parameters suit an environment similar to a suburban environment with few buildings. Regarding the transmission interference and collision, the collision model that was proposed in [26] was used in this study. According to this model, two transmissions can collide with one another if they are in a non-orthogonal channel and overlap in time. However, if the transmissions are in an orthogonal channel, they do not interfere with one another; hence, collision is avoided. Table 1 lists the used configuration parameters for the simulation experiments. Each individual scenario was repeated five times, and the reported results are the average of these repetitions. The reported results were extracted from 2850 runs in total for all of the different simulated scenarios. Each individual experiment was set to run for six days, with the first day used as a warming-up period. Moreover, the SF for each end device was randomly chosen at the beginning of the simulation from the available SFs (7-12).