# On Wi-Fi Model Optimizations for Smartphone-Based Indoor Localization

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

## 3. Indoor Positioning System

## 4. WiFi Location Estimation

#### 4.1. Signal Strength Prediction Model

#### 4.2. Model Parameters

#### 4.3. Model Parameter Optimization

#### 4.4. Modified Signal Strength Model

- model per floor will use one model for each story, which is optimized using only the fingerprints that belong to the corresponding floor. During evaluation, the z-value from $\mathit{\varrho}$ in Equation (8) is used to select the correct model for this location’s signal strength estimation.
- model per region works similarly, except that each model is limited to a predefined, axis-aligned bounding box. This approach allows for an even more refined distinction between several areas like in- and out-door regions or locations that are expected to highly differ from their surroundings.

#### 4.5. Wi-Fi Quality Factor

#### 4.6. Virtual Access Points

## 5. Experiments

#### 5.1. Model Optimization

- empiric params uses the same three empiric parameters ${P}_{0}$, $\gamma $, $\beta $ for each AP in combination with its position, which is well known from the floor plan.
- optimization 1 is the same as above, except that the three parameters are optimized using the reference measurements (convex function). All transmitters share the same three parameters.
- optimization 2 optimizes the three parameters per access-point instead of using the same parameters for all. This still denotes a convex function per transmitter.
- optimization 3 does not need any prior knowledge and will optimize all six parameters (3D position, ${P}_{0}$, $\gamma $, $\beta $) based on the reference measurements (non-convex function).
- model per floor and model per region are just like optimization 3 except that there are several sub-models, each of which is optimized for one floor/region instead of the whole building. The chosen bounding boxes and resulting sub-models are depicted in Figure 2b.

#### 5.2. Wi-Fi Location Estimation Error

- There is a chance that even a nearby AP is unseen during a scan due to packet collisions or temporal effects within the surrounding. It thus might make sense to opt-out other locations only, if at least two APs are missing. On the other hand, this obviously demands for (at least) two APs to actually be different between the two locations, and requires a lot of permanently installed transmitters to work out.
- Furthermore, this requires the signal strength prediction model to be fairly accurate. Within our testing walks, several places are surrounded by concrete walls, which cause a harsh, local drop in signal strength. The models used within this work will not accurately predict the signal strength for such locations.

#### 5.3. Filtered Location Estimation Error

## 6. Conclusions and Future Work

## Author Contributions

## Conflicts of Interest

## References

