Towards AI-controlled FES-restoration of arm movements: neuromechanics-based reinforcement learning for 3-D reaching

Nat Wannawas, A. Aldo Faisal

Introduction

Functional Electrical Stimulation (FES) offers a pathway to restore motor function for individuals living with paralysis resulting from stroke or spinal cord injury. By applying electrical pulses to trigger muscle contractions, FES can effectively "re-animate" limbs. However, while FES has seen success in rhythmic tasks like cycling, controlling the human arm for precise 3D reaching remains a significant challenge. This paper, presented at the 2023 IEEE/EMBS Conference on Neural Engineering, proposes a novel framework that combines realistic neuromechanical modeling with Reinforcement Learning (RL) to achieve complex reaching movements without the need for intensive manual tuning.

The Challenge of Upper-Limb FES

The difficulty in restoring arm function stems from two primary factors. First, the human arm is a high-dimensional system characterized by non-linear dynamics. Existing FES models often oversimplify this by treating muscles as straight lines or, conversely, are too computationally expensive for real-time applications. Second, the control logic required to coordinate multiple joints against gravity typically requires tedious, subject-specific manual calibration. Conventional controllers, such as PID systems, often fail to manage the complexities of multi-joint coordination in 3D space.

A Two-Part Solution: Neuromechanics and RL

The researchers developed a framework that bridges the gap between simulation and clinical utility through two core components:

1. Realistic Neuromechanical Models

Using the open-source OpenSim software, the team created two models: Arm-Planar (6 muscles) and Arm-3D (8 muscles). These models improve upon previous simulations by incorporating:

  • Muscle Wrapping: Muscles wrap around joints realistically, ensuring accurate torque generation.
  • Muscle Bundling: Muscles that cannot be independently targeted via surface FES are grouped together, reducing the agent's action space to match real-world clinical constraints.
  • Physiological Constraints: The models include joint limits and damping to prevent unnatural movements and ensure simulation stability.

2. Reinforcement Learning Control

The control policy was trained using the Soft Actor-Critic (SAC) algorithm. In this setup, the RL agent learns through trial and error within the OpenSim environment. The agent observes the current state (joint angles, velocities, and target position) and outputs normalized stimulation intensities. The reward function is designed to balance accuracy with efficiency, rewarding the agent for minimizing the distance to the target while penalizing excessive electrical stimulation.

Experimental Setup and Training

The RL agents were trained for 300 episodes, each consisting of 100 steps. To ensure the models reached a passive equilibrium, muscle parameters—specifically tendon slack lengths—were optimized using a genetic algorithm (CMAES). To validate the system's ability to generalize, performance was evaluated on 50 "unseen" test episodes featuring random target positions.

Key Results and Insights

The framework demonstrated high precision and a remarkable ability to mimic biological movement patterns:

  • Accuracy and Precision: The system achieved an average Root Mean Square Error (RMSE) of approximately 7° in 2D and 10° in 3D. The worst-case end-point precision was 5cm, which is competitive with state-of-the-art FES studies despite the increased complexity of the 3D environment.
  • Emergent Naturalness: One of the most significant findings was the emergence of smooth, bell-shaped velocity profiles. These profiles are characteristic of healthy human reaching, yet the agent was never explicitly programmed to produce them; they emerged naturally from the interaction between the physics of the model and the reward structure.
  • Generalization: The agents successfully tracked arbitrary trajectories they had not encountered during training, indicating that the AI learned the underlying physics of arm movement rather than simply memorizing specific paths.
  • Stability: The agents learned to utilize "co-contraction" (the simultaneous stimulation of opposing muscles) to stabilize the limb once the target was reached.

Future Directions

While the study marks a significant step toward AI-controlled FES, several hurdles remain for clinical translation. Future work will need to address muscle fatigue, as real muscles lose force over time under electrical stimulation. Additionally, while the RL agent is adaptable, the underlying neuromechanical models must be scaled to match the specific limb lengths and muscle strengths of individual patients. Finally, optimizing the control loop to handle real-world hardware latency will be essential for moving from simulation to bedside application.

Summary updated

BibTeX
@inproceedings{wannawas2023towards,
  author = {Nat Wannawas and A. Aldo Faisal},
  title = {{Towards AI-controlled FES-restoration of arm movements: neuromechanics-based reinforcement learning for 3-D reaching}},
  booktitle = {NER},
  year = {2023},
  doi = {10.1109/ner52421.2023.10123831},
}
Figure