Personalized gait curves are generated to enhance patient adaptability to gait trajectories used for passive training in the early stage of rehabilitation for hemiplegic patients. The article utilizes the random forest algorithm to construct a gait parameter model, which maps the relationship between parameters such as height, weight, age, gender, and gait speed, achieving prediction of key points on the gait curve. To enhance prediction accuracy, an attention mechanism is introduced into the algorithm to focus more on the main features. Meanwhile, to ensure high similarity between the reconstructed gait curve and the normal one, probabilistic motion primitives (ProMP) are used to learn the probability distribution of normal gait data and construct a gait trajectory model. Finally, using the specified step speed as input, select a reference gait trajectory from the learned trajectory, and reconstruct the curve of the reference trajectory using the gait key points predicted by the parameter model to obtain the final curve. Simulation results demonstrate that the method proposed in this paper achieves 98% and 96% curve correlations when generating personalized lower limb gait curves for different patients, respectively, indicating its suitability for such tasks.

According to statistics, the number of hemiplegic patients resulting from stroke and other diseases is increasing annually. Without timely treatment, patients may permanently lose leg motor function and experience issues such as muscle atrophy, joint stiffness, and cardiopulmonary problems. Simultaneously, patients may experience significant psychological trauma, pessimism, depression, and other emotions, severely impacting their overall well-being. Clinical studies demonstrate that precise and timely rehabilitation training can enhance coordinated movement in joints and muscle groups, restoring muscle strength and walking function in patients. Researches [

Researches [

GPM constructs a model that correlates human body parameters with gait, enabling the prediction of key gait points based on input parameters. In GTM, the output of GPM serves as input, enabling personalized reconstruction of gait curves to enhance patient adaptability. In research [

This study focuses on rehabilitation training for hemiplegic patients, introducing RF with attention mechanism (RF-Attention, RFA) and combining it with probabilistic motion primitives to propose the RFA-ProMP algorithm for personalized gait trajectory generation. To ensure the learning and generalization performance of the algorithm on normal gait trajectories, the study employed ProMP to construct probabilistic trajectory models based on different gait speeds in the human gait database. Since many existing methods have not considered the impact of gait speed on gait, this paper characterizes the characteristics of hip and knee joint trajectories using gait key points. RF is employed to map the nonlinear relationship between human parameters, gait speed, and gait trajectory, enabling the prediction of gait key points based on input parameters. The predicted gait key points will serve as inputs to the trajectory model for reconstructing the gait reference trajectory.

The main contributions of this article are as follows:

1) A gait parameter model was constructed, using gender, age, height, weight, BMI, and gait speed as input parameters to predict the key point angles of the gait trajectory. This model can reflect individual differences and achieve personalized prediction of gait key points.

2) A gait trajectory model was constructed. By learning normal gait data, a reference gait trajectory library based on gait speed was obtained. A reference trajectory was selected based on the specified gait speed. The predicted gait key points were used to effectively reconstruct the trajectory while maintaining similarity with the reference trajectory.

Research [

Personalizing the passive training trajectory according to the specific patient's situation is crucial, aiming for a reconstructed trajectory highly similar to the patient's trajectory during normal movement. Researches [

The random forest algorithm utilizes a multitude of decision trees as its base learners. During the training phase, bootstrap sampling is employed on the gait dataset with dropout, enabling the training of multiple individual decision trees. During the prediction phase, the random forest calculates the arithmetic mean of the output results from each decision tree to derive the final prediction result. In this study, model inputs included age, gender, height, weight, BMI, and walking speed. During the prediction process of each gait feature, each decision tree established using bootstrap contains a subset of data not used in its construction, referred to as Out of Bag (OOB) data. In predicting each gait feature, for each decision tree, the OOB data was used for prediction to obtain the error

The mathematical modeling equations for the RFA model are as follows:

The formula for MDA is as follows:

The feature attention weights are calculated as follows:

Update

During the prediction process, RFA assigns different attention weights to different features based on the importance of the input data, and predicts the final gait key point angle through the model.

To understand the normal gait pattern, considering a series of normal gait sample trajectories

The computed weight vector is assumed to be normally distributed, i.e.,

Thus, the gait trajectory distribution can be obtained from

For the established probabilistic trajectory model, we update the trajectory by adding the expected points of gait characteristics

The new mean and variance are calculated as follows:

During gait trajectory reconstruction, a fundamental trajectory is chosen from the normal gait probability trajectory model according to gait speed. The predicted expected gait point is then inputted, and the probability trajectory model is iteratively updated using

The study aimed to predict individualized lower extremity gait patterns for passive rehabilitation training. It utilized the patient's physical attributes and specified gait speed. The prediction focused on a single cycle of lower limb gait, as prehabilitation training involves repetitive cycles. The gait parameter model in this study incorporated six parameters: height (H), weight (W), sex (S), age (A), BMI, and gait speed (V). The algorithm implementation involved five steps.

1) Construct a gait parameter model by RFA, and predict to get the angle of m gait key points

2) A set of joint demonstration trajectories

3) Calculate

