Next Article in Journal
Quantifying Brittle Crack Opening in Human Trabecular Bone Using Synchrotron XCT–DVC
Previous Article in Journal
Differential Associations of the Dynamic Strength Index with Dynamic and Isometric Force Manifestations in Professional Female Soccer Players
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

AI-Based Two-Stage Estimation of Ankle Dorsiflexion from a Single IMU: A Gazebo-Based Transtibial Prosthesis Simulation Study

School of Mechanical Engineering, Universidad Industrial de Santander, Bucaramanga 680002, Colombia
*
Author to whom correspondence should be addressed.
Biomechanics 2026, 6(3), 62; https://doi.org/10.3390/biomechanics6030062
Submission received: 7 May 2026 / Revised: 18 June 2026 / Accepted: 30 June 2026 / Published: 3 July 2026
(This article belongs to the Section Injury Biomechanics and Rehabilitation)

Abstract

Background/Objectives: Ankle dorsiflexion plays a fundamental role in gait stability, impact absorption, and the stance-to-swing transition, and its impairment is a major limitation in transtibial prostheses. This study proposes and evaluates a lightweight two-stage pipeline for generating ankle-dorsiflexion references using a single shank-mounted inertial measurement unit (IMU). Methods: In the first stage, a deep neural network (DNN) estimates the shank pitch waveform from raw three-axis accelerations and angular velocities. In the second stage, the estimated shank pitch is transformed into an ankle-dorsiflexion waveform using a temporal mapping model. The approach was evaluated on a multisubject subset of the NONAN GaitPrint database comprising 35 healthy young adults, 598 walking trials, and approximately 122,468 gait cycles, using a strict subject-held-out protocol. Results: A feature-based Random Forest baseline showed limited performance, whereas the waveform-based DNN achieved high accuracy for shank pitch estimation, with test R2 values up to 0.97. A conventional polynomial mapping between shank pitch and dorsiflexion yielded weak performance, whereas a temporal mapping model substantially improved the estimation of ankle dorsiflexion, with test R2 values up to 0.85. The resulting ankle reference was integrated into a Gazebo/Robot Operating System 2 (ROS 2) simulation of a transtibial prosthesis, where the generated trajectories were executed in a software integration test under open-loop position control, confirming stable and consistent trajectory execution. Conclusions: These results indicate that combining accurate shank pitch estimation with temporal mapping enables feasible ankle-dorsiflexion reference generation from a single sensor in able-bodied gait, offering a preliminary, simulation-based pathway for single-sensor artificial intelligence (AI) pipelines in prosthetic development. The framework supports waveform-level feasibility, not clinical readiness or functional prosthetic control.

1. Introduction

Understanding lower limb biomechanics is essential for accurately modeling and estimating joint angles, which is critical for optimizing human performance and improving prosthetic design [1]. Accurate knowledge of lower limb kinematics is particularly important for analyzing ankle motions such as dorsiflexion, the forward rotation of the tibia relative to the foot, and plantarflexion, its opposite backward movement that contributes to propulsion during walking [2]. When these motions are altered, such as after transtibial amputation, the natural coordination between the shank and foot is disrupted, compromising gait efficiency and stability [3,4]. Therefore, precise modeling of these dynamics is fundamental for simulation-based reference generation and for future control strategies aimed at restoring more natural ankle behavior in prosthetic devices [5,6].
Lower-limb prostheses are essential for people with transtibial amputation because they support mobility, independence, and participation in daily life, while also helping to reduce the functional burden associated with limb loss [7,8]. The sustained growth of prosthetic-foot research further reflects the clinical and technological relevance of improving prosthetic function [9].
Transtibial amputation disrupts normal movement patterns, most notably the ability to perform controlled dorsiflexion during forward body progression, which relies on a coordinated shank–foot interaction [4,5]. This motion supports impact absorption, stability, and forward progression [10]. Individuals with below-knee amputation lose or shorten key musculotendinous structures, such as the tibialis anterior and gastrocnemius, reducing ankle torque generation and fine motor control [6,11]. They frequently adopt compensatory strategies that increase energy expenditure and joint stress, which may affect walking stability [7,8].
To mitigate these effects, contemporary prosthetic designs aim to reproduce natural ankle mechanics [12,13]. Modern devices can be categorized as passive, semi-active, or active. Passive systems provide structural support but lack adaptability [14]; semi-active designs incorporate damping mechanisms for improved comfort yet remain unpowered [15,16]; active prostheses, by contrast, use actuators and sensor-based controllers to mimic muscle function, enabling real-time adjustment to terrain and user intent [17,18].
Recent innovations in active prostheses have integrated artificial intelligence to enhance control systems [19,20,21]. These systems employ predictive models that anticipate user movements and adjust prosthetic behavior in real time [22]. Such innovations are particularly promising for controlling dorsiflexion, which is critical for stability and proper transition toward propulsion [23]. AI-based control strategies, including deep learning, have demonstrated potential to improve prosthetic performance by predicting gait phases and adjusting joint angles accordingly [24].
However, despite these advances, most AI-driven prosthesis control systems rely on multiple sensors, complex training data, or hardware validation alone, limiting accessibility and reproducibility [4]. Moreover, many studies have focused on generic gait classification rather than direct estimation of clinically meaningful joint angles, such as dorsiflexion, which are fundamental for simulation-based assessment of prosthetic ankle behavior and for future adaptive control strategies [25]. Before clinical translation, lightweight, low-sensor AI pipelines capable of accurately estimating ankle motion in controlled simulation environments are still required.
Furthermore, the use of computer-aided design software for mechanical modeling and simulation environments for dynamic testing provides a powerful and controlled platform for developing and refining prosthetic designs and control algorithms [26]. These virtual tools facilitate experimentation with different AI models and their interactions with physical systems while mitigating risks associated with live trials [27]. Simulation platforms integrate with Robot Operating System 2, enabling modular communication with virtual actuators and providing a suitable environment for simulating complex human-like movements [28]. This integration supports reproducible coupling of biomechanics, sensing, and controller interfaces, justifying its use for the present simulation-based evaluation [29].
The objective of this study was to determine the level of accuracy with which ankle dorsiflexion can be recovered from a single shank-mounted IMU without using a foot-mounted sensor. This estimation problem was formulated as an interpretable two-stage waveform-mapping pipeline: first, shank pitch was recovered from local inertial signals; second, an ankle-dorsiflexion reference was generated from the shank-pitch waveform. This formulation was motivated by the biomechanical distinction between shank pitch, an absolute segment orientation, and ankle dorsiflexion, a relative distal joint angle. Temporal models were trained and evaluated under a strict subject-held-out protocol and compared with compact feature-based, instantaneous polynomial, direct single-stage, and recurrent baselines. It was hypothesized that, if shank kinematics preserve sufficient information about distal ankle motion, a temporal waveform model would recover ankle dorsiflexion with lower error than instantaneous or compact mappings and would better preserve the phase-dependent structure of the gait cycle. The pipeline was evaluated on a multi-subject subset of the NONAN GaitPrint database and was subsequently executed in a ROS2–Gazebo transtibial prosthesis simulation as a software integration test.

2. Materials and Methods

2.1. Input Data and Data Acquisition

