Software Simulation for Optimization k-NN Based Indoor Localisation Technique Using Spearman's Rank Correlation Coefficient

The reuse of existing Wireless Fidelity (Wi-Fi) setup for indoor localization using Wi-Fi Received Signal Strength Indicator (RSSI) is nowadays an active research domain. Over the period these Wi-Fi setups show degradation in performance owing to signal attenuation caused by multipath, along with environmental changes adversely affecting the functional efficiency. To optimize the indoor localization precision in the presence of the issues as mentioned earlier, I propose Spearman's Rank based Correlation Coefficient approach which finds the minimum distances and provides these distances to the original K-Nearest-Neighbor (k-NN) classifier which uses Euclidean distance. After the complete indoor Wi-Fi environment is simulated in Matrix Laboratory (Mat-lab) tool, the results so obtained are promising and on the higher side as compare to the original k-NN classifier performance. In case of distribution of cumulative errors the proposed method achieved low amount of localized errors of 2.7m for 80% tested samples. And as for shadow fading increase in value of σ improves the effect of the proposed method significantly.


Introduction
There is a widespread need for Location-Based Services (LBSs) due to an exponential growth of wireless technology and mobile based computing. The current decade is witnessing large scale deployment of Wireless Fidelity (Wi-Fi) infrastructures in hotels, airports, educational institutes, and supermarkets, etc. Furthermore, portable Wi-Fi modules are commonly available either standalone or integrated into smart devices making it possible for localisation of signal strengths of Wi-Fi in the indoor scenario. Global Positioning System (GPS), and similar other Global Navigation Satellite Systems (GNSS) based technologies can be used for outdoor localisation. But the GNSS system doesn't efficiently perform for indoor localisations, therefore, making it necessary to find other means of indoor localisation like Received Signal Strength Indicator (RSSI). However, even the RSSI approach also faces challenges owing to three major causes. First and foremost cause is the difficulty is acquiring correct RSSI values since the variance of RSSI values obtained from a stationary receiver goes up to more than 4dB within 60 seconds. The second cause is RSSI multipath and Nonline-Of-Sight (NLOS) effect in indoors due to ceiling, walls, floor, people, and furniture. And thirdly, the variations in devices by different manufacturers also affect the accuracy of measurement.
There are two approaches for localization methods that are based on RSSI -localization methods based on ranging and localization methods based on Received Signal Strength (RSS) fingerprint. Fingerprint based technique uses the model proposed by p. Bhal [1] and Y. Xu [2], which converts values obtained from RSSI to distances. These distances are used to perform localization based on lateration methods. RSSI based technique is a two-step procedure i.e. training and locating, though the training procedure is efforts intensive, timeconsuming and susceptible to changing environment. Indoor localization of more than 10,000 locations around the world can be obtained, owing to the advent of Google maps.
As per reports, various WiFi devices exhibit difference and unstability in terms the absolute RSSI values. For minimization of such outcomes, for identification of location, relative values of RSSI with a ranking are used in place of absolute values [3, 4 and 5] It apparently implies that through various Wi-Fi terminals, the obtained absolute values of RSSI from a group of Access Points of the included region might vary but they are expected to be more or less similar in a selected region.
Since the RSSI values decreases monotonically as the distance between Access Points (Aps) and source increases [6] therefore to determine the resemblance between various rankings of the same APs, a nonparametric statistical measure called Spearman rank correlation coefficient is used [7]. It uses monotonic function to describe the relationship between two variables; these variables can be continuous, discrete or even ordinals. Hence, a Spearman rank coefficient of correlation is proposed here for the determination of resemblance identification of the all gradings within the same set of APs. Lateration procedure based on RSS and KNN method respectively has been implemented for differentiation [8,9]. A simulated real indoor environment in Mat-Lab software that employs segregated regions from attenuation factor propagation model [7] has been used for testing the proposed technique.

