How OpenSim Analyze tool calculate acceleration?

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
yanran jiang
Posts: 9
Joined: Sun Mar 29, 2020 4:19 am

How OpenSim Analyze tool calculate acceleration?

Post by yanran jiang » Sun Jul 05, 2020 9:16 am

Hi there,

I'm struggling to understand the theory behind the acceleration calculation in Opensim. Which specific formulas are used for point acceleration in the OpenSim?

Or a quick question is the linear acceleration calculated as the second derivative of the origin of the segment coordinate systems?

I get my body kinematic and point kinematic results from the Analyze tool with inverse kinematic results as input. But the acceleration values are wired. From the result of velocity, I can see the change of velocity is very small (vel=-0.0013761 (t=0s), -0.00131352(t=0.01s),-0.131224(t
0.02s),-0.139191(t=0.03s)...). But whether the linear accelerations or angular accelerations are quite large (almost 114 rad/s), which looks impossible.
In the Analyse tool setup file, I only provide IK results and ground reaction force. I didn't add actuator and control. I really don't know how to find the reason now. Do you know any possible reasons?

Is there any bug behind the OpenSim Analyze tool? Could anyone provide raw script of Analyze tool? I want to see the code.

Thanks,
Yanran
Attachments
Screenshot (8)-min.png
Screenshot (8)-min.png (711.77 KiB) Viewed 399 times
Screenshot (10)-min 2.jpg
Screenshot (10)-min 2.jpg (516.63 KiB) Viewed 399 times

Tags:

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: How OpenSim Analyze tool calculate acceleration?

Post by Carmichael Ong » Tue Jul 07, 2020 4:37 pm

We've seen this recently (viewtopicPhpbb.php?f=91&t=11925&p=0&sta ... d52b7c398c), and while it's not quite a bug, it's definitely not a behavior that users expect. It seems that when the Analyze tool is used to calculate velocities, it calculates these from the position variables. When calculating accelerations, it calculates these by taking dynamics into account. Because of this, Analyze tool will calculate the accelerations as if certain constraints are not enforced, since this is not available directly through the data alone. One of the workarounds proposed in the link from before is to do a forward simulation but use the <prescribed_function> tag. There is a MATLAB script available in the examples folder (prescribeMotionInModel.m), or you can use the example model file that I posted in the previously linked forum post.

POST REPLY