Page 1 of 1

CoordinateLimitForce - nonLinear region

Posted: Mon Feb 25, 2013 9:00 pm
by porsasina
Hi everyone.
I am using CoordinateLimitForce to represent ligaments in my model. I know that this force has a constant stiffness except through the transition region which uses a non-linear function to change the stiffness smoothly from zero to the specified stiffness.
I was wondering if I can know the exact non-linear equation which defines the stiffness in this region?
It seems that it's a 5th degree polynomial. It would be great if I could know the constant coefficients.
Thanks,
Sina

Re: CoordinateLimitForce - nonLinear region

Posted: Mon Feb 25, 2013 10:08 pm
by sherm
Hi, Sina. The basic quintic step function is step(x)=10x^3-15x^4+6x^5, valid only for x between 0 and 1:
untitled.png
untitled.png (3.85 KiB) Viewed 532 times
However, there are many twists and turns in CoordinateLimitForce on the way to producing a force, such as how damping is calculated. These are internal details and are not part of the definition, so are subject to change in later versions. However, if you are interested you can look in the source code, which is available on the OpenSim 3.0 downloads page. The file you want to look in is OpenSim\Simulation\Model\CoordinateLimitForce.cpp. Forces are calculated in method calcLimitForce().

The step function itself is implemented using Simbody's SimTK::Function::Step() class which handles scaling and limiting the function and is documented here.

Regards,
Sherm

Re: CoordinateLimitForce - nonLinear region

Posted: Mon Feb 25, 2013 10:14 pm
by porsasina
Thank you Sherm