# Performance Evaluation of LoRa Considering Scenario Conditions
## 3 LoRaWAN  
As explained in previous sections, the LoRaWAN framework defines two well-differentiated layers, the PHY layer, defined by the LoRa modulation, and the MAC layer, defined by the LoRaWAN protocol. Regarding the former, LoRa is a proprietary spread spectrum modulation scheme that derives from Chirp Spread Spectrum (CSS) modulation that focuses on providing robustness to long-range transmissions. LoRa presents three different configurable parameters, namely, Spreading Factor (SF), Coding Rate (CR), and Bandwidth (BW). By tuning these factors, some of the end-to-end communication features can be adjusted, e.g., data-rate, error-correction capability, and transmission range, among others. Regarding the SF, the spread spectrum modulation is performed by representing each bit of information by multiple chips [4]. Thus, the SF represents the ratio between the chip rate and the baseband information rate. Usual SF values range from 7 to 12, so greater SF values increase the robustness of the transmission link by incrementing the receiver-equipment sensitivity at the expense of the transmission data-rate. On the other hand, by decreasing the SF, the data-rate is notably increased but the transmitted signal needs to be received at higher power-level for its properly decoding. Note that a complementary notation to the SF is the so-called Data Rate (DR); in this case, the scale is reversed, so DR0 is equivalent to SF12, and DR5 is equivalent to SF7. From now on, the term DR will be used. With the aim of additionally improving the robustness of the link, LoRaemploys cyclic error coding to perform forward error detection and correction. Such error coding incurs a transmission overhead (extra bits in the LoRa PHY layer payload) that is determined by the CR parameter, which can be set to the following values, 4/5, 4/6, 4/7, and 4/8. Finally, the most employed BW in LoRa transmission is 125 kHz, although bandwidths of 250 kHz and 500 kHz are also supported. More details about LoRa can be found in [4].  
From a higher-layer perspective, LoRaWAN employs a star-of-stars topology that permits end-nodes reaching their corresponding gateway via a direct link (see Figure 2). Due to the energy-related constraints of end-nodes, LP-WAN technologies present a highly limited downlink (transmissions from the base-station down to end-nodes), hence LoRaWAN contemplates the use of three different types of end-devices according to their energy limitations and downloading needs: Class A devices are just able to receive transmissions after each uplink connection by opening a listening window. Class B devices are able to accept downlink transmissions during additional scheduled downlink windows. Finally, Class C devices are continuously listening to the channel so they can receive downlink connections at any time. The most employed devices, Class A, present an optimized battery duration of about 5 years [4]. In its regular use, LoRaWAN makes use of the ISM bands, although it can be configured to support licensed spectrum as well. Thereby, LoRaWAN is capable of demodulate signals received 19.5 dB below the noise floor. This allows to achieve very long transmission distances far from those reached by the usual cellular technologies. Depending on the configuration of PHY layer parameters, the data-rate ranges from 0.25 kbps (0.98 kbps in North America due to FCC (Federal Communications Commission) limitations) up to 50 kbps. The maximum permitted payload length is 242 Bytes, which although limited, may satisfy the demands of certain services. Finally, LoRaWAN also considers security issues, so a cryptographic suite based on AES encryption is included by default in order to secure the transmitted data at different OSI levels.