[ODE] Problem with hinge and hinge2 joints

Adam Rotaru adam_rotaru at yahoo.com
Sat Mar 2 12:05:01 2002


--- Nate W <coding@natew.com> wrote:
> I'm glad to see that Ron's problem is solved, but
> now I'm left
> wondering... why did a high CFM cause the car to
> tilt?  

The short answer:
The higher the CFM, the softer the constraint.
The 0.1 CFM caused a soft suspension, too weak for 
this particular case (considering gravity, mass of the
car,
timestep, etc).  Imagine a car with a *very* weak fron
suspension spring, which can sink to negative lengths
too:
the mass of the car will compressed the spring
considerably.
And if you don't have any spring in the back (not a
luxury
edition), the front of the car will be lower.

The long answer:
The docs state the relationship between ERP, CFM, and 
corresponding spring constants:

ERP = h k_p / ( h k_p + k_d)
CFM =     1 / ( h k_p + k_d)

where k_p is the spring constant, k_d is the damping
constant,
and h is the time-step.
Solving this system for k_p and k_d:

k_p = ERP / (h * CFM)
k_d = ( 1 - ERP ) / CFM

(Russ, maybe it would be useful to include these
formulas
too?)
Now let's plug in the numbers:
ERP = 0.4  CFM = 0.1 (ron's numbers), and assume h =
0.05
k_p = 80
k_d = 6

With ERP = 0.4  CFM = 0.0001, and h = 0.05
k_p = 80000
k_d = 6000

Decreasing the CFM by a factor of 1000 increased the
spring
constants by a factor of 1000.  It looks like in this
particular situation the spring with k=80 was too
weak.
(My guess is that k=80000 is a bit too stiff).

--adam



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com