Plot values do not match up

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Ben Bolen
Posts: 10
Joined: Wed Jan 17, 2018 6:23 pm

Plot values do not match up

Post by Ben Bolen » Fri Apr 19, 2019 1:21 pm

When plotting hip flexion moment for bifemlh in Gait Body 2392 I notice the values do not match up at 0 degrees for hip flexion (red) and knee flexion (blue). If OpenSim assumes all the other joint angles are 0, then when either the hip or knee angle is at zero the values should be the same, since the length, force, and moment arm must necessarily be the same. Why does it do this?
Attachments
OpenSim plot for forum.PNG
OpenSim plot for forum.PNG (27.46 KiB) Viewed 379 times

Tags:

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

Re: Plot values do not match up

Post by Thomas Uchida » Sat Apr 20, 2019 9:15 pm

If OpenSim assumes all the other joint angles are 0
Depending on how the plot is being generated, I would expect the plotter to set all other coordinates to either their current value shown in the visualizer panel or their default value (as seen when the model is in the default pose). Joints can be defined in many ways; a joint angle of zero could be nonsense so setting all other joint angles to zero would be a poor assumption.

User avatar
Ben Bolen
Posts: 10
Joined: Wed Jan 17, 2018 6:23 pm

Re: Plot values do not match up

Post by Ben Bolen » Tue Apr 23, 2019 11:45 am

The model is in the same default position for both graphs. I checked both graphs in separate plotting windows to make sure it wasn't a scale error. I also checked total musculo-tendon lengths and confirmed that they also have different values at joint angle 0. I would like to get this issue resolved as it is an important aspect of my research.

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

Re: Plot values do not match up

Post by Thomas Uchida » Tue Apr 23, 2019 6:34 pm

There may be some confusion about what the plot means. The red line shows the hip flexion moment generated by the bifemlh_r muscle when the hip flexion angle is in the range [-120 deg, 120 deg] and the knee remains in the current pose. The blue line shows the hip flexion moment generated by the bifemlh_r muscle when the knee flexion angle is in the range [-120 deg, 10 deg]. Neither line passes through the point (0,0) because the muscle generates a nonzero hip flexion moment when the knee and hip angles are zero. The zero-crossing of the red line at the point (-50,0) says that the muscle generates zero hip flexion moment when the hip is flexed 50 degrees.

User avatar
Ben Bolen
Posts: 10
Joined: Wed Jan 17, 2018 6:23 pm

Re: Plot values do not match up

Post by Ben Bolen » Tue Apr 23, 2019 7:51 pm

I'm not talking about the point (0, 0) or about a value of 0 N-m for the hip flexion moment.

*When looking at hip_flexion_r moment for bifemlh_r over the hip flexion range, the red curve has a value of about -45 N-m at zero degree hip (and the knee is at zero).

*When looking at hip_flexion_r moment for bifemlh_r over the knee flexion range, the blue curve has a value of about -13 N-m at zero degree knee (and the hip is at zero).

-45 doesn't equal -13, even though for both curves we are looking at the bifemlh_r hip_flexion_r moment at the instance when knee and hip joint angles are zero.

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

Re: Plot values do not match up

Post by Thomas Uchida » Wed Apr 24, 2019 7:25 am

I was unable to reproduce the issue on my machine. My guess is that the curves were generated when the model's hip flexion was nonzero. I generated two plots using the gait2392 model (see below). The plots were generated when the model was in its default pose (with hip flexion and knee angle equal to zero).

1. Moment arm of bifemlh_r for hip_flexion_r degree of freedom as hip flexion (red) and knee angle (blue) vary: the red and blue curves have the same y value at x=0.
momentArms.png
momentArms.png (42.04 KiB) Viewed 320 times
2. Moment generated by bifemlh_r for the same cases: again, the red and blue curves have the same y value at x=0.
moments.png
moments.png (47.39 KiB) Viewed 320 times

User avatar
Ben Bolen
Posts: 10
Joined: Wed Jan 17, 2018 6:23 pm

Re: Plot values do not match up

Post by Ben Bolen » Fri Apr 26, 2019 5:02 pm

I reinstalled OpenSim 4.0 on my computer and that has resolved the issue. Thank you for your assistance.

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

Re: Plot values do not match up

Post by Thomas Uchida » Fri Apr 26, 2019 7:29 pm

Which version of OpenSim were you using before?

User avatar
Ben Bolen
Posts: 10
Joined: Wed Jan 17, 2018 6:23 pm

Re: Plot values do not match up

Post by Ben Bolen » Tue Apr 30, 2019 4:36 pm

I was using OpenSim 4.0 before. I just uninstalled and reinstalled it.

POST REPLY