This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

Smartphone positioning is an enabling technology used to create new business in the navigation and mobile location-based services (LBS) industries. This paper presents a smartphone indoor positioning engine named HIPE that can be easily integrated with mobile LBS. HIPE is a hybrid solution that fuses measurements of smartphone sensors with wireless signals. The smartphone sensors are used to measure the user’s motion dynamics information (MDI), which represent the spatial correlation of various locations. Two algorithms based on hidden Markov model (HMM) problems, the grid-based filter and the Viterbi algorithm, are used in this paper as the central processor for data fusion to resolve the position estimates, and these algorithms are applicable for different applications, e.g., real-time navigation and location tracking, respectively. HIPE is more widely applicable for various motion scenarios than solutions proposed in previous studies because it uses no deterministic motion models, which have been commonly used in previous works. The experimental results showed that HIPE can provide adequate positioning accuracy and robustness for different scenarios of MDI combinations. HIPE is a cost-efficient solution, and it can work flexibly with different smartphone platforms, which may have different types of sensors available for the measurement of MDI data. The reliability of the positioning solution was found to increase with increasing precision of the MDI data.

Smartphone indoor positioning technology is a boost to the rapidly growing mobile location-based services (LBS) industry. As the latest initiative, the In-Location Alliance, formed by 22 member companies, including Nokia, Qualcomm, Broadcom,

