Bit Error Rate Closed-Form Expressions for LoRa Systems under Nakagami and Rice Fading Channels

We derive exact closed-form expressions for Long Range (LoRa) bit error probability and diversity order for channels subject to Nakagami-m, Rayleigh and Rician fading. Analytical expressions are compared with numerical results, showing the accuracy of our proposed exact expressions. In the limiting case of the Nakagami and Rice parameters, our bit error probability expressions specialize into the non-fading case.


Introduction
Low Power Wide Area Networks (LPWAN) are the new trend in the development of wireless communication technologies in the era of the Internet of Things (IoT) [1]. Long Range (LoRa) [2] technology has awakened the interest of the research community due to its growing usage for LPWAN deployments [2][3][4][5].
As clearly stated in [6][7][8][9], LoRa technology is mainly based on the features of the chirp spread spectrum (CSS) modulation. In [10], it establishes a more solid mathematical representation of the modulation/demodulation process addressing the bit error rate (BER) performance for AWGN and frequency selective channels. In [11], the BER was derived assuming CSS modulation and the use of moment matching to obtain analytical BER approximations for AWGN and Rayleigh scenarios. The BER performance under the perspective of orthogonal signaling described in [12] can be used to assess the performance of chirp spread spectrum modulation, as pointed out in [10].
The primary motivation of this investigation is to find new expressions for the bit error rate of chirp spread spectrum (CSS) modulation in the essential fading scenarios. For instance, Rayleigh statistics models well the signal power in a multipath environment [13]. On the other hand, Rice appropriately models multipath in situations with a dominant line-of-sight signal. In complex dense urban environments, we expect all kinds of small-scale fading, i.e., Ricean fading for strong, static links, and a smooth transition from Rayleigh fading down to Double-Rayleigh fading for moving links. A mathematically convenient method to approximate these distributions is by using the Nakagami distribution [14]. The use of Nakagami mathematical method is broad and can describe the amplitude of a received signal after maximum ratio diversity combining, since the k-branch MRC with Rayleigh-fading signals results in a Nakagami with m = k. In this way, it is possible to use the Nakagami-m distribution to investigate the use of multiple antennas (MIMO) in LoRa gateway (or LoRa base station). The Nakagami distribution is also the best match for many fading measured data, as related in [15][16][17].
The main contribution of our work is the derivation of exact closed-form expressions to calculate the CSS BER performance in diverse scenarios such as Rayleigh, Rician, and Nakagami fading channels.
We believe that our main results extend the knowledge in this topic by including two new scenarios: the performance analysis under the Nakagami-m case and the Rice case. As it is well known in the literature, as the Nakagami parameter m = 1, or the Rice parameter κ = 0, our results specialize into the Rayleigh case. Also, the authors in [11] provided an approximate expression for the Rayleigh case, whereas we have provided an exact and elegant result.
We organize the remainder of this paper as follows: Section 2 refers to the underlying system model; Section 3 refers to the exact bit error probability performance derivation. Section 4 confirms the accuracy of the proposed exact expressions. Finally, Section 5 points out the main aspects of our achievements. Figure 1 illustrates the system model in which the designer can choose one out of three options of essential fading environments. LoRa devices use shift chirp modulation scheme for communication. The modulation consists of a signal which chirps within a frequency range in a given period. It is also known as spread spectrum modulation, and different symbols can be composed by varying bandwidth and spread spectrum parameters. The spreading factor (SF) determinates the number of samples within a symbol duration such that T s = 2 SF B , where B is the signal bandwidth and SF ∈ {6, 7, . . . , 12} which are the values available for typical commercial devices [18]. The encoder maps every SF bits to a symbol s k , such that k ∈ {0, 1, . . . , 2 SF − 1}. We then understand that k is related to a f k = B k 2 SF offset frequency. Each chirp signal has a specific starting frequency, and it wraps around bandwidth B as long as frequency keeps increasing. The chirping rate is given by B 2 2 SF and signal decodes according to the position offset of f k . The transmitted waveform can be written as [11]

