WI-FI RSS-BASED APPROACH FOR LOCATING THE POSITION OF INDOOR WI-FI ACCESS POINT

This paper presents an approach to automatically detect the position of the Wi-Fi access points. It uses Wi-Fi received signal strength as well as some characteristics of the buildings such as the height of the building and the movement direction of the user to detect the position of the access points. This approach comprised of two phases: in phase one, a dynamic threshold is computed for each detected access point using the highest received signal strength. Then the threshold is used to detect a small area surrounding the access point. In phase two, it detects the position of the access point by monitoring the angle between the user and the access point, if the angle is in a certain range, then the position of the access point is detected. The experiments results show a high accuracy achieved by the proposed approach. Moreover, the results show that the proposed approach is promising.

The pervasiveness of smartphones, which are equipped with several sensors, such as accelerometer, gyroscope, and others, allows the researchers to use the Smartphones in indoor localization and tracking users. Moreover, The Wi-Fi access points, which are available in most public buildings are utilized by the researchers to provide the localization services. Furthermore, using the Wi-Fi access points in indoor localization requires no additional cost, which means that Wi-Fi is the most appropriate solution for indoor localization.
Locating the Wi-Fi access points in indoor environments has become a real obstacle to produce a practical indoor localization system. Most of the indoor localization systems assume a predefined position of the access points inside the buildings. However, public buildings environments are frequently exposed to be changed, and then access points positions may be changed, for instance, changing the position to get better coverage, installing new access point, or shutting down one.
In this paper, an approach for locating the access points' positions is proposed. It relies on the fact that when the user passes a nearby access point, he/she will be perpendicular to that access point. Once the user passes a nearby access point, the position of the access point is detected. The main idea behind this approach is to monitor the angle between the user and the access point, once it becomes 90 degrees, it means that the user is just left under that access point. The highest received signal strength value is used to detect the distance between the user and the access point as well as the real building height. Our approach works under the assumption that the height of the building is known, this assumption is valid since the height of the building is fixed and unable to be changed.
The specific contributions of this paper are:

Introduction
The importance of the indoor localization has been increased during the last decade due to the need of practical indoor localization system that meets the requirements of the people. The pervasiveness of the Wi-Fi in the public buildings such as Airports, shopping malls, etc., and the easiness of getting the Wi-Fi signals have enabled the researchers to employ Wi-Fi technology in indoor localization techniques.
Many applications need an accurate indoor localization system to offer localization services to the people, who spend most of their time in indoor environments [1][2]. Providing the user's position in Airports, shopping malls, and hospitals are considered as location-based services. In addition, tracking the children and elder people are critical issues these days.
Many approaches have been proposed to solve the problem of indoor localization, such as fingerprinting, which is the most popular one [3][4][5]. Some other approaches use trilateration [6]. In trilateration approach, the distance between the access point and the user is computed based on the received signal strength between the access point and the user [7][8]. To estimate the 2D position of the users based on trilateration approach, at least three different signals are required.
Fingerprinting approach is one of the most popular indoor localization techniques. It consists of two phases, in phase one, which is the training phase, the system collects Received Signal Strength (RSS) and store them in a database. Phase two, which is the online phase, the online RSS measurement values are used to detect the position of the user by comparing the online RSS with the stored ones in the database [3][4].
that construct the floor plan rely on the crowdsourcing technique. Crowdsourcing technique works by equipping the users' Smartphones by an application to gather some data to construct the floor plan [1]. Distance estimation is also a critical issue, the smartphone sensors such as accelerometer can be utilized to compute the distance [19]. The distance estimation via the accelerometer is computed as the number of walking steps. The author in [19] presents a dynamic distance estimation by computing accurate walking steps and then multiplying the detected steps by a dynamic step length.
To sum up, most of the indoor localization approaches need the Wi-Fi access points. Therefore; knowing the position of the access points will increase the accuracy of the indoor localization approaches. Our approach tackles this problem by providing an accurate position of the access points. In general, our approach differs from the existing approaches in terms of detecting the positions of the access points, which is based on the changing angle due to the user movements. Moreover, the proposed approach does not need much efforts to build a database. The only parameters needed are the physical height of the building as well as an average height of the Smartphone from the ground.

Proposed approach
Access points act as reference points for indoor localization, therefore; detecting the accurate position of the access point is crucial in our work. RSS values can be used to detect the accurate position of the access point when the user passes by an access point. Our approach measures the average of RSS values for a time window (e.g., 2 seconds) because the values of RSS suffer from various problems such as multipath and scattering. Relying on individual RSS values will lead to a severe error. The main idea of the proposed approach is to use the highest average of the RSS to indicate if the user is close to an access point. We rely on the fact that when the user is under an access point, the average of the RSS values for that access point will be the highest [8].
The proposed approach consists of two phases. In phase one, the user surveys the building and the proposed approach computes the average of the RSS values for each time window. Next, the system computes the threshold of each access point according to the highest average of the RSS values. Equation 1 shows how to compute the threshold: where: RSS_Thre(x) is the threshold of the access point x, RSS_AVG(x)i represents the average RSS value for access point x at time window i, n is the time when the maximum average RSS value is detected, and w is the window size (e.g., 2 times).
-Detecting accurate access point positions. -Providing a practical idea on how the RSS values change while the user is moving.

