Source-linked AI summary

An Open-Source LoRa Physical Layer Prototype on GNU Radio

Joachim Tapparel, Orion Afisiadis, Paul Mayoraz, Alexios Balatsoukas-Stimming, Andreas Burg

arXiv:2002.08208v2eess.SP

TL;DR

Commercial transceivers and earlier LoRa SDRs limit evaluation of PHY changes and advanced receiver algorithms. This paper presents a GNU Radio LoRa PHY with synchronization and offset-correction blocks, then experimentally evaluates its error-rate performance. The measured performance is close to AWGN simulations, including with decoupled transmitters and receivers.

  • Problem

    Commercial LoRa transceivers have fixed PHYs, limiting evaluation of PHY modifications and advanced receiver algorithms; earlier SDRs lacked STO and CFO correction and operated only at very high SNRs.

    Source: §I · p. 1
  • Method

    The paper implements a complete GNU Radio LoRa transceiver with receiver synchronization and STO/CFO estimation and compensation, and evaluates it experimentally.

    Source: Contributions · p. 1, A. GNU Radio LoRa PHY Implementation · p. 4
  • Results

    The testbed error-rate performance is within 1 dB of MATLAB simulations even with fully decoupled transmitters and receivers.

    Source: §V · p. 5
  • Takeaways & Limitations

    The publicly available implementation provides a testbed for stable experimental validation of proposed LoRa receiver algorithms.

    Source: §IV · p. 4, §V · p. 5

Abstract

from arXiv · show

LoRa is the proprietary physical layer (PHY) of LoRaWAN, which is a popular Internet-of-Things (IoT) protocol enabling low-power devices to communicate over long ranges. A number of reverse engineering attempts have been published in the last few years that helped to reveal many of the LoRa PHY details. In this work, we describe our standard compatible LoRa PHY software-defined radio (SDR) prototype based on GNU Radio. We show how this SDR prototype can be used to develop and evaluate receiver algorithms for LoRa. As an example, we describe the sampling time offset and the carrier frequency offset estimation and compensation blocks. We experimentally evaluate the error rate of LoRa, both for the uncoded and the coded cases, to illustrate that our publicly available open-source implementation is a solid basis for further research.

I. INTRODUCTION

Commercial LoRa transceivers restrict evaluation of PHY changes and advanced receivers, while earlier SDRs lacked offset correction and operated only at very high SNRs. This work presents a complete GNU Radio LoRa PHY implementation and describes its modulation and demodulation.

I. INTRODUCTION

  • The GNU Radio SDR includes receiver components for operation at very low SNRs, jointly corrects STO and CFO, and provides the first reported fully end-to-end experimental low-SNR receiver results.The implementation is publicly available for LoRa receiver research.Source: Contributions · p. 1

II. LORA PHY

  • The paper describes a complete LoRa PHY transmitter and receiver chain, including whitening, channel coding, interleaving, Gray mapping, and packet structure.Source: §II · p. 1

A. LoRa Modulation and Demodulation

  • LoRa symbols span the bandwidth and increase in frequency by B/N per chip, while demodulation dechirps the received signal and applies a DFT to estimate the symbol.At a sampling rate equal to B, real transmissions introduce aliasing distortion because the continuous-time chirp occupies slightly more than B.Source: A. LoRa Modulation and Demodulation · pp. 1–2

B. Complete LoRa Transceiver Chain

The LoRa transmitter and receiver chains perform complementary processing around chirp modulation and demodulation.

B. Complete LoRa Transceiver Chain

  • The transmitter applies whitening, Hamming encoding, interleaving, and Gray mapping before chirp modulation; the receiver reverses these steps after demodulation.Source: B. Complete LoRa Transceiver Chain · p. 2

1) Whitening:

Whitening and error-correction coding prepare LoRa data for transmission, with distinct coding schemes across the supported rates.

1) Whitening:

  • Whitening XORs information bits with a pseudo-random sequence, and the implementation derives its whitening matrices from the CR = 4/8 base matrix with rate-specific changes.For CR = 4/5, the parity bit is computed from whitened data, so whitening precedes that coding step.Source: 1) Whitening · p. 2

2) Error-Correction Coding:

  • LoRa supports rates 4/5, 4/6, 4/7, and 4/8; the three lowest rates use (4,n) Hamming codes, while 4/5 uses an even parity-check code.Source: 2) Error-Correction Coding · p. 2

3) Interleaving:

LoRa interleaving distributes symbol-error bits across codewords, and reverse Gray mapping limits adjacent-symbol errors to one bit. The packet begins with a configurable preamble of upchirps.

3) Interleaving:

  • The diagonal interleaver spreads up to SF bit errors from a symbol error across multiple ECC codewords, increasing the probability that codewords decode correctly.Most codewords will then contain only a single bit error.Source: 3) Interleaving · p. 2

4) Gray mapping:

  • Reverse Gray mapping makes an adjacent-symbol demodulation error cause one bit error, which Hamming codes at CR = 4/7 and CR = 4/8 can correct.This property is useful when CFO or STO recovery leaves ±1 demodulation errors.Source: 4) Gray mapping · p. 2

1) Preamble:

  • The packet structure is shown in Fig. 1, and its first component is a preamble consisting of a variable number of upchirps.The default preamble length is 8; valid lengths range from 6 to 65,535.Source: 1) Preamble · p. 2, C. LoRa Packet Structure · p. 2

2) Network identifiers:

The packet contains network identifiers, synchronization downchirps, an optional header, and a payload with an optional CRC. The following synchronization section addresses the failure of ideal-synchronization assumptions in practice.

