Pedestrian dead reckoning (PDR) is an essential technology for positioning and navigation in complex indoor environments. In the process of PDR positioning and navigation using mobile phones, gait information acquired by inertial sensors under various carrying positions differs from noise contained in the heading information, resulting in excessive gait detection deviation and greatly reducing the positioning accuracy of PDR. Using data from mobile phone accelerometer and gyroscope signals, this paper examined various phone carrying positions and switching positions as the research objective and analysed the time domain characteristics of the three-axis accelerometer and gyroscope signals. A principal component analysis algorithm was used to reduce the dimension of the extracted multidimensional gait feature, and the extracted features were random forest modelled to distinguish the phone carrying positions. The results show that the step detection and distance estimation accuracy in the gait detection process greatly improved after recognition of the phone carrying position, which enhanced the robustness of the PDR algorithm.
With the rapid development of information technology, reliable location-based service (LBS) applications are becoming more and more widely used. LBS applications have become a research hotspot in the current academic and navigation information service industries [
As an LBS positioning technology, PDR is widely used in indoor environments. The main steps are gait detection, heading estimation, and position estimation. When a pedestrian walks, the position in which they carry their mobile phone is not fixed. Common carrying positions include horizontally on the chest, swinging in the hand, making a call, and inside a backpack. At different positions, the motion data obtained by the sensor contain jitter noise of different amplitudes [
Scholars have already had a good effect on pedestrian gait recognition in a single state. In terms of gait detection, Jang et al. [
Two types of mainstream technologies are used for the identification of different mobile phone carrying positions. The first is based on visual image recognition [
Based on the above findings, this paper proposes a multimode PDR gait detection algorithm based on the identification of the pedestrian phone carrying position of PCA/RF algorithms by studying the relationship between mobile phone inertial devices and the mobile phone carrying position. The mobile phone carrying position during the pedestrian’s normal walking behaviour is identified, thereby widening the applicable scenario of the PDR algorithm and providing better, more precise location-based services for the user.
To distinguish the various mobile phone carrying positions, the original inertial data collected by the mobile phone in various carrying positions are first analysed. The aim of this study is closely related to the attitude of the mobile phone, but the module value of accelerometer measurement and gyroscope measurement cannot accurately reflect the attitude information of the mobile phone [
Original accelerometer measurements in various carrying positions.
Original gyroscope measurements in various carrying positions.
Figures
Figures
A comparison of the original data in the four mobile phone carrying positions in Figures
The attitude of the mobile phone differs among various positions. Although the accelerometer and gyroscope have no correlation between the three axes and the two axes, a correlation exists between the three axes when the pedestrian moves. The methods used include splitting the window of original data, analysing the correlation between three axes in the window and uniaxial statistics, forming a feature matrix, and using the random forest [
Recognition of the carrying position of the pedestrian mobile phone can be divided into three steps: first, extraction of the features of the inertial signal of the mobile phone in various carrying positions; second, selection of the extracted features; and third, training the selected feature to obtain the classifier and using this classifier for classification and identification.
In sensor-based pedestrian gait and motion recognition research, the current commonly used time domain features are mean, standard deviation, root mean square, skewness, kurtosis, variance, and covariance [
In the feature extraction stage, to obtain more information about pedestrian mobile phone carrying positions, as many feature extractions as possible are performed, which leads to too many features, some of which may be unrelated or redundant to the mobile phone carrying position. Therefore, it is necessary to use a feature selection algorithm to filter out related features with large correlations and improve the classification accuracy. This paper uses the principal component analysis (PCA) [
PCA is an effective feature linear transformation method proposed by Pearson in 1901. It is widely used in pattern recognition and signal processing. In essence, high-dimensional features are linearly transformed to obtain the feature vector of the original feature, that is, the principal component, with the first few selected as the new feature combination, so that the main information from the original data can be preserved to the greatest extent. The main principles are as follows.
Let each sample have a The new features are obtained by a linear combination of the original features. The new features are irrelevant. The obtained new feature
The calculation steps are as follows: Calculate the covariance matrix of Calculate the The obtained eigenvalues are sorted from large to small, and the top
where
In pattern recognition, various machine learning algorithms influence the recognition effect [
Common classification methods are random forest, K-nearest neighbour, decision tree, Bayesian decision, support vector machine, and others. This study found that the random forest algorithm has the highest recognition rate via multiple attempts and algorithm optimisations, so it is adopted as the main algorithm to recognise the mobile phone carrying positions.
The base classifiers of the random forest algorithm are decision trees. The model is shown in Figure
Random forest model.
The specific process of generating a random forest is as follows: The sample has
Let vectors
When dividing the decision tree attributes, one optimal attribute is selected among the In the process of forming each tree, each node must be split according to step (2) until it can no longer be split. During this process, pruning of the decision tree is not performed.
Each decision tree in a random forest is built on an independent sample, and each tree has the same distribution. The classification error depends on the classification ability of each tree and the correlation between them. Only one decision tree has a limited classification ability, but after random generation of many decision trees, the algorithm can count the classification results of each tree, then vote to select the most likely classification result, and improve the classification accuracy of the random forest as a whole [ All of the
where
The randomness of random forests is reflected in the fact that the training samples of each tree are random, and the classification properties of each node in the tree are also randomly selected. It is precisely because of these two random guarantees that the random forest avoids overfitting. In the construction of random forests, there are two parameters must be controlled by humans. One is the number of trees in the forest. The use of a large number is generally recommended. The other is the number of
The preprocessed three-axis accelerometer and three-axis gyroscope signals are characterised by feature extraction and feature selection, to obtain the signal characteristics that best reflect the different carrying positions of the mobile phone. The feature information obtained by sample processing is input into the random forest for model training, the model is used to identify the test samples, and the recognition result is compared with the real result to obtain the recognition rate of the model. The specific system flow is shown in Figure
System flowchart.
The research designed the experiment to verify the reliability of the algorithm and processed the inertial signals in different carrying positions of the collected mobile phones. Furthermore, this paper used the processed signal features to distinguish the carrying positions, and then gait detection was performed to obtain pedestrians’ real-time travel step number and distance.
InvenSense’s inertial sensors are widely used in smartphones with consistent performance. Therefore, this study selects the MeiLan Note3 smartphone with an InvenSense inertial sensor and high sales as the data collection platform. The main accelerometer and gyroscope parameters are shown in Table
MeiLan Note3 built-in accelerometer and gyroscope parameters.
Manufacturer | Dimension | Measuring range | Resolution ratio | Rated current | Power | Sample frequency | Operating temperature |
---|---|---|---|---|---|---|---|
InvenSense | 3 | 34.90656 | 1.0 m/s^2/1.065 ∗ 10^−3 rad/s | 0.5 mA | 5.5 |
15∼200 Hz | −20∼45°C |
The experimental site is the 5th floor of the J6 Teaching Building of Shandong University of Science and Technology (Figure
Plan view of the experimental site.
By studying the daily behaviour of pedestrians, it is found that the switching process of the carrying position of the smartphone is generally completed within 2-3 seconds. Therefore, the progress of the experiment must be at least greater than the process, but it cannot be too large. Too large will mask the accuracy of the recognition algorithm. By considering the experimental site and the experimental personnel and other factors, it is decided to adopt five sets of data which were collected for each position for 50 steps.
The collected original inertial signal was processed to obtain a signal characteristic that could reflect the position of the smartphone. According to the inertial signal characteristics corresponding to different carrying positions, a random forest classification model was established.
Time domain feature extraction was performed on the collected data, and the gait points were combined to analyse the corresponding time domain features of each step. The location identification features of the mobile phone and their descriptions are shown in Table
Mobile phone location characteristics and descriptions.
Feature number | Feature description |
---|---|
1 | Triaxial acceleration mean |
2 | Triaxial acceleration variance |
3 | Covariance between acceleration axes |
4 | Triaxial gyroscope mean |
5 | Triaxial gyroscope variance |
6 | Covariance between gyroscope axes |
After these steps, 18 features were extracted, as shown in Figure
Feature extraction results.
Figures
Figure
Contribution levels of each feature.
Using the PCA method, 18 sets of feature data were analysed and dimensionality-reduced, and the data reduction to 5 dimensions was calculated using formula (
Before and after data reduction (in the figure, the purple sample points represent the position of the chest, the blue sample points represent the position of the swinging hand, the green sample points represent the call making position, and the yellow sample points represent the backpack position).
Figures
Through a series of processing actions and analyses of original sensor data, a set of samples were obtained to identify mobile phone carrying position. To use the information from the various mobile phone carrying positions to improve the gait detection accuracy of the PDR during complex motion, it is necessary to accurately identify the mobile phone carrying position. This paper first uses different classification models to model the characteristics of different mobile phone carrying positions. Figure
Modelling accuracy of each classifier.
The data shown in Figure
Random forest classifiers are fast, can avoid overfitting very well, and can process large amounts of data. In theory, the greater the number of decision trees in a random forest, the higher the modelling and classification accuracy. However, an excessive number of decision trees will increase the amount of calculation and the time required.
In this paper, the relationship between the number of decision trees in random forests and the accuracy of out-of-bag classification of classifiers is analysed under the premise of ensuring higher classification accuracy, as shown in Figure
Relationship between random forest classification error and number of decision trees.
By analysing the relationship between the classification error of the random forest model and the number of decision trees, as shown in Figures
The established random forest classification model was used to identify the experimental data of the mobile phone carrying position, and the recognition accuracy of the algorithm was obtained. Through the gait detection algorithm corresponding to different carrying positions, the pedestrian’s real-time travel step number and distance were obtained. The following are the specific experimental results.
In this study, the preprocessed three-axis accelerometer and gyroscope signals are extracted in the time domain, and the three-axis mean, variance, and interaxis covariance are obtained to form the feature matrix. PCA is used to select the extracted features to obtain the feature combination matrix that best reflects the mobile phone’s carrying position. The obtained feature combination matrix is modelled as a random forest, and the model is used to identify the carrying positions of the test data. The following results are obtained.
The data in Table
Confusion matrix of smartphone carrying location identification accuracy.
Flat | Swinging | Calling | Backpack | |
---|---|---|---|---|
Flat | 100% | 0 | 0 | 0 |
Swinging | 0 | 100% | 0 | 0 |
Calling | 1.7% | 0 | 98.3% | 0 |
Backpack | 0.4% | 1% | 0 | 98.6% |
The main purpose of this research is to adjust the gait detection parameters for various mobile phone positions to improve the gait detection accuracy in PDR by identifying the mobile phone carrying position. Therefore, after identifying the mobile phone carrying positions, a set of experiments were conducted to test and compare the accuracy of gait detection before and after position identification.
By analysing the daily pedestrian behaviour, it is found that mobile phones are generally held flat in the hand and then moved to other positions. The design experiment route is a straight 45 m line. The experimenter carries the mobile phone in different positions to collect data for the normal gait, with position-switching (horizontal-swinging-horizontal, horizontal-calling-horizontal, and horizontal-backpack-horizontal). There are two groups of data, in which the first two states of each group include a walk of 20 steps and the last state includes travelling 45 m to the end of the route. The number of steps is recorded.
The experimental data are subjected to feature extraction and feature selection, and the established model is used to identify the mobile phone carrying position. The gait detection parameter is then adjusted according to the identified position. The step-length model established by the author [
Experimental results before and after position identification.
No. | Experimental content | Number of steps | Steps detected | Travel distance (m) | ||
---|---|---|---|---|---|---|
Before | After | Before | After | |||
1 | Horizontal-swinging-horizontal | 58 | 52 | 59 | 51.03 | 44.79 |
2 | Horizontal-swinging-horizontal | 59 | 53 | 60 | 53.53 | 44.85 |
3 | Horizontal-calling-horizontal | 60 | 67 | 60 | 48.62 | 44.74 |
4 | Horizontal-calling-horizontal | 61 | 66 | 59 | 47.91 | 45.39 |
5 | Horizontal-backpack-horizontal | 62 | 58 | 61 | 45.41 | 44.67 |
6 | Horizontal-backpack-horizontal | 60 | 58 | 60 | 45.78 | 45.24 |
Gait detection accuracy before and after position identification.
Table
In this paper, a smartphone accelerometer and gyroscope are used as the research object. The time domain features of the accelerometer and gyroscope signals are extracted using a statistical algorithm to form the feature matrix. The PCA algorithm is used to select the feature data that best reflect the mobile phone carrying position. The random forest algorithm is used to train models according to the selected features, and the model is used to identify the mobile phone carrying position and adjust the PDR gait detection parameters. The experimental results show that the identification accuracy of pedestrian mobile phone carrying position based on smartphone inertial sensors, PCA, and random forest classifier is high, and the application of PDR has potential for expansion.
The inertial data of the smartphone used to support the results of this study can be obtained from the author of this article (e-mail:
The authors declare that there are no conflicts of interest regarding the publication of this paper.
This research was supported by the National Key Research and Development Program of China (grant no. 2016YFC0803102), Key Research and Development Project of Shandong Province (grant no. 2018GGX106003), the Graduate Science and Technology Innovation of Shandong University of Science and Technology (grant no. SDKDYC170312), and the Research and Innovation Team Project of Shandong University of Science and Technology (grant no. 2014TDJH101).
Figures S1–S10: comprehensive image analysis.