LoRa-Based Localization: Opportunities and Challenges

12/30/2018 ∙ by Chaojie Gu, et al. ∙ Nanyang Technological University 0

Low-power wide-area network (LPWAN) technologies featuring long-range communication capability and low power consumption will be important for forming the Internet of Things (IoT) consisting of many geographically distributed objects. Among various appearing LPWAN technologies, LoRa has received the most research attention due to its open specifications and gateway infrastructures unlike the closed designs and/or managed gateway infrastructures of other LPWAN technologies. While existing studies on LoRa has focused on network connectivity and performance, accurate positioning of LoRa end devices is still largely an open issue. In this paper, we discuss and analyze the physical layer features of LoRa that are relevant to localization. Our discussions and analysis illustrate the opportunities and challenges in implementing LoRa-based localization.



There are no comments yet.


page 3

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Low-power wide-area networks (LPWANs) are an emerging wireless platform that aims to sustain power-constrained end devices (e.g., those based on batteries or energy harvesting) to operate for years while communicating at low data rates to gateways several kilometers away. LPWAN technologies will largely increase the degree of connectivity of Internet of Things (IoT) and enable deep penetration of IoT objects into the urban territories. Fig. 1 illustrates the comparisons among various wireless technologies in terms of radio power consumption and communication ranges. From the figure, LPWANs (e.g., LoRaWAN [2], Sigfox [4], Weightless-P [5], and NB-IoT [3]) form an important pole in the spectrum of radio power consumption versus communication range.

Figure 1: Power consumption versus communication range for various radios.

Given LPWAN signals’ capability of propagating over long distances and penetrating civil infrastructures, exploiting LPWAN signals for localizing IoT objects over long distances and/or in indoor environments has attracted increasing research interests. In this paper, we discuss the opportunities and challenges of LoRa-based localization. LoRa is a physical layer technique that uses a Chirp Spread Spectrum (CSS) modulation, whereas LoRaWAN is an open data link layer specification based on LoRa. Our focus of studying LoRa for localization is due to its use of license-free ISM band (e.g., EU868 MHz and US916 MHz), low cost (US$15 per unit [6]), and scalability to support many IoT objects. Compared with other wireless-based solutions, the LoRa-based localization will offer the following advantages:

  • If an infrastructure-based localization approach is considered, the LoRa infrastructures will be much simpler than other wireless infrastructures. Existing approaches based on short-range radios, e.g., Wi-Fi, Bluetooth, and ultra-wideband (UWB), often require dense deployment of access points (APs) and beacon nodes, leading to high installation and maintenance costs. In contrast, due to LoRa’s long-range communication capability, a small number of LoRa gateways can cover a geographic area (e.g., a campus) or a civil construction (e.g., a building) and act as anchors to support the localization of LoRa end devices. Thus, the deployment of the infrastructure will not incur significant overhead.

  • Due to LoRa’s low power consumption and good scalability, the LoRa-based localization solutions can be applied to massive objects (e.g., goods in a warehouse). High-power radios (e.g., Wi-Fi and cellular) are ill-suited for such scenarios, since they will drain the battery energy quickly. The RFID and NFC solutions, which rely on the reader’s scanning, cannot achieve real-time object localization.

Despite the above desirable features of LoRa-based localization, we also face the following key technical challenges:

  • We aim to develop solutions that use customized gateways to localize off-the-shelf LoRa end devices without any hardware customization and retrofitting. As most commercial LoRa end devices do not provide access to the LoRa physical layer, it is challenging and even impossible to obtain low-level information that is often critical to localization.

  • After penetrating barriers, the LoRa signals often go below the noise floor. Although the LoRa’s CSS modulation is designed to deal with significant signal attenuation, the localization approaches based on received signal strength (RSS) and RSS indicator (RSSI) will be vulnerable to low signal-to-noise ratios (SNRs). Thus, the RSS-based approaches are ill-suited for LoRa-based localization.

  • As the CSS-modulated LoRa signal is a narrowband signal, it cannot be very sharp in the time domain. Its smooth time-domain waveform will make accurately timing the arrivals of the LoRa signals at the gateway difficult, rendering the time-of-arrival (TOA) approaches futile.

  • To pursue using phase information of the LoRa signal for localization, the frequency variation of CSS makes the estimation of signal phase challenging. In addition, the low-cost LoRa end devices often have considerable frequency biases, especially when deployed in the environments with time-varying conditions (e.g., varying ambient temperature and humidity). The multipath propagation of the LoRa signal may also affect negatively the estimation of the signal phase.

