Ultrasonic Trilateration Methods for Low-Cost Indoor Positioning

Trilateration is a process where distances to known control points or beacons can be used as inputs to algorithms to calculate an object’s position. Most of the common trilateration methods known are fast and reliable, and based on estimating one or more location-dependent signal parameters like Times-of-arrival (TOA), Angle of Arrival (AOA) or Received Signal Strength (RSS). However, costly hardware is needed for such approaches to run reliably, and are too computationally complex both in speed and memory for low-cost hardware. The demand for low-cost hardware has greatly increased in recent years mostly due to the rapid emergence of internet of things, that promises to bring connectivity to just about everything. As such, leveraging on cheap hardware is an important step to take to achieve accurate indoor positioning. Because of convenience in generation and transmission, ultrasound is widely and commonly used electronically for distance measurement. The use of ultrasound with cheap hardware for accurate indoor positioning is discussed in this paper. Three localization methods that are reliable and fast enough for cheap hardware are analyzed with emphasis on the speed and memory demands. Experimental results show that the Maximum Likelihood estimation approach is the most accurate.

demand the most attention. Distance and range measurements (outcome of the first-stage in the process) would now serve as inputs into the second stage. This important step involves methods such as trilateration, where distances to known control points or beacons can be used as inputs to algorithms to calculate the object's position. We discuss three trilateration methods and prove each to be suitable for low-cost hardware. Despite the myriads of robust solutions to trilateration, a lot of which are designed without hardware limitations in mind, only a few are suitable to run with limited memory and on cheap hardware. So, if low-cost indoor positioning would be achieved, we must explore these limited possibilities

Trilateration Methods
As discussed in the introduction, by using trilateration it is possible to calculate one's position based on the distance to several other(control) points with known positions (Bossler, et al., 2010) (Ghilani & Wolf., 2006). To find one's position in 2 dimensions the number of required known points is 3; for position in 3 dimensions the number of known points is 4. The time it takes a signal to travel between the object, with unknown position, to each control point can be directly converted to distance. This is the TOA (Time of Arrival) approach, where both the time the signal was sent and the time it was received are required to get the time of flight. However, because synchronization between the sender and the receiver is necessary, TOA requires that times from the two separate systems have to be synchronized. This is a rather difficult problem, even more for cheap electronics to manage. The Time Difference of Arrival (TDOA) approach solves this problem by requiring only the differences in TOA at each receiver.

Maximum Likelihood Estimation
The Maximum Likelihood Estimation (MLE) method estimates, by finding the parameter values that maximize the likelihood of making the observation given the parameters, for a given statistical model. To apply this method, the likelihood function, = , , … , | , of the observed data has to be specified, where is the probability of observing the given data as a function of . If the are independent and identically distributed, then = ∏ | (Kay, 1993). In our usage here, is deterministic and represents the exact TDOA from sensor to the reference sensor. Maximizing the likelihood function is equivalent to maximizing the log of the likelihood function (Bossler, et al., 2010), thus = ∑ log | (1) Since our signal model is normally distributed with mean, = and variance, . Then, (2) and log likelihood function (Bossler, et al., 2010) (3) This amounts to minimizing the sum of squared errors, ,% − for our deterministic, unknown parameter, . Implementing this algorithm involves searching every integer coordinate point in a given range to determine which , ) point result in the smallest mean-squared-error (MSE) for the * − 1 TDOA distances for T number of measurements. This means converting each of the , ) coordinates in our search space into exact TDOA measurements; finding the differences from our estimated TDOA measurements; squaring and averaging the T number of measurements across the * − 1 TDOA distances. This implies that for each , ) point in space, the mean-squared-error (MSE) , (4) The point with the smallest MSE is the estimate of the desired position.

Simple Least Squares Approach
The Least Squares approach is one of the most popular statistical approaches to TDOA trilateration (Jin, et al., 2018). It is a standard approach in regression analysis to approximate the solution of overdetermined systems, especially equations with more equations than unknowns. The Least Squares approach has the ability to tolerate errors in measurements; with more measurements provided, less is the impact from a single erroneous measurement. In this work, the simple least squares approach refers to the least squares approach in its basic simplicity. From our TDOA problem, the resulting equations are arranged in matrix form, 01 = 2 (5) where 1 is a column vector containing all the unknowns: These matrices depend on beacon positioning coordinates F , ) F , 4 F and measured differences of range ∆5 F . Using the Least Squares formulation,