System Model
where T = 1 B is the sampling period, n = 0, 1, 2, . . . , (2 SF − 1) is the sample index at time nT, E s is the signal energy, and ω k (nT) are the 2 SF orthonormal basis functions. The receiver demodulates the signal using the outputs of the correlator as [11] where r k (·) is the received signal, φ i depicts a complex Gaussian noise process, and ω * i (nT) is the complex conjugate of the i-th basis function.
As shown by (2), the chirp signal demodulation is based on orthogonality properties. Thus, the detection of the symbols happens with the index selection of the basis waveform that has the highest correlation magnitude with respect to the received signal. Therefore, for a received waveform of r k (nT), the detected index symbol is computed as [11] where | · | is the absolute value operator, δ i,k = 1 for i = k and δ i,k = 0 otherwise. We also must define γ as the signal-to-noise ratio (SNR) which is expressed as [11] γ = E s T s

Error Probability for AWGN channels
From (2), we can derive a random variable such that ρ i = |φ i | i =k . Since φ i is a complex zero-mean Gaussian noise process, then ρ i will be a Rayleigh random distributed variable such that [12] where σ 2 = N 0 2 and N 0 is the noise spectral density. The symbol error probability is given such that where In this way, the probability density function of β k can be written as The random variable ρ = max(ρ i )| i =k is defined as the maximum of (2 SF − 1) i.i.d. Rayleigh random variables. Since the (2 SF − 1) variables are independent, the cumulative distribution function for ρ can be given as [12] Using (6)- (8), and equally probable symbols, we can express the average bit error probability P b as Expression (9) is the average bit error rate probability for AWGN channels. We can further simplify (9) using the Newton's binomial identity then (9) can be written as Now, if we replace (7) into (11), we have Fortunately, the integral in (12) can be computed as Then, using (4), we find a closed-form expression for the error probability given the symbol k [12] Then, according to [12], we finally find the average bit error rate such that

Error Probability for Nakagami-m Channels
We first consider that a random variable α ∼ Gamma(k, θ). Then, we relate the Nakagami-m parameter to this distribution such that k = m and θ = Ω/m. In the case of Nakagami-m channels, the correlation output at the demodulator is given as where √ α follows a Nakagami-m distribution. Accordingly, (6) can be modified to include the Nakagami-m random variable as Following similar rationale as in (9), the bit error probability for Nakagami-m can now be expressed as where and Note that Ω = 1 in the term m m Γ(m) x m−1 e −mx is the normalized channel power for Nakagami-m distribution. The expression in (18) is the average bit error rate probability for Nakagami-m channels in the integral form. A closed-form expression of (18) can be obtained following the same rationale in the steps of (10)- (13), so that In the sequel, we must apply a change of variable of the form z = y 2 and perform the integration in order to get finally, integrating with respect to the x variable, we can get the following expression where γ was defined in (4). Note that and for this case (23) coincides exactly with (14), that is, the Gaussian case is the limit when the Nakagami-m parameter tends to infinity. Again, according to [12], we finally find the average bit error rate for Nakagami-m such that

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 The Gaussian hypergeometrical function is defined as [19] where (ζ) n is the Pochhammer symbol defined as We can rewrite (26) as Notice that 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 If we consider that z = 1 from (27) and use (31), we can write The average error bit probability for Rayleigh is derived such that [12] It is important to emphasize that our closed-form solution given in (33) is exact, whereas (33) in [11], although very accurate, provides an approximation.
The new expression in (33), obtained here, allows getting some intuition with respect the equivalent signal to noise ratio γ. Note that when γ → 0, that is for very low values of the equivalent signal to ratio, the ratio given by tends to 0 and therefore P b → 1 2 (for SF > 6), as expected. On the other hand, for high values of γ, the same ratio tends to 1 and therefore P b → 0.

Rician Fading
In the case of Rician fading channels, the correlation output at the demodulator is given as where ν is related to the direct path component. Following similar rationale as in (9), the bit error probability for Rician can now be expressed as where where f β k |α (·) is given in (20), ν 2 is the direct component power, σ 2 r is the variance of the Rice distribution. We introduce the variable κ as the shape parameter which is the ratio of the power contributions by line-of-sight path to the remaining multi-paths, and Ω as the scale parameter related with the total power received in all paths. Furthermore, we can establish the following relations Expression (35) is the average bit error rate probability for Rician channels in the integral form. A closed-form expression of (35) can be obtained following the same rationale in the steps of (10)- (13), and substituting (37) so that Note, when Ω = 1, we have that and which agrees with the limit case given in (14) for AWGN scenario when the Rician shape parameter tends to infinity. On the other hand, we have that and which agree with the limit case in the (26) of Rayleigh scenario when the Rician shape parameter tends to zero.
The average error bit probability for Rice case is derived such that [12] . (43)

