rec.autos.simulators

Steering

Nick

Steering

by Nick » Sat, 04 Aug 2001 02:50:24

Hi. I am developing a steering algorithm for my car sim. I experimented with
realistic algorithms, but they were too processor intensive AND not as fun
to use as a system like Gran Turismo. So, although I might get shot down by
saying this, a simple algorithm is what I am looking for.

I currently have a system in which the car has 100% grip, (ie) it goes where
you point it, and it is simple to put in a 'reduce steering input with car
speed' thing like GP3 to control it at high speed, to give a definite
understeer affect.

I want though, an oversteering affect, with a bit of lift-off oversteer, and
a loose back end through the corners, go give a fun, powerslidey feel to the
game (it is after all a GAME). so i am thinking the weight distribution
would control this (ie) lifting off + braking will lighten the rear end and
they would grip less.

But anybody wanna tell me how to calculate the lateral forces in the tyres,
and what to do when they are bigger than a max force (defined as the
coefficient of friction * weight on the particular wheel?). My main attempts
have been flawed because the wheels tend to follow 4 different paths and it
looks a bit odd when your front inside wheel travels around all by itself
(but still reacting to your inputs!). I don't want this slip angle, magic
formula bulls**t, to be honest, as all total realism sims are not very good
fun (except for the King - long live Grand Prix Legends!!). I don't want to
simulate the tyre temperatures, or the resistive force due to flies hitting
the windscreen :-) but I just want a fun, fast algorithm.

Anybody know where I can find one??

Cheers, Nick.

Jim Seamu

Steering

by Jim Seamu » Sat, 04 Aug 2001 03:17:06

Can't help you there Nick, but I must say "brave lad" for daring to post!
:0)

Jim


Jonny Hodgso

Steering

by Jonny Hodgso » Sat, 04 Aug 2001 04:02:24


Does that mean you have no slip angles?

attempts

I think what you might have to do is some form of four-wheel-steering,
if you're not at least providing some slip angle.  You're already
doing this at the front from what you say, by making the actual steer
angle less than the driver input at speed; if you add a similar
routine at the back, even if it's just based on front steer angle...

<hit by a thought>
<lies stunned for a few minutes>

This is sounding much like my Final Year Project.  What I *think* you
need to do, is to put "additional" (i.e. altering the driver command)
steering at both ends, in proportion to yaw rate, lateral
acceleration, speed or some combination.  For oversteer, have the rear
wheels steer *outwards* slightly as the speed/latacc/whatever
increases; for understeer, steer the fronts outwards.

Alternatively, you could model an axle slip angle (basically the same
thing) in proportion to the lateral force on that axle, and just cap
the lateral force at mu.N (straight line graph to a maximum).  That
doesn't sound too complicated... and if you kept the max force slip
angle constant (maybe fif***-twenty degrees for a arcader?) and
increased the gradient with weight transfer, I *think* you'd get some
reasonably playable results...

HTH - ask if I haven't made things clear!
Jonny

Ruud van Ga

Steering

by Ruud van Ga » Sat, 04 Aug 2001 04:20:27



Then just top them off at the max force.

That's a matter of what you do with gameplay IMHO. Anyway, I wouldn't
know how to cut corners with all these physics without endless
tweaking and thinking 'hm, it doesn't really behave like the car I
drive', so good luck with this route. :)

Ok, try RARS' algorithm; it's simple, blindingly fast (just paint 1
triangle and you probably see the bottleneck in the graphics already)
and a real breeze to implement.
It's like:
- calculate slip velocity
- determine friction coefficient
- F=-frictionCoeff*slipVelocity

That's it. If you include *some* weight transfer (depending on how
much CPU you wish to spend, you only got about a billion per second,
lol), that should get you somewhere.

Cheers,

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Matthew V. Jessic

Steering

by Matthew V. Jessic » Sat, 04 Aug 2001 13:08:04

Take a look at "Race Car Vehicle Dynamics," Chapter 5
that is a good refresher course on stability and control.
They give a "Linearized" yaw dynamics system.

