LoRa Physical Layer Principle and Performance Analysis Guillaume Ferré, Audrey Giremus

To cite this version:

Guillaume Ferré, Audrey Giremus. LoRa Physical Layer Principle and Performance Analysis. ICECS 2018 25th IEEE International Conference on Electronics Circuits and Systems, Dec 2018, Bordeaux, France. ￿hal-01977497￿

HAL Id: hal-01977497 https://hal.archives-ouvertes.fr/hal-01977497 Submitted on 10 Jan 2019

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. LoRa Physical Layer Principle and Performance Analysis

Guillaume Ferre,´ and Audrey Giremus Laboratoire de l’Integration´ du Materiau´ au Systeme` 351 cours de la liberation,´ 33400 Talence, France, Emails: guillaume.ferre,audrey.giremus @ims-bordeaux.fr { }

Abstract—The Internet of Things (IoT) finds widespread ap- bit and symbol error probability expressions related to LoRa plications spanning from consumer services such as smart home . Before concluding our work, simulation results or domotic to strategic use cases, including infrastructure or and evaluation are proposed and commented. energy management. Different technologies have been proposed to support IoT and this paper aims at analyzing the Long Range II.LORA PHYSICAL LAYER (LoRA) one. After introducing the main principles of the physical layer, the main contribution is a theoretical performance analysis. The LoRa technology was developed by a french company Closed-form expression of the symbol and bit error probabilities called Cycleo, and then acquired and patented by Semtech are derived that are validated by simulation results. which is at present selling LoRa chips. The patent [3] provides valuable information on the physical layer, particularly the I.INTRODUCTION used modulation scheme which is based on spectrum spread- Internet of Things (IoT) has revolutionized ubiquitous com- ing: Chirp (CSS) [4]. Several Spreading puting with multitude of applications. IoT perfectly joins in Factors (SF) are defined to control the bit rate, improve the the future evolution towards the fifth generation of wireless range and decrease energy consumption. communications technology (5G). It offers the possibility to LoRa operates in Industrial, Scientific and Medical (ISM) connect different objects through the internet so that they can bands over 169, 433, 868 MHz (in Europe) and 915 MHz. communicate efficiently and reliably, making a house, a car In order to limit interferences, regulatory authorities specified or a city intelligent. Making devices communicate does not a duty cycle ranging from 0.1 to 1 % depending on the represent a big challenge. In general, an object would not have used sub-band. While other IoT technologies are proprietary, a lot of information to transmit or to receive, and according LoRa network management is open and every person has the to use cases, it can communicate sparsely, for instance once possibility to deploy LoRa stations or networks and to offer a day, a week, a month or even a year. The major difficulty services as long he respects spectrum use regulations. The rather stems from the number of objects or even from the upper layers to LoRa can be proprietary or standardized. The battery life of battery-powered devices. most popular standard is LoRaWAN, which is implemented The IoT and Connected Objects (CO) are becoming a reality by LoRa alliance [5]. with the deployment of networks like SigFox [1] or those A. Physical Layer Principle of Orange and Bouygues Telecoms designed by Semtech, Long Range (LoRa) [2]. Indeed, these technologies offer Initially, the binary information flow generated from the the possibility to connect any object to the Internet through MAC layer is divided into subsequences, each of length unlicensed bands. Simultaneously with these low throughput SF [7 ... 12]. The set of SF consecutive bits constitutes ∈ solutions operating in unlicensed bands, 3GPP introduced the a symbol. The number of possible symbols is hence equal to normalization of several standards dedicated to the IoT which M = 2SF . In the LoRa context, SF indicates also the Spread- can use the infrastructure of 2G and 4G networks, and thus ing Factor (SF). Therefore, the relation between the bit rate licensed bands. These standards are: Extended Coverage GSM Db and the symbol rate Ds can be written as: Ds = Db/SF . (EC-GSM), Narrow band IoT (NB-IoT) and LTE - Machine Spread spectrum is obtained through a signal known as chirp communication type (LTE-M). Since IoT applications are that varies continuously and linearly in frequency. When the being very numerous, there is not yet a technology able to derivative of the frequency variation is positive then we deal handle all of them efficiently. Thus, a part of deployed or in with an up chirp, conversely it is a down chirp. progress solutions appears rather as complementary and not The chirps are complex signals, generated in baseband. competing ones. When the chirp is up or down over the entire symbol period This paper focuses on the LoRa technology. It presents Ts, which is also called the signaling interval, it is identified as first the LoRA physical layer concept and then a performance raw chirp. Its complex envelope is mathematically expressed as follows, for t  Ts , Ts : analysis in terms of error probability. The remainder of the ∈ − 2 2 paper is organized as follows. In section II, the LoRa physical j2πfc(t)t B layer is introduced. Section III details the approach illustrating sl(t) = e , with fc(t) = t, (1) ±Ts k up raw chirp advanced of where fc (t) corresponds to the modulated chirp related to f (t) f (t) T ⌧ f (t) c c s m c B symbol transmitted at time kT . 2 s

Ts B. Symbol Estimation 2 Ts t ⌧m t ⌧m t 2 Ts 2 In the following, we consider perfect time and frequency

B synchronizations. As a consequence, the received signal sam- 2 up raw chirp delayed Ts of ⌧m 2 pled at Te and denoted by y(nT e) can be written as Ts Ts 2 2 (a) (b) (c) k X j2π(nT e kTs)f (nT e kTs) y(nT e) = e − c − + w(nT e), (4) Figure 1. Symbol → chirp association process - (a) up raw chirp - (b) process k Z illustration - (c) chirp associated to the mth symbol ∈ where w(nT e) represents the complex noise assumed white, Gaussian and circular. where B is the frequency excursion of the transmitted chirp. The transmitted symbols are detected by multiplying every The ’+’ and ’-’ signs stand for up and down raw chirp segment with Ts period of the complex envelope of the respectively. received signal, denoted y(nT e), by the conjugate version For digital communication systems with no spreading spec- of the raw chirp used in the transmitter (up or down). If trum, the bandwidth used by the transmitted signal is propor- we consider that the channel did not introduce interferences tional to the symbol rate. The coefficient of proportionality between chirps, or if a guard interval between chirp was that depends on the shaping filter, which is in general a half introduced in the transmitter, then the digital Nyquist one. In CSS, the signal bandwidth is fixed by B which of the mth transmitted symbol (mT Ts t < mT + Ts ) s − 2 ≤ s 2 has the following relationship with Ts: corresponds to the processing of N = Ts samples: Te

M = B Ts. (2) j2πfc(nTe)nTe × rm(nTe) = y(nTe + mTs)e− (5) For a fixed bandwidth, we can deduce that an increase of SF with n  N , N 1. Thus, in this interval, all the terms leads to a longer symbol duration. 2 2 of the sum∈ − in eq.(3)− are null, except the term k = m. As a To distinguish between the M different symbols of the consequence, m 0,...,M 1 : constellation, M orthogonal chirps have to be defined so that ∀ ∈ { − } m j2πf (nTe)nTe each symbol exhibits a specific instantaneous phase trajectory. y(nTe + mTs) = e c + w(nTe + mTs). (6) In the sequel, we denote Sk the transmitted symbol at time th In that respect, by inserting (6) into (5), it follows that kTs and Sk = m its association to the m possible discrete symbol with . The chirp associated to the m 0, ..., M 1 rm(nTe) = xm(nTe) + wm(nTe) (7) mth symbol is then∈ { obtained− from} the raw chirp by applying m M where the useful signal is equal to a delay τm = B where we recall that Ts = B . However, to guarantee a good synchronization of the chirps both in  m  x (nT ) = ej2πfc (nTe)nTe e j2πfc(nTe)nTe (8) time and frequency, LoRa imposes the instantaneous phase m e − θ(t) = 2πfc(t)t to be the same for both the beginning and the and the noise term: end of the chirp. It ensues that θ( Ts ) = θ( Ts ). To meet this 2 2 j2πfc(nTe)nTe − Ts Ts wm(nTe) = w(nTe + mTs)e− (9) requirement, the raw chirp outside the interval [ 2 , 2 ] is Ts Ts − cyclically brought back into [ , + τm] as illustrated in As well, by multiplying both terms of (8), the arguments will − 2 − 2 Fig.1 (a), (b) and (c). Therefore, the modulated chirp related to be given by the transmission of the symbol m decomposes into two parts:  m   N N m  2π nTe + 2πBnTe for n , + T T T 2 2 T B 1) for t  s , s + τ , the ramp of the raw chirp − s ∈ − − e 2 2 m     (up or∈ down)− advanced− in time by (T τ ), m N m N s m 2π nTe for n + ,  Ts Ts  − 2) for t + τ , , the ramp of the raw chirp (up − Ts ∈ − 2 TeB 2 ∈ − 2 m 2 or down) delayed in time by τm. 1 In addition, when sampling the signal at a rate of Te = B , It follows that the up chirp can for instance be expressed we obtain using eq.(2): as: j2π mn   rm(nTe) = e− M + wm(nTe) (10) m B Ts Ts m fc (t) = (t τm) + B for t , + Ts − ∈ − 2 − 2 B It should be noted that this choice of sampling frequency   m B Ts m Ts induces M = N. Indeed, rm(nTe) is the sum of a complex f (t) = (t τ ) for t + , m c T m 2 B 2 exponential with a normalized frequency of and a Gaus- s − ∈ − − N Eventually, the complex envelope of the transmitted signal sian noise. The optimal estimation of m and thus the detection is of the associated symbol can be performed by searching for k X j2π(t kTs)f (t kTs) the maximum of rm(nTe) periodogram. s(t) = e − c − (3) Given the proposed solution in the patent EP2449690, the k ∈Z k discrete Fourier Transform (DFT) at a frequency N of N conditional to Wm[N m] and Hm but the latter are omitted samples from r (nT ), denoted by R [k], k [0,N 1], for the sake of simplicity.− m e m ∈ − is derived as follows ¯  2 2 Pm = P k = N m, Rm[k] < Rm[N m] , N 1 ∀ 6 − | | | − | 2 − h 2 2i 1 X j2π nk = P k = N m, Wm[k] < √N + Wm[N m] . Rm[k] = rp(nTe)e− N . (11) ∀ 6 − | | | − | √N n= N 2 − 2 As the noise samples are Gaussian, Wm[k] is χ2 distributed k. Taking advantage of the decorrelation| of| the noise samples, By exploiting the DFT periodicity, R [k] can be expressed m we∀ then obtain : as follows N 1 − h i ¯ Y 2 2 R [k] = R [k N] = √Nδ(k + m N) + W [k], (12) Pm = P Wm[k] < √N + Wm[N m] , m m m | | | − | − − k=0 k=N m where Wm[k] is the DFT of the noise. The latter is white, 6 − N 1 2 !! Gaussian and with the same variance as wm(nTe) based on √N + W [N m] − = F | m − | DFT properties. An estimation of m is then given by χ2 σ2 2 mˆ = N argmax Rm[k] (13) where F is the cumulative density function of the χ − | | χ2 2 k distribution with 2 degrees of freedom and σ2 is the variance III.BITANDSYMBOLERRORPROBABILITIES of wm(nTe) which is the same of the one of Wm[k] for each integer k. Based on (12) and (13), we focus in this section on Finally, eq.(15) cannot be computed analytically. However, it deriving closed-form expressions of the symbol and bit error can be interpreted as an expectation with regards to the noise probabilities before channel decoding. These probabilities are distribution: denoted by Ps and Pb, respectively. P [m ˆ = m Hm] = Eg [Pm] . (17) First of all, we propose to decompose Ps according to the 6 | law of total probability. For that purpose, we introduce M As a consequence, we suggest using a Monte Carlo approxi- th hypotheses denoted H0,..., HM 1 . Hm means that the m mation. The approach consists in simulating a large number, { − } symbol is the one that has actually been transmitted. The i.e. NMC, of realizations of Wm[N m]. It should be noted symbol error probability then writes: that this step is simple and not computationally− expensive since the latter is Gaussian. By denoting these samples W (i) for M 1 X− i = 1,...,NMC, the law of large numbers yields: Ps = P [m ˆ = m Hm] P [Hm] (14) 6 | m=0 P [m ˆ = m Hm] (18) 6 | N !!N 1 where P [m ˆ = m Hm] is the probability that the estimated MC (i) 2 − 6 | 1 X √N + W symbol is not the transmitted one provided hypothesis Hm is 1 Fχ2 | 2 | ' NMC − σ true. In the absence of prior information, all the symbols can i=1 1 be considered equiprobable so that P[Hm] = M . Computing In the next step, the symbol error probability is used to Ps therefore amounts to express P[m ˆ = m Hm]. infer the bit error probability. It is worth noting that even 6 | It should be noted that false symbol estimations occur when if the symbol is badly detected, at least one of its bits can noise realizations are misled for periodogram peaks. To ac- be accurately estimated. The probability that a bit is well- count for the noise effect, we propose to rewrite the probability estimated while the corresponding symbol is erroneous is SF 1 SF of interest as follows using the chapman-Kolmogorov formula: equal to 2 − /(2 1). As a result, the bit error probability − Z Pb can be expressed by: [m ˆ = m H ] = g(W [N m]) dW [N m] (15) P m Pm m m 2SF 1 6 | − − P = − P (19) b 2SF 1 s where Pm = P [m ˆ = m Hm,Wm[N m]] and Wm[N m] − 6 | − N m − is the noise present at the normalized frequency − where N IV. SIMULATION RESULTS AND DISCUSSIONS is located the periodogram peak. As for g, it stands for the To validate our understanding of the physical layer, we probability density function of Wm[N m] which is Gaussian. Using the complement rule, the first term− of the integrand is use an appropriate test bench (see Fig. 2 ) to store several given by LoRa frames that are being a posteriori decoded by a receiver developed in Matlab. These measures were gathered from COs Pm = 1 P [m ˆ = m Hm,Wm[N m]] (16) designed and deployed within our laboratory (see Fig. 3). − | | {z − } ¯ A Matlab simulator for LoRa signal transmitter/receiver is Pm implemented later to compute the symbol and the bit error ¯ The next step consists in developing Pm. It should be noted rates for different values of SF , with SF [7,..., 12]. For that in the following calculations, all the probabilities are comparison, the simulated rates are compared∈ with analytical 100

1 10−

2 10−

3 10−

4 P 10− b LoRa - theoretical Pb LoRa - simulation 5 Pb Sigfox - theoretical 10−

6 Bit error probability 10−

7 10−

8 10− Figure 2. Test bench to obtain real LoRa frames 10 9 − 6 4 2 0 2 4 6 8 10 − − − Eb/N0 (dB)

Figure 5. Comparison of bit error probabilities of SigFox and LoRa technologies before channel decoding.

probabilities. Fig. 5 depicts both Sigfox and LoRa bit error probabilities for different values of Eb , knowing that Eb = N0 N0 SNR ρ where ρ is the spectral efficiency of the communication. SF In the case of LoRa, we have Eb = SNR 2 . N0 SF The digital modulation of Sigfox is the Differential× Binary Phase Shift Keying (DBPSK) scheme so that the bit error Figure 3. CO used for the measurements probability is P DBPSK = 0.5 eEb/N0 b × expressions and illustrated in Fig. 4. The error probability We notice that the LoRa technology offers, without channel values are evaluated as a function to Signal to Noise Ratio coding, interesting error rate performance compared to Sigfox. (SNR). It is defined as SNR = Ps with P the average 3 Pw s In fact, in case of a service quality equal to 10− , LoRa power of s(t), obtained integrating its spectral power density outperforms Sigfox by 3.5dB. and Pw = BN0 the noise power. V. CONCLUSION One can notice that the theoretical results are consistent with In this paper we introduced the LoRa physical layer based the obtained simulations since the plots are nearly superim- on the published patents. In addition, we presented a theoreti- posed. Furthermore, increasing SF by 1 can improve the cal evaluation of the symbol and bit error probabilities for this processing gain by 3dB. The results allow one to approve the technology. We validated our understanding of the physical theoretical adopted approach and to support the gains claimed layer by decoding a set of LoRa frames that are emitted by by the LoRa technology inventor in terms of distance. Semtech chipsets via a probe station. Then, we plotted the Since Sigfox and LoRa are competing technologies, our evolution of the symbol and bit error rate that we compared results will be used to compare their respective bit error with our theoretical formula. The obtained results validate the formal approach as theory was in accordance with simulation. Finally, given the comparison usually made between Sigfox 0 10 and LoRa, we stacked on the bit error probability of both technologies as a function of Eb/N0. As future work, we 10 1 − are analyzing the frequency offset impact on the bit error

2 probability. 10− REFERENCES 3dB 3 10− [1] SigFox, 2016, [accessed on 14.11.2016]. [Online]. Available: http: //www.sigfox.com/en [2] “Lora design guide : Sx1272/3/6/7/8.” [Online]. Available:

Symbol error probability 4 10− Ps LoRa - theoretical https://www.semtech.com/images/datasheet/LoraDesignGuideSTD.pdf Ps LoRa - simulation SF = 11 SF = 9 SF = 7 [3] O. Seller and N. Sornin, “Low power long range transmitter,”

5 SF = 12 SF = 10 SF = 8 Aug. 7 2014, uS Patent App. 14/170,170. [Online]. Available: 10− http://www.google.com/patents/US20140219329 [4] A. Berni and W. Gregg, “On the utility of chirp modulation for digital 10 6 − 30 28 26 24 22 20 18 16 14 12 10 8 6 signaling,” IEEE Transactions on Communications, vol. 21, no. 6, pp. − − − − − − − − − − − − − SNR (dB) 748–751, June 1973. [5] M. Winkler, “Chirp signals for communications,” IEEE WESCON Con- Figure 4. Symbol error probabilities for different values of SF . vention Record, p. 7, 1962.