Abstract
The received signal strength–based fingerprinting navigation system is able to provide location information with accuracies in the meter region under the assistance of inertial measuring units. However, the computational complexity in mobile terminal of this cooperation method is great for real-time position. The inertial measuring unit has the drawback of error drift, and not all the device has a self-contained unit. In order to obtain high-accurate and continuous navigation information for indoor general devices in small computations, a novel combination of fusing extended Kalman filter and fingerprinting navigation algorithm, including K-nearest neighbor and Pearson correlation coefficient, is proposed in this article. A prototype of the improved system has been worked in a real scenario. A laptop on a four-wheel handcart is moving at a constant speed in a building storey, and the measurement localization is acquired by fingerprinting algorithm during online phase. Meanwhile, the modification localization is produced by extended Kalman filter when the target is moving in the floor. Finally, compared to K-nearest neighbor, Pearson correlation coefficient, and a combination of both, the final modification localization value is more accurate. The results show that the mean error is 53.2%, 51%, and 25.8% lower than the other three methods.
Keywords
Introduction
Accompanied by increasing requirement, indoor navigation system has quickly expended in the last few years. However, no universal solution has been found considering the problems of robustness, accuracy, and specific requirements in existing indoor localization and tracking methods; therefore, indoor localization and tracking are still an active research topic. There are several potential technologies available to provide indoor positioning solutions such as global positioning system (GPS), wireless fidelity (Wi-Fi), and inertial measuring unit (IMU)-based relative navigation. Real-time localization systems may also utilize non-radio parameters to improve accuracy and instantaneity, such as prior knowledge of environment constraints or inertial measurements. 1 Although GPS is generally used outdoors, its localization accuracy weakens in indoor environments.2–4 In last several years, Wi-Fi 5 and Bluetooth 6 techniques have been proposed in indoor localization. Compared to Bluetooth, Wi-Fi infrastructures are more widely deployed in indoor environments such as supermarkets, airports, shopping malls, and office building.
Furthermore, most of the current off-the-shelf smart equipments, such as smartphone, laptop, and Ipad, are integrated with Wi-Fi modules which make it possible for location based on Wi-Fi signal strengths in indoor environment. 7 The most well-known indoor positioning system based on Wi-Fi signal technique is able to be pigeonholed into two main types. First, Wi-Fi triangulation method based on propagation that uses geometric properties of triangles to estimate the user location. It can be divided into two sub-categories. There are least squares and angulation to measuring distance from multiple Wi-Fi access points (APs) with mobile devices. In case of least-squares techniques, time of arrival (TOA) and round-trip time of flight (RTOF) are used to estimate user’s positions. 8 The other angulation of arrival (AOA) technique located user positions by measuring angles relative to multiple Wi-Fi APs. 9 Second, Wi-Fi fingerprinting method uses information of survey received signal strength (RSS) values.10,11
The method of fingerprint typically utilizes RSS value to achieve positioning. 12 Other radio parameters can be also used or combined, such as TOA, AOA, and power delay profile (PDP). Fingerprinting-based positioning is divided into two steps: offline phase and online phase. During the offline phase, a set of RSS values is collected from various APs around different reference points (RPs) to form a database or a radio map. This database, called fingerprint map, may be calibrated before being utilized for the estimation of the user location during the online phase. 13 Throughout the entire process, it depends on sample location coordinates to generate fingerprint map for training databases, by matching algorithms such as K-nearest neighbor (KNN) and support vector machine (SVM), 14 to estimate user positions by calculating Euclidean distance between the fingerprint database system and the real-time RSS values from a mobile device.
The localization accuracy is different using different methods even in the same indoor environment, which has been proved by Joaquín et al. 15 It is an indisputable fact that Wi-Fi fingerprint method can reach accuracies in the meter range under the assistance of certain technology and algorithm, for example, the mean localization accuracy is 1.39 m in Chen et al. 4 However, it is difficult to build the database during offline phase which is a tedious and time-consuming process. These techniques require a huge amount of RPs for the trained model to be accurate. Also, there is a limit on the accuracy of Wi-Fi RSS localization that is defined by the measurements used in online phase, no matter how accurate is the fingerprint data. This problem seriously affects the application of indoor localization systems. In order to reduce the cost, several approaches including semi-supervised learning 16 and label propagation, 17 have been proposed. However, these approaches only attempt to reduce the number of RPs during the offline phase. The location accuracy declines involuntarily as the amount of RPs decreases. It is necessary to propose a novel indoor navigation algorithm to improve the accuracy under the condition of sparse RPs. Under this restriction, we propose an indoor tracking model based on Wi-Fi fingerprint method utilizing extended Kalman filter (EKF). The EKF has proved to be an enabling technology for many applications of this tracking model, 18 in particular when the observations are complicated nonlinear functions of the position and heading. It just uses EKF alone to achieve an average localization error of 4.7 m in Ali-Loytty et al. 19 and 3.528 m in Yim et al. 20 Not only the EKF but also we combine KNN and Pearson correlation coefficient (PCC) into KNN-PCC to achieve a more accurate fingerprint localization value. Figure 1 shows the block diagram of the proposed method. To evaluate the tracking effectiveness of our method based on general device without IMUs, we establish a fingerprint database and implement the localization of moving target (MT) in the real indoor environments.