- Köping, L.; Grzegorzek, M.; Deinzer, F. Probabilistic Step and Turn Detection in Indoor Localization. In Proceedings of the Data Fusion and Target Tracking Conference, Liverpool, UK, 30 April 2014. [Google Scholar]
- Bahl, P.; Padmanabhan, V.N. RADAR: An In-Building RF-based User Location and Tracking System. In Proceedings of the 19th Annual Joint Conference of the IEEE Computer and Communications Societies, Tel Aviv, Israel, 26–30 March 2000; Volume 2, pp. 775–784. [Google Scholar]
- Youssef, M.; Agrawala, A. The Horus WLAN Location Determination System. In Proceedings of the 3rd International Conference on Mobile Systems, Applications, and Services, Seattle, WA, USA, 6–8 June 2005; ACM: New York, NY, USA, 2005; pp. 205–218. [Google Scholar]
- Roos, T.; Myllymäki, P.; Tirri, H.; Misikangas, P.; Sievänen, J. A Probabilistic Approach to WLAN User Location Estimation. Int. J. Wirel. Inf. Netw.
**2002**, 9, 155–164. [Google Scholar] [CrossRef] - Meng, W.; Xiao, W.; Ni, W.; Xie, L. Secure and Robust Wi-Fi Fingerprinting Indoor Localization. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Guimaraes, Portugal, 21–23 September 2011; pp. 1–7. [Google Scholar]
- Palaniappan, R.; Mirowski, P.; Ho, T.K.; Steck, H.; Whiting, P.; MacDonald, M. Autonomous RF Surveying Robot for Indoor Localization and Tracking. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Guimaraes, Portugal, 21–23 September 2011. [Google Scholar]
- Polydorou, D.S.; Capsalis, C.N. A new path loss prediction statistical model for indoor wireless communications. Int. J. Infrared Millim. Waves
**1994**, 15, 201–228. [Google Scholar] [CrossRef] - Rajkumar, A.; Naylor, B.F.; Feisullin, F.; Rogers, L. Predicting RF coverage in large environments using ray-beam tracing and partitioning tree represented geometry. Wirel. Netw.
**1996**, 2, 143–154. [Google Scholar] [CrossRef] - Erceg, V.; Greenstein, L.J.; Tjandra, S.Y.; Parkoff, S.R.; Gupta, A.; Kulic, B.; Julius, A.A.; Bianchi, R. An Empirically Based Path Loss Model for Wireless Channels in Suburban Environments. IEEE J. Sel. Areas Commun.
**2006**, 17, 1205–1211. [Google Scholar] [CrossRef] - Chintalapudi, K.; Padmanabha Iyer, A.; Padmanabhan, V.N. Indoor Localization without the Pain. In Proceedings of the 16th Annual International Conference on Mobile Computing and Networking, Chicago, IL, USA, 20–24 September 2010; ACM: New York, NY, USA, 2010; pp. 173–184. [Google Scholar]
- Alzantot, M.; Youssef, M. CrowdInside: Automatic Construction of Indoor Floorplans. In Proceedings of the 20th International Conference on Advances in Geographic Information Systems, Redondo Beach, CA, USA, 6–9 November 2012; ACM: New York, NY, USA, 2012; pp. 99–108. [Google Scholar]
- Li, X. RSS-Based Location Estimation with Unknown Pathloss Model. IEEE Trans. Wirel. Commun.
**2006**, 5, 3626–3633. [Google Scholar] [CrossRef] - Mazuelas, S.; Bahillo, A.; Lorenzo, R.M.; Fernandez, P.; Lago, F.A.; Garcia, E.; Blas, J.; Abril, E.J. Robust Indoor Positioning Provided by Real-Time RSSI Values in Unmodified WLAN Networks. IEEE J. Sel. Top. Signal Process.
**2009**, 3, 821–831. [Google Scholar] [CrossRef] - Chen, Z.; Zou, H.; Jiang, H.; Zhu, Q.; Soh, Y.C.; Xie, L. Fusion of WiFi, Smartphone Sensors and Landmarks Using the Kalman Filter for Indoor Localization. Sensors
**2015**, 15, 715–732. [Google Scholar] [CrossRef] [PubMed] - Li, X.; Wang, J.; Liu, C.; Zhang, L.; Li, Z. Integrated WiFi/PDR/Smartphone Using an Adaptive System Noise Extended Kalman Filter Algorithm for Indoor Localization. ISPRS Int. J. Geo-Inf.
**2016**, 5, 8. [Google Scholar] [CrossRef] - Khanzada, T.J.S.; Ali, A.; Omar, A. Time Difference of Arrival estimation using super resolution algorithms to minimize Distance Measurement Error for indoor positioning systems. In Proceedings of the IEEE International Multitopic Conference, Karachi, Pakistan, 23–24 December 2008; pp. 443–447. [Google Scholar]
- Deligiannis, N.; Louvros, S.; Kotsopoulos, S. Optimizing Location Positioning Using Hybrid TOA-AOA Techniques in Mobile Cellular Networks. In Proceedings of the 3rd International Conference on Mobile Multimedia Communications, Nafpaktos, Greece, 27–29 August 2007; ICST: Brussels, Belgium, 2007. [Google Scholar]
- Ho, Y.; Lee, R. A Bayesian Approach to Problems in Stochastic Estimation and Control. IEEE Trans. Autom. Control
**1964**, 9, 333–339. [Google Scholar] - Thrun, S.; Burgard, W.; Fox, D. Probabilistic Robotics; The MIT Press: Cambridge, MA, USA, 2005. [Google Scholar]
- Ebner, F.; Fetzer, T.; Grzegorzek, M.; Deinzer, F. On Prior Navigation Knowledge in Multi Sensor Indoor Localisation. In Proceedings of the International Conference on Information Fusion (FUSION 2016), Heidelberg, Germany, 5–8 July 2016; IEEE: Heidelberg, Germany, 2016. [Google Scholar]
- Fetzer, T.; Ebner, F.; Köping, L.; Grzegorzek, M.; Deinzer, F. On Monte Carlo Smoothing in Multi Sensor Indoor Localisation. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Alcala de Henares, Spain, 4–7 October 2016; IEEE: Madrid, Spain, 2016. [Google Scholar]
- Friis, H.T. Introduction to radio and radio antennas. IEEE Spectr.
**1971**, 8, 55–61. [Google Scholar] [CrossRef] - Rappaport, T.S. Wireless Communications: Principles and Practice; Prentice Hall PTR: Upper Saddle River, NJ, USA, 2002. [Google Scholar]
- Seidel, S.Y.; Rappaport, T.S. 914 MHz Path Loss Prediction Models for Indoor Wireless Communications in Multifloored Buildings. IEEE Trans. Antennas Propag.
**1992**, 40, 207–217. [Google Scholar] [CrossRef] - Torres-Sospedra, J.; Jiménez, A.; Knauth, S.; Moreira, A.; Beer, Y.K.; Fetzer, T.; Ta, V.C.; Montoliu, R.M.; Seco, F.; Mendoza-Silva, G.M.; et al. The Smartphone-Based Offline Indoor Location Competition at IPIN 2016: Analysis and Future Work. Sensors
**2017**, 557, 17. [Google Scholar] [CrossRef] [PubMed] - Richalot, E.; Bonilla, M.; Wong, M.F.; Fouad-Hanna, V.; Baudrand, H.; Wiart, J. Electromagnetic Propagation into Reinforced-Concrete Walls. IEEE Trans. Microw. Theory Tech.
**2000**, 48, 357–366. [Google Scholar] [CrossRef] - Ebner, F.; Fetzer, T.; Köping, L.; Grzegorzek, M.; Deinzer, F. Multi Sensor 3D Indoor Localisation. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Banff, AB, Canada, 13–16 October 2015; pp. 1–10. [Google Scholar]
- Mofarreh-Bonab, M.; Ghorashi, S.A. A low complexity and high speed gradient descent based secure localization in Wireless Sensor Networks. In Proceedings of the 3th International eConference on Computer and Knowledge Engineering (ICCKE), Mashhad, Iran, 31 October–1 November 2013; pp. 300–303. [Google Scholar]
- Powell, M.J.D. An iterative method for finding stationary values of a function of several variables. Comput. J.
**1962**, 5, 147–151. [Google Scholar] [CrossRef] - Nelder, J.A.; Mead, R. A Simplex Method for Function Minimization. Comput. J.
**1965**, 7, 308–313. [Google Scholar] [CrossRef] - Goldberg, D.E. Genetic Algorithms in Search, Optimization, and Machine Learning; Addison-Wesley: Boston, MA, USA, 1989. [Google Scholar]
- Kirkpatrick, S.; Gelatt, C.D.; Vecchi, M.P. Optimization by simulated annealing. Science
**1983**, 220, 671–680. [Google Scholar] [CrossRef] [PubMed] - Fetzer, T.; Ebner, F.; Deinzer, F.; Grzegorzek, M. Recovering from Sample Impoverishment in Context of Indoor Localisation. In Proceedings of the 2017 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sapporo, Japan, 18–21 September 2017. [Google Scholar]
- Jung, W.R.; Bell, S.; Petrenko, A.; Sizo, A. Potential Risks of WiFi-based Indoor Positioning and Progress on Improving Localization Functionality. In Proceedings of the Fourth ACM SIGSPATIAL International Workshop on Indoor Spatial Awareness, Redondo Beach, CA, USA, 6 November 2012; ACM: New York, NY, USA, 2012; pp. 13–20. [Google Scholar]

