# Slotted ALOHA on LoRaWAN-Design, Analysis, and Deployment
## 3 LoRa Physical Layer and LoRaWAN  
LoRa is a chirp spread spectrum modulation. It is a signal which frequency increases or decreases with time. It was developed for radar applications; indeed, these signals have a constant amplitude and pass the whole bandwidth in a linear or non-linear way from one end to another end in a defined time. The frequency delta allowed between the receiver (gateway) and transmitters (end nodes) can reach 20% of the bandwidth without impacting decoding performance [5]. This factor is useful to design cheap devices with low-quality crystals, such as commercial products with 80 ppm/\({}^{\circ}\)C. LoRa typical transceiver, such as the SXI276 [35], offers a link budget up to 168 dB with a receiver sensitivity of \(-148\) dBm. Since the symbol period is longer than a typical noise spike, errors generated from these interferences are easily filtered at the receiver side, through error correction codes. Code Rate (CR), Spreading Factor (SF) and Bandwidth (BW) parameters affect the LoRa modulation; indeed, a LoRa symbol is composed of two SF chirps, with a frequency variation that covers the entire band. In LoRa modulation the chirp symbol rate is directly dependent on the bandwidth, this parameter generates different consequences as specified in Ref. [5]: (i) increasing the SF, the chirp frequency span is divided by two; (ii) the period of each symbol is multiplied by two; (iii) since more bits are transmitted in a symbol, the bit rate is not decremented with a two ratio; (iv) the bit rate at given SF is proportional to the bandwidth, doubling the bandwidth will double the transmission rate. Over LoRa modulation, a forward error correction is used to enhance the communication reliability. This method is implemented through four different coding rate (CR) approaches, denoted CR1 to CR4. Lastly, a low data rate drift correction mechanism is applied to increase robustness to frequency variation over the timescale of the LoRa message. Equation (1) gives an estimation of the equivalent bit rate (EBR), detailed information can be found in Supplementary Materials and Appendix A:  
\[\text{EBR}=\text{SF}\,\left(\frac{\text{BW}}{2^{\text{SF}}}\right)\text{CR} \tag{1}\]  
The radio channels used in a LoRa deployment depend on the country rules. In this paper, all the tests are performed in Italy, Europe, where the Industrial Scientific Medical (ISM) band is at 863-870 MHz. LoRaWAN provides nine different channels, where channels from 0 to 9 have a bandwidth of 125 KHz and must support data rates between 0.3 kbps to 5 kbps; indeed, channel ten is allocated for FSK modulation with a bandwidth of 250 KHz. Figure 2 presents the frequency characterization of each LoRaWAN channel. An important feature of LoRa modulation is that the different SFs are orthogonal, this means that a LoRaWAN gateway can receive a multiple transmission on different SFs simultaneously and can apply this methodology for each channel. Due to local rules imposed by ISO/IEC ISM regulations, wireless sensor devices working on ALOHA MAC access cannot occupy more than 1% of the channel time. It is important to underline  
Figure 2: Description of LoRaWAN channels. that, as long as the limitations for each band are respected, each end device can transmit on different channels contained in different sub-bands in order to increase its overall throughput [9]. Class A in LoRaWAN is focused on the end node side; indeed, all transmissions are scheduled by the end node, whereas the server can transmit only in one of two receive windows opened after a previous uplink transmission, as presented in Figure 3. Therefore, any packet that the application level needs to transmit must wait until the next scheduled receive windows. In the MAC layer the typical data packet is composed by a preamble, a physical header, a variable payload length and, lastly, error detection bytes (CRC); additionally, the CRC is present only in the uplink packet, thus the downlink data is often used for ACKs.