Page 1 of 6

Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Wed Feb 19, 2020 9:27 am
by karthick_ganesan
Dear Chris Dembia,
Is it possible to use metabolics probe with DeGrooteFregly2016 Muscle?
Thanks,
Karthick

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Wed Feb 19, 2020 10:05 am
by chrisdembia
I think so! We haven't tried it yet, but I can't think of a reason why it wouldn't work. If it works, please let us know!

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Thu Feb 27, 2020 1:06 pm
by karthick_ganesan
It seems to work. I have not yet validated the results.
When using the analysis tool to compute metabolic cost with metabolics probe, the inputs are the states and controls. When muscle activation and fiber length are the state variables, I believe that the probe reporter calculates the fiber velocity by numerical differentiation. Am I right?
In DGF muscle, normalized tendon force is a state variable. How does the probe reporter/ analysis tool compute the fiber length and fiber velocity required for the metabolic cost computation? It could be computed from the DGF muscle model. But is the probe reporter/analysis tool programmed to do so?
Or is it that for each time step the corresponding model's state is realized and as a result the probe reporter has access to the variables like fiber length and fiber velocity?

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Thu Feb 27, 2020 3:25 pm
by chrisdembia
Fiber velocity is computed by solving the fiber-tendon force equilibrium for fiber velocity, and is done for a given state, not on a series of states (through numerical differentiation).

To see how we compute fiber velocity and other varaibles for the DGF muscle when using tendon force as a state variable, see the appendix of De Groote et al., 2016: https://www.ncbi.nlm.nih.gov/pubmed/27001399 and Moco's source code:https://github.com/opensim-org/opensim- ... #L285-L317
But is the probe reporter/analysis tool programmed to do so?
Yes

If you want to gain confidence about this, you could also add a MuscleAnalysis to see the reported fiber velocity.

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Thu Feb 27, 2020 3:27 pm
by chrisdembia
Make sure to use a PrescribedController to enforce the correct muscle excitations, which are required by the metabolics probes. The PrescribedController requires a STO file for controls, which you can create via methods on MocoTrajectory or MocoSolution.

I bet other users would be very grateful if you share your code for running a metabolics probe analysis from a MocoSolution.

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Mon Mar 02, 2020 9:45 am
by karthick_ganesan
Thanks Chris. Got it.
I am using the analyze tool with xml setup file. I specified the controls.sto file under controller set in setup file. Included the states file as well. I created these files manually. I could have used the methods on MocoSolution though. I will try to do it and share.
It requires the muscles to be included in forceset. But in the original 2D_gait model, muscles are in components. Is there any specific reason why muscles are put under components?
When I used the 2D_gait model with compliant tendon, instantaneous metabolic cost values are even in the order of 1e10. This seems to be contributed by gastroc and sol muscles.When I used the Gait10dof18muscle model after replacing muscles with DGF muscle model and with same states, controls and setup files I got reasonable values. I don't know what is going wrong.

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Mon Mar 02, 2020 4:00 pm
by chrisdembia
Is there any specific reason why muscles are put under components?
No, you can move the muscles into the force set.
When I used the 2D_gait model with compliant tendon, instantaneous metabolic cost values are even in the order of 1e10. This seems to be contributed by gastroc and sol muscles.
Can you use a Muscle Analysis to get a better sense of what's causing these large values? Such an analysis could pinpoint which muscle quantities are so large.

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Sun Mar 15, 2020 8:25 am
by karthick_ganesan
Hi Chris,
How to create states and controls.sto files from a moco solution? I tried using exportToStatesTrajectory. But I could not find any method on StatesTrajectory to write a sto file. Any suggestions would be helpful.
Thanks,
Karthick

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Wed Mar 25, 2020 2:38 am
by irisdrofnm
Hi Karthick,

I am interested in knowing if you managed to create states and controls.sto files from a MocoSolution.

Also, which files did you use as input files for the Analyze tool? I got state tracking solution and tracked states (.sto) as a result of my MocoTrack setup.
I'm getting low values (and strange curves) for the metabolic cost which I think might be related to negative muscle force values.

It would be great if you can share your approach.
Thanks!

Re: Using metabolics probe with DeGrooteFregly2016Muscle

Posted: Sun Apr 05, 2020 9:36 am
by karthick_ganesan
Hi Iris,
I have not yet figured it out. Manually I created states.sto and controls.sto files from the tracking/prediction solution. When using analysis tool specify these files for states_file and controls_file. Hope this helps. If you have figured out a better way of doing please let me know.
Regards,
Karthick.