Pedestrian Motion Learning Based Indoor WLAN Localization via Spatial Clustering

Applications on Location Based Services (LBSs) have driven the increasing demand for indoor localization technology. The conventional location fingerprinting based localization involves heavy time and labor cost for database construction, while the well-known Simultaneous Localization and Mapping (SLAM) technique requires assistant motion sensors as well as complicated data fusion algorithms. To solve the above problems, a new pedestrian motion learning based indoor Wireless Local Area Network (WLAN) localization approach is proposed in this paper to achieve satisfactory LBS without the demand for location calibration or motion sensors. First of all, the concept of pedestrian motion learning is adopted to construct users’ motion paths in the target environment. Second, based on the timestamp relation of the collected Received Signal Strength (RSS) sequences, the RSS segments are constructed to obtain the signal clusterswith the newly defined high-dimensional linear distance.Third, the PageRank algorithm is performed to establish the hotspot mapping relations between the physical and signal spaces which are then used to localize the target. Finally, the experimental results show that the proposed approach can effectively estimate the target’s locations and analyze users’ motion preference in indoor environment.


Introduction
For well over a decade, the rapid development of wireless communication technology has driven the increasing demand for the Location Based Services (LBSs) [1][2][3].Because of the complicated indoor building structure and multipath effect, the performance of the outdoor positioning systems such as Global Positioning will dramatically deteriorate in indoor environment.Meanwhile, with the wide deployment of Wireless Local Area Network (WLAN) infrastructure, WLAN has become one of the priorities for indoor positioning [4].
Due to the easily accessible WLAN Received Signal Strength (RSS), the location fingerprinting based WLAN indoor localization systems [5,6] have been widely researched.These systems generally contain two phases, namely, offline and online phases.In offline phase, the RSS data from the hearable Access Points (APs) at each precalibrated Reference Point (RP) are collected to construct fingerprint database.Then, in online phase, the newly collected RSS data are matched against fingerprint database to obtain the target location estimate [7].However, because of the heavy time and labor cost for fingerprint database construction, this technology cannot be widely spread especially in the largescale environment.
To mitigate the cost of fingerprint database construction, the calibration-free indoor localization approaches have been intensively studied.By integrating the RSS data with motion sensor information, the Simultaneous Localization and Mapping (SLAM) technique [8] is proposed to effectively reduce the overhead of fingerprints calibration.Based on the specially designed sniffers, the authors in [9] conduct the dynamic radio map of target indoor environment to perform localization.In [10], the RSS measurements are fused with the odometric data from the foot-mounted Inertial Measurements Units (IMU) to conduct pedestrian navigation, and the odometry based Bayesian inference theory used for localization is analyzed in [11].In all, the SLAM based localization techniques need additional motion sensors [12], as well as the sophisticated algorithms for feature extraction and data fusion [13].
Different from these approaches, a new pedestrian motion learning based indoor WLAN localization approach is proposed in this paper, which has no demands for fingerprints calibration or assistant motion sensors.In general, there are four contributions of this paper as follows.
(1) Indoor user's behavior model construction by pedestrian motion learning: with the statistical observation of users' motion patterns, a heuristic pedestrian motion learning approach is performed to construct users' walking paths in indoor environment.(2) RSS data collection without fingerprints calibration: different from the location fingerprinting or SLAM based approaches, the RSS data in our approach are collected based on the motion behavior model corresponding to the users' daily routines in the target area.
(3) Signal clustering on RSS segments: based on the timestamp relations of the collected RSS sequences, the RSS segments which reflect users' continuous movement are constructed to obtain the signal clusters with newly defined high-dimensional linear distance.(4) Comprehensive motion behavior analysis: the activity frequency of each physical subarea and the related transfer frequency between different physical subareas exhibit the users' movement preference in the target environment.
The rest of this paper is organized as follows.Section 2 describes the proposed approach in detail.Then, Section 3 illustrates the experimental results.Finally, Section 4 concludes the paper and gives some future directions.

System Description
The proposed approach contains two main modules, namely, the context-aware sensing module and the motion exploration module as shown in Figure 1.
In the process of context-aware sensing, we first construct the floor map of target environment and then adopt the pedestrian motion learning to establish the users' motion behavior model.After that, according to the transfer relations between different physical subareas which are associated with users' motion paths, the physical logic graph is constructed.Meanwhile, the RSS segments are constructed by mapping the raw RSS data into two-dimensional plane, and the density based spatial clustering is adopted to merge the RSS segments with respect to the similar motion behavior together.Then, with the transfer relations between different signal clusters, the signal logic graph is constructed.After the construction of logic graphs, PageRank algorithm [15] is performed to establish hotspot mapping relations between the physical and signal spaces.Then, in the process of motion exploration, the new RSS data collected by users is compared with each signal cluster, and the physical subarea mapped to the most similar one is selected as the area that the user most likely belongs to.In addition, based on the area-level localization results, the users' motion behavior in the target environment is analyzed.