Proposed Methodology
For achieving optimum version of Spearman-distance-based K-NN [10] location technique, Spearman rank coefficient of correlation of RSSI measurements from varying APs is proposed in this article. The complete procedure for the proposed approach for localization procedure can be seen in Fig. (1). It is a three step procedure. At the outset, fingerprint database of the offline RSSI is created, followed by collection of the positional fingerprints of

Method
The correlation between target fingerprint T and the reference fingerprint R ij can be obtained from Spearman rank correlation coefficient [11]. Though, similar amounts of APs In the next step the Spearman distance d i,j is given as

Simulation
The

Results and Discussions
One can conviniently assess the change in the number of neighbour points that are closest to each other by chosing various values from the range of 2 to 5. The mean of location errors (ALE) of the Polynomial Regression-based method (PR method), the KNN method, and the Proposed method is given in Fig. (3). The fact that the value of ALE for the PR method is independent from the value of Neighbor Points (NP) as NP remains unaffected, is quite evident Fig. (3) depicts the curve corresponding to the KNN method showcasing a steady decline in Average Location Errors (ALE) as observed in afore rising which reaches the lowest point when NP has a value 4. However, ALE exhibits a slow and steady fall, ranging from 3.5m to just below 3.2 m at the time NP increases to 5 from the low point 2 in case of the proposed method, NP is stationed at value 4 in subsequent subsections for sound and a reasonable comparative analysis. For a 1000 times, the same quantifications are obtained in the range 4dB-8dB to understand the effect of shadow fading factor. The alterations in ALE corresponding to the variations in the shadow fading factor within the above given scope can be seen in Fig. (4).
The simulation has also been performed on the native KNN techniquw and the polynomialregression-based method (PR Method) [2] for comparative purposes. It is apparent that there is significant increase in positioning error for the native KNN technique as the shadow fading factor grows. It is obvious to get such outstanding outcomes since a big shadow fading leads to formation of position fingerprint that is more unreliable and which consequently increases the effect of location error to a particular limit. In contrast, there is no vital effect on the rest of the two methods by the value of shadow fading. There is a homogenuous performance in terms of localization for the native KNN method and the PR technique when value of is small and that is not superior to the proposed technique. In comparison with the other two methods, with the increase in the value of , the efficacy of our proposed method rises considerably, which thereby is indicative of the superiority of the proposed method in aweful indoor locations.

Fig. (4): Comparing ALE of three different location methods
For errors that are localized, the Cumulative distribution function(CDF) available in indoor environment that is simulated, when the shadow fading factor is 5dB and 7dB can be seen  Fig. (6) respectively. For 80% testing samples, it can be seen that the error that are localized, amount to less than 2.7% and this is quite less as compared to the one obtained for KNN technique which is 4.5m and the PR technique which is 4.9m. This can be seen in Fig. (5). For 80% of testing samples, the errors that are localized amount to 4.6m in a situation when shadow fading factor is increased to 7dB starting from 5dB. The native KNN technique could not perform this better when the errors due to localization were 8.2m and those due to PR technique were 5.8m. From the above observations, it can be deduced that the proposed scheme showcases superiority in the indoor regions when there is unstability in RSSI values along with changes of temporal nature. This is due to the fact that the proposed scheme considers the RSSI gradings which are useful for obtaining precision in location of fingerprints.

Conclusion
This work introduces a novel indoor location system based on Spearman-distance relying on the fingerprint of RSSI values previously provide by the APs. From the training procedure, a radio map is formed using the values of RSSI, which are called as "Fingerprints." The spearman rank correlation coefficient is computed after acquisition of the position fingerprint which is unidentified. In the later step, the native KNN method is integrated along with the spearman distance based on the spearman rank coefficient of correlation. The outcome of the experimentation indicates that the proposed technique of using eanking of spearman corelation coiffients in comparison with the other two techniques i.e. PR method and KNN is capable of attaining superior performance.
Performing received signal strength (RSS) based indoor localization is particularly challenging but using the ranking of Spearman's coefficient to improve the performance of k-NN classifier was attempted in this article and successfully tested. This implementation can be directly used in indoor localization of Wi-fi routers to decide the place of the router where it is used to its optimum.