[ODE] spring and damping surface constants

Tanguy Fautre tanguy.fautre at spaceapplications.com
Fri Sep 2 13:27:41 MST 2005


Hello,


We are currently using ODE for a running a physic simulation connected 
to an experimental haptic device. Not so long ago, we started 
investigating how (well) ODE was simulating the spring and damping constant.

ODE doc explicitly states that ERP and CFM can be used to simulate 
springness and damping, using the following formulas:

ERP = h.kp / (h.kp + kd)
CFM = 1 / (h.kp + kd)


h = stepsize
kp = spring constant
kd = damping constant


Or the other way around:

kp = ERP / (h.CFM)
kd = (1 - ERP)


However, when we start experimenting a simple scenario (a sphere falling 
on a plane because of gravity), we've noticed that the forces applied on 
the sphere in contact situations (using dJointFeedback) were not exactly 
respecting the above formulas. While the spring constant seemed to be 
correctly interpreted, the force generated because of the damping 
constant was always wrong.

Empirically, we came up with the following relationship:

K = kp
D = kd + h.kp


K = observed spring constant
D = observed damping constant


Conclusion, it seems to us that it's impossible to modify the K spring 
constant without affecting the D damping constant. Thus it is impossible 
to have a contac with a zero damping constant. This situation only gets 
worse as the stepsize is increased.

Is this an intended behaviour?
Is it possible to have a perfect system where K = kp and D = kd ?


Note: we only investigated the effect of ERP and CFM on contact joints, 
not on other joint types. So I don't know whether the results are the 
same with other joint types.


Yours,

Tanguy



More information about the ODE mailing list