Different results when using different OpenSim versions
Posted: Mon Nov 19, 2018 3:06 pm
Hi,
I am working on a Matlab script that calculates state derivatives of the model, given the state and control inputs.
This is a part of my optimization simulation. When I used the script on some simple models (TugofWar, arm26, leg6dof9musc), the results on OpenSim 4.0 and OpenSim 3.3 are the same. However, when I ran on the full body model (subject01, copied from OpenSim 4.0 folder), the results on OpenSim 4.0 and OpenSim 3.3 are significantly different (order of 10, 100 times). The differences are in the derivatives of velocities and muscle lengths. I have tried a couple things with the subject01 model:
1, removed all muscles (Millard model), the problem was not solved.
2, tried to remove the knee joint in the model (removed all bodies after knee, removed all muscles), the problem was solved. I suspect the problem is at the custom knee joint in the subject01.osim model because OpenSim 4.0 updated the custom joint. However, the leg6dof9musc model also has a custom knee joint.
3, opened subject01.osim model and saved the model in 4.0 version. Then ran the scripts with the models corresponding to the OpenSim versions, the problem was not solved.
At this point, I am not sure what causes the problem, and how to fix it.
Any advice and feedback would be appreciated!
Thanks in advance.
Vinh
I am working on a Matlab script that calculates state derivatives of the model, given the state and control inputs.
This is a part of my optimization simulation. When I used the script on some simple models (TugofWar, arm26, leg6dof9musc), the results on OpenSim 4.0 and OpenSim 3.3 are the same. However, when I ran on the full body model (subject01, copied from OpenSim 4.0 folder), the results on OpenSim 4.0 and OpenSim 3.3 are significantly different (order of 10, 100 times). The differences are in the derivatives of velocities and muscle lengths. I have tried a couple things with the subject01 model:
1, removed all muscles (Millard model), the problem was not solved.
2, tried to remove the knee joint in the model (removed all bodies after knee, removed all muscles), the problem was solved. I suspect the problem is at the custom knee joint in the subject01.osim model because OpenSim 4.0 updated the custom joint. However, the leg6dof9musc model also has a custom knee joint.
3, opened subject01.osim model and saved the model in 4.0 version. Then ran the scripts with the models corresponding to the OpenSim versions, the problem was not solved.
At this point, I am not sure what causes the problem, and how to fix it.
Any advice and feedback would be appreciated!
Thanks in advance.
Vinh