**1. Introduction**

The global positioning system (GPS) permits solving the positioning problem in a reliable manner. However, this approach is limited to outdoor environments, since GPS signals do not reach indoor receivers. A number of techniques are available for indoor positioning systems [1,2]. These techniques include the use of ultra-wideband signals [3–5], Wi-Fi signals [6–8], bluetooth signals [9,10], radio-frequency identification [11–13], odometry measurements [14], etc. However, the accuracy of positioning systems based on these techniques is severely affected by the multipath propagation of signals. Therefore, obtaining a high-precision and reliable indoor positioning method has become the main research problem in various location-based services.

A popular technique consists of using Wi-Fi signals for indoor positioning. The main reason for doing so is the widespread and low cost of these signals in comparison with other alternatives, e.g., Zigbee, Bluetooth, ultrasound, ultra-wideband, etc. There are two main approaches for indoor positioning using Wi-Fi signals, namely, geometric mapping and fingerprinting [6]. Geometric mapping is based on the estimation of geometric parameters, such as distance or angles with respect to certain

reference points [15,16]. The problem with this approach is, as we mentioned earlier, the irregularities in the signals caused by multipath effects. To go around this, the fingerprint approach builds a database of certain features obtained from the received Wi-Fi signals, depicting a unique pattern based on its location. The positioning problem then becomes one of finding the best match for the signal received at an unknown location from the information available within the database.

For an indoor positioning system, which kind of signal feature is selected as a fingerprint is critical, as it must faithfully represent its location. A popular choice for this feature is a vector of received signal strength indicators (RSSIs) from multiple Wi-Fi access points (APs) [17,18]. Then, the position is estimated as the one from the database with the highest similarity score with the fingerprint of the received signal. The disadvantage of this method is that each location is only matched to one within the database. To solve this, Youssef [19] estimates the position by building its conditional probability given the available measurements. A theoretical backing for this approach is given by the fact that RSSI measurements can be approximately considered normally distributed with negligible accuracy loss [20].

The advantages of using RSSI as fingerprints are its simplicity and low computational requirements. However, since the database only stores signal features at a finite number of points, the accuracy drops significantly at other points. This is because RSSI does not contain all the information available in the Wi-Fi signal, which could be used to improve the positioning accuracy. The whole available information appears in the channel state information (CSI). This is a complex vector whose entries represent the gain (amplitude and phase) of each subcarrier of the OFDM channel [6]. In [21], CSI was used to propose the fine-grained indoor localization (FILA) method. In this method, the fingerprint is chosen to be the square sum of CSI amplitudes. A popular choice of fingerprint consists of using the real vector formed by the amplitudes of each subcarrier [22–24]. However, the instability of CSI amplitudes limit the accuracy achievable with this kind of fingerprints. In an attempt to go around this, inter-subcarrier phase differences are used as fingerprints in [25]. A drawback of this approach is that CSI phases are highly sensitive to hardware imperfections. To cope with this, a phase calibration method was proposed in [26] to compensate for hardware effects.

Regardless of the choice of fingerprint, two approaches are available for estimating the position. The first one consists in dividing the area into regions, and using a classifier, based on machine learning techniques, to decide the region at which the receiver is located. In [27], this is done using a neural network, and in [28], a random forest model. A drawback of these methods is that the positioning accuracy is determined by the regions' size.

The second positioning approach aims at solving the above limitation by interpolating a position from those available within the fingerprint database. In [21], this is done using Pearson correlation coefficients between the measured fingerprints at the unknown location and the fingerprints from the database. In [26], this is done using a three-hidden-layer deep network, a deep autoencoder is used in [29,30], a deep convolutional neural networks in [31] and a k-nearest neighbor average in [25]. Nevertheless, a common problem with these methods is that their inaccuracy is still significant at locations outside the database.

For moving targets, the above positioning techniques are used for carrying out a Bayesian tracking task, which uses, at each sample time, all available measurements to provide a position estimate [32,33]. The case in which positioning is based on Wi-Fi signals, the information provided by these signals are often combined (fused) with certain extra information, such as infra-red motion sensors [34], inertial sensors [35], orientation sensors and landmarks [36].

In this work, a new fingerprint method for indoor positioning and Bayesian tracking is proposed, based on CSI. Following [26], we also calibrate phases. However, instead of using them as fingerprints, we use their differences with respect to the first subcarrier. We do so because these phase differences change more smoothly than absolute phases as we move along a straight line. This largely simplifies the task of interpolating fingerprints at locations outside the database. To do the interpolation, we construct a model of the room's fingerprints, i.e., a function mapping positions within the room to fingerprints. We do so using a Gaussian kernel expansion. Using this model, the positioning task is

split into two steps. In the first one, we obtain a preliminary estimate of the position using only the fingerprint measured by the receiver. To this end, we use the maximum likelihood criterion. In the second stage, we combine this preliminary estimation with a dynamic model of the receiver's motion, to obtain the final estimation. We do so using a Bayesian tracking technique. The most popular among these techniques are extended Kalman filtering and particle filtering. The advantage of the former is its computational efficiency. However, since it is based on linearizing a non-linear model, it is often inaccurate to the extent that it can lead to the instability of the estimate. Particle filtering, on the other hand, can be made arbitrarily accurate. However, its computational complexity makes it often unfeasible for real-time applications. In order to obtain a reliable and numerically efficient Bayesian tracking implementation, we use a recently proposed technique called maximum likelihood Kalman filtering [37]. It uses the maximum likelihood estimate obtained in the first step, guarantees the stability of the estimate and is asymptotically optimal as the dimension of the fingerprint vector tends to infinity [37]. To summarize, the contribution of our paper is to effectively combine the use of phase information, its calibration and phase differences for fingerprints, and to apply Gaussian kernel modeling and maximum likelihood Kalman filtering for positioning. The resulting algorithm is shown, via experiments, to have more accurate position estimates, in comparison with other available algorithms, at locations outside the database.

The rest of this paper is organized as follows. In Section 2 we describe how we build fingerprints. In Section 3 we formulate the positioning problem. The proposed localization method is introduced in Section 4. Experimental results are given in Section 5 and concluding remarks in Section 6.

### **2. Choice of Fingerprints**