Floor Map Construction
. By considering the functional differentiation of different physical subareas in floor map, we divide the target environment into  area (= 10) physical subareas as shown in Figure 2. In this figure, subarea #1 is the doorway to the lifts and a staircase, subareas #2, #3, and #4 are the corridors to the office rooms, subarea #5 is the doorway to the washrooms and another staircase, and the other subareas are the office rooms.The objects in target environment mainly involve the walls, doors, and furniture.Among them, the furniture is the most favored target at which the users much probably arrive.When the user arrives at a piece of furniture like the table, chair, bookcase, and drinking fountain, he/she will normally stay for a while.Thus, we define the physical area around each piece of furniture as Interested Area (IA), and meanwhile the users' motion paths are much likely to be the paths between different IAs.For example, the path from a chair to a drinking fountain indicates that the user has planned to get some water during the work time.
To simulate the users' motion paths in target environment, we transform the floor map into an image with the pixel width equalling   (= 0.3 m) in Figure 3, where the notation "[•]" represents the integer operation.In this case, the motion paths simulation is equivalent to the determination of the pixels reflecting the users' motion behavior in target environment.

Pedestrian Motion Learning
. By using the pedestrian motion learning, we construct the motion paths in the transformed image of floor map.Then, according to the statistical observation, there are three typical types of users' motion behavior as follows.
(i) The motion paths from the staircases and lifts to office rooms.(ii) The motion paths between different IAs.(iii) The motion paths from office rooms to staircase or staircases and lifts.
Meanwhile, based on our previous A * algorithm based motion path simulation approach [16], we define the cost function with respect to the walking distance from start to end points as  (, ) =  (, ) +  (, ) , where (, ) is the distance from the starting pixel to current one  at moment , which is the distance estimation of the passed path.In this paper, the Euclidean distance is adopted to estimate this type of distance since it is in accordance with users' habit of measuring the path he/she has passed.(, ) is the distance from the current to ending pixels, which is measured by Manhattan distance by considering that the

Starting pixel
Ending pixel

Starting pixel
Ending pixel ending pixel is non-line-of-sight (NLOS) to the user in most cases.
At each moment, the defined walking distance cost of each motion path is iteratively updated.Specifically, on each motion path, when the current pixel  is obtained (in the first iteration, the current pixel is randomly selected from the starting IA which is determined by the related motion behavior), the walking distance cost with respect to the eight adjacent pixels of ,   , can be represented by where (,   ) is the Euclidean distance between the current pixel  and its adjacent one.Then, the accessible adjacent pixel with the smallest walking distance cost is selected as the next pixel   (or the current pixel at the next moment  + 1).We continue this process until the current pixel falls into the ending IA which is determined by the related motion behavior.Following this heuristic learning way, each motion path of pedestrians in target environment, which is constituted by a series of consecutive pixels, can be obtained.Figure 4 gives an example of walking distance cost updating in the process of one motion path construction.
In addition, in order to incorporate the randomness property into motion paths construction, a small proportion of accessible pixels are randomly converted into inaccessible ones, which will block the users' motion paths in target environment.The pseudocode of pedestrian motion learning is shown in Algorithm 1. Figure 5 shows an example of two different generated motion paths starting from the same staircase to a table, from which we can find that the randomness property results in different constructed motion paths even if the starting and ending pixels are the same.
Finally, according to the transfer relations of motion paths between different physical subareas, the physical logic (5) Initialize Existing Path Location (EPL) as an empty set; (6)  ← ; // Current pixel (7) while  is not equal to  do (8) for (each adjacent pixel around ,   ) // Pixel traversal (9) if   is an inaccessible pixel then (10) Continue; (11) else if   belongs to EPL set then (12) Continue; (13) else if   is neither in EPL set nor in PPL set then (14) Add    graph can be constructed, where a transfer between any two adjacent physical subareas is counted only if there is a pair of consecutive pixels located into these two subareas, respectively.