This paper will discuss in detail the challenges faced by a few possible solutions of localizing LoRa end devices. We also provide a formulation of the phase-based approach, which we believe is the most promising solution. The preliminary analysis on the phase-based approach suggests several technical challenges that we need to address in our future work.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 presents the basics of LoRa. Section 4 discusses and analyzes the challenges faced by a few possible approaches. Section 5 concludes this paper.

2 Related Work

Using LPWAN radios such as LoRa to implement localization has received increasing research interest. Existing studies on LoRa-based localization can be broadly divided into two classes of time-difference-of-arrivals (TDOA)-based and RSSI-based approaches.

2.1 TDOA-Based Approaches

TDOA determines the position of a certain device by the differences among the time instants that the same signal arrives at multiple gateways. Fargas et al. [11] used timestamps provided by the LoRa gateways to implement a TDOA system. Carvalho et al. [9] evaluated the feasibility of implementing mobile sensing and tracking applications using LoRa radios. Podevijn et al. [16] also implemented a TDOA system based on the timestamps extracted from the LoRa gateways to evaluate the tracking performance of a LoRa network. The approaches developed in the above three studies have poor localization performance. This is mainly because that current LoRa hardware implementation and the software stack have a timestamp resolution of one microsecond () only. As radio signals travel about 300 meters in free space over a time duration of , the timing resolution of current off-the-shelf LoRa products is not sufficient for implementing accurate localization [10]. Although there are several signal processing approaches [8, 17]

such as Kalman filter to improve the robustness against random noises, the timestamp resolution is still the determining factor for the localization performance of TDOA systems.

Rajalakshmi et al. [15] designed a multi-band backscatter device based on CSS modulation for three-dimensional localization. The backscatter device is in sub-centimeter form factor and only consumes power. The projected lifetime of the device is up to ten years on button cell batteries. The above study achieves meter-level localization accuracy with highly customized LoRa devices. In contrast, we aim to develop localization approaches for off-the-shelf LoRa devices.

2.2 RSSI-Based Approaches

Another research thread has focused on RSSI-based localization. Different from TDOA, in an RSSI-based ranging algorithm, a node uses RSSI measurements to estimate its distance from the signal source by using a known signal propagation model that characterizes the relationship between RSSI and distance. Lam et al. [13] described an RSSI-based LoRa localization algorithm in noisy outdoor environments. Accounting for the possible errors in the RSSI measurements, their approach selects the best distance estimate among all estimates. Furthermore, they tried to exclude noisy nodes and select the nodes experiencing lower levels of noises for localization [14]

. Machine learning approaches have been studied recently. Aernouts et al. 

[7] proposed to apply k-Nearest-Neighbor (kNN) algorithm on the collected RSSI measurements to estimate the object location. Zhe et al. [12] modeled the RSSI in both indoor and outdoor environments using Gaussian process and then applied maximum likelihood estimation (MLE) to develop a localization approach.

2.3 Summary

The existing TDOA-based and RSSI-based approaches have several limitations. Most TDOA approaches based on commodity LoRa devices can only achieve sub-kilometer accuracy. Such accuracy is insufficient for a range of applications, such as unmanned aerial vehicle (UAV) tracking and navigation. Several TDOA approaches require pre-trained models and/or highly customized devices, leading to overhead and high cost in deploying these approaches. The RSSI-based approaches are susceptible to strong signal attenuation and cannot achieve three-dimensional localization well due to the multipath effect.

