Towards AI-controlled FES-restoration of movements: Learning cycling stimulation pattern with reinforcement learning

Nat Wannawas, A. Aldo FaisalarXiv 2023 · DOI

Introduction

Functional Electrical Stimulation (FES) is a rehabilitative technology that applies electrical pulses to paralyzed muscles, triggering contractions and enabling functional movements like cycling. However, the effectiveness of FES cycling is highly dependent on the "stimulation pattern"—the precise timing and intensity of pulses delivered to various muscle groups. Traditionally, finding an optimal, person-specific pattern has been a labor-intensive process, requiring either tedious manual trial-and-error by clinicians or the use of expensive hardware such as force-sensing pedals and motorized bikes.

Furthermore, many existing approaches attempt to mimic "natural" electromyogram (EMG) patterns from healthy individuals. However, because FES-induced contractions differ from natural ones (e.g., longer physiological delays), these biological patterns are often suboptimal. This research proposes a "sensor-light" AI-driven pipeline to automatically discover and refine individualized stimulation patterns.

Methods: A Two-Phase AI Pipeline

The researchers developed a framework that bridges the gap between virtual musculoskeletal modeling and real-world application through a two-phase process.

Overview of the two-phase pipeline: (a) Model-based phase in simulation, (b) musculoskeletal model details, and (c) real-world experimental setup.

1. Model-Based Phase (Simulation)

The first phase involves creating a customized musculoskeletal model in OpenSim. This model is tailored to the specific user's anatomy (e.g., leg lengths) and the geometry of the cycling equipment. Within this virtual environment, a Reinforcement Learning (RL) agent is trained using the Soft Actor-Critic (SAC) algorithm. The agent's objective is to maximize cycling cadence while minimizing muscle fatigue, represented by an action penalty in the reward function. To ensure computational efficiency, the agent learns a pattern for one leg, which is then mirrored for the other.

2. Fine-Tuning Phase (Real-World)

Directly applying a simulation-trained agent to a human subject is risky; sudden or erratic movements during RL exploration could cause injury. To solve this "sim-to-real" challenge safely, the authors employed Conservative Q-Learning (CQL), an offline RL algorithm.

In this phase, the system collects a small amount of real-world cycling data (approximately 100 seconds) using the pattern derived from the simulation along with minor variations. The CQL agent then learns from this static dataset to refine the stimulation pattern, accounting for the specific hardware dynamics and the user's unique muscle responses without requiring active, risky exploration on the live subject.

Experimental Results

The approach was validated through both extensive simulations and real-world testing on a healthy 30-year-old male subject using a BerkelBike stationary tricycle.

The real-world experimental setup featuring a BerkelBike, RehaStim1 stimulator, and electrodes placed on the subject's quadriceps and hamstrings.

Robustness and Efficiency

In simulation, the RL agent successfully discovered effective patterns across 10 different bike and body configurations, demonstrating the model's robustness to anatomical variations. Remarkably, the entire end-to-end process—from initial measurements to a fully fine-tuned real-world pattern—took only about 20 minutes.

Performance Gains

The AI-generated patterns significantly outperformed the traditional "natural" EMG-based baseline in real-world tests:

  • EMG-based pattern: 48.13 RPM
  • Model-based AI pattern: 49.83 RPM
  • Fine-tuned AI pattern: 52.37 RPM

The AI-learned patterns naturally accounted for the ~100ms delay in FES-induced contractions (compared to ~50ms for natural signals) by initiating stimulation earlier in the crank cycle. This confirms that AI can discover more effective timings for assistive technology than those found in biological systems.

Discussion and Future Work

While the results are promising, the study was limited to a single healthy subject. Future research must evaluate the system with individuals with paralysis, who may face different muscle dynamics and require assistance to initiate movement. Additionally, incorporating real-time fatigue modeling could allow the AI to dynamically adjust stimulation during long exercise sessions to maximize endurance.

Reference: Wannawas, N., & Faisal, A. A. (2023). Towards AI-controlled movement restoration: Learning FES-cycling stimulation with reinforcement learning. Presented at the International Conference on Rehabilitation Robotics (ICORR) 2023.

Summary updated

BibTeX
@misc{wannawas2023towards,
  author = {Nat Wannawas and A. Aldo Faisal},
  title = {{Towards AI-controlled FES-restoration of movements: Learning cycling stimulation pattern with reinforcement learning}},
  year = {2023},
  eprint = {2303.09986},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.09986},
}
Figure