CN / EN

Kunming University of Science and Technology


Exoskeleton robots, owing to their precise control systems, comfortable wearing experiences, and remarkable rehabilitation effects, have emerged as potent assistants in assisted rehabilitation therapy, attracting widespread attention and research from the medical and academic communities.

The pivotal technology of exoskeleton robots, motion pattern recognition, plays a crucial role in rehabilitation training, facilitating the activities of patients with incomplete paraplegia or the elderly and enabling human-machine interaction. However, issues such as inaccurate recording and assessment of human motion patterns limit users' autonomous movement capabilities. To enhance the accuracy of motion pattern recognition, the Intelligent Control Research Institute of Complex Mechatronic Systems at Kunming University of Science and Technology conducted research on human motion pattern recognition based on an integrated random forest algorithm and published their findings in the prestigious international academic journal Measurement.

I. Research Proposal:

The research team proposed a hybrid random forest algorithm (PSO-RF)-(KNN-HC) to identify seven human motion patterns: flat walking, sitting, standing, ascending stairs, descending stairs, ascending slopes, and descending slopes. They employed Particle Swarm Optimization (PSO) to find the optimal parameters for the random forest model, constructing an optimal classification model. During the decision-making process of the random forest, the k-Nearest Neighbors-Hierarchical Clustering (KNN-HC) algorithm was applied to select decision trees for new recognition samples and calculate the voting weights of each tree, thereby improving the classification accuracy of the random forest model for multi-class problems.

In the data processing stage, Fast Fourier Transform (FFT) was used to analyze motion data from a frequency domain perspective, dividing data segments by periodicity and extracting features. Finally, the team validated other machine learning algorithms based on their self-built human motion dataset through a real-motion data acquisition platform and verified the effectiveness of the proposed method on open-source datasets.

Highlights of the Proposal:

  1. Reduced Data Processing Workload: Motion pattern recognition was achieved using only angle information from the hip and knee joints, minimizing data processing efforts.

  2. Enhanced RF Capability for Similar Samples: Integrated Particle Swarm Optimization (PSO) into the RF establishment process to optimize traditional RF parameters. Additionally, the KNN-HC algorithm improved the RF decision process, enabling RF to rescreen decision trees for new sample sets and form a new RF for recognition.

  3. Frequency Domain Analysis for Feature Extraction: Conducted frequency domain analysis on gait data using FFT during data processing, segmenting data by periodicity, to ensure extracted features better represent each motion pattern across subjects.

Random Forest Flow chart

(PSO-RF)-(KNN-HC) Model Construction Flow chart


 Motion Pattern Recognition Method Flow chart 


II. Experimental Validation:

To ensure the diversity and variability of the motion data acquisition platform's dataset and reduce the likelihood of overfitting in the training model, the research team collected data from 11 healthy subjects (weight: 55-85kg, height: 160-185cm, age: 22-25 years) engaging in various motion states in different environments. They employed the ChingMu Vision optical motion capture system to collect information on seven motion patterns: flat walking (FW), sitting (SI), standing (ST), ascending stairs (US), descending stairs (DS), ascending slopes (UR), and descending slopes (DR). The system's high-precision motion capture capabilities provided authentic, complete, and reliable data references for the experiment.



Real Motion Data Acquisition Platform

(a) Walking with flags. (b) Sitting. (c) Standing. 


(d) Ascending stairs. (e) Descending stairs. (f) Climbing uphill. (g) Descending downhill.


Based on the data stream information from the motion capture system


Moreover, this study utilizes the angles of the hip and knee joints as key kinematic information for gait pattern recognition, with graphical representations crafted to clearly and accurately portray data variations.


As evident from the graphs, during walking motions, the hip and knee joint angles of the lower extremities exhibit periodic changes. Across different motion modes, the slope variations in the hip and knee angle curves differ. Hip joint curves for flat walking (FW), descending stairs (DS), and descending downhill (DR) are relatively gentle, whereas those for ascending stairs (US) and ascending uphill (UR) are steeper. Apart from ascending uphill (UR), the variation amplitude of knee joints is generally larger than that of hip joints. Furthermore, the similar ranges of angle variations in hip and knee joints between these two pairs of motion modes indicate a degree of similarity between them.


Composition of Motion Feature Dataset


To ensure dataset balance, an equal amount of data is included for each motion mode in the experiment. The ratio of data volumes for the training set, test set, and validation set is 7:2:1. For these three datasets, the training set is used to construct the original Random Forest (RF) model, the validation set for dynamically selecting and optimizing the performance evaluation of selected trees, and the test set for assessing the effectiveness of the proposed classification method.

To evaluate the testing capability of the trained model, the research team employs four criteria: "Precision, Recall, F1 Score, and Accuracy." A comprehensive assessment based on these four metrics provides a more holistic understanding of the performance of the proposed method, enabling its optimization and improvement. The calculation methods are as follows:



III. Experimental Results:

In the Random Forest (RF) model, the optimal parameters of n_estimators (number of decision trees) and max_depth (maximum depth of trees) are set to 100 and 30 respectively, as illustrated in the figure below:


Relationship between Fitness Function and Number of Iterations


(a) Accuracy of 100 decision trees. 

(b) Clustering results of decision trees.


The research team validated the performance of the 100 decision trees through the test set and calculated the accuracy of each tree, concluding that the accuracy of most decision trees falls within the range of 84% to 90%. To further validate the effectiveness of the proposed motion pattern recognition method, the research team selected a neural network algorithm with optimized parameters and three machine learning algorithms for comparison with the proposed method. The parameter settings for the recognition model comparison experiments are shown in the table below:



By comparing the five algorithms, it can be observed that when faced with complex classification problems, the dynamically selectable RF algorithm exhibits superior classification performance compared to other optimized machine learning algorithms. As shown in the table below:


The proposed algorithm's generalizability was further validated on the MotionSense dataset using the same data partitioning method. Results showed that the algorithm could still perform motion recognition tasks across different datasets, proving its versatility.

IV. Conclusion:

1. Leveraging a real motion data acquisition platform based on an optical motion capture system to obtain hip and knee joint angle information achieved excellent classification performance in motion pattern recognition.

2.Using both real motion datasets and public datasets, the improved RF fusion algorithm's effectiveness in motion pattern recognition was verified. Experimental results indicated that the (PSO-RF)-(KNN-HC) algorithm achieved an average recognition accuracy of 93.75%, average recall rate of 93.76%, and average F1 score of 93.75%, with an overall accuracy of 94.03% in motion recognition, surpassing other machine learning algorithms like ANN, GA-SVM, GA-KNN, and GA-RF.

3.The proposed motion pattern recognition method demonstrates significant potential in handling complex classification problems, efficiently reconfiguring random forests by screening decision trees. However, the improved random forest fusion algorithm still faces challenges in computational complexity and time consumption. Moreover, its performance depends on the quality of the validation set. Therefore, future improvements should focus on the RF decision process.