3 LoRa Primer

LoRa is a physical layer technique that uses a Chirp Spread Spectrum (CSS) modulation and operates in sub-GHz ISM bands (e.g., in Europe). In LoRa’s CSS, a chirp is a finite-time signal with time-varying instantaneous frequency that swaps the whole bandwidth of the communication channel in a linear manner. Given a certain central frequency, denoted by , an up chirp’s instantaneous frequency increases from to , whereas a down chirp’s instantaneous frequency decreases from to . The time duration of a chirp is determined by the spreading factor and bandwidth, which are denoted by and , respectively. Specifically, the chirp time is given by


For the EU868 frequency band, there are six spreading factors, ranging from to . For example, with , , and initial phase , an up chirp’s spectrogram is shown in Fig. 2. Fig. 3 presents the in-phase (I) and quadrature (Q) data of this chirp in the time domain.

Figure 2: Spectrogram of an up chirp.
Figure 3: and data of an up chirp.

The LoRaWAN specification defines three classes of end devices, Class-A, -B, and -C. Class-A devices are the most energy efficient because each communication session must be initialized by an end device rather than the gateway. Therefore, the end devices can follow their own communication schedules with low duty cycles. After an uplink initiated by an end device, there are two optional downlink windows for the gateway to transmit a frame to the end device. A Class-B device will synchronize its internal clock using beacons emitted by the gateway. During the synchronization process, the gateway can schedule the data transmissions and synchronization interval with the end devices. Thus, each Class-B device will use the allocated time slots to transmit uplink frames. Class-C devices will listen to the gateway continuously, which is power-consuming. All off-the-shelf LoRa end devices support the Class-A specification. Class-A operation, though energy efficient, may have a chance of frame collision if two end devices using the same spreading factor transmit at the same time. However, since the duty cycle is generally low, the frame collisions are of low probability. Class-B and -C are free of frame collisions.

We aim to develop an approach that localizes an end device based on its uplink transmissions. The approach will be applicable to all three classes, assuming there are no frame collisions.

4 Approaches to LoRa-Based Localization and Challenges

Various techniques have been developed for localization using radio signals. In this section, we discuss the challenges of implementing several main techniques for LoRa-based localization.

4.1 RSSI-Based Approach

RSSI-based approach builds a path-loss model according to the measured RSSIs at different distances from the signal source. With the model, the distance between the transmitter and the receiver can be estimated. For a static environment, the RSSI-based localization approach can achieve accuracy of hundreds of meters and down to tens of meters. However, radio channels are often subjected to various stochastic and unpredictable factors, especially in the indoor environments. It is generally hard to build an effective path-loss model when the signal travels through walls and floors constructed with diverse materials. Moreover, after penetrating the walls and floors, the LoRa signal strength may go below the noise floor, leading to large errors of the RSSI-based approach.

Figure 4: Fluctuations of RSSI within 10 minutes.

According to the datasheet of Semtech SX1276, which is a major commodity LoRa chip on the current market, the RSSI reading is an average value of multiple instantaneous RSSIs. This average RSSI is saved in a register that can be read at any time. We conduct an experiment to show the variation of this average RSSI over time. We set up two nodes as the transmitter and the receiver respectively in an office. Each node consists of an Arduino UNO and an SX1276-based inAir9b LoRa chip. The distance between the transmitter and the receiver is about . Both of them use and . The transmitter randomly chooses a transmitting interval within 2 to 3 seconds. Fig. 4 shows the average RSSI readings of the receiver over 10 minutes. We can see that the RSSI fluctuates even when both nodes stay still. Such fluctuations challenge the design of the RSSI-based localization approaches.

4.2 TDOA-Based Approach

