Next Article in Journal
Freeze Desalination as Point of Use Water Treatment Technology: A Case of Chromium (VI) Removal from Water
Previous Article in Journal
Analysis of Swing Movement in Ballroom Dancing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Smartphone Motion Mode Recognition †

Rafael, Advanced Defense Systems LTD., POB 2250, Haifa, 3102102 Israel
*
Author to whom correspondence should be addressed.
Presented at the 4th International Electronic Conference on Sensors and Applications, 15–30 November 2017; Available online: http://sciforum.net/conference/ecsa-4.
Proceedings 2018, 2(3), 145; https://doi.org/10.3390/ecsa-4-04929
Published: 14 November 2017

Abstract

:
The possibility of using mobile devices, such as smartphones, for locating a person indoor is becoming more attractive for many applications. Among them are health care and safety services, commercial and emergency applications. One of the approaches to find the smartphone position is known as Pedestrian Dead Reckoning (PDR). PDR relies on the smartphone low-cost sensors, such as accelerometers, gyroscopes, barometer and magnetometers. An appropriate calibration phase to find the step length algorithm gains is required before PDR can be applied. These gains are very sensitive to the user and smartphone mode. In this research, we employ machine learning classifications algorithms in order to recognize and classify the pedestrian and smartphone modes. A methodology of training on a single user and testing on multiple users is proposed and experimentally evaluated Results show successes in classifying the user and smart phone modes.

1. Introduction

The possibility of using mobile devices (such as smartphones) for locating a person is becoming more and more attractive for many applications. Among them are health care services, commercial applications, emergency applications and safety services as [1]. While in outdoors, the positioning of a person by its smartphone is usually based on Global Navigation Satellite Systems (GNSS) [2]. However, in indoor environments the availability of satellite signals cannot be guaranteed and GNSS based services can be highly degraded or totally denied.
In such situations, one of the approaches to find the position of the smartphone is known as Pedestrian Dead Reckoning (PDR) [3,4]. PDR may rely on the smartphone low-cost sensors such as accelerometers, gyroscopes and magnetometers. In general, PDR uses the accelerometers to detect the pedestrian steps and then estimate the step length. Next, the heading is obtained from the gyroscopes and/or magnetometer. Given the pedestrian initial conditions and by using the current heading and step length size, the current pedestrian position can be found. An appropriate calibration phase to find the step length algorithm gains is required before PDR can be applied. These gains are very sensitive to the user and smartphone mode as recent papers such as [5], showed that by recognizing the mode of the smartphone (handheld, in a pocket, texting and etc) and/or the pedestrian (walking, running, elevator and etc.) [6] (and an comprehensive survey paper [7]) the accuracy of PDR algorithms can greatly be improved.
In this research, we employ machine learning classifications algorithms in order to recognize and classify the smartphone modes. A methodology of training on a single user and testing on multiple users is proposed and experimentally evaluated Results show successes in classifying the user and smart phone modes.
The rest of the paper is organized as follows: Section 2 describes the methodology and strategy used for the mode recognition process. Section 3 presents the experimental setup and results and Section 4 gives the conclusions.

2. Methodology

The overview of the classification process for mode recognition is illustrated in Figure 1. In the data acquisition phase, the data required for the training and prediction steps is collected using the smartphone sensors. In the classification phase, the data is being preprocessed (noise reduction, outliers rejection and etc.) and relevant features are extracted. Utilizing those features a classification model is chosen after processing the training data. The classification model is then used on the collected test data to perform mode recognition.

2.1. Strategy

In this research we use a single user with a single phone for data collection required in the training process. Of course, collecting data from multiple users and multiple phones would probably make the classifier more robust, yet we focus here on single phone and single user data collection. The collected data is based on the accelerometers and gyros raw data. Other smartphone sensors such as magnetometer, barometer, light sensor, sound-meter and etc are not used. The accelerometer and gyro raw data are a vector of specific force and a vector of the angular velocity, respectively. Given these vectors, their magnitude is calculated. Features are extracted based solely on the magnitudes of the specific force and angular velocity vectors. The specific force and angular rate vector components where not used because they are sensitivity to the smartphone orientation in the person hand or pocket.
The magnitude based features are used in the training process which outputs the best classifier to be used in the prediction phase. The prediction phase input is a set of collected data from multiple users and multiple phones. The output of the prediction step is a measure of the accuracy of the chosen classifier to recognize the user and smartphone mode. This research strategy is illustrated in Figure 2.
The data was collected during four smartphone modes: (1) pocket; (2) swing; (3) texting and (4) talking while the user is walking in normal or fast walking speed.

2.2. Smartphone Sensors

