TDoA-Based Outdoor Positioning with Tracking Algorithm in a Public LoRa Network

The performance of LoRa geolocation for outdoor tracking purposes has been investigated on a public LoRaWAN network. Time Difference of Arrival (TDoA) localization accuracy, update probability, and update frequency were evaluated for different trajectories (walking, cycling, and driving) and LoRa spreading factors. A median accuracy of 200m was obtained for the raw TDoA output data. In 90% of the cases, the error was less than 480m. Taking into account the road map and movement speed significantly improves accuracy to a median of 75m and a 90th percentile error of less than 180m.


Introduction
Long Range Wide Area Networks (LoRaWAN) are well suited to support Internet of Things (IoT) applications.They enable constrained devices (nodes) to connect to the cloud over a long range and with a low power consumption.Public LoRaWAN networks are being deployed with node geolocation functionality using the same Time Difference of Arrival (TDoA) technique as GPS [1].Although GPS is providing accurate real-time location updates, it has a disadvantage of consuming a fair amount of power at the mobile device, since TDoA measurements must be processed locally.As a consequence, a regular battery replacement or charging is needed.With LoRa, the TDoA processing happens at network level enabling devices to operate for years without replacing the battery.Where a 250 mAh battery is depleted after 1000 GPS calculations, a minimum of 20000 LoRa transmissions are possible using the same battery [2].Other advantages are the fact that a single technology is used for both communication and localization, making it a low-cost solution.An example application for this alternative is tracking of goods between industrial warehouses.Figure 1 shows the basic requirements for localizing a node using network-sided TDoA.A mobile node transmits data to the network.Each gateway within reach records the time stamp of the received packet.Accurate time stamping is possible since each gateway has a GPS receiver for time synchronization.The timestamps of each gateway are then forwarded to the network server which in turn sends a request to the geolocation solver.Based on the timestamps and gateway locations, the position of the node can be estimated using TDoA algorithms [3].
The novelties of this paper are threefold.First, this paper provides the first experimental quantification of the TDoA geolocation performance in a publicly deployed LoRa network for different scenarios (walking, cycling, and driving).Second, this paper investigates and determines the best LoRa spreading factor to use with respect to updating frequency and positioning accuracy.Third, this paper assesses the possible improvements when using a tracking algorithm which takes into account the road map and movement speed.The paper is organized as follows.Section 2 describes related work in this new research area.In Section 3, the experimental setup and tracking algorithm are presented.Results of TDoA performance, selection of best spreading factor to use, and improvements thanks to a tracking algorithm are discussed in Section 4. We summarize our observations and highlight future work in Section 5.

Related Work
To track wireless sensor nodes, many different approaches are available.
In [4] an overview of active localization techniques for wireless sensor networks is given.For outdoor applications, the most accurate solution is to use a GPS module and communicate the position info over a cellular [5,6] or LPWAN network [7].The downside of this approach is an added cost (due to combination of two technologies) and an increased energy consumption.
A GPS-free approach for outdoor localization is the dead reckoning method.Here the traveled distance and heading are estimated by the use of an accelerometer and compass [8].The downside of this method is the fact that the error is cumulative in time.Therefore a regular ground truth fix is still needed.
Other GPS-free approaches of localization are the use of signals of opportunity.In the work of [9], an outdoor localization approach has been demonstrated based solely on the known locations of crowd sensed WiFi hotspots.This approach works for mobile devices already embedding the necessary hardware.However, the required hardware for nodes not communicating over the WiFi protocol is still an added cost and therefore a disadvantage.
A low-cost and more energy-efficient alternative is localization based on Received Signal Strength (RSS) values.Here the network is able to calculate the position of a node using RSS values which are received by the publicly deployed gateways when the node performs a transmission.This trilateration approach is currently implemented by Sigfox [10] in combination with machine learning techniques [11][12][13].The accuracy in 80% of the cases is between 1 and 10 km, which is relatively low.Accurate localization based on RSS values remains challenging due to multipath and shadowing effects.One mitigation technique is collecting the RSS values for some known locations in the environment into a database (offline phase) and comparing the received RSS values with this database in the online phase.The estimated location is the one where the RSS values match the offline RSS values of this database.This technique is called scene analysis or RSS fingerprinting and has been studied for GSM outdoor applications in [14].RSS fingerprinting should be done at a fixed height of transmitter/receiver above ground, due to the effect of the variability of the transmitter and receiver height on the RSS values [15].Although fingerprinting can be more accurate than trilateration techniques, the offline fingerprint maps need to be regularly recalibrated.One mitigation technique is the use of reference nodes with known locations which regularly transmit a signal to the anchors.The received RSS values are then used to build the fingerprinting map [16].
Another approach is using the angle of arrival (AoA).Here the location of the node is estimated by 2 base stations equipped with antenna arrays.This approach works best in line-of-sight conditions [17] with accuracies of up to 5 ∘ .The work presented in [18] showed however that angle of arrival techniques can also be used in non-line-of-sight conditions when combined with fingerprinting techniques.The disadvantage of AoA methods relies in the fact that the error becomes larger for increased distances between the anchor and the mobile node.
TDoA is another technique where nodes are located using 3 or more base stations with accurate (GPS) time references.In [19], a private LoRaWAN network with 4 gateways (each 2-3 km apart) was deployed with TDoA capabilities and the geolocalisation was performed for stationary nodes.The reported mean accuracy was around 100 m.The accuracy was achieved for stationary nodes; samples were averaged; and all 4 gateways were within reach.The difference with our work lies in the fact that we investigate the performance on a publicly deployed network with mobile nodes.Different mobility scenarios in combination with different spreading factors are considered.Also, we present an additional tracking improvement algorithm to enhance tracking accuracy.To our knowledge, such a complete study has never been performed, mainly due to the fact LoRaWAN public networks with TDoA capabilities have only become recently publicly available [1].