Related work
Many techniques have been proposed in the field of indoor localization. The proposed approach in [1] uses reference points in order to detect the position of the user as well as calibrating the user position each time he/she encounters a reference point. Some approaches exploit fingerprinting techniques for indoor localization [3][4][9][10]. In these approaches, two phases are used to detect the position. In the first phase, the system collects the signals such as Wi-Fi signals, Bluetooth, FM, and others. The collected signals create the fingerprint database, which is called radio map. In phase two, the position of the user is estimated, the system measures the signals and compares them with the ones in the radio map. Some machine learning algorithms are needed to retrieve the best match. Although these approaches provide a good accuracy level, but the effort needed for building the radio map is the big challenge for the fingerprinting-based approaches. Trilateration-based approaches in [11][12] need to measure the distance from at least three different sources of signals. The position then is considered as the intersection point between the three circles that are formed by the three distances.
Some approaches try to solve the problem of using the signals, for instance, the multipath problem is one of the biggest problems that affect the accuracy of the indoor localization approaches. The approach in [13], reduces the effect of the multipath problem by adding a special field in the beacon frame to detect the direct path between the transmitter and the receiver.
Nowadays, Smartphone has become the most popular cellular device carried by the people. It equipped with several sensors that can be utilized in indoor localization. For instance, accelerometer sensor can be used to detect the steps of the users and gyroscope is used to detect the direction of the users [13][14][15][16]. Some approaches exploit the users' profiles when they visit a building to store some data such as the acceleration, the direction, and the Wi-Fi signals [10,17]. These data used to detect the position of the users using some machine learning algorithms. Channel State Information (CSI) provides more stable information than RSS values [18]. It can be used for providing a knowledge about the direct path of the signal that leads to more accurate distance estimation. However, not all access points share the CSI, therefore; the need for special access points represents a drawback of such approaches.
One of the requirements of the indoor localization approaches is the floor plan. Some approaches assume that the floor plan is already given. Others, such as the one in [1] builds the floor plan automatically via monitoring the movements of the users in an environment. The dynamic floor plan construction is an important issue in indoor localization. Most of these approaches Note that λ is a critical factor, it represents the environmental stability. If the indoor environment is stable and clear, then λ is close to 2, and if the indoor environment is unstable and unclear, then λ is close to 4 [14]. Equation 2 suffers from various factors, such as multipath, signal attenuation, and scattering. To reduce the influences of these factors, we use Equation 2 when the user enters the area of an access point, which is detected using the threshold. The detected area that surrounds the access point is small, which means that the area is close to the access point; therefore, the signals are in a line of sight. Furthermore, the existence of the access points in the corridors, which have usually lesser furniture and obstacles than the rooms, makes the RSS signals clear and have less scattering. Distance, d, can be computed based on Equation 3.
We use the maximum average RSS value to represent the initial RSS , since the maximum average represents the RSS value at the nearest point from an access point. RSS AVG is represented by the RSS average during a time window.
According to the law of sines of the right triangle: From Equation 4, the angle α can be derived as follows: To sum up, the proposed approach detects the position of the access points based on two phases, the first phase is to detect the area where the access point is located using the highest average of RSS values based on Equation 1. Then at the next phase, the system uses the distance and the physical information of the floor such as the height of the building to improve the accuracy of the positioning estimation using Equation 2 and Equation 5.

Experimental setup
The proposed approach was evaluated in the building of computer science department at Mutah University. Three Equation 1 presents the threshold by calculating the average RSS from the maximum (2×w+1) RSS average values.
RSS_Thre represents the RSS value when a user is close to an access point. Using RSS_Thre, the system decides that the user is close to an access point. Therefore; Equation 1 limits the search and decides which access point the user is close to.
In phase 2, Equation 1 detects and limits the area of the access point; however, determining the position of the access point within this area is challenge. Figures 1 and 2 demonstrate the scenario for detecting the position of the access point. When the user enters the area of an access point, which is determined by the threshold, the system calculates the angle between the user and the access point using right triangle technique. If the angle is close to 90˚, then the system considers this place as the position of the access point. As can be seen from Figure 1, which represents the user approaching an access point where the angle is increasing. Figure 2 represents the scenario when the user has just left the access point and the angle α is about 90.
As shown in Figures 1 and 2, d represents the distance between the user and the access point, h is the height of the floor, and b is the distance between the user's smartphone and the ground. When a user is approaching the access point, the angle α increases until it becomes close to 90˚ under the access point or when d is equal to (h -b), which means that the user is exactly under the access point and the triangle becomes a line. If the access point is not attached to the ceiling and instead attached to the wall, the angle α is close to 45˚ and the user is at the same line of the access point, and then the angle gets decreased as the RSS values decreased. Therefore, our approach recognizes the access point when one or more of the following three conditions is met: a) if angle α is close to 45˚ then decreases; b) if angle α is close to 90˚ then decreases; or c) if the distance is equal to the height of the building (d=h).
To compute the angle α, we need a prior knowledge of the floor height and b values. To find the distance, d, we use path loss model as follows: Where: initial RSS is the RSS at 1 m from the access point, RSS is the received RSS value, λ is the path loss exponent, d is the distance between the receiver and the access point. To avoid the multipath and attenuation problems that may affect the results of distance estimation using path loss model, the path loss model should be used where the signal is in a line of sight. Therefore, in the proposed approach, the dynamic threshold which is computed by Equation 1 is performed to decide whether the user is close to an access point or not. If yes, then the proposed approach computes the distance based on the path loss model as the signals are in the line of sight.