We use only the inertial sensors of the smartphone, that is accelerometers and gyros for our analysis. The three-orthogonal accelerometers measures the specific force vector
f = [ f x f y f z ] T
and the three-orthogonal gyroscopes measure the angular rate vector
ω = [ ω x ω y ω z ] T
both without an external reference [8,9]. The smartphone accelerometers and gyros are Micro-Electrical-Micro-Mechanical (MEMS) based sensors.
Loosely speaking, the basic working principle of a MEMS accelerometer is described using a proof mass [2,10]. Consider, a proof mass which is free to move with respect to the accelerometer case along the accelerometer’s sensitive axis, restrained by springs. When an accelerating force along the sensitive axis is applied to the case, it will move with respect to the mass until the acceleration of the mass due to the asymmetric forces exerted by the springs matches the acceleration of the case due to the externally applied force. The resultant position of the mass with respect to the case is proportional to the acceleration applied to the case. Thus, by measuring the position of the mass, the applied acceleration is found.
MEMS gyros working principle can be described using a vibratory beam [2,10]. Consider, a vibratory beam element that is driven to undergo simple harmonic motion. Application of angular rate perpendicular to the motion of the beam gives rise to Coriolis acceleration along the axis perpendicular to both the driven vibration and the projection of the angular rate vector. Measuring the Coriolis acceleration enables the extraction of the applied angular rate.

2.3. Feature Extraction

On each working window (as will be defined in the following section) two types of features are used: (1) statistical features and (2) time-domain features. All features were calculated on the magnitude of the specific force vector
f m = f x 2 + f y 2 + f z 2
and the magnitude of the angular rate
ω m = ω x 2 + ω y 2 + ω z 2

2.3.1. Statistical Features

  • Mean. The mean of a signal.
  • Median. The median is the middle value separating the higher half of a data sample from the lower half.
  • Standard deviation. The square root of the variance (measure of the spread of data around the mean).
  • Average absolute difference. Measure of the spread of data around its mean, taking the absolute difference between values and the mean.
  • Interquartile range (iqr). It is the difference between 75th percentile and 25th percentile of the data where percentile of Y % is the value separating the higher 100- Y % of a data sample from the lower Y % of the data.
  • Skewness. A measure of the asymmetry of the probability distribution of a signal.
  • Kurtosis. A measure of the ‘tailedness’ of the probability distribution of a signal.
  • Signal energy. The sum of the squares of signal values.
  • Signal magnitude area. The sum of absolute values of a signal.
  • Max. The maximum value in the window of the signal.
  • Min. The minimum value in the window of the signal.
  • Amplitude. The absolute difference between the maximum value and minimum value.

2.3.2. Time-Domain Features

  • Number of peaks. The count of the number of maximum points within the desired window of the signal where the maximum points should be above a predefined value and located after w samples from the last maximum point.

2.3.3. Cross Sensor Features

  • Gyro-Accelerometer Correlation. Is the cross-correlation coefficient between the gyro and acceleration sensors.
  • Gyro-Accelerometer Maximum. The multiplication result of the gyro and acceleration maximum values.
  • Gyro-Accelerometer Standard Deviation. The multiplication result of the gyro and acceleration standard deviation values.

3. Experimental Results and Discussion

3.1. Experimental Setup

The acceleration and gyro data was collected in a sampling rate of 50 Hz. After the collection the corresponding magnitudes were evaluated. An outliers rejection algorithm was applied to remove samples which are over 3 standard deviations from the signal. On the remaining data a sliding window with length of 128 samples ( 2.5 s) was applied with an overlapping of 127 samples.
The data was collected from a single smartphone and from a single user during four smartphone modes: (1) pocket; (2) swing; (3) texting and (4) talking while the user is walking in normal or fast walking speed. The total number of windows in each mode is presented in Table 1 for the training and test datasets. The test database was collected from six persons - five men and one woman with different smartphones.

3.2. The Learning Process

We examined four types of machine-learning classifying algorithms [11,12]: (1) multi-class Support vector machine (SVM); (2) Random Forest (RF); (3) K-nearest neighbor (KNN) and (4) Multi-layer Perceptron classier (MLP). Accuracy was chosen as the performance measure in the presented analysis. Accuracy is the measure of the proportion of all cases which have been correctly classified out from the total cases. The accuracy of each classifier on the test dataset is given in Table 2. All classifier obtained an accuracy above 82.5% in particular RF achieved an accuracy of 86.7% .
Focusing on RF, the confusion matrix is illustrated in Figure 3. There, each column is the predicted motion mode as labeled at the bottom of the column while the true mode is labeled at the beginning of each row. The taking mode was best recognized with 96 % accuracy while the swing mode was the worst recognized with 79 % accuracy. It appears that the most challenging case was to distinguish the swing mode from texting and pocket modes.
Feature importance, based on RF classier, is shown in Figure 4. The most dominant feature is the gyro amplitude (ampgyro) followed by accelerometer amplitude (ampforce) and the amplitude multiplication between the two (AmpAccGyro). Other dominant features where the signal energy of the gyro (enygyro) and acceleromter (enygforce) and the number of peaks of the gyro and accelerometer (peaksgyro, peaksgforce).