Experimental Setup and Tracking Algorithm
3.1.Configuration of the LoRa Nodes.Six LoRa nodes with respective spreading factors between 7 and 12 were configured and provisioned in the public LoRa network in Netherlands.For each node, ADR (Adaptive Data Rate) was disabled to force a fixed spreading factor.Uplinked data size was set to 2 bytes, allowing transmission of, for example, sensor data and battery level.Our implemented application server recorded the JSON messages from the network server which holds the raw TDoA location estimates (in latitude and longitude degrees) for each device.
Figure 2 shows the impact of spreading factor on range, bitrate, energy, and time on air.Lower spreading factors with PL  being the maximal allowed path loss for successful reception and   the corresponding maximal distance.PL  is obtained using the following: with  being the base station's receiver sensitivity, EIRP the LoRa node's equivalent isotropic radiated power, and   the base station's antenna gain.
From Table 1, it is clear that the transmission range is between 9 and 34 km and depends on the spreading factor.
Since the time on air depends on the spreading factor used [21], the period between uplinks was set accordingly in order to respect the duty cycle of 1% in the 868 MHz industrial, scientific, and medical (ISM) band.Table 2 shows which transmission interval or period between transmissions was used for each node.
As said, not every transmission will lead to a location update.Only when a data transmission is received by 3 or more gateways, the network is able to estimate the location of the node using the TDoA technique [1].Although a low spreading factor has the highest theoretical update rate (denoted by (1 hour) SF in Table 2), the probability to reach 3 gateways (and obtain an actual location update) is lower than when using a higher spreading factor.Therefore, an optimal spreading factor exists which gives the most location updates per period of time.
We finally note that the estimated locations are calculated by the LoRa network server and are provided in latitude and longitude degrees.

Evaluated Trajectories with Different Mobility Profile.
Measurements were performed in and around Eindhoven, an urban city in Netherlands.Six (SF7-SF12) nodes were carried along 3 different routes: "Walking," "Cycling," and "Driving": see Figures 3(a), 3(b), and 3(c).The ground truth (with time stamp) of each trajectory was recorded using a GPS logger.The characteristics of the three trajectories such as average speed, maximum speed, traveled distance, and duration are summarized in Table 3.

Determining Location Update Rate.
We evaluated the update rate of the geolocation updates as follows.We record  the number of geoupdates in the measured time span.Dividing the time duration by the number of geolocation updates reveals the average location update period.We then select the best spreading factor SF opt as the one which gives the smallest update period: where  SF is the number of geoupdates collected during the measured time TD on the considered spreading factor . (TD) SF is the maximum theoretical number of updates obtained during the measurement time TD and is obtained by dividing TD with the SF's transmission period (see Table 2). GEO SF is the probability of obtaining a location update when transmitting on spreading factor SF.

Determining Location Accuracy.
The received TDoA location estimates were compared with the ground truth location for each trajectory and SF.This was done with the help of the obtained time stamps from both the received estimates and the GPS logger.The GPS logger was configured with an update rate of 1 Hz.The positioning errors were calculated for each combination of node (each SF) and each trajectory.From these errors, we were able to compute the cumulative distribution function (CDF), standard deviation, median error, and 90th percentile error.

