avoiding vibration of car

Started by
18 comments, last by szinkopa 19 years, 9 months ago
Quote:Original post by szinkopa
I personally would apply the calculated forces, and after that from the velocity's sign change I would detect this oscillation somehow (?). Like with air resistance, or Columb friction.
The main difference is that I have 4 tyres not 1, and their motion are not independent.


Well that sounds like a hack to me... and IMO, if you want your game to act realistic, you should do things properly.

I hate to repeat what has already been said several times but just make sure that the friction force does not cause a change in velocity in the first place, then you don't need to worry about it later on.
Advertisement
Thank you very much for the help, but

Motorherp:

Quote:Original post by Motorherp
Ok first off friction always acts to directly oppose the motion, hence although you calculate the friction in the seperate directions to account for different friction coefficients, the resulting forces should be applied opposite to the tyres velocity direction.


This is true for the kinetic friction. The dirction of static friction depends on other forces acting on the object. But tyres are a particular case, they are not rigid.
In my tyre model the contact patch has a static and a sliding region. For the sliding region the friction force I apply is opposite to the direction the tyre is moving (and I decompose it to longitudinal and lateral components). This is OK, isn't it?
At the static region the tyre is deforming in both directions due to the tracktion. From the degree of deformtion (slip angle, slip ratio), I get the static longitudinal and lateral forces.


Quote:Original post by Motorherp
Secondly if the motion force is small enough that it lies below the maximum static friction then the static friction force should be scaled to cancel out the motion force. Hence static friction should never result in a reversal of direction. Last but not least, when kinetic friction comes into play it means that there is already a large motion force.


Sorry, from this I cannot see, what you mean on motion force exactly.

Quote:Original post by Motorherp
For the kinetic friction force to reverse the velocity it will have to be extremely large which suggests you are miscalculating the grounds normal force or that you have an unrealistic friction coefficient (I suggest about 0.8).


In my game if I skid in a corner, and say lock the wheels, then I begin to slide in a direction on flat ground (and possibly rotate). The sliding force is, what slows my car until it stops. And when it stops, then it begin to oscillate, but this is not visible, I know it from displaying slip angle. The friction coefficient is speed difference dependent (this is the realistic approach). On asphalt it is 1.1 at speed diff. of 0 (static friction), and decreases linearly, and reaches 0.6 at 40 km/h speed difference. After that it doesn't decrease more. I saw this graph in a paper somewhere. It is measured data.

Quote:Original post by Motorherp
You might want to check your units just to make sure you're not inputting values which are magnitudes of order out. Let me know if any of this helps.


I think my units are OK, because at higher speeds it behaves normal, and can be controlled quite well.

Quote:Original post by Motorherp
On second thoughts concerning the direction of application of the friction force, you might be right in applying it in the two seperate directions. Try both and see which one looks best.


Sorry, I don't understand this cornering. Do you mean that I calculate longitudinal and lateral forces separatly? It doesn't matter for the motion of the body, because all of them will be applied on it. However, only the longitudinal component acts on the tyre as a reaction torque. That's why it have to be separated.


SpaceDude:

Quote:Original post by SpaceDude
Well that sounds like a hack to me... and IMO, if you want your game to act realistic, you should do things properly.

I hate to repeat what has already been said several times but just make sure that the friction force does not cause a change in velocity in the first place, then you don't need to worry about it later on.


You may have misunderstoond something. I check the sign change of the object's velocity for these frictional forces, like air resistance, or brake torque, or rolling resistance. And this method is what you mention too. And I think it MUST be done such way. I check the sign change, because these forces cannot change the sign of any coordinate of the velocity, and cannot add energy to the system (hence cannot increase the abs() of any coordinate of the velocity). What's the hack in this thought? This results realistic behaviour for rigid bodies.

But tyres are different again. The deformability. The deformation (for the static region of the contact patch) works like a damped spring, so it is not simply a frictional force.
For example when a car begins turning, the angular velocity of it is increasing. A frictional force cannot do that (increasing energy). The turning is due to the adhension of the static region of the contact patch. Here the tyre is deformed, and that's what turns the car. Roughly like a spring force. If the steered tyres don't stick, then you cannot turn.

Both:

Thanks again for both your help. Maybe the situation and the work of the tyre is clearer now. Any more help is appreciated.
I think, I have to do something with the force of the static region. Motorherp's 2nd sentence might be the most valuable thought, if I could understand "motion force".
Unfortunately I've never done any work on friction with deformable bodies so I may be off the mark but here goes anyway:
Quote:Original post by szinkopa
The dirction of static friction depends on other forces acting on the object. But tyres are a particular case, they are not rigid.

The applied friction at any one point is either static or kinetic and can't be both at once. Static friciton acts to completely cancel out the components perpendicular to the ground normal of all forces acting on the body. In a soft body, ie tyre, this would explain why you get areas of deformation due to some parts of the tyre sticking and others slipping. Hence what you need to do is sum up all the perpendicular components of all acting forces and if the resulting force's magnitude is less than the max static friction then simply zero this force (equivalent to applying an opposite friction force of equal magnitude).
Quote:Original post by szinkopa
Sorry, from this I cannot see, what you mean on motion force exactly.

