Carrying Position-Independent Ensemble Machine Learning Step-Counting Algorithm for Smartphones
Abstract
:1. Introduction
- A system to keep the clock of the pressure insole consistent with the smartphone’s clock.
- Shut down of the data recording application that has been running in the background for too long, resulting in incomplete data recording.
- A plantar pressure and smartphone acceleration data-collection system.
- Data processing methods to convert raw plantar pressure data and smartphone acceleration data into datasets usable by machine learning models.
- A carrying position-independent step-counting algorithm, which detects the position through a classification model, and then uses the corresponding regression model to count steps.
- An evaluation of the proposed step-counting algorithm based on extensive samples collected from six participants, and a comparison of the performance of our approach to a commercial pedometer.
2. Methods
2.1. Data Acquisition
- The smartphone connects to the Arduino board and sends the current 13-digit timestamp after the user clicks the start recording button. The Arduino board starts recording the plantar pressure data and adding the timestamp. The smartphone starts recording the acceleration data.
- The Arduino board sends the pressure data and timestamp to the smartphone at 30 Hz.
- After the user clicks the stop recording button, the smartphone will disconnect after the last data received from the Arduino board.
2.1.1. Acceleration Data Collection Module
2.1.2. FSR-Based Pressure Data Collection Module
- FSR sensorResearchers favor FSR sensors because of their simplicity, flexibility, low cost, and high durability. We used IMS-C20A FSR sensors to collect plantar pressure data. The IMS-C20A FSR sensors were circular and 20 mm in diameter. The sampling frequency of pressure data was 30 Hz. The IMS-C20A FSR sensors have a sensitivity range of 0.05 kg to 6 kg. Pressures above or below this range will hardly cause changes in resistance values. Therefore, we identified values less than 0.5 N as 0 N and greater than 60 N as 60 N. The IMS-C20A FSR sensors were placed on the insole near the toe to collect the plantar pressure data for each gait cycle (Figure 1B).
- Arduino controller with battery and Bluetooth moduleAn Arduino Uno development board was used to collect the pressure data from the FSR sensors, and data were transmitted to the smartphone’s data-collection module via the Bluetooth modular. We used a model JDY-16 Bluetooth module, which is based on Bluetooth 4.2 standard; the working frequency is 2.4 GHz, the modulation mode is GFSK, the bit rate is 115,200 bps, the maximum transmission distance is 80 m, and the communication rate is 8 Kbytes per second. We placed the controller node far away from the sensor nodes and used larger-capacity batteries along with sub-components to solve the problem of insufficient power caused by real-time data collection and transmission. The device was placed in a trouser pocket (Figure 1C) for convenience, allowing the subject to change the batteries quickly.
- Data acquisition and storage componentsThe data acquisition and storage components collected pressure data and three-axis acceleration data at 30 Hz, and an Android smartphone was used to save data and time stamps to match the acceleration data and pressure data. The frequency range of human walking and running is approximately 0.5–5 Hz [26,27], and according to the Nyquist criterion, the sampling frequency should be at least twice the target frequency to obtain complete information. Therefore, the sampling frequency in this study was set to 30 Hz.
2.2. Data Pre-Processing
2.3. Data Labeling
2.3.1. Plantar Pressure Data and Gait Cycle
2.3.2. Threshold-Based Peak Detection Algorithm for Pressure Data
2.3.3. Sliding Window Algorithm
2.4. Model Building
3. Experimental Evaluation
3.1. Experimental Procedure
3.2. Training Procedure and Testing Procedure
3.3. Accuracy of the Proposed Algorithms
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- O’Brien, M.W.; Wojcik, W.R.; Fowles, J.R. Medical-Grade Physical Activity Monitoring for Measuring Step Count and Moderate-To-Vigorous Physical Activity: Validity And Reliability Study. JMIR mHealth and uHealth 2018, 6, e10706. [Google Scholar] [CrossRef] [PubMed]
- Park, H.; Togo, F.; Watanabe, E.; Yasunaga, A.; Park, S.; Shephard, R.J.; Aoyagi, Y. Relationship of Bone Health to Yearlong Physical Activity in Older Japanese Adults: Cross-Sectional Data from the Nakanojo Study. Osteoporos. Int. 2007, 18, 285–293. [Google Scholar] [CrossRef] [PubMed]
- Park, H.; Park, S.; Shephard, R.J.; Aoyagi, Y. Yearlong Physical Activity and Sarcopenia in Older Adults: The Nakanojo Study. Eur. J. Appl. Physiol. 2010, 109, 953–961. [Google Scholar] [CrossRef] [PubMed]
- Jimenez, A.R.; Seco, F.; Prieto, C.; Guevara, J. A Comparison of Pedestrian Dead-Reckoning Algorithms Using a Low-Cost MEMS IMU. In Proceedings of the 2009 IEEE International Symposium on Intelligent Signal Processing, Budapest, Hungary, 26–28 August 2009; pp. 37–42. [Google Scholar]
- Jovanov, E.; Milenkovic, A.; Otto, C.; De Groen, P.C. A Wireless Body Area Network of Intelligent Motion Sensors for Computer Assisted Physical Rehabilitation. J. Neuroeng. Rehabil. 2005, 2, 6. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Park, J.-M.; Lee, S.K. Effects of Functional Gait Exercise on Balance Ability and Gait Ability in Female Elderly with Chronic Arthritis. Exerc. Sci. 2017, 26, 281–287. [Google Scholar] [CrossRef]
- Kang, H.-J.; Lee, B.-K. Comparison of Gait Variables and Relative Risk of Falls According to Walking Speed During Flat and Obstacles Walking of Fallers and Non-Fallers in Korean Elderly Women. Exerc. Sci. 2022, 31, 80–87. [Google Scholar] [CrossRef]
- Holst, A. Global Smartphone Penetration Rate as Share of Population from 2016 to 2020. Available online: https://www.statista.com/statistics/203734/global-smartphone-penetration-per-capita-since-2005/ (accessed on 21 October 2021).
- Huang, Y.; Zheng, H.; Nugent, C.; Mccullagh, P.; Mcdonough, S.M.; Tully, M.A.; Connor, S.O. Activity Monitoring Using an Intelligent Mobile Phone A Validation Study. In Proceedings of the 3rd International Conference on Pervasive Technologies Related to Assistive Environments, Samos, Greece, 23–25 June 2010; ACM: New York, NY, USA, 2010; pp. 1–6. [Google Scholar]
- Guo, Y.; Liu, Q.; Ji, X.; Wang, S.; Feng, M.; Sun, Y. Multimode Pedestrian Dead Reckoning Gait Detection Algorithm Based on Identification of Pedestrian Phone Carrying Position. Mob. Inf. Syst. 2019, 2019, 4709501. [Google Scholar] [CrossRef]
- Lin, J.; Chan, L.; Yan, H. A Decision Tree Based Pedometer And Its Implementation on the Android Platform. In Proceedings of the Computer Science & Information Technology (CS & IT), Sydney, Australia, 26–27 December 2015; Academy & Industry Research Collaboration Center (AIRCC): Chennai, India, 2015; pp. 73–83. [Google Scholar]
- Vandermeeren, S.; Van De Velde, S.; Bruneel, H.; Steendam, H. A Feature Ranking and Selection Algorithm for Machine Learning-Based Step Counters. IEEE Sens. J. 2018, 18, 3255–3265. [Google Scholar] [CrossRef]
- Yao, Z.J.; Zhang, Z.P.; Xu, L.Q. An Effective Algorithm to Detect Abnormal Step Counting Based On One-Class SVM. In Proceedings of the 17th IEEE International Conference on Computational Science and Engineering, Chengdu, China, 19–21 December 2014; pp. 964–969. [Google Scholar]
- Siddanahalli Ninge Gowda, A.K.; Babu, S.R.; Sekaran, D.C. UMOISP: Usage Mode and Orientation Invariant Smartphone Pedometer. IEEE Sens. J. 2017, 17, 869–881. [Google Scholar] [CrossRef]
- Katevas, K.; Haddadi, H.; Tokarchuk, L. Sensingkit: Evaluating the Sensor Power Consumption in IOS Devices. In Proceedings of the 2016 12th International Conference on Intelligent Environments (IE), London, UK, 14–16 September 2016; pp. 222–225. [Google Scholar]
- Kupke, J.; Willemsen, T.; Keller, F.; Sternberg, H. Development of a Step Counter Based on Artificial Neural Networks. J. Locat. Based Serv. 2016, 10, 161–177. [Google Scholar] [CrossRef]
- Ngueleu, A.; Blanchette, A.; Bouyer, L.; Maltais, D.; Mcfadyen, B.; Moffet, H.; Batcho, C. Design and Accuray of an Instrumented Insole Using Pressure Sensors for Step Count. Sensors 2019, 19, 984. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Vu, H.; Gomez, F.; Cherelle, P.; Lefeber, D.; Nowé, A.; Vanderborght, B. ED-FNN: A New Deep Learning Algorithm to Detect Percentage of the Gait Cycle for Powered Prostheses. Sensors 2018, 18, 2389. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Lee, S.-S.; Choi, S.T.; Choi, S.-I. Classification of Gait Type Based on Deep Learning Using Various Sensors with Smart Insole. Sensors 2019, 19, 1757. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hessert, M.J.; Vyas, M.; Leach, J.; Hu, K.; Lipsitz, L.A.; Novak, V. Foot Pressure Distribution during Walking in Young and Old Adults. BMC Geriatr. 2005, 5, 8. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Cobb, J.; Claremont, D.J. Transducers for Foot Pressure Measurement: Survey of Recent Developments. Med. Biol. Eng. Comput. 1995, 33, 525–532. [Google Scholar] [CrossRef] [PubMed]
- Peng, Z.; Cao, C.; Huang, J.; Pan, W. Human Moving Pattern Recognition toward Channel Number Reduction Based on Multipressure Sensor Network. Int. J. Distrib. Sens. Netw. 2013, 9, 510917. [Google Scholar] [CrossRef] [Green Version]
- Uni-App. Available online: https://uniapp.dcloud.net.cn/ (accessed on 28 April 2021).
- HTML 5+ Specification. Available online: https://www.html5plus.org/doc/h5p.html (accessed on 28 April 2021).
- Background Execution Limits. Available online: https://developer.android.com/about/versions/oreo/background (accessed on 8 April 2022).
- Pachi, A.; Ji, T. Frequency and Velocity of People Walking. Struct. Eng. 2005, 83, 36–40. [Google Scholar]
- Ferri, M. Math For Sprinters—Step Frequency and Stride Length. Available online: https://www.econathletes.com/post/math-for-sprinters-steps-per-second-and-stride-length#:~:text=Most%20sprinters%20will%20have%20a,and%205%20during%20their%20races.&text=Example.,average%205%20steps%20per%20second (accessed on 2 April 2022).
- Alzantot, M.; Youssef, M. UPTIME: Ubiquitous Pedestrian Tracking Using Mobile Phones. In Proceedings of the IEEE Wireless Communications and Networking Conference WCNC, Paris, France, 1–4 April 2012; pp. 3204–3209. [Google Scholar]
- Fernandez-Lopez, P.; Liu-Jimenez, J.; Sanchez-Redondo, C.; Sanchez-Reillo, R. Gait Recognition Using Smartphone. In Proceedings of the 2016 IEEE International Carnahan Conference on Security Technology (ICCST), Orlando, FL, USA, 24–27 October 2016; pp. 1–7. [Google Scholar]
- Mladenov, M.; Mock, M. A Step Counter Service for Java-Enabled Devices Using a Built-in Accelerometer. In Proceedings of the 1st International Workshop on Context-Aware Middleware and Services Affiliated with the 4th International Conference on Communication System Software and Middleware (COMSWARE 2009)—CAMS ′09; Dublin, Ireland, 16 June 2009, ACM Press: New York, NY, USA, 2009; Volume 385, p. 1. [Google Scholar]
- Alamdari, A.; Krovi, V.N. Alamdari, A.; Krovi, V.N. A Review of Computational Musculoskeletal Analysis of Human Lower Extremities. In Human Modelling for Bio-Inspired Robotics; Elsevier: Amsterdam, The Netherlands, 2017; pp. 37–73. ISBN 9780128031520. [Google Scholar]
- Majumder, A.K.M.J.A.; Saxena, P.; Ahamed, S.I. Your Walk Is My Command: Gait Detection on Unconstrained Smartphone Using Iot System. In Proceedings of the 2016 IEEE 40th Annual Computer Software and Applications Conference (COMPSAC), Atlanta, GA, USA, 10–14 June 2016; Volume 1, pp. 798–806. [Google Scholar]
- Catalfamo, P.; Moser, D.; Ghoussayni, S.; Ewins, D. Detection of Gait Events Using an F-Scan in-Shoe Pressure Measurement System. Gait Posture 2008, 28, 420–426. [Google Scholar] [CrossRef]
- Li, B.; Zhang, Y.; Tang, L.; Gao, C.; Gu, D. Automatic Detection System for Freezing of Gait in Parkinson’s Disease Based on the Clustering Algorithm. In Proceedings of the 2018 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC 2018), Xi’an, China, 25–27 May 2018; pp. 1640–1644. [Google Scholar]
- Feng, Y.; Wong, C.K.; Janeja, V.; Kuber, R.; Mentis, H.M. Comparison of Tri-Axial Accelerometers Step-Count Accuracy in Slow Walking Conditions. Gait Posture 2017, 53, 11–16. [Google Scholar] [CrossRef] [PubMed]
- Simonsen, M.B.; Thomsen, M.J.; Hirata, R.P. Validation of Different Stepping Counters during Treadmill and over Ground Walking. Gait Posture 2020, 80, 80–83. [Google Scholar] [CrossRef] [PubMed]
- Fujinami, K.; Kouchi, S. Recognizing a Mobile Phone’s Storing Position as a Context of a Device and a User. In Proceedings of the International Conference on Mobile and Ubiquitous Systems: Computing, Networking and Services, Taichung, Taiwan, 3–5 July 2013; pp. 76–88. [Google Scholar]
- Wiese, J.; Saponas, T.S.; Brush, A.J.B. Phoneprioception: Enabling Mobile Phones to Infer Where They Are Kept. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, Paris, France, 27 April–2 May 2013; pp. 2157–2166. [Google Scholar]
- Coskun, D.; Incel, O.D.; Ozgovde, A. Phone Position/Placement Detection Using Accelerometer: Impact on Activity Recognition. In Proceedings of the IEEE 10th International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP), Singapore, 7–9 April 2015. [Google Scholar]
- Anguita, D.; Ghio, A.; Oneto, L.; Parra, X.; Reyes-Ortiz, J.L. Human Activity Recognition on Smartphones Using a Multiclass Hardware-Friendly Support Vector Machine. In Proceedings of the 4th International Workshop, IWAAL 2012, Vitoria-Gasteiz, Spain, 3–5 December 2012; Lecture Notes in Computer Science (including Subseries: Information Systems and Applications, including Internet/Web, and HCI. Springer: Berlin/Heidelberg, Germany, 2012; pp. 216–223. [Google Scholar]
Classifiers | Parameters | Regressors | Parameters |
---|---|---|---|
Multilayer Perceptron | Hidden layers = 4 Total units = 920 | Multilayer Perceptron | Hidden layers = 4 Total units = 920 |
Convolutional Neural Networks | 1D convolutional layers = 2 Max pooling layers = 2 Fully connected layers = 1 | Convolutional Neural Networks | 1D convolutional layers = 4 Max pooling layers = 4 Fully connected layers = 2 |
Random Forest | N_estimators = 200 Max_depth = 200 | Random Forest | N_estimators = 500 |
Histogram-based Gradient Boost | Default | Histogram-based Gradient Boost | Default |
Support Vector Machine | Kernal = linear | Support Vector Machine | Kernal = linear |
K-nearest Neighbors | Default | K-nearest Neighbors | Default |
Ensemble Model | - | Ensemble Model | - |
No. | Gender | Age (Years) | Weight (kg) | Height (cm) | Steps | Time (Minutes) |
---|---|---|---|---|---|---|
1 | Male | 27 | 49.5 | 170.0 | 2451 | 30 |
2 | Male | 26 | 68.3 | 180.0 | 3100 | 30 |
3 | Male | 27 | 74.5 | 170.0 | 3122 | 30 |
4 | Male | 29 | 84.2 | 177.5 | 2850 | 30 |
5 | Female | 26 | 41.3 | 160.0 | 2431 | 30 |
6 | Female | 27 | 69.1 | 170.5 | 3025 | 30 |
Mean Accuracies (%) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Carrying Position | Regression Algorithms | Pedometer Application | Average | ||||||
Random Forest | Convolutional Neural Network | Histogram-Based Gradient Boost | Multilayer Perceptron | Support Vector Machine | K-Nearest Neighbors | Ensemble Model | Rakuraku Smartphone Pedometer | ||
Handheld | 94.1 | 90.4 | 87.7 | 90.8 | 79.4 | 82.1 | 98.1 | 75.3 | 87.2 |
85.0 | 91.3 | 95.8 | 99.3 | 89.8 | 95.7 | 98.6 | 80.8 | 92.0 | |
Handbag | 89.2 | 89.0 | 86.9 | 91.6 | 77.4 | 83.6 | 98.8 | 81.9 | 87.3 |
Average | 89.4 | 90.2 | 90.2 | 93.9 | 82.2 | 87.1 | 98.5 | 79.3 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Song, Z.; Park, H.-J.; Thapa, N.; Yang, J.-G.; Harada, K.; Lee, S.; Shimada, H.; Park, H.; Park, B.-K. Carrying Position-Independent Ensemble Machine Learning Step-Counting Algorithm for Smartphones. Sensors 2022, 22, 3736. https://doi.org/10.3390/s22103736
Song Z, Park H-J, Thapa N, Yang J-G, Harada K, Lee S, Shimada H, Park H, Park B-K. Carrying Position-Independent Ensemble Machine Learning Step-Counting Algorithm for Smartphones. Sensors. 2022; 22(10):3736. https://doi.org/10.3390/s22103736
Chicago/Turabian StyleSong, Zihan, Hye-Jin Park, Ngeemasara Thapa, Ja-Gyeong Yang, Kenji Harada, Sangyoon Lee, Hiroyuki Shimada, Hyuntae Park, and Byung-Kwon Park. 2022. "Carrying Position-Independent Ensemble Machine Learning Step-Counting Algorithm for Smartphones" Sensors 22, no. 10: 3736. https://doi.org/10.3390/s22103736
APA StyleSong, Z., Park, H. -J., Thapa, N., Yang, J. -G., Harada, K., Lee, S., Shimada, H., Park, H., & Park, B. -K. (2022). Carrying Position-Independent Ensemble Machine Learning Step-Counting Algorithm for Smartphones. Sensors, 22(10), 3736. https://doi.org/10.3390/s22103736