A New Approach for Wi-Fi-Based People Localization in a Long Narrow Space

Wi-Fi-based positioning technology has been recognized as an effective technology for indoor positioning along with the rapid development and application of smartphones. One of its typical applications is localizing people in large public areas such as shopping malls, schools, and airports. A common and critical task from such applications is localizing people in long narrow spaces such as a long corridor which is considered as themost frequent place where people activities take place. Generally, the geographical distribution of Wi-Fi access points (APs) in long spaces is poor for localizing people since normally less than 3 APs are connected to a smartphone. In addition, all these APs are normally mounted along a straight line; hence, it is difficult to track people using traditional positioning algorithms such as trilateration and fingerprinting. To address this issue, a new approach called same-linedual-connection (SLDC) was developed to estimate user locations with a good positioning accuracy, particularly for long narrow spaces where only limited Wi-Fi connections are available. The SLDC approach integrates geometry principle with positioning theories and machine learning ideas. The test outcome has shown that the SLDC approach produced a promising result, and a mean positioning accuracy of 1.60 m was achieved.


Introduction
Wi-Fi and smartphone technologies are becoming a growing and innovative ways of connecting people or moving objects with each other instead of using emails and other traditional social media methods running on laptop or desktop computers. Today, Wi-Fi has become a default feature for all smartphones. It is not only used in communications and entertainment but also location-based services (LBS). Unlike other built-in technologies (e.g., Bluetooth), the Wi-Fi function is usually switched on by the smartphone user while the phone is turned on; this feature has provided us with a convenient way for technology implementing and service providing. In recent years, Wi-Fi and smartphone technologies are experiencing a significant growth in both industrial application and academic research fields due to the unprecedented increase in demand from the smartphone industry [1][2][3][4][5]. Wi-Fi and smartphone-based tracking and positioning is therefore a key part of LBS products. However, there is still no optimal Wi-Fi-based localization solution available so far, and the low positioning accuracy is still an issue due to the poor geometrical distribution of Wi-Fi access points (APs), multipath effect, and signal fluctuation caused by various interferences.
Traditionally, it is very common that the APs are deployed along a straight line or nearly straight line in a corridor or other long narrow spaces, which is difficult for current indoor positioning algorithms to effectively track people within the corridors. In practice, when a mobile customer walks through a corridor, the customer is most likely along the same line as the surrounding APs mounted. Both multilateration and fingerprinting methods do not work properly under such circumstances, and so does the Cell of Origin (CoO) method since the distance between any pair of adjacent APs is commonly 20m or longer. Therefore, tracking and localizing an end-user in a long narrow space is still a problem.
A new approach named the same-line-dual-connection (SLDC) has been developed for solving this problem. Only 2 Wireless Communications and Mobile Computing two AP connections are required for SLDC approach to estimate the position of the end-user who walks through the long narrow space. An empirical error value, obtained from previous cases and with similar signal transmission conditions, was also employed for each distance estimation as an enhancement process.
The rest of the paper is outlined as follows: the relevant measurement models will be discussed in Section 2, and a real shopping mall tracking environment will be analyzed in Section 3; the methodology of the new approach will be introduced in Section 4, and Section 5 will present an evaluation test. Finally, the conclusion part will be addressed in Section 6.