By motion force I simply mean the force which is driving your object. Don't worry about my last statement from my previous post, just mind dribble.
It seems to me it might be a misunderstanding of static friction which is causing your problem. There is obviously a lot more going on in your simulation than this though, a lot of which I have no prior knowledge off, so I'm probably wrong and the problem might lie else where. It sounds like an interesting subject though and I might tackle it myself some time in the future but at the moment I've got my hands tied with ragdoll and a V-clip collision engine. Just let me know if there is anything else I can help with.
[size="1"] [size="4"]:: SHMUP-DEV ::
I think this is just an inheret limitation in the Pacejka type tire modeling. I had a similar problem where the brakes would cause my wheel to overshoot zero angular velocity a bit, and it would oscillate a while before finally coming to zero. Even using the "known dt to solve for the exact torque required to reach zero velocity" method didnt work 100% of the time to dampen it, as there are other torques effecting the wheel that may not be known at any given time.
If I read your problem correctly, its that the car 'jitters' at low velocities? This could also be due to the slip angle calculations. What I've always done is use the wheels velocity vector and "this end foreward" vector to derive its slipAngle. However at very low speeds, the velocity vector fails to be valid, as attempts to normalize it could result in a divide by zero type thing.
I think the solution would involve some kind of 'sticktion'.
Realize that real tires actual apply a force even when they arnt sliding, however in most computer models, they only work WHEN sliding (ie: its velocity vector differes from that of its direction, creating a slipAngle). Note that this also effects your ability to park on hills without sliding down them.

I'm not 100% sure how you would determine the force of this 'sticktion'. You may need to find the lateral component of all the outside FORCES acting on each wheel. Then have the tire counteract those up to a set amount (based upon the load on that tire). If it isnt enough, the tire will slide and you can revert to the slipAngle calculations.
CombatWombat:

What do you mean on Pacejka-type tyre model? Empirical models?
My one is based on physics, with some simplifications, and is a bit CPU-hungry :(.
As for sticking, I have noticed in V-Rally 3, that the car simply stops below a certain speed. It's a bit strange.
Your idea good, I will think about it.

Everybody:

I think the root of everything is the angular "jittering" of the wheels at low speed. With 0.01 s timestep this is quite "spectecular". This jittering creates longitudinal force at each wheel, and thus torque on the body, which rotates it. And that's why lateral force is created (I don't know better word for this, please help). And then everything is oscillating.

So first I have to eliminate this angular jittering, and after that I will see what happens.

Thanks for your help. I needed this discussion to realize the root of the problem.
Quote:Original post by Deyja
It's tire, not tyre. o.O
Not in my country it's not.
Quote:Original post by szinkopa
You may have misunderstoond something. I check the sign change of the object's velocity for these frictional forces, like air resistance, or brake torque, or rolling resistance. And this method is what you mention too. And I think it MUST be done such way. I check the sign change, because these forces cannot change the sign of any coordinate of the velocity, and cannot add energy to the system (hence cannot increase the abs() of any coordinate of the velocity). What's the hack in this thought? This results realistic behaviour for rigid bodies.

But tyres are different again. The deformability. The deformation (for the static region of the contact patch) works like a damped spring, so it is not simply a frictional force.
For example when a car begins turning, the angular velocity of it is increasing. A frictional force cannot do that (increasing energy). The turning is due to the adhension of the static region of the contact patch. Here the tyre is deformed, and that's what turns the car. Roughly like a spring force. If the steered tyres don't stick, then you cannot turn.


I agree that the friction cannot cause a change in sign of the velocity, and it cannot add energy to the system. But what you where talking about (if i understood your correctly) is that you will add all your forces together (friction, wheel torque, air resistance, rolling resistance, gravity, ground reaction force, etc...) then calculate a new velocity for your car. And check if the new velocity of your car has changed sign or not. At this point it is too late to check for a change in sign since any of the other forces could have caused it rather than friction.

What i am suggesting is that you see what effect the friction force ALONE has on the car, or the wheel more accurately. You see what i mean?

>>For example when a car begins turning, the angular velocity of it is increasing. A frictional force cannot do that (increasing energy).

I dissagree, it is precisely the friction between the wheel and the ground which causes the car to turn. The energy does not increase, it is simply transfered from linear velocity to angular velocity.

>>Here the tyre is deformed, and that's what turns the car. Roughly like a spring force.

I downloaded your demo, good work btw it looks great. But i don't see any deformation of the wheel? do you mean to wheel moving relative to the car due to the springs on the axle?

>>In my tyre model the contact patch has a static and a sliding region.

It is concevable that part of the tire will be static while another part is sliping for a VERY brief moment at the point where the wheel makes the transition from static to sliding if your wheel is able to deform. But i don't think this is what you are talking about, since i can't see any deformation on your wheels. And quite frankly that would just be overkill trying to model that effect.

