Robust Estimator for Non-Line-of-Sight Error Mitigation in Indoor Localization

Indoor localization systems are undoubtedly of interest in many application ﬁelds. Like outdoor systems, they su ﬀ er from non-line-of-sight (NLOS) errors which hinder their robustness and accuracy. Though many ad hoc techniques have been developed to deal with this problem, unfortunately most of them are not applicable indoors due to the high variability of the environment (movement of furniture and of people, etc.). In this paper, we describe the use of robust regression techniques to detect and reject NLOS measures in a location estimation using multilateration. We show how the least-median-of-squares technique can be used to overcome the e ﬀ ects of NLOS errors, even in environments with little infrastructure, and validate its suitability by comparing it to other methods described in the bibliography. We obtained remarkable results when using it in a real indoor positioning system that works with Bluetooth and ultrasound (BLUPS), even when nearly half the measures su ﬀ ered from NLOS or other coarse errors.


INTRODUCTION
Localization and tracking technologies are of great interest in many application fields, such as robotics and mixed reality or emergency systems.There are a wide variety of localization techniques, which make localization a lucrative research field.
In an initial approach, we can distinguish between indoor and outdoor positioning systems.Outdoor positioning systems, such as GPS or GSM, are designed to obtain the position of a mobile in a wide area.They usually provide global positions, since localization of emergency calls has become mandatory in many countries [1,2].Indoor systems are designed to determine a precise position inside buildings, since outdoor systems are not sufficiently accurate to be able to perform this function.
Apart from those based on computer vision and certain specific sensors (inertial or pressure), most positioning systems use some kind of a signal measuring system to infer the distances between the infrastructure's fixed elements (beacons) and the mobile that is to be located (tag) [3].The measurements that are usually performed to obtain distances are time of flight (TOF), carrier signal phase of arrival (POA), and received signal strength (RSS).Once the distances have been calculated and the location of the beacons is known, it is possible to calculate the coordinates of the tag-a technique known as multilateration.If, however, the parameter used is the angle of arrival (AOA) rather than the distance, the technique is known as triangulation [4].
Radiofrequency (RF) is the signal that is most commonly used to perform this task, because it is extensively used for wireless communications.Thus, reusing RF signals to perform localization, for which no additional hardware is required, is a very attractive possibility, mainly because of its low cost.Many research groups are currently looking into performing localization with a standard protocol such as Bluetooth or IEEE 802.11 [5,6].Unfortunately, there are still unresolved accuracy and robustness problems.These problems are considerably alleviated by other systems that use RF, such as ultra-wideband (UWB), although not as yet in standard protocols.Furthermore, there are systems that use other signals, such as ultrasounds, to infer distances, which are often combined with other technologies (RF or optical) to perform synchronization tasks.
A wide variety of algorithms may be used to calculate the position of a tag from the signal measurements, but they all suffer from non-line-of-sight (NLOS) errors: the problem of finding the intersection of several spheres centred on the beacons and radii equals their distances to the tag, can be solved in many ways.Nevertheless, they all suffer from non-line-of-sight (NLOS) errors.In the bibliography, a non-line-of-sight error is defined as a large and always positive error that arises when a distance is estimated from a measurement [3,[7][8][9][10][11][12].It usually occurs when a signal does not follow a straight path from the emitter to the receiver.
Many different methods have been devised to try to mitigate the NLOS problem, but not all of them are applicable in every environment.For radiofrequency-based indoor positioning systems, for which the coverage area should be small, Pahlavan et al. propose premeasurement-based location pattern recognition, also known as location fingerprinting [3].The method is similar to the solution developed by Ekahau, which involves RSS mapping of the positioning system's deployment area, giving an accuracy of within 1 m [7].
Other methods use neural networks to predict the NLOS error [8], Kalman filters to correct NLOS measurements [9], or statistical approaches to distinguish between LOS and NLOS measurements [10].Venkatraman et al. propose a minimization problem to estimate an NLOS error, in which the geometry of the problem is considered in a 2D space.The algorithm estimates scale factors which are used to scale NLOS-corrupted measurements to near-the-true LOS values [11].
Most of the methods try to detect the NLOS error in the measurement itself, but this is not an easy task for indoor positioning systems that use ultrasounds.Chen proposes a method whereby the measurements are combined in different ways and several solutions are obtained from each combination; these solutions are then formulated as optimization problems [12].In this technique, different solutions are obtained from the same set of inputs, which is similar to the idea that we propose in this paper.The final solution is a weighted linear combination of the solutions, which gives more weight to lower residuals.However, all the measures have an influence on the solution, even those corrupted by NLOS errors.
Here, we present a new approach to minimize the effects of NLOS errors using the least-median-of-squares (LMedS) method.It enables NLOS measures to be rejected while the location estimation is being carried out.
LMedS yielded remarkable results in both simulated and real scenarios.We validated the suitability of the method for NLOS mitigation and compared it to other methods.Then we evaluated its performance in a real implementation of an indoor positioning system working with Bluetooth and ultrasound (BLUPS).

PROBLEM FORMULATION
The location problem illustrated in Figure 1 involves calculating the position of the tag from the measurements of several ultrasonic times of flight emitted from beacons with known coordinates.
Let us use P = x p y p z p T (1) to denote the position of the tag, which we wish to know, and to denote the coordinates of beacon i.First of all, we need to measure flight times from ultrasonic signals, which are sent by the beacons in a pollinglike fashion.Each location cycle begins with a Bluetooth broadcast that all the devices receive within a few microseconds [13]; the arriving instant points outside the system's common temporal reference.All the tags then reset their time counters and the first beacon emits an ultrasonic chirp at 40 kHz.All the tags in range detect the chirp and timestamp the arriving instant.The following beacons emit sequentially after a fixed period of time that is needed to let the previous beacon's chirp extinguish.At the end of the process, tags have n flight times from the beacons to their unknown position.These flight times are represented by T = TOF 0 , TOF 1 , . . ., TOF n . ( The next step is to solve the relationship between the times measured T and the real distance between the emitter and the receiver: When the ultrasound radiation is direct, we find the following relationship: In the above equation, v sound is the estimated speed of sound, which is heavily dependent on air temperature, and k is a constant parameter that includes delays in circuitry, microcontroller firmware, and so forth.We particularized these parameters in our system by measuring TOFs between the emitter and the receiver over distances ranging from 1 m to 17 m.When there was no signal blockage, we achieved considerable accuracy: an error of less than 0.15% of the distance travelled, or, in other words, an error of less than 1.5 cm for a distance of 10 m.
Once we were able to measure the distances between the tag and a sufficient number of beacons as precisely as possible, we had to calculate the position of the tag by solving the following equation system: . . .
At least, three distances are required to solve the aforementioned trilateration problem.The problem can be solved in several ways, as described in [14][15][16][17][18]. Up to this point, the location problem does not seem particularly complex; the difficulties appear when the problem involves erroneous starting data.In order to calculate the distance between beacons and tags, we assumed that they were aligned and that there were no obstacles between them.Unfortunately, this is not typically the case.In real environments, one or more of the distances may contain large errors produced by multipath effects and the blockage of the ultrasonic signal, and these errors will hinder accurate computations.In this case, the NLOS error can be overcome by using data redundancy, that is, many beacons.

Error characterization
The only data we had were the beacon's coordinates B and the ultrasonic TOFs measured T. The time measure was therefore accurate, but its relation to distance suffered from all the NLOS errors.Because this relation to distance was the main source of error, we had to characterize it for the case of an indoor environment [19].An exhaustive analysis of all the possible situations was impracticable. Figure 2 shows a setup in which five beacons (B1, B2, B3, B4, B5) are distributed in a room where one tag is surrounded by people and there is one opaque surface.Using this figure, we can categorize the distance errors into four different types depending on the real conditions that cause them.
(I) The ultrasonic radiation from B4 and B5 is not blocked.This is the calibration situation in which the TOF measuring error is less than 0.15% of the distance.
The factor that most influences this error, which follows a Gaussian distribution, is the inaccurate calculation of the speed of sound [19].If there is a 5 • C error when the air temperature is measured, the speed of sound will have an error of about 1% [20].(II) The signal from B1 is hindered by people or objects around the tag.This is the analogous case of lightweight obstructions stated by Girod and Estrin [19]; the errors made also follow a distancedependent, uniformly positive distribution because the obstacles' distribution is random and does not follow any pattern.We ran several blocking tests and obtained a maximum error of 5% even in crowded scenarios, but only when the blocking object was not very close to the tag.Redefining this error as a distancedependent, uniform distribution could also help to model situations in which environmental conditions are worse than those stated in Type I, that is, strong air currents, large temperature gradients, and so forth.(III) The blockage of the B2 signal is more severe: a person or an object is in the beacon's line of sight at a short distance from the tag.The magnitude of the error will depend on the object's size, position, composition, and so forth.As with the Type II error, we modelled it as a distance-dependent, uniformly positive distribution, although its maximum value could be anywhere between 10% and 100% of the distance.(IV) The worst situation is that of B3, because the beacon's signal is completely blocked.A completely wrong TOF measurement may also be the result of a hardware or synchronization problem.Nevertheless, these measurements are not too problematic from the algorithms' point of view because they can usually be detected beforehand and eliminated from the calculations.
Girod and Estrin describe an orientation error that we did not take into account, because our beacons and tags were designed to be omnidirectional [19].
The problem stated and the possible errors made can lead to multiple situations that are best approached in different ways.If there are no significant errors in the starting data (Type I or II), the algorithms that are using all the available information will be highly accurate.If, on the other hand, most of the distance estimations are corrupted (this may be the case in dirty environments in which a signal is inadequately processed), the algorithms will fail to find a good solution, because there is no valid relationship between the starting data and the output.(In these situations, a priori knowledge of the system's behaviour may help to improve the estimations [10].)The latter situation will arise when the initial data is a mixture of correct and erroneous data.Here, we have enough data to calculate the position accurately (three distances in three dimensions), but wrong information prevents direct solutions from being reached.This is common in indoor positioning systems: the beacons are distributed over a room, and some of them have direct view of the tag, while others are hindered by the environment.Moreover, the scenario changes quickly and unpredictably, which makes any previous knowledge of the system useless.The system must ensure that enough correct data are available to perform localization, regardless of the environment.The algorithm will set a minimum quality threshold for the starting data, and it will calculate the position correctly above this threshold.

PROBLEM SOLUTION
The technique we propose focuses on a situation in which it is not possible to use any prior information to solve the multilateration problem.Thus, except in the case of Type IV errors, it is not possible to identify the measurements affected by NLOS error, or whether there are any.There is redundant data within unidentified, erroneous information, which must be filtered out to compute the best solution.This set of circumstances is quite similar to many situations in computer vision applications.In this field, robust techniques such as the LMedS or random sample consensus (RANSAC) algorithms have yielded very good results [21,22], and are actually mandatory in practice.

Robust estimation
We will usually have more than three beacons, so any estimation method can be used to process all of them and redundancy can be exploited to get better results.The classic estimation method is least mean of squares (LMS).The LMS method assumes that all the measurements can be interpreted using the same model, which makes it very sensitive to out-of-norm data or outliers.It has a breakdown of 0% of spurious data, which means that a single outlier (NLOS measurement in our case) can spoil the fit [23].LMS minimizes the sum of the squares over all the measurements, and if a measurement is far from the correct value, its square error prevails in the summation and therefore prevails in the fit.Some authors have tried to make this estimator robust by replacing the square with something else, without touching the summation sign [11].However, the key issue is to prevent outliers from having any influence at all on the result.
Robust estimators provide sound methods for detecting outliers, and they obtain trustworthy results even when a certain amount of data is contaminated [23].From the existing robust estimation methods [21,24], we chose the LMedS method.If we compare it to the LMS method, the LMedS method replaces the sum by the median, which is more robust, but unfortunately it has no analytical solution.
The LMedS method searches in the space of solutions obtained from subsets of the minimum number of data.If we need a minimum of three beacons to compute the location, and there are a total of n measurements, then the space of solutions will be obtained from the combinations of n elements taken 3 by 3, giving m solutions: The algorithm used to obtain an estimation with this method can be summarized as follows.
(1) Calculate the m subsets of three measurements.
(2) For each subset S, compute a location by trilateration in closed form P S , using ( 6).(3) For each solution P S , the residues R S are obtained as where and the median M S of the residues R S is computed.(4) We store the solution P S , which gives the minimum median M S .
When there are too many beacons, this exhaustive search is too expensive in computational terms.A practical solution to this problem is to randomly select a sufficient number of subsets of three measurements to warrant a reasonable probability of not failing.In this case, the first step will be substituted by a Monte Carlo technique in order to randomly select m subsets of three measurements.
A selection of m subsets is good if at least the three measurements in one subset are good.If P ns is the probability of a measurement not being spurious, that is, of not having an NLOS effect, and P m is the assumed probability of missing the computation, that is, of not reaching a good solution, the number of subsets to be considered can be computed as If, for example, we accept a probability P m = 0.01 of failing, with an estimation of the probability P ns = 70% of good measurements, the number of subsets m should be 11.But a tenfold reduction of the probability of failing (P m = 0.001) can be considered increasing the computational cost about 0.5 times, if 17 subsets are taken.

Spurious data rejection
The search in the space of solutions using the median gives a robust solution to localization problems in which spurious data or outliers have no influence.Additionally, we can easily detect outliers as those that have a higher residue if we assume Gaussian noise for the inliers.The threshold for selecting the outliers is taken from the standard deviation of the error, which is estimated from the median of the residues as [23] Assuming that the measurement error for inliers is Gaussian with zero mean and standard deviation σ, the residues follow a χ 2  1 distribution with 1 degree of freedom.Taking, for example, a 5% probability of rejecting an inlier, the threshold will be fixed at 3.84 σ 2 .Once the outliers have been rejected, it would be possible to compute a slightly better solution without them, in a final step, using a classical algorithm.A more detailed explanation of this method is given in [23].

RESULTS
This section presents the results of the LMedS algorithm.Exhaustive testing in real environments is limited by the fact that it is impossible to generate all the situations needed to validate the mathematics.Therefore, we first present a simulation of the algorithm in various error-measuring situations, and then a real test in a 10 × 10 × 5 m indoor space.

Test-bench definition
The algorithm's behaviour depends mainly on the goodness of the distance estimations, but it is also influenced by the relative positions of the tags and beacons.The test-bench we chose was a 10 × 10 m room with eight beacons in the ceiling, which was 5 m high.As shown in Figure 3, four of them were placed at the corners and the rest inside the ceiling.As stated by Ray and Mahajan, this is not an optimal disposition of the beacons if one wishes to avoid singularities [25].However, these authors' recommendations would lead to impractical locations, as some of the beacons will be at floor level and their chirps will suffer significant blockage.Thus, the arrangement proposed in this paper is designed to provide maximum ultrasonic coverage in the area in which the tags are to be located.In order to cover all the relative situations of the tag and beacons, we took 1000 points distributed randomly in the room, up to 2 m high (Figure 3).From each test point, we calculated their distances to the beacons; this was the input data free of errors.We calculated several errors from the beacons' coordinates and introduced them in the distances to test the algorithm.We then modelled the aforementioned situations in the following ways.The blockage of Type II was modelled adding a distance-dependent, uniformly positive random error to all distances with a maximum value from 1% to 5%.The

Least squares LMedS
Positioning error (m) Figure 4: Least-squares method versus LMedS method.Error A% indicates that all the distances used have a random uniform error with a maximum amplitude of A%. errors of Type I followed a normal distribution, although their contribution was minor when there were NLOS errors present.Severe signal obstruction (Type III) was also simulated adding distance-dependent, uniformly positive random errors with maximum values of 10%, 50%, and 100%.The absence of data (Type IV) or the presence of clearly aberrant information from a beacon was not taken into account.Thus, when a distance was identified as wrong, it was directly discarded and not used as an input of the algorithm.
To obtain the final solution using LMedS method with 8 beacons, (7) shows that we will have 56 partial solutions to choose from.Although using a subset of the solutions could be useful, we used all of them to make the test as accurate as possible.

Definition of algorithm errors
Once we had chosen the evaluation scenario and the test cases that were to be applied to the different algorithms, we established the parameters that we were going to use to compare their behaviour.The most appropriate way to present the margin of error for each method was to use a confidence interval.Thus, we considered the statistical variable of "errors made" as the distance that separates the real point from the calculated one, in cm.The measurements taken were elements of the population (all the possible measurements), and therefore a sample of the statistical variable to be studied.Our aim was to evaluate the average of the error made, because this would indicate how exact the measurement was.In order to survey the interval limit of the average of the error, that is, how exact the calculations were, we used the 99th percent confidence interval of the error made, in cm.

Comparison with other methods
Least-squares is the method most commonly used to solve nonlinear systems that converge to a global minimum, such as the one stated in (6) [26].In Figures 4 and 5, we com- pare the LMedS algorithm's behaviour with the least-squares method.Figure 4 shows the cases in which there were Type II errors in all beacons with several maximums: both algorithms show good behaviour in normal situations, even in shady environments with random errors of up to 5%. Figure 5 shows the cases in which one to four measurements were affected by heavy NLOS error (Type III).It is here that the LMedS algorithm demonstrates that it can manage NLOS errors effectively.While the least-squares algorithm fails even with NLOS errors of 10%, LMedS is able to handle up to three measurements with NLOS errors from a total of eight (which is quite improbable in a real situation), thus keeping the positioning error below 15 cm.
As stated in the introduction, Chen proposed a method with a similar approach that involves searching in a space of solutions [12].A quantitative comparison is not possible because the algorithm is in two dimensions and it is designed for GSM location with kilometric measurements of distance and standard errors of hundreds of meters.A qualitative comparison, on the other hand, is possible.The method proposed is not as precise as ours, since its error is far higher than the solution when only measurements without error are used, whereas we equaled it.This is because it does not eliminate the aberrant solutions as we do, and all measurements have a weight in the final result.

Field test result
The positioning basics used in BLUPS also follow the multilateration problem.The system consisted of beacons and tags, including Bluetooth modules (Mitsumi), which kept them sharply synchronized [13].This, in combination with self-designed ultrasonic hardware (emitter and receiver), allowed the distances between beacons with known coordinates and tags to be measured.Then, with the data gathered, we calculated the tag position.The most significant contribution of this system is the remarkable relationship between the beacons (starting data) needed and the robustness and accuracy achieved.Other systems with similar features use many more beacons, but to achieve a margin of error of a few centimeters in a 10 × 10 × 5 m room, we only need five to eight beacons (in the hardest cases), while others require several dozens (one for every square meter) [27,28].Having fewer beacons allows a large number of tags (more than 100) to be simultaneously positioned in the same room, at a refresh rate of 300 to 500 milliseconds (depending on the number of beacons used).
We evaluated BLUPS in various scenarios, but the most exhaustive analysis was performed at Malmö University, Sweden.The installation had five beacons arranged in an area of 8 × 10 m with a height of 5 m.After 750 localizations in the room with direct vision of at least four beacons, we obtained a 99th percent confidence interval of the two-dimensional positioning error of ±3 cm, which rose to ±6 cm in three dimensions (3D).
The ultrasound technology used to perform location limits the refresh rate in order to obtain locations, and makes the system unsuitable for locating rapidly moving objects.
However, the accuracy obtained makes it a good choice for static or low-motion location applications or for calibrating other systems.In another field test, we focused on guidance applications, for which it is necessary to obtain the orientation of the user in addition to the location.Analyzing the simultaneous position of two tags, the relative errors found were less than 1 cm in 3D, making tracking and head's orientation very precise.

CONCLUSION
In this paper, we have presented an approach to NLOS error mitigation that adapts the robust least-median-of-squares (LMedS) method.It is well known that the best way of ensuring good positioning is to have redundant data usually setting more beacons than needed.The LMedS algorithm, far from simultaneously using all the available data, is based on making sets of input measurements that are used to obtain a space of solutions.The robust solution is the one that gives the least median of the squares of the errors.The LMedS method allows NLOS measurements to be rejected and gives accurate solutions even in rough conditions.

Figure 2 :
Figure 2: TOFs taxonomy.B4 and B5 have a direct path to the tag, whereas the path from B1, B2, and B3 is hindered by people and a large obstacle.

Figure 3 :
Figure 3: Scenario definition and test points.

Figure 5 :
Figure5: Least-squares method versus LMedS method.All the measurements have a random uniform error with a maximum amplitude of 1%.Moreover, n of them have an NLOS error with a maximum amplitude of (a) 10%, (b) 50%, and (c) 100%, respectively.