Lok8 Least Squares Approach
This approach was developed to introduce iteration to improve approximations to the least squares approach (Filonenko, et al., 2012) (Filonenko , et al., 2013). Given: where in our case:  * = 3, M = 2  0 I contains the coefficients of the unknowns , )  I G contains the corrections to be applied to the initial estimates for the unknowns N , N)  J contains the measurements 5 , 5 9 , 5 O  K contains the residuals (one for each measurement) Solving for G gives the solution: G contains the corrections to be applied to the original estimates for , ) . These new , ) coordinates are then used to recalculate updated distances for 5 , ∆5 Y , ∆5 9 Y , ∆5 O Y . The process is repeated until the coordinates of , ) don't change significantly. The initial estimates for and , ) can be set to the average of and ) coordinates of the four receivers, and 5 is then calculated using Pythagoras theorem at and ):

Experimental Setup
Emphasis in this work is on the trilateration phase of the localization process, and no specific setup is proposed, but a simple low-cost setup is described. As shown in Figure 1, there is an active ultrasonic transmitter on the mobile unit and four passive receiver units with known fixed positions. In this work, tests were carried out on the three trilateration methods, each of which required TDOA measurements. The environment used is a 200cm by 200cm square area partitioned into 10cm by 10cm grids, with sensors placed at the four corners of the square area. For time synchronization, RF transceivers are installed on the mobile unit and fusion center depending on communication preferences. In this setup, the mobile unit begins the positioning step by emitting RF messages that carry information about the ultrasonic signals being sent. The fusion center consequently uses this synchrony information to derive the receivers' time of flight for position calculation, which is displayed or sent to the mobile unit for secondary purposes e.g. navigation, location-awareness. To visualize the accuracies in the system, meansquared-errors of 20 measurements per grid, between the known actual location and the estimated location are calculated and plotted against the grid points in 3-D surface plots. In addition, ways to improve accuracy in each trilateration method are discussed.

Results and Discussion
Using the maximum likelihood estimation method, the mean square errors were as low as 3cm as shown in Figure  2. MSE was lower than 10cm in majority of the parts of the environment. While this method seems to be a viable approach, it takes considerable time to achieve this height of accuracy, since the entire search space in the domain must be scanned for the data points that result in the lowest MSE for a particular measurement. However, the time taken is dependent on the data points in the domain, so in domestic applications where there are few data points and lesser emphasis on granularity, this method is considerably fast enough. Furthermore, the MLE is not too demanding in terms of memory, since calculations -sums and squares -can be performed per data point and results are stored in a global memory location. Figure 2. MSE Plot for the Maximum Likelihood Estimation Approach Using the least squares method, as seen in Figure 3, MSE was quite as high as 40cm in majority of the parts of the environment. This approach is most suited for fast (short) times and low accuracy demands, since the time is only spent on matrix calculations, also the measurement errors have significant impact in the outcome of the calculations, as can be seen in the shades of yellow in the Figure 3.  Figure 4, MSE was less than 20cm in majority of the parts of the environment. As an improvement on the least squares approach, the iteration steps are shown to significantly reduce the impact of measurement errors in the result. Although the iteration steps may seem to require much longer time, most of the data points had iteration steps of 3 or 4 in number. Hence, while leveraging on the speed of least squares approach, the Lok8 approach reduces significantly the errors in the trilateration process.

Conclusion
Positioning is becoming an everyday need. As such, localization devices must be simple and cheap enough to encourage adoption. In this work, we have compared three trilateration methods that are efficient and costeffective for domestic or needs. The Maximum Likelihood estimation approach is very accurate, but needs more information about the environment and more time to determine the point with the least minimum square error. The least squares approach is fast enough, but easily prone to measurement errors. The Lok8 least squares approach improves accuracy by introducing iteration. The choice of any of these three techniques depends on the application it is intended for.