Block diagram of proposed tracking model.
Related algorithm
KNN algorithm
In fingerprint-based localization, RSS values are stored in a radio-map database and the position of a target device is estimated by calculating Euclidean distance between the fingerprint database system and the real-time RSS values. As mentioned earlier, there are two phases in fingerprinting algorithms: an offline learning phase and an online operating phase. In the offline phase, the radio-map database is created. The localization area is divided into small cells, and each cell is represented by an RP.
21
RSS values of the radio signals transmitted by APs are collected in RPs inside the cells for a certain period of time and stored into the radio map. The
where N is the number of APs heard at the RP;
In the online estimation phase, to locate an MT at a given time and a given place, the localization system measures the RSS value of all APs. In our testing area, all APs can be heard at MT’s trajectory and the radio map of MT has the same form as offline phase
where RSS value vector
When the Euclidean distance equation is calculated in every RP of the radio map (including label, coordinate, and RSS values), vector D is suggested between all radio-map vectors
The RP vectors with the smallest distance values in D define the K neighbors closest to M. Its position recorded within the radio map and location coordinates is considered as the estimated MT position. There are K RPs in row vector D as its element and the coordinate of every RP is
where
PCC algorithm
In fact, the absolute RSS values of a set of APs in the covering area might be quite different when measured by different Wi-Fi measurement devices or at different time. Hence, the traditional KNN incorrectly classifies many samples due to ignoring the manifold information. To mitigate these effects, the relative RSS values are used to replace the absolute ones for location determinations.24–26 This means that the ranking of the RSS values is more likely to remain the same or more similar. This is based on the precondition that the RSS values monotonically decrease when the distance between APs and MT increases. 27 To evaluate the correlation among different rankings of the same set of APs, the PCC is utilized which is a nonparametric measure of statistical dependence between two variables. General linear correlation of X and Y is
where
Because covariance has the characteristic that it could get the maximum value and equal to the product of two standard deviations when two variables have linear correlations, PCC is standardized and non-dimensionalized based on correlation, and it can be given by the following expression
where
Fingerprint indoor localization based on combination of KNN and PCC
By exploiting the PCC of RSS measurements from different APs, we proposed an improved KNN-PCC location method. As models of RPs and MT mentioned above in equations (1) and (2), we can obtain the PCC expression
where
After acquiring all the
In KNN-PCC location method, we combine localization areas of both and adopt intersection as the final estimation position of MT. The KNN-PCC algorithm is shown briefly in Figure 2.

