1. Introduction
Indoor localization has attracted much interest in recent years due to the diverse location-based services (LBS) that require accurate positioning [
1]. There are several technologies available to provide indoor positioning solutions such as WiFi [
2], radio-frequency identification (RFID) [
3], Bluetooth [
4], Ultrawide Band (UWB) [
5], inertial sensors-based localization [
6,
7], etc. In particular, WiFi fingerprinting has been widely used due to its simplicity leveraging on the pre-existing WiFi infrastructures. Moreover, this approach does not require any specialized hardware or additional infrastructure support because most smartphones are WiFi-enabled.
A WiFi fingerprinting-based positioning system consists of two phases: offline training phases and online positioning phases. In the training phase, a set of known locations are selected as the reference points (RPs) and WiFi Received Signal Strengths (RSSs) from all detected access points (APs) are collected at each RP. The RSSs collected at each RP are called fingerprints. To improve the localization performance, this collection takes a few seconds in every point to collect a sufficient number of measurements in order to overcome the RSS variance problem. In some other cases, the collection takes even more time when it is done in four different orientations to take into account the effect of antenna patterns [
2]. After the collection, the radio fingerprint of each location is defined by averaging the RSS measurements or the statistics. The radio fingerprints of all the RPs constitute the radio map. In the online phase, the real-time RSS samples received from the APs are compared against the stored radio map to estimate the user’s location.
As can be easily inferred from the above description, building the radio map is a very labor-intensive and time-consuming process, which is the major bottleneck of WiFi fingerprinting in practical applications. To avoid a site survey, researchers have proposed many calibration-free indoor positioning systems [
8,
9,
10,
11,
12,
13,
14]. Another drawback of WiFi fingerprinting-based localization is the RSS variance problem, which severely degrades the localization accuracy. An RSS variance problem means that the RSS vectors observed in the localization phase are different from the ones collected during the training phase. The RSS variance problem is caused by differences in device type and environmental changes between the two phases.
Crowdsourcing is the most promising solution for solving the site survey problem. This is due to the rise of the smartphone users and every smartphone user may become a potential contributor. By the built-in sensors of the smartphone, the inertial data and WiFi RSS data can be collected. Inertial data can be used to obtain relative trajectory of the user. Based on the relative trajectory, some methods are used to infer the location of each step and label the RSS vectors with the location information. Crowdsourcing is a low-cost and efficient way to extract useful information from data acquired by crowd participants. The crowdsourcing method has been successfully applied to different indoor maps and WiFi radio map construction systems [
15,
16]. For crowdsourcing-based radio map construction, the RSS variance problem is especially serious. The participant’s smartphones are usually different; additionally, the RSS vectors are collected at different times and in different environments.
In this paper, we propose the RCILS, a Robust Crowdsourcing-based Indoor Localization System. RCILS can automatically construct a WiFi radio map using the crowdsourcing data collected by the smartphones. Moreover, RCILS can reduce the influence of RSS variance problem by using a sequence-base radio map. RCILS is based on two key observations. The first observation is that people’s activities and trajectories in the indoor environment are restrained by the indoor map. By matching the activities and trajectories to the map, we can get the coordinates of the trajectories and label the RSS collected along the trajectories with location information. The second observation is that, during the localization process, the user is walking and the collected RSS vectors are continuous. From our preliminary experiments, we found that the changing trend of the same path at different times are similar. That is to say, due to the environmental changes, the RSS values may be different at different times, while the changing trend of the RSS during people walking along the same path changes little. Moreover, the changing trends of the RSSs collected by different types of smartphones are also similar, although the RSS values are different due to the device diversity.
The contributions of RCILS include: firstly, RCILS proposes a crowdsourcing-based WiFi radio map construction method; secondly, RCILS propose trajectory fingerprint model for WiFi fingerprint-based localization, which can reduce the RSS variance problem caused by environment changes and device diversity.
In order to realize RCILS, we propose a sequence-based fingerprint model for WiFi fingerprinting indoor localization. The sequence-based fingerprint model can overcome RSS variance problem caused by environment changes and device diversity. We represent indoor map as a semantics graph and model the radio map as the graph model. In the graph-based radio map, the edges represent the RSS sequence on the paths, and the vertexes represent the connection point of the paths. To construct the graph-based radio map, we use activity-based map matching approach to label the RSS collected during the crowdsourcing trajectories. For online localization, RCILS obtains an RSS sequence during the walking process and realizes localization by matching the RSS sequence with the radio map.
The remainder of this paper is organized as follows.
Section 2 reviews the related work about crowdsourcing-based indoor localization.
Section 3 introduces the methodology of the proposed RCILS. Result and analysis are in
Section 4.
Section 5 concludes the paper.
2. Related Work
WiFi fingerprinting-based localization is first proposed in a RADAR system [
2], which requires a training phase and a localization phase. In the training phase, a radio map is constructed by collecting RSSs from existing APs at all the reference points. In the localization phase, location is determined by the
k-nearest neighbor algorithm, which identifies the RSS vector that has the closet Euclidian distance to the currently observed RSS vector. WiFi fingerprinting-based techniques have been widely studied recently, and reviews are given in [
17,
18].
The major disadvantage of the RADAR system is that the radio map construction is very labor-intensive and time-consuming. Recently, numerous work has been proposed to minimize human effort in fingerprint training [
8].
Radio map construction usually involves fingerprint collection and location labeling. For the point model, the fingerprint is collected by point-by-point manual calibration. In the point-by-point manual collection, the target area is partitioned into numerous grid cells, i.e., reference points, and then surveyors collect fingerprint samples at the center of each grids. The coordinate is the location labeling of the reference points. Typically, grids are sized between
to
, and dozens of samples are collected at each reference points [
19]. The point-by-point manual calibration requires considerable time and effort. The walking survey was used instead to reduce the calibration effort of the point-by-point manual collection [
20]. In the walking survey, the survey paths are planned in advance and the surveyors walk along the path to collect the fingerprints. The collection points do not have to be specified, and only the specific points, such as the start, corners, and the end point of the paths are marked by the surveyors. The location labeling is obtained by interpolation based on the specific points. Although the walking survey can reduce the collection effort to some extent, it still requires considerable time and effort [
21]. Crowdsourcing approaches in which the fingerprint samples are collected from numerous users have been proposed to reduce the cost of radio map construction [
8]. The crowdsourced samples can be viewed as unlabeled data since the true locations at which the samples haven been obtained are unknown.
Bolliger et al. proposed a crowdsourcing based radio map construction system named Redpin. In Redpin, the WiFi fingerprints are collected by user uploading [
22]. Based on Redpin, Ref. [
23] proposed an improved system to increase the number of available samples of the radio measurements by using an accelerometer to detect whether a device is moving or stationary. Similarly, Ref. [
24] proposed an organic location system, which constructs radio map by user collaboration. In the system, users manually input their locations. Manual collection limits the application of the crowdsourcing based radio map construction system. Ref. [
25] proposed a crowdsourcing based indoor localization system without manual training. In the system, the location of each RSS measurement by imposing constraints on the physics of wireless propagation model. However, it is different to get the accuracy parameters of the wireless propagation model in the complex indoor environment. Woodman and Harle [
26] proposed a wearable inertial measurement unit-based WiFi fingerprints automatic construction system. The proposed system realizes pedestrian localization by combining a foot-mounted inertial unit, a detailed building model and a particle filter.
With the development of the smartphones, the built-in sensors can be used for indoor localization. Kim et al. [
12] proposed a smartphone-based autonomous war-walking radio map construction system via crowdsourcing. The system used built-in accelerometer and digital compass of the smartphone to realize pedestrian localization. However, the system has the limitation that the initial location and direction need to be given. Zee [
13] overcame this limitation by exploiting the constraint of the walls. Zee combined the information extracted from an indoor map and particle filter to realize pedestrian localization. During the pedestrian localization, the RSS samples of all the locations are collected and the radio map is constructed automatically.
These proposed crowdsourcing methods used a point model-based radio map, which easily suffers from the RSS variance problem caused by environment changes and device diversity. In this paper, RCILS utilizes a trajectory-based radio map model, which can improve the robustness of crowdsourcing-based indoor localization system. WarpMap also used a trajectory-based radio map model for indoor localization [
27]. The difference between WarpMap and RCILS is that RCILS proposes a crowdsourcing-based radio map construction system, which uses a trajectory-based model for the data structure of radio map.
3. Methodology
3.1. Trajectory Fingerprint Model
During experiments, we found that the change of the WiFi RSS during a trajectory is smaller than that of the fixed sampling point. We show in
Figure 1 how the RSS from an Access Point (AP) changes during the user walking. The RSSs are collected by two different smartphones carried with the user. The user repeated the path four times. From
Figure 1, we can see that the RSS values of different smartphones are different. For the same smartphone, the RSS values of different paths are also somewhat different. The RSS difference of two smartphones is caused by the diversity of the WiFi chipsets and antenna. The difference between different paths of the same smartphone is caused by the instability of WiFi strength. However, the changing trend of the RSSs are similar, which can be seen from
Figure 1.
Based on this observation, RCILS uses a trajectory fingerprint model for indoor localization. In the trajectory fingerprint model, the radio map is stored as a graph . Each node is a position where a pedestrian would take special activities (special means the activities different from walking straight on level ground, including turning, taking elevator, walking stairs, etc.), and each edge corresponds to a trajectory between and . Besides the trajectory, the edge also includes the WiFi signatures collected when pedestrians walk along the trajectory.
RCILS includes two phases: radio map construction and trajectory fingerprint-based localization. In the first phase, the radio map is constructed automatically based on crowdsourcing data. In the second phase, RCILS realizes online localization by matching a collected RSS sequence with the fingerprints in the radio map.
3.2. Radio Map Construction
RCILS is a crowdsourcing-based indoor localization system, which utilizes built-in sensors of a smartphone to collect motion data, WiFi fingerprints and air pressure. The motion data includes acceleration, heading and angular velocity. The WiFi fingerprint includes the Medium Access Control (MAC) of the AP and the corresponding Received Signal Strength (RSS) value. The system overview of the proposed radio map construction method is shown in
Figure 2.
Based on the collected data, we use an activity detection algorithm to detect the activities and use the pedestrian dead-reckoning (PDR) algorithm to estimate the distance between each two activities. The detected activities and estimated distance between each two activities constitute the activity sequence. In the proposed system, the indoor map is used as a known element. The indoor map contains useful information for indoor localization. On the one hand, it imposes hard constraints on where a pedestrian can walk. On the other hand, based on the user’s activities, the indoor map can be used to infer the user’s location. For example, if a turn activity is detected, the user may be in a corner. In this paper, the indoor map is used as a semantic graph, in which the edges are the possible user paths and the vertexes are the location where the user may take special activities. Based on the activity sequence and semantic graph of the indoor map, we use activity sequence-based matching to match the trajectory to the indoor map and get the locations of the trajectory. Then, we can label the WiFi observations based on the localization and use the labeled WiFi observations to generate the radio map.
During the online localization phase, the RSS vectors collected during the walking process constitute the RSS sequence. The length of the RSS sequence is determined by the PDR algorithm. Based on the RSS sequence, RCILS realizes pedestrian localization by matching the sequence with the sequence-based radio map.
3.2.1. Semantic Graph Generation
For activity sequence-based map matching, the indoor map should be converted to semantic graph, in which pathways are the edges and the intersections of the pathways are the vertexes, as shown in
Figure 3. Based on the semantic graph, the location of the vertexes and displacement between each vertexes can be estimated. Moreover, the vertex also contains semantic information, which is used to match activities to the map.
Figure 3 is an example of a semantic graph of the indoor map. The semantic information of the vertexes includes labelling as corner, elevator and stair.
3.2.2. Trajectory Preprocessing
The trajectory of the people in the indoor map has map-related information. On the one hand, the trajectory is restrained by the topology of the map. One the other hand, based on the activity detected during the trajectory, the people’s location can be estimated. That is to say, people’s location can be estimated by matching activities to the vertexes of the graph. In order to match the trajectory to the indoor map, we should first detect the activities and estimate the displacement between each two activities.
(1) Activity detection
In an indoor environment, there are usually three types of activities: turning, taking the elevator, and walking stairs. Turning is the most common activity during the walking process. When a pedestrian turns, the angular velocity would generate a peak waveform, as shown in
Figure 4 [
16]. A turn is detected using the peak detection algorithm, which is used to find the local maximum or minimum during a period of time [
28]. To eliminate the influence of the noise, a Butterworth filter of order 4 is used, with a cutoff frequency of 10 Hz.
Generally, when the elevator rises, there will be an overweight state and a subsequent weightless state. On the contrary, when the elevator descends, there will be a weightless state and a subsequent overweight state. Moreover, the air pressure detected by the barometer can also be used for elevator detection, since the air pressure changes with the change of the altitude. The acceleration and pressure of the elevator activity are shown in
Figure 5. Another activity with pressure change is walking stairs. Differently from using an elevator, during walking stairs, there is neither an overweight state nor a weightless state. The acceleration and pressure of the walking stairs are shown in
Figure 6.
(2) Displacement estimation
The second step of trajectory pre-processing is to estimate the relative displacement between each activity. The distance estimation is implemented by PDR. PDR is a pedestrian localization scheme that estimates the relative displacement by step detection and heading estimation. Step detection is realized by the peak detection algorithm, as shown in
Figure 7. When a step is detected, the location is updated by the following equation:
In Equation (
1),
is the location at time
t.
l is the step length, calculated using the frequency-based model [
29]:
, where
f is the step frequency, and
are parameters that can be trained adaptively based on the matching result obtained based on activity sequence-based map matching, which is introduced in the next subsection.
The step length parameters is trained adaptively based on the matched trajectories. We use
Figure 8 as an example to explain the parameters training algorithm. There is a trajectory which has been matched to the indoor map. Based on the known indoor map information, we can get the length of segments
,
,
,
and
. Meanwhile, the step numbers that users walked passing these segments can be detected by the step detection algorithms. We assumed that the step length during the same segment is equal. In consequence, the step length for each segment can be calculated. The step frequency is determined based on the step detection result. The step length and step frequency for these five segments are indicated as:
=
,
,
,
,
. The parameters
are trained based on vector
using the least squares method.
3.2.3. Activity Sequence-Based Map Matching
We use Hidden Markov Model (HMM) to match the activity sequence to the semantic graph of the indoor map. The activity sequence-based map matching method is shown in
Figure 9.
are the hidden state, namely the nodes of the semantic graph.
is the transition probability from state
to
. The transition is assumed to be uniform over all neighbors of a given node. The observations of the HMM are activity detection results and displacement inferred by PDR, represented by
and
. The subscript
k means the observations are obtained at state
.
and
are, respectively, the observation probabilities of
and
.
describes the probability of correct activity detection for a given hidden state, namely the confusion matrix. According to the principle of PDR,
is made up two parts: distance observation probability distribution and heading observation probability distribution. Here, these two probability distributions are assumed to be Gaussian distributions [
6,
13]. Since distance and heading are independent, the observation probability distributions is defined as
and are, respectively, the standard deviation of the distance and heading. is the distance calculated by PDR, and is the distance between and . is the heading estimated by PDR, and is the angle between vector and north direction. is the distance between and the last matched state (indicated by ), is the distance between and , is the angle between vector and north direction, and is the angle between vector and north direction.
Given the detected activity sequence, activity sequence-based map matching aims to find all nodes where the user completes the activities in the activity sequence. The nodes constitute the trajectory. For an activity sequence, there may be many trajectory candidates in the map. We find the best-matching one by the following equation:
By activity sequence-based map matching, we get the tracking results of the crowdsourcing trajectories, namely the locations where the WiFi RSS vectors are collected. Then, we can use these trajectories and RSS vectors to construct the radio map of the indoor environment.
3.2.4. Radio Map Construction
The radio map is stored by the graph structure, , where V represents the vertexes, E represents the edges, and F represents the RSS vectors on the edges. By activity sequence-based map matching, the trajectories collected by crowdsourcing can be matched to the semantic graph. The activities contained in the trajectories are matched to the vertexes V of the radio map graph, and the RSS vectors collected on the edges E constitute the RSS vectors F.
3.3. Trajectory Fingerprint-Based Localization
In the online localization phase, the target smartphone collects RSS vectors from the surrounding APs. Moreover, by the inertial sensors of the smartphone, the moving distance can be estimated by PDR. Based on the moving distance, we generate a RSS sequence and realize localization by matching the RSS sequence with the radio map graph.
3.3.1. RSS Sequence Generation
During the moving process, we get an RSS sequence with the length of the moving distance. We use
to denote the RSS sequence collected during the moving distance, where
w is the window size and
is the latest collected RSS sample.
,
and
are, respectively, the MAC address and RSS value of the
jth WiFi AP. The RSS sequence can be represented by a
matrix, where
m is the number of the APs and
w is the length of the moving window. The MAC list is
:
3.3.2. Graph-Based Trajectory Search
Based on the RSS sequence generation during the moving window, trajectory fingerprint-based localization is to search the best-match sequence from the radio map graph and determine the location of the best-match sequence as the target’s location.
We use Breadth-First-Search to search the best-match sequence in the graph. Searching in the whole graph needs a large computational amount. In this paper, we determine the start vertex based on the similarity between the AP list of
and that of the vertex. We use the Jaccard similarity coefficient as the similarity parameter. The Jaccard coefficient is a statistic used for comparing the similarity and diversity of sample sets, which has been used for WiFi-based clustering in [
16]. The Jaccard similarity coefficient is calculated using the following equation:
where
is the MAC of the AP list of
, and
is the MAC of the AP list of vertex
i. After determining the first vertex, we conduct Breadth-First-Search
c steps to find the best-match sequence, where
c is the constant, set to 3 herein.
3.3.3. Localization
Trajectory Fingerprint-based localization is to find the best-match sequence based on the collected RSS sequence. During the graph-based trajectory searching, we calculated the similarity metric between RSS sequence and RSS in the radio map graph (called candidate RSS sequence). From
Figure 1, we can see that the RSS values of different paths are different, even for the same smartphone. Therefore, using the RSS value as the similarity metric may cause localization error. In this paper, we use the correlation coefficient as the similarity metric. As before, we use
to denote the RSS sequence collected during the moving distance, as shown in Equation
4. There are
m APs in
, for each AP, we calculate the similarity metric, and use the sum of these metrics as the similarity between
and the candidate RSS sequence:
where
is the RSS set in the collected RSS sequence of the
ith AP, and
is the RSS set in the candidate RSS sequence of the
ith AP:
For the locations with null reading from the AP, −100 dB was used as the RSS value.
For each candidate RSS sequence, we get a similarity coefficient by Equation (
6). We use the k-nearest neighbour (knn) algorithm to determine the best-match sequence and use the location of the terminal as the localization result. In our experiments, we set the k equal to 1 in the knn algorithm.
5. Conclusions
In this paper, we propose a robust crowdsourcing-based indoor localization system. RCILS can automatically construct a WiFi radio map based on the crowdsourcing data. In RCILS, an indoor map is first converted to a semantic graph. The trajectory is preprocessed by activity detection and pedestrian dead-reckoning. By trajectory preprocessing, we get the activity sequence contained in the trajectory. Based on the semantic graph and activity sequence, we match the trajectory to the indoor map to get the location of the trajectory. That is to say, the location where the WiFi RSS is collected is determined by the trajectory matching. Then, the radio map is constructed based on the crowdsourcing trajectories. To overcome the RSS variance problem, we use a trajectory fingerprint model. The experiment results in an office building demonstrate that the proposed RCILS can reduce the variance problem caused by device diversity and environment changes.
In future work, we will include more activities in RCILS, such as opening the door, sitting in the office, and so on. RCILS is an offline system at the moment. We intend to develop an online RCILS system, in which the crowdsourcing data uploading and localization can be realized in real time.