The data used in this study were obtained from the NONAN GaitPrint database [30], an open-access IMU gait dataset that includes recordings from 35 healthy young adults who were able to walk independently without an assistive device and reported no neurological disease, lower-limb disability, or injury (18 men and 17 women; mean ± 1 s.d. age: 24.6 ± 2.7 years; height: 1.73 ± 0.078 m; body mass: 72.44 ± 15.04 kg). Each participant completed approximately 18 overground walking trials of about 4 min each on a 200 m indoor looping track at a self-selected walking speed ( 1.551 ± 0.230 m / s ) while wearing Noraxon Ultium Motion™ inertial measurement units (IMUs; Noraxon U.S.A., Inc., Scottsdale, AZ, USA) IMUs attached to multiple body segments. Each trial was recorded at a sampling frequency of 200 Hz.
For this study, we used the complete set of 35 participants, totaling 598 trials and approximately 122,468 gait cycles. Among the multiple IMUs recorded, we selected the shank-mounted sensor located on the anterior and slightly medial aspect of the tibia (Figure 1), as it captures the segmental dynamics most relevant for the proposed estimation pipeline.
One gait cycle was defined as the interval between two consecutive right heel strikes. Each trial was segmented into complete, non-overlapping gait cycles, and each cycle was temporally normalized to 100 samples representing 0–100% of the gait cycle.
To prevent intra-subject temporal dependencies from influencing model performance, data partitioning was performed at the participant level. Thus, all gait cycles from a given participant were assigned exclusively to one subset: training, validation, or testing.
The input features for the machine learning models consisted of raw three-axis linear accelerations and angular velocities measured solely by the shank-mounted IMU. The predictive models were trained to estimate shank pitch, expressed in degrees and referenced to the horizontal plane following the conventions of the source database. In the proposed two-stage pipeline, ankle dorsiflexion was estimated by transforming the shank pitch waveform into an ankle-dorsiflexion waveform using a second-stage temporal mapping model. Direct IMU-to-ankle models were used as ablation baselines. The supervised target of this stage was the native ankle dorsiflexion of the ipsilateral (right) limb, as provided by the Noraxon reference system and expressed in physical degrees. In this study, dorsiflexion was defined as the sagittal-plane angle between the shank and the foot.

2.2. Implementation of the AI Techniques and Database

Training and evaluation were conducted on a workstation equipped with an AMD Ryzen 7 5700G (4.6 GHz) processor with integrated graphics, 32 GB RAM, and Ubuntu 22.04 operating system. The training codes were written in Python 3.10.12, using the PyTorch 2.1.2 and scikit-learn 1.7.2 libraries. All input features were normalized using Equation (1), where the mean value was subtracted, and the result was divided by the standard deviation, transforming the data to have a mean of 0 and a standard deviation of 1. This normalization facilitates training convergence. For all learning models, normalization parameters were fitted using the training set only and then applied to the validation and test sets.
x n o r m = x μ σ
The mean and standard deviation of each input component are presented in Table 1, which supports replicability if new data are used for testing.
A correlation matrix was computed to examine the relationships between the six IMU input signals and the primary kinematic quantities used in this study, particularly shank pitch and the variables involved in the dorsiflexion mapping stage.
Detailed architecture, training, and subject-held-out split information for the primary run are provided in Supplementary Materials S1.

2.3. Deep Neural Network (DNN)

The deep learning model used to estimate shank pitch from the inertial data was a one-dimensional convolutional neural network operating on temporally normalized gait cycles. Each input sample consisted of a sequence of 100 time points with six channels corresponding to the three-axis linear accelerations and angular velocities measured at the shank. The output of the model was the corresponding shank pitch waveform over the same gait cycle.
The network architecture included an initial convolutional stem followed by residual temporal convolutional blocks and a regression head. This design allowed the model to capture both local temporal patterns and global waveform structure. Training was performed using the Adam optimizer with an initial learning rate of 0.001 and a combined loss function defined as 0.7 mean squared error (MSE) and 0.3 mean absolute error (MAE) [31,32]. Early stopping was applied based on validation loss to prevent overfitting.
To ensure generalization, the dataset was split using a strict subject-held-out protocol, with 70% of participants used for training, 15% for validation, and 15% for testing [33,34]. This prevented data leakage across subjects and provided a realistic evaluation of model performance on unseen individuals (see Figure 2).

2.4. Random Forest

A Random Forest (RF) regression model was implemented as a feature-based baseline. Instead of operating on the full temporal waveform, each gait cycle was summarized into statistical descriptors derived from the six IMU channels, including mean, standard deviation, minimum, maximum, and range. These features were used as inputs to the RF model.
The RF was trained under the same subject-held-out protocol used for the DNN. Hyperparameters, including tree depth and number of estimators, were selected empirically to balance performance and model simplicity. The RF results were used to assess whether compact cycle-level representations were sufficient for the estimation task, in comparison with the waveform-based deep learning approach. Because the RF operated on cycle-level descriptors, its target was the cycle-level mean shank pitch. In contrast, the DNN was trained to estimate the complete shank-pitch waveform.

2.5. Prosthesis Modeled in Gazebo

A simplified shank-foot prosthesis model was created using an open-source design [35]. It consisted of two parts, the shank and foot connected by a revolute joint acting as the ankle (Figure 3). A support fixture was included to represent the knee joint.
Previous studies have successfully used ROS2–Gazebo simulators to illustrate prosthetic joint actuation [18,19]. In this study, the simulation was used to evaluate the execution of the generated ankle-dorsiflexion reference as a software integration test, within a controlled environment; foot–ground contact and stance-phase ground reaction forces are excluded, and the prosthesis operates in a suspended configuration (Figure 3).
The ankle joint is actuated by the joint_trajectory_controller in open-loop position control mode. The controller follows the estimated reference with position tracking only; no impedance modulation or interaction dynamics are modeled. The input reference corresponds to the dorsiflexion waveform obtained from the two-stage pipeline.
The mass, inertia tensor, and center of mass of each component were specified in the Gazebo simulation (Table 2).
When the controller was active, the reference frames of the system were visualized within Gazebo (Figure 4). The yellow arrows represent the axes of rotation of the ankle and knee joints.
Quantitative metrics were incorporated to characterize the temporal performance of the ROS2–Gazebo environment. Simulator stability was assessed using the world statistics topic world_stats. The communication latency between Gazebo and ROS2 was measured using ros2 topic delay on /joint_states. Because timestamps were based on simulated time, these measurements primarily reflect clock and scheduling characteristics of the simulation rather than closed-loop control delays.
The publication frequency of /joint_states and the ankle controller tracking error, computed as the difference between the commanded and simulated joint positions, was also recorded.
Beyond these metrics, ROS2–Gazebo was selected for reproducible, simulation-based integration. ROS2 provides DDS-based communication, multithreading, and real-time executors for distributed control architectures [29]. Gazebo offers a mature physics engine with configurable joints, virtual sensors, and simplified biomechanical modeling. Together, they enable modular and reproducible integration of biomechanics, control, and sensing, supporting simulation-based reference-generation pipelines [28,29].

2.6. Temporal Mapping for Dorsiflexion Estimation

The estimation of ankle dorsiflexion was implemented as a second-stage temporal mapping problem. Rather than using an instantaneous analytical relationship, the full shank pitch waveform was used as input to a second neural network that estimated the corresponding ankle dorsiflexion waveform.
This mapping was implemented using a one-dimensional convolutional neural network operating on temporally normalized gait cycles of 100 points. The model captured temporal dependencies within the gait cycle, allowing it to account for phase-dependent and hysteresis effects that cannot be represented by pointwise mappings. Training followed the same subject-held-out protocol as the first-stage model.
This stage was designed to learn a supervised waveform-to-waveform transformation from reference shank pitch to ankle dorsiflexion, preserving the temporal structure of the gait cycle.
To support the ablation analysis, three families of models were evaluated. First, the proposed CNN temporal mapping was compared with a BiLSTM alternative trained using the same reference shank-pitch input and ankle-dorsiflexion target. Second, direct single-stage models were trained to estimate ankle dorsiflexion directly from the six shank IMU channels, without using shank pitch as an intermediate representation. Third, full two-stage cascade configurations were evaluated by propagating the shank pitch estimated by the first-stage CNN into either the CNN or BiLSTM temporal mapping model. All configurations produced full ankle-dorsiflexion waveforms and were evaluated under the same subject-held-out protocol.
To characterize robustness to data partitioning, the temporal mapping, direct single-stage, and cascade configurations were repeated across three random seeds. Performance was summarized on the test set as the mean and standard deviation across seeds.