For example:

yaw_moment =
       N_beta * sideslip + N_r * yaw_rate + N_delta * steer

where the N_beta, N_r, N_delta are "Stability Derivatives"
(Or "Magic Constants" if you prefer ;)

These stability derivatives summarize how the vehicle reacts
to its current state (velocity, sideslip, yaw_rate, etc) and
control inputs (steer) at any point in the vehicle's
"operating envelope".

This sounds great. The only problem is that a particular set of
derivatives is only correct for a small range of conditions around
the conditions they were calculated for. ;(
But hey, you want to take shortcuts so having just a
single set might even be enough or a fun model.

For example, the N_r term provides yaw damping.
it physicallyderives from the slightly different "slip angles" at
each tire because the vehicle has a yaw rate while turning.
(This is why people with more detailed simulations who
don't use separate calculations for the contact patch velocity
vector of each tire don't get this effect and suffer for it.)

The N_r term can be estimated under one set of simplifying
assumptions as:

N_r = (1/V)  * (a*a  * Cf + b*b  * Cr)

where a and b sum to the wheelbase (a is the distance
from front axle to cg, b rear axle to cg) and V is the speed.
Cf and Cr are the   lateral force per radian of the front
and rear tires. (Note that they are negative because of usual
sign conventions and so this equation basically says that
the faster you rotate the harder the vehicle tries to slow
down the rotation. As long as N_r is negative! ;)

So here we have a simple term for the yaw equation of motion
that gives the effect of lots of slip angle calculations ;)
without using a single vector equation.

The other nifty thing about considering the simplified analytical
models for tthe stability derivatives is that it teachs some
fundamentals about car stability. For example, the yaw damping
is reduced 33% if you increase speed from 60 to 90 mph.
Something I wish the idiotic Texas empty bed pickup drivers
with illegal overtake speed who sharply lane change past me
with only inches to spare had a clue about.

You could adjust the derivatives by changing Cf and Cr based
on estimates of normal forces. For example, under braking, if
you increase Cf and reduce Cr, guess what happens to the
static stability derivative N_beta:  (The restoring moment that
increases with increasing sideslip angle that is POSITIVE
for a stable system for usual sign conventions)

N_beta = a * Cf - b * Cr

Reducing Cr drives it toward a negative (unstable) condition.

And now we have instability under hard braking, again without
a slip angle or a slip ratio in sight.

Enjoy,

- Matt

Nick

Steering

by Nick » Sun, 05 Aug 2001 02:45:34

when i said 100% grip, i meant work out the force from the engine on the
wheels (this is done accurately), then using F=ma, v=u+at, d=st, you get a
forward distance.

then calculate the radius of the corner due to the steering input
(=wheelbase/tan(steerang)), and then the useful formula:

angle/360 = forward distance / circumference (from radius)

then just move it that much forward and sideways and rotate it by angle.

in this way, slow speed cornering is totally accurate, but when you come to
highspeed cornering - well. thats my problem.

Jonny Hodgso

Steering

by Jonny Hodgso » Sun, 05 Aug 2001 07:29:44


I'm definitely thinking you need to use a simple 2DOF (yaw-sideslip)
model and add those offsets to the course you're already plotting.
Using handling coefficients (I think that was this thread - can't tell
since you're not quoting anything) should work quite nicely on that
one, though you may need to derive lateral movement from the sideslip
value rather than from your curve as you do currently.

RCVD, methinks.

Jonny

Nick

Steering

by Nick » Sun, 05 Aug 2001 19:10:56

here was my plan:
calculate cornering force required from F=(m*v squared)/r
calculate max available turning force from F=weight*coeff friction

do this for front axle and rear axle (the rear has a smaller radius)
then, maybe cap the cornering force at the maximum, or approximate with a
sin curve (if you don't understand then mail me).

from there, you can wourk out the actual radius of the front and rear
wheels. maybe by finding the positions of the centre rear axle and centre
front axle, i can draw the car pointing along the line between the two or
something.


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.