Measurement Model
It is well known that a location can be estimated from various measurement models such as distance-based and orientation-based measurement models [6,7]. Generally, there are four types of measurements used for Wi-Fi and smartphone-based indoor positioning: time of arrival (ToA) [8,9], time difference of arrival (TDoA) [10,11], angle of arrival (AoA) [12], and received signal strength indicator (RSSI) based models [13][14][15]. The RSSI-based model is more popular than the other three [16,17] and therefore is employed for SLDC. The distance between a customer and an AP can be calculated by a commonly used path loss model [18,19] as shown below.
where d: distance between the transmitter and receiver in meters; RX PWR : detected RSSI in dBm; TX PWR : transmitter output power in dBm; LOSS TX : the sum of all cable and connector losses at the transmitter-side in dBm; GAIN TX : transmitter-side antenna gain in dBi; LOSS RX : the sum of all cable and connector losses at the receiver-side in dBm; GAIN RX : receiver-side antenna gain in dBi; PL m : reference path loss in dBm for the desired frequency when the distance between the receiver and transmitter is 1 meter [20]; n: path loss exponent related to the surrounding environment; and s: standard deviation in dBm, associated with the degree of shadow fading presented in the environment. Currently, the most commonly used location estimation methods for indoor positioning are CoO, multilateration (e.g., trilateration) and fingerprinting. Among them, CoO is used less and its accuracy really depends on the means of the AP distribution. Multilateration usually requires at least 3 AP connections and the target position estimate is derived from multiple distances (i.e., ≥ 3 distance values) between the mobile user and the connected APs. It should be aware that the observed RSSI values can be affected by a number of factors such as the output power of the transmitter, the sensitivity of the receiver, the antenna gains at both the transmitter and receiver sides, as well as the path loss of the signal as it travels through the air. These will result in significant errors in the calculated distance. Multilateration is also difficult to work for the case where the surrounding APs are mounted along a straight line. Fingerprinting method is a better option for more complex indoor environments because the effect from the environment is well dealt with in the training phase. However, the positioning accuracies of fingerprinting vary largely with the change of density of the AP distribution and irregular fluctuation of the signal strength.

Analyses of the Tracking Environment in Real Shopping Malls
The development of the SLDC approach was based on the investigation and analyses of many different floor layouts and other features in long narrow spaces (e.g., the shopping mall environments from our industrial research partner). Typical long narrow spaces can be easily seen in a real floor layout map of any large public building. A floor map as such from a local shopping mall is shown in Figure 1 where the long corridors have been marked in Figure 1(a). A typical distribution of APs (the red points) in one level of the shopping mall can be seen in Figure 1(b). It should be noticed that a number of testing points (TPs, the blue points) were also marked on the floor along the customers' walking path for the purpose of further testing. It is obvious that most of the APs in the corridors are located in a nearly straight line, although there are a few large free-space areas such as the area in front of the main entrance of a shopping center and/or other more complex and irregular layouts. In the latter cases, other methods such as trilateration or fingerprinting can be used instead of SLDC. For example, in the case of complex surrounding environments, fingerprinting method is the best choice for customer tracking. One common feature of long corridors is that the customer usually walks along a straight line (or almost a straight line), which is similar to the line representing the mounted APs in the corridor without consideration of the height of the ceiling. Another common feature is that the space in a long corridor is relatively free. The APs are typically mounted on the ceiling and there are no other facilities occupied in a corridor normally, and the signals travel through a relatively free space between APs and end-user devices. Therefore, it is a good choice in this case to use the path loss model for distance calculation.
When a customer is at a specific test point, e.g., point 3 in Figure 1(b), the customer may be detectable from both 20 and 22 . The features discussed above, for example, almost all the APs are mounted along the corridors and the approximate 20m distance between any pair of adjacent Aps, etc., can be found from Figure 1(b). In fact, because the corridors are common passageways towards all business firms, they become the main focus for customer tracking in most shopping malls.
A number of findings discovered from our previous tests have been used in this new approach development: (1) stronger Wi-Fi signals presented more stability and consistency [21], so two stronger signals were selected in this research for the estimation of the customer position; (2) a TP with a greater RSSI value observed from an AP is regarded closer to the AP than other TPs with less RSSI values received and vice versa; (3) signals with RSSI values greater than -70 dBm were presumed for better positioning operation; (4) an empirical RSSI threshold of -85 dBm was adopted for recording rejection of ineffective RSSI values in this approach.
To summarize, the main features of a long corridor for indoor tracking and positioning are as follows.
(i) The space in a long corridor is relatively free except with walls or other partitions along the two sides of the corridor.
(ii) Line-of-sight (LOS) environments are commonly available in a corridor although disturbance may occur sometimes if there are too many customers around the end-user.
(iii) Most of the APs are mounted on the ceiling of the corridor along a straight line (or nearly a straight line).
(iv) The walking path of the customers can be assumed as a straight line along the corridor, which is similar to the straight line going through the APs on the ceiling of the corridor.
Based on the above discussions, the path loss model (1) is selected for calculating the distance between a customer and connected APs in the corridor. The height (H) between the APs and end-user devices is a known constant in this project (also in most of similar cases).