RSS Segments Construction and Clustering.
Based on the pedestrian motion learning, some specific pixels on each motion path are labeled with the consideration of the statistical result corresponding to pedestrians' motion velocities [17].At the same time, the RSS data at each labeled pixel is calculated from the COST231 model [18,19] which has a good compromise among the computation complexity, system flexibility, and practicability.The set of RSS data at the labeled pixels on the th motion path forms the RSS sequence collected on the th motion path, RSS  = {rss 1 , . . ., rss   }, where rss  ( = 1, . . .,   ) is the RSS data at the th labeled pixel on the th motion path and   is the number of labeled pixels on the th motion path, and rss  is the RSS value from the th ( = 1, . . .,  AP ) AP which is calculated by where  AP is the number of APs,   is the Euclidean distance between the target and th AP,  0 is the reference distance which is usually set as 1 m, rss 0 is the RSS at reference location,  is attenuation exponent,  0 is Gaussian noise, and is the attenuation caused by walls and pedestrian's body between the target and th AP, where  wall  and  body  (= 9.32 dB) stand for the attenuation factors with respect to the walls and human body, respectively, which are obtained from [20].
After the RSS sequences are generated, the RSS segments are constructed with the timestamp relations of RSS sequences.In concrete terms, the RSS segments are constructed as seg rss  = [rss  , rss (+1) ], in which each RSS data is viewed as a vertex and the connection between every two consecutive RSS data is viewed as an edge in the  APdimensional space.To measure the similarity between two RSS segments, seg rss  = [rss  , rss (+1) ] and seg rss  = [rss  , rss (+1) ], we define a new  AP -dimensional linear distance as where is shown in Figure 6.As can be seen from this figure, the smaller  AP -dimensional distance reflects the higher similarity of the RSS segments.
Based on the definition of  AP -dimensional linear distance, the density based spatial clustering is conducted to merge the RSS linear segments corresponding to the similar motion patterns together.The pseudocode of density based spatial clustering is shown in Algorithm 2.
Finally, similar to physical logic graph, the RSS logic graph is constructed by selecting the RSS clusters and the corresponding transfer relations between them as the vertices and edges, respectively, where a transfer between any two RSS clusters is counted if and only if there is a pair of consecutive RSS segments falling into these two RSS clusters, respectively.

Hotspot Mapping between Physical and Signal Spaces.
With the PageRank algorithm [15], a PageRank (PR) value is distributed to each physical subarea and RSS cluster, and then the hotspot mapping is performed between the physical and signal spaces.To achieve this goal, we first count the transfer number between every two adjacent physical subareas,   and   , as    (,  ∈ {1, . . .,  area };  ̸ = ), where  area is the number of physical subareas, and calculate the transfer probability,   → , as When the appearance probability of the pedestrian in   at the moment  is    (  ), the appearance probability in   at the moment  + 1,  Save the RSS segments with the  AP -dimensional linear distance smaller than a given threshold, , into set C  ; (5) if (the number of elements in C  is not smaller than a given threshold, Min) then (6) continue; (7) else (8) for (each RSS segment in C  , seg rss  ) do // Data traversal (9) if (the number of RSS segments in C  is not smaller than the threshold Min) then (10) Merge C  into C  ; ( 11) else (12) continue; (13) end if (14) end for (15) Set C  as the -th signal cluster; (16)  ←  + 1; (17) end if (18) end for Algorithm 2: Pseudocode of spatial clustering.
As a special case, when a user is located in   at the moment , he/she may enter an anonymous physical subarea at the next moment.In this case, we assume that the user is equally likely to appear in every physical subarea at the moment  + 1, such that Then, considering the movement trend of pedestrians in the target environment, the transfer relations between different physical subareas are obtained as follows [21]: where , . . .,    ( area )] T , and  ∈ [0, 1] is the proportion of users satisfying the transfer relations in ( 6), e = [ 1, . . ., 1 ⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

𝑁 area in total
] T , P  is a  area × area matrix, in which   → is the element on the th row and the th column, and s = [ 1 , . . .,   area ] T , in which the th element satisfies After that, the set of the PR values of physical subareas, P  hot , is obtained as Similarly, in RSS logic graph, based on the transfer relations between different RSS clusters, we calculate the transfer frequency from the RSS clusters C  to C  as where    is the transfer number from C  to C  and  cluster is the number of RSS clusters.Then, the set of the PR values of RSS clusters is obtained as Finally, we construct the sets of the ranked PR values of physical subareas and RSS clusters as P  Rank and P  Rank , respectively, in (13). where Then, the RSS clusters are mapped into the physical subareas with same order of PR values.By considering that  cluster is generally larger than  area , the RSS clusters having no physical subarea to be mapped into are discarded in the process of hotspot mapping.collected RSS sequence, we calculate its confidence probability to each RSS cluster as where    ( = 1, . . .,  cluster ) is the confidence probability of the th RSS cluster with respect to rss new  from the th AP.Then, based on the established hotspot mapping relations between physical and signal spaces, the physical subarea corresponding to the RSS cluster with the highest confidence probability is chosen as the area where rss new  is most probably to be collected.
After that, according to the area-level localization results, we can analyze users' motion behavior in the target environment by calculating the activity frequency in each physical subarea,    , and the transfer probability between adjacent physical subareas,   → , as follows: where  loc  is the number of the RSS data which are localized in the physical subarea   in the newly collected RSS sequence.
where    is the number of the pairs of consecutive RSS data which are localized in the physical subareas   and   , respectively, in the newly collected RSS sequence.

