Using metabolics probe with DeGrooteFregly2016Muscle
- Karthick Ganesan
- Posts: 119
- Joined: Thu Oct 10, 2013 12:11 am
Using metabolics probe with DeGrooteFregly2016Muscle
Dear Chris Dembia,
Is it possible to use metabolics probe with DeGrooteFregly2016 Muscle?
Thanks,
Karthick
Is it possible to use metabolics probe with DeGrooteFregly2016 Muscle?
Thanks,
Karthick
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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!
- Karthick Ganesan
- Posts: 119
- Joined: Thu Oct 10, 2013 12:11 am
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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?
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?
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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
If you want to gain confidence about this, you could also add a MuscleAnalysis to see the reported fiber velocity.
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
YesBut is the probe reporter/analysis tool programmed to do so?
If you want to gain confidence about this, you could also add a MuscleAnalysis to see the reported fiber velocity.
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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.
I bet other users would be very grateful if you share your code for running a metabolics probe analysis from a MocoSolution.
- Karthick Ganesan
- Posts: 119
- Joined: Thu Oct 10, 2013 12:11 am
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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.
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.
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Using metabolics probe with DeGrooteFregly2016Muscle
No, you can move the muscles into the force set.Is there any specific reason why muscles are put under components?
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.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.
- Karthick Ganesan
- Posts: 119
- Joined: Thu Oct 10, 2013 12:11 am
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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
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
- Iris Magnusdottir
- Posts: 19
- Joined: Thu Nov 01, 2018 2:04 am
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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!
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!
- Karthick Ganesan
- Posts: 119
- Joined: Thu Oct 10, 2013 12:11 am
Re: Using metabolics probe with DeGrooteFregly2016Muscle
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.
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.