WiFi Based Fingerprinting Positioning Based on Seq2seq Model
Abstract
:1. Introduction
2. Related Work
2.1. Traditional WiFi Fingerprinting Methods
2.2. Deep Learning Based WiFi Fingerprinting Methods
- The authors of Reference [12] adopted a Stacked Denoising Auto-encoder (SDA) to model the relationship between the RSS fingerprints and the coordinates. The SDA can be adopted to pre-train the network without any need for labels, that is, the coordinate positions. The pre-training enables the network to be robust to the fluctuating noises in the RSS fingerprints. After pre-training, a few fingerprints with corresponding coordinate positions can be adopted to fine-tune the parameters in the network. This implementation enables semi-supervised training, where herein a lot of fingerprints are available while only a few has labels (coordinate positions).
- The authors in Reference [15] proposed adopting a variational auto-encoder to estimate the positions and the fingerprinting map at the same time. The advantage for using a Variational Auto-Encoder (VAE) in fact it contains a generation model, which can be adopted for generation of the RSS fingerprints after training. The results show that the usage of the VAE can improve the positioning accuracy compared with that of the method in Reference [23].
- Different from using a VAE and a SDA, the method in Reference [21] proposed using deep learning to learn the best metrics for WiFi fingerprinting. This method is also the framework of the traditional methods using kNN for positioning. However, through deep learning, some features between two RSS fingerprints are learned to be extracted, which is efficient for describing the vicinity in the coordinate space.
- Another type of methods relies on the RNN structure to model the positioning process. RNN is designed to enable finding data patterns in the time series. There are different RNN structures regarding to different input-output situations for WiFi fingerprinting. In Reference [24], as shown in Figure 2, a fixed length of positions and RSS sequences (f-RNN) are adopted as input, the sequences of positions are the output. The previous position estimation in time is adopted as the input to the next input. This network structure can enable the training process, however, for the positioning process, the initial position needs to be known prior to positioning. This renders the method not suitable in many cases.
2.3. Basics of the seq2seq Models
3. The Proposed Method
- WiFi based fingerprinting is also a sequence based problem with the sequence of the RSS fingerprints as the input and the sequence of the coordinate positions as the output.
- In WiFi fingerprinting, the context information from the sequence can improve the positioning accuracy. Information like human walking patterns and floor plan constraint can be extracted from the sequences (though in the form of black boxes), which are helpful for enhancing positioning performance.
- The attention mechanism naturally suits WiFi based fingerprinting because each measured RSS fingerprinting corresponds to a certain coordinate position.
- The sequence space is discrete for translation while continuous for WiFi based positioning. In translation, a sequence of words denotes a discrete path. However, in WiFi based positioning, the RSS fingerprints (input sequence) and the coordinate positions (output sequence) are continuous in signal space and position space respectively.
- The context information (contained in sequences) matters more in translation than in WiFi based positioning. In translation, a word may have multiple meanings until it is put in a sequence of words. However, for WiFi based positioning, a RSS fingerprint normally only corresponds to a single coordinate position. This doesn’t mean that context information in RSS fingerprint sequence is unimportant. In some cases, different coordinate positions can correspond to similar RSS fingerprints due to noises. With context information, single correspondences can be identified.
- The patterns of sequence in translation are more explicit than that of WiFi based positioning. In translation, word sequences have many explicit patterns, for example, nouns are normally followed by adjectives. Normally inserting or deleting words randomly in a sentence can violate the patterns in the sentences. However, a RSS fingerprint sequence can still be meaningful if collecting more fingerprints in between. For RSS fingerprint sequence, the patterns are more implicit but still follow some patterns. For example, the fierce change of adjacent RSS fingerprints normally corresponds to certain coordinate positions.
- The RSS measurements are highly noisy and the length of the vector is not unified. Some pre-processing for the RSS measurements are necessary.
- The seq2seq model normally needs a lot of sequence samples for training. Therefore, in our implementation, some techniques are adopted for increasing training samples, that is, creating more sequences.
- Some modifications are added to the original seq2seq model, mainly including the issues about transforming the network from classification network to regression network, the EoS token and so on.
3.1. Pre-Processing for the RSS Fingerprints
- The first step is to align RSS fingerprint vectors to the same length. Assuming that there are N collected fingerprints, and they can be represented from to respectively. In the collected fingerprints, to may have different length and each of the vector element may represent RSS values from different APs. From Equation (6), the union set of all RSS fingerprint is acquired. The function returns the set of MAC of the fingerprints. Then according to the set , a table is established, where each index in the table corresponds to a specific MAC from an AP. Then according to the table, we align all the fingerprints shown in Figure 6. If a specific MAC in the original RSS vector is missing, then we fill the corresponding index with the value . This value is assumed to be the noise level denoting that the signal from the AP is buried in noise. Herein the default value in our implementation is −110 dBm, which is also adopted in Reference [9]. After the processing, all the fingerprints now have the same length and can be adopted as the input to the neural network model.
- As mentioned, the original RSS values has large noise due to signal fluctuations, dynamic environments and so on. Therefore, a process for lowering the noise is needed. From the previous step, we know that the missing RSS values are set to . From the study in Reference [9], we know that the missing values also may due to the effect of noise. In the data collecting process, we know that fingerprints collected in recent times are also within nearby locations, resulting in similar RSS measurements. Based on that, here an iterative recursive weighted average filter is adopted. The descriptions of how and why the filter is needed is presented in detail in Reference [24].
- After the previous steps, we still need to tackle the heterogeneous distributions of the fingerprints as they can come from different devices. The problem that fingerprints from different devices have different distributions is noted as the device heterogeneity problem [26]. To render the collected distributions to be nearly equally distributed, a normalization process is added. We assume that the fingerprints vector coming from the same device can be still represented as to . Then the normalization process can be presented as:
3.2. Input Data Augumentation
- We add sliding windows to the trajectories to provide training sequences with different lengths. This process is shown in Figure 7, where it is assumed that the initial trajectory has a length of 5. The ids of the fingerprints can be represented as A, B, C, D, E respectively. In this example, we can have 5 training sequences with length 1, 4 training sequences with length 2, 3 sequences with length 3, 2 sequences with length 4 and 1sequence with length 5. The total number of sequences for the single collected trajectory can reach up to 15. If the fingerprints in a single trajectory is M, then from adding sliding window, the number of sequences can be adopted is:
- Another way to increase the number of training sequences is to inverse the original sequences. Also take the example from Figure 7, the inverted sequences are BA, CB, DC, ED, CBA, DCB, EDC, DCBA, EDCB and EDCBA. The number of sequences herein has increased by 10. In a more common situation with the number of fingerprints in a trajectory as M, the increased number of sequences due to inverting is:
- The number of sequences can be added through aggregating existing trajectories. This idea is inspired by the implementation in Reference [24], where single points are aggregated into sequences. Here we aggregate the sequences into new sequences. The idea is shown in Figure 8. We can see that in the figure, originally there are two trajectories with different colors of points showing the positions where the fingerprints are collected. In the circled area, some of the points from the trajectories are close. In this case, the two trajectories can be aggregated, producing another 4 new trajectories shown in black lines. Noting that the example presented in the figure is just an illustration. The aggregating process is presented in detail using the next 2 processes. Firstly, we calculate the distances between any two original trajectories. The distances denote any coordinate distance between one point in one trajectory and one point in the other trajectory. If a distance is under some distance threshold, then the two trajectories are referred to as potential trajectories to be aggregated. Then the points are referred to as critical points. We iterate this process to find out all the potential pairs of trajectories. Secondly, between any pair of potential trajectories, we take the critical points as shifting points from one trajectory to another and make new trajectories. If there are many critical points to shift, we shift the trajectories according to the following rule:Here, the denotes the probability of which point the trajectory is to shift, denotes the distances between the shifting points, is the variance of the distribution. The rule implies that the nearer two points are, the more possible the trajectory should be shifted. According to the rule, a group of the critical points can add multiple new trajectories. In our implementation, we only take at most 4 new trajectories out of two original ones. In this way, new trajectories are aggregated from existing trajectories. As part of our contributions, we also propose to use the new trajectories for creating training sequences by using the sliding window and inverting processes.
3.3. Network Implementation
- The output network for the prediction of positions is a regression structure other than the normal classification structure, thus no softmax function is applied to the output. From the network structure, we can see that there are no softmax functions in the decoder before the output. However, before the output, a function is needed to transform the output of the LSTM cells to a two-dimensional value representing the estimated coordinate positions. Noting that here, the coordinate positions should also be normalized as:
- The length of the input sequences and the output sequences are the same in any situations, thus no EoS tokens are needed in our implementation. This makes the network easier to train than the normal seq2seq model.
- As both the input (pre-processed RSS fingerprints) and the output (the normalized coordinate positions) can present the corresponding metrics in their own forms, so no processes like word embedding are needed. However, in the encoder, before the normalized RSS fingerprint is input to the LSTM cells, a function or a small CNN network is added, which can downsize the dimension to input to the LSTM and makes our model easier to train. Noting that here the sub network shares the same weights for different RNN epochs in the encoder. This is the same for the sub network in the decoder.
4. Experiments
4.1. Experimental Setup
4.2. Accuracy of the Proposed Method
- Adopting an iterative recursive weighted average filter to process the collected RSS to lower the noise, especially the fluctuations. This is a standard process for a wide range of WiFi positioning methods.
- Adding the attention mechanism to the model to help identify the correspondences between the current RSS fingerprint and the current geometric positions.
- Enhancing the dataset by cutting, inverting and aggregating the trajectories. This can render the neural network be trained with more sufficient data.
- Strategy A: Adopting trajectory cutting, inverting and aggregating.
- Strategy B: Adopting only trajectory aggregating to generate new trajectories.
- Strategy C: Adopting only trajectory cutting (i.e., adopting a sliding window to vary the length of the trajectory described in the method section) and trajectory inverting.
4.3. Accuracy Compared with Other Methods
- The classical PLGD method. This method is proposed in Reference [27], which adopts the structure of hierarchical positioning. The fingerprints are clustered as several sub-regions. In the positioning procedure, the potential regions are firstly narrowed to several sub-regions coarse positioning and then comes the fine positioning. This method have adopted several techniques such as PLGD metric, hierarchical positioning to increase accuracy, thus can be considered representative of the classical method without deep learning.
- The SDA method proposed in Reference [12]. The method adopts a SDA to cope with the fluctuating nature of the RSS fingerprints.
- The f-RNN based method proposed in Reference [24]. The method also relies on a RNN network, however the length of the RNN is fixed.
5. Conclusions and Future Work
- The proposed processes in our method, including pre-filtering of RSS measurements, attention mechanism and dataset enhancement can effectively increase the positioning accuracy. Particularly, the dataset enhancement strategy process, makes the network converge faster.
- Compared with other methods, including the classical PLGD method (no deep learning), SDA method and f-RNN methods (with deep learning), our method can sufficiently learn from the context information in the sequences and has an positioning accuracy increment of 1.32 m, 1.27 m and 0.79 m in Building One; 0.60 m, 0.51 m and 0.25 m in Building Two respectively.
- Studying the detailed effects of more hyperparameters. For example, the window length for positioning. We will be able to dig into this matter when we have collected new dataset where we can further change window length.
- Adjusting our proposed approach to be executed on an actual mobile device to test its performance, particularly the positioning latency.
Author Contributions
Funding
Conflicts of Interest
References
- Ma, M.; Song, Q.; Gu, Y.; Li, Y.; Zhou, Z. An Adaptive Zero Velocity Detection Algorithm Based on Multi-Sensor Fusion for a Pedestrian Navigation System. Sensors 2018, 18, 3261. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Nilsson, J.O.; Gupta, A.K.; Handel, P. Foot-mounted Inertial Navigation Made Easy. In Proceedings of the IPIN 2014—2014 International Conference on Indoor Positioning and Indoor Navigation, Busan, Korea, 27–30 October 2014; pp. 24–29. [Google Scholar] [CrossRef]
- Abadi, M.J.; Luceri, L.; Hassan, M.; Chou, C.T.; Nicoli, M. A Collaborative Approach to Heading Estimation for Smartphone-based PDR Indoor Localisation. In Proceedings of the 2014 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Busan, Korea, 27–30 October 2014; pp. 554–563. [Google Scholar] [CrossRef]
- Priyantha, N.B.; Chakraborty, A.; Balakrishnan, H. The Cricket Location-support System. In Proceedings of the 6th Annual International Conference on Mobile Computing and Networking, Boston, MA USA, 6–11 August 2000; ACM: New York, NY, USA, 2000; pp. 32–43. [Google Scholar] [CrossRef]
- Ho, C.C.; Lee, R. Real-Time Indoor Positioning System Based on RFID Heron-Bilateration Location Estimation and IMU Inertial-Navigation Location Estimation. In Proceedings of the 2015 IEEE 39th Annual Computer Software and Applications Conference, Taichung, Taiwan, 1–5 July 2015; Volume 3, pp. 481–486. [Google Scholar] [CrossRef]
- Ruiz, A.R.J.; Granja, F.S. Comparing Ubisense, BeSpoon, and DecaWave UWB Location Systems: Indoor Performance Analysis. IEEE Trans. Instrum. Meas. 2017, 66, 2106–2117. [Google Scholar] [CrossRef]
- Want, R.; Hopper, A.; Falcão, V.; Gibbons, J. The Active Badge Location System. ACM Trans. Inf. Syst. 1992, 10, 91–102. [Google Scholar] [CrossRef]
- Khalajmehrabadi, A.; Gatsis, N.; Akopian, D. Modern WLAN Fingerprinting Indoor Positioning Methods and Deployment Challenges. IEEE Commun. Surv. Tutor. 2017, 19, 1974–2002. [Google Scholar] [CrossRef] [Green Version]
- Gu, Y.; Zhou, C.; Wieser, A.; Zhou, Z. Trajectory estimation and crowdsourced radio map establishment from foot-mounted IMUs, Wifi fingerprints and GPS positions. IEEE Sens. J. 2018, 1. [Google Scholar] [CrossRef]
- Khan, M.I.; Syrjarinne, J. Investigating Effective Methods for Integration of Building’s map with Low Cost inertial Sensors and Wifi-based Positioning. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation, Montbeliard-Belfort, France, 28–31 October 2013; pp. 1–8. [Google Scholar] [CrossRef]
- Mirowski, P.; Ho, T.K.; Yi, S.; MacDonald, M. SignalSLAM: Simultaneous Localization and Mapping with Mixed WiFi, Bluetooth, LTE and Magnetic Signals. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation, Montbeliard-Belfort, France, 28–31 October 2013; pp. 1–10. [Google Scholar] [CrossRef]
- Zhang, W.; Liu, K.; Zhang, W.; Zhang, Y.; Gu, J. Deep Neural Networks for Wireless Localization in Indoor and Outdoor Environments. Neurocomput 2016, 194, 279–287. [Google Scholar] [CrossRef]
- Lukito, Y.; Chrismanto, A.R. Recurrent Neural Networks Model for WiFi-based Indoor Positioning System. In Proceedings of the 2017 International Conference on Smart Cities, Automation Intelligent Computing Systems (ICON-SONICS), Yogyakarta, Indonesia, 8–10 November 2017; pp. 121–125. [Google Scholar]
- Hsieh, H.; Prakosa, S.W.; Leu, J. Towards the Implementation of Recurrent Neural Network Schemes for WiFi Fingerprint-Based Indoor Positioning. In Proceedings of the 2018 IEEE 88th Vehicular Technology Conference (VTC-Fall), Chicago, IL, USA, 27–30 August 2018; pp. 1–5. [Google Scholar]
- Zhou, C.; Gu, Y. Joint Positioning and Radio Map Generation based on Stochastic Variational Bayesian Inference for FWIPS. In Proceedings of the 2017 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sapporo, Japan, 18–21 September 2017; pp. 1–10. [Google Scholar] [CrossRef] [Green Version]
- Sutskever, I.; Vinyals, O.; Le, Q.V. Sequence to Sequence Learning with Neural Networks. In Proceedings of the 27th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 8–13 December 2014; MIT Press: Cambridge, MA, USA, 2014; Volume 2, pp. 3104–3112. [Google Scholar]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv 2014, arXiv:1409.0473/cs.CL. [Google Scholar]
- Bahl, P.; Padmanabhan, V.N. RADAR: An In-building RF-based User Location and Tracking System. In Proceedings of the IEEE INFOCOM 2000, Conference on Computer Communications, Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies (Cat. No.00CH37064), Tel Aviv, Israel, 26–30 March 2000; Volume 2, pp. 775–784. [Google Scholar] [CrossRef]
- Tao, X.; Li, X.; Ma, J.; Lu, J. Cluster Filtered KNN: A WLAN-based Indoor Positioning Scheme. In Proceedings of the 2008 International Symposium on a World of Wireless, Mobile and Multimedia Networks(WOWMOM), Newport Beach, CA, USA, 23–26 June 2008; pp. 1–8. [Google Scholar] [CrossRef]
- Minaev, G.; Visa, A.; Piché, R. Comprehensive Survey of Similarity Measures for Ranked based Location Fingerprinting Algorithm. In Proceedings of the 2017 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sapporo, Japan, 18–21 September 2017; pp. 1–4. [Google Scholar] [CrossRef]
- Dong, B.; Burgess, T.; Neuner, H.; Fercher, S. Neural Network Based Radio Fingerprint Similarity Measure. In Proceedings of the 2018 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 September 2018; pp. 1–8. [Google Scholar]
- Chidlovskii, B.; Antsfeld, L. Semi-supervised Variational Autoencoder for WiFi Indoor Localization. In Proceedings of the 2019 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Pisa, Italy, 30 September–3 October 2019; pp. 1–8. [Google Scholar]
- Feng, C.; Au, W.S.A.; Valaee, S.; Tan, Z. Received-Signal-Strength-Based Indoor Positioning Using Compressive Sensing. IEEE Trans. Mob. Comput. 2012, 11, 1983–1993. [Google Scholar] [CrossRef]
- Hoang, M.T.; Yuen, B.; Dong, X.; Lu, T.; Westendorp, R.; Reddy, K. Recurrent Neural Networks for Accurate RSSI Indoor Localization. IEEE Internet Things J. 2019, 6, 10639–10651. [Google Scholar] [CrossRef] [Green Version]
- Levy, O.; Goldberg, Y. Neural Word Embedding as Implicit Matrix Factorization. In Proceedings of the 27th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 8–13 December 2014; MIT Press: Cambridge, MA, USA, 2014; Volume 2, pp. 2177–2185. [Google Scholar]
- Davies, K.F.; Jones, I.G.; Shapiro, J.L. A Bayesian Approach to Dealing with Device Heterogeneity in an Indoor Positioning System. In Proceedings of the 2018 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 September 2018; pp. 1–8. [Google Scholar]
- Cramariuc, A.; Huttunen, H.; Lohan, E.S. Clustering Benefits in Mobile-centric WiFi Positioning in Multi-floor Buildings. In Proceedings of the 2016 International Conference on Localization and GNSS (ICL-GNSS), Barcelona, Spain, 28–30 June 2016; pp. 1–6. [Google Scholar] [CrossRef]
Accuracy Improvement | In Building One (m) | In Building Two (m) |
---|---|---|
adopting filtered RSS | 1.75 | 1.01 |
adopting attention mechanism | 2.01 | 1.13 |
dataset enhancement (Strategy A vs. B) | 1.50 | 0.75 |
dataset enhancement (Strategy A vs. C) | 2.36 | 1.06 |
Average Error | In Building One (m) | In Building Two (m) |
---|---|---|
Our method | 5.50 | 3.08 |
Classical PLGD method | 6.82 (1.32 higher) | 3.68 (0.60 higher) |
SDA method | 6.77 (1.27 higher) | 3.59 (0.51 higher) |
f-RNN method | 6.31 (0.79 higher) | 3.33 (0.25 higher) |
© 2020 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
Sun, H.; Zhu, X.; Liu, Y.; Liu, W. WiFi Based Fingerprinting Positioning Based on Seq2seq Model. Sensors 2020, 20, 3767. https://doi.org/10.3390/s20133767
Sun H, Zhu X, Liu Y, Liu W. WiFi Based Fingerprinting Positioning Based on Seq2seq Model. Sensors. 2020; 20(13):3767. https://doi.org/10.3390/s20133767
Chicago/Turabian StyleSun, Haotai, Xiaodong Zhu, Yuanning Liu, and Wentao Liu. 2020. "WiFi Based Fingerprinting Positioning Based on Seq2seq Model" Sensors 20, no. 13: 3767. https://doi.org/10.3390/s20133767