Human Activity Recognition of Exoskeleton Robot with Supervised Learning Techniques


 Lower limbs exoskeleton robots improve the motor ability of humans and can facilitate superior rehabilitative training. By training large datasets, many of the currently available mobile and signal devices that may be worn on the body can employ machine learning approaches to forecast and classify people's movement characteristics. This approach could help exoskeleton robots improve their ability to predict human activities. Two popular data sets are PAMAP2, which was obtained by measuring people's movement through inertial sensors, and WISDM, which was collected people's activity information through mobile phones. With the focus on human activity recognition, this paper applied the traditional machine learning method and deep learning method to train and test these datasets, whereby it was found that the prediction performance of a decision tree model was highest on these two data sets, which is 99% and 72% separately, and the time consumption of decision tree is the least. In addition, a comparison of the signals collected from different parts of the human body showed that the signals deriving from the hands presented the best performance in terms of recognizing human movement types.


Introduction
In recent years, advancements in science and technology and social progression have allowed the field of artificial intelligence (AI) to develop rapidly. As part of this, AI methods have been applied to many aspects of daily life, thereby improving the quality of life for people all over the world. For example, autonomous driving technology has been introduced to prevent driving fatigue and its associated consequences, whilst intelligent robot vacuums have been received as a convenient tool to aid cleaning, subsequently allowing people to allocate their time elsewhere. Unsurprisingly, AI has aroused the interest of many researchers all over the world. A specific form of AI is the creation and use of exoskeleton robots to help people move and complete rehabilitation training. However, exoskeleton robots must be able to identify and predict the wearer's movement behaviors based on signals conveyed by the human body, Because the inaccuracy of prediction motion will bring uncertainty and disharmony to users. It will reduce the experience and safety of people using exoskeleton robots.
Many machine learning methods have been applied to assist exoskeletons' predictions of human activity patterns. For example, Zheng et al. [1] stated the research status and significance of the multimodal machine learning model of exoskeleton robot. In addition, on the application of exoskeleton robots, the recognition of gaits was widely researched. In previous studies, Kececi [2] applied a variety of different machine learning models for comparison and analysis for gait recognition, among which the accuracy of the random forest algorithm was more than 99 percent. Barshan and Yuksek [3] also compared and evaluated the performance of various machine learning models in classifying human activities.
The lower limb exoskeleton robot is widely regarded as an essential product by a wide range of people.
Pamungkas [4] summarised that greater research attention had been granted to the lower limb exoskeleton, including studies involving an array of experiments to design and manufacture superior limb exoskeletons. Pamungkas [4] also highlighted the primary purposes of lower limb exoskeletons as rehabilitation and aiding humans in daily activities. Furthermore, Shi [5] stated that limb exoskeleton robots are the primary type of rehabilitation robot. The popularity of exoskeleton robots has increased due to their capacity to succinctly cohere with the human body in a wearable manner, whilst a rigorous training process ensures total control over all joint movements.
According to the literature, the gap in exoskeleton robots is that few people compare different supervised models in diverse data sets that were collected differently. For example, Kececi employed data was collected from body sensors, including six wearable inertial sensors on the thigh, lower leg, and foot of both the left and right limbs. However, Kececi only applied one method to collect data and reviewed and tested various machine learning methods on this data set. Altun et al. [6] also used one dataset to compare the performance and accuracy of a variety of different machine learning and deep learning. On the other hand, Altun did not consider which part of the body's signal has the most significant influence on the classification result. In addition, few people compare different methods of collecting motion data to determine which one is more suitable to apply in the exoskeleton robots.
Previous researchers had almost used one method of collecting data. Peppas [7] used the data collected by mobile phones to implement the CNN algorithm, but only considers the impact of the algorithm on the prediction results and does not compare the method of collecting data on mobile phones and other methods. So this article will use different collection methods to compare the performance of machine learning and deep learning and compare the impact of signals from different body parts on the prediction results and the impact of different data collection methods on the prediction results.

