rec.autos.simulators

My Sim: Steering Probs

Alex Smit

My Sim: Steering Probs

by Alex Smit » Tue, 16 Apr 2002 08:32:03

Time for that weekly question

Right, I'm calculating slip angle for the wheels by

if Front Wheel{
    S = carSlipAngle + ( [carAngVel*a]/carVelocityLongitudinal) + steerAngle
else{
    S = carSlipAngle - ([carAngVel*b]/carVelocityLongitudinal)

Ive calculated the carSlipAngle by atan(carVelocityLat/carVelocityLong) and
a and b are distances from wheel to centre gravity CG.

Not sure exactly how good or correct it is, but it is giving good enough
results (I dont need 100% accuracy)

I'm giving the car a rotational (yawing) acceleration by getting PacejkaFY
from the wheels, and multiplying by their distance from CG which gives the
car a torque and therefore

carAngAcc = torque/carInertia

Not too sure how correct this is either. My problem comes when I'm steering
and almost come to a stop, the car doesnt have any forces against the yawing
of the car so it keeps on rotating faster and faster even when still, in
effect it is spinning on the spot even when still, until it's so fast even
OpenGL can't keep up and it just dies :(

Thoughts!?

Also I've looked at Brian Beckman's physics pages for combined grip/slip but
am a bit fuzzy. Can anyone point me in the direction of a better
explanation? I would like my car to have understeer and oversteer :)

Thanks!

Stefano Casil

My Sim: Steering Probs

by Stefano Casil » Tue, 16 Apr 2002 19:52:30


> Time for that weekly question

> Right, I'm calculating slip angle for the wheels by

> if Front Wheel{
>     S = carSlipAngle + ( [carAngVel*a]/carVelocityLongitudinal) + steerAngle
> }
> else{
>     S = carSlipAngle - ([carAngVel*b]/carVelocityLongitudinal)
> }

Why are you doing [carAngVel*a]/carVelocityLongitudinal ? I think it
should be just [carAngVel*a], without the division.. at 0 speed u'll
still get lateral force to fight the yaw... with that division u'll
get NaN at 0 speed.

Anyway... I wouldn't know, i remember trying to do that with that
approach but it was just headache... In my sim the tire is a rigid
body.. So i get its velocity vector get its components relative to the
ground and then compute the angle between that and the tire
orientation vector... that's really easy..and it works.

It's much easier if u build a good rigid body system first... your
approach will break up under grades, hills.. and so on....

Stefano Casillo
www.drivingitalia.com/netkar

Alex Smit

My Sim: Steering Probs

by Alex Smit » Tue, 16 Apr 2002 21:45:51

Thats the equation a website suggests for it, although I must admit I'm
skeptical
about that site!

What exactly is a tyre's velocity vector?

I'm not simulating grades, I need to get this sim done for less than
4 weeks time(!), so it doesn't need to be that great but I still want it to
have decent enough handling.

Ruud van Ga

My Sim: Steering Probs

by Ruud van Ga » Tue, 16 Apr 2002 22:03:39

On Sun, 14 Apr 2002 23:32:03 +0000 (UTC), "Alex Smith"


>Time for that weekly question

>Right, I'm calculating slip angle for the wheels by

>if Front Wheel{
>    S = carSlipAngle + ( [carAngVel*a]/carVelocityLongitudinal) + steerAngle
>}
>else{
>    S = carSlipAngle - ([carAngVel*b]/carVelocityLongitudinal)
>}

If you make 'b' negative you can combine the two. Can't judge if the
formula is ok, but it looks novel. ;-)

That's just around the yaw axis then.

Check FY at low speed; at slipAngle=0 you may get |Fy|>0 due to
conicity, plysteer or camber. Pure Pacejka wasn't made for low speed
in itself. You may do a trick with 'if(v<1)Fy*=v' or take a relaxation
length approach (as I think most scientific approaches do).

Gregor can help you on this. You can also do a friction circle
approach: if the vector length of Fx and Fy is bigger than the maximum
friction (frictionCoeff*load), then just cap both;
l=length_of_vector(Fx,Fy); if(l>max){ Fx=Fx*max/l; Fy=Fy*max/l; }

That should give you under/oversteer as well.

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Alex Smit

My Sim: Steering Probs

by Alex Smit » Tue, 16 Apr 2002 22:33:21

the a and b are the distances from the wheel to the centre of gravity, so
these might
not be equal so I can't

I have applied this now :) However it still does not solve my problem.
Imagine a car turning and braking to a stop quite gently. The problem is
that because
the car is turning, the slip angle is giving the wheel an FY, which is in
turn making the
car rotate faster and faster, so I need some reacting force to stop this.

Unless that IS the FY, in which case I'm going crazy

Alex

Ruud van Ga

My Sim: Steering Probs

by Ruud van Ga » Wed, 17 Apr 2002 00:16:00

On Mon, 15 Apr 2002 13:33:21 +0000 (UTC), "Alex Smith"


>> If you make 'b' negative you can combine the two. Can't judge if the
>> formula is ok, but it looks novel. ;-)

>the a and b are the distances from the wheel to the centre of gravity, so
>these might
>not be equal so I can't

Ah well, I wouldn't use a/b anyway but something like
wheel->LongDistanceToCG. Doesn't really matter.

Then I'd check all 4 Fy values, and see if they seem correct. The rear
wheels should give countering Fy values, so the sum eventually goes to
0 (or jitters fast from + to -, averaging to the same effect).

It is the Fy indeed. :) If the front wheels give Fy values and the car
starts rotating, the rear wheels will get velocity and produce
countering Fy values.
May be because your slipangle velocity formula doesn't take into
account rotation of the vehicle (you need to add the effects of
translation AND rotational velocities). If you don't add rotational
velocity, the slipangle of the rears will seemingly be 0, while they
are about 90 degrees actually.

A quick hack would be to use the current and last position of a wheel
and build a vector from that. That's your velocity over the last
timestep.

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.