Using External Muscle Model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Daniel Rivera
Posts: 2
Joined: Mon Jan 30, 2017 10:30 am

Using External Muscle Model

Post by Daniel Rivera » Wed May 24, 2017 3:02 pm

Hi All!

I was curious if anyone has had experience applying an external (aka not native to opensim) muscle model for opensim simulations - or if such a task is possible. I'm trying to implement a muscle model that differs from the millard model in terms of model kinematics and kinetics. As of yet I've been unable to find literature pertaining to how opensim loops through its native muscle models for inverse/forward trials, or how to call a third party muscle model in a simulation.

Any input would be greatly appreciated!

User avatar
Thomas Uchida
Posts: 1772
Joined: Wed May 16, 2012 11:40 am

Re: Using External Muscle Model

Post by Thomas Uchida » Wed May 24, 2017 5:39 pm

Have you looked into using the scripting interface? For example, if you had your muscle model implemented in MATLAB, I think you could use a PathActuator (https://simtk.org/api_docs/opensim/api_ ... ml#details) to apply the computed force. The code would be structured as if you were designing a controller (because the PathActuator applies a tension equal to its control signal); the MATLAB version of the Dynamic Walker example does this:

- "Dynamic Walker Competition January 2014" page in the Confluence documentation: http://simtk-confluence.stanford.edu:80 ... nuary+2014
- Link to example files: https://simtk.org/frs/download.php?file_id=3862

User avatar
Daniel Rivera
Posts: 2
Joined: Mon Jan 30, 2017 10:30 am

Re: Using External Muscle Model

Post by Daniel Rivera » Thu May 25, 2017 12:09 pm

Thanks Tom! That is immensely helpful.

So - to make sure I'm understanding correctly - given an upper body model (for example), would the idea be to replace muscles with path actuators and let the external model control their tension?

Another question comes to mind - would this method prohibit the use of the analyze tool for a given motion file, (i.e. a ForceReporter), or would we get similar quantities by performing an actuation analyses?

Thanks a ton!

User avatar
Thomas Uchida
Posts: 1772
Joined: Wed May 16, 2012 11:40 am

Re: Using External Muscle Model

Post by Thomas Uchida » Thu May 25, 2017 1:28 pm

would the idea be to replace muscles with path actuators and let the external model control their tension?
Yes.
would this method prohibit the use of the analyze tool for a given motion file, (i.e. a ForceReporter)
I don't think so. You should be able to interact with the AnalyzeTool as usual. You could also run the analysis during a simulation to avoid using the AnalyzeTool altogether. You obviously won't be able to ask OpenSim for muscle-specific quantities like fiber lengths, but your muscles would still be actuators.

I suggest looking at the MATLAB version of the dynamic walker example (linked in my previous post) and try a simple version of this strategy to make sure it will meet your needs.

POST REPLY