PAMAP2:
PAMAP2 dataset was collected from UCI Machine Learning Repository. This data set comprised 12 types of activities, including laying down, sitting, standing, walking, running, and cycling. The data was collected from nine volunteers who were required to wear three inertial measurement units and a heart rate monitor. The inertial sensors were placed on the wrist of the wearer's dominant arm, on the chest, and on the dominant ankle. The information for the dataset is shown in Figure 1. The WISDM data set included three-axis accelerometer data samples from 36 volunteers who were required to perform a set of specific activities. The volunteers were instructed to put their Android mobile phones into the front pocket of their trousers within a certain period of time and were then asked to walk, jog, climb stairs, descend stairs, sit, and stand. We combined six labels to three labels. The information of this dataset is shown in Figure 2.

Procedure of experiment
The aim of this study was to compare the performance of prediction results in different data sets between machine learning methods and deep learning methods. To achieve this, the research process was developed. Firstly, the two datasets were preprocessed, and the interpolate function was used to interpolate the null values and remove useless features. The method of the interpolate function used in this paper is that this method can ignore the index, and the values are treated equally spaced using a linear approach to fill, by connecting the known data points into a line, and then the unknown data point can be found on the line, and then fill in new value to the missing value. Next, the decision tree, SVM, neural network, and CNN methods were implemented to train and test the two data sets, thereby allowing the evaluation process of different algorithms. The third step, data was preprocessing for robustness testing. We involved randomly inserting 1000 wrong tags and using the confidential learning method to find them all. Then, to verify the robustness of the model, The machine learning method was then fed with both the normal data set and the data set with label errors, thus enabling an observation of the impact of the label errors, as well as the robustness of the model. Finally, the PAMAP2 data set was used to focus on different body parts and combinations of body parts as new inputs; the accuracy results generated by the machine learning algorithm were subsequently compared to determine which body parts were most impactful on the recognition of human activities.
The overall flow diagram is presented in Figure 3.

Experiments
Relevant parameters of different supervised learning in this experiment are shown as follows. The decision tree model is a supervised machine learning model, As Safavian and Landgrebe [8] stated, the primary components of a decision tree model are nodes and branches, whilst the most crucial steps in creating such a model are splitting, stopping, and pruning. In this paper, the decision tree is used to classify and predict different types of human motion, and the parameters of the decision tree are shown in Table 1.   Table 2. representation of actual neurons in the brain. ANNs aim to learn using nonlinear mapping parameters and linear discriminant parameters in order to perform classification tasks [9]. This paper implements a simple, three-layer neural network. In the PAMAP2 dataset, we first include an input layer with 41 input nodes. Next, we add three hidden layers with 128, 32, and 16 nodes, respectively. We then apply the ReLu activation function and add a dropout layer to prevent the neural network from overfitting.
Finally, we add an output layer with the same number of nodes as classes we are attempting to identify, and connect this to the previous layer using the SoftMax activation function. For the WISDM dataset, we have the same number of layers as the neural network used before, but we replace the input layer and the output layer with WISDM coefficients. We use 50 epochs and a batch size of 100, validating our method by using test data.
Convolution neural network (CNN) is a type of standard neural network that extends to space through shared weights [10]. In the PAMAP2 and WISDM dataset, we first input the shape of training data to the 1D convolution layer with 64 filters and kernel size is 2. Next, we add a dense layer with 16 nodes with the Relu activation function. We then add a 1D max-pooling layer and flatten layer. Finally, we add a fully connected layer with the same number of nodes as classes we attempt to identify and connect to the previous layer using the SoftMax activation function. By comparing model parameters in the results, we chose a learning rate of 0.001 and selected a categorical cross-entropy loss function to optimize classification.
By applying two different data sets pertaining to human activity recognition into four models, it was found that the decision tree classification results of the PAMAP2 data set were superior, with an accuracy of 99.9% compared with SVM at 96%, ANN at 99%, and CNN at 94%. The experimental results of PAMAP2 are shown in Figure 4. Regarding the WISDM data set, it was found that the decision tree results were also superior to the alternative models. Although the result of the decision tree is close to ANN, it saves plenty of time. The Decision tree performs well because they are good at dealing with irrelevant features, and it usually produces good results on the massive dataset in a short time. However, from experimental results, the WISDM dataset consistently produced inferior performance results. To improve the accuracy of prediction, we used grouped movement labels and reduced the sample with too many labels to make a balanced dataset. For example, jogging and walking were classified as flat movements, ascending and descending stairs were classified as stair movements, and sitting and standing were classified as stationary. By making a balanced dataset, we found that the classification effect was dramatically improved. Experimental results of the WISDM data set are shown in Figure 5. movement. These problems may be due to mobile phones not being able to capture human movement characteristics as accurately, because captured information was limited to only three parameters and correlations between captured characteristics and labels in WISDM are not very high. But in the PAMAP2, correlations between captured characteristics and labels are excellent. To be able to increase the accuracy of predicting movement type in the cell phone, changing the way of collecting data is essential instead of just carrying a phone in the pocket.