Tracking Algorithm Using Road Mapping and Mobility
Profile.The outputted location updates do not fix the estimated position onto a street location and they do not take into account the limited mobility of the node.For example, when moving at a maximal speed of 2 m/s we know that after 30 seconds the next update should be within 60 m of the previous location update.Furthermore, by taking into account all previous location updates, the road infrastructure, and the allowed speed limits, we can improve the prediction by calculating the most likely path for a certain user in a certain time span.This additional map-based filter ensures realistic and actually possible trajectories.First, in an offline phase, the road infrastructure is converted to a grid of possible positions by making use of OpenStreetMap data.All major and minor roads are divided into pieces of 20 m and all grid points along the road segments keep a link to their neighboring grid points.In the online phase or filtering algorithm itself, the first TDoA location estimate serves as starting point, initialized with a cost of zero.Next, when a new TDoA location estimate is available, all reachable grid points seen from this starting point are calculated by recursively making use of the neighboring grid points, speed limits, and time passed between this and the last TDoA update.These reachable grid points make up the end points of the new paths and retain a cost and link to the previous point (i.e., parent grid point).The cost of each path is updated as the cost of the previous point added with the distance between this point and the TDoA location estimate.In the next iteration, the end points of all paths in memory are updated again with this technique.To limit memory usage, the filtering algorithm only retains the 1000 most likely paths at each time instance.At the end of the time span, all parent grid points from the path with the current lowest cost are looked up in memory and form the final predicted trajectory for this user.For more info about this approach, we refer to [22].The outcome of this algorithm is a more precise trajectory estimation.All what is needed for the algorithm is map info and the speed limits along each road segment, provided by OpenStreetMap data.These speed limits can be tuned if the mobility profile is known a priori; we study two different cases: (a) Mobility profile not known a priori: the speed limits of each road segment are used as maximum allowed speed along the reconstructed trajectory.(b) Mobility profile known a priori: a maximal speed of 5 km/h and 25 km/h is assumed for the walking and cycling route, respectively.The car route is not taken into account for this case since the maximal speed of the car is limited to that of the road segment.

Update Rate of TDoA Location Estimates for Different
SFs and Different Ways of Transportation.Table 5 presents the number of location updates  SF for each trajectory and SF.For SF7 the uplink period is minimal (Table 2).Hence we expect this SF providing most updates/hour (highest ).
However, one must take into account the fact that for low SFs the effective communication range is relatively small.Therefore, the probability of reception at 3 gateways  GEO SF is smaller when compared to using a high SF.The highest number of location updates was found when using SF8 for all trajectories (84 on average, see Table 5).The number of location updates is comparable for the walking and cycling trajectories (341 versus 348 for all SFs).For the car route, however, we notice a much lower number of location updates (77 for all SFs).This is due to the fact that the metal frame of the vehicle attenuates the RF transmissions in the 868 MHz ISM band [23] and the increased mobility versus walking and cycling trajectories.

Probability of Successful Communication and TDoA Location Estimate for Different SFs and Different Ways of
Transportation.We define  COM SF as the probability of successful communication (reception of a packet at one or more gateways). COM SF is obtained by normalizing the number of observed received packets  SF to the number of known transmissions .The probabilities for each trajectory and spreading factor are shown in Table 4.With the exception of SF12, we observe that communication update probabilities increase with higher SF.This is due to the fact that higher spreading factors have higher RX sensitivity and thus increase the communication range and therefore probability of reaching at least one gateway.The highest probability of a communication update is obtained when using SF11 (93% on average).This observation is valid for all routes.As discussed before we notice a significant lower update probability for the driving trajectory due to the fact that the metal frame of the vehicle attenuates the RF transmissions in the 868 MHz ISM band [23] and the increased mobility versus walking and cycling trajectories.
Next, we define  GEO SF as the probability of a geolocation update (reception of a packet at 3 or more gateways). GEO SF is obtained by normalizing the number of observed geoupdates  SF to the number of known transmissions  (i.e., the maximum theoretical location update rate).The probabilities for each trajectory and spreading factor are shown in Table 5.Again, with the exception of SF12, we observe that location update probabilities increase with higher SF.The increased communication range makes it more likely for a packet to be received by 3 or more LoRa Gateways.The highest probability of a location update is again obtained when using SF11 (48%  on average) and is valid for all routes.Further investigation is needed to know why this trend does not occur on SF12.We further noticed again a significant reduction in the number of geoupdates for the driving trajectory.

