Design of a Personalized FES Prescription for Post-stroke Walking
Tutorial Developers: Robert Salati, Geng Li, and B.J. Fregly, Rice Computational Neuromechanics Lab, Rice University
Simulation Project Overview
The goal of this simulation project is to teach you the Neuromusculoskeletal Modeling (NMSM) Pipeline’s computational treatment design process for clinical applications (Fregly 2021; Hammond et al. 2025) where muscles and neural control models are needed. This project will develop a treatment for a high-functioning stroke survivor using computationally design functional electrical stimulation (FES) patterns. Stroke survivors often have damaged neural pathways which impacts their ability to walk. As such, for this project, we will calibrate muscle-tendon parameters for the subject to accurately model their forces and then personalize a neural control model for the subject. Information from this neural control model will then be used to inform the treatment design process to design an optimal FES pattern (Cheung et al. 2019; Levine et al. 2025). This project will seek to design an FES pattern that compensates for a weakened synergy in the subject’s affected limb and consequently improving their propulsive and braking ground reaction impulses to be more symmetric between limbs.
The five tools that you will use within the NMSM Pipeline are indicated in the table below, along with the abbreviations used to reference each tool and required supporting OpenSim tools:
| Toolset | NMSM Pipeline Tool | Performed |
|---|---|---|
| NMSM Pipeline Model Personalization | Joint Model Personalization (JMP) | Provided |
| Ground Contact Personalization (GCP) | Provided | |
| Muscle-tendon Personalization (MTP) | Performed | |
| Neural Control Personalization (NCP) | Performed | |
| NMSM Pipeline Treatment Optimization | Tracking Optimization (TO) | Performed |
| Verification Optimization (VO) | Performed | |
| Design Optimization (DO) | Performed | |
| OpenSim | Scale Model | Provided |
| Inverse Kinematics (IK) | Provided | |
| Inverse Dynamics (ID) | Provided | |
| Muscle Analysis (MA) | Performed |
For the Model Personalization toolset, you will only be using Muscle-tendon Personalization (MTP) and Neural Control Personalization (NCP). While a synergy-driven treatment optimization does require Joint Model Personalization (JMP) and Ground Contact Personalization (GCP), these steps have already been done for you. All 3 Treatment Optimization tools will be used in this project, but the model will now be controlled by synergy-driven muscle-tendon actuators.
This simulation project is broken down into four modules – Muscle-tendon Personalization, Neural Control Personalization, Tracking Optimization, and Verification/Design Optimization. For each module, instructions are provided to walk you through all the necessary steps. To ensure that poor results for one module do not affect your ability to complete subsequent modules, final results will be provided for each module to use as a starting point for subsequent modules. At the end of each module, you will be asked questions aimed at guiding you through interpreting your results.
To run each required OpenSim or NMSM Pipeline tool, you will generate an initial xml settings file using the appropriate tool selection within the OpenSim GUI Tools menu. Once you have generated an initial tool settings file in the OpenSim GUI, you can edit the settings file for subsequent tool runs either within the OpenSim GUI or using a text editor. Runs for OpenSim tools will be performed through the OpenSim GUI, while runs for NMSM Pipeline tools will be performed in Matlab.
This project will use treadmill gait data from a single high-functioning hemiparetic stroke survivor. For this individual, their right side is the paretic/affected side, and their left side is the less-affected side. All experimental joint angle, joint load, ground reaction, and electromyography (EMG) data have been provided to you inside the InputData folder but will need to be processed before being used for this project. The initial data provided to you is summarized below:
Trial10_IKResults.mot– Joint angles from inverse kinematics (IK)Trial10_forces_ec_reordered_filtered.mot– Ground reaction forces (GRF) and moments with a shifted electrical center from GCPTrial10_IDResults.sto– Joint loads from inverse dynamics (ID)Trial10_emg_processed.sto– Processed EMG data
IK joint angles were solved using video-based marker motion capture (Vicon Corporation, Oxford, United Kingdom) with a post-JMP full-body OpenSim model. Six degree-of-freedom (DOF) ground reaction data were collected from a Bertec split-belt instrumented treadmill (Bertec Corporation, Columbus, OH, United States) with belts tied to the same speed. The experimental data from each trial above have already been converted so that all length data are in units of meters, all moment data are in units of Newton-meters, and all data are reported using coordinate axes consistent with OpenSim model conventions (i.e., +X is directed anteriorly, +Y is directed superiorly, and +Z is directed out to the right).
A scaled, post-JMP OpenSim model file is provided to you as well. The file name is UF_Subject_4_Scaled_JMP.osim.