# New Results for the Error Rate Performance of LoRa Systems over Fading Channels
## 2 Overview of the LoRa Modulation  
In this section, an overview of the LoRa modulation and the corresponding bit error probability are presented. LoRa systems employ the shift chirp modulation scheme, also known as spread spectrum modulation. The number of samples within the duration of a symbol, \(T_{s}\), is determined by the spreading factor (SF). It holds that \(T_{s}=2^{\text{SF}}/B\), where \(B\) is the signal bandwidth. In typical applications, \(\text{SF}\in\{6,7,\ldots,12\}\). Note that the coverage of LoRa is determined by SF. Specifically, increasing SF results in wider coverage but also in a reduction in the data rate.  
The modulation encoder maps a group of SF bits to a symbol, \(s_{k}\), \(k\in\{0,1,\ldots L\}\) where \(L=2^{\text{SF}}-1\). The transmitted waveform can be expressed as [21]  
\[s_{k}(nT) =h\sqrt{E_{s}}\omega_{k}(nT_{s}) \tag{1}\] \[=h\sqrt{\frac{E_{s}}{N}}\exp\Bigl{\{}J2\pi\frac{n}{N}[(k+n)\mod N] \Bigr{\}} \tag{2}\]  
where \(N=2^{\text{SF}}\), \(T_{s}=1/B\) is the sampling period, \(n\in\{0,1,\ldots L\}\) is the sample index at time \(nT_{s}\), \(E_{s}\) is the signal energy, \(h\) is the fading channel coefficient and \(\omega_{k}(nT_{s})\) are orthonormal basis functions.  
Figure 1 depicts the main functional blocks of a LoRa non-coherent demodulator. Specifically:  
* The input signal is sampled at a period of \(T_{s}=1/B\);
* The resulting signal is then multiplied with a down chirp signal;
* A Fast Fourier Transform (FFT) is performed at the output of the previous block to retrieve the symbol value;
* The information signal is estimated using maximum likelihood detection.  
Using the orthogonal properties of \(s_{k}(nT)\), the correlator output at the demodulator is given as [21]  
\[\sum_{n=0}^{L}r_{k}(nT)\omega_{i}^{*}(nT)=\begin{cases}h\sqrt{E_{s}}+\phi_{i}& \text{if }k=i\\ \phi_{i}&\text{if }k\
eq i\end{cases} \tag{3}\]  
where \(r_{k}(\cdot)\) is the received signal and \(\phi_{i}\) is the complex Gaussian noise. The decision rule for the detected index symbol can be expressed as [21]  
\[\hat{k}=\{i|\arg_{i}\max\Bigl{(}|\delta_{k,i}h\sqrt{E_{s}}+\phi_{i}|\Bigr{)}\}. \tag{4}\]  
Figure 1: A simplified overview of the LoRa non-coherent demodulator.  
The conditional symbol error probability given the squared channel coefficient \(h\) is given as [21; 22; 23]  
\[P(e|h)=\Pr\{\rho^{2}>|h\sqrt{E_{s}}+\phi_{i}|^{2}\} \tag{5}\]  
where \(\rho^{2}=\left.\max\{|\phi_{i}|\}\right|_{i\
eq k}\) is the maximum of \(L\) independent and identically distributed (i.i.d) exponential random variables with CDF given by  
\[F_{\rho^{2}}(x)=[1-\exp(-x/2)]^{L}. \tag{6}\]  
Moreover, the RV \(R\triangleq|h\sqrt{E_{s}}+\phi_{i}|^{2}\) conditioned to \(h^{2}\) follows a non-central chi-square distribution with PDF given by [21; 22; 23]  
\[f_{R|h^{2}}(x)=\frac{1}{2}\exp\left(-\frac{x+2 Nh^{2}\gamma}{2} \right)I_{0}\left(\sqrt{2 Nh^{2}\gamma x}\right), \tag{7}\]  
where \(\gamma=1/\mathbb{E}\langle|\phi_{i}|^{2}\rangle\) is the SNR. The CDF of \(R\) conditioned to \(h^{2}\) can be expressed in terms of the Marcum Q-function as  
\[F_{R|h^{2}}(x)=1-Q_{1}\left(\sqrt{2 Nh^{2}\gamma},\sqrt{x}\right). \tag{8}\]  
Finally, using (5)-(7), the average symbol error probability is given in terms of the following two-fold integral [21; 22; 23]  
\[P_{s}=\frac{1}{2}\int_{0}^{\infty}\int_{0}^{\infty}\left\{1-[1- \exp(-x/2)]^{L}\right\}\] \[\times\exp\left(-\frac{x+2 Ny\gamma}{2}\right)I_{0}\left(\sqrt{2N \gamma xy}\right)f_{h^{2}}(y)\mathrm{d}x\mathrm{d}y. \tag{9}\]  
The resulting bit error probability can be expressed as [21; 23]  
\[P_{b}=\frac{2^{\mathrm{SF}-1}}{2^{\mathrm{SF}}-1}P_{s}. \tag{10}\]