Detecting the position of the reference points
After determining the area where the access point is placed, which is a small area surrounding the access point, the next step is how to accurately detect the position of the access point within this area. In this section, we present the result of the proposed approach. Figure 5 illustrates the access points are installed in the building. Two of them are attached to the ceiling while the other one is attached to the wall of the building. The experiments have been done using Android based Smartphone. The experiment was conducted when the user reaches the area where the threshold for an access point is detected. The walks inside the building holding his/her Smartphone and passes by the access points.

Impact of the threshold to detect the area where the access point is located
In this section, the threshold, which is computed using Equation 1 is tested in the environment to detect the area where the access point is located. Figure 3 shows the results.
As can be seen from Figure 3, the threshold restricts and limits the search for the position of an access point to a small area surrounding the access point. The dots above the line represent the RSS values when the user is in the vicinity of an access point. As can be seen from Figure 3, the values are on the range of distance of 2 m to 6 m, which means that the access point is far about 4 m from the user. These results can restrict the search process; however, it is not enough to say that the position of the access point is recognized due to the problem of the signals. Therefore; we applied path loss model to enhance position estimation.

Path loss model-based distance estimation
In this section, we show the results of distance estimation based on the path loss model shown in Equation 2. Figure 4 shows that there are some errors in distance  Fingerprinting-Based [9,10,17,20] Able to automatic calibrate Need surveying radio in a building (1 -3) m Trilateration-Based [11] No need for calibrations, accuracy is more than 3 m Need at least three access points > 3m I am the antenna [21] No need for calibration of the database The user must rotate to detect the blocking sector Small distance points, the system can choose the access points that are in the same vicinity of an object and exclude others, which are far from that vicinity. Moreover, detecting the position of the concerned access points help in improving the accuracy of the fingerprinting-based approaches by excluding the signals from the access points that are not close to each other. Our approach outperforms the existing approaches in terms of accuracy and the effort needed to run the system. For instance, our approach requires only the physical characteristics of the building, such as the height of the building which is fixed and unchangeable. This feature makes our approach one of the few approaches that do not rely mainly on the radio signals which are unreliable. Moreover, relying only on the access points that are attached to the ceiling or to the wall of the building makes the received signals clear and in line of sight which leads to accurate distance estimation. Table 1 summarizes the differences between the proposed approach and some of the existing approaches.

Conclusion
Most of the indoor localization techniques need to involve the building map as well as the position of the access points. In this paper, we proposed an approach to dynamically detect the position of the access points via two phases. In phase one, a small area surrounding the access point is detected using a dynamic threshold. Then in phase two, the system monitors the angle between the user who is approaching an access point and the target access point. The angle will increase until it reaches 90̊ when the user leaves the access point, at this time, the system considers this position as the position of the access point. The results of the experiments showed a promising result in terms of indoor localization accuracy.
detection of the angle based on Equations 2 and 4, which is used to detect the position of the access point. Figure 5 shows the results of the three different experiments. Experiment one and two, the user was 12 m far from the access point when the threshold is detected, he/she walked towards the access point until he/she passed under the access point and left it. In these experiments, there were few people in the environments; therefore, the signals were in a line of sight. Experiment three was conducted when there were a lot of people in the environment.
As can be seen from Figure 5, the angle reached 90˚ when the user is almost passed under the access point for the experiment one. We can notice here that the angle dropped significantly after it reached 90˚, which is an indicator that the user is going further from the access point because the signals become in non-line of sight as the user's body blocks the signal. For experiment two, the angle reached 90˚ when the user is about 3 m from the access point. Experiment three aimed at testing noisy environment when there is a lot of people in the environment. Based on Figure 5, it is clearly pointed out that the angle between the user and the access point when the user passed near the access point dropped even after reaching 45˚. The average error of the proposed approach was 1.6 m, which shows a high accuracy level to be applied.

Discussion and comparison
Our approach provides the position of the access points which can be used for detecting the users' positions. One of the disadvantages of the trilateration-based approaches, is how to get a line of sight signals from three different sources of signals. Our approach helps to determine the optimum access points to be used for trilateration by excluding the undesirable access points. For instance, if there were four signals come from four different access