KNN-PCC localization algorithm: (A) localization area using KNN, (B) localization area using PCC, and (C) the final localization area.
In a mathematical expression, it is calculated by
where
Improved algorithm utilizing EKF
After obtaining the localization result via KNN-PCC, EKF is utilized to update the measurement localization of MT. Under the well-known initial target state and localization, EKF may produce an accurate estimate. The EKF was used in tracking and robotics extensively28,29 and has become a benefit tool for tracking, moving vehicular navigation, localization, and self-localization. Its fast recursive algorithm requires small memory. Thus, we combine the EKF and KNN-PCC to achieve low-cost and real-time localization.
In our test model, MT is traveling on an indoor floor space with six APs in a view. Suppose that the distance measurement equations are given as
where i indexes the APs and k indexes the measurement time instants. MT moves at a uniform speed (v) in a straight line and its localization is s(k) at moment k. In that way, the position of MT would be s(k + 1) = s(k) + vT after sampling time T. It is obvious that the system dynamic model includes position and velocity along x and y coordinates, respectively, in rectangular coordinate system. Then, the whole system model, called the process equation, becomes
where
then the state equation of system is given as
where the matrices
Also, define the observation vector at time instant k as
Then, the measurement model becomes
where
where
Unlike the system state equation given by equation (15), the observation equation given by equation (19) is nonlinear with respect to the state vector. As a result, the linear Kalman filter (LKF) cannot be applied directly. To cope with the nonlinear relation, linearization can be employed. Using Taylor’s expansion, equation (19) can be approximated as
where
After linearization, EKF has accomplished a half. Another half process is very similar to LKF. The initial position
There is a previous estimation result
where
where
The error covariance matrix is updated by
It is seen that the EKF is updated recursively from equations (23)–(27) with

EKF algorithm.
The performance of EKF in indoor navigation is evaluated through MATLAB simulations. To model position and range measurement, the precise distance between each AP and MT is mixed with an additive zero-mean Gaussian noise. We consider a 2D indoor environment area, and the MT moves in the 2D area according to the model in equation (15). The simulation area is set as a 1.4 m × 12 m rectangle. The initial position of MT is (0, 0), where the unit is in meters. The horizontal velocity of MT is 0.02 m/s, and the vertical velocity is 0.2 m/s. However, the assumption of MT’s relatively low speed is just only to evaluate the effect of EKF in navigation. The model is sampled every second, and the whole period is 60 s. The measurement noise variance is set as 5, which is known beforehand.
The true trajectory and observation EKF trajectory of the MT are shown in Figure 4. The observation EKF trajectory has a slight oscillation along with the true trajectory and two trajectories are almost coincident. It illustrates that the influence of measurement noise is little. From Figure 5, we can see that the distance error of observation is almost only 0.067 m.

True trajectory and EKF trajectory.

EKF trajectory error.
Hence, EKF algorithm can accurately track the true trajectory.
Experiments and results
Making of fingerprinting database
The Wi-Fi fingerprint technique requires a fingerprinting database by a combination of geographical coordinates in our mentioned system which uses 2D Cartesian space (x, y) and RSS values received by six Wi-Fi APs. We performed our experiments in the fourth floor of the School of Electronics and Information in Northwestern Polytechnical University (NWPU). This area is approximately 57.6 × 32.5 m2 covering corridors, patios, and rooms. Six commercial APs cover the test area and distribute in the corridors, their coordinates are shown in Table 1, and the working frequency is 2.4 GHz. RPs are collected in corridors and room 18 as shown in Figure 6.
Coordinates of APs.
AP: access point.

Distribution of APs and RPs.
The localization of the MT is achieved in three steps: (1) local collection of the RSS fingerprint values, (2) construction of the global RSS fingerprint radio map, and (3) the localization process. In our proposed method, we chose 74 points as RPs. Every RP includes label, coordinate, and RSS values. We collected realistic Wi-Fi RSS values using a ThunderRobot G150T laptop with wireless card which supports 802.11b/g/n protocol. The laptop runs on Windows 10 system, and Acrylic Wi-Fi Home V3.0 network software is used to capture and calculate RSS values from APs. The fingerprint radio map is constructed by a global RSS fingerprint value map based on the individual fingerprints uploaded by the laptop. In daily life, however, accurate tracking of movement is hard to achieve since the moving device orientation, as well as its relative position on the body, frequently changes as the mobile user moves around. Hence, the proposed system only performs ideal fluent-tracking and RSS fingerprint collection while the device is stationary in a certain horizontal level position. To do that, the laptop is placed on a four-wheel handcart.
We collected Wi-Fi RSS value on weekdays and at four different user orientations, including east, south, west, and north. At each orientation, RSS values are collected for 30 times and the average value of 120 times is taken as the final RSS value. Since the changing direction of antennas and orientation of users may influence the RSS values, this measuring can collect more different RSS patterns for a fixed location. In this way, the final signal strength map is shown in Table 2. It will rely on propagation-based positioning system techniques. We make a threshold value of −90 dBm for indoor localization, whereas RSS values lower than −90 dBm were not eligible for indoor localization, and the detection limit of Acrylic Wi-Fi Home V3.0 network software is also −90 dBm. This study defines the positioning error as the Euclidean distance between the estimated result and the true coordinates. For an intuitive observation, we built the database in MATLAB using RSS values (see Figure 7).
Training data in experiment area.
RP: reference point; RSS: received signal strength; AP: access point.

