jitter in joints

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: jitter in joints

blackbird_dream wrote:They are the source of troubles. The steering seems now to generate high forces

oh I see, that make sense, you are using the forces generate by the tire to calculate some steering torque that you apply as external forces to the body?
but the force now are much stronger.

yes that part of the bug that was fixed, believe or not the behavior now is in fact the right one.
it will be long to explain, but let me say, I now know what is wrong, and sence the forces you where using to control the vehicle changed, there is not point on recalibrationg it now because they will change again when the proper coulomb solver is enabled.

the you just need to apply some calibration and sous be very accurate and stable.
in simple terms, the forces now been stronger, also have the error from the delay which is magnified.

I will try to get the solver soon.
Julio Jerez
Moderator

Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: jitter in joints

I understand what you're writing and that's what I suspected indeed. In the previous version (jittering one) there were big oscillations of the whole vehicule when driving with high load. The frequency was good which means the tire stiffness was correct but the impulse maybe was too high when applying driving forces or joint actuation forces unlike with v1.5.3

blackbird_dream

Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Re: jitter in joints

ok Sync and try playin the sand bod demo,
I made so tha the body weight 4096 kg, and teh load is 2500 kg.

It seems very stable, but tell what you think.

There are some teak I need to make

1- the solve sui very snappy and that bring the possibility of ill conditioned or even singular matrices.
for the I has a Cholesky regularize, but since this method does no use Cholesky anymore, I will use the check trick is apply an dame to each diagonal element, for now it seem find.
// dgInt32 stride = 0;
// for (dgInt32 i = 0; i < m_auxiliaryRowCount; i++) {
// //m_massMatrix11[stride] *= dgFloat32 (1.001f);
// stride += (m_auxiliaryRowCount + 1);
// }
// dgCholeskyApplyRegularizer(m_auxiliaryRowCount, m_massMatrix11, diagDamp);

2-I set the iteration solve high for now, but later I have to bring down and add a engine option like NewtonSimulationGrade (bool onOff)

and what will thsi do is that I will iterate until the erro is below some treasure for simulation grade
or it will iterate until the error or the number of iteration is exhausted for no simulation quality.
so we slowly are coming back to 1.52 but much better, I think.

Please check it out and tell what you see.
Julio Jerez
Moderator

Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: jitter in joints

ok I just saw the first explosion, can't cheat linear algebra, I try to rattle the load, and when it tochuched the side, it generate a large popping force, that a sign of a high condition number matrix, the best way to fix this is by QR factorization, and scale the small eigen values, but that's too slow, a cholesky is probably sufficient, but I am not because we were not gambling ill conditioned matrices before but now we are.
the cheapest trick is to just scale the diagonal, but the soften everything.

anyway, I think this do not affect your simulation, so please check it out.
Julio Jerez
Moderator

Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: jitter in joints

I tested the very last versions :
NewtonUnityPlugin-b5c532108f5322e733dd7be07cc5b2214dcdf946
It seems there is no more jitter with a 1200 kg weight and no artefact on wheels (side slip) either.
To be confirmed.

blackbird_dream

Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Re: jitter in joints

in the last commit I added the Cholesky regularizer trick, otherwise, it will explode from time to time each time a set of contact generate a singular minor matrix.

the simpler example to explain this is a box landing on a flat floor.
in general the collision will produce a contact for each corner, but numerically the maximum set of contact to make the box sit stable is three.

this means that at least one row of the mass matrix is a linear combination of one or more of the other three.
in these cases most matrix factorisation method will fail to factor the matrix, and you can do two things.
find the row or rows the are linear combination of other rows by either singular value decomposition or QR factorization in case of simetric matrices.
or use the trick of apply a matrix regularizer, this is alter the matrix in such way the it can be factorizable, but that the solution will be close enough to that of the minimal matrix without redundant rows.
method one is too expensive for large system, so I use method two.
in 1.5 each cont sub matrix was reprocessed by a QR method to remove the extra contact, but this was slow and not always yield good results, so abandoned the trick

for a joint solver by definition each joint has only 6 dof, the there is not need for the regularizer trick and that was great until people start using for general problem, and I start adding contacts again.

the method the solver uses does not need matrix factorization, so in most cases the numerical solution will be conporton with the physical solution, until some contact configuration will generate an ill condition matrix that will have a numerical solution that will not match the physic of the problem, and that will show as an explosion.

therefore we need either the regularizer trick or the eigen value trick to see what row are bad.

which bring me to the last trick of 1.53 so that the circle is completed.

basically this is to prepopses contact joints, to reduce the redundace contacts so that the final mass matrix is less ill conditioned.

but this time I will add it in as a user controllable option.
this is the user will decide if a contact joint can filter uneserary contacts, for example the fork lift can only generate three contact per load per tooth, instead of the four or more that is doing now, and taking the chance of exploding.

how it is compared to 1.5?
how does it rate in the awesome scale now?
Julio Jerez
Moderator

Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: jitter in joints

It seems very close.
I mean the effect of gravity applied to the heavy load also, no erratic motions on the fork. It looks more 'weighing'.
I'm waiting for my partners to confirm.

blackbird_dream

Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Re: jitter in joints

blackbird_dream wrote:I mean the effect of gravity applied to the heavy load ...

I assume this is a good thing, after all this is what you are trying to simulate, aren't you?
your tires should feel the weight redistribution when lifting something.
before the contact where going to the iterative solver and the extreme condition number between the heavy load, a light tooth, a heavy vehicle body and light tires is simply too much for the iterative solver to converge to any meaninfull value. so the tires only get to see the weight of the vehicle plus some small influence from the tooth that act more like noise than a reaction force. that was the main cause of the jitter, and what explains, why got worse with heavier loads.

Julio Jerez
Moderator

Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: jitter in joints

Yes that's perfect for me. I'm still waiting for feedback.
Heard of crashes but I wasn't able to reproduce them.

blackbird_dream

Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Previous