Trilateration Approaches for Indoor Wi-Fi Positioning

In smartphones several sensors and receivers are embedded which enable positioning in Locationbased Services and other navigation applications. They include GNSS receivers and Wireless Fidelity (WiFi) cards as well as inertial sensors, such as accelerometers, gyroscope and magnetometer. In this paper, indoor Wi-Fi positioning is studied based on trilateration. Three methods are investigated which are a resection, a calculation of the center of gravity point and a differential approach. The first approach is a commonly employed resection using the ranges to the Wi-Fi Access Points (APs) as radii and intersect the circles around the APs. In the second method, the center of gravity in a triangle of APs is calculated with weighting of the received signal strength (RSS) of the Wi-Fi signals. The third approach is developed by analogy to Differential GNSS (DGNSS) and therefore termed Differential Wi-Fi (DWi-Fi). Its advantage is that a real-time modeling of the temporal RSS variations and fluctuations is possible. For that purpose, reference stations realized by low-cost Raspberry Pi units are deployed which serve at the same time as APs. The experiments conducted in a laboratory and entrance of an office building showed that position deviations from the ground truth of around 2 m are achievable with the second and third method. Thereby the positioning accuracies depend mainly on the geometrical point location in the triangle of APs and reference stations and the RSS scan duration.


Introduction
The motivation of this study is that for indoor positioning there is still no generally valid solution. In many public buildings, infrastructures, such as Bluetooth, Wi-Fi, etc., are already available for indoor positioning [1,2,4,9]. Different approaches for position determination can be distinguished, which are cell-based methods (Cell-of-Origin CoO), Time of Arrival (ToA) or Angle of Arrival (AoA) measurements, hyperbolic trilateration (Time Difference of Arrival TDoA), scene analysis with measured signal strengths (Received Signal Strength RSS) and digital images as well as fingerprinting (see e.g. [3,4,5,9]]. With smartphones, however, the selection of sensors and receivers and their quality differ depending on the device, which means that the position solution can also be influenced differently. In this study, the method of trilateration with Wi-Fi signals is used. In this case, the measured RSS are usually used for positioning and they have to be converted from [dBm] into a range in [m] to the respective AP. Approaches for conversion are discussed in section 4. Firstly, the principle of operation of a differential Wi-Fi positioning approach is presented introduced in [8] which is termed Differential Wi-Fi (DWi-Fi) by analogy to Differential GNSS (DGNSS). A low-cost realization is the use of Raspberry Pi (RP or RPi) units which broadcast Wi-Fi signals and are therefore APs and scan RSS of the other units as reference stations at the same time.

Differential Wi-Fi Positioning
An influence that can have a significant effect on positioning and should therefore be taken into account is caused by fluctuations in the Wi-Fi network. As an example, Fig. 1 shows the Wi-Fi RSS recorded at the Raspberry Pi unit RP 31 of five other RPs indicating that they can be quite noisy. Especially at the beginning of the recording, large fluctuations can be observed. This can be attributed to the fact that the RPs did not start broadcasting Wi-Fi signals at the same time as they were sequentially started. Thus, these fluctuations can be omitted for the evaluation. It is also clearly visible that RP 31, 32, 33 and 34 were installed in the same room, as they recorded with higher stability to each other than RP 35 and 36 over the entire period of measurement. DWi-Fi shall encounter for the following influences in the course of position determination: (1) spatial and temporal signal variations and fluctuations, (2) influences from outside, e.g. due to shielding by persons, by objects of hidden RPs, etc. and (3) no continuous transmission, e.g. due to fault hardware, interrupted power supply, etc. Therefore time-dependent correction parameters are estimated using known reference stations as it is done in DGNSS [8]. In a networked solution the correction parameters can be derived similar as in a CORS (Continuous Operating Reference Station) GNSS network. Then area correction parameters referred to as with the German term Flächenkorrekturparameter (FKP) are estimated and applied by the user [6].