2.7. Model Evaluation and Statistical Analysis

Model performance was evaluated using RMSE, MAE, R 2 , and Pearson correlation. Agreement between measured and estimated waveforms was further examined using Bland–Altman analysis, with bias defined as the mean prediction error and 95% limits of agreement computed as the bias ± 1.96 standard deviations of the error. Unless otherwise stated, waveform metrics were computed over the normalized gait-cycle samples of the test set. Proportional bias was assessed by regressing the prediction error on the mean of the measured and estimated values; the error standard deviation was additionally summarized across the measurement range.
For the ankle-dorsiflexion estimate, errors were also summarized by gait sub-phase using five predefined intervals of the normalized gait cycle: early stance/loading response (0–10%), mid-stance (10–30%), terminal stance (30–50%), pre-swing (50–60%), and swing (60–100%). Within each interval, RMSE, MAE, and bias were computed from the corresponding waveform samples. Landmark accuracy was assessed for the terminal-stance dorsiflexion peak and the maximum plantarflexion value. The dorsiflexion peak was identified within a physiologic terminal-stance window (30–55% of the normalized gait cycle), and the maximum plantarflexion was located using circular distance to respect the cyclic continuity of the gait cycle. For each landmark, magnitude error was defined as the absolute angular difference between the measured and predicted landmark values. Timing error was defined as the absolute difference between the measured and predicted landmark locations, expressed as a percentage of the normalized gait cycle.
Model uncertainty and paired comparisons were assessed at the subject level. For the primary test split (seed = 42), bootstrap confidence intervals were obtained by resampling held-out subjects with replacement. For each bootstrap sample, model performance was recomputed after pooling the cycles from the resampled subjects. The bootstrap confidence interval was reported for the primary waveform-level goodness-of-fit metric. Paired model comparisons were performed using per-subject RMSE values. For each comparison, the mean paired difference was reported together with a subject-level bootstrap 95% confidence interval and a Wilcoxon signed-rank test. The selected comparisons were aligned with the main methodological questions of the study: the choice of temporal mapping architecture and the performance of the deployable two-stage configurations relative to direct IMU-to-ankle-dorsiflexion estimation.

3. Results

3.1. Exploratory Analysis: Correlation Matrix

Before training the models, a correlation analysis was performed to examine the relationships between the six IMU input features and the main kinematic quantities involved in the proposed two-stage pipeline. Figure 5 shows the resulting correlation matrix. As expected, shank- and foot-related angular variables exhibited coordinated behavior during gait, reflecting the mechanical coupling between both segments. Among the input signals, the angular velocity components, particularly around the x and y axes, showed stronger associations with the kinematic variables than the acceleration signals, supporting their relevance for the learning models used in the subsequent stages.

3.2. Stage 1: Shank Pitch Estimation

The first stage of the pipeline aimed to estimate shank pitch from the six raw IMU channels measured at the shank. Under the strict subject-held-out protocol, the waveform-based deep neural network (DNN) explained substantially more of the target variance than the Random Forest (RF) baseline. As presented in Table 3, the RF achieved validation RMSE = 4. 979 , MAE = 4. 504 , and  R 2 = −0.110, with test RMSE = 3. 351 , MAE = 2. 827 , and  R 2 = −0.203. The DNN achieved validation RMSE = 5. 163 , MAE = 4. 356 , and  R 2 = 0.957, with test RMSE = 3. 864 , MAE = 3. 162 , and  R 2 = 0.973. The RF produced low absolute errors but negative R 2 , whereas the DNN recovered nearly all of the waveform variance.
Figure 6a shows a representative comparison between measured and estimated shank pitch waveforms obtained with the DNN. The predicted signal follows the overall temporal profile of the measured waveform across the gait cycle, with visible differences in some regions of larger amplitude. Figure 6b presents the corresponding Bland–Altman analysis across all samples, showing a mean bias of 1. 44 and 95% limits of agreement between −5. 58 and 8. 47 . The error distribution varies across the measurement range rather than remaining uniformly distributed.
For the RF baseline, Figure 7 shows the Bland–Altman plot for mean shank pitch estimation. The mean bias was 1. 32 , with 95% limits of agreement between −4. 72 and 7. 36 . The error distribution shows a visible trend across the range of values, consistent with the limited explanatory power indicated by the negative R 2 .

3.3. Stage 2: Temporal Mapping from Shank Pitch to Ankle Dorsiflexion

The second stage of the pipeline transformed the shank pitch waveform into an ankle-dorsiflexion waveform. Initial attempts based on global polynomial mappings yielded weak performance and were therefore not retained as the final approach. A temporal mapping DNN was subsequently implemented, using the measured shank pitch waveform as input and the ankle-dorsiflexion waveform as output.
For the main run (seed = 42), the temporal mapping model achieved validation RMSE = 4. 627 , MAE = 3. 518 , and  R 2 = 0.812, together with test RMSE = 3. 555 , MAE = 2. 769 , and  R 2 = 0.825. To assess stability, the same temporal mapping was repeated with additional random seeds. For seed 7, the model reached validation RMSE = 4. 892 , MAE = 3. 913 , and  R 2 = 0.800, with test RMSE = 3. 481 , MAE = 2. 578 , and  R 2 = 0.850. For seed 21, the corresponding values were validation RMSE = 3. 796 , MAE = 2. 966 , and  R 2 = 0.831, with test RMSE = 4. 412 , MAE = 3. 522 , and  R 2 = 0.765 see Table 4. The variability observed across random seeds reflects the sensitivity of the model to subject composition in the test set under the subject-held-out protocol.
Using the selected model (seed = 42), the reconstructed test-set ankle-dorsiflexion waveforms showed an overall root mean squared error of 3. 555 , a mean absolute error of 2. 769 , and a Pearson correlation coefficient of 0.914. The reconstructed waveform follows the general temporal profile of the measured signal across the gait cycle, with the largest local differences concentrated near push-off.
Figure 8 shows the corresponding Bland–Altman analysis across all samples. The mean bias was −0. 49 , with 95% limits of agreement between −7. 39 and 6. 41 . The error distribution is centered close to zero, while the spread varies across the measurement range.

3.4. Phase-Specific and Landmark Error Analysis

The test-set error of the ankle-dorsiflexion estimate was decomposed across five gait sub-phases (Table 5; Figure 9). The largest error occurred during pre-swing (RMSE = 5. 225 ), whereas the smallest occurred during early stance/loading response (RMSE = 2. 775 ).
The terminal-stance dorsiflexion peak was estimated with a magnitude error of 3. 018 and a timing error of 2.2% of the cycle. The maximum plantarflexion was estimated with a magnitude error of 3. 932 and a timing error of 0.6% of the cycle. Across subjects, the waveform Pearson correlation had a mean of 0.926 (standard deviation: 0.028; range: 0.890–0.958). The pooled test-set Pearson correlation was 0.914.
The mean difference showed a statistically detectable but practically small proportional dependence on amplitude (slope = −0.006, p < 0.001), whereas the error dispersion was non-uniform: the prediction error standard deviation was largest near 20 (about 4. 6 ) and smallest near peak dorsiflexion (about 2. 1 ).

3.5. Ablation of the Segment-to-Joint Estimation Pipeline

