Calculating muscle moments

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
michela gardi
Posts: 9
Joined: Wed Aug 25, 2021 5:14 am

Calculating muscle moments

Post by michela gardi » Sun Sep 12, 2021 6:58 am

Hello,
I have found similar questions in the forum but not exactly the same with the corresponding solution, so I will ask!
I am trying in openSim 4.1 to calculate the moments of the muscle (which forces I obtained from SO) for each joint DOF, so for example I would like to find all muscle moments that contribute to the total net moment of the hip flexion.
Using states as x in the plot instrument I can plot the moment arms of each muscle for a particular joint rotation which I can save in a postScript file. Then manually I can calculate, moltiplying forces and relative moment arm , the moment for the specific joint rotation.
Is this the correct and best way? no automatic solution?

I also have another question: If it is possible can I also ask to calculate sum of group of muscle by OpenSim easily?

Tags:

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

Re: Calculating muscle moments

Post by Thomas Uchida » Sun Sep 12, 2021 7:37 am

Easier would be to add a MuscleAnalysis to your setup file. Some relevant information can be found on the "Getting Started with Analyses" page in the documentation (https://simtk-confluence.stanford.edu/d ... h+Analyses). The "XML Browser" in the GUI (under the Help menu) provides the following template XML code to add to a setup file:

Code: Select all

<MuscleAnalysis>
    <!--Flag (true or false) specifying whether on. True by default.-->
    <on>true</on>
    <!--Start time.-->
    <start_time>-Inf</start_time>
    <!--End time.-->
    <end_time>Inf</end_time>
    <!--Specifies how often to store results during a simulation. More specifically, the interval (a positive integer) specifies how many successful integration steps should be taken before results are recorded again.-->
    <step_interval>1</step_interval>
    <!--Flag (true or false) indicating whether the results are in degrees or not.-->
    <in_degrees>true</in_degrees>
    <!--List of muscles for which to perform the analysis. Use 'all' to perform the analysis for all muscles.-->
    <muscle_list> all</muscle_list>
    <!--List of generalized coordinates for which to compute moment arms. Use 'all' to compute for all coordinates.-->
    <moment_arm_coordinate_list> all</moment_arm_coordinate_list>
    <!--Flag indicating whether moment-arms and/or moments should be computed.-->
    <compute_moments>false</compute_moments>
</MuscleAnalysis>

User avatar
michela gardi
Posts: 9
Joined: Wed Aug 25, 2021 5:14 am

Re: Calculating muscle moments

Post by michela gardi » Sun Sep 12, 2021 11:45 am

Thanks Thomas,
that really helped and it worked in OpenSim 4.1.
The problem I am now facing is that the results do not match, for example hip flexion moments for a given muscle are not the same as if I calculated it from that muscle force and moment arm and pennation angle. The strange thing is that the file with passive fiber forces file shows very high values (I thought that passive fiber force were not present in SO after version 3. Also tendon length does not appear fixed. And even if I selected <use_muscle_physiology>false</use_muscle_physiology> I notice many file with data that should not be calculated/used.

User avatar
michela gardi
Posts: 9
Joined: Wed Aug 25, 2021 5:14 am

Re: Calculating muscle moments

Post by michela gardi » Wed Sep 15, 2021 11:56 am

Are the output analysis files correct (pennation angle, tendon length,...) in SO when muscle phydsiology is turned off?

POST REPLY