2) Network identifiers:

  • Two network identifier symbols follow the preamble; cited descriptions differ on whether they are {x, N − x} or {x, x}.The first description recommends a minimum distance of three between network identifiers to avoid problems from ±1 demodulation errors.Source: 2) Network identifiers · p. 2

3) Downchirps:

  • Two and a quarter downchirps follow the network identifiers and help distinguish sampling time offset from carrier frequency offset.Source: 3) Downchirps · p. 2

4) Header (Optional):

  • The optional header carries packet length, code rate, CRC presence, and a checksum; without it, receiver parameters must be configured manually.Source: 4) Header (Optional) · p. 2

5) Payload and CRC:

  • The payload is the packet’s final part, may include a 16-bit CRC, and is limited to 255 bytes.Source: 5) Payload and CRC · p. 2

III. LORA FRAME SYNCHRONIZATION

  • Ideal synchronization assumptions often fail in practice, so the receiver adds frame synchronization and STO/CFO correction for correct demodulation.The receiver addresses these offsets during frame synchronization, not only in the data portion of the frame.Source: §III · pp. 2–3

A. Frame Synchronization Signal Model

The signal model accounts for decision windows that may straddle preamble upchirps, as well as sampling-time and carrier-frequency offsets. Their combined effects make joint estimation and correction challenging.

B. Synchronization and Offset Correction

The receiver detects the preamble and performs coarse synchronization before separating and correcting integer and fractional STO/CFO components. Fractional CFO is estimated before fractional STO, which is then corrected by interpolation.

1) Preamble detection:

  • The receiver detects a preamble when Npr−1 consecutive symbols fall within {s−1, s, s+1}, allowing for ±1 errors caused by fractional STO–CFO offsets.Source: 1) Preamble detection · p. 3
  • A majority rule over the in-range symbols sets the preamble synchronization value and discards N−ŝpr samples for coarse time synchronization.Source: 1) Preamble detection · p. 3
  • Coarse synchronization leaves possible time misalignment because integer CFO and fractional-offset effects can shift the estimated preamble position.Source: 1) Preamble detection · p. 3
  • The receiver separates integer STO and CFO using the 2.25 downchirps, re-synchronizes with integer STO, and removes integer CFO with a frequency shift.Avoiding integer-CFO-induced time misalignment is desirable because it results in inter-symbol interference.Source: 2) Estimation and Compensation of LSTO… · p. 3
  • Fractional CFO is estimated before fractional STO using RCTSL-based spectral methods; the CFO estimate is corrected by multiplying the received signal by a complex exponential.For CFO estimation, the receiver dechirps the remaining Npr−2 preamble symbols and computes a length-2(Npr−2)N DFT.Source: 3) Estimation and Compensation of λSTO… · pp. 3–4
  • After CFO correction, the receiver reuses the Npr−2 preamble symbols to estimate fractional STO from combined length-2N DFTs, then compensates it by time-domain interpolation.Source: 3) Estimation and Compensation of λSTO… · p. 4

IV. LORA TESTBED AND MEASUREMENT RESULTS

The GNU Radio implementation is publicly available for research and development of algorithms intended to improve LoRa receiver performance.

  • The open-source GNU Radio LoRa PHY implementation is publicly available for research and development of receiver algorithms.The paper also uses the implementation in a testbed to experimentally assess LoRa error-rate performance.Source: §IV · p. 4

A. GNU Radio LoRa PHY Implementation

The GNU Radio implementation provides configurable LoRa transmit and receive chains, including synchronization, demodulation, and decoding.

A. GNU Radio LoRa PHY Implementation

B. Testbed description

The USRP testbed runs the GNU Radio LoRa PHY, and its coded and uncoded BER results closely track MATLAB AWGN simulations, including with STO and CFO.

B. Testbed description

  • The testbed uses NI 2920 USRPs at 915 MHz, with a shared reference clock available for zero-CFO validation and ground truth.A cable and attenuators replace antennas to avoid interference in the 915 MHz ISM band.Source: B. Testbed description · p. 4, Figure 2 · p. 4
  • A commercial LoRa transceiver and receiver-side amplifier extend the testbed to transmissions between USRPs and commercial devices.The MiniCircuits amplifier provides approximately 19 dB gain at the USRP receiver.Source: B. Testbed description · p. 4

C. Testbed results

  • Uncoded LoRa matches AWGN simulation closely with STO alone, while STO and CFO together leave less than 1 dB degradation.The figure compares testbed and simulation BER for uncoded and coded LoRa at SF = 7.Source: Figure 3 · p. 5, C. Testbed results · p. 5
  • Coded LoRa stays within 1 dB of AWGN simulation with STO alone, and adding CFO causes almost negligible degradation.The authors attribute this to effective CFO correction and coded LoRa’s resistance to small residual CFO.Source: C. Testbed results · p. 5

V. CONCLUSION

The paper presents an open-source GNU Radio LoRa PHY and synchronization and offset-correction algorithms, then validates performance within 1 dB of MATLAB simulations, even with decoupled transmitters and receivers.

V. CONCLUSION

  • The GNU Radio SDR implementation’s measured error-rate performance is within 1 dB of MATLAB simulations, even with fully decoupled transmitters and receivers.Source: §V · p. 5
  • The authors present an open-source LoRa PHY implementation and describe its synchronization and offset-correction algorithms.Source: §V · p. 5
  • The implementation provides a testbed for stable experimental validation of proposed algorithms for improved LoRa transceivers.Source: §V · p. 5
Loading 2002.08208v2…