**Figure 1.**Average error (in dB) between all reference measurements and corresponding model predictions for one AP. (

**a**) Modifying TX-power ${P}_{0}$ and path loss exponent $\gamma $ (known position $\widehat{\mathit{\varrho}}$, fixed $\beta $) denotes a convex function; (

**b**) modifying the y- and z-position (fixed x, ${P}_{0}$, $\gamma $ and $\beta $) denotes a non-convex function with multiple local minima.

**Figure 2.**Locations of the 121 reference measurements (left) and bounding-boxes used for model per region (right). Indoor-areas are denoted using a grey fill-color per floor, outdoor-areas are green. (

**a**) The size of each square denotes the number of permanently-installed APs that were visible while scanning and ranges between two and 22 with an average of nine; (

**b**) each distinct floor-color denotes a region (six indoors, one outdoors) for model per region. Often more than one bounding box is needed to describe the region’s shape.

**Figure 3.**Measurable signal strengths of a testing AP (black dot). While the signal diminishes slowly along the corridor (wide, black rectangle), the building’s metalized windows (dashed, grey lines) between the indoor-region (grey) and the outdoor-region (green) attenuate the signal by over 30 dB (small, black rectangle).

**Figure 4.**Cumulative error distribution for all optimization strategies. The error results from the (absolute) difference between model predictions and real-world values for each reference measurement. The higher the number of variable parameters, the better the model resembles real-world conditions.