Trilateration Approaches
Ranges must be derived from the RSS measurements of the RPs for user localization with trilateration. A triangle of RPs is formed, in which the searched position of the smartphone user is located. Then a resection can be solved by intersecting circles, where there radii are the ranges to the RPs. For cases where this resection does not lead to an unique position fix (see Fig. 2) using least squares adjustment an extended approach has been developed. A minimum and maximum range to the RPs are defined in this case, which describe thus a value range for the circle radii. For the derivation of the radii, an approximated polynomial function for the relationship between RSS and range to the RP from the empirical calibration (see Fig. 3) is used and shifted twice along the vertical axis. Two minimum and maximum radii are therefore available for each AP for determining the point of intersection of the circle. The position of the smartphone user should lie in the overlap area of all three circular rings, each formed by the minimum and maximum radii. Ideally, the resection results then in six intersecting points as depicted in Fig. 2 on the top. In the following, the center of gravity of the overlap area from these six points is calculated in order to obtain the desired location of the user. Furthermore, the RSS can be subsequently weighted where the three highest RSS values of all recorded RPs are used, since high RSS values naturally corresponds to a stronger signal. This has to be done in cases where the circles do not intersect (see the second example in Fig. 2 on the bottom).

Approaches for RSS to Range Conversion
A particular challenge is to deduce the range in [m] from the measured RSS in [dBm] to an AP. The conversion can be done using a signal propagation model or a device specific empirical calibration. The first strategy, however, can be very complex once there are walls between the transmitter and receiver. The influence of the resulting damping is practically impossible to model [8]. Thus, a site specific empirical calibration was performed for each employed smartphone so that the range can be deduced directly from the measured RSS in the evaluation. Fig. 3 shows the resulting RSS observations averaged over four  smartphone orientations along a 52 m long baseline between two RPs where checkpoints (CPs) where measured at intervals of 1 m. The performance of measurements in four orientations is a common practice to encounter for the shielding of the Wi-Fi signals from the user. A polynomial fitting of third degree was carried out to establish the relationship between RSS and range. The values in the range of up to 15 m are of particular interest for the conversion. The polynomials show that the averaged RSS values range from -40 to -65 dBm. However, from the measurements it could be seen that many measured values occur at -35 dBm or higher. Thus, in order to improve the empirical calibration another relationship between RSS and range was derived as shown in Fig. 4. It is a linear regression independent of the used smartphone. Experiments were conducted in an indoor laboratory setting and in a combined out-/indoor environment at the entrance of an office building. Table 1 summarizes the specifications of the used six smartphones and one tablet PC. Fig. 5 shows a map of the laboratory with the location of six RPs and 16 CPs. To serve as ground truth their location were surveyed with a total station from a traverse. Stop-and-go and kinematic measurements were carried out along two trajectories.
In the entrance area of the University office building a combined in-/outdoor trajectory was defined. It runs indoors from a staircase to the laboratory into the outdoor environment in front of the building and further along a road with 5-to 6-storey tall buildings. The total length of the trajectory is 86 m (see Fig. 6). All indoor RPs and CPs were surveyed with a total station using traversing. In this paper, only the indoor position solutions are considered and their results presented. 6 Results of the Stop-and-Go Measurements in the Laboratory Tables 2 and 3 show the deviations from the ground truth of the estimated positions of the CPs along trajectory 2 for the stop-and-go measurements in the laboratory. The center of gravity was calculated using the three RPs with the highest RSS. For the other three solutions, the center of gravity is calculated using four, five and all six RPs installed in the laboratory. As can be seen from the Table the resulting deviations can differ quite significantly. Smaller deviations for several CPs occurred if they are located closer to an RP. One can also see that the calculation with three RPs seems more stable than with the addition of more of them. If the DWi-Fi positioning approach is used an improvement of the performance and the achievable positioning accuracies is expected as the calculation of the DWi-Fi corrections is carried out epoch by epoch. Thus, the observations are improved in realtime and local fluctuations are taken into account. It can be seen from Table 3 that in many CPs the resulting deviations do not differ if a different number of RPs are used for the calculation of the position solution. The reason for this is that very high RSS values (higher than -35 dBm) were measured in the area of the first CPs to the RPs, which span the triangle used for position determination. By adding more RPs the weight is only slightly changed and therefore there was no difference in the results. The other RPs thus had a minor influence on the position determination. However, compared to the results without using DWi-Fi, no uniform improvement could be observed across the entire trajectories. There are fewer differences at some CPs, but not in general. Applying the DWi-Fi corrections changes the weighting of the RPs, but it can also happen that the geometry for trilateration is changed. For example, the triangle RP 32/33/36 no longer contributes to the calculation of CP 22, but RP 32/33/36 and has therefore led to a smaller deviation. Especially, the start and end points of the trajectories are best determined. This is because the CP and RP are less than 1 m apart.      7