A TDOA-based localization system has multiple base stations with known locations. We also assume that the clocks of the base stations are tightly synchronized. A transmitter transmits a signal that will be captured by all base stations. For each two base stations, the difference between their signal arrival times can be measured. Now, our discussion focuses on two base stations. With the product of the signal propagation speed and the time difference as the real axis, we can get a hyperbola. The location of the transmitter is at the intersection point of the hyperbolas. Thus, the accuracy of timestamping the signal’s arrival time is critical to TDOA-based localization approach.

There are mainly three existing approaches to extract the timestamp of an incoming LoRa signal, including reading the timestamp provided by the LoRaWAN gateway, estimating the arrival time in the spectrogram domain and estimating the arrival time in the time domain. All three approaches achieve microsecond level timestamping accuracy only, which is insufficient for meter-level ranging and localization. To achieve meter-level ranging and localization, nanosecond timestamping accuracy will be needed. We now discuss the details of the three possible timestamping methods for LoRa.

  • Timestamp given by LoRaWAN gateway: When a gateway receives a LoRa frame, it will forward it to the LoRaWAN software server with a timestamp. The timestamp is the value of the gateway’s internal time counter at the time instant when the LoRa frame was received. However, most commodity LoRaWAN gateways provide time counters with microsecond granularity only [1]. Thus, the frame arrival timestamping will have microsecond-level accuracy only.

  • Spectrogram domain timestamping: As the up chirp exhibits a clear time-frequency pattern as shown in Fig. 2, a possible approach to locating the signal arrival time is to analyze the spectrogram of the received and data. However, the spectrogram inevitably has reduced time resolution. For instance, the time resolution of the spectrogram in Fig. 2 is , which is beyond the ns-accurate timestamping. Note that the data chirps are decoded by analyzing their spectrograms, because the up and down chirps can be easily differentiated. Differently, preamble onset time estimation imposes more challenges than data decoding.

    Figure 5: and data of an up chirp under different settings. Note that is the difference between the initial phases of the carrier signals generated by the transmitter and the receiver.
  • Time domain timestamping: Matched filter has been widely adopted for signal arrival time detection. The matched filter requires that the phase of an incoming signal is known to achieve the best detection accuracy. However, as LoRa adopts CSS modulation, the frequency will change with time, it is difficult for a receiver to lock the phase of an incoming signal. Fig. 5 shows the ideal and traces of two up chirps when the difference between the initial phases of the carrier signals at the transmitter and the receiver (denoted by ) are and , respectively. We can see that the waveform shapes highly depend on the . Since the is generally unknown and hard to estimate for CSS signals, it is difficult to define a template shape for the matched filter to work.

4.3 Phase-Based Approach

In this section, we will provide a detailed analysis on a possible phase-based approach to LoRa localization.


4.3.1 Modeling of LoRa Chirp Signal Propagation

As mentioned earlier, a chirp is a finite-time band-pass signal with time-varying frequency. Let and denote the instantaneous amplitude and frequency of the chirp signal at the time instant . We formulate the chirp signal emitted by the transmitter from time as , where is the LoRa transmitter’s initial phase at . The is usually unknown. As the signal emission starts from time , we can make and when . Now we derive the expression of the chirp signal at a position that is meters from the transmitter. Our analysis ignores the multi-path effect and barriers. The signal at the position, denoted by , can be expressed by

where denotes the attenuation coefficient, denotes the signal propagation velocity. Note that before the signal front arrives at the position (i.e., ), the signal .

4.3.2 Modeling of LoRa Chirp Signal Reception and a Differential Phase Sampling Technique

