Page 1 of 1

Plot values do not match up

Posted: Fri Apr 19, 2019 1:21 pm
by bbolen
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?

Re: Plot values do not match up

Posted: Sat Apr 20, 2019 9:15 pm
by tkuchida
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.

Re: Plot values do not match up

Posted: Tue Apr 23, 2019 11:45 am
by bbolen
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.

Re: Plot values do not match up

Posted: Tue Apr 23, 2019 6:34 pm
by tkuchida
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.

Re: Plot values do not match up

Posted: Tue Apr 23, 2019 7:51 pm
by bbolen
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.

Re: Plot values do not match up

Posted: Wed Apr 24, 2019 7:25 am
by tkuchida
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 280 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 280 times

Re: Plot values do not match up

Posted: Fri Apr 26, 2019 5:02 pm
by bbolen
I reinstalled OpenSim 4.0 on my computer and that has resolved the issue. Thank you for your assistance.

Re: Plot values do not match up

Posted: Fri Apr 26, 2019 7:29 pm
by tkuchida
Which version of OpenSim were you using before?

Re: Plot values do not match up

Posted: Tue Apr 30, 2019 4:36 pm
by bbolen
I was using OpenSim 4.0 before. I just uninstalled and reinstalled it.