# Combined Use of LoRaWAN Medium Access Control Protocols for IoT Applications
## 6 Performance Evaluation  
Here, an assessment of a LoRaWAN network is presented in which end-devices that use Pure ALOHA and other ones that adopt LBT AFA operate in the same area. Evaluation is performed through simulations using the OMNeT++ simulation environment [74; 75]. In particular, we use the Framework for LoRa (FLoRa) [76], which in turn adopts components of the Internet Networking (INET) framework [77] to simulate the main features of the LoRaWAN class A end-devices, the LoRa physical layer, and the wireless channel. We developed the LBT AFA medium access scheme from scratch. The imperfect orthogonality of the LoRa SFs is implemented as suggested in [67]. Moreover, a duty cycle check function is performed by the end-devices before each message transmission to ensure that the ETSI limitations are met. The assessment is performed in a scenario that refers to a realistic industrial use case and is similar to the one adopted in [78]. The simulated network includes 200 end-devices (e.g., sensors) distributed over a sensing area of 1000 m \(\times\) 1000 m, an NS, and a GW. As discussed in Section 5, a group of end-devices uses Pure ALOHA while the other set of end-devices adopts LBT AFA. The NS and the GW are positioned in the middle of the sensing area. Some end-devices are stationary, and the others are mobile. The stationary end-devices are distributed in the sensing area so that the number of end-devices that use the same SF is always the same for all SFs. The mobile end-devices traverse the sensing area with an average speed of 0.3 m/s following the Chiang-Mobility model as in [38; 47; 79]. In the simulations, the LoRa Path Loss Oulu model [76] provided by FLoRa and the parameters experimentally found in a suburban environment in the work [80] are adopted. The application layers of the end-devices are not synchronized with each other. Consequently, multiple end-devices can generate messages or attempt to transmit at the same time and message collisions may occur, especially in the Pure ALOHA MAC protocol case. Each end-device that uses the LBT AFA MAC protocol reacts to an unsuccessful transmission attempt, i.e., to the case in which a channel is sensed as busy, with the adoption of the AFA technique. As a result, the end-device switches to another channel and restarts the CCA before trying to send. If all the channels available for transmission are busy, the message transmission is delayed, i.e., the end-device waits for a backoff delay before retrying transmission. In particular, the end-devices use an exponential backoff algorithm, and the maximum number of backoffs before dropping a message, here called \(LBT_{backoff,s}^{max}\), is set to 5. In the simulated scenarios, for every transmission attempt, the end-devices that use LBT AFA perform a CCA of 160 \(\upmu\)s, i.e., the minimum CCA interval according to [40] (see Table 2). We consider end-devices that generate and transmit messages with an application payload of 20 bytes, as in [78]. No retransmission mechanism is adopted. For each scenario and channel configuration, we simulate three different message generation patterns, i.e., Case L, Case M and Case H, which correspond to low, medium, and high traffic loads, respectively. In particular, stationary and mobile end-devices generate messages following an exponential distribution (ED) that defines the time interval between the generation of two consecutive messages. The message generation patterns in the three cases are shown in Table 6.  
To better assess the performance of the two MAC protocols, we reduce the DL communications by using unconfirmed messages and disabling the ADR mechanism in all the end-devices. This way, there are no message losses due to the GW switching from receiving to transmitting states to transmit acknowledgments or ADR commands. Furthermore, as discussed in Section 3, the ADR mechanism should be disabled on the mobile end-devices, as generally it is not able to efficiently handle the LoRa runtime configuration.