**Figure 5.**At every of the 121 reference measurements, more than one AP is visible, and for for every visible AP, there is a difference between model estimated and real-world signal strength. The three figures depict the highest among those errors around the location of each reference measurement. While optimization is able to reduce the average error, local maxima remain due to over-adaption. (

**a**) empiric params; (

**b**) optimization 3; (

**c**) model per region.

**Figure 6.**Impact of reducing the number of reference measurements for optimizing model per region. The cumulative error distribution is determined by comparing its signal strength prediction against all 121 measurements. While using only 50% of the 121 scans has barely an impact on the error, 30 measurements (25%) are clearly insufficient.

**Figure 7.**Overview of all conducted paths, each starting at the denoted rectangle. Outdoor areas are marked in green. The length of the paths is as follows: Path 1: 207 m, Path 2: 138 m, Path 3: 86 m, Path 4: 140 m, and Path 5: 97 m.

**Figure 8.**Cumulative error distribution for the error between a location estimation using Equation (14) (only Wi-Fi) and the corresponding ground truth depending on the signal strength prediction model, using each of the 3756 Wi-Fi measurements within the 13 walks. All models suffer from several (extremely) high errors that relate to bad Wi-Fi coverage e.g., within outdoor areas (see Figure 3). This negatively affects the resulting average and 75th percentile. The strategies optimization 1 and optimization 2 sometimes suffered from over-adaption, indicated by increased error values for the 25th percentile.

**Figure 9.**Wi-Fi-only location probability for three distinct scans where higher color intensities denote a higher likelihood for Equation (14). The first scan (left, green) depicts a best-case scenario, where the region around the ground truth (black rectangle) is highly probable. Often, other locations are just as likely as the ground truth (second scan, blue), or the location with the highest probability is far from the actual ground truth (third scan, right, red).

**Figure 10.**Cumulative error distribution for each model when used within the final localization system from Equation (1). The error between ground truth and estimation is calculated for each filter update, every 500 ms. Especially optimization 1 suffered from over-adaption and thus provided worse results. Compared to just using Wi-Fi (Figure 8) the error difference between the models now is much more distinct. Starting from optimization 2 the system rarely gets stuck and provides a viable accuracy.

**Figure 11.**Detailed analysis of the Wi-Fi error for empiric params (unoptimized) and model per floor using Path 1 (see Figure 7). While optimization reduces the error indoors, the error outdoors is increased (bold line). A particle filter (PF, Equation (1)) on top of the optimized model takes 5 s to initialize the starting-position (rectangles), fixes the outdoor-issue and improves indoor situations. A filter on top of empiric params got stuck right before entering the second building. Both, the filtered and unfiltered version of empiric params are dragged into the second floor in the middle of the walk. As the particle filter starts uniformly distributed along the whole area, the initial estimations determine the pedestrian’s position to be in the center of the area (average position among all particles). The black and green walks thus start in empty space above the ground. After a few filter updates (see first seconds of the error plot) the estimation represents the pedestrian’s actual position within the building.

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ebner, F.; Fetzer, T.; Deinzer, F.; Grzegorzek, M.
On Wi-Fi Model Optimizations for Smartphone-Based Indoor Localization. *ISPRS Int. J. Geo-Inf.* **2017**, *6*, 233.
https://doi.org/10.3390/ijgi6080233

**AMA Style**

Ebner F, Fetzer T, Deinzer F, Grzegorzek M.
On Wi-Fi Model Optimizations for Smartphone-Based Indoor Localization. *ISPRS International Journal of Geo-Information*. 2017; 6(8):233.
https://doi.org/10.3390/ijgi6080233

**Chicago/Turabian Style**

Ebner, Frank, Toni Fetzer, Frank Deinzer, and Marcin Grzegorzek.
2017. "On Wi-Fi Model Optimizations for Smartphone-Based Indoor Localization" *ISPRS International Journal of Geo-Information* 6, no. 8: 233.
https://doi.org/10.3390/ijgi6080233