## 2 Materials and Methods
### Background
#### 2.1.1 Capacity and Coverage Challenges Due to Radio Spectrum Issues and Collisions  
LoRaWAN networks are being deployed following the cellular network model that defines network operators as providers of connectivity-as-a-service. This model is making GWs covering large areas while running applications from different vendors, which is making the co-ordination of an increased number of EDs a challenge [8]. Along with this situation, it is a fact that unplanned and uncoordinated deployment of LoRaWAN GWs, along with other LPWAN deployments accessing the same radio spectrum, could increase collisions which cause decrease in the capacity of LoRaWAN deployments. To overcome collisions in LoRa, a higher spreading factor usage is recommended to cope with higher interference levels, but this is only a partial solution because of the duty cycle time on air limits [8]. As SFs increase, the channel will be occupied for more time, increasing the possibility of collisions between packets that are concurrently transmitted even within the same network. On the other hand, because different SFs are mutually orthogonal (or pseudo-orthogonal), multiple frames can be demodulated by a GW at the same time in the same channel without collisions, as long as each one is transmitted with a different spreading factor (SF7 to SF12) [1]. It has been proved that as the number of IoT devices increases within an LPWAN, the blocking probability and probability of duty cycle violations also increase, especially in indoor cases, where there is a 5% probability of duty cycle violations for five EDs per user [15]. While the duty cycle increases the network's robustness against interference, it also limits the downlink gateway transmissions, causing delays, which is a fact that is perceived as a general protocol limitation [19]. In detail, maximum duty cycle depends on the band, and if no LBT is used, varies from 0.1 to 10% of spectrum access [2]. This percentage is defined over 1 h and describes the maximum accumulated time that one ED can occupy a specific channel. For example, 1% allows 36 s of transmission within an hour [4]. This means that if the size of a packet is 50 bytes and the data rate is 293 bps, it needs 1.365 s to accomplish a transmission of a single packet. This implies that only 26 packets can be sent on a 1% spectrum access channel within an hour [2]. To implement these restrictions in practice, LoRaWAN specification dictates that every GW and ED ensures that any two consecutive packet transmissions are separated by at least 99 times the time-on-air of the first packet, where nothing can be transmitted [3]. To accomplish this, each ED calculates the time-on-air for each own packet in each radio channel and follows the duty cycle restrictions [2]. This workflow can be noticed if we attempt to transmit packets with very small intervals, where we will notice in most cases that a transmission was not successful due to duty cycle control and that the sub-band is blocked for a specific duration [16]. Simultaneously, it is proved that each GW can handle thousands of LoRa EDs, which means that some QoS coverage requirements are fulfilled for all six available spreading factor imaginary subnetworks corresponding to each cell area [11]. Because the LoRa physical layer is based on CSS with GPSK modulation and a high bandwidth-time product, the communication is considered somehow protected against in-band and out-band interference [25]. In addition, the GWs apply hardware signal processing techniques (I/Q inversion) when transmitting, to ensure that only EDs can hear the GW and vice versa. These techniques prevent the problem of a transmission of a GW interfering with that of an ED [3]. Nevertheless, bit error rate (BER) performance is mainly affected by possibly the same spreading factor transmissions interference, but also by background noise. While the number of EDs is increasing the amount of collisions is also rising [10].