# Performance of Narrow Band Wide Area Networks with Gateway Diversity
## 2 Principles of the Lora Modulation  
The principles of the LoRa modulation have been analyzed in detail in the literature along with detailed analytical models [7; 8; 9]. Only the key parameters/performance indicators (KPIs) of this modulation are presented in this section. Let \(BW\) represent the bandwidth used per channel. Let SF represent the Spreading Factor that is being used per channel and let CR represent the Forward Error Correction (FEC) code rate. With these definitions, the LoRa symbol duration, chip duration, bitrate, and chirp rate can be calculated as follows:  
\[\text{Chip duration:}\ T_{c}=\frac{1}{BW}\ [\text{s}] \tag{1}\]  
\[\text{Symbol duration:}\ T_{s}=2^{SF}\ T_{c}\ \ [\text{s}] \tag{2}\]  
\[\text{Bitrate:}\ \rho=CR\times SF\times\frac{1}{T_{s}}\ [\text{b/s}] \tag{3}\]  
\[\text{Chirp rate:}\ \mu=BW\times\frac{1}{T_{s}}=\frac{BW^{2}}{2^{SF}}\ [\text{Hz/s}] \tag{4}\]  
\[\text{The Bit Energy-to-Noise ratio:}\ \frac{E_{b}}{N_{0}}=\frac{2^{SF}}{SF}\times SNR \tag{5}\]  
The SF determines the number of bits per symbol. Equation (5) shows the required \(SNR\) in relation to the bit energy-to-noise ratio with the processing gain provided by the CSS signal processing. Thanks to this processing gain denoted by \(\frac{2^{SF}}{SF}\), the system is able to recover signals below the thermal noise floor. Hence, sensitivity can be achieved with an \(SNR<0\) dB [7]. For example, the processing gain with SF-11 and SF-8 is 22.6 dB and 15 dB, respectively. The un-modulated transmit signal based on up-chirps with a chirp rate of \(\mu\) can simply be defined as:  
\[s(t)=V\times e^{|2\pi(\frac{it}{2}-\frac{BW}{2})t}\times e^{\langle 2\pi f_{c}t+ \theta\rangle},\ 0\leq t\leq T_{s} \tag{6}\]  
The term \(V\) represents the desired signal magnitude, which is a constant since the modulation is carried in the frequency domain. Such modulations are referred to as constant envelop modulations. This makes the LoRa appealing especially for being able to work with non-linear and efficient power amplifiers. The term \(f_{c}\) represents the carrier frequency. The signal is then modulated by the cyclic shift on the base chirp signal containing \(2^{SF}\) chips spanning from \(-\frac{BW}{2}\) Hz to \(\frac{BW}{2}\) Hz. The base chirp, with slope \(\mu\), wraps around in time within these bounds. When modulated, there are essentially \(2^{SF}\) possible starting points for the chirp to start and eventually wrap around itself. Where the chirp starts (from \(-2^{SF-1}\) and up to \(2^{SF-1}-1\)) carriers the information bits (SF bits per symbol). This is illustrated in Figure 2 for SF-11, with 2048 chips per symbol. The illustrated mapping can be improved with gray coding. Figure 2: The LoRa modulation example in frequency versus time domain with SF-11. Based on Equations (1)-(4), the PHY symbol duration, PHY bitrate, energy per bit, the measured sensitivity, and range versus the spreading factor SF are plotted in Figure 3. As the results show, the conducted sensitivity can be improved by 11.5 dB by changing the spreading factor from SF = 7 to SF = 11. Assuming an outdoor path loss exponent of n = 4, this achieves a range improvement of approximately 100% in meters. However, such improvement comes at an exponential increase in symbol duration and hence, a significant drop in bitrate. This makes the LoRa modulation suitable for applications requiring low bitrates, (e.g., 2 kbps PHY rate with SF-11 with a code rate of 4/5) and low mobility as the channel should be static during the course of much longer packet durations. In order to understand the capabilities and limitations of the LoRa modulation, extensive simulations have been obtained and compared to measurements for benchmarking the simulator. The simulator for the LoRa modulation is originally obtained from [10]. That simulator did not have the capability of injecting Additive White Gaussian Noise (AWGN). The AWGN analysis capability has been added to the simulator. This helped in comparing the simulation results to the data sheet for sensitivity.