Submitted:
28 September 2025
Posted:
30 September 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
- (1)
- Multi-objective optimization of CNN architectures to balance accuracy and efficiency, yielding specialized models for short, natural, and long strides.
- (2)
- A lightweight gait classifier to select specialized models in real time.
- (3)
- Deployment and validation of the optimized framework on a $40 TinyML platform (Sipeed MaixBit with Kendryte K210), demonstrating robust accuracy and low latency suitable for prosthetic applications.
2. Related Work
3. Materials and Methods
3.1. Data Acquisition
3.2. Learning Models
3.2.1. Neural Networks
- Multi-Layer Perceptrons (MLP): Consist of fully or densely connected layers. They are effective for approximating complex functions but may struggle with capturing temporal dependencies inherent in gait data [34]. Despite their simplicity, MLPs often serve as a lightweight baseline in embedded applications.
- Convolutional Neural Networks (CNN): Traditionally applied to two-dimensional image data, they can be adapted for time series analysis by using one-dimensional convolutional layers. In this setup, filters slide across the temporal axis of the input data to extract local sequential patterns. This adaptation allows CNNs to effectively model temporal dependencies in sensor signals, offering structural advantages such as parameter sharing and locality, which contribute to improved performance and reduced computational load on embedded systems [31,35].
- Long Short-Term Memory Networks (LSTM): A type of recurrent neural network designed to model sequential data and capture long-term dependencies through memory cells and gating mechanisms [36]. Nevertheless, LSTMs may not perform optimally in our application due to compatibility issues with TensorFlow Lite on embedded systems like the K210 microcontroller [37] and due to their higher memory footprint compared to feedforward models.
3.2.2. Complexity and Depth Modulation with and
- MLP: Increasing adds more neurons per hidden layer, enhancing the ability to capture complex nonlinear relationships. Increasing adds more hidden layers, improving modeling of intricate data patterns but may lead to vanishing gradients.
- CNN: Higher increases the number of filters per convolutional layer, allowing learning of more diverse features. Higher adds more convolutional and pooling blocks, enabling deeper feature extraction but possibly causing training difficulties [38].
- LSTM: adjusts the number of memory units per layer, improving the capture of temporal dependencies. Increasing stacks more LSTM layers, enhancing pattern learning across different time scales but increases computational complexity.
3.3. Model Selection
3.3.1. Pareto Frontier
3.3.2. Weighted Metrics
3.4. Evaluation Metrics
3.4.1. Root Mean Squared Error (RMSE)
3.4.2. Mean Squared Error (MSE)
3.4.3. Coefficient of Determination ()
4. Experiments
4.1. Data Acquisition
- Short strides measuring 0.6 meters.
- Natural strides, equivalent to the participant’s average step length, at 0.82 meters.
- Extended strides of 1 meter.
4.2. Data Processing
4.3. Data Preprocessing and Augmentation
4.4. Training Methodology
4.5. Multi-Objective Optimization
4.6. Combined vs. Specialized Gait Prediction Models
4.7. Embedded Hardware and Implementation
5. Results and Discussion
5.1. Combined Gait Model
5.2. Gait Classification and Specialized Models
5.3. Model Performance Across Different Stride Types
5.3.1. Local Evaluation
5.3.2. Embedded Evaluation
5.3.3. Comparison with Prior Work
5.4. Hardware Considerations and Model Deployment
6. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
References
- Aljarrah, Q.; Al-Share, O.; Al-Zoubi, N.; Bakkar, S.; Obaidat, R.; Allouh, M. Major lower extremity amputation: A contemporary analysis from an academic tertiary referral centre in a developing community. BMC Surgery 2019, 19, 170. https://doi.org/10.1186/s12893-019-0637-y.
- World Health Organization. Disability and health, 2023. Available online: https://www.who.int/news-room/fact-sheets/detail/disability-and-health (accessed on 15 October 2023).
- Sociedade Brasileira de Angiologia e de Cirurgia Vascular. Brazil Sets Record for Foot and Leg Amputations Due to Diabetes, 2023. Available online: https://sbacv.org.br/brasil-bate-recorde-de-amputacoes-de-pes-e-pernas-em-decorrencia-do-diabetes/ (accessed on November 5, 2024).
- Bionics For Everyone. Microprocessor Knee Price List, 2022. Available online: https://bionicsforeveryone.com/microprocessor-knee-price-list/ (accessed on November 10, 2024).
- Brazilian Institute of Geography and Statistics (IBGE). IBGE Releases Per Capita Household Income and Regional Imbalance Coefficient for 2022, 2024. Available online: https://agenciadenoticias.ibge.gov.br/agencia-sala-de-imprensa/2013-agencia-de-noticias/releases/37023-ibge-divulga-o-rendimento-domiciliar-per-capita-e-o-coeficiente-de-desequilibrio-regional-de-2022 (accessed on November 10, 2024).
- Amtmann, D.; Morgan, S.; Kim, J.; Hafner, B. Health-related profiles of people with lower limb loss. Arch. Phys. Med. Rehabil. 2015, 96, 1474–1483. https://doi.org/10.1016/j.apmr.2015.03.024.
- World Health Organization. Assistive technology, 2023. Available online: https://www.who.int/news-room/fact-sheets/detail/assistive-technology (accessed on 15 October 2023).
- Herr, H. Exoskeletons and orthoses: Classification, design challenges and future directions. J. Neuroeng. Rehabil. 2009, 6, 21. https://doi.org/10.1186/1743-0003-6-21.
- Sawicki, G.; Gordon, K.; Ferris, D. Powered lower limb orthoses: Applications in motor adaptation and rehabilitation. In Proceedings of the Proceedings of the IEEE International Conference on Rehabilitation Robotics (ICORR), Chicago, IL, USA, 2005; pp. 206–211. https://doi.org/10.1109/ICORR.2005.1501086.
- Sup, F.; Varol, H.; Goldfarb, M. Upslope walking with a powered knee and ankle prosthesis: Initial results with an amputee subject. IEEE Trans. Neural Syst. Rehabil. Eng. 2011, 19, 71–78. https://doi.org/10.1109/TNSRE.2010.2087360.
- Au, S.; Berniker, M.; Herr, H. Powered ankle-foot prosthesis to assist level-ground and stair-descent gaits. Neural Netw. 2008, 21, 654–666. https://doi.org/10.1016/j.neunet.2008.03.006.
- Huang, H.; Zhang, F.; Hargrove, L.; Dou, Z.; Rogers, D.; Englehart, K. Continuous locomotion-mode identification for prosthetic legs based on neuromuscular-mechanical fusion. IEEE Trans. Biomed. Eng. 2011, 58, 2867–2875. https://doi.org/10.1109/TBME.2011.2161671.
- Farina, D.; Aszmann, O. Bionic limbs: Clinical reality and academic promises. Sci. Transl. Med. 2014, 6, 257ps12. https://doi.org/10.1126/scitranslmed.3010453.
- Young, A.; Simon, A.; Hargrove, L. A training method for locomotion mode prediction using powered lower limb prostheses. IEEE Trans. Neural Syst. Rehabil. Eng. 2014, 22, 671–677. https://doi.org/10.1109/TNSRE.2013.2285101.
- Zhang, F.; Liu, M.; Huang, H. Effects of locomotion mode recognition errors on volitional control of powered above-knee prostheses. IEEE Trans. Neural Syst. Rehabil. Eng. 2015, 23, 64–72. https://doi.org/10.1109/TNSRE.2014.2327230.
- Young, A.; Ferris, D. State of the art and future directions for lower limb robotic exoskeletons. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 171–182. https://doi.org/10.1109/TNSRE.2016.2521160.
- Zeroual, A.; Harrou, F.; Dairi, A.; Sun, Y. Deep learning methods for forecasting COVID-19 time-series data: A comparative study. Chaos Solitons Fractals 2020, 140, 110121. https://doi.org/10.1016/j.chaos.2020.110121.
- Abadade, Y.; Temouden, A.; Bamoumen, H.; Benamar, N.; Chtouki, Y.; Hafid, A. A comprehensive survey on TinyML. IEEE Access 2023, 11, 96892–96922. https://doi.org/10.1109/ACCESS.2023.3294111.
- Hafer, J.; O’Connell, M.; Komnik, I.; Wentink, E.; Boyer, K.; Silder, A.; Meyer, C.; Li, L.; Willwacher, S.; Pohl, M.; et al. Challenges and advances in the use of wearable sensors for lower extremity biomechanics. J. Biomech. 2023, 157, 111714. https://doi.org/10.1016/j.jbiomech.2023.111714.
- Cullen, S.; Mackay, R.; Mohagheghi, A.; Du, X. 3D Motion Analysis for the Assessment of Dynamic Coupling in Transtibial Prosthetics: A Proof of Concept. IEEE Open Journal of Engineering in Medicine and Biology 2023, 4, 141–147. https://doi.org/10.1109/OJEMB.2023.3296978.
- Li, Y.; Yang, X.; Zhou, Y.; Chen, J.; Du, M.; Yang, Y. Adaptive stimulation profiles modulation for foot drop correction using functional electrical stimulation: a proof of concept study. IEEE Journal of Biomedical and Health Informatics 2020, 25, 59–68. https://doi.org/10.1109/JBHI.2020.2989747.
- Son, J.; Shi, F.; Rymer, W. BiLSTM-based joint torque prediction from mechanomyogram during isometric contractions: A proof of Concept Study. IEEE Transactions on Neural Systems and Rehabilitation Engineering 2024, 32, 1926–1933. https://doi.org/10.1109/TNSRE.2024.3399121.
- Khezri, M.; Jahed, M. An exploratory study to design a novel hand movement identification system. Computers in Biology and Medicine 2009, 39, 433–442. https://doi.org/10.1016/j.compbiomed.2009.02.001.
- Seel, T.; Raisch, J.; Schauer, T. IMU-based joint angle measurement for gait analysis. Sensors 2014, 14, 6891–6909. https://doi.org/10.3390/s140406891.
- Küderle, A.; et al.. Gaitmap—An Open Ecosystem for IMU-Based Human Gait Analysis and Algorithm Benchmarking. IEEE Open Journal of Engineering in Medicine and Biology 2024, 5, 163–172. https://doi.org/10.1109/OJEMB.2024.3356791.
- Han, Y.; Wong, K. 2-point error estimation algorithm for 3-D thigh and shank angles estimation using IMU. IEEE Sens. J. 2018, 18, 8525–8531. https://doi.org/10.1109/JSEN.2018.2865764.
- Pacini Panebianco, G.; Bisi, M.; Stagni, R.; Fantozzi, S. Analysis of the performance of 17 algorithms from a systematic review: Influence of sensor position, analysed variable and computational approach in gait timing estimation from IMU measurements. Gait Posture 2018, 66, 76–82. https://doi.org/10.1016/j.gaitpost.2018.08.025.
- Gui, P.; Tang, L.; Mukhopadhyay, S. MEMS based IMU for tilting measurement: Comparison of complementary and Kalman filter based data fusion. In Proceedings of the Proceedings of the IEEE 10th Conference on Industrial Electronics and Applications (ICIEA), Auckland, New Zealand, 2015; pp. 2004–2009. https://doi.org/10.1109/ICIEA.2015.7334442.
- Zaroug, A.; Garofolini, A.; Lai, D.; Mudie, K.; Begg, R. Prediction of gait trajectories based on the long short term memory neural networks. PLoS ONE 2021, 16, e0255597. https://doi.org/10.1371/journal.pone.0255597.
- Su, B.; Gutierrez-Farewik, E. Gait trajectory and gait phase prediction based on an LSTM network. Sensors 2020, 20, 7127. https://doi.org/10.3390/s20247127.
- Karakish, M.; Fouz, M.; ELsawaf, A. Gait trajectory prediction on an embedded microcontroller using deep learning. Sensors 2022, 22, 8441. https://doi.org/10.3390/s22218441.
- Huang, Y.; He, Z.; Liu, Y.; Yang, R.; Zhang, X.; Cheng, G.; Yi, J.; Ferreira, J.; Liu, T. Real-time intended knee joint motion prediction by deep-recurrent neural networks. IEEE Sens. J. 2019, 19, 11503–11509. https://doi.org/10.1109/JSEN.2019.2933603.
- Zihajehzadeh, S.; Park, E. A novel biomechanical model-aided IMU/UWB fusion for magnetometer-free lower body motion capture. IEEE Trans. Syst. Man Cybern. Syst. 2017, 47, 927–938. https://doi.org/10.1109/TSMC.2016.2521823.
- Haykin, S. Neural Networks: A Comprehensive Foundation; Prentice Hall PTR: Upper Saddle River, NJ, USA, 1998.
- Kiranyaz, S.; Avci, O.; Abdeljaber, O.; Ince, T.; Gabbouj, M.; Inman, D. 1D convolutional neural networks and applications: A survey. Mech. Syst. Signal Process. 2021, 151, 107398. https://doi.org/10.1016/j.ymssp.2020.107398.
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016.
- TensorFlow. Convert RNN models to TensorFlow Lite, 2024. Available online: https://www.tensorflow.org/lite/models/convert/rnn (accessed on 15 October 2023).
- Heim, L.; Biri, A.; Qu, Z.; Thiele, L. Measuring what really matters: Optimizing neural networks for TinyML, 2021, [2104.10645].
- Deb, K. Multi-Objective Optimization Using Evolutionary Algorithms; John Wiley & Sons: Chichester, UK, 2001.
- Tran, L.; Choi, D. Data augmentation for inertial sensor-based gait deep neural network. IEEE Access 2020, 8, 12364–12378. https://doi.org/10.1109/ACCESS.2020.2966142.
- Hyndman, R.; Athanasopoulos, G. Forecasting: Principles and Practice, 2nd ed.; OTexts: Melbourne, Australia, 2018.
- Farina, D.; Jiang, N.; Rehbaum, H.; Holobar, A.; Graimann, B.; Dietl, H.; Aszmann, O. The extraction of neural information from the surface EMG for the control of upper-limb prostheses: Emerging avenues and challenges. IEEE Trans. Neural Syst. Rehabil. Eng. 2014, 22, 797–809. https://doi.org/10.1109/TNSRE.2014.2305111.
- Sánchez Marco, V.; Taylor, B.; Wang, Z.; Elkhatib, Y. Optimizing deep learning inference on embedded systems through adaptive model selection, 2019, [1911.04946].
- Wan, C.; Wang, L.; Phoha, V. A survey on gait recognition. ACM Comput. Surv. 2018, 51, 89. https://doi.org/10.1145/3230633.
- Han, Y.; Tang, M.; Li, Y.; Wu, F.; Yang, Y.; Xu, C. Dynamic neural networks: A survey, 2021, [2102.04906].
- Gholami, M.; Napier, C.; Menon, C. Estimating lower extremity running gait kinematics with a single accelerometer: A deep learning approach. Sensors 2020, 20, 2939. https://doi.org/10.3390/s20102939.
- Mundt, M.; Koeppe, A.; David, S.; Witter, T.; Bamer, F.; Potthast, W.; Markert, B. Prediction of lower limb joint angles and moments during gait using artificial neural networks. Med. Biol. Eng. Comput. 2020, 58, 211–225. https://doi.org/10.1007/s11517-019-02061-3.
- Saoud, L.; Ibrahim, H.; Aljarah, A.; Hussain, I. Improving knee joint angle prediction through dynamic contextual focus and gated linear units, 2023, [2306.06900].







