1. Introduction
The Internet of Things (IoT) allows connecting objects to the internet with the use of wireless sensors. Typical use cases are monitoring temperature, humidity, and soil moisture for smart farming applications [
1,
2], condition monitoring of air cargo [
3], or monitoring vital signs of cows in rural areas [
4]. Other examples are a bus positioning system [
5,
6] and asset tracking for logistics [
7]. In nearly all cases, the sensor device transmits this information wirelessly to a gateway or access point which has a back-haul to the internet. In this manner, the data can be further processed and visualized. This paper considers the use case of asset tracking.
IoT devices are often powered by batteries, which will sooner or later need replacement, for example, nodes installed in equipment, pallets, or bikes. For economic reasons, a long-range wireless link is also required in order to have a large coverage area with the least amount of access points or gateways. The advent of Low-Power Wide Area Networks (LPWAN) and their deployment in many countries [
8] brings benefits at the level of scalability (thousands of sensors per gateway), coverage range (more than 15 km), and power consumption (battery lifetimes up to more than 5 years). The only constraint is the fact that uplink should (in general) be infrequent and limited in the number of payload (information) bytes. Some examples of LPWAN standards are NB-IoT [
9], SigFox [
10], and LoRaWAN [
11].
Many outdoor asset tracking implementations are using a Global Navigation Satellite System (GNSS) receiver to send GPS coordinates over LPWAN. In [
5,
6], these implementations are used to track city buses. In [
3,
12], similar GPS-based approaches are used to track air cargo and bikes. Another approach to perform localization is using the network itself to locate sensor nodes without GPS embedded in the node. The basic principle is that when a node send uplink data to the network, the incoming packets’ meta-data such as Time of Arrival (ToA) and Received Signal Strength (RSS) is recorded on the different gateways. The meta-data and gateway locations are then forwarded to a so-called geo-location solver to estimate the location with a suitable algorithm. The output of the solver is then a (Latitude, Longitude) coordinate [
13]. The provided location estimates are not as accurate as for GPS (order of a few meters), but an important advantage is that network-based localization (geo-locating) consumes less power on the mobile node compared to integrating a GPS receiver in the node. Another clear advantage of using LPWAN for localization is that only one technology is used for communication and localization, enabling the manufacturing of low cost and compact sensor nodes. Some use cases of geo-locating using LPWAN include tracking of valuable assets during transportation such as railway cars, truck trailers, and containers [
7]. The main downside of geo-locating is the relatively low localization accuracy which might not be beneficial for some use cases. Therefore, this paper will focus on improving this performance metric.
In [
14], the authors introduced the principle of using a compass on top of LoRaWAN raw location data and tested it for a single route. The goal of this paper is to realize and thoroughly analyze the LoRaWAN Geo-Tracking by the use of map matching and compass sensor fusion. A significant number of test routes is examined for different modes of transportation in different networks, not only in Belgium but also in the Netherlands. Furthermore, the difference between real-time localization and offline a posteriori localization is compared. The main idea is that we take into account the road infrastructure, maximum speed of the node, and (communicated) compass heading. Assuming the tracked item stays on the road network, heading info (e.g., item heading west) can be exploited to exclude other candidate trajectories (e.g., trajectory heading north). The basic setup for this is shown in
Figure 1. The novelties of this paper are as follows.
- (i)
A compass sensor fusion implementation for accurate LoRaWAN localization.
- (ii)
Improved map matching technique to outperform current available LoRa geo-location possibilities, which works for all LoRa sensor nodes.
- (iii)
All algorithms are tested with experimental data obtained in different environments and using different modes of transportation (walking, cycling, and driving). The reproducibility of the results is also investigated.
The remainder of the paper is structured as follows.
Section 2 presents an overview of related work on LoRa geo-localization methods and improvements proposed in literature. In
Section 3, we describe the trajectories and the data collection method, the algorithm implementations, and the different investigated scenarios.
Section 4 presents and discusses the results that are obtained using our techniques and compares the energy consumption of our geo-localization solution with GPS-based solutions. Finally,
Section 5 summarizes the paper’s findings and provides recommendations for future work.
2. Related Work
The most accessible and available way to localize sensor nodes in a LoRaWAN network is by using the RSS metadata that is received by the gateways after an uplink. Such approaches have been studied in our previous works in [
15,
16]. In [
15], the RSS received from up to three gateways was converted to a location using different algorithms, yielding a median accuracy between 1250 m and 2500 m. In case of frequent uplinks and when the mode of transportation is known, map matching further reduced the median error to 700 m. In [
16], a mean accuracy around 400 m was obtained with an RSS fingerprinting method based on the collection of a large training database. Similar accuracies (around 350 m) were reported in [
17] using other fingerprinting methods.
Current LoRaWAN gateways can accurately determine the Time of Arrival (ToA) of an incoming packet sent by a sensor node. Based on the observed time stamps and the known gateway locations, a Time-Difference-of-Arrival (TDoA) algorithm can estimate the location more accurately than RSS-based methods. Previous research [
13,
15,
18] reported a median accuracy around 200 m when using this method in combination with a maximum likelihood (ML) algorithm. Similar accuracies of around 100 m were reported in [
19] for the case of a privately deployed network with static nodes. Improving localization accuracy of static nodes is also investigated in [
20], where multiple messages are merged to provide a more accurate estimate. The simulations in [
20] showed that it was possible to achieve an average error of less than 100 m using this method. In [
21], an improved TDoA algorithm is proposed and compared with a Least Squares (LS) approach. Ninety-five percent percentile values improved from 2200 m to 840 m in a simulated environment. Another approach, correcting the received timestamps of a mobile node by the use of machine learning in combination with stationary reference nodes, reported an accuracy around 61 m [
22]. However, it is unclear how many reference nodes are needed, making it potentially unsuitable for large deployments from an economic point-of-view.
This paper will report results from experiments in real public LoRaWAN networks, without using GPS or any other additional infrastructure. Furthermore, it will consider non-stationary nodes and will compare the proposed method with available state-of-the-art TDoA algorithms.
3. Materials and Methods
3.1. Data Collection and Trajectories
The device for which we estimate its location and trajectory is a LoRaWAN sensor node (MCS iTalks 1608). This device is provisioned on either the Proximus (Belgium) or KPN (Netherlands) LoRa network. The device is configured to have the highest possible uplink frequency possible: every 5 s a 5-byte packet is transmitted on spreading factor (SF) 7. The airtime for this packet is 50 ms: this transmission configuration complies with the ETSI regulations of a 1 percent duty cycle [
23]. The transmitted packets are received by the numerous gateways deployed in the outdoor area around the node, after which they are forwarded to the network server. The following data are available:
A payload (5 bytes) from the device, containing the 5 compass values (also called heading or bearing) recorded during the last 5 s. Due to the unavailability of such a node, the compass values are emulated on a (Samsung Galaxy A20E) smartphone application (OSMTracker for Android), which was carried with the device.
RSS value received at each gateway with its ID.
Signal-to-Noise Ratio (SNR) of the received packet at each gateway with its ID.
Timestamp of the received packet (nanosecond resolution) at each gateway denoted with its ID.
Furthermore, the network topology of all gateways is known for both Proximus and KPN networks (latitude/longitude coordinates for each gateway ID). The recorded data allow processing the data and converting them into the most likely locations and/or trajectory using a suitable algorithm. In order to estimate the localization accuracy, the ground truth (and time) was logged with a GPS application on the smartphone (OSMTracker for Android).
The LoRa device and the smartphone were carried in the front pocket of a jacket along 7 trajectories and using different transportation modes. The ground truth trajectories are shown in
Figure 2 as a black trace. Each transportation mode (walking, cycling, and driving) was tested twice in a different area. For the second walking trajectory, we traveled the exact same trajectory (noted by “Walking 2A” and “Walking 2B”). Repeating the measurements in the same and/or different areas allows us to check the reproducibility of our results. The characteristics of the trajectories such as duration, velocity and distance are shown in
Table 1. Nearly all measurements were performed in Ghent (Belgium) and made use of the Proximus network. The measurements for driving trajectory 1 is the only exception which was done in Eindhoven (Netherlands) and made use of the KPN network.
3.2. Algorithm
The algorithms described hereafter were implemented in Python. Algorithm 1 shows the pseudocode of the map matching method with compass sensor fusion. The variables and different steps are discussed in the text below. The algorithm is initialized based on the first TDoA measurement (
) for which the TDoA solver can calculate a location (
), i.e., if three gateways receive a packet. Next, a predefined number of other locations (
) are selected around this location and their probability is initialized to one, e.g., the 1000 closest grid points to the current position. This ensures that the algorithm can recover from initially noisy data, e.g., 1000 grid points on a grid with a size of 10 m results in covered surfaces of around 50 hectares (the exact area depends on the density of the road network). This initialization phase forms the starting point of all possible paths that are kept in the memory of the location tracking algorithm (
).
Algorithm 1: Map matching with compass data. |
|
Then, for the subsequent TDoA measurements (), all reachable grid positions () starting from the path’s current endpoint (E) are determined for all paths in memory, by using the surrounding road network; the elapsed time since last location update (); the known mode of transportation (); and OpenStreetMap metadata, i.e., maximum speed, road type, and one-way information. These reachable grid positions are the candidate positions for the next location update. Transitions between grid points are constrained by the road infrastructure. Each candidate position () retains a link to its parent (i.e., the previous endpoint E), a list with visited road segments , and a probability that represents this new branch along the road network. This new path (branch) and updated probability are added to the temporary list () as a tuple . The updated probability is the product of the previous probability P with a TDoA and compass contribution ( and ).
is based on the probability of the TDoA measurements given , the gateway locations, and the standard deviation of LoRa TDoA measurements, e.g., 383 m in our experimental validation. is based on the probability of the compass data between and t given the bearing of the visited road segments and is calculated with a standard deviation of 60.
The paths with the highest probability are retained and serve as input for the next iteration. After all TDoA measurements are processed, the entire trajectory of the path with highest probability in memory is reconstructed. The trajectory is only estimated after all measurements are processed but it is also possible to provide real time location output by retaining the endpoint of the most likely path from in each iteration.
3.3. Scenarios
Different scenarios are evaluated, all of which are applicable for different use cases. First, we distinguish between Real-Time (R) Tracking and Offline Tracing (O). In the case of Real-Time Tracking, the localization result is made available immediately after the packet was received. For the case of offline tracing, it is assumed one only requires the fully estimated trajectory at a later instance (this can provide a more accurate trajectory estimation thanks to more data being used). Second, we also differentiate between a device which does not contain a compass (A, for agnostic) and a device that does contain a compass sensor (C). To emulate a device without compass, we ignore the recorded compass data in our algorithms. We denote the agnostic or compass-enabled device by the letters “A” and “C”, respectively. It is therefore possible to combine these considerations into 4 scenarios:
RA: Real-Time Agnostic: Tracking is needed in real-time and no compass is available in the device
RC: Real-Time Compass-enabled: Tracking is needed in real-time and compass data are available.
OA: Offline Agnostic: Offline Tracing at a later instance is needed, the device has no compass data available.
OC: Offline Compass: Offline Tracing at a later instance is needed with a compass-enabled device.
For each of the 4 scenarios we consider at least 2 methods/algorithms to perform the respective localization and evaluate them for the different trajectories. For the cases that use compass data, there are 2 possibilities. In the first implementation, it is assumed that the compass produces absolute headings. For example, 0 degrees means the asset moves towards the North. This implementation can be used for cases for which it is known how the compass was installed relative to the tracked device, e.g., for tracking bicycles. The second implementation does not rely on this assumption and uses only relative headings, e.g, a transition from a 90 to a 180 degree bearing or from a 30 to a 120 degree bearing means a turn (of 90 degrees) to the right. For example, this method can be used for tracking parcels in transit, where we do not know the absolute orientation of the installed compass node relative to the direction of movement of the tracker.
Table 2 gives an overview of all the methods used in this paper.
An illustrative example showing the difference between the use of relative and absolute compass headings is shown is
Figure 3. The performance of all our implementation methods for the various scenarios is compared to a state-of-the-art commercial solver from Semtech [
24], which takes the raw timestamps and gateway locations as inputs.
5. Conclusions
In this paper, we proposed methods to track and trace assets building on a combination of LoRaWAN technology and a compass sensor. When comparing with a standard TDoA solver (Semtech), we obtained an improvement between 14% and 79% depending on the mobility scenario (walking, cycling, and driving) and whether the result should be immediately available (Real-Time-Tracking) or known at a later instance (Offline-Tracing). These improvements were possible thanks to the map matching algorithm proposed in this paper. Combined with a compass in the sensor node, the bearing information is transmitted periodically to give prevalence to specific paths for which the bearing matches the heading of the road segment. Using this sensor fusion approach, an additional improvement between 1% and 72% was obtained compared to TDoA map matching. The improvement depends on the mobility of the node/asset, usage of the compass node (fixed or rotatable) and whether the result should again be immediately available (Real-Time-Tracking) or known at a later instance (Offline-Tracing). Our best result was obtained for a walking scenario with a fixed (0 degrees means towards “North”) compass for which we obtained a median accuracy of 17 m (an improvement of 91% versus Semtech). All results were obtained from experiments and the reproducibility was verified. Although our results are not as accurate as GPS, we clearly demonstrated that our implemented geo-tracking is 15 times more energy efficient and far less expensive to implement. Further research directions are using the same techniques for LoRaWAN networks which only have RSS values available and future networks which have also Angle of Arrival (AOA) capabilities. Other future work is to expand our implementations to other LPWAN technologies such as SigFox and Narrow-band IoT.