4) Updating the probabilistic trajectory model.

5) Repeat 3) and 4) to obtain the final trajectory model and the passive training trajectory with fixed sequence length:

The steps of the algorithm implementation can be demonstrated by

This study was conducted under Windows 10 with the device configuration of CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20 GHz; RAM: 8 GB; GPU: NVIDIA GeForce GTX 1050 Ti; Experimental environment: python 3.6, tensorflow 1.9, keras 2.0.

Since this study aimed to establish the relationship between body characteristic parameters and gait, the dataset must include body parameters, pace, and gait information. The experimental data used in this study included physical parameters such as height, weight, gender and age of 52 volunteers. The data set contains the hip and knee joint data of volunteers walking at different gait speeds, which meets the data requirements of this experiment. The acquired gait curve was filtered and smoothed using a Butterworth low-pass filter with a cutoff frequency of 6 Hz. Each gait curve is then resampled as a discrete point.

Features | Range |
---|---|

Age | 19–67 |

Sex | 0/1 |

Height (m) | 1.55–2.02 |

Weight (kg) | 50–102 |

BMI (kg/m^{2}) |
17.17–30.42 |

Speed (m/s) | 0.27–1.40 |

The performance of the algorithm is mainly assessed by the consistency of the generated gait curve with the actual gait curve, and if the generated gait curve is closer to the actual curve, it is considered to be more feasible to be used for rehabilitation training. We introduced Mean Absolute Error (MAE) to evaluate the error between the trajectory

The study constructs gait models based on various walking speeds in the dataset.

This study chooses gait key points uniformly distributed within the range of

As hip and knee joint angle data can be treated as time series, LSTM and CNN-LSTM demonstrate strong performance in time series prediction. Thus, this article introduces LSTM and CNN-LSTM as comparative algorithms, contrasting them with the RF algorithm proposed herein.

Algorithm | Hip (MAD/ρ) | Knee (MAD/ρ) |
---|---|---|

RFA-ProMP | 5.10/0.96 | 4.49/0.98 |

LSTM-ProMP | 5.83/0.94 | 5.62/0.95 |

CNN-LSTM-ProMP | 6.4/0.94 | 6.31/0.93 |

RF-ProMP | 6.73/0.93 | 6.46/0.91 |

GPPM | 5.94/0.94 | 6.17/0.94 |

From the curves, it is evident that the reconstruction probability curve for gait prediction using RFA ProMP closely aligns with the reference curve. Calculations reveal that for the hip joint, the reconstruction curve obtained via RFA ProMP is 3.2% higher than RF ProMP, 2.1% higher than LSTM ProMP, 2.1% higher than CNN-LSTM ProMP, and 2.1% higher than GPPM. The mean absolute deviation (MAD) is 24.2% lower than RF ProMP, 12.5% lower than LSTM ProMP, 15.6% lower than CNN-LSTM ProMP, and 14.1% lower than GPPM. For the knee joint, the reconstruction curve obtained via RFA ProMP is 7.7% higher than RF ProMP, 3.2% higher than LSTM ProMP, 5.4% higher than CNN-LSTM ProMP, and 4.3% higher than GPPM. The average MAD is 30.5% lower than RF ProMP, 20.1% lower than LSTM ProMP, 28.8% lower than CNN-LSTM ProMP, and 27.2% lower than GPPM.

From the data results, it can be seen that the curve reconstruction of the hip joint is better than that of the knee joint. This is because the hip joint has a more stable motion mode compared to the knee joint during motion, allowing the algorithm to extract features of the hip joint more accurately.

By trial and error, the optimal parameter table for each model in the experiment is obtained in