Numerical Results
In this section, we will evaluate the numerical expressions and compare the results. Figure 2a presents comparisons of the derived Nakagami BER given in (23) and (33) versus the theoretical BER performance solved numerically using the integrals in (18) and (26), respectively. We choose SF ∈ {6, 12} as the lowest and highest spread factor values to produce two sets of curves and each group with m ∈ {1, 2, 10}. As shown in Figure 2a, the expressions in (23) and (33) are indistinguishable from (18) and (26). Also, note that as m increases, the bit error rate curve gets very close to the AWGN curve, as expected. With SF = 12 and m = 10, there is a gain of almost 30 dB for a BER of 10 −4 in a multipath environment.  Figure 2. (a) Bit Error Rate for Nakagami-m and Rayleigh cases. The continuous blue curve is given by (26) (Rayleigh Integral) and the blue stars are computed using (33) (Rayleigh Exact). The green and red curves are the BER for the Nakagami-m case, the continuous and star lines are given by (18) (Nakagami-m Integral) and (23) (Nakagami-m Exact), respectively. Analytic AWGN curve is provided for reference. (b) Percentage error between the Rayleigh BER approximation in [11] and our exact analytical solution given in (33). Figure 2b shows the percentage error of the difference between the Rayleigh BER approximation in [11] and (33). The difference can vary from 6% (when SF = 12) to 15% (when SF = 4).
Next, we focus on the accuracy of the results given by numerical methods considering integrals and a finite series. We calculated the percentage error between on (18) and (23). The data is summarized in the Table 1. The data was generated such that parameters assume SNR(dB) ∈ {−30, −10, 10}, SF ∈ {12, 10,8,6, 4}, and m ∈ {1, 3, 5}. The numbers in the table are tiny, and therefore, it is necessary to multiply by a factor of 10 −6 to get the percentage error. Figure 3 presents the derived BER in (38) versus simulation for Rician environments. Again, we choose SF ∈ {6, 12} as the lowest and highest spread factor values to produce two sets of curves and each group with κ ∈ {0, 5, ∞}. As shown in the figure, the expression in (38) superposes with the discrete values found through simulation. Note that simulated and theoretical curves are almost indistinguishable. Also, note that as κ tends to infinity, the bit error rate curve gets very close to the AWGN curve, as expected.

Application Case
Since the signal to noise ratio γ in (23) is related to the maximum link distance, we can compute this distance in a system using the LoRa technology where the communication link is under the Nakagami-m distribution.
We choose the device SX1272 [18] as reference. For instance, the datasheet report that the receiver sensitivity is P RX = −137 dBm for B = 125 kHz and SF = 12. Using (23), we can set a target bit error probability of P b = 10 −4 and analyze what is the impact of the Nakagami-m factor in the maximum link distance.
We choose Okumura-Hata [20] as our path-loss model with urban area parameters. The heights of the base station and mobile stations are 40 meters and 1 m, respectively. The system operates in the 900 MHz frequency, which agree with the limits presented in Table 2.  Figure 4 presents the maximum link distance for different values of SF and m. When we compare these curve against the AWGN curve (no fading case) given in (14), we notice that the distance decreases from 5 km to 200 m for SF = 12, which indicates a loss of about 96% of link range. For scenarios where the Nakagami-m parameter ranges from 2 to 6, the link range loss reduces to 80% and 60%, respectively. For m = 10, the performance becomes closer to the AWGN performance.

Conclusions
In this paper, we derived new expressions to assess the BER performance of CSS in the essential fading scenarios, i.e., Rayleigh, Rician, and Nakagami-m fading channels. All the results are in terms of LoRa parameters such as spreading factor SF, bandwidth B, and symbol to noise ratio E s /N 0 . The derived bit error probability expressions will be handy for any IoT provider that aims to predict the network coverage for different scenarios where the fading may vary. Also, we have addressed the limiting cases where m → ∞ (Nakagami parameter) and κ → ∞ (Rice parameter), showing that they converge to the non-fading case or the case under the influence only of the additive white Gaussian noise. All the expressions have been validated by simulation and when applicable, compared with previous results.