Accuracy of Raw TDoA Location Estimates for Different
SFs and Different Ways of Transportation.The TDoA error distribution for the walking, cycling, and driving route is shown in Figures 4, 5, and 6, respectively.The median, 90th percentile, and standard deviation of the error can be found in Table 6.From this table, we can observe that the overall median error is around 200 m and in 90% of the cases this error is less than 500 m.Although there is no trend in estimation error depending on the SF and/or trajectory, the median error was minimal for all trajectories when using SF12 (164 m).
The overall TDoA CDF is shown in Figure 7 and is compared with centroid and proximity algorithms [24].The centroid algorithm maps the estimated location at the center of the three base stations that receive the strongest signal.The proximity algorithm maps the location at the base station that receives the strongest signal.From the figure it is clear that the raw TDoA estimation significantly outperforms centroid and proximity methods.The median errors for TDoA, centroid, and proximity are, respectively, 200 m, 2200 m, and 2500 m.

Accuracy of Location Estimates Using Tracking
Improvement Algorithm.The inputs for the algorithm are the raw TDoA location estimates, the map, and the maximum allowed speed.We apply the tracking improvement algorithm from Section 3.5 for SF8, since it provides the highest location update rate (see  SF in Table 5).The raw location estimates (green) along with the ground truth trajectory (black) for the walking route are shown in Figure 8(a).The errors are shown in red. Figure 8(b) shows the resulting location estimates (blue) after applying the algorithm with a priori known maximum speed ( max = 5 km/h).The same process was repeated without knowledge of a priori maximum speed ( max =  allowed , i.e., the maximal speed allowed along the route) and was also implemented for the cycling and driving route.Table 7 summarizes the localization error before and after applying the algorithm.In all cases where the algorithm was applied, a reduction of estimation error was noticed.When the mobility of the node is relatively slow (e.g., for the walking route) and when this information is known a priori, a remarkable improvement is possible: the median error was reduced from 194 m to 74 m (62% improvement) and the 90th percentile error was reduced from 579 m to 177 m (70% improvement).For the cycling route (with known mobility), an error reduction of 17% and 27% for the median and 90th percentile was recorded.For the car route, a median error as low as 82 m was observed (reduction of 29%) and a 90-percentile error of 285 m (reduction of 12%).

Conclusion and Future Work
In this paper, we investigated the node tracking performance in a public LoRaWAN network with TDoA capabilities.The median error of the raw TDoA location output was around 200 m and in 90% of the cases the error was less than 500 m over all SFs and trajectories.No trend was found on the performance of the localization error when varying the mobility or the spreading factor, but in general the best localization accuracies were obtained for SF12.The lower the spreading factor the more the transmissions and therefore the number of potential location updates is possible.On the other hand, the higher the spreading factor, the higher the communication range which results in a higher probability of a location update (SF11 had the highest probability).The combination of both phenomena revealed that SF8 had the most location updates in a period of time (between 21 and 121 per hour depending on the trajectory).A tracking improvement algorithm was presented which takes into account the road infrastructure and a maximal node velocity.The algorithm was applied to the raw TDoA location data for SF8.A median and 90th percentile error of, respectively, 74 m and 177 m were obtained for the walking route.This corresponds to a reduction of the median and 90th percentile error by 62% and 70%, respectively, compared to the raw TDoA location estimate.A reduction in tracking error was also noticed for the cycling and driving routes, with resulting median errors of 206 m and 82 m, respectively.
Future work includes investigating the occurrence of location update probabilities of different SF modes.Investigating the impact when using ADR (Adaptive Data Rate) for other routes and environments is part of future work.

Figure 2 :
Figure 2: Influence of spreading factor on range, bitrate, energy, and time on air.

Figure 3 :
Figure 3: Walking, cycling, and driving trajectories.The black pointers are the gateway locations.

Figure 4 :
Figure 4: CDF of localization error for walking route.

Figure 5 :
Figure 5: CDF of localization error for cycling route.

Table 1 :
Typical transmission range per spreading factor.

Table 2 :
Implemented transmission period for each SF.
[20] a shorter airtime.Therefore, a higher number of uplink transmissions per time unit are allowed.As such, they have a higher theoretical location update rate.However, they also have a lower coverage range, and thus a lower probability of reaching 3 LoRa base stations, which is required for calculating a location update via TDoA techniques (lower theoretical update probability per transmission).Typical LoRa transmission ranges are presented in Table1, using the suburban path loss model from[20]:PL  [dB] = 86.15+ 24.9 log (   [m] 100 ) ,

Table 3 :
Measured trajectories and their characterization.

Table 4 :
Number of communication updates in one hour and communication update probability. is the theoretical maximum number of updates.

Table 5 :
Number of location updates in one hour and location update probability. is the theoretical maximum number of updates.

Table 6 :
Errors for different spreading factor and trajectories.