(close to) minimizing metabolic cost

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
User avatar
Nicholas Bianco
Posts: 962
Joined: Thu Oct 04, 2012 8:09 pm

Re: (close to) minimizing metabolic cost

Post by Nicholas Bianco » Fri Oct 09, 2020 12:07 pm

Karthick,

Yes, the Bhargava2004Metabolics model includes the basal metabolics rate of 1.2 W/kg, and it also includes the fiber length dependence for maintenance heat rate.

-Nick

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Mon Oct 19, 2020 1:33 pm

Hello everyone,

I'm starting with the Bhargava2004Metabolics as a metabolic Goal.

My doubt is about adding the muscle to it. It appears that I should provide the name and the muscle component:
metabolics->addMuscle("hamstrings_r", baseModel.getComponent<Muscle>("hamstrings_r"));

But for other probes, to add a muscle the parameters are the name and the slow/fast twitch ratio.
void OpenSim::Umberger2010MuscleMetabolicsProbe::addMuscle(const std::string muscleName, double ratio_slow_twitch_fibers)

The slow/fast twitch ratio is set automatically in the Bhargava2004Metabolics component? Which are the values?

Best regards.

Carlos Goncalves

User avatar
Karthick Ganesan
Posts: 118
Joined: Thu Oct 10, 2013 12:11 am

Re: (close to) minimizing metabolic cost

Post by Karthick Ganesan » Tue Oct 20, 2020 8:48 am

Hi Carlos,
Probably there is some default value of slow twitch ratio. However the third optional argument for the addMuscle method is slow twitch ratio. You can pass the desired value of slow twitch ratio as the third argument. One can use methodsview() in Matlab to see all the available arguments. I think the equivalent for this in python is dir().
Best,
Karthick.

User avatar
Ross Miller
Posts: 371
Joined: Tue Sep 22, 2009 2:02 pm

Re: (close to) minimizing metabolic cost

Post by Ross Miller » Tue Oct 20, 2020 9:33 am

Here is a recent set of simulations I did related to this topic. These were all walking simulations at speed 1.45 m/s and step rate 2 Hz. The cost function was (tracking error) + w*(control effort) where "tracking error" is the mean squared deviation from target kinematics and GRF, and "control effort" is the mean squared muscle excitation. I did this for 10 different values of w on a log scale from 1-1000 and calculated the gross metabolic cost with a smoothed version of Brian Umberger's energy model by Koelewijn et al. (2018, https://pubmed.ncbi.nlm.nih.gov/30027769/) and an assumed basal metabolic rate of 1.0 W/kg:
Screen Shot 2020-10-20 at 12.24.00 PM.png
Screen Shot 2020-10-20 at 12.24.00 PM.png (224.06 KiB) Viewed 811 times
The gaits simulated with values of w = 1-100 all had pretty realistic mechanics. The gaits with larger values of w were kind of strange looking, some odd hip/pelvis/lumbar rotations.

My take-away are (i) minimizing control effort may be a reasonable proxy for metabolic cost, at least in tracking simulations, and (ii) you can get reasonably realistic mechanics and muscle energetics from minimizing control effort, without minimizing metabolic cost itself.

I imagine the rock-bottom metabolic cost from directly minimizing it in the cost function would be quite a bit lower than the lowest value here (3.37 J/m/kg). I didn't try larger values of w because it looked like things were plateauing.

Ross

User avatar
Karthick Ganesan
Posts: 118
Joined: Thu Oct 10, 2013 12:11 am

Re: (close to) minimizing metabolic cost

Post by Karthick Ganesan » Tue Oct 20, 2020 10:57 am

It is great to see this result. Thanks for sharing it here Ross Miller.

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Tue Oct 20, 2020 11:20 am

Karthick and Ross, thanks a lot for the feedback!

I will give a try this week with the new Metabolic Goal in the predictive simulation. In the 2D model, it was easy to tune the normal gait behavior with control goal and also joint reaction goal (ankle joint). But for impaired gait (weak plantarflexors) it was very hard. I couldn' have yet a result similar to what is observed in patients.

The metabolic data using the Metabolic Probe and Analyze tool helped a lot in tuning the simulation. For example, the gait was relying mostly on the gluteus maximus when the plantarflexors were penalized and weakened (greater weight, less isometric force). Overall it had minimum activation, but the metabolic cost was too high. Adding control weight to the gluteus maximus helped in lowering the metabolic cost, but the motion was again way too similar to previous results (ankles in neutral and knee flexion during stance and swing). Other muscle activations were taking over.

(Fingers crossed).

Best regards.

Carlos

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Thu Nov 05, 2020 5:50 am

Hello everyone,

Just to give some feedback on my previous issue. I finally got something that looks better, or similar, to pathologic gait when weakening the plantarflexors. Now I got a heel gait pattern similar to this https://royalsocietypublishing.org/doi/ ... .2019.0402.

And the main to my goal was the positioning of the contact geometry in the forefoot of the 2D_gait.osim file. It is registered in the calcaneus body but is positioned 17cm from its origin. In the attached picture it is visible to be in the toes area.

Despite using several control weight configurations (actuation, metabolic, joint reaction) I always ended up with a gait walk with great knee flexion but only support on the forefoot contact spheres.

I'm doing some tests right now with different positions (13cm , 14cm and 15cm) but the program can generate good gait with and without plantarflexor weakness.

Looking back, that interaction between foot and floor were the biggest simplifications on the 2D model. Maybe later I will have to set up a more accurate metatarsophalangeal joint instead of using it welded.

Here is a question though. It is possible to use the contact force in the control cost function?

Best regards everyone.

Carlos
Attachments
ContactPosition.PNG
ContactPosition.PNG (109.42 KiB) Viewed 722 times

User avatar
Aaron Fox
Posts: 271
Joined: Sun Aug 06, 2017 10:54 pm

Re: (close to) minimizing metabolic cost

Post by Aaron Fox » Sat Nov 07, 2020 4:46 pm

Hi Carlos,

I guess it depends on how you want to include the contact force in the cost function. I doubt it can be incorporated in with the controls in the same cost - but I think there is a more generic 'output' goal that might be relevant if you wanted to minimise the force coming from a sphere.

Aaron

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Tue Nov 10, 2020 8:45 am

Thanks for the feedback Aaron,

I tried out the output "potential energy" that is indicated in the Hunt-Crossley contact force. I didn't work though, all the values remained zero during the simulation.

Best regards.

Carlos

User avatar
Nicholas Bianco
Posts: 962
Joined: Thu Oct 04, 2012 8:09 pm

Re: (close to) minimizing metabolic cost

Post by Nicholas Bianco » Fri Nov 13, 2020 1:35 pm

Hi Carlos,

What are you looking to get by adding the contact force to the cost function? I'm not sure what you mean by "all the values remained zero".

-Nick

POST REPLY