# A Study of LoRa: Long Range & Low Power Networks for the Internet of Things
## 3 The LoRa Physical Layer
### Parameters of the Physical Layer  
Several parameters are available for the customization of the LoRa modulation: Bandwidth (\(BW\)), Spreading Factor (\(SF\)) and Code Rate (\(CR\)). LoRa uses an unconventional definition of the spreading factor as the logarithm, in base 2, of the number of chirps per symbol. For the sake of simplicity, this article will stick to this definition. Theses parameters influence the effective bitrate of the modulation, its resistance to interference noise and its ease of decoding.  
The bandwidth is the most important parameter of the LoRa modulation. A LoRa symbol is composed of \(2^{SF}\) chirps, which cover the entire frequency band. It starts with a series of upward chirps. When the maximum frequency of the band is reached, the frequency wraps around, and the increase in frequency starts again from the minimum frequency. Figure 2 gives an example of a LoRa transmission in the frequency variation over time. The position of this discontinuity in frequency is what encodes the information transmitted. As there are \(2^{SF}\) chirps in a symbol, a symbol can effectively encode \(SF\) bits of information.  
In LoRa, the chirp rate depends only on the bandwidth: the chirp rate is equal to the bandwidth (one chirp per second per Hertz of bandwidth). This has several consequences on the modulation: an increase of one of the spreading factor will divide the frequency span of a chirp by two (as \(2^{SF}\) chirps cover the whole bandwidth) and multiply the duration of a symbol by two, also. It will not, however, divide the bit rate by two, as one more bit will be transmitted in each symbol. Moreover, the symbol rate and the bit rate at a given spreading factor are proportional to the frequency bandwidth, so a doubling  
Figure 2: Frequency variation over time of a sample signal emitted by a LoRa transmitter. Data taken from [21]. \(f_{\mathrm{c}}\) is the central frequency of the channel, and \(BW\) is the bandwidth.  
of the bandwidth will effectively double the transmission rate. This is translated in Equation (1), which links the duration of a symbol (\(T_{S}\)) to the bandwidth and the spreading factor.  
\[T_{S}=\frac{2^{SF}}{BW} \tag{1}\]  
Moreover, LoRa includes a forward error correction code. The code rate (\(CR\)) equals \(4/(4+n)\), with \(n\in\{1,2,3,4\}\). Taking this into account, as well as the fact that \(SF\) bits of information are transmitted per symbol, the Equation (2) allows one to compute the useful bit rate (\(R_{b}\)).  
\[R_{b}=SF\times\frac{BW}{2^{SF}}\times CR \tag{2}\]  
For example, a setting with \(BW=125\) kHz, \(SF=7\), \(CR=4/5\) gives a bit rate of \(R_{b}=5.5\) kbps.  
These parameters also influence decoder sensitivity. Generally speaking, an increase of bandwidth lowers the receiver sensitivity, whereas an increase of the spreading factor increases the receiver sensitivity. Decreasing the code rate helps reduce the Packet Error Rate (PER) in the presence of short bursts of interference, i.e., a packet transmitted with a code rate of 4/8 will be more tolerant to interference than a signal transmitted with a code rate of 4/5. The figures in Table 1, taken from the SX1276 datasheet, are given as an indication.  
Another parameter of the LoRa modulation, which is implemented in Semtech's transceivers, is the low data rate optimization. This parameter is mandatory in LoRa when using spreading factors of 11 and 12 with a bandwidth of 125 kHz or lower. The effect of this parameter is not documented; however, Equation (3) shows that it reduces the number of bits transmitted per symbol by two.