| Gender | Age (years) | Height (cm) |
|---|---|---|
| Male | ||
| Female |
| Parameter | Variations |
|---|---|
| 16, 32, 64, 128, 256 | |
| 2, 3, 4, 5, 6 | |
| Input Window Size | 16, 32, 64, 128 |
| Prediction Horizon | 1, 3, 5, 10 |
| Metric | Weight |
|---|---|
| RMSE | 0.3 |
| Model Size | 0.3 |
| Forecast Horizon | 0.3 |
| Input Window Size | 0.1 |
| Alpha | RMSE | Model Size | Model | Wdw. Size | Horizon | Beta | Score |
|---|---|---|---|---|---|---|---|
| 16 | 7.160 | 8,644 | CNN1D | 16 | 1 | 2 | 0.418 |
| 16 | 5.630 | 33,220 | CNN1D | 64 | 1 | 2 | 0.509 |
| 16 | 7.547 | 6,660 | CNN1D | 16 | 1 | 3 | 0.402 |
| 16 | 7.484 | 6,796 | CNN1D | 16 | 3 | 3 | 0.555 |
| 16 | 6.238 | 10,756 | CNN1D | 32 | 1 | 3 | 0.469 |
| 16 | 4.894 | 18,948 | CNN1D | 64 | 1 | 3 | 0.506 |
| 16 | 4.869 | 19,084 | CNN1D | 64 | 3 | 3 | 0.657 |
| 16 | 3.166 | 19,220 | CNN1D | 64 | 10 | 4 | 0.807 |
| 16 | 3.105 | 35,332 | CNN1D | 128 | 1 | 4 | 0.607 |
| 32 | 3.063 | 263,044 | CNN1D | 128 | 5 | 2 | 0.500 |
| 32 | 3.021 | 140,292 | CNN1D | 128 | 3 | 4 | 0.564 |
| 64 | 2.424 | 559,108 | CNN1D | 128 | 5 | 4 | 0.374 |
| 64 | 1.894 | 560,148 | CNN1D | 128 | 10 | 4 | 0.700 |
| Parameter | Value |
|---|---|
| alpha () | 16 |
| beta () | 4 |
| rmse | 2.558 |
| model_size | 19,220 |
| model | CNN1D |
| window_size | 64.0 |
| horizon | 10.0 |
| Parameter | Value |
|---|---|
| alpha () | 16 |
| beta () | 4 |
| rmse | 1.486 |
| model_size | 19,220 |
| model | CNN1D |
| window_size | 64.0 |
| horizon | 10.0 |
| Parameter | Value |
|---|---|
| alpha () | 8 |
| beta () | 5 |
| rmse | 2.108 |
| model_size | 15,360 |
| model | CNN1D |
| window_size | 64.0 |
| horizon | 10.0 |
| Parameter | Value |
|---|---|
| alpha () | 16 |
| beta () | 4 |
| accuracy | 0.9183 |
| model_size | 9,180 |
| model | MLP |
| window_size | 64 |
| horizon | 10 |
| Gait Type | Combined Model MSE (∘2) | Specialized Model MSE (∘2) | Improvement (%) |
|---|---|---|---|
| Short | 13.467 | 6.543 | 51.41% |
| Natural | 6.407 | 2.208 | 65.53% |
| Long | 9.074 | 4.443 | 51.03% |
| Gait Type | Combined Model MSE (∘2) | Specialized Model MSE (∘2) | Improvement (%) |
|---|---|---|---|
| Short | 13.665 | 6.909 | 49.43% |
| Natural | 6.634 | 2.552 | 61.53% |
| Long | 9.350 | 4.793 | 48.75% |
| Reference | Approach | RMSE (∘) | Inf. Time (ms) | |
|---|---|---|---|---|
| [30] | LSTM | 0.98 | – | – |
| [46] | CNN | 0.98 | 3.4 | – |
| [47] | LSTM | 0.983 | 1.80 | – |
| [32] | RNN | – | 2.93 | – |
| [48] | Transformer | 0.9965 | 1.794 | – |
| [31] | CNN | 0.944 | – | 27.327 |
| Ours (Comb.) | CNN | 0.965 | 3.166 | 18.257 |
| Ours (Spec.) | CNN | 0.9804 | 2.050 | 16.845 |
| Hardware | Price (USD) | Accelerator | Suitable Models/Projects |
|---|---|---|---|
| ESP32 | $10 | None | Simple ML models |
| Sipeed MaixBit | $40 | KPU (CNN accelerator) | CNNs, Real-time applications |
| Jetson Nano | $240 | 128-core Maxwell GPU | LSTMs, Transformers |
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. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).