So please explain what you mean by, static and sliding region.
Quote:Original post by SpaceDude
Quote:Original post by szinkopa
You may have misunderstoond something. I check the sign change of the object's velocity for these frictional forces, like air resistance, or brake torque, or rolling resistance. And this method is what you mention too. And I think it MUST be done such way. I check the sign change, because these forces cannot change the sign of any coordinate of the velocity, and cannot add energy to the system (hence cannot increase the abs() of any coordinate of the velocity). What's the hack in this thought? This results realistic behaviour for rigid bodies.

But tyres are different again. The deformability. The deformation (for the static region of the contact patch) works like a damped spring, so it is not simply a frictional force.
For example when a car begins turning, the angular velocity of it is increasing. A frictional force cannot do that (increasing energy). The turning is due to the adhension of the static region of the contact patch. Here the tyre is deformed, and that's what turns the car. Roughly like a spring force. If the steered tyres don't stick, then you cannot turn.


I agree that the friction cannot cause a change in sign of the velocity, and it cannot add energy to the system. But what you where talking about (if i understood your correctly) is that you will add all your forces together (friction, wheel torque, air resistance, rolling resistance, gravity, ground reaction force, etc...) then calculate a new velocity for your car. And check if the new velocity of your car has changed sign or not. At this point it is too late to check for a change in sign since any of the other forces could have caused it rather than friction.

What i am suggesting is that you see what effect the friction force ALONE has on the car, or the wheel more accurately. You see what i mean?


OK. I explain it more exactly. Taking a dirction/axis 3 conditions must be fulfilled to stop the object along this direction:
- The sign of the velocity has changed
- The magnitude of the total frictional forces in this direction is greater than the magnitude of the total other forces in this direction
- The total frictional forces in this direction is opposite to the total other forces in this direction

This is, what I check. I think it's enough. But tell me, if I have missed anything.

Quote:
>>For example when a car begins turning, the angular velocity of it is increasing. A frictional force cannot do that (increasing energy).

I dissagree, it is precisely the friction between the wheel and the ground which causes the car to turn. The energy does not increase, it is simply transfered from linear velocity to angular velocity.


Well, it may be right. But only static friction can do that. The static region of the contact patch get deformed, and this is, what transmits the force to the car from the road. Sliding friction cannot do this. It is opposite to the velocity.


Quote:
>>Here the tyre is deformed, and that's what turns the car. Roughly like a spring force.

I downloaded your demo, good work btw it looks great. But i don't see any deformation of the wheel? do you mean to wheel moving relative to the car due to the springs on the axle?


I don't display the deformation on the wheel. It's just a static object. The deformation is described by numbers in the model. And the vertical red bars show the slip angle, the horizontal red bars show the size of the static region. I think the deformation wouldn't be that spectacular. Its not that much

Quote:
>>In my tyre model the contact patch has a static and a sliding region.

It is concevable that part of the tire will be static while another part is sliping for a VERY brief moment at the point where the wheel makes the transition from static to sliding if your wheel is able to deform. But i don't think this is what you are talking about, since i can't see any deformation on your wheels. And quite frankly that would just be overkill trying to model that effect.

So please explain what you mean by, static and sliding region.


Deformation and the size of the static and sliding region is modelled in the background. It could be displayed on the wheel too. But I haven't seen any game where the wheel deformed.
But this is a static model yet, it doesn't simulate the transitions unfortunately. BTW, the basic Pacejka model is also static.
So the explanation: the main point is that static and sliding regions are present at the same time, and this is not just for a moment. When you take a turn with your car, the friction between the road and the tyre deforms the tyre laterally. Like on this picture:



As you can see, the deformation is growing along the contact patch. And when the stress caused by the deformation reaches the max. static friction, it ends. Here begins the sliding region. The tyre "deforms back" here and is sliding on the road.
Hope it is clear now.

And there is still the longitudinal deformation, when accelerating or braking.
Quote:Original post by szinkopa
OK. I explain it more exactly. Taking a dirction/axis 3 conditions must be fulfilled to stop the object along this direction:
- The sign of the velocity has changed
- The magnitude of the total frictional forces in this direction is greater than the magnitude of the total other forces in this direction
- The total frictional forces in this direction is opposite to the total other forces in this direction

This is, what I check. I think it's enough. But tell me, if I have missed anything.


Ok i think i missunderstood what you said earlier... that looks good, so the problem is solved?


>>Hope it is clear now.

ah ok i think i understand what you mean about static and sliding region now... wow i didn't think you would need to model it in such detail to get realistic results.

It's not solved yet for the tyres. As I earlier wrote, I will eliminate the angular jittering first, because I suspect that for the oscillation.
These 3 criterias I wrote have been used for the "traditional" frictional forces, torques with success for a long time.

As for the tyre modelling, deformation should be included in a good model somehow, this is the main point of it. One can approach tyre modelling in real time in 2 ways:
- empirical: formulas based on measurements, magical parameters, no physics, faster computation
- analytical: based on physical formulas with less or more simplifications, more sensible parameters, slower computation

This topic is closed to new replies.

Advertisement