Algorithm | Hip | Knee |
---|---|---|

CNN-LSTM-ProMP | Filters = 64, | Filters = 32, |

Kernel_size = 3, | Kernel_size = 3, | |

lstm_units = 64, | lstm_units = 32, | |

Epochs = 20, | Epochs = 15, | |

Batch_size = 4 | Batch_size = 4 | |

LSTM-ProMP | Units = 32, | Units = 32, |

Epochs = 20, | Epochs =15, | |

Batch_size = 4 | Batch_size = 4 | |

RFA-ProMP | n_tree = 100 | n_tree = 100 |

Time | Hip | Knee |
---|---|---|

RFA-ProMP | 32 s | 46 s |

RF-ProMP | 36 s | 36 s |

Personalized gait trajectories based on human characteristics are necessary in passive rehabilitation training as the degree of adaptation between the training trajectory and the patient significantly influences the rehabilitation outcome. In the parametric model, the neural network requires iteration, leading to higher computational resource demands and an increase in the algorithm's running time cost. Additionally, the tuning process for the neural network is more cumbersome. Therefore, from the perspective of model complexity and tuning process, the algorithm proposed in this paper is superior to LSTM and CNN-LSTM.

LSTM excels in long time series prediction, capturing the data’s long-term dependencies. However, for passive training gait in rehabilitation, where the gait pattern remains constant for every walking cycle once determined, it can be treated as a static dataset. In contrast, for static data requiring feature selection, LSTM, designed for long time series prediction, is not as effective as CNN-LSTM. Nevertheless, both of them are outperformed by Random Forest. Despite the latter’s weak predictive performance, combining feature weighting with the attention mechanism noticeably enhances prediction accuracy. As trajectory fitting relies on predicted points, RFA’s assurance of key point prediction accuracy directly extends to the accuracy of reconstructed curves.

In trajectory modeling, many scholars employ interpolation methods for trajectory fitting, which, however, lacks the learning of normal gait patterns. This paper utilizes ProMP to fit the gait trajectory. ProMP can reconstruct the gait trajectory using gait key points learned from normal gait, thereby reducing reconstruction errors. This method meets the requirement that rehabilitation training gait should be similar to, yet different from, normal gait. The reference curves generated for various gait speeds reveal that, for the same patient, the gait curves exhibit high similarity. With different gait speeds, the most noticeable difference lies in the variation of the peak value. For the hip joint, besides the change in peak size, there is an adjustment of the starting and ending values. Therefore, based on these results, it can be inferred that rehabilitation practitioners, for the same patient, can adjust rehabilitation strategies by modifying peak values, as well as the starting and ending values, of the gait curves.

This study aims to offer personalized gait training reconstruction trajectories for rehabilitating hemiplegic patients. The RFA algorithm is employed in this article to predict the patient's gait key point angles and choose the reference curve from the normal gait database based on gait speed. A probabilistic trajectory model was established via ProMP, facilitating the learning of normal gait patterns and the reconstruction of the reference curve based on key points. Compared to RF-ProMP, LSTM-ProMP, CNN-LSTM-ProMP, and GPPM algorithms, our method demonstrates superiority, suggesting its applicability in personalized gait trajectory generation and offering potential support and applications in the field of rehabilitation medicine.

However, there is still room for improvement in this study. Future work will consider introducing more parameters such as leg length, crotch width, etc., and these improvements will further enhance the performance of the algorithm and make it more applicable to the field of rehabilitation medicine.

The authors acknowledge and extend their appreciation to the Lower Limb Rehabilitation Exoskeleton Research Team of Guizhou University for their support in this study.

This study was supported by Guizhou Provincial Department of Science and Technology (Guizhou Science and Technology Cooperation Support [2021] General 442), Guizhou Provincial Department of Science and Technology (Guizhou Science and Technology Cooperation Support [2023] General 179), Guizhou Provincial Department of Science and Technology (Guizhou Science and Technology Cooperation Support [2023] General 096).

Zhiqin He conceived of the presented idea. Chunhong Zeng and Kang Lu developed the theory and performed the computations. Qinmu Wu verified the methods. All authors reviewed the results and approved the final version of the manuscript.

The data that support the findings of this study are available from the corresponding author, Zhiqin He, upon reasonable request.

The authors declare they have no conflicts of interest to report regarding the present study.