Figure 5 Performance of four supervised leaning techniques in WISDM
Overall, from the four tested models, the decision tree model was clearly the most suitable for solving this classification problem. In addition, by calculating the running time of each model, we found that decision trees not only had a high accuracy rate, but also had a much faster runtime. The time consumption of four models are shown in Figure 6.

Figure 6
The time cost of four supervised leaning techniques Decision trees are convenient, precise, efficient and accurate, whilst also being able to deal with HAR data. As such, in future prediction/classification work involving HAR data, decision tree models may achieve better performance. The matrix confusion of the decision tree from PAMAP2is shown in Figure 7, and the matrix confusion of the decision tree from WISDM is shown in Figure 8. A comparison of the results from the decision tree using the normal data set and the data set containing 1000 labelling errors found that the normal data set had an accuracy of 99.9%, compared with 99.7% for the mislabelled data set. The predicted results of the mislabelled data set are shown in Figure 9. Therefore, it can be stated that mislabelling does not distinctly affect the prediction performance of the decision tree model of this data; thus, the model can be deemed robust.
Furthermore, the confident learning method was implemented to find the wrong labels, the results of which showed that when 1000 error tags were included in the data set, 95% were detected. in the machine learning model, which showed that signal from the hand had the best influence on the accuracy of the results ( Figure 10). However, we found that the signals of hand and chest had almost the same effect with DT.

Figure 10 Performance of decision tree in different body parts
In order to study which part was the most important, we used CNN model to predict the results, and the results are shown in Figure 11. Therefore Hand-related movements can be predicted well and are important for generating HAR data. Hands are used frequently on a daily basis for activities such as playing computer and ironing, amongst many more. Because these activities are mainly accomplished through the use of hand movements, it is easy to see why hand-related movement information in this data affects the accuracy of the classification model to such a high degree. Therefore, there may be considerable value to further research the hand in the context of machine learning for exoskeleton robots.

Figure 11
Performance of CNN in different body parts

Conclusion
Through a series of experiments, four different predictive AI models were applied to two data sets relating to human movement types to ascertain their performance. The results showed that the accuracy of PAMAP2 was higher than the accuracy determined when using mobile phones to measure the data set. Although the use of mobile phones is more convenient and faster, this study indicates that it is better to use the complex data set measured with inertial sensor units to attain more accurate predictions of human movement. Comparing different prediction models showed that the traditional decision tree produced the best prediction results, at 99.9%. According to the experimental results based on using different body parts as inputs and then training the model, information from the hands was deemed the most influential. Therefore, future work should involve increasing the sensor units on the hand to enhance the accuracy of prediction results. This study also compared the differences between traditional machine learning methods and deep learning methods, whereby the model was adjusted to enable better prediction performance under different data sets. However, time was not considered as a factor in this instance because only the type of action that may occur was intended to be predicted based on the information obtained from the body parts. Therefore, time as a factor could be included as a condition in future research. By discovering the connection between time and movement type, it may be possible to predict the subsequent behaviors based on one behavior, which would facilitate superior adaptation of exoskeleton robots between users. In addition, we have selected a total of four different models, which are representative models of machine learning and deep learning. If you want to compare and understand more models comprehensively, you can use more models for comparison, which will be more convincing. Because of the profound impact exoskeleton robots can have on the happiness and comfort of people, conducting more research (general and applied) in this area is vital. The movement of exoskeleton robots dictates whether a user can exercise in them or whether they can adequately support older people. The prediction method implemented in this paper may not be suitable for real-time human movement prediction because of the offline data used in this paper. So, we should try to use real-time data in the future. Predicting movement patterns will continue to be an essential area of study in the future.

List of abbreviations
Availability of data and materials The datasets generated and/or analysed during the current study are available in the UCI repository, http://archive.ics.uci.edu/ml/datasets/pamap2+physical+activity+monitoring The datasets generated and/or analysed during the current study are available in the WISDM lab, https://www.cis.fordham.edu/wisdm/dataset.php