To isolate the contribution of each pipeline component, an ablation compared the proposed temporal mapping strategy with a recurrent alternative (BiLSTM) and with direct single-stage IMU-to-ankle-dorsiflexion estimation over three random seeds (Table 6). When reference shank pitch was used as input, the CNN temporal mapping reproduced the ankle-dorsiflexion waveform with a test R 2 of 0.813, slightly above the BiLSTM alternative (0.792).
The direct single-stage model, which estimated ankle dorsiflexion from the shank IMU without the intermediate shank-pitch representation, reached a test R 2 of 0.736 with the CNN architecture and 0.684 with the BiLSTM architecture.
When the estimated shank pitch was propagated through the full cascade, the  CNN → BiLSTM configuration achieved a test R 2 of 0.708, whereas the CNN → CNN configuration achieved a test R 2 of 0.525. The corresponding RMSE and MAE values for each configuration are reported in Table 6.

3.6. Performance Robustness and Paired Model Comparison

Robustness across data partitions is summarized in Table 6 using the between-seed variability across three runs. For the proposed temporal mapping model (CNN), the subject-level bootstrap yielded a test R 2 of 0.825 (95% CI: 0.739 to 0.882) in the primary run (seed = 42).
Paired per-subject comparisons are reported in Table 7. For the temporal mapping stage, the mean RMSE difference favored the CNN relative to the BiLSTM alternative ( Δ RMSE = 0.520 ; 95% CI: 0.982 to 0.033 ), although the Wilcoxon test was not significant ( p = 0.31 ). For the deployable two-stage configurations, the RMSE differences relative to the direct single-stage CNN model were small and their confidence intervals included zero for both the recurrent mapping ( Δ RMSE = 0.071 ; 95% CI: 0.291 to 0.458 ) and the convolutional mapping ( Δ RMSE = 0.286 ; 95% CI: 0.147 to 0.736 ).
Because the primary test split included six held-out subjects, the paired comparisons had limited statistical resolution. Accordingly, the confidence intervals, the direction of the paired differences, and the between-seed variability in Table 6 were interpreted as complementary summaries of model robustness.

3.7. Simulation-Based Integration Test in Gazebo

The generated ankle-dorsiflexion reference was transmitted through the ROS2–Gazebo pipeline and executed by the virtual ankle joint controller in the suspended prosthesis model. The resulting ankle motion followed the temporal structure of the generated reference and was executed without visible discontinuities.
The real-time factor, obtained from the world statistics topic, remained stable throughout execution, with no pauses or degradation. The /joint_states delay analysis included 2581 samples and yielded a mean delay of 249 ms (minimum: 196 ms; maximum: 306 ms; SD: 30.4 ms). The /joint_states publication frequency remained stable at approximately 58.6 Hz , with inter-message intervals ranging from 0.014 to 0.020 s . The numerical tracking error between the commanded and simulated ankle joint positions was on the order of 10 5 rad . This execution error was substantially smaller than the uncertainty introduced by the dorsiflexion estimation stage, whose 95% limits of agreement were 7.4 to 6.4 .

4. Discussion

The main finding of this study is that a single shank-mounted IMU can be used to generate an able-bodied ankle-dorsiflexion reference when the problem is formulated as a two-stage temporal estimation pipeline. In the first stage, shank pitch was estimated directly from raw shank accelerations and angular velocities. In the second stage, the estimated shank pitch waveform was transformed into an ankle-dorsiflexion waveform. Across both stages, accuracy depended on preserving the temporal structure of the gait cycle, which compact cycle-level representations could not capture.
For shank pitch estimation, the waveform-based DNN provided a waveform-level estimate of shank pitch, whereas the RF served as a feature-based probe of whether compact cycle-level descriptors were sufficient to summarize shank motion. The DNN yielded strong agreement with the reference waveform, reaching test R 2 values close to 0.97. By contrast, the Random Forest predicted a cycle-level summary of shank pitch from compact descriptors and therefore did not constitute a point-by-point waveform comparison with the DNN. Its predictions collapsed to a narrow range and yielded a negative coefficient of determination, indicating that cycle-level descriptors were insufficient to represent the temporal structure required for waveform reconstruction. This suggests that the shank-mounted IMU contains sufficient information to reconstruct the reference shank orientation accurately, but that this information is primarily encoded in the temporal evolution of the inertial signals rather than in compact cycle-level descriptors.
The second-stage mapping provided an additional insight. Global polynomial mappings yielded weak performance, even when augmented with phase-related terms, indicating that the relationship between shank pitch and ankle dorsiflexion cannot be adequately represented as an instantaneous transformation across subjects. In contrast, the temporal mapping DNN achieved test R 2 values between approximately 0.77 and 0.85 across different random seeds, together with an overall RMSE of 3. 555 and MAE of 2. 769 on the test set.
This level of agreement is within the range reported for generalized, subject-independent IMU-based joint kinematic estimation, where errors commonly fall between approximately 4 and 8 [22,36,37]. The reconstruction RMSE corresponds to approximately 12% of the near 30 dorsiflexion excursion. Consistent with prior work, generalized models that are not personalized are expected to incur higher errors than subject-specific models [22]. A distinctive feature of this configuration is that ankle dorsiflexion, a distal joint angle, is inferred from a single proximal segment without a foot-mounted sensor, extending approaches that estimate joint motion from proximal information alone [38] or from a single IMU across multiple joints [39].
The architecture comparison clarifies the role of the two-stage formulation. The two-stage pipeline is not proposed as an absolute accuracy improvement over every direct model; rather, it is an interpretable decomposition that allows three questions to be examined separately: how much segment motion can be recovered from a single IMU, how much ankle dorsiflexion can be explained from the temporal evolution of that segment, and how much error propagates through the full cascade. The deployable two-stage pipeline showed no detectable loss in accuracy relative to the direct single-stage model in the present subject-held-out evaluation, while additionally exposing an interpretable and highly recoverable intermediate representation, shank pitch, which a direct model does not provide. This decomposition is relevant because it separates a highly recoverable proximal segment state from the more variable distal joint-angle mapping, thereby making the source of estimation error biomechanically interpretable. The larger error of the fully convolutional cascade is consistent with error propagation from the intermediate estimate and motivates the modular design, in which the temporal mapping can be selected independently of the first stage.
The Bland–Altman analysis revealed a near-zero bias ( 0.49 ) with 95% limits of agreement of 7.4 to 6.4 . However, the error distribution was not uniform across the measurement range, showing increased dispersion for more negative dorsiflexion values. This indicates that, while the model captures the central tendency of the mapping, its accuracy varies across different regions of the gait cycle.
The phase-resolved analysis localizes this non-uniformity. The largest error occurred during pre-swing, the push-off region, where the ankle plantarflexes most rapidly. This phase is driven by plantarflexor power, which is not directly observed by a shank-mounted IMU and varies considerably between individuals. The timing of the push-off landmark was nonetheless recovered accurately, while its magnitude carried a larger error, indicating that the model captures when the event occurs more reliably than how pronounced it is. Because propulsion intensity is highly individual, subject-specific fine-tuning is a plausible route to reduce the push-off error, whereas the more stereotyped early-stance phase was estimated with the smallest error.
As a contextual reference for measurement error, the reconstruction RMSE (3. 555 ) was below the approximately 5 minimal detectable change reported for gait kinematics in healthy young adults [40]. However, the 95% limits of agreement ( 7.4 to 6.4 ) exceeded this value, with the largest deviations concentrated near push-off. Thus, although the average waveform error falls within the range of between-session reproducibility reported for standard gait analysis [41], individual waveform deviations can exceed clinically relevant reference values. Whether this tolerance is acceptable for prosthetic use depends on the gait sub-phase, particularly swing-phase foot clearance and push-off behavior, and on amputee-specific tolerances that cannot be established from a healthy-cohort study.
The Gazebo/ROS2 simulation further supports the technical feasibility of integrating the proposed pipeline into a physics-based environment. The generated dorsiflexion reference was executed in a suspended transtibial prosthesis model under open-loop position control, producing smooth and repeatable virtual joint trajectories. Under these unloaded, open-loop conditions, the Gazebo results should be interpreted as evidence of reference transmission and software execution rather than functional performance. The simulation therefore shows that the estimated reference can be executed within a simulation-based integration framework, but it does not establish stability, usefulness, or safety during loaded gait. A single shank-mounted IMU has previously been used for real-time pose estimation of a lower-limb prosthesis [42], and deep learning has been applied to prosthetic-ankle quantities such as joint torque [43], situating the present pipeline within this line of work while differing in its target and reference-generation purpose.
These findings are consistent with prior IMU-based lower-limb estimation, which has moved from multi-sensor configurations with explicit kinematic constraints [44] toward reduced-sensor, data-driven strategies [45]. The present results extend this direction by establishing that the shank-to-ankle mapping is phase-dependent and is recovered reliably only when the temporal structure of the gait cycle is preserved, which a global analytical transformation does not achieve. The integration of the estimation stages into a simulation-executable pipeline is reported as an engineering demonstration rather than as the central novelty.
This study has several limitations. First, all experiments were performed on a dataset of healthy young adults; the results therefore describe able-bodied ankle dorsiflexion and cannot be generalized to amputee populations, the transtibial residual limb, or pathological gait. The generated trajectory should therefore be understood as an able-bodied reference rather than a subject-specific control signal. Second, the prosthesis evaluation was conducted in simulation only, as a software integration test, and under a suspended configuration without foot-ground contact, stance-phase loading, or actuator dynamics under load; the integration test does not characterize behavior during loaded gait. Third, the within-test uncertainty was estimated from a held-out set of six subjects, which produced wide confidence intervals and limited the resolution of the statistical tests. Fourth, although the average waveform RMSE was within the range of reported measurement-error thresholds for healthy gait analysis, the 95% limits of agreement exceeded this range, indicating that individual waveform deviations may be clinically relevant. The absolute accuracy therefore remains modest relative to clinical requirements, and the largest error concentrates at push-off. Finally, although the subject-held-out protocol strengthens the validity of the results, further evaluation across additional datasets and walking conditions is necessary. Future work should therefore examine the transfer of this framework to amputee populations, incorporate stance-phase contact and loading in simulation, and evaluate real-time performance in hardware implementations, which remains an active challenge in lower-limb prosthetic systems [46,47,48].
The proposed framework should therefore be interpreted as a preliminary, simulation-based pipeline for able-bodied ankle-dorsiflexion reference generation from a single shank-mounted IMU. The results support temporal consistency and waveform-level feasibility, but not clinical readiness or functional prosthetic control.

