# Bit Error Rate Closed-Form Expressions for LoRa Systems under Nakagami and Rice Fading Channels
## 3 Bit Error Probability
### Error Probability for Rayleigh channels  
Our new expression (23) is general and valid for any positive \(m\) parameter. The symbol error probability for Rayleigh channels can be obtained for the particular case of \(m=1\) in (23), thus  
\[P_{e|\alpha}=\sum_{q=1}^{2^{SF}-1}(-1)^{q+1}\binom{2^{SF}-1}{q} \frac{\left[1+\frac{q}{q+1}\gamma\cdot 2^{SF}\right]^{-1}}{q+1} \tag{26}\]  
The Gaussian hypergeometrictical function is defined as [19]  
\[{}_{2}F_{1}\left[ \begin{matrix}-m&b\\ c&;z\end{matrix} \right]=\sum_{n=0}^{m}(-1)^{n}\binom{m}{n}\frac{(b)_{n}}{(c)_{ n}}z^{n}, \tag{27}\]  
where \((\zeta)_{n}\) is the Pochhammer symbol defined as  
\[(\zeta)_{n}= \begin{cases}1&,n=0\\ \zeta(\zeta+1)...(\zeta+n-1)&,n>0\end{cases}  \tag{28}\]We can rewrite (26) as  
\[ \begin{split} P_{e|\kappa}&=1+\left(-1-\sum_{q=1}^{2^{SF }-1}(-1)^{q+1}\binom{2^{SF}-1}{q}\frac{\left[1+\frac{q}{q+1}\gamma\cdot 2^{SF} \right]^{-1}}{q+1}\right)\\ &=1-\sum_{q=0}^{2^{SF}-1}(-1)^{q}\binom{2^{SF}-1}{q}\frac{1}{1+q+ q2^{SF}\gamma}.\end{split}  \tag{29}\]  
Notice that  
\[\frac{\left(\frac{1}{1+2^{SF}\gamma}\right)_{q}}{\left(\frac{1}{1+2^{SF}\gamma }+1\right)_{q}}=\frac{\left(\frac{1}{1+2^{SF}\gamma}\right)\left(\frac{1}{1+2^ {SF}\gamma}+1\right)\left(\frac{1}{1+2^{SF}\gamma}+2\right)\cdots\left(\frac{ 1}{1+2^{SF}\gamma}+q-1\right)}{\left(\frac{1}{1+2^{SF}\gamma}+1\right)\left( \frac{1}{1+2^{SF}\gamma}+2\right)\cdots\left(\frac{1}{1+2^{SF}\gamma}+q-1 \right)\left(\frac{1}{1+2^{SF}\gamma}+q\right)}. \tag{30}\]  
Except for the first term in the numerator, and the last term in the denominator, all the terms in the numerator and denominator are the same and therefore can be canceled. We can finally, write (30) as  
\[\frac{\left(\frac{1}{1+2^{SF}\gamma}\right)_{q}}{\left(\frac{1}{1+2^{SF}\gamma }+1\right)_{q}}=\frac{\left(\frac{1}{1+2^{SF}\gamma}\right)}{\left(\frac{1}{ 1+2^{SF}\gamma}+q\right)}=\frac{1}{1+q+q2^{SF}\gamma}. \tag{31}\]  
If we consider that \(z=1\) from (27) and use (31), we can write  
\[ \begin{split} P_{e|\kappa}&=1-\sum_{q=0}^{2^{SF}-1 }(-1)^{q}\binom{2^{SF}-1}{q}\frac{1}{1+q+q2^{SF}\gamma}\\ &=1-2F_{1}\left[\begin{matrix}1-2^{SF}&\frac{1}{1+2^{SF} \gamma}\\ &\frac{2+2^{SF}\gamma}{1+2^{SF}\gamma}\end{matrix};1\right]=1-\frac{ \Gamma(2^{SF})\Gamma\left(\frac{2+\gamma\cdot 2^{SF}}{1+\gamma\cdot 2^{SF}}\right)}{ \Gamma\left(\frac{1+2^{SF}+\gamma\cdot 2^{SF}}{1+\left(\gamma\cdot 2^{SF}\right)} \right)}.\end{split}  \tag{32}\]  
The average error bit probability for Rayleigh is derived such that [12]  
\[P_{b}=\frac{2^{SF-1}}{2^{SF}-1}\left[1-\frac{\Gamma(2^{SF})\Gamma\left(\frac{2 +\gamma\cdot 2^{SF}}{1+\gamma\cdot 2^{SF}}\right)}{\Gamma\left(\frac{1+2^{ SF}+\gamma\cdot 2^{SF}}{1+\left(\gamma\cdot 2^{SF}\right)}\right)}\right]. \tag{33}\]  
It is important to emphasize that our closed-form solution given in (33) is exact, whereas (33) in [11], although very  
where \(\
u\) is related to the direct path component. Following similar rationale as in (9), the bit error probability for Rician can now be expressed as  
\[P_{e|\
u}=\int_{0}^{\infty}\int_{0}^{\infty}\left[1-\left[1-e^{-\frac{\gamma^{2} }{2\sigma^{2}}}\right]^{2^{SF}-1}\right]\Psi_{r}(y,\alpha)dyd\alpha, \tag{35}\]  
where  
\[\Psi_{r}(y,\alpha)=f_{\beta_{k}|\alpha}(y)\frac{\alpha}{\sigma_{r}^{2}}e^{- \frac{-\alpha^{2}+\
u^{2}}{2\sigma_{r}^{2}}}I_{0}\left(\frac{\
u\alpha}{\sigma _{r}^{2}}\right). \tag{36}\]  
where \(f_{\beta_{k}|\alpha}(\cdot)\) is given in (20), \(\
u^{2}\) is the direct component power, \(\sigma_{r}^{2}\) is the variance of the Rice distribution. We introduce the variable \(\kappa\) as the shape parameter which is the ratio of the power contributions by line-of-sight path to the remaining multi-paths, and \(\Omega\) as the scale parameter related with the total power received in all paths. Furthermore, we can establish the following relations  
\[ \begin{split}\
u^{2}&=\frac{\kappa}{\kappa+1}\Omega,\\ \sigma_{r}^{2}&=\frac{\Omega}{2(1+\kappa)}.\end{split}