- The paper introduces a gait phase prediction algorithm that leverages inertial sensor data and a neural network optimized by genetic algorithms to forecast joint trajectories.
- The methodology uses dynamic time warping for feature matching and demonstrates robust performance with a knee angle RMSE of 6.78% and 100% gait phase accuracy.
- Implications include enhanced prosthetic control for obstacle crossing, reduced fall risk, and the potential for real-time implementation in embedded systems.
Feature Matching-Based Gait Phase Prediction for Obstacle Crossing Control of Powered Transfemoral Prosthesis
Introduction and Motivation
Obstacle negotiation remains a significant challenge for transfemoral amputees, particularly when using powered prostheses. Conventional passive and microprocessor-controlled prosthetic knees often fail to provide sufficient adaptability and symmetry during complex maneuvers such as obstacle crossing, leading to increased risk of falls and musculoskeletal complications. The presented work addresses this gap by proposing a feature matching-based gait phase prediction algorithm, leveraging inertial sensor data from the sound limb and a neural network optimized via genetic algorithms to predict joint trajectories and gait progression for powered transfemoral prostheses.
System Architecture and Data Acquisition
The control framework is predicated on the assumption that the prosthesis enters an obstacle-crossing state, as defined by a finite state machine. The system utilizes an IMU attached to the sound ankle and motion capture markers on the prosthetic side to collect vertical displacement and joint angle data, respectively. The experimental protocol involves healthy subjects crossing obstacles of varying heights and distances, with sensor placement and data collection environments detailed in (Figure 1).

Figure 1: Sensor placement and experimental setup for data collection, including IMU and motion capture markers.
The collected data are transformed into joint angles, with the mapping between thigh and knee angles during obstacle crossing visualized in (Figure 2). The segmentation of pre-obstacle and obstacle-crossing phases enables the neural network to utilize relevant features for trajectory prediction.
Figure 2: Hip and knee angle correspondence during obstacle crossing, highlighting pre-obstacle and obstacle-crossing phases.
Neural Network Design and Optimization
The core of the trajectory prediction system is a neural network that receives as input the healthy-side ankle height and pre-obstacle thigh angles from the prosthetic side. The network is trained to output the required hip and knee joint angles for the obstacle-crossing phase. To identify the optimal architecture, a genetic algorithm is employed, searching over layer types, counts, activation functions, dropout rates, and neuron numbers. The loss function combines RMSE for joint angle predictions and gait progression, with an additional time-based component to minimize computational latency. The genetic algorithm operates with a population size of 20, three elites, 20 generations, a crossover ratio of 0.8, and a mutation rate of 0.1, as depicted in (Figure 3).
Figure 3: Block diagram of the optimal network search using a genetic algorithm for joint trajectory and gait progression prediction.
Attention mechanisms are incorporated to modulate output focus, and post-training, predicted knee angles are locally adjusted to match the swing phase. Approximately 35% of the data is reserved for validation, and early stopping is applied after 60 epochs without improvement.
Feature Matching-Based Gait Phase Estimation
Gait phase estimation is achieved via a feature matching algorithm based on Dynamic Time Warping (DTW). The thigh angle-time curve is resampled to a fixed length and compared with predicted features, with the DTW distance used to identify the optimal match. The algorithm employs both sinusoidal and linear transition functions for sequence extension, depending on the progress within the gait cycle. The transformation parameters (vertical/horizontal scaling and translation) are optimized heuristically to minimize DTW distance, and the best match index is normalized to yield the gait progression value.
This approach enables robust mapping from prosthetic thigh movement to knee joint actuation, facilitating real-time control during obstacle crossing. The implementation steps of the overall method are summarized in (Figure 4).
Figure 4: Overview of the implementation steps, from data collection to neural network training, gait phase prediction, and motor torque conversion.
Low-Level Control and Actuation
Once the desired knee joint angle and gait progression index are computed, standard PD control methods are used to convert the predicted angles into motor torques for the prosthetic knee actuator. This low-level control strategy is based on prior work and is not elaborated further in the current study.
Evaluation and Results
System evaluation is conducted using a self-collected dataset, with joint angle predictions assessed via RMSE and Pearson correlation coefficients. Offline tests simulate real-time updates of thigh angle data at frequencies ranging from 25 to 150 Hz, with added Gaussian noise to evaluate robustness. The correspondence between predicted and actual joint angles is illustrated in (Figure 5).
Figure 5: Correspondence diagram of predicted and actual joint angles for the prosthetic limb during obstacle crossing.
Key numerical results include:
- Knee angle RMSE: 6.78%
- Thigh angle RMSE: 8.71%
- Pearson r2 for knee: 0.985
- Pearson r2 for thigh: 0.963
- Gait phase prediction accuracy: 100% across 25–150 Hz sampling rates
Robustness to sensor noise is demonstrated in (Figure 6), showing that the method maintains effective gait phase prediction with noise standard deviation up to 1, and RMSE within 2.4% for noise levels up to 3.
Figure 6: Effects of Gaussian noise on gait phase prediction accuracy, demonstrating robustness to sensor interference.
Discussion and Implications
The proposed feature matching-based gait phase prediction method offers high precision and robustness for powered transfemoral prosthesis control during obstacle crossing. The use of genetic algorithms for neural network architecture optimization, combined with DTW-based feature matching, enables accurate prediction of joint trajectories and gait progression, even under significant sensor noise. The method demonstrates strong downward compatibility with lower sampling rates, which is critical for real-time embedded systems with limited computational resources.
A notable limitation is the lack of real subject validation; all tests were conducted offline on a laptop. The algorithm currently focuses on single obstacle-crossing phases and may require adaptation for continuous gait cycles. Future work should involve deployment on actual prosthetic hardware and testing with amputee subjects in outdoor environments, as well as comparative analysis with existing control strategies.
Conclusion
This study presents a robust and accurate control method for powered transfemoral prostheses during obstacle crossing, integrating feature matching-based gait phase prediction and neural network trajectory generation optimized via genetic algorithms. The approach achieves high accuracy in joint angle and gait phase prediction, with demonstrated resilience to sensor noise. These results have practical implications for improving the safety and naturalness of obstacle negotiation in powered prosthetic devices, and future work should focus on real-world validation and extension to continuous gait scenarios.