5. Conclusions

This study evaluated the technical feasibility of generating able-bodied ankle-dorsiflexion references from a single shank-mounted IMU through a two-stage machine learning pipeline. In the first stage, shank pitch was estimated from raw shank accelerations and angular velocities, and in the second stage this waveform was transformed into an ankle-dorsiflexion waveform through a temporal mapping model. Under a strict subject-held-out evaluation on a multi-subject dataset, the waveform-based deep learning approach showed that preserving the temporal structure of the gait cycle was necessary, whereas a compact feature-based baseline was insufficient to represent the waveform-level relationship, supporting the importance of temporal modeling for this task.
The integration of the proposed framework within a ROS2–Gazebo simulation enabled evaluation of the software integration of the estimation-to-reference-generation pipeline. The generated references were transmitted and executed in a suspended virtual transtibial prosthesis model, confirming that the pipeline can be implemented within a physics-based simulation environment without implying functional behavior during loaded gait.
Overall, the results support the potential of low-sensor, data-driven strategies for able-bodied ankle-dorsiflexion reference generation, while also showing that the mapping from shank kinematics to ankle dorsiflexion cannot be adequately represented by a simple global analytical transformation in a multi-subject setting. Instead, temporal modeling is required to capture the underlying segment-to-joint relationship.
Further work is required to evaluate this framework in amputee populations, incorporate stance-phase contact and loading, and assess performance in real-time prosthetic hardware before considering clinical translation. The pipeline should therefore be regarded as a preliminary, simulation-based approach for able-bodied reference generation rather than a clinically ready or functional prosthetic controller.

Supplementary Materials

The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/biomechanics6030062/s1; Supplementary Material S1: Reproducibility details, including model architectures, Random Forest configuration, training settings, and the exact subject-held-out split of the primary run.

Author Contributions

Conceptualization, O.M.N., D.C.M., C.B. and D.F.V.; methodology, O.M.N., D.C.M. and J.S.R.; modeling, O.M.N. and J.S.R.; validation, O.M.N.; writing—original draft preparation, O.M.N., D.C.M. and J.S.R.; writing—review and editing, C.B. and D.F.V.; supervision, C.B. and D.F.V. All authors have read and agreed to the published version of the manuscript.

Funding

This research received institutional support from the Graduate Studies Office and the Academic Vice-Rectory of the Universidad Industrial de Santander.

Institutional Review Board Statement

Ethical review and approval were waived for this study because it involved a secondary analysis of a publicly available, de-identified human gait dataset and did not include new data collection or direct interaction with human participants.

Data Availability Statement

The data analyzed in this study are publicly available from the NONAN GaitPrint database on Figshare: https://doi.org/10.6084/m9.figshare.c.6415061.v1.

Acknowledgments