Fingerprinting database.
Measurement value of MT localization
Experimental measurements in the online phase were done with the same laptop ThunderRobot and same software Acrylic Wi-Fi Home V3.0. The true track of MT in online phase is shown in Figure 8(a) as a blue line. Its measurement localization is very important in every localization point. We adopt KNN-PCC method, as mentioned above, to decide the measurement localization. With the localization in room 18, for example, we first fix on the MT localization via KNN (K = 5) method and it is an area surrounded by several RPs as shown in Figure 8(b). There are five RPs including the one in the localization area. Then, we use PCC method to ascertain another probability area as shown in Figure 8(c). The final localization areas are confirmed via equation (11), and it is shown in Figure 8(d).

Target moving trajectory in testing floor and localization areas using three methods: (a) moving trajectory, (b) localization area via KNN method, (c) localization area via PCC method, and (d) localization area via KNN-PCC method.
When we acquire the localization area via KNN-PCC, the corresponding RPs are surrounded by the area. Trilateration is used to confirm the final absolute position of MT in the coordinate. The distance between MT and the AP can be calculated as follows 30
where

Intersection of trilateration method.
Results
MT is the four-wheel handcart same as prior, equipped by ThunderRobot laptop at a certain speed of 1 m/s and the trajectory is as shown in Figure 8(a). The proposed localization method is performed once every 2 s. The whole length of the trajectory is about 121 m; hence, there are 60 localization points. And at each point, we make the localization measurement once. The true localization point is shown as blue square in Figure 10. The KNN-PCC data were processed with EKF, and the results were compared to some common position fingerprinting methods, which include KNN, PCC, and KNN-PCC without EKF. In Figure 10, the results were continuous and shown by lines; the marks illustrate the results, while the lines indicate their methods. The walking direction is the true track.

Localization trajectory using different methods: (a) KNN, (b) PCC, (c) KNN-PCC, and (d) KNN-PCC with EKF.
From results shown in Figure 11, it can be seen that error of proposed KNN-PCC with EKF algorithm outperforms commonly used KNN, PCC, and KNN-PCC algorithms. From these results, it is clear that proposed algorithm achieved best results, robustness, and feasibility in all cases and provides the most stable positioning information.

Localization error.
To present the accuracy of these different RSS-based fingerprinting approaches, the error distance is calculated. Mean error (
where 60 is the number of localization points and
Mean error with different localization methods.
KNN: K-nearest neighbor; PCC: Pearson correlation coefficient; EKF: extended Kalman filter.
Conclusion
This article introduces a new algorithm for indoor localization, KNN-PCC with EKF, on the basis of a Wi-Fi fingerprinting (RSS value) environment. The algorithm includes a more accurate positioning method KNN-PCC compared to the standard KNN or PCC algorithm. After achieving the measurement localization information via KNN-PCC, EKF is used to evaluate the real position of MT to perform the indoor navigation. The mean error in every measurement point is 0.72 m and this result is less than other methods.
In future, more experimental tests will be done, and the impact of AP placement, the number of APs, and an impact of moving people on navigation accuracy will be investigated. The impact of density of RPs used in offline phase of algorithm to accuracy of proposed algorithm will be another part of future research.
Footnotes
Academic Editor: Paolo Barsocchi
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Natural Science Foundation of China under grant no. 61401360, the Fundamental Research Funds for the Central Universities under grant no. 3102014JCQ01055, and the Natural Science Basis Research Plan in Shaanxi Province of China under grant no. 2014JQ2-6033.
