Towards An SDR Implementation of LoRa Reverse-Engineering
Towards An SDR Implementation of LoRa Reverse-Engineering
Computer Communications
journal homepage: www.elsevier.com/locate/comcom
∗ Corresponding author.
E-mail addresses: [email protected] (A. Marquet), [email protected] (N. Montavont),
[email protected] (G.Z. Papadopoulos).
https://doi.org/10.1016/j.comcom.2020.02.034
Received 18 October 2019; Received in revised form 30 January 2020; Accepted 11 February 2020
Available online 14 February 2020
0140-3664/© 2020 Elsevier B.V. All rights reserved.
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
physical layer reconfiguration typically involve both software and hard- compare demodulation strategies, as well as to assess CSS and LoRa per-
ware (the radio). This drives a need for very flexible radios, that can formance over AWGN, time selective, frequency selective and Rayleigh
be provided with Software Defined Radios (SDR). Indeed, the SDR fading channels.
paradigm aims to perform as much signal processing as possible in
software. As a result, within the frequency band reachable by the 2. Related work
analog front-end of an SDR, transmitting, receiving and sensing any
signal is only a matter of processing power and software, which are very Most of the literature related to LoRa is actually focused on upper
flexible. As a result, a proper SDR implementation of a LoRa transceiver layers (e.g., LoRaWAN), applications and security [8,9]. A fair amount
would help research and development of smart radios in the ISM band of the research effort is also directed towards the CSS modulations
(either to sense LoRa transmissions, or to communicate using it). (receiver improvements, new modulations based on it, etc.). However,
The LoRa physical layer is not described in a standard, and is most likely due to the lack of publicly available hardware, only a few
not published anywhere outside the Semtech patent, that only covers studies have been conducted to describe and analyze, from a theoretical
CSS modulation, interleaving (which is close, but not identical to the point of view, the LoRa transmission chain. Indeed, between CSS (as
one actually used in LoRa), and preamble synchronization [1]. To the underlying modulation), and LoRaWAN, as the preferred Media
the best of our knowledge, the most significant progress towards a Access Control (MAC) protocol, LoRa includes a number of physical
complete characterization of the LoRa physical layer was published by layer techniques, namely: channel coding, whitening, and interleaving,
Knight et al. [3] and Robyns et al. [4]. Both provided open-source SDR that have a strong impact on LoRa system performance. It is worth
implementations of LoRa receivers. However, the demodulator adopted analyzing and discussing the algorithms used in LoRa, in order to know
in [4] requires high Signal-to-Noise Ratios (SNR), while the implemen- its actual performance and behavior in details, as well as to propose
tation of [3] does not work in LoRa implicit mode (no header), and is evolutions or contenders to the technology.
not maintained since 2017. In both cases, the articles are really focused Knight et al. [3] and Robyns et al. [10] wrote the only two reports,
on implementation. Thus, they do not provide any radio-agnostic evalu- to the best of our knowledge, which document a reverse engineering
ation, using either simulations or theoretical development. We believe work on LoRa and provide open source implementations. However,
that only a rigorous modeling will allow research efforts to identify Robyns et al. [10] provided a sub-optimal CSS demodulator which
adequate use cases, strong and weak points of the LoRa modulation. requires high SNR. The implementation of Knight et al. [3] uses an
Such a modeling will also pave the way for integration of CSS im- optimal demodulator. However, as pointed out by [10] (based on
provements proposed in the literature (e.g., collision mitigation [5,6], their experiments), Knight et al. wrongly assumed that dewhitening
spectral efficiency improvement [7]) into later revisions of LoRa, or should be performed prior to deinterleaving. Note that this does not
into competitor systems. prevent them to actually receive and decode LoRa message, thanks to
In this article, we propose an analysis of the LoRa physical layer the linearity of whitening and interleaving operations used in LoRa.
and a proper decomposition of the modulation and demodulation steps, It does, however, make the retro-engineering process more difficult
each described using closed-form input–output relationships. To the (for instance, in Knight et al. implementation, different whitening
best of our knowledge, this is the first time that such a detailed sequences are needed depending on the spreading factor, which is not
description of LoRa transceivers architecture is presented opening, thus, necessary when deinterleaving is done prior to dewhitening). Other
possibilities for independent simulations and implementations, as well implementations exist, but are not properly documented and hard to
as propositions and evaluation of potential improvements (e.g., better set up (e.g., [11]).
channel coding, joint modulation and coding, etc.). We demonstrate the Regarding the CSS modulation, Goursaud et al. gave a continuous-
potential of such modeling, through the proposition of several possible time expression of CSS signals in [12]. Vangelista et al. [13] derived
demodulation chains for LoRa, and comparison of performance when the optimal receiver over Additive White Gaussian Noise (AWGN), and
𝑀-FSK is used instead of CSS. Furthermore, our description of the Elshabrawy et al. [14] found out that CSS modulation is an instance of
discrete-time complex baseband equivalent of CSS signals and, more orthogonal signaling, and used this result to give closed-form formulas
generally, discrete time descriptions of every algorithm of this article of bit-error probability over AWGN and Rayleigh fading channels. More
makes it a reference for digital implementations using, for instance: recently Ghanaatian et al. [15] studied the impact of Carrier Frequency
SDR, Digital Signal Processor (DSP) or Field Programmable Gate Array Offset (CFO) and Sampling Frequency Offset (SFO) on CSS signals, us-
(FPGA). In more details, the main contributions of this article are: ing analytical models and simulations over AWGN. They also described
methods for estimating CFO and SFO based on the LoRa preamble, as
• A detailed analysis of the LoRa physical layer, formally describing
well as compensation techniques to cancel these impairments. Several
all the algorithms involved in LoRa transmission chains.
improvements and variations of CSS have been proposed, mostly fo-
• Methods to reverse-engineer the key-parameters of every algo-
cused on spectral efficiency improvements. Bomfin et al. [16] proposed
rithms used for LoRa communications.
to encode information in the phase of CSS symbols, which is similar to
• Assessment of different receiver chains for LoRa, under various
coplanar 𝑀-FSK proposed by Roth et al. [17]. Kim et al. [18] proposed
channel conditions (time selective, frequency selective, Rayleigh).
to use both up- and down-chirps to encode more information. Vange-
• Comparison of CSS and 𝑀-FSK (𝑀-arry Frequency Shift Keying)
lista et al. [7] proposed a technique to double the spectral efficiency of
with various channels.
CSS, at the price of a 3 dB penalty in SNR.
Performance assessment shows that CSS (and thus, LoRa) is especially
good, compared to 𝑀-FSK, when faced with frequency-selective chan- 3. System architecture and reverse-engineering
nels without mobility. In every other scenarii (AWGN, time-selective,
Rayleigh channel), it retains the performance of 𝑀-FSK. This section details all the algorithms involved when transmitting
The remainder of this article is organized as follows. In Section 2, we and receiving data over LoRa, as originally described in [10] (see
first summarize the recent works regarding LoRa reverse-engineering, Fig. 1). We also provide instructions on how to reverse-engineer key
performance assessment and SDR implementations. Section 3 formally parameters for these algorithms.
details the LoRa architecture, gives methods to reverse-engineer indi- The message consists in 𝐿 bits, and is modeled as a binary vector of
vidual components of the transceiver, to implement them, and then independent and identically distributed bits: 𝐛 ∈ {0; 1}𝐿 .
derives a discrete-time complex baseband equivalent of CSS modulated Channel code is introduced to improve reliability to noise. This step
signals. Then, Section 4 gives closed-form expressions for various CSS introduces redundancy, and yields a (longer) binary sequence denoted
demodulation strategies. Finally, simulations in Section 5 allow to 𝐛c ∈ {0; 1}𝐿∕𝜂 , with 0 < 𝜂 < 1 the coding efficiency.
596
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
597
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
where [𝐆𝐛]𝑙 denote the 𝑙th element of vector 𝐆𝐛. Using formula (2) to
convert LLRs to probabilities, discarding the denominator as a constant
with respect to ̄𝐛, and translating into logarithmic domain, Eq. (6)
reduces to:
∑ [ ] (
3+CR )
𝐛̂𝐤 = argmin 𝐆̄𝐛 𝑙 𝐿 𝑏c(4+CR)𝑘+𝑙 . (7)
̄𝐛∈{0;1}4 𝑙=0
598
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
𝑐 ∈ , the initial frequency of 𝑔0 (𝑡) is shifted by 𝑐.𝐵∕𝑀 = 𝑐∕𝑇 Hz, and = 𝛱𝑀 [𝑘].𝑒𝑗𝜋 𝑀 𝑒 𝑗2𝜋 𝑀 𝑘
, ∀𝑘 ∈ Z, 𝑐 ∈ . (25)
extra steps are taken to make sure that the chirp is wrapped between Now, incorporating (25) in (20), we obtain:
[−𝐵∕2; 𝐵∕2] as illustrated in Fig. 3:
∑
𝐿∕(SF.𝜂)
(𝑘−𝑛𝑀)2
𝐵 𝑐
𝑔𝑐 (𝑡) = 𝛱𝑇 (𝑡).𝑒𝑗2𝜋( 2𝑇 𝑡+ 𝑇 )𝑡 .𝑒−𝑗2𝜋𝑙𝐵𝑡 , 𝑠[𝑘] = 𝛱𝑀 [𝑘 − 𝑛𝑀].𝑒𝑗𝜋 𝑀 (26)
[ ] 𝑛=0
𝐵 𝑐 𝐵 𝐵 𝐜𝑛
∀𝑡 ∈ R, 𝑙 ∈ Z s.t. 𝑡 + ∈ 𝑙𝐵 − ; 𝑙𝐵 + . (16) (𝑘−𝑛𝑀)
𝑇 𝑇 2 2 .𝑒𝑗2𝜋 𝑀
599
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
the phase of the received signal. After quadrature detection, the signal
is analogous to an 𝑀-ASK modulated signal:
2𝜋 ∑
𝐿∕(SF.𝜂)
{𝑟𝑑 [𝑘]} = 𝛱𝑀 [𝑘 − 𝑛𝑀]𝐜𝑛 + 𝑧′ [𝑘], ∀𝑘 ∈ Z, (31)
𝑀 𝑛=0
The three following demodulators use the same dechirping opera- One can observe that the term in the real part is actually the 𝑀 point
tion, described as: Discrete Fourier Transform (DFT), denoted as 𝑀 {⋅}[⋅], of the received
𝑘2
signal:
𝑟𝑑 [𝑘] = 𝑟[𝑘]𝑒−𝑗𝜋 𝑀 , ∀𝑘 ∈ Z, (29) { }
𝐜̂𝑛 = argmax 𝑀 {𝑟𝑑 [𝑘 + 𝑛𝑀]}[𝑐] , (36)
where 𝑟𝑑 [𝑘] is the dechirped observed signal. This operation does not 𝑐∈
change the statistical properties of the noise, thus this system model, which can be efficiently implemented using the Fast Fourier Transform
involving 𝑟𝑑 [𝑘] instead of 𝑟[𝑘] is equivalent to 𝑀-FSK over AWGN. (FFT) algorithm [22].
Expanding the correlation term in (36) allows to understand why
4.1. Quadrature demodulation 𝑀-FSK modulations are effective in low SNR conditions, especially as
𝑀 grows bigger:
Quadrature demodulation is a technique that is usually applied to 𝑀 {𝑟𝑑 [𝑘 − 𝑛𝑀]}[𝑐 ′ ] (37)
analog Frequency Modulated (FM) signals in order to extract frequency
= 𝑀 {𝑠[𝑘 − 𝑛𝑀]}[𝑐 ′ ] + 𝑀 {𝑧[𝑘]}[𝑐 ′ ]
variations. It was retained by Robyns et al. [10] in their SDR implemen-
tation, because of its low-complexity. Its use in 𝑀-FSK demodulation ∑
𝐿∕(SF.𝜂)
𝐜𝑛
= 𝑀 {𝛱𝑀 [𝑘 − (𝑛 − 𝑛′ )𝑀].𝑒𝑗2𝜋 𝑀 𝑘 }[𝑐 ′ ] (38)
comes from the fact that these modulations can be seen as frequency 𝑛′ =0
modulated 𝑀-arry Amplitude Shift Keying (ASK) modulations. Thus, it
+ 𝑀 {𝑧[𝑘]}[𝑐 ′ ]
is actually a two-stage demodulation process. The first stage performs
quadrature detection of the frequency variation in 𝑟𝑑 [𝑘], and the second = 𝑀.𝛿𝑛−𝑛′ 𝛿𝐜𝑛 −𝑐𝑛′ + 𝑀 {𝑧[𝑘]}[𝑐 ′ ], (39)
performs 𝑀-ASK demodulation on this frequency variation. where 𝛿𝑛 = 1 if 𝑛 = 0 and zero otherwise. As we can see, the correlator
Quadrature detection reads as follows: output corresponding to the symbol that was sent has its amplitude
{ } augmented by 𝑀, as opposed to the other correlators. This means that
{𝑟𝑑 [𝑘]} = arg 𝑟𝑑 [𝑘]𝑟∗𝑑 [𝑘 − 1] , ∀𝑘 ∈ Z, (30)
this modulation, along with coherent demodulation gets more robust to
where (⋅)∗ denotes the complex conjugation. As frequency is the deriva- noise as 𝑀 increases. However, as 𝐵.𝑇 = 𝑀, this comes at the expense
tive of the phase, this detector corresponds to the digital derivative of of either an increased bandwidth or a decreased symbol rate.
600
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
4.3. Non-coherent receiver Most of the simulations presented here present performance as-
sessed with respect to the per-bit SNR of the transmission, denoted as
While effective, the coherent receiver is very sensitive to channel 𝐸𝑏 ∕𝑁0 . SNR and per-bit SNR are related by the spectral efficiency 𝛼 (in
impairments other than white noise. In particular, due to the real part bits/s/Hz) of the modulation:
in (36), any channel impairment that translates to a phase shift in (37),
SNR = 𝛼𝐸𝑏 ∕𝑁0 . (45)
results in a loss of reliability.
Non-coherent detection is a computationally efficient way to tackle In the case of CSS and 𝑀-FSK, spectral efficiency is given by 𝛼 = SF∕𝑀.
this issue, as it only replaces the real part operator by the magnitude In the case of LoRa, spectral efficiency is given by 𝛼 = 𝜂SF∕𝑀 =
operator in (36): 4.SF∕(𝑀.(CR + 4)). On the one hand, using 𝐸𝑏 ∕𝑁0 allows for fair
comparison of different modulations, and demodulation methods, as it
𝐜̂𝑛 = argmax ||𝑀 {𝑟𝑑 [𝑘 + 𝑛𝑀]}[𝑐]|| . (40) considers the amount of energy dedicated to the transmission of each
𝑐∈
bit [19, Chap. 4.2.9]. On the other hand, SNR is more meaningful when
However, this comes at the expense of a reduced noise immunity. one wants to evaluate the performance (the range, in particular) of
actual systems, as typical transmitters are limited in terms of signal
4.4. Soft-decisions for coherent and non-coherent receivers power (not in terms of per-bit energy).
In order to leverage the potential gains of soft-decision decoding 5.1. Demodulation methods
(see Section 3.1), the demodulator must be altered, as to compute LLR
for each bit of a codeword: We first compare the three demodulation techniques presented in
{ }
( i) P 𝑏i𝑛 = 0|𝑟𝑑 (𝑡) Section 4 on Fig. 4. As expected, quadrature demodulation has the
𝐿 𝑏𝑛 = ln { }. (41) worst performance, which can however be improved by oversampling
P 𝑏i𝑛 = 1|𝑟𝑑 (𝑡)
the received signal. However, even with an oversampling factor of 2,
Under the assumption that transmitted symbols are IID, assuming that quadrature demodulation suffers from an 𝐸𝑏 ∕𝑁0 difference as high as
𝑏i𝑛 is carried by the 𝑙th bit of the 𝑛th symbol, and using Bayes rule, we 23 dB for a BER of 10−4 with respect to coherent demodulation.
get: The difference between coherent and non-coherent demodulation is
∑ { } much less, in the order of magnitude of 1 dB.
( i) 𝑐∈ s.t. 𝑏𝑙 (𝑐)=0 P 𝑟𝑑 (𝑡)|𝑐𝑛 = 𝑐
𝐿 𝑏𝑛 = ln ∑ { }, (42)
𝑐∈ s.t. 𝑏𝑙 (𝑐)=1 P 𝑟𝑑 (𝑡)|𝑐𝑛 = 𝑐 5.2. Performance over AWGN channel
where 𝑏𝑙 (𝑐) denotes the value of the { 𝑙th bit mapped
} to symbol 𝑐.
AWGN channel is an idealized channel where propagation would
On an AWGN channel, likelihoods P 𝑟𝑑 (𝑡)|𝑐𝑛 = 𝑐 are proportional to
2 be perfect, and only additive noise (mainly thermal noise in the re-
𝑒{𝑀 {𝑟𝑑 [𝑘+𝑛𝑀]}[𝑐]}∕𝜎 , where 𝜎 2 denotes noise power [17]. Thus, LLR ceiver electronics) would affect the emitted signal. It is nevertheless a
for coherent detection are finally expressed as: commonly used base for comparison of different modulations.
( ) { } As CSS and 𝑀-FSK belong to the same modulation family (orthogo-
𝐿 𝑏i𝑛 = max∗ 𝑀 {𝑟𝑑 [𝑘 + 𝑛𝑀]}[𝑐] ∕𝜎 2 (43)
𝑐∈ s.t. 𝑏𝑙 (𝑐)=0 nal modulations), they should perform exactly the same over an AWGN
{ }
− max∗ 𝑀 {𝑟𝑑 [𝑘 + 𝑛𝑀]}[𝑐] ∕𝜎 2 , channel, which is confirmed by Fig. 5.
𝑐∈ s.t. 𝑏𝑙 (𝑐)=1
Fig. 5b shows that coherent demodulation and soft-decoding allow
(∑ )
where max∗ , defined as max∗ 𝑐∈ 𝑐 = ln 𝑐
𝑐∈ 𝑒 , has several efficient
for processing gain of approximately 1 dB and 1.5 dB, respectively. This
implementations, and can be approximated as max∗ ≈ max, in which means 2.5 dB of difference between the most complex and less complex
case 𝜎 2 can be omitted from (43) [23]. implementation of the receiver.
Similar to Section 4.3, the real part in (43) results in a loss of Comparing Figs. 5a and 5b we notice that the extra processing
reliability for any channel impairment that translated to a phase shift steps introduced by LoRa, with respect to CSS and 𝑀-FSK, does not
in (37). This can be efficiently circumvented using the magnitude significantly improve the efficiency of the transmission, at least for
operator instead of the real part: SF = 9 and CR = 4, on an AWGN channel.
( )
𝐿 𝑏i𝑛 = max∗ |𝑀 {𝑟𝑑 [𝑘 + 𝑛𝑀]}[𝑐]| ∕𝜎 2 (44) 5.3. Performance over frequency-selective channels
𝑐∈ s.t. 𝑏 (𝑐)=0
| |
𝑙
601
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
Fig. 5. Simulations over an AWGN channel, with SF = 9. CSS and 𝑀-FSK are exactly equivalent in this scenario.
Fig. 6. Simulations over a Proakis B frequency-selective channel, with SF = 9. Here, CSS performs much better than 𝑀-FSK, thanks to the symbol-level frequency diversity induced
by the chirp.
Fig. 7. Frequency-domain response of the Proakis B channel [19, chap. 9.4]. Signal is Fig. 8. Time-domain response of the time-selective channel used in this article. The
completely lost at the center of the occupied bandwidth, and suffers from important central portion of each symbol suffers from very high attenuation, while signal at the
attenuation around it. exact center of it is completely lost.
5.4. Performance over time-selective channels This is a very unlikely situation, and we study this channel mainly to
assess the limits of LoRa and CSS when faced with mobility.
Here, we consider a cosined-shaped time-selective channel:
Time-selective channels are representative of propagation suffering [ ]
𝑟[𝑘] = (cos(2𝜋𝑘∕𝑀) + 1) ∕1.5 𝑠[𝑘] + 𝑧[𝑘]. (47)
from Doppler only. That is, situation where the emitter and receiver
are mobile, but there are no obstacle leading to multipath propagation. This channels is also non-invertible (see Fig. 8).
602
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
Fig. 9. Simulations over a time selective channel, with SF = 9. Here, 𝑀-FSK and CSS performs equally. One can notice that the processing gain due to coherent receiving vanishes
as 𝐸𝑏 ∕𝑁0 goes higher.
Fig. 10. Simulations over an ITU indoor to outdoor and pedestrian Rayleigh channel, with SF = 9. Here also, CSS and 𝑀-FSK have similar performances.
Fig. 9 shows that CSS (LoRa) and 𝑀-FSK (FSK-LoRa) are equivalent computed as 𝑓𝑑 = 𝑓0 .𝜈∕(𝑐.𝐵), with 𝑐 ≈ 3.108 m∕s the speed of light in a
in this scenario. Interestingly, we notice on Fig. 9a that coherent and vacuum. The received signal is expressed as:
non-coherent demodulation tend to be equivalent as 𝐸𝑏 ∕𝑁0 increases. ∑
∞
We notice the same behavior on Fig. 9b, but it happens at higher values 𝑟[𝑘] = ℎ𝑘 [𝑙]𝑠[𝑘 − 𝑙] + 𝑧[𝑘], (48)
of 𝐸𝑏 ∕𝑁0 . 𝑙=−∞
Comparing Figs. 6a and 6b, we observe that the LoRa processing where ℎ𝑘 [𝑙] is the time-varying impulse response of the channel, given
chain allows for a steeper slope of the BER curve. This allows LoRa by:
to outperform CSS at 𝐸𝑏 ∕𝑁0 = 6 dB with soft decoding (coherent 𝑁taps −1
∑
demodulation, 8 dB for non-coherent) and 𝐸𝑏 ∕𝑁0 = 9 dB with hard ℎ𝑘 [𝑙] = 𝐴[𝑛]𝛼𝑘 [𝑛]sinc(𝜏𝑁 [𝑛] − 𝑙), (49)
decoding (coherent demodulation, 10 dB for non-coherent). 𝑛=0
with 𝑁taps the number of path in the Rayleigh channel model, 𝜏𝑁 [𝑛]
5.5. Performance over Rayleigh channels ∀𝑛 ∈ [0; 𝑁taps − 1] is the relative normalized delay of path 𝑛, and
𝐴[𝑛] ∀𝑛 ∈ [0; 𝑁taps − 1] is the average power of path 𝑛. 𝛼𝑘 [𝑛] is
the time-varying complex gain, and is computed using the sum-of-
Rayleigh channels are representative of propagation suffering from
sinusoids technique (with 8 sinusoids) described in [26]. In our sim-
multipath and mobility, inducing random fadings in the received signal.
ulations, these computations are handled by the GNURadio block se-
Here, we use the ITU outdoor to indoor and pedestrian A channel, taken
lective_fading_model.
from [25, Table 4] (see Table 1). It models communication between Note that, for coherent demodulation to be effective in this scenario,
a device located outdoor (a gateway, typically) and a device located an estimator of the phase shift introduced by the channel is necessary.
indoor or in a street (a smart sensor, for instance). As this article does not cover such an estimator, we computed this
To fit this description, we configured a maximum Doppler shift cor- phase-shift with knowledge of the simulated channel (more precisely,
responding to a typical walking speed: 𝜈 = 3 km/h (𝜈 ≈ 0.83 m∕s). The we compare the phase of the signal before and after passing through
other parameters are chosen to match a LoRa transmission in the 868 the Rayleigh channel, before adding AWGN).
MHz band, that is, a bandwidth 𝐵 = 125 kHz, and a carrier frequency Fig. 10 shows that CSS (LoRa) and 𝑀-FSK (FSK-LoRa) are also
𝑓0 = 868.1 MHz. The normalized maximum Doppler frequency is then equivalent in this scenario. On Fig. 10b, one can observe that the
603
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
Fig. 11. LoRa simulations over an ITU indoor to outdoor and pedestrian Rayleigh channel, with various SF and CR = 4.
Fig. 12. LoRa simulations over an ITU indoor to outdoor and pedestrian Rayleigh channel, with various CR and SF = 9.
Table 1 of a reduced spectral efficiency and, thus, reduced bitrate, for a fixed
ITU outdoor to indoor and pedestrian A channel tapped-delay-line parameters
bandwidth).
(from [25, Table 4]). Normalized delays 𝜏𝑁 are computed from delays 𝜏 as 𝜏𝑁 =
𝜏∕𝑇𝑒 = 𝜏.𝐵, with 𝐵 = 125 kHz.
Tap Relative delay Relative normalized Average power
6. Conclusion
𝑛 (𝜏[𝑛], ns) delay (𝜏𝑁 [𝑛]) (𝐴[𝑛], dB)
0 0 0 0
In this article, we presented the LoRa modulation architecture. We
1 110 0.01375 −9.7 discussed channel coding, whitening and interleaving with reverse-
2 190 0.02375 −19.2 engineering in mind. In particular, we identified the challenges for
3 410 0.05125 −22.8 determining correct whitening sequences, and gave closed-form expres-
sion for interleaving and deinterleaving. We derivated the discrete-time
expression of the CSS modulated signal, and used it as a basis to express
processing gains allowed by coherent demodulation and soft-decoding and study several demodulation strategies. By means of simulation,
are up to 5 dB. Here LoRa outperforms CSS at 𝐸𝑏 ∕𝑁0 = 21 dB with we showed that quadrature demodulation of CSS modulated signal is
soft decoding (same as non-coherent) and 𝐸𝑏 ∕𝑁0 = 27 dB with hard outperformed by coherent and non-coherent receivers. We confirmed
decoding (same as non-coherent). that CSS modulation has good properties for transmissions over time
Figs. 11 and 12 show the impact of the spreading factor and the and frequency selective channels (especially for the latter).
coding rate, respectively, on the transmission robustness. Notice how Finally, we observed that the three extra stages used in LoRa can
increasing the spreading factor by one results in an SNR gain of only give tangible benefits if coherent demodulation and soft decoding
approximately 5 dB (3 dB in terms of 𝐸𝑏 ∕𝑁0 ). Similarly, consecutive are used. These are computationally more expensive, and may not be
CR introduces a gain of around 2 dB of SNR (1 dB in terms of 𝐸𝑏 ∕𝑁0 ). implemented in the most energy constrained devices. They are however
Hence, in terms of BER performance, varying the spreading factor leads very likely to be implemented in base stations.
to the most significant gains. However, increasing SF by one doubles All simulations have been implemented in GNURadio, which is an
the time on air. Thus, when considering other constraints such as the SDR framework [24]. However, this implementation is not able to
time on air, and the duty cycle, as enforced in the ISM bands, varying reliably demodulate real LoRa signal yet. Indeed, LoRa demodulation
the coding rate can be a better option, depending on the application. still presents open challenges. In particular, there is no dedicated
This shows how an increase in spreading factor and/or coding rate literature covering algorithms for time and frequency shift tracking
CR can help cover longer ranges. However, this comes at the price for the CSS modulation. Without such algorithms, reliable decoding
604
A. Marquet, N. Montavont and G.Z. Papadopoulos Computer Communications 153 (2020) 595–605
of LoRa transmissions, especially with average quality radios (such as [9] The things network, 2019, URL https://www.thethingsnetwork.org/docs/
the ones commonly used in SDR) and long packets, cannot be made lorawan/academic.html.
[10] P. Robyns, P. Quax, W. Lamotte, W. Thenaers, A multi-channel software decoder
reliably, even at high SNR.
for the lora modulation scheme, in: Proceedings of the 3rd International Confer-
ence on Internet of Things, Big Data and Security - Volume 1: IoTBDS, INSTICC,
Declaration of competing interest SciTePress, 2018, pp. 41–51, http://dx.doi.org/10.5220/0006668400410051.
[11] R.F. Myriad, Myriad RF an SDR lora implementation for R & D, commit 52ec64d,
No author associated with this paper has disclosed any potential or 2018, URL https://github.com/myriadrf/LoRa-SDR/.
[12] C. Goursaud, J.-M. Gorce, Dedicated networks for IoT : PHY / MAC state
pertinent conflicts which may be perceived to have impending conflict of the art and challenges, EAI endorsed transactions on Internet of Things
with this work. For full disclosure statements refer to https://doi.org/ http://dx.doi.org/10.4108/eai.26-10-2015.150597.
10.1016/j.comcom.2020.02.034. [13] L. Vangelista, Frequency shift chirp modulation: The lora modulation, IEEE Signal
Process. Lett. 24 (12) (2017) 1818–1821, http://dx.doi.org/10.1109/LSP.2017.
2762960.
CRediT authorship contribution statement
[14] T. Elshabrawy, J. Robert, Closed-form approximation of lora modulation BER
performance, IEEE Commun. Lett. 22 (9) (2018) 1778–1781, http://dx.doi.org/
Alexandre Marquet: Conceptualization, Methodology, Software, 10.1109/LCOMM.2018.2849718.
Formal analysis, Investigation, Data curation, Writing - original draft, [15] R. Ghanaatian, O. Afisiadis, M. Cotting, A. Burg, Lora digital receiver analysis
Writing - review & editing, Visualization. Nicolas Montavont: Writ- and implementation, in: ICASSP 2019-2019 IEEE International Conference on
Acoustics, Speech and Signal Processing (ICASSP), 2019, pp. 1498–1502, http:
ing - original draft, Writing - review & editing, Supervision, Project //dx.doi.org/10.1109/ICASSP.2019.8683504.
administration, Funding acquisition. Georgios Z. Papadopoulos: Writ- [16] R. Bomfin, M. Chafii, G. Fettweis, A novel modulation for iot: Psk-lora, in: 2019
ing - original draft, Writing - review & editing, Supervision, Funding IEEE 89th Vehicular Technology Conference (VTC2019-Spring), 2019, pp. 1–5,
acquisition. http://dx.doi.org/10.1109/VTCSpring.2019.8746470.
[17] Y. Roth, J.-B. Doré, L. Ros, V. Berg, Contender waveforms for low-power wide-
area networks in a scheduled 4g OFDM framework, EURASIP J. Adv. Signal
References Process. 2018 (2018) 43, http://dx.doi.org/10.1186/s13634-018-0566-4.
[18] K. Kim, S. Lee, Y. Shin, Spectral efficiency improvement of chirp spread spectrum
[1] O. Seller, N. Sornin, Low power long range transmitter, 2014. systems, in: 2019 International Conference on Information and Communication
[2] C. Moy, High-level design approach for the specification of cognitive radio Technology Convergence (ICTC), 2019, pp. 1085–1087, http://dx.doi.org/10.
equipments management apis, J. Netw. Syst. Manage. 18 (1) (2010) 64–96, 1109/ICTC46691.2019.8939967.
http://dx.doi.org/10.1007/s10922-009-9151-3. [19] J. Proakis, M. Salehi, Digital Communications, McGraw-Hill International Edition,
[3] M. Knight, B. Seeber, Decoding LoRa: Realizing a Modern LPWAN with SDR, in: McGraw-Hill, 2008.
Proceedings of the GNU Radio Conference, Vol. 1 (1). [20] Semtech, sx1276/77/78/79 datasheet, rev. 5 edition, 2016.
[4] P. Robyns, P. Quax, W. Lamotte, W. Thenaers, Gr-lora: An efficient lora decoder [21] Semtech, an1200.22 lora modulation basics, rev. 2 edition, 2015.
for GNU radio, 2017, http://dx.doi.org/10.5281/zenodo.892174. [22] R. Singleton, A short bibliography on the fast fourier transform, IEEE Trans.
[5] R. Eletreby, D. Zhang, S. Kumar, O. Yaundefinedan, Empowering low-power wide Audio Electroacoust. 17 (2) (1969) 166–169, http://dx.doi.org/10.1109/TAU.
area networks in urban settings, in: Proceedings of the Conference of the ACM 1969.1162040.
Special Interest Group on Data Communication, SIGCOMM ’17, Association for [23] P. Robertson, P. Hoeher, E. Villebrun, Optimal and sub-optimal maximum a
Computing Machinery, New York, NY, USA, 2017, pp. 309–321, http://dx.doi. posteriori algorithms suitable for turbo decoding, Eur. Trans. Telecommun. 8
org/10.1145/3098822.3098845. (2) (1997) 119–125, http://dx.doi.org/10.1002/ett.4460080202.
[6] U. Noreen, L. Clavier, A. Bounceur, Lora-like css-based phy layer, capture effect [24] A. Marquet, Gnuradio implementation of a lora transceiver, 2019, http://dx.doi.
and serial interference cancellation, in: European Wireless 2018; 24th European org/10.5281/zenodo.3630182.
Wireless Conference, 2018, pp. 1–6. [25] International Telecommunication Union Radiocommunication Sector, Guide-
[7] L. Vangelista, A. Cattapan, A new lora-compatible modulation improving the lines for evaluation of radio transmission technologies for IMT-2000,
lorawan network level performance, in: 2019 IEEE Latin-American Conference Recommendation, ITU-R, 1997.
on Communications (LATINCOM), 2019, pp. 1–6, http://dx.doi.org/10.1109/ [26] M. Patzold, C. Wang, B.O. Hogstad, Two new sum-of-sinusoids-based methods
LATINCOM48065.2019.8937880. for the efficient generation of multiple uncorrelated rayleigh fading waveforms,
[8] J.P.S. Sundaram, W. Du, Z. Zhao, A survey on lora networking: Research IEEE Trans. Wireless Commun. 8 (6) (2009) 3122–3131, http://dx.doi.org/10.
problems, current solutions and open issues, IEEE Commun. Surv. Tutor. (2019) 1109/TWC.2009.080769.
1, http://dx.doi.org/10.1109/COMST.2019.2949598.
605