4. Conclusions

In this research we proposed and demonstrated a methodology for recognizing smartphone mode. Experimental results showed an accuracy of 86.7% in the mode recognition process. Such a mode recognition approach can help improve the performance of PDR algorithms.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rainer, M. Indoor Positioning Technologies. Ph.D. Thesis, Swiss Federal Institute of Technology Zurich, Zurich, Switzerland, 2012. [Google Scholar]
  2. Groves, P.D. Principles of GNSS, Inertial and Multisensor Integrated Navigation Systems, 2nd ed.; Artech House: Norwood, MA, USA, 2013. [Google Scholar]
  3. Cliff, C.; Randell, D.; Muller, H.L. Personal position measurement using dead reckoning. In Proceedings of the Seventh IEEE International Symposium on Wearable Computers, White Plains, NY, USA, 21–23 October 2003; pp. 166–173. [Google Scholar]
  4. Beauregard, S.; Haas, H. Pedestrian Dead Reckoning: A Basis for Personal Positioning. In Proceedings of the 3rd Workshop on Positioning, Navigation and Communication, Hannover, Germany, 16 March 2006. [Google Scholar]
  5. Qian, L.; Ma, J.; Ying, R.; Liu, P.; Pei, P. An improved indoor localization method using smartphone inertial sensors. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), Montbeliard-Belfort, France, 28–31 October 2013; pp. 1–7. [Google Scholar]
  6. Elhoushi, M.; Georgy, J.; Noureldin, A.; Korenberg, M. Online motion mode recognition for portable navigation using low-cost sensors. J. Inst. Navig. 2015, 62, 273–290. [Google Scholar] [CrossRef]
  7. Elhoushi, M.; Georgy, J.; Noureldin, A.; Korenberg, M. A Survey on approaches of motion mode recognition using sensors. IEEE Trans. Intell. Transp. Syst. 2017, 18, 1662–1686. [Google Scholar] [CrossRef]
  8. Jekeli, C. Inertial Navigation Systems with Geodetic Applications; Walter de Gruyter: Berlin, Germany, 2000. [Google Scholar]
  9. Titterton, D.H.; Weston, J.L. Strapdown Inertial Navigation Technology, 2nd ed.; The American Institute of Aeronautics and Astronautics and the institution of electrical engineers: Reston, VA, USA, 2004. [Google Scholar]
  10. Kempe, V. Inertial MEMS Principles and Practice; Cambridge University Press: Cambridge, UK, 2011. [Google Scholar]
  11. Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning, Data Mining, Inference and Prediction, 2nd ed.; Springer: Berlin, Germany, 2009. [Google Scholar]
  12. Raschka, S. Python Machine Learning; Packt Publishing: Birmingham, UK, 2016. [Google Scholar]
Figure 1. Overview of the classification process for mode recognition.
Figure 1. Overview of the classification process for mode recognition.
Proceedings 02 00145 g001
Figure 2. Research methodology.
Figure 2. Research methodology.
Proceedings 02 00145 g002
Figure 3. Confusion matrix of the four smartphone modes.
Figure 3. Confusion matrix of the four smartphone modes.
Proceedings 02 00145 g003
Figure 4. Feature importance.
Figure 4. Feature importance.
Proceedings 02 00145 g004
Table 1. Number of windows used for each smartphone mode
Table 1. Number of windows used for each smartphone mode
ModeNumber of Windows TrainingNumber of Windows Test
Pocket38,4926320
Swing60,81217,523
Talking27,6977348
Texting27,43413,655
Table 2. Accuracy Results
Table 2. Accuracy Results
ClassifierAccuracy (%)
MLP86.2
SVM84.1
KNN82.7
RF86.7
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Klein, I.; Solaz, Y.; Ohayon, G. Smartphone Motion Mode Recognition. Proceedings 2018, 2, 145. https://doi.org/10.3390/ecsa-4-04929

AMA Style

Klein I, Solaz Y, Ohayon G. Smartphone Motion Mode Recognition. Proceedings. 2018; 2(3):145. https://doi.org/10.3390/ecsa-4-04929

Chicago/Turabian Style

Klein, Itzik, Yuval Solaz, and Guy Ohayon. 2018. "Smartphone Motion Mode Recognition" Proceedings 2, no. 3: 145. https://doi.org/10.3390/ecsa-4-04929

Article Metrics

Back to TopTop