In recent years,indoor positioning has become a research topic that researchers are increasingly interested in,and the requirements for positioning accuracy are becoming higher and higher.At present,most buildings in cities are multi-floor buildings,while many previous studies on indoor positioning were single floor positioning.The key to achieve multi-floor indoor positioning is the detection of floor changes.In order to address the problem of floor detection,and then achieve multi-floor indoor positioning and crowdsensing of walking paths,Human Activity Recognition(HAR)based on inertial sensor data of smartphone can be used to classify various indoor activities and detect changes of floors.Therefore,how to recognize indoor activities based on an efficient machine learning algorithm,and then improve the accuracy of multi-floor indoor positioning has received a lot of attentions from academic research institutions.HAR mainly has two research directions: vision-based activity recognition and sensor-based activity recognition.Compared with the vision-based activity recognition,the sensor-based activity recognition has received extensive research and attention in recent years due to its robustness to external environment and less privacy issues.In addition,smartphone plays an important role in people's daily life in information age,which integrate various embedded sensors to meet the needs of different applications,and these embedded sensors in smartphone can be used for HAR.Compared with the wearable sensor devices which has been widely studied for HAR,HAR based on smartphone sensors do not need extra devices in human body,and make human body movements more flexible and free.Previous studies have shown that there is no comprehensive analysis of indoor activity recognition currently,and it also have not yet provided an efficient and powerful machine learning algorithm to achieve multi-floor indoor positioning.Moreover,because the type of sensors and extracted features are highly correlated with the activities to be analyzed,in-depth study is needed to improve the recognition accuracy.Thus a powerful and efficient classification algorithm and optimize various factors that may influence recognition performance should be considered in the field of HAR.This paper deeply investigates HAR based on smartphone sensors and the main contents are as follows:1)We propose an XGBoost-based indoor activity recognition system to recognize five indoor activities,i.e.,walking,stillness,climbing stairs,escalator or elevator taking.The input of the system is a dataset collected from 40 subjects.We comprehensively analyzed the performance of indoor activity recognition,and compared XGBoost algorithm with otherfive widely used machine learning algorithms.In consideration of both the accuracy and computation cost,XGBoost-based indoor activity recognition we proposed outperforms the other ensemble learning classifiers and single classifiers,and the average recognition F-score of XGBoost reaches 84.41%.2)We study several factors that may affect recognition performance of indoor activities.In order to improve the recognition accuracy,we explore diverse sensors and features,especially the features that in frequency domain and wavelet domain.The results show that the barometer data and some features in the frequency domain and wavelet domains can significantly improve the recognition accuracy.Moreover,this paper also studies the impact of dataset composition and smartphone placement locations on the recognition accuracy.We find that less subjects may cause overfitting,and the best location of smartphone placement is in trouser pocket considering the movement of the smartphone on human body.In addition,we uses a publicly available dataset to verify the scalability of the recognition system proposed in the paper,and the recognition F-score of XGBoost classifier reaches 84.19%,which also outperforms the other classifiers. |