Results of the Kinematic Measurements in the Laboratory
The CPs along the trajectories were passed in a specified sequence and a time stamp was set when the points were passed in the kinematic measurements. Thereby the biggest influence on the obtaining positioning results was the RSS scan duration of the different smartphones depending on the device specific Wi-Fi chip. With a longer scan time, another distance between the CPs is covered. The longest scan time of one of the smartphones had was for SP1 with 4.5 seconds. Accordingly, only eleven scans along the first trajectory were recorded, whereas with SP2 84 scans with an average scan time of only 0.5 s. In the following evaluation, only the calculation of the center of gravity was considered. Fig. 7 shows a resulting trajectory of smartphone SP2. It can clearly be seen how the user walked along the trajectory. Table 4 compares the results without and with the use of DWi-Fi for different CPs. Some improvements can be seen in the CPs, but no smartphone results can be improved over the entire trajectory. It must be noted that the shielding by other users has a significant influence on the results. The measurements of a trajectory were not performed independently for each smartphone, but by several users walked along the trajectory at the same time. Thus, the signals were possibly attenuated by other users. This would also be the case under real world conditions, such as those found in buildings with other users moving around.

Analysis of the RSS Behaviour in the Building Entrance Test Area
For the analysis of the use of DWi-Fi, statistical values were calculated from the observations in the first step so that the range of the variations of the RSS can be seen. For this purpose, the RSS recorded by each RP 31 was analyzed to see its emission behaviour. Fig. 8 shows the median, arithmetic mean, minimum and maximum RSS value radio maps in the building entrance test area. The spatial conditions are recognizable, the signals of RP 31 can propagate more towards RP 34 than towards RP 35. Moreover, the signals to RP 35 decrease much more than to RP 34, with large differences between the minimum and maximum RSS values. The reason for this can again be attributed to the high fluctuations of the RSS at the beginning of the measurements (compare Fig. 1). In the next step, the correction values were determined. They correspond to a value of a few dBm for all SPs. Fig. 9 shows the frequency distributions of the correction values for RP 31 to 36 for smartphone SP3 and SP7. These two, as well as the distribution of the remaining SPs, show similarities to a normal distribution. The statement is also supported by the calculation of averages and medians.
The mean values for all RPs are less than 1 and the median values are 0 with the exception of individual values, which are between 0 and 1 (in maximum one per SP evaluation). Finally, the position solutions were calculated with these correction values.   Results of the Kinematic Measurements in the Entrance Area of the Office Building Table 5 shows a comparison of the resulting position deviations from the ground truth of seven smartphones for the three CPs in the building entrance area without and with DWi-Fi corrections. One can easily recognize that there are not significant differences if DWi-Fi corrections are applied or not. Furthermore, the results show that the deviations for CP 32 are by a factor of 2 worse than the ones for the other two CPs. The main reason for this is that CP 32 is unfavorably located in respective to geometry. CP 31 and 33 are located more centrally in the triangle spanned by the RPs which results in much smaller deviations. Thus, it can be concluded that the location of the points in the triangle has a great influence on the achievable positioning results.

Conclusions and Outlook
The results of the experiments show that the selection of a suitable calibration procedure for the conversion of the RSS to ranges is of great importance. The best results were achieved if a generally valid approximation for all devices of the signal propagation (variant 3) instead of a device specific calibration (variant 1) is used. In the stopand-go measurements good position solutions were achieved at certain checkpoints. The deviations from the ground truth could be reduced by a factor of 2 from 3 to 6 m to 1 to 2 m respectively with variant 3. To achieve these results, the geometrical checkpoint location within the RPs triangle is very important. In addition, the scan duration has a significant influence on the results, especially for the kinematic measurements. As different Wi-Fi chips are installed in the smartphones, the time periods that a device needs for a RSS scan were also very different. Further investigation has been carried out regarding this influence. First results are presented in [7]. The results of the DWi-Fi evaluation showed that the deviations from the ground truth can be reduced to better than 2 m using certain evaluation methods. It is possible to locate position of the user where he is in a building. If three RPi's are not available in every area of a building, further information, such as the damping of the signals through walls, doors, etc., must be considered. Thus, in future research this extension of the method will be investigated.
The laboratory set-up is similar to a wide corridor of an office building or an underground train or metro platform. If the following key points are considered it is then possible to find either certain offices or the platform exits. Firstly, it must be taken into account that it is better to define a uniform polynomial function for a limited distance range. Then only the nearest RPs are considered because far away APs show low RSSs and therefore contribute little to position determination. Secondly, sufficient RPs have to placed in the entire area so that the user is surrounded by three RPs at any time in order to calculate the center of gravity in the AP triangle. Thirdly, the center of gravity calculation should only be used with three RPs.