Result of Pedestrian Motion
Learning.As shown in Figure 2, the target environment is divided into 10 physical subareas, notated as #1, . .., and #10.Then, based on the heuristic pedestrian motion learning approach, we define 20% pixels as the inaccessible ones and construct 300 motion paths in the transformed image of floor map.The result of simulated motion paths under different types of users' motion behavior is shown in Figure 7, where the pixels in darker color indicate the corresponding locations with higher appearance probabilities.As can be seen from this figure, 300 motion paths are capable of effectively describing the pedestrians' movement trend in the target environment.After that, according to the transfer relations of motion paths between different physical subareas in Figure 2, we construct the physical logic graph in Figure 8.

Result of Hotspot Mappings.
According to the analysis of users' motion velocities [17], some specific pixels are labeled on each motion to calculate the RSS data from the placed APs as shown in Figure 9.This figure gives the result of pixel sampling under different motion velocities on the two constructed motion paths which are with the same starting and ending pixels.Then, Figure 10 compares the probability of mapping the RSS data into the physical subareas which they actually belong to, namely, probability of correct indoor mapping.Since the defined  AP -dimensional linear distance in formula (4) is sum of the normalized values of different distance measurements, the distance threshold  may be negative.As shown in Figure 10, the highest probability of correct indoor mapping is obtained when the thresholds  and Min are set as −4.7192 and 40, respectively.
After obtaining the optimal thresholds corresponding to the highest probability of correct indoor mapping, we construct the signal logic graph in Figure 11.In our experiment,

Approach
Fingerprints calibration Time complexity [12] No demand () [13] No demand ( × log()) [14] Low calibration cost ( 3 ) Proposed No demand ( × log()) the proportion of the users satisfying the transfer relations in formula (6), , which is much larger than that of other users, is set as 90%.Based on this, the hotspot mapping between the physical and signal spaces is established in Figure 12.

Result of Localization and Behavior Analysis.
To examine the localization performance of the proposed approach, we collect some calibrated RSS sequences in the consecutive one, two, and three physical subareas, respectively.Figure 13 shows the probabilities of locating the new RSS data into its actually belonging subarea which is defined as correct localization, as well as probabilities into its adjacent subareas which is defined as adjacently correct localization.In addition, combining with Table 1, we can find that compared with [12][13][14], the proposed approach can generally achieve higher localization accuracy with lower time complexity and without the demand for fingerprints calibration.Based on the area-level localization result, the users' motion behavior can be preliminarily analyzed by calculating the activity frequency in each subarea and the transfer probability between different physical subareas as shown in Figure 14.In this figure, the activity frequency in physical subarea #4 is much higher than the one in other subareas, which can be interpreted by the reason that #4 is with much larger PR value as illustrated in Figure 11.As a special case, the physical activity frequency is very low.This result is due to the fact that the similar RSS distributions in the physical subareas #1 and #2 increase the probability of mapping the RSS data in #2 into its adjacent physical subarea #1 by mistake.
At the same time, with the transfer probability between different physical subareas, we can further explore some users' motion preference in the target environment.As an example, when a user is located in the physical subarea #4, we can predict that he/she is most likely to move to subarea #3 with the confidence probability equalling 0.54.In addition, the nonzero transfer probability between the nonadjacent physical subareas (labeled with red dotted arrows) (i.e., #3 → #9 and #3 → #1 with the confidence probability 0.44 and 0.03, respectively) indicates that these nonadjacent physical subareas are with the similar RSS distributions.

Conclusion
In this paper, we propose a new pedestrian motion learning based indoor WLAN localization approach without the assistance of location fingerprinting or motion sensor.Combined with the pedestrian motion learning, density based spatial

Figure 2 :
Figure 2: Division of target environment.

Figure 3 :
Figure 3: Transformed image of floor map.

Figure 5 :
Figure 5: Construction of two motion paths with the same starting and ending locations.

Figure 6 :
Figure 6: Definition of the vertical, parallel, and angular distances.

2. 5 .
Localization and Behavior Analysis.In online phase, for each RSS data rss new  = [rss new 1 , . . ., rss new  AP ] in the newly(a) From staircase or lift to office rooms (b) Between different IAs (c) From office rooms to staircase or lift (d) All day

Figure 9 :Figure 10 :
Figure 9: Sampled pixels on two motion paths with different motion velocity.

Figure 13 :
Figure 13: Localization result of different approaches.

Figure 14 :
Figure 14: Motion behavior of users in the target environment.

Table 1 :
Comparison between different approaches.