Methodology
Assuming that the positions of the customer (P) and the two connected APs (AP and AP ) used to locate the customer are all in the same line, then five possible geometrical configurations of the three positions are shown in Figure 2, in which point P is the estimated point of end-user, D is the true distance between AP and AP , and 1 ( . ., 1 A) and 2 ( . ., 2 B) are the two estimated distances from point P to AP and AP , which are derived from (1), respectively.
The following equations are given for determining point P in the above five cases Case . The precondition for this case is Since points A and B are adjacent to each other, they are normally in the same surrounding environment and using the same path loss exponent (n) and standard deviation (s) values for the calculation of 1 and 2 , so the errors from the path loss model for 1 and 2 (i.e., 1 and 2 ) are assumed to be the same. Let 1 and 2 be the two true distances for 1 and 2 ; then

Wireless Communications and Mobile Computing
In fact, it is hard to obtain a true distance, rather the optimum measurement. Then the above two equations can be rewritten as where 1 and 2 are the optimum measurements from to 1 and 2 , respectively; then point P is geometrically determined by As displayed in Figure 2, the sum of the errors from 1 and 2 can be defined geometrically as . Based on the previous discussion, the environments between two adjacent APs in the same corridor are very similar, the same path loss exponent (n) and standard deviation associated with the degree of shadow fading (s) are used for both calculations of 1 and 2 , and the distance errors produced are similar and therefore assumed the same to simplify the estimation process. In this case, both the errors for 1 and 2 are shown in Similarly, based on the geometric properties, the determination of point P for Cases 2 and 3 is as follows.
Case . The precondition for this case is 1 + 2 < . Point P is determined by Obviously, (8) is the same as (6).
Case . The precondition for this case is 1 + 2 = D , which is a special case of Cases or where the total distance error is 0. In this case, the estimated distances between P and AP actually equals 1 . However, it can still be calculated by (6).
Cases and . Geometrically the precondition for Case is 2 > D and 2 ≥ 1 and is 1 > D and 1 > 2 for Case . It is noticeable that the methodology for Cases and should be different from the first 3 cases, since the fixed distance (D ) used for a distance rectification process in Cases 1, 2, and 3 is not applicable for Cases and , and therefore, additional assessments are required. Inspired by the methodologies of machine learning, an empirical error value (i.e., 1 ) "learnt" from Cases , , and is used for the error rectification for each distance estimation process under Cases and . The empirical value 1 can be either prerecorded from a calibration test or an average value of the accumulated errors from Cases , , and under a similar surrounding environment and signal transmitting conditions. The average error value for a specific area is often selected for this purpose due to the ease of implementation. Then, point P in Cases and can be determined by Further analyses conducted after (6) through (9) are established (1) As discussed in the above paragraph, the first three cases are essentially the same from a mathematical point of view, so (6) is the solution for Cases , , and . The precondition for the first three cases is therefore adjusted accordingly as 1 (2) It should be noted that when 1 = 0 or 1 = D , then the customer is at either point 1 or 2 , respectively. (3) In Cases 4 and 5, a negative value of the estimate indicates that the end-user is out of the range of 2 → 1 , and a positive value of the estimate indicates that the end-user is out of the range of 1 → 2 . In practice, most of the cases belong to the first three cases rather than Cases and .
(4) The height of the APs (i.e., the vertical distance between the APs and end-user devices) needs to be taken into consideration during the estimation process. It has also been noticed that the height of the APs is usually a known constant corresponding to the height of the corridor. When dealing with the height (assuming H) of APs, (10) will be used instead of (6), where 1 and 2 are the distances obtained directly from (1). Only horizontal distances should be used for the geometrical comparison (see Figure 3).
(5) Another issue for implementing this approach is how to identify which direction the end-user is coming from. A backtracing method was used for this purpose. For each enduser, the system recorded and stored the information of the last linked AP with the strongest RSSI value, and later the recorded historical information can be traced back and help to identify where the current customer comes from. This is extremely useful when the end-user is passing through an intersection of two or more corridors.
In addition to the above analyses, another issue for implementing this approach is how to identify if an enduser's tracking belongs to SLDC. Firstly, the user needs to be identified when in a long corridor, which is achieved by checking the location of the strongest AP connected to the end-user. Secondly, using the backtracing process and also setting up a value of ±5% angle tolerance is implemented to examine if the last AP is in the same line with the enduser and current two connected APs [22]. For example, if the last connected AP with the strongest RSSI value is within the tolerance of the two currently connected APs and the enduser, and also the three APs are all in the same corridor, then the above approach can be considered to use SLDC solution; otherwise, the tracking scenario would not belong to the case of SLDC, and other estimation methods will be employed in this case.
The overall tracking procedure for SLDC is shown in the flowchart in Figure 4; other estimation methods can also be  employed for the tracking and positioning, which is beyond this topic and will not be discussed in this paper.

