Gait Stride Length Estimation Using Embedded Machine Learning

Sensors (Basel). 2023 Aug 14;23(16):7166. doi: 10.3390/s23167166.

Abstract

Introduction: Spatiotemporal gait parameters, e.g., gait stride length, are measurements that are classically derived from instrumented gait analysis. Today, different solutions are available for gait assessment outside the laboratory, specifically for spatiotemporal gait parameters. Such solutions are wearable devices that comprise an inertial measurement unit (IMU) sensor and a microcontroller (MCU). However, these existing wearable devices are resource-constrained. They contain a processing unit with limited processing and memory capabilities which limit the use of machine learning to estimate spatiotemporal gait parameters directly on the device. The solution for this limitation is embedded machine learning or tiny machine learning (tinyML). This study aims to create a machine-learning model for gait stride length estimation deployable on a microcontroller.

Materials and method: Starting from a dataset consisting of 4467 gait strides from 15 healthy people, measured by IMU sensor, and using state-of-the-art machine learning frameworks and machine learning operations (MLOps) tools, a multilayer 1D convolutional float32 and int8 model for gait stride length estimation was developed.

Results: The developed float32 model demonstrated a mean accuracy and precision of 0.23 ± 4.3 cm, and the int8 model demonstrated a mean accuracy and precision of 0.07 ± 4.3 cm. The memory usage for the float32 model was 284.5 kB flash and 31.9 kB RAM. The int8 model memory usage was 91.6 kB flash and 13.6 kB RAM. Both models were able to be deployed on a Cortex-M4F 64 MHz microcontroller with 1 MB flash memory and 256 kB RAM.

Conclusions: This study shows that estimating gait stride length directly on a microcontroller is feasible and demonstrates the potential of embedded machine learning, or tinyML, in designing wearable sensor devices for gait analysis.

Keywords: IMU; MCU; embedded machine learning; gait analysis; gait stride length; healthcare; inertial measurement unit; machine learning; microcontroller; neural network; regression; tinyML; wearable sensors.

MeSH terms

  • Algorithms
  • Cerebral Cortex
  • Gait Analysis*
  • Gait*
  • Humans
  • Machine Learning