Multiple sensors and signals of opportunity have been used for indoor positioning and navigation [

Due to the cost effectiveness and extensive availability of the existing network infrastructure, WLAN signals have been widely used for indoor positioning [

This study develops a smartphone indoor positioning solution using the built-in hardware and computational resources of smartphones. Significant advantages of re-using an existing smartphone platform for positioning include cost efficiency of the positioning solution and the effective combination of measurements from multiple sensors and signals for enhanced positioning performance. Further, the smartphone-based positioning solution is more convenient for integration with related applications and services because smartphones have become a common platform for mobile LBS.

A major challenge in the fingerprinting approach is the large variance of RSSI observables caused by the significantly non-stationary nature of WLAN signals. Most of the previous WLAN positioning solutions pursued the position estimation problem as single-point positioning in which positions were considered as a series of isolated points [

In contrast to previous studies, which commonly utilized simplified motion models, e.g., a linear model, to represent a user’s motion [

The utilization of the HMM methodology incorporates motion dynamics information into RSSI positioning, and it allows for the use of current RSSI measurements in the position estimate as well as historical information regarding the position estimate. For two reasons, the HMM is preferred for the integration of different types of measurements in this study. First, Markov processes do not impose any deterministic form of models to restrict the user’s movement, and they are hence widely suitable for the representation of complicated motion processes of indoor users. Second, the methodology of HMM has been well-developed in mathematics, and the solutions of HMM problems can be used effectively in a smartphone platform to resolve position estimates.

The proposed solution is a hybrid data fusion solution: the WLAN RSSI observables are fused with the measured MDI. The hybrid fusion approach, named HIPE (hybrid indoor positioning engine), was developed with a Nokia N8 smartphone and is currently being implemented with other smartphone platforms. Because different smartphone platforms may have different combinations of sensors available for the measurement of MDI, this paper presents methods for dealing with different scenarios in which different types of MDI are available.

In summary, this paper proposes a smartphone indoor positioning engine that can be easily integrated with mobile LBS. Our positioning solution is a data fusion scheme, and it uses the smartphone built-in sensors to physically measure the motion dynamics information of indoor users. In comparison with previous works, our solution is more widely applicable for various motion scenarios and different smartphone platforms. Two algorithms of HMM problems,

The rest of this paper is organized as follows: Section 2 provides an overview of the related research in WLAN positioning and pedestrian motion estimation using smartphone sensors; Section 3 presents the methods of measuring pedestrian MDI with a smartphone. The proposed positioning solution is presented in Section 4. Section 5 evaluates the proposed solution with experimental results. Finally, Section 6 concludes the paper and provides directions for future work.

Two basic approaches are used for the estimation of locations with WLAN RSSI measurements. The trilateration-based approach first translates RSSI measurements into the distances between a mobile user and multiple access points (APs) based on a radio propagation model and then calculates the user’s location using the obtained distances and AP coordinates [

Many of the previous methods used memory-less or single-point positioning approaches, which only utilize current RSSI measurements discretely for determining a position estimate [

Motion dynamics describe the correlation of the spatial coordinates of user positions over time. In previous studies, two approaches have been proposed to use motion dynamics information for improving positioning accuracy. One approach represents a user’s motion with a set of predefined motion models, which describes the time evolution of the user’s positions [

The applicability of these solutions is restricted by the fidelity of the motion models. When considering general users, for example, in an office or in a shopping center, the commonly used models are insufficient for the representation of indoor user motion, which may involve abrupt turns or stops. The motion dynamics of a pedestrian user are especially complex: user motion is governed by decision models, purpose of the movement, choice of destination, and interactions with other people or objects in the environment. An incorrect model results in inaccurate estimates [

In our smartphone positioning solution, the built-in smartphone sensors offer the ability to physically measure the motion dynamics information, including the distance moved and the heading. Three types of methods have been developed in past works to measure pedestrian distance. One is direct foot-to-foot step length estimation using a six-degree-of-freedom inertial measurement unit (IMU), installed on the feet [

Heading can be determined using two approaches. An absolute direction can be directly measured or estimated by sensors, such as a digital compass or GPS, while a relative change in heading can be measured by gyroscope sensors. A relative heading change can be further used to calculate an absolute heading based on a previously determined heading. The first approach is attractive because it directly produces an absolute heading. However, GPS depends on the visibility of signals in space and is usually not available indoors. A digital compass is self-contained, and it can output measurements ubiquitously. Digital compasses, however, are susceptible to errors, including effects from electric devices and steel structures, and calibration and filtering processing are needed to improve compass accuracy.

On the contrary, a gyroscope can be used to measure a relative direction change with no impacts from the environment. As the gyroscope measurements are integrated over time, however, the error increases over time; hence, an external reference is needed for periodic calibration. To further improve heading results, motion recognition methods can be used to detect motions that may cause heading changes. For example, a U-turn may indicate a rotation of 180° [

This paper employs a 3-axis accelerometer and a digital compass, which are available in the smartphone platform used (Nokia N8), to measure MDI data at run time. We limit the scope of this work to MDI estimation using these two sensors to demonstrate the effectiveness of the proposed positioning solution. Other sensors and techniques of MDI estimation, e.g., vision-based techniques, will be integrated with HIPE in the future.

Motion dynamics are defined in this paper as position changes over time, which are represented by the distance moved and the movement heading. Smartphone sensors can be used in different capacities to measure the motion dynamics of a user. Traditionally, one method to estimate changes in location and direction is by using an IMU, which typically consists of accelerometers, gyroscopes and/or compasses. In a platform where the attitude is known, acceleration measurements are integrated once to determine speed and twice to determine travelled distance. The movement heading of the platform is observed by a gyroscope and a compass, which provide the measurements of heading change and absolute heading, respectively. However, this approach is not applicable to the scenario of smartphone users. Built-in smartphone sensors are commonly low-cost and have worse performance than traditional IMUs. Furthermore, the integration operation is not suitable for smartphone pedestrian scenarios due to the lack of knowledge about the platform’s attitude. It is not practical for a pedestrian user to maintain the device in a fixed attitude, and it is also complicated to estimate a changing smartphone attitude using the built-in sensors.

Various sensors included in modern smartphones can provide multiple approaches to measure the MDI of a pedestrian user. This section presents the methods used in this study to estimate the distance moved and heading using an accelerometer and a digital compass, respectively. Presentation of how the estimated MDI is used in the proposed positioning solution follows in the section after.

In this study, the pedestrian motion distance is estimated using two procedures: step detection and step length estimation, both of which are widely used in the pedestrian dead reckoning (PDR) approach. The fundamental idea behind the PDR approach is derived from pedestrian acceleration characteristics [

A walking step event can be explicitly divided into two phases. In the first phase, one foot of a pedestrian is in contact with the ground, and in the shorter second phase, both feet are in contact with the ground. Step detection is used to identify these two-phase step events. Once the step events have been detected, the step length and the step heading of particular steps are determined subsequently.

The pedestrian acceleration characteristics are measured with a smartphone three-axis accelerometer, which outputs a three-dimensional (3D) composite acceleration vector due to Earth’s gravity and pedestrian acceleration. It is difficult to separate pedestrian acceleration from that of gravity because the sensor attitude is unknown. In the PDR approach, the norm of 3D acceleration is used to detect the step events and estimate the step length. When the device is stationary, the magnitude of the gravity is learned by taking the average of the acceleration norm for a certain period, e.g., 1 s. Then, gravity is separated from the acceleration norm to obtain the pedestrian acceleration as follows:
_{p}_{t}

Using the acceleration measurements, step detection and step length estimation can be accomplished through different methods [

The heading is measured directly in this study with the digital compass of the smartphone. According to the phone’s software development kit (SDK) documents [

Compasses are susceptible to magnetic interferences and must be calibrated after being placed near anything that bears a magnetic force. The accuracy of a compass may be affected by any nearby ferromagnetic materials. In the SDK [

This paper evaluates compass measurements of the smartphone in real indoor dynamic environments, and the obtained values of accuracy are used as tolerance thresholds in the proposed positioning solution.

Using the distance moved and the heading, user locations are correlated over time. Current positions are recursively propagated in a locally horizontal frame during a successive process from a previously determined position as follows:
_{t}_{t}

This section presents the proposed smartphone positioning solution, named hybrid indoor positioning engine (HIPE). The proposed HIPE solution was implemented with a Nokia N8 smartphone. The device runs on the Symbian^3 operating system (OS), and it has a CPU (central processing unit) clock rate of 680 MHz (ARM™ 11) and an internal memory of 135 MB [

The methodology of HMM is adopted in this study to fuse the MDI data, the current RSSI observables and the historical information of position estimates.

This section first introduces the fundamentals of hidden Markov models and the related solutions of HMM problems, and it then presents the methods of position estimation based on HMM with an emphasis on the utilization of MDI to augment WLAN positioning.

The concept of hidden Markov models arises from the well-known Markov model in which each state corresponds to a physically observable symbol. Observable Markov models are too restrictive for application to many problems of interest because they require each state to be directly observed. Subsequently, the concept of Markov models is extended to include the case of hidden Markov models, in which states are not directly observable (hidden), and an observation is a probabilistic function of the hidden states. In the HMM, the underlying stochastic process (state evolution) is not directly observable, but it can be observed in the Bayesian sense through another set of stochastic processes, which produce the sequence of observables. Hidden Markov models are significantly more applicable in the real world than observable Markov models when physical states of interest are largely unobservable. The basic theory and selected applications of HMM have been presented with details in [

A general hidden Markov model characterizes a physical system with a state-space model, as shown in

_{1}, _{2}, …, _{N}

^{1}, ^{2}, …, ^{M}

_{ij}_{ij}_{i}_{j}_{ij}_{t+1} = _{j}|X_{t}_{i}

_{j}_{j}_{j}

_{i}_{i}_{i}_{i}_{1}_{i}

The principle of HMM has been used in numerous applications, and the evaluation problems associated with HMM can be categorized into three groups: the estimation of the probability (or likelihood) of an observable sequence given a specific HMM; the determination of a best sequence of model states, given an HMM and an observation sequence; and the learning of model parameters to best account for the observed signals [

In the problem of position estimation, a hidden Markov model represents the temporal correlation of a user’s positions without the restriction of any particular forms of motion models. The solution of the position estimate acts as the central processor for data fusion to combine MDI data and RSSI observables. In this paper, two algorithms of HMM problems,

The grid-based filter solution gives the state estimate that has the maximum posterior probability, while the Viterbi algorithm produces the most likely state sequence that has produced the observable sequence [

In the HMM approach, a user’s positions are the hidden states to be estimated, and the sequence of positions has the Markov property. Observables in this study are WLAN RSSI, and the emission probabilities of observables are probabilistic RSSI-position dependent, obtained from a knowledge database, which is created in a prior learning phase and uses a parameterized Weibull function to represent the RSSI-position dependence [

In the position estimation problem, the state transition probability of a pair of states, _{ij}

In our HIPE solution, the state transition probabilities are refined by MDI data. The shortest accessible distance and direction between any two states are calculated with their coordinates and are stored as a look-up table in the prior knowledge database. The utilization of a look-up table reduces the computational complexity of the online positioning phase. It should be noted that a physically accessible route is usually bounded by the layout of an indoor environment. For example, one cannot walk through a wall.

A user’s MDI, including the distance moved and the heading, is measured at run-time by the smartphone accelerometers and compass, respectively, and it is then compared with the distance and direction for a pair of state candidates related to the previous and current epochs, which are looked up from the knowledge database. As a result, a higher state transition probability (^{h}^{l}

In the HIPE solution, the value of

To make the HIPE positioning engine usable with different smartphone platforms, it is necessary to address different situations of MDI availability because different smartphone platforms may have different sensors available. This subsection presents the flexibility of the HIPE solution to cope with situations when either partial or no measured MDI data are available.

The four scenarios given in

When only the distance moved is measured (the scenario “Measured distance” in _{Dist} defined by _{j}_{i}

For this case, the subset _{Dist} of state candidates is located within the ring zone around the point

When only the heading is measured and an empirical constant speed model is used to calculate a maximum walking range within a time interval (the scenario “Measured heading & assumed speed” in _{Heading} defined by

For this case, the subset _{Heading} of the state candidates is located within the sector zone radiating from point

When both the distance moved and the heading are measured (the scenario “Measured distance & heading” in _{Dist} and _{Heading} is the subset of state candidates possessing higher transitional probabilities, as defined by

In this case, the subset _{Heading} of state candidates is located within the intersection zone of the ring and the sector area, as shown

Finally, when neither the distance moved nor the heading is measured, the proposed solution is still usable. In this case, the maximum speed model is used to calculate a maximum walking range within the epoch time interval (the scenario “Assumed maximum speed” in _{range} defined by

In this case, the subset of state candidates _{range} is located within the whole circle area as shown in

In summary, this subsection indicates that the availability and accuracy of the measured MDI data have a direct impact on the calculation of transitional probabilities in the proposed solution. A robust positioning system should be able to recover a correct positioning result even if incorrect MDI data have been provided or erroneous positioning results have been produced in previous epochs. The proposed solution uses two practices to achieve robustness: First, it constraints all transitional probabilities to values greater than zero. In other words,

Secondly, the scale

In contrast to previous studies that impose deterministic forms of motion models, the proposed HIPE solution measures the changing MDI using the smartphone sensors. Additionally, flexibility is important for the HIPE solution to work with different MDI combinations, thus it is usable with different smartphone platforms, which may have different types of sensors available for MDI measurements.

The proposed HIPE solution was evaluated through a field experiment conducted on the third floor of an office building, occupied by the Finnish Geodetic Institute (FGI). The office building has a total of three floors, and it is a typical office environment, including corridors, office rooms, an elevator, staircases, and electronic devices, such as computers and printers.

This section first evaluates the accuracy of the measured MDI data,

To evaluate the sensor measurements and the positioning results, three statistical error types are used,

For the compass and moved distance measurements, the error _{t}_{t}

For positioning results, the error

The calculations for RMSE, EM, and ME are defined as follows:

For the distance moved, a relative error rate is calculated for each test case to evaluate the case-by-case accuracy of the step length model:

A mean error rate is calculated for all cases to evaluate whether there is any bias in the step length model:

The smartphone compass was evaluated in a real indoor navigation scenario, where a tester held the device in hand and moved naturally in a manner of his or her choosing, which mean the tester can walk freely around the testing area and he/she can start or stop walking at any time. Before the experiments, the compass was calibrated by rotating the device in a number eight pattern for roughly one minute until it had the highest calibration level [

The true-north directions of the walking routes are adjusted with magnetic declination to obtain magnetic-north directions. The magnetic declination is the angle between magnetic north and true north, and its value can be acquired from [

The obtained magnetic-north directions were used as the references for comparison with the compass measurements. The differences were considered as measurement errors, which can be caused by multiple factors, e.g., sensor noise, environmental disturbance, body swings of the tester,

Two testers each operated an experiment that included two motion states, walking and stationary.

This experiment was conducted in a real pedestrian navigation scenario, and a pedestrian held the device in hand and moved naturally in a manner of his or her choosing. Within the same experimental environment, two testers each performed a test.

With measurements of the smartphone accelerometers, HIPE recognizes the current motion states, either stationary or walking. When it is recognized that the pedestrian is walking, HIPE counts the number of steps and further calculates the walking distance by multiplying the step number with an empirical step length of 0.7 m per step [

Raw accelerometer measurements are output at a rate of 35 Hz, and the blue line in

It can be observed that recognition of the static state is highly reliable because there is no walking state detected during static segments. This means that, when HIPE recognizes the current motion state as static, the result can be used with high confidence. For example, the ratio

To enhance the robustness of the positioning solution, the HIPE solution can tolerate a larger error in the distance estimate than the above experimental results. As shown in

Using the accuracy results of the MDI data evaluated in Sections 5.1 and 5.2, the proposed smartphone positioning solution was tested in the office environment described above. The tester held the smartphone and moved around in the test area in a manner of his choosing so that he could start and stop walking at anywhere any time. The experiment spanned for more than 1,500 s with approximately 160 RSSI observation epochs. This positioning test lasted for a longer period than the previous tests in Sections 5.1 and 5.2, and it did not use a predefined testing route for real performance evaluation.

For the error calculations, the time instance was recorded when each reference point was passed. The actual position of each RSSI observation epoch was then computed through interpolation utilizing the pedestrian dynamics information. The actual positions were used as the references in

As stated earlier, HIPE can work flexibly with different smartphone platforms, which may have different types of sensors available for the calculation of motion dynamics information. This subsection compares the positioning results that were produced by the grid-based filter algorithm using different combinations of MDI and the same RSSI measurements. The scenarios of different combinations of MDI are defined in

In this study, the proposed HMM solutions were compared with the classic method of MLE (maximum likelihood estimation). The MLE method is a classic fingerprint algorithm used in many previous studies [

As shown in

To gain insight into the distribution of the positioning errors,

As previously described, both solutions of the HMM problems,

This paper presented a smartphone indoor positioning engine named HIPE. Because the operation of HIPE only uses the built-in hardware and computational resources of a smartphone, the positioning solution presented here is more cost-efficient and convenient for integration with related applications and services than alternative systems presented previously.

The proposed HIPE solution is a hybrid solution, fusing multiple smartphone sensors with WLAN signals. The smartphone sensors are used to measure the motion dynamics information of the mobile user, and the MDI data augment the WLAN positioning by mitigating the impact of RSSI variance. In this paper, two algorithms of HMM problems,

In comparison to previous studies, which have commonly used deterministic motion models, the proposed HIPE solution is more widely applicable for various motion scenarios because it measures actual motion dynamics using smartphone sensors. The experimental results of the indoor positioning experiment showed that HIPE has adequate positioning accuracy and reliability. The accuracy of the positioning solution increased with increasing usage of MDI data.

The HIPE was implemented in this paper with the Nokia N8 smartphone, and it can be transferred to different smartphone platforms, even if such platforms utilize different combinations of sensors for MDI data measurement. This paper has presented the methods used to address different scenarios in which the various types of MDI are available.

In the future, other smartphone sensors, such as cameras and gyroscopes, will be integrated with HIPE to measure MDI. Three novel LBS smartphone applications, such as iParking [

This work was supported in part by the project iSPACE (indoor/outdoor Seamless Positioning and Applications for City Ecosystem) funded by TEKES (Finnish Funding Agency for Technology and Innovation) together with the Finnish Geodetic Institute, Nokia Inc., Fastrax Ltd., Space Systems Finland Ltd., Bluegiga Ltd., and Indagon Ltd. The authors thank Tuomas Keränen and Ahsan Feroz, two students from Aalto University, Finland, for their help in conducting the experiments. This work was also supported in part by the National Natural Science Foundation of China (Grant No. 41174029, 41204028).

The smartphone body frame defined for the Nokia N8 consists of three axes and six directions, and it uses the right-hand Cartesian coordinate system. The various sensors all use the common body frame.

The acceleration patterns of a pedestrian in stationary and walking states.

The interface of the HIPE allows developers to select the sensor options. The graphical interface is not required when the engine is embedded into a specific application.

The general high-level architecture of the HMM solution that fuses the measurements of the sensors and WLAN to estimate the absolute positions.

The representation of a physical system by a hidden Markov model.

The grid points in the black areas indicate candidate states that have higher transitional probabilities based on the different combinations of MDI available. The other grid points indicate candidate states of lower transitional probabilities. The triangle point

The layout and indoor environment of the experimental area.

The heading measurements of the smartphone compass and the corresponding reference in an indoor environment.

The results of motion state recognition and step detection based on the periodic acceleration pattern of a pedestrian. The blue line is the smoothed pedestrian acceleration, and the green circles indicate the detected steps.

The epoch-by-epoch positioning errors of the HMM solutions and the MLE solution. The HMM solutions use different combinations of MDI as defined in

The cumulative probability distributions of the positioning errors related to the HMM solutions and the MLE solution. The HMM solutions use different combinations of MDI, as defined in

A comparison of the positioning accuracy of the Viterbi algorithm and the grid-based filter in terms of (

Different scenarios using various combinations of MDI.

Measured distance & heading | accelerometers | compass |

accumulated step lengths | directly measured | |

Measured distance | accelerometers | --- |

accumulated step lengths | unknown | |

Measured heading & assumed maximum speed | --- | compass |

a constant speed model of 1 m/s | directly measured | |

Assumed maximum speed | --- | --- |

a constant speed model of 1 m/s | unknown |

The smartphone digital compass error statistics for stationary and walking states.

RMSE (°) | 9.50 | 12.24 | |

EM (°) | −0.33 | −6.02 | |

ME (°) | 21.18 | 35.82 | |

Number of measurements | 2984 | 2686 | |

RMSE (°) | 27.25 | 26.59 | |

EM (°) | −5.72 | −5.06 | |

ME (°) | 174.30 | 165.71 | |

Number of measurements | 1420 | 1265 |

The evaluation results for step detection and the distance moved estimation in the indoor office environment.

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||
---|---|---|---|---|---|---|---|---|---|

Duration (s) | 40.2 | 39.7 | 38.8 | 38.9 | 35.7 | 41 | 35.4 | 35.9 | |

Step number | True | 61 | 62 | 60 | 60 | 55 | 57 | 57 | 56 |

Estimated | 60 | 59 | 60 | 58 | 54 | 55 | 53 | 55 | |

True distance | 39 | 39 | 39 | 39 | 39 | 39 | 39 | 39 | |

Estimated distance | 42 | 41.3 | 42 | 40.6 | 37.8 | 38.5 | 37.1 | 38.5 | |

Error of the estimated distance | Error rate | 7.7% | 5.9% | 7.7% | 4.1% | −3.1% | −1.3% | −4.9% | −1.3% |

Mean error rate | 1.86% |

The parameter settings used in the HMM solutions.

Tolerated motion distance error | ±10% of a distance estimate, at least 1.5 m |

Tolerated heading error | 55° |

[200, 200,000] |

The positioning error statistics of the grid-based filter algorithm using different combinations of MDI (unit: m).

Measured distance & heading | 3.09 | 2.07 | 6 |

Measured distance | 3.17 | 2.14 | 9 |

Measured heading & assumed speed | 3.48 | 2.30 | 15 |

Assumed speed | 3.87 | 2.56 | 15 |

MLE | 4.43 | 3.07 | 15 |