Test and Evaluation
The SLDC approach was evaluated using the experimental data collected from a testbed located in Building 100, RMIT University, as shown in Figure 5, in which an HTC ONE smartphone and 5 Linksys WRT54GL Wireless-G Wi-Fi Routers were deployed in a roughly 56m × 5m long corridor for this test. An Android APP for collecting the RSSI data was developed and installed on the HTC phone. To simplify the calculation, all the 5 APs (the red points in Figure 5) were put in the same height level with the smartphone carried by the mobile user, so the height between the APs and the smartphones was 0. The 26 TPs (blue points in Figure 5) were marked on the floor, and the X and Y coordinates of all the TPs and APs were known constants. The Y coordinates of all the APs and TPs were also known constants. To simplify the testing process and to be consistent, only one frequency of signals (i.e., 2.4GHz) was used for the test. All parameters and data collected for the evaluation of the SLDC approach are recorded in Table 1, where (i) 1 , 2 ,. . ., n : X coordinates of AP , AP , . . ., AP n , respectively; (ii) , : distances between two adjacent APs and TPs, respectively (i.e., 13.9m and 2.07m, respectively); , : Y coordinates of two adjacent APs and TPs; (iv) : RSSI value received from the ℎ ; (v) : true X coordinate between two adjacent TPs; (vi) 1 : estimated distance between TP and AP ; (vii) 2 : estimated distance between TP and AP ; (viii) : estimated X coordinate between two adjacent TPs; (ix) ABS diff : absolute value of the difference between and .
A number of additional rules were applied for the RSSI signal evaluation. Firstly, RSSI thresholds were used for filtering out some unwanted signals from those connected APs, which has been discussed earlier in Section 3. Secondly, the first two APs providing the two strongest RSSI values were selected as valid APs (as shown in italic font in Table 1) for the distance calculation, although there may be more AP connections available. In real shopping malls, the distances between two adjacent APs are usually around 20m, which is larger than the distance used in this test (i.e., 13.9 m); therefore, there should not be so many valid APs available in practice.
Similar to the customer walking path in a real shopping mall, the users moved along a straight line when they walked in the corridor, so the Y coordinate was a constant in this test, only X coordinates of the APs and TPs were required for distance calculation. Ten RSSI values for each valid AP connection were collected at each TP and the average of the 10 values was used for the distance calculation in order to partly reduce the signal fluctuation effect. Comparisons between the X coordinate of each true TP and that of the estimated TP are shown in Figure 6(a), the absolute variation values between the true TPs and their estimated results are presented in Figure 6(b), and it can be clearly seen that the variation value for the "worst" point is more than 3.5m but is approaching to 0 for 5 "good" points. It should be aware that the average error values from those points belonging to Cases 1, 2, and 3 were used for the estimation of other four points belonging to Cases and during the implementation in order to reduce estimation errors. A final promising result of 1.60m of the mean accuracy (i.e., the variations) was obtained successfully.

Conclusion
This paper presents a new approach (SLDC) for customer tracking and positioning in long narrow spaces (e.g., a long corridor in a large shopping mall), where only limited APs are available and all APs are mounted on the ceiling along with a straight line or nearly a straight line. The test result has shown that the SLDC approach is effective and efficient for tracking and positioning in a long corridor. A mean accuracy of 1.60 m was achieved from the evaluation test. The test result is very promising and obviously ahead of other Wi-Fi-based indoor positioning methods. Further implementation of SLDC in a real commercial place (e.g., a large shopping mall or an airport) will become the next step of our research plan. An enhanced SLDC approach with a higher level of accuracy is also expected in the future.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.