The authors gratefully acknowledge the support of the Office of Graduate Studies of Universidad Industrial de Santander, the GIEMA research group, and the DICBOT research group.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Vaca, M.; Stine, R.; Hammond, P.I.; Cavanaugh, M.; Major, M.J.; Gard, S.A. The effect of prosthetic ankle dorsiflexion stiffness on standing balance and gait biomechanics in individuals with unilateral transtibial amputation. J. Prosthet. Orthot. 2024, 36, 110–123. [Google Scholar] [CrossRef] [PubMed]
  2. Chao, E.Y.S. Biomechanics of the human gait. In Frontiers in Biomechanics; Schmid-Schönbein, G.W., Woo, S.L.Y., Zweifach, B.W., Eds.; Springer: New York, NY, USA, 1986; pp. 225–244. [Google Scholar] [CrossRef]
  3. Lovegreen, W.; Murphy, D.P.; Stevens, P.M.; Seo, Y.I.; Webster, J.B. Lower limb amputation and gait. In Atlas of Orthoses and Assistive Devices, 5th ed.; Webster, J.B., Murphy, D.P., Eds.; Elsevier: Philadelphia, PA, USA, 2021; pp. 174–208.e3. [Google Scholar] [CrossRef]
  4. Gehlhar, R.; Tucker, M.; Young, A.J.; Ames, A.D. Review of current state-of-the-art control methods for lower limb powered prostheses. Annu. Rev. Control. 2023, 55, 142–164. [Google Scholar] [CrossRef] [PubMed]
  5. Almansoof, H.; Nuhmani, S.; Muaidi, Q. Role of ankle dorsiflexion in sports performance and injury risk: A narrative review. Electron. J. Gen. Med. 2023, 20, e521. [Google Scholar] [CrossRef] [PubMed]
  6. Stafford, N.E.; Gonzalez, E.B.; Ferris, D.P. Walking ankle biomechanics of individuals with transtibial amputations using a prescribed prosthesis and a portable bionic prosthesis under myoelectric control. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 3036–3047. [Google Scholar] [CrossRef] [PubMed]
  7. Hafner, B.J.; Halsne, E.G.; Morgan, S.J.; Morgenroth, D.C.; Humbert, A.T. Effects of prosthetic feet on metabolic energy expenditure in people with transtibial amputation: A systematic review and meta-analysis. PM&R 2022, 14, 1099–1115. [Google Scholar] [CrossRef] [PubMed]
  8. Lai, D.T.H.; Begg, R.K.; Palaniswami, M. Computational intelligence in gait research: A perspective on current applications and future challenges. IEEE Trans. Inf. Technol. Biomed. 2009, 13, 687–702. [Google Scholar] [CrossRef] [PubMed]
  9. Shi, Q.Q.; Yick, K.L.; Wu, J.; Huang, X.; Tse, C.Y.; Chan, M.K. A Scientometric Analysis and Visualization of Prosthetic Foot Research Work: 2000 to 2022. Bioengineering 2023, 10, 1138. [Google Scholar] [CrossRef] [PubMed]
  10. Rao, Y.; Yang, N.; Gao, T.; Zhang, S.; Shi, H.; Lu, Y.; Ren, S.; Huang, H. Effects of peak ankle dorsiflexion angle on lower extremity biomechanics and pelvic motion during walking and jogging. Front. Neurol. 2024, 14, 1269061. [Google Scholar] [CrossRef] [PubMed]
  11. Wong, C.K.; Vandervort, E.E.; Moran, K.M.; Adler, C.M.; Chihuri, S.T.; Youdan, G.A. Walking asymmetry and its relation to patient-reported and performance-based outcome measures in individuals with unilateral lower limb loss. Int. Biomech. 2022, 9, 33–41. [Google Scholar] [CrossRef] [PubMed]
  12. Lawson, B.E.; Varol, H.A.; Goldfarb, M. Standing stability enhancement with an intelligent powered transfemoral prosthesis. IEEE Trans. Biomed. Eng. 2011, 58, 2617–2624. [Google Scholar] [CrossRef] [PubMed]
  13. Tschiedel, M.; Russold, M.F.; Kaniusas, E. Relying on more sense for enhancing lower limb prostheses control: A review. J. Neuroeng. Rehabil. 2020, 17, 99. [Google Scholar] [CrossRef] [PubMed]
  14. Gupta, R.; Grove, K.; Wei, A.; Lee, J.; Akkouch, A. Ankle and foot arthroplasty and prosthesis: A review on the current and upcoming state of designs and manufacturing. Micromachines 2023, 14, 2081. [Google Scholar] [CrossRef] [PubMed]
  15. Leestma, J.K.; Fehr, K.H.; Adamczyk, P.G. Adapting semi-active prostheses to real-world movements: Sensing and controlling the dynamic mean ankle moment arm with a variable stiffness foot on ramps and stairs. Sensors 2021, 21, 6009. [Google Scholar] [CrossRef] [PubMed]
  16. Mazzarini, A.; Fantozzi, M.; Papapicco, V.; Fagioli, I.; Lanotte, F.; Baldoni, A.; Dell’Agnello, F.; Ferrara, P.; Ciapetti, T.; Molino Lova, R.; et al. A low power ankle–foot prosthesis for push-off enhancement. Wearable Technol. 2023, 4, e18. [Google Scholar] [CrossRef] [PubMed]
  17. Herr, H.M.; Grabowski, A.M. Bionic ankle–foot prosthesis normalizes walking gait for persons with leg amputation. Proc. R. Soc. B 2012, 279, 457–464. [Google Scholar] [CrossRef] [PubMed]
  18. Sun, H.; He, C.; Vujaklija, I. Design trends in actuated lower limb prosthetic systems: A narrative review. Expert Rev. Med. Devices 2023, 20, 1157–1172. [Google Scholar] [CrossRef] [PubMed]
  19. Choo, Y.J.; Chang, M.C. Use of machine learning in the field of prosthetics and orthotics: A systematic narrative review. Prosthet. Orthot. Int. 2023, 47, 226–240. [Google Scholar] [CrossRef] [PubMed]
  20. Wang, F.; Liang, W.; Afzal, H.M.R.; Fan, A.; Li, W.; Dai, X.; Liu, S.; Hu, Y.; Li, Z.; Yang, P. Estimation of lower limb joint angles and joint moments during different locomotive activities using inertial measurement units and a hybrid deep learning model. Sensors 2023, 23, 9039. [Google Scholar] [CrossRef] [PubMed]
  21. Hollinger, D.; Schall, M.C., Jr.; Chen, H.; Zabala, M. Effect of sensor feature inputs on joint angle prediction across simple movements. Sensors 2024, 24, 3657. [Google Scholar] [CrossRef] [PubMed]
  22. Hur, B.; Baek, S.; Kang, I.; Kim, D. Learning based lower limb joint kinematic estimation using open source IMU data. Sci. Rep. 2025, 15, 5287. [Google Scholar] [CrossRef] [PubMed]
  23. Ali, A.E.A.; Owaki, D.; Hayashibe, M. Transferable deep learning models for accurate ankle joint moment estimation during gait using electromyography. Appl. Sci. 2024, 14, 8795. [Google Scholar] [CrossRef]
  24. Alemayoh, T.T.; Lee, J.H.; Okamoto, S. Leg joint angle estimation from a single inertial sensor attached to various lower body links during walking motion. Appl. Sci. 2023, 13, 4794. [Google Scholar] [CrossRef]
  25. Bao, T.; Gao, J.; Wang, J.; Chen, Y.; Xu, F.; Qiao, G.; Li, F. Global bibliometric and visualized analysis of gait analysis and artificial intelligence research from 1992 to 2022. Front. Robot. AI 2023, 10, 1265543. [Google Scholar] [CrossRef] [PubMed]
  26. Wang, J.; Telfer, S.; Burns, J.; Cheng, T. Computer-aided design methods for digitizing the foot and ankle orthoses manufacturing workflow: A scoping review. Prosthetics Orthot. Int. 2025. Online ahead of print. [CrossRef]
  27. Domínguez Ruiz, A.; López Caudana, E.O.; Lugo González, E.; Espinosa García, F.J.; Ambrocio Delgado, R.; García, U.D.; López Gutiérrez, R.; Alfaro Ponce, M.; Ponce, P. Low limb prostheses and complex human prosthetic interaction: A systematic literature review. Front. Robot. AI 2023, 10, 1032748. [Google Scholar] [CrossRef] [PubMed]
  28. Koenig, N.; Howard, A. Design and use paradigms for Gazebo, an open-source multi-robot simulator. In Proceedings of the 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Sendai, Japan, 28 September–2 October 2004; Volume 3, pp. 2149–2154. [Google Scholar] [CrossRef]
  29. Macenski, S.; Foote, T.; Gerkey, B.; Lalancette, C.; Woodall, W. Robot Operating System 2: Design, architecture, and uses in the wild. Sci. Robot. 2022, 7, eabm6074. [Google Scholar] [CrossRef] [PubMed]
  30. Likens, A. NONAN GaitPrint: An IMU Gait Database of Healthy Young Adults; Figshare: London, UK, 2023. [Google Scholar] [CrossRef]
  31. Kingma, D.P.; Ba, J.L. Adam: A Method for Stochastic Optimization. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015—Conference Track Proceedings, San Diego, CA, USA, 7–9 May 2014. [Google Scholar]
  32. Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; Available online: http://www.deeplearningbook.org (accessed on 1 May 2026).
  33. Varma, S.; Simon, R. Bias in error estimation when using cross-validation for model selection. BMC Bioinform. 2006, 7, 91. [Google Scholar] [CrossRef] [PubMed]
  34. Saeb, S.; Lonini, L.; Jayaraman, A.; Mohr, D.C.; Kording, K.P. The need to approximate the use-case in clinical machine learning. GigaScience 2017, 6, gix019. [Google Scholar] [CrossRef] [PubMed]
  35. Open Source Leg. Make Your Own Open Source Leg. 2024. Available online: https://opensourceleg.org/hardware/ (accessed on 1 May 2026).
  36. Mundt, M.; Koeppe, A.; David, S.; Witter, T.; Bamer, F.; Potthast, W.; Markert, B. Estimation of Gait Mechanics Based on Simulated and Measured IMU Data Using an Artificial Neural Network. Front. Bioeng. Biotechnol. 2020, 8, 508923. [Google Scholar] [CrossRef] [PubMed]
  37. Shah, V.R.; Dixon, P.C. Bridging the Methodological Gap Between Inertial Sensors and Optical Motion Capture: Deep Learning as the Path to Accurate Joint Kinematic Modelling Using Inertial Sensors. Sensors 2025, 25, 5728. [Google Scholar] [CrossRef] [PubMed]
  38. Mobarak, R.; Tigrini, A.; Verdini, F.; Al-Timemy, A.H.; Fioretti, S.; Burattini, L.; Mengarelli, A. A Minimal and Multi-Source Recording Setup for Ankle Joint Kinematics Estimation During Walking Using Only Proximal Information from Lower Limb. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 812–821. [Google Scholar] [CrossRef] [PubMed]
  39. Sung, J.; Han, S.; Park, H.; Cho, H.M.; Hwang, S.; Park, J.W.; Youn, I. Prediction of Lower Extremity Multi-Joint Angles during Overground Walking by Using a Single IMU with a Low Frequency Based on an LSTM Recurrent Neural Network. Sensors 2021, 22, 53. [Google Scholar] [CrossRef] [PubMed]
  40. Wilken, J.M.; Rodriguez, K.M.; Brawner, M.; Darter, B.J. Reliability and Minimal Detectible Change values for gait kinematics and kinetics in healthy adults. Gait Posture 2012, 35, 301–307. [Google Scholar] [CrossRef] [PubMed]
  41. McGinley, J.L.; Baker, R.; Wolfe, R.; Morris, M.E. The reliability of three-dimensional kinematic gait measurements: A systematic review. Gait Posture 2009, 29, 360–369. [Google Scholar] [CrossRef] [PubMed]
  42. Duraffourg, C.; Bonnet, X.; Dauriac, B.; Pillet, H. Real Time Estimation of the Pose of a Lower Limb Prosthesis from a Single Shank Mounted IMU. Sensors 2019, 19, 2865. [Google Scholar] [CrossRef] [PubMed]
  43. Prasanna, C.; Realmuto, J.; Anderson, A.; Rombokas, E.; Klute, G. Using Deep Learning Models to Predict Prosthetic Ankle Torque. Sensors 2023, 23, 7712. [Google Scholar] [CrossRef] [PubMed]
  44. Seel, T.; Schauer, T.; Raisch, J. Joint axis and position estimation from inertial measurement data by exploiting kinematic constraints. In Proceedings of the 2012 IEEE International Conference on Control Applications, Dubrovnik, Croatia, 3–5 October 2012; pp. 45–49. [Google Scholar] [CrossRef]
  45. Lee, M.; Park, S. Estimation of three-dimensional lower limb kinetics data during walking using machine learning from a single IMU attached to the sacrum. Sensors 2020, 20, 6277. [Google Scholar] [CrossRef] [PubMed]
  46. Varol, H.A.; Sup, F.; Goldfarb, M. Multiclass real-time intent recognition of a powered lower limb prosthesis. IEEE Trans. Biomed. Eng. 2009, 57, 542. [Google Scholar] [CrossRef] [PubMed]
  47. Price, M.A.; Beckerle, P.; Sup, F.C. Design optimization in lower limb prostheses: A review. IEEE Trans. Neural Syst. Rehabil. Eng. 2019, 27, 1574–1588. [Google Scholar] [CrossRef] [PubMed]
  48. Asif, M.; Tiwana, M.I.; Khan, U.S.; Qureshi, W.S.; Iqbal, J.; Rashid, N.; Naseer, N. Advancements, trends and future prospects of lower limb prosthesis. IEEE Access 2021, 9, 85956–85977. [Google Scholar] [CrossRef]
