Anticipating future knee joint movements is important for rehabilitation, wearable robotics, gait analysis, and assistive systems, where motion prediction can help compensate for sensing and control delays. This study presents a Transformer-based multi-step sequence-to-sequence framework for predicting bilateral knee flexion--extension angles using wearable IMU data acquired from the Xsens MVN Awinda system. Motion data from 25 healthy participants performing level-ground walking, inclined and declined walking, stair ascent, and stair descent were used for evaluation. The model processes 128 historical time steps to predict 60 future knee-angle samples. A rule-based pseudo-labeling method is applied to the predicted knee-angle trajectories to provide gait-phase interpretation without manually annotated gait labels. The original experimental evaluation yielded a mean absolute error (MAE) of 1.95 and a root mean square error (RMSE) of 2.65. A separate five-fold subject-level cross-validation evaluation yielded an MAE of 17.54 and an RMSE of 21.79 respectively. The gait-phase interpretation achieved pseudo-label agreement accuracies of 84.41% and 83.22% for the right and left knees, respectively. The results demonstrate the feasibility of combining multi-step bilateral knee-angle prediction with rule-based gait-phase interpretation. The framework provides a basis for further investigation of predictive gait analysis and wearable assistive systems.
Figures & tables
Reference
Model
Dataset
Prediction Target
Bilateral
Multi-Step
Gait Phase
Manual Labels
Main Contribution
Wang et al. (2023)
TCN–BiLSTM
19 healthy subjects (IMU)
Joint angle & joint moment estimation
No
No
No
Yes
Estimated lower-limb joint angles and joint moments from wearable IMU signals using a hybrid temporal deep learning model.
Mohammadi Moghadam et al. (2023)
CNN, RF, SVM, MARS
17 healthy subjects (IMU + EMG)
Kinematics, kinetics, muscle force
No
No
No
Yes
Compared conventional machine learning models for predicting lower-limb biomechanics from wearable sensors.
Ding et al. (2024)
Self-Attention + LSTM
10 healthy subjects (IMU)
Knee and ankle joint-angle estimation
No
No
No
Yes
Introduced a self-attention network for continuous lower-limb joint-angle estimation during different locomotion modes.
Daryakenari and Farizeh (2025)
Transformer Neural Network
22 healthy subjects (sEMG + IMU)
Lower-limb joint-angle and moment prediction
Yes
Yes
No
Yes
Predicted lower-limb kinematics and kinetics over short- and long-term horizons using wearable sensors.
Proposed Work
Transformer Seq2Seq
25 healthy subjects (Xsens MVN Awinda ® IMU)
Future bilateral knee-angle prediction
Yes
Yes
Yes
No
A unified Transformer-based framework for long-horizon bilateral knee-angle prediction and automatic gait-phase recognition using rule-based pseudo-labeling without manual annotation.
TABLE I : Comparison of the Proposed Framework with Recent Studies on Wearable Sensor-Based Lower-Limb Motion Prediction
Fig. 1 : Representative gait activities performed during data collection: (a) level-ground walking, (b) inclined walking, (c) declined walking, (d) stair ascent, and (e) stair descent while wearing the Xsens MVN Awinda ® IMU system.
Fig. 2 : N-pose calibration performed before gait data acquisition
Fig. 3 : Wearable IMU sensor arrangement for gait data collection: (a) front view and (b) back view
Fig. 4 : Data acquisition pipeline using the Xsens MVN Awinda ® IMU system.
Fig. 5 : Workflow of the proposed knee joint angle prediction framework
Component
Description
Sensor Platform
Xsens MVN Awinda ® IMU System
Sampling Frequency
100 Hz
Input Signals
Free acceleration, angular velocity, and segment orientation
Body Segments
Left and right thigh, shank, and foot
Input Representation
Multivariate time-series sequence
Prediction Target
Left and right knee flexion–extension angles (degrees)
TABLE II : Summary of Input Features and Prediction Targets
Fig. 6 : Data preprocessing pipeline for Transformer model input generation.
Fig. 7 : Sliding window representation for generating input–output sequences used in sequence-to-sequence knee joint angle prediction
Parameter
Value
Input Sequence Length
128
Prediction Horizon
60
Embedding Dimension
96
Encoder Layers
3
Decoder Layers
2
Attention Heads
4
TABLE III : Transformer Model Hyperparameters
Fig. 8 : Architecture of the proposed Transformer model for bilateral knee joint angle prediction and gait phase estimation
Fig. 9 : Flowchart of the proposed rule-based pseudo-labeling strategy for automatic gait-phase interpretation.
Metric
Value
Sampling Rate
100 Hz
Input Window Length
128 Time Steps
Future Prediction Length
60 Time Steps
Future Start Delay
20 ms
Training Time
172.7 s
Testing Time
0.58 s
TABLE IV : Knee Joint Angle Prediction Performance
Fig. 10 : Actual and predicted bilateral knee joint angles obtained using the proposed Transformer model.
Metric
CPU
GPU (CUDA)
Improvement
Training Time (s)
5866.33
172.71
33.97 × Faster
Testing Time (s)
32.78
0.58
56.52 × Faster
Average Latency (ms)
23.81
5.82
4.09 × Lower
TABLE V : CPU and CUDA-Enabled GPU Performance Comparison
Fig. 11 : Actual and predicted bilateral knee joint angles obtained using the LSTM model with recursive 60-step forecasting.
Model
Prediction Strategy
Input Window
MAE ( ∘ )
RMSE ( ∘ )
LSTM
60-step Recursive
30 samples (0.3 s)
5.70
7.90
GRU
60-step Direct
30 samples (0.3 s)
11.11
17.32
TCN
60-step Direct
30 samples (0.3 s)
10.72
16.54
Transformer
60-step Direct
128 samples (1.28 s)
1.95
2.65
TABLE VI : Comparison of LSTM, GRU, TCN, and Transformer-Based Knee Angle Prediction Models
Metric
Value
Number of Gait Phases
4
Pseudo-Labeling Method
Rule-Based
Right Knee Accuracy
84.41%
Left Knee Accuracy
83.22%
Average Accuracy
83.82%
TABLE VII : Gait Phase Interpretation Performance
Fig. 12 : Confusion matrices for bilateral knee gait phase classification using the proposed Transformer model
Fig. 13 : Bilateral knee joint angle trajectories with the corresponding predicted gait phases
A wearable assistive robot must continuously estimate terrain, locomotion mode, gait phase, and walking speed. These quantities are commonly addressed by separate, terrain-specific models, with datasets rarely collected under a common protocol. This paper presents a visuo-inertial framework that connects these estimates through a causal pipeline using a chest-mounted camera and four lower-limb inertial measurement units (IMUs). Anticipatory Terrain Perception (ATP) classifies incoming terrain with 96.3% accuracy and anticipates terrain transitions by 1.46 s on average. Terrain-Aware Locomotion Mode Identification (TALMI) achieves 93.7% and 98.8% accuracy for its level-ground and stairs experts respectively, with mean transition latencies being below 200 ms. The relevant TALMI posterior is retained as a Probabilistic Locomotion Context (PLC) vector and provided to a shared Gait Kinematic Encoder (GKE), which supports 50-Hz bilateral gait-phase estimation and 2-Hz walking-speed estimation. Leave-one-subject-out evaluation yields gait-phase RMSEs of 1.75%, 2.97%, and 4.55% for level walking, stair ascent, and stair descent respectively while estimating speed over 3.5-5.5 km/h with a RMSE of 0.218 km/h. All inertial sensing based models use sensor-fused Euler angles as input rather than raw accelerometer and gyroscope signals, reducing dependence on sensor mounting variation.
Debadrata Sarkar, Akash Bachhar, Aman Arora
Human Centred Robotics and Cybernetics Group, CSIR-Central Mechanical Engineering Research Institute, Durgapur 713209, India
This study evaluated personalized gait phase estimation for stroke survivors using functional inertial measurement unit (IMU) alignment and two-stage sequential adaptation of models pre-trained on healthy gait. The estimator used signals from a thigh-mounted IMU. Heel force-sensitive resistor measurements provided reference phase labels for offline adaptation and evaluation. Stage 1 established a distillation-regularized participant-specific model, and Stage 2 performed conditional refinement using low-rank adaptation. Long Short-Term Memory (LSTM), Temporal Convolutional Network (TCN), and Transformer models were evaluated in five stroke survivors walking with a powered knee exoskeleton using leave-one-subject-out hyperparameter selection and sequential test-then-adapt Stage 2 replay. Relative to the non-adapted baselines, Stage 1+2 reduced the mean participant-wise phase root mean square error by 84.2%, 77.0%, and 60.7%, respectively. The Transformer achieved the lowest final error (2.90 +- 1.13$% of the gait cycle) and heel-strike timing error (23.7 +- 4.5ms). Policy-specific ablations showed that every-cycle updates generally produced the lowest or near-lowest error, whereas conditional updating reduced the update frequency with small accuracy differences. After personalization, alignment produced model-dependent changes in phase error while preserving or improving heel-strike detection and reducing heel-strike timing error for the LSTM and Transformer. Concurrent embedded tests showed that the TCN and Transformer maintained 100-Hz inference during Stage 2 updates without deadline misses, whereas the LSTM missed the 10-ms deadline in 6.6% of inferences. All updates completed within 0.8s. These results support the offline feasibility and embedded computational timing of the proposed framework for exoskeleton-assisted walking.
Hyungseok Ryu, Pilwon Hur
Department of Mechanical and Robotics Engineering, Gwangju Institute of Science and Technology (GIST), Gwangju 61005, Republic of Korea
Estimating hip muscle forces and joint moments during gait typically relies on musculoskeletal simulation, which is informative but time-consuming and difficult to apply in clinical settings. This study developed a deep learning framework to predict these hip dynamics parameters directly from lower-limb gait kinematics and compared three representative sequence models under a unified protocol. Gait data were collected from 60 healthy adults under three metronome-guided cadence conditions. Ten bilateral lower-limb joint angles were used as inputs, and OpenSim-derived hip muscle forces and hip joint moments were used as reference outputs. Three deep learning models of LSTM, Transformer, and Mamba were trained and evaluated using the same subject-level split, preprocessing pipeline, and metrics. The best model was then directly tested on an external cohort of 9 patients with osteonecrosis of the femoral head (ONFH) without retraining. In the healthy-subject benchmark, Transformer achieved the best subject-level mean performance for both hip muscle force prediction (RMSE = 1.33 N/kg, MAE = 0.57 N/kg, R2 = 0.819) and hip joint moment prediction (RMSE = 0.11 Nm/kg, MAE = 0.07 Nm/kg, R2 = 0.862), with similar advantages across walking cadences. In zero-shot external validation, Transformer retained moderate predictive ability in ONFH for hip muscle force prediction (RMSE = 1.51 N/kg, MAE = 0.70 N/kg, R2 = 0.537) and hip joint moment prediction (RMSE = 0.17 Nm/kg, MAE = 0.12 Nm/kg, R2 = 0.569). These findings support the feasibility of estimating hip dynamics from gait kinematics, identify Transformer as a strong baseline, and highlight the need for broader pathological validation and improved generalization before clinical application.
Jiaqi Zhang, Ji Hou, Qing Sun +2
Capital University of Physical Education and Sports. · Beijing Institute of Technology. · 3Beijing Key Laboratory of Interdisciplinary Intelligent Technologies of Sports, Medicine and Engineering.