This section models the reception of the LoRa chirp by a gateway implemented by a software-defined radio (SDR). The SDR generates two unit-amplitude orthogonal carriers and , where is a specified frequency and is the initial phase of the two self-generated carriers at . The is usually unknown. Assume the gateway is meters from the LoRa transmitter. The SDR will mix the received signal with the self-generated carriers, yielding and . The and can be further derived as Eq. (2) and Eq. (3), respectively. The SDR will apply two internal low-pass filters to remove the high-frequency components in Eq. (2) and Eq. (3). Thus, after the low-pass filtering, the and components yielded by the SDR, denoted by and , are given by , , where and . From the above analysis, the instantaneous phase can be computed by where . The rectifies the multi-valued inverse tangent function to an unlimited value domain and ensures that is a continuous function of . Note that under a differential phase sampling (DPS) scheme that will be discussed shortly, the value of can be easily determined.

We now discuss the DPS scheme. Let denote the sampling rate of the SDR’s analog-to-digital converter (ADC). Denote by a sequence of instantaneous phases computed by the sampled and values. We define the DPS sequence starting from time with its th element given by


The bounds of are analyzed as follows. The LoRa chirp’s instantaneous frequency . Thus, from Eq. (4), we have .

Proposition 1

is a sufficient condition for computing the sequence unambiguously based on the and traces.

We consider computing a element based on two consecutive values and , i.e., . With , the range of is . Denote and , where is known and is to be determined. Since , if or , will be out of its range . Thus, there is only three possible cases: i) , ii) , and iii) . It can be easily verified that there is a case satisfying and other two cases must not satisfy . The satisfying case determines the value of . Therefore, the elements of can be determined sequentially without ambiguity.

For the EU868 frequency band, . The sampling rate of SDR’s ADC (e.g., ) is much higher than . Thus, the condition can be satisfied.

4.3.3 Distance Difference Estimation and End Device Localization

The phase-based approach measures the differences among the phases of the gateways’ received signals to estimate the differences among the distances between the end device and the gateways. We assume that the clocks of the gateways are tightly synchronized. Note that the clock synchronization between the end device and the gateway is not required. Denote by and the distances from the end device to the gateways and , respectively. Our following analysis focuses on the estimation of . This approach can be applied to estimate other distance differences, which are then together used by multilateration to localize the end device. The DPS sequence on gateway is , where . Denote by the antiderivative of . The DPS sequence on gateway can be expressed as . As the variable in this time sequence is , we can denote the sequence as , where . The DPS sequence on gateway can be written as . Thus, . It means that is a time-shifted version of , where the time shift is . Therefore, we can compute the cross-correlation of the two time sequences to estimate time shift. Assuming to be the peak position of cross-correlation, we have . The approximation is because has to be an integer. Thus, the distance difference can be estimated as .

4.3.4 Challenges Faced by Phase-Based Approach

First, the approach needs a high sampling rate to improve the localization accuracy. The resolution of the distance difference estimation is . It means that if we use ADC, the resolution is about . If we use ADC, the resolution is about . Future research shall investigate whether upsampling can improve the resolution.

Second, the and traces generally contain noises. After long-distance propagation and barrier penetration, the high noise levels may significantly affect computing using . DPS scheme robust to noises is to be developed.

Third, our analysis assumes that the end device and the gateways can generate accurate carrier frequency. The frequency bias of the SDR and the end device in generating the carrier signals may affect the localization performance. To measure the impact of temperature change on frequency bias, we conduct a test over 24 hours. We put a transmitter in the corridor of a multistory building that air condition cannot reach and a receiver in a homothermal indoor environment. Fig. 6 shows that the estimated frequency bias changes with temperature. The red circle dot line represents the temperature measured by a temperature sensor in the outdoor environment. The blue square dot line represents the estimation error. Future research shall investigate how the frequency biases affect the distance difference estimation and develop mitigation approaches.

Figure 6: Frequency bias along with temperature over 24 hours in outdoor environment.

Finally, the clock synchronization errors among the gateways may effect the accuracy of the phase-based approach. If there exists an unknown synchronization error between the gateways and , the estimated distance difference . Thus, the resolution is . If we use ADC and aim to maintain the resolution at about , we need to synchronize the clocks of the gateways within error. Nanosecond-level clock synchronization is often challenging on commodity platforms.