Figure 1. Location of the shank-mounted IMU. The (left) panel shows the frontal view and the (right) panel shows the sagittal view. The sensor was placed on the anterior and slightly medial aspect of the tibia.
Figure 1. Location of the shank-mounted IMU. The (left) panel shows the frontal view and the (right) panel shows the sagittal view. The sensor was placed on the anterior and slightly medial aspect of the tibia.
Biomechanics 06 00062 g001
Figure 2. Architecture of the waveform-based deep neural network used for shank pitch estimation. The model operates on temporally normalized gait cycles, where each input consists of 100 time steps and six IMU channels. The network includes convolutional layers and residual temporal blocks to capture both local and global temporal dependencies, producing a full shank pitch waveform as output.
Figure 2. Architecture of the waveform-based deep neural network used for shank pitch estimation. The model operates on temporally normalized gait cycles, where each input consists of 100 time steps and six IMU channels. The network includes convolutional layers and residual temporal blocks to capture both local and global temporal dependencies, producing a full shank pitch waveform as output.
Biomechanics 06 00062 g002
Figure 3. Simplified virtual transtibial prosthesis model used for ROS2–Gazebo integration testing.
Figure 3. Simplified virtual transtibial prosthesis model used for ROS2–Gazebo integration testing.
Biomechanics 06 00062 g003
Figure 4. Gazebo/Robot Operating System 2 (ROS 2) simulation setup used to illustrate the execution of the predicted ankle-dorsiflexion reference, with the prosthesis operated in a suspended configuration with no foot-ground contact. The colored red, green, and blue lines indicate the Gazebo coordinate-frame axes corresponding to the X, Y, and Z directions, respectively.
Figure 4. Gazebo/Robot Operating System 2 (ROS 2) simulation setup used to illustrate the execution of the predicted ankle-dorsiflexion reference, with the prosthesis operated in a suspended configuration with no foot-ground contact. The colored red, green, and blue lines indicate the Gazebo coordinate-frame axes corresponding to the X, Y, and Z directions, respectively.
Biomechanics 06 00062 g004
Figure 5. Correlation matrix between inputs and outputs. Note: The abbreviation “Acc” corresponds to accelerations, and “Gyro” corresponds to angular velocities, both given with respect to the three axes.
Figure 5. Correlation matrix between inputs and outputs. Note: The abbreviation “Acc” corresponds to accelerations, and “Gyro” corresponds to angular velocities, both given with respect to the three axes.
Biomechanics 06 00062 g005
Figure 6. (a) Representative comparison between measured and estimated shank pitch waveforms obtained using the deep neural network on the test set. (b) Bland–Altman analysis showing the agreement between predicted and measured values across all samples. The solid line represents the mean bias, while the dashed lines indicate the 95% limits of agreement.
Figure 6. (a) Representative comparison between measured and estimated shank pitch waveforms obtained using the deep neural network on the test set. (b) Bland–Altman analysis showing the agreement between predicted and measured values across all samples. The solid line represents the mean bias, while the dashed lines indicate the 95% limits of agreement.
Biomechanics 06 00062 g006
Figure 7. Bland–Altman analysis of the Random Forest model for mean shank pitch estimation on the test set. The central solid line represents the mean bias, while the dashed lines indicate the 95% limits of agreement.
Figure 7. Bland–Altman analysis of the Random Forest model for mean shank pitch estimation on the test set. The central solid line represents the mean bias, while the dashed lines indicate the 95% limits of agreement.
Biomechanics 06 00062 g007
Figure 8. Bland–Altman analysis of the temporal mapping model for ankle dorsiflexion estimation. The solid line represents the mean bias, while the dashed lines indicate the 95% limits of agreement.
Figure 8. Bland–Altman analysis of the temporal mapping model for ankle dorsiflexion estimation. The solid line represents the mean bias, while the dashed lines indicate the 95% limits of agreement.
Biomechanics 06 00062 g008
Figure 9. Mean measured and predicted right ankle dorsiflexion across the normalized gait cycle (shaded band: ±1 SD of the measured signal). Vertical bands indicate the five gait sub-phases; markers indicate the terminal-stance dorsiflexion peak and the maximum plantarflexion.
Figure 9. Mean measured and predicted right ankle dorsiflexion across the normalized gait cycle (shaded band: ±1 SD of the measured signal). Vertical bands indicate the five gait sub-phases; markers indicate the terminal-stance dorsiflexion peak and the maximum plantarflexion.
Biomechanics 06 00062 g009
Table 1. Mean and standard deviation of the IMU inputs.
Table 1. Mean and standard deviation of the IMU inputs.
InputMeanStandard Deviation
Acceleration in x of the shank (mg)2.99636
Acceleration in y of the shank (mg)1.45538
Acceleration in z of the shank (mg)3.36497
Angular velocity with respect to the x axis (°/s)4.8990.8
Angular velocity with respect to the y axis (°/s)5.48177
Angular velocity with respect to the z axis (°/s)14.9461.7
Table 2. Mass, inertia tensor, and center of mass of the simulated components.
Table 2. Mass, inertia tensor, and center of mass of the simulated components.
ElementMass (kg)Inertia ( kg·m 2 )Center of Mass (m)
Testing Support3.31 0.1771 0 0 0 0.4031 0 0 0 0.3127 (0, 0, 0.411)
Shank1.08 0.00144 0 0 0 0.00181 0 0 0 0.00077 (−0.00148, −0.00913, −0.17223)
Foot0.199 8.85 × 10 5 2.9 × 10 6 6.49 × 10 5 2.9 × 10 6 4.82 × 10 4 3.41 × 10 7 6.49 × 10 5 3.41 × 10 7 5.09 × 10 4 (0.02386, −0.00442, −0.05958)
IMU0.00573 3.1961 × 10 7 0 0 0 3.1961 × 10 7 0 0 0 5.4378 × 10 7 (0.012, 0, 0.005)
Table 3. Performance of the first-stage models for shank pitch estimation under subject-held-out evaluation. The RF predicts a single cycle-level scalar (mean shank pitch); the DNN predicts the full shank pitch waveform.
Table 3. Performance of the first-stage models for shank pitch estimation under subject-held-out evaluation. The RF predicts a single cycle-level scalar (mean shank pitch); the DNN predicts the full shank pitch waveform.
ModelValidationTest
RMSE (°)MAE (°) R 2 RMSE (°)MAE (°) R 2
Random Forest 4.9794.504−0.1103.3512.827−0.203
DNN 5.1634.3560.9573.8643.1620.973
Table 4. Performance of the second-stage temporal mapping model for ankle-dorsiflexion estimation across different random seeds.
Table 4. Performance of the second-stage temporal mapping model for ankle-dorsiflexion estimation across different random seeds.
SeedValidationTest
RMSE (°)MAE (°) R 2 RMSE (°)MAE (°) R 2
424.6273.5180.8123.5552.7690.825
74.8923.9130.8003.4812.5780.850
213.7962.9660.8314.4123.5220.765
Table 5. Phase-specific error of the right ankle-dorsiflexion estimate on the test set.
Table 5. Phase-specific error of the right ankle-dorsiflexion estimate on the test set.
Gait PhaseCycle (%)RMSE (°)MAE (°)Bias (°)
Early stance (loading)0–102.7752.2430.779
Mid-stance10–303.1722.5210.630
Terminal stance30–503.0122.472−0.779
Pre-swing50–605.2254.535−3.817
Swing60–1003.6432.731−0.391
Table 6. Ablation of the ankle-dorsiflexion estimation pipeline. The “Input → output” column indicates the direction of each evaluated mapping, where pitch denotes shank pitch and ankle denotes ankle dorsiflexion. Values are test-set mean ± standard deviation across three random seeds.
Table 6. Ablation of the ankle-dorsiflexion estimation pipeline. The “Input → output” column indicates the direction of each evaluated mapping, where pitch denotes shank pitch and ankle denotes ankle dorsiflexion. Values are test-set mean ± standard deviation across three random seeds.
ConfigurationInput → OutputRMSE (°)MAE (°) R 2
Temporal mapping
CNNpitch → ankle3.816 ± 0.5182.956 ± 0.4990.813 ± 0.044
BiLSTMpitch → ankle3.987 ± 0.7763.104 ± 0.6380.792 ± 0.075
Direct single-stage
CNNIMU → ankle4.551 ± 0.4813.605 ± 0.3460.736 ± 0.040
BiLSTMIMU → ankle4.952 ± 1.0543.907 ± 0.8830.684 ± 0.107
Cascade two-stage
CNN → BiLSTMIMU → pitch → ankle4.767 ± 0.8453.680 ± 0.5860.708 ± 0.089
CNN → CNNIMU → pitch → ankle6.040 ± 1.5904.567 ± 1.0650.525 ± 0.202
Table 7. Paired per-subject model comparison on the seed-42 test split ( n = 6 subjects). Values are the mean per-subject RMSE difference (A − B), with a subject-level bootstrap 95% confidence interval and a Wilcoxon signed-rank test. A positive Δ RMSE indicates higher error for model A. The same qualitative pattern was observed for MAE and R 2 .
Table 7. Paired per-subject model comparison on the seed-42 test split ( n = 6 subjects). Values are the mean per-subject RMSE difference (A − B), with a subject-level bootstrap 95% confidence interval and a Wilcoxon signed-rank test. A positive Δ RMSE indicates higher error for model A. The same qualitative pattern was observed for MAE and R 2 .
Comparison (A − B) Δ RMSE (°)95% CIWilcoxon p
Temporal mapping (CNN − BiLSTM) 0.520 [ 0.982 , 0.033 ] 0.31
Two-stage (CNN → BiLSTM) − Direct (CNN) 0.071 [ 0.291 , 0.458 ] 1.00
Two-stage (CNN → CNN) − Direct (CNN) 0.286 [ 0.147 , 0.736 ] 0.31
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Martínez, D.C.; Navas, O.M.; Rada, J.S.; Borras, C.; Villegas, D.F. AI-Based Two-Stage Estimation of Ankle Dorsiflexion from a Single IMU: A Gazebo-Based Transtibial Prosthesis Simulation Study. Biomechanics 2026, 6, 62. https://doi.org/10.3390/biomechanics6030062

AMA Style

Martínez DC, Navas OM, Rada JS, Borras C, Villegas DF. AI-Based Two-Stage Estimation of Ankle Dorsiflexion from a Single IMU: A Gazebo-Based Transtibial Prosthesis Simulation Study. Biomechanics. 2026; 6(3):62. https://doi.org/10.3390/biomechanics6030062

Chicago/Turabian Style

Martínez, Diana C., Oscar M. Navas, Juan S. Rada, Carlos Borras, and Diego F. Villegas. 2026. "AI-Based Two-Stage Estimation of Ankle Dorsiflexion from a Single IMU: A Gazebo-Based Transtibial Prosthesis Simulation Study" Biomechanics 6, no. 3: 62. https://doi.org/10.3390/biomechanics6030062

APA Style

Martínez, D. C., Navas, O. M., Rada, J. S., Borras, C., & Villegas, D. F. (2026). AI-Based Two-Stage Estimation of Ankle Dorsiflexion from a Single IMU: A Gazebo-Based Transtibial Prosthesis Simulation Study. Biomechanics, 6(3), 62. https://doi.org/10.3390/biomechanics6030062

Article Metrics

Back to TopTop