# A Comprehensive Study of the Use of LoRa in the Development of Smart Cities
## 2 Background
### Parameters of Transmission for LoRa  
The implementation of LoRa must be aligned with the functional and operational requirements of each subcategory of the smart city, which implies considering aspects such as real time, security, traceability, integration with GPS, 3D, and drones solutions. This entails considering technical aspects such as frequency of operation, bandwidth, or throughput, but it also implies taking into account elements inherent to the environment, such as the existence of buildings, trees, or other obstacles that affect the line of sight. A literature review indicated that LoRa modulation has a direct relationship with DR (data rate), SF, and BW. The selection of these parameters must be aligned with the functional and technical requirements of IoT solutions. DR is a relationship between SF and BW and can be expressed as follows:  
\[DR\ =\ SF*\frac{1}{\frac{\left[2 SF\right]}{BW}}\ \text{bits/ sec}\]  
Figure 4: LoRa’s generic architecture: end nodes, gateways, cloud/fog, and apps.  
The transmission time or time on air is the sum of the preamble transmission time and the physical layer's message transmission time, which depends on the symbol time that is directly associated with the spread factor and bandwidth.  
\[Ttx\ =\ Tpreamble+TPHYmessage\]  
\[Tpreamble\ =\ Ts*(Npre+4.25)\]  
where _Npre_ is the number of symbols to be used in radio transceiver; the symbol period _Ts_ is expressed as follows:  
\[Ts\ =\ \frac{2 SF}{BW}\]  
\[TPHYmessage\ =\ TS*NPHY\]  
_NPHY_ is the number of symbols transmitted in the physical layer and can be determined as:  
\[NPHY\ =\ 8+\max\left[ceil\left[\frac{28+8 PL+16*CRC-4 SF}{4*(SF-2 DE)}\right]*(CR+4 ),0\right]\]  
where _CR_ denotes the coding rate which can take values from 1 to 4, and _PL_ is the payload rate that indicates the physical payload length in bytes, which is related to the type of application in a smart city. Cyclic redundancy check (CRC) indicates the presence of an error detection field, and DE indicates that the low data rate is enabled.  
The signal values received in IoT solutions must be appropriate for the sensitivity levels of the transceivers. The IoT ecosystem in LoRa networks should consider aspects related to losses and gains from the transmitter to the target receiver:  
\[Prx(dBm)\ =\ Ptx(dBm)+Gsystem(dB)-Lsystem(dB)-LChannel(dB)-M(dB)\]  
where _Gsystem_ and _Lsystem_ correspond to the gains and losses associated with antennas and cables. _LChannel_ is associated with losses related to the transmission medium that will also be dependent on environmental conditions or reliefs in the geographical area. \(M\) is related to the fading margin. Also, in indoor implementations, noise floor should be considered:  
\[Noise\ Floor\ =\ 10*log10(k*T*BV*1000)dBm\]  
where \(K\) is Boltzmann's Constant, and \(T\) is 293 Kelvin or room temperature.  
Summarizing, the most relevant characteristics of LoRa are:  
* High sensitivity in receiving data (End nodes: Up to \(-137\) dBm, Gateways: Up to \(-142\) dBm)
* High tolerance to interferences: resistant to the Doppler effect, multi-path fading, and signal weakening
* Strong indoor penetration. High SF, up to 20 dB penetration
* Low consumption of energy, approximately 10 years of battery lifetime
* Low range of coverage, between 10 to 20 km
* Reduced data transfer
* Point-to-point connection and Gateway connection
* High Scalability. Only one gateway can cover a radius of 15 km
* Two models of service: network provider or private network  
As indicated before, LoRa is a robust non-licensed open technology, and these advantages have motivated researchers to use LoRa in their projects covering urban and rural areas solutions. The aim of the present study is to carry out a comprehensive study of LoRa's impact in developing IoT solutions for different categories of the smart city.