5 Conclusion and Future Work

This paper discusses the technical challenges faced by several commonly used techniques in implementing LoRa-based localization. The RSSI-based and TDOA-based approaches do not seem promising due to basic limitations of the LoRa signal (e.g., significant signal attenuation after barrier penetration and smooth time-domain signal waveform) and current commodity LoRa hardware (e.g., low-resolution internal time counter). Our analysis shows that the phase-based approach is more promising but also pinpoint several relevant challenges. Our future work is to implement and evaluate the phase-based approach.

6 Acknowledgments

This research is supported by an NTU Start-up Grant.


  • [1] Basic communication protocol between lora gateway and server. http://bit.ly/2H304ht.
  • [2] Lora alliance. https://lora-alliance.org/.
  • [3] Narrowband internet of things (nb-iot). http://bit.ly/2RwH9Q8.
  • [4] Sigfox. https://www.sigfox.com/.
  • [5] Weightless. http://www.weightless.org/.
  • [6] Wireless sx1276 lora module. http://bit.ly/2s3NJiz.
  • [7] M. Aernouts, R. Berkvens, K. Van Vlaenderen, and M. Weyn. Sigfox and lorawan datasets for fingerprint localization in large urban and rural areas. Data, 3(2):13, 2018.
  • [8] W. Bakkali, M. Kieffer, M. Lalam, and T. Lestable. Kalman filter-based localization for internet of things lorawan™ end points. In Personal, Indoor, and Mobile Radio Communications (PIMRC), 2017 IEEE 28th Annual International Symposium on, pages 1–6. IEEE, 2017.
  • [9] D. F. Carvalho, A. Depari, P. Ferrari, A. Flammini, S. Rinaldi, and E. Sisinni. On the feasibility of mobile sensing and tracking applications based on lpwan. In Sensors Applications Symposium (SAS), 2018 IEEE, pages 1–6. IEEE, 2018.
  • [10] A. Dongare, C. Hesling, K. Bhatia, A. Balanuta, R. L. Pereira, B. Iannucci, and A. Rowe. Openchirp: A low-power wide-area networking architecture. In Pervasive Computing and Communications Workshops (PerCom Workshops), 2017 IEEE International Conference on, pages 569–574. IEEE, 2017.
  • [11] B. C. Fargas and M. N. Petersen. Gps-free geolocation using lora in low-power wans. In Global Internet of Things Summit (GIoTS), 2017, pages 1–6. IEEE, 2017.
  • [12] Z. He, Y. Li, L. Pei, and K. O’Keefe. Enhanced gaussian process based localization using a low power wide area network. IEEE Communications Letters, 2018.
  • [13] K.-H. Lam, C.-C. Cheung, and W.-C. Lee. Lora-based localization systems for noisy outdoor environment. In Wireless and Mobile Computing, Networking and Communications (WiMob),, pages 278–284. IEEE, 2017.
  • [14] K.-H. Lam, C.-C. Cheung, and W.-C. Lee. New rssi-based lora localization algorithms for very noisy outdoor environment. In 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC), pages 794–799. IEEE, 2018.
  • [15] R. Nandakumar, V. Iyer, and S. Gollakota. 3d localization for sub-centimeter sized devices. In Proceedings of the 16th ACM Conference on Embedded Networked Sensor Systems, pages 108–119. ACM, 2018.
  • [16] N. Podevijn, D. Plets, J. Trogh, L. Martens, P. Suanet, K. Hendrikse, and W. Joseph. Tdoa-based outdoor positioning with tracking algorithm in a public lora network. Wireless Communications and Mobile Computing, 2018, 2018.
  • [17] F. Wolf, C. Villien, S. de Rivaz, F. Dehmas, and J.-P. Cances. Improved multi-channel ranging precision bound for narrowband lpwan in multipath scenarios. In Wireless Communications and Networking Conference (WCNC), 2018 IEEE, pages 1–6. IEEE, 2018.