# Experiencing LoRa Network Establishment on a Smart Energy Campus Testbed
## 2 LPWAN and LoRa
### LoRa PHY  
LoRa PHY uses a chirp spread spectrum (CSS) modulation technique, where a chirp represents a sinusoidal signal of a frequency increase or decrease over time. The CSS uses broadband linear frequency-modulated pulses to encode information by sweeping the frequency for a certain period of time (see Figure 3). LoRa PHY is robust to channel noise because it occupies the entire channel bandwidth. It also mitigates external noise by performing frequency hopping on every transmission [7]. Since a receiver demodulates a unique pattern, it can detect signals lower than a noise floor and has a high tolerance for frequency misalignment between transceivers. LoRa PHY achieves wider coverage at the same power consumption as other communication systems that operate with a higher-frequency carrier. The use of sub-GHz leads to a lower data rate than that obtained with high frequency, but it is  
Figure 1: The LoRaWAN (MAC) protocol stack is implemented on top of LoRa modulation (PHY). The figure draws the corresponding concept in [6]. Figure 2: A LoRa network consists of nodes, gateways, network servers, and application servers. The figure draws the corresponding concept in [6]. suitable for IoT systems that do not require significant amounts of throughput. In addition, a lower data rate reduces the sensitivity requirements of the receiver because it provides benefits in terms of the error rate. The low-frequency nature increases the possibility of reaching a signal through the diffraction phenomenon, even where the line-of-sight (LOS) is not secured. However, with a slow wireless link, there is a greater possibility of a collision by noise and other signal interferences because it increases the duty cycle. It also increases power consumption at both the transmitter and the receiver as a result of a longer transmission delay. Despite these shortcomings, LoRa communication supports the coverage, power, and data rate required by most IoT applications. LoRa PHY uses 6 spreading factors (from SF 7 to SF 12) and 3 bandwidths (125 kHz, 250 kHz, and 500 kHz). Because of the spread spectrum technique, messages with different data rates can be regarded as a set of virtual channels that are orthogonal to one another. As a result, the overall gateway capacity is increased. To analyze the performance of LoRa modulation, it is necessary to understand the factors that affect the sensitivity of a radio receiver. The equation below represents the sensitivity at room temperature [9]. \[S=-174+10 log_{10}BW+NF+SNR, \tag{1}\]  
where the first term is thermal noise in 1 Hz of bandwidth and influenced by the temperature of the receiver. \(BW\) and \(NF\) denote the receiver bandwidth and the receiver noise determined by the hardware implementation, respectively. Finally, \(SNR\) means the minimum signal-to-noise ratio for demodulation. The bandwidth and SNR are variables that greatly affect LoRa PHY performance. As the bandwidth decreases, the receiver sensitivity increases; it is possible to transmit packets farther with the same signal power. In other words, the required signal power decreases for a transmission over the same distance. However, since the bandwidth is proportional to the transmission rate of the chirp, the use of a lower bandwidth means an increase in transmission time. Likewise, increasing the SNR value improves the performance of LoRa PHY. Two parameters, the SF and Coding Rate (CR), affect the SNR value. The SF is a parameter used for encoding, and a single bit is encoded into \(2^{SF}\) chirps. In general, the higher the SF, the lower the SNR required for demodulation. When the SF is 12, a signal with \(-20\) dB signal power can be demodulated relative to the noise floor. However, a higher SF requires more chips for encoding, so the transmission time  
Figure 3: LoRa uses a chirp spread spectrum modulation technique. The figure also shows that LoRa symbols are modulated over an up-chirp of a 125 kHz bandwidth, and SF 9 takes exactly twice the time of SF 8. The figure was generated using the code in [8]. will be longer.