Hello everyone,
Does anyone have a suggestion to configure possible muscle synergies and spasticity for predictive simulations in OpenSim Moco?
Here at SARAH Network of Rehabilitation Hospitals, we are starting to use inverse and predictive simulations to evaluate first AFO prescription.
I got a starter workflow running with 3D gait, but the first case study (CP patient) suggested that the model does not have the major factors that impair the gait. The inverse simulation shows some co-contraction in biceps femoris and vastus intermedius, and in the forward simulation, there is no crouch gait (the model extends the knee).
Thanks for any thoughts on this. I am researching the subject, but it seems that the implementations are done in the transcription of the optimal control problem directly to CasADi (https://doi.org/10.3389/fnhum.2020.00040).
Best regards.
Synergies and Spasticity in OpenSim Moco
- Carlos Gonçalves
- Posts: 136
- Joined: Wed Jun 08, 2016 4:56 am
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Synergies and Spasticity in OpenSim Moco
Hi Carlos,
Others have shown interest in using muscle synergies with Moco (including myself), and while it is on our wishlist of Moco features, there's not a current timeline for implementing them. The spasticity model is also not something we've been targeting to add to Moco, but it seems like it would be a pretty easy addition as it is just a first-order differential equation. It could probably be added as an option to the DeGrooteFregly2016Muscle.
Best,
Nick
Others have shown interest in using muscle synergies with Moco (including myself), and while it is on our wishlist of Moco features, there's not a current timeline for implementing them. The spasticity model is also not something we've been targeting to add to Moco, but it seems like it would be a pretty easy addition as it is just a first-order differential equation. It could probably be added as an option to the DeGrooteFregly2016Muscle.
Best,
Nick
- Carlos Gonçalves
- Posts: 136
- Joined: Wed Jun 08, 2016 4:56 am
Re: Synergies and Spasticity in OpenSim Moco
Hi Nick, thanks for the feedback.
I think that the spasticity feature would be something very interesting in applicating the musculoskeletal models direct to the clinical evaluation of interventions.
I have a hard time proposing OpenSim regularly because I still cannot present all the possible scenarios of causes for the impairment gait and consequently simulate the results. I may never be able to do it (it is not feasible to ask for an MRI of every patient to measure the exact length and position of muscle fibers), but the simulations should be enough to narrow the possibilities.
If I start to develop it myself, would it require programming in C++ over the OpenSim implementation? There are some references on how to do it?
There are some references on how to set up the NLP solver for the synergies problem manually?
Best regards.
I think that the spasticity feature would be something very interesting in applicating the musculoskeletal models direct to the clinical evaluation of interventions.
I have a hard time proposing OpenSim regularly because I still cannot present all the possible scenarios of causes for the impairment gait and consequently simulate the results. I may never be able to do it (it is not feasible to ask for an MRI of every patient to measure the exact length and position of muscle fibers), but the simulations should be enough to narrow the possibilities.
If I start to develop it myself, would it require programming in C++ over the OpenSim implementation? There are some references on how to do it?
There are some references on how to set up the NLP solver for the synergies problem manually?
Best regards.
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Synergies and Spasticity in OpenSim Moco
Hi Carlos,
Implementing either spasticity or synergies will require C++ development. The changes needed for synergies are fairly complicated, and we currently don't offer any way to bypass the Moco interface to construct an optimal control problem manually (and probably won't any time soon).
The spasticity model is much simpler: you would need to implement a new ModelComponent that includes the dynamics (including state variables and their derivatives) for the spasticity model. Moco would then be able to solve these dynamics as part of a MocoProblem.
There's introductory info about C++ development in OpenSim here: https://simtk-confluence.stanford.edu/d ... penSim+API. You can also refer to the source code for examples of ModelComponents: https://github.com/opensim-org/opensim-core.
Best,
Nick
Implementing either spasticity or synergies will require C++ development. The changes needed for synergies are fairly complicated, and we currently don't offer any way to bypass the Moco interface to construct an optimal control problem manually (and probably won't any time soon).
The spasticity model is much simpler: you would need to implement a new ModelComponent that includes the dynamics (including state variables and their derivatives) for the spasticity model. Moco would then be able to solve these dynamics as part of a MocoProblem.
There's introductory info about C++ development in OpenSim here: https://simtk-confluence.stanford.edu/d ... penSim+API. You can also refer to the source code for examples of ModelComponents: https://github.com/opensim-org/opensim-core.
Best,
Nick
- Carlos Gonçalves
- Posts: 136
- Joined: Wed Jun 08, 2016 4:56 am
Re: Synergies and Spasticity in OpenSim Moco
Nice Nick! Thanks a lot!
I will check the references and post here any developments about this subject.
Best regards.
I will check the references and post here any developments about this subject.
Best regards.
- Russell Johnson
- Posts: 14
- Joined: Sun Dec 23, 2012 5:10 pm
Re: Synergies and Spasticity in OpenSim Moco
Hi Carlos,
I was wondering if you, or broadly any other Moco user, has made any progress on implementing either the muscle synergies or muscle spasticity within a Moco optimization. I'm assuming given the nature of Moco's setup, that the muscle synergies are still prohibitively complicated to implement, but since it's been a while since the last post in this thread maybe things have changed.
I'd be very interested to hear about any progress on this, or lessons learned from attempts at it.
Thanks,
Russell
I was wondering if you, or broadly any other Moco user, has made any progress on implementing either the muscle synergies or muscle spasticity within a Moco optimization. I'm assuming given the nature of Moco's setup, that the muscle synergies are still prohibitively complicated to implement, but since it's been a while since the last post in this thread maybe things have changed.
I'd be very interested to hear about any progress on this, or lessons learned from attempts at it.
Thanks,
Russell
- Carlos Gonçalves
- Posts: 136
- Joined: Wed Jun 08, 2016 4:56 am
Re: Synergies and Spasticity in OpenSim Moco
Hi Russell, I had to stop looking into it to focus on other simulations. I had no improvements on it.
I tried to couple the excitation to the muscle speed but with no success. In desperation, I limited the range of the muscle excitation to a "big minimum" (0.8) and we could predict the patient's impaired gait. And with another gait evaluation with EMG, the spasticity was there.
It felt like a "null hypothesis" luck, but the patient evaluation and AFO design improved with the confirmation of spasticity.
Hope to help later on this.
Best regards.
I tried to couple the excitation to the muscle speed but with no success. In desperation, I limited the range of the muscle excitation to a "big minimum" (0.8) and we could predict the patient's impaired gait. And with another gait evaluation with EMG, the spasticity was there.
It felt like a "null hypothesis" luck, but the patient evaluation and AFO design improved with the confirmation of spasticity.
Hope to help later on this.
Best regards.