rec.autos.simulators

Car physics: Pacejka camber signs?

Ruud van Ga

Car physics: Pacejka camber signs?

by Ruud van Ga » Sun, 16 Feb 2003 00:16:43

Hi all,

Here's a nice one that some people stumbled upon on the Racer forum,
and frankly I'm not sure what to do with it:

(see also
http://www.racesimcentral.net/)

The PDF that is talked about is a standard talk about the Magic
Formula. The problem is about the sign of camber.

Quote from the forum:
---
The camber sign is related to which side of the car the tire is. When
camber is negative the tire leans in. In fabulous ASCII art:

/ - \ (looking from the rear of the car forward to the nose)

Both tires have negative camber. However, Fy (lateral force) points in
the same direction for both tires, as it is a world axis (!). The sign
of gamma (camber) in the formula in that PDF therefore is undefined?!

The reason being that for both tires in the above diagram, you'd
expect the delta-Fy to be negative for one tire, and positive for the
other. But from the formula the camber (gamma) effect is the same for
both tires (on Fy). This clearly isn't right.

For this camber-dependeny reason, there is inclination angle, which is
the angle as viewed from the rear of the vehicle. So for the above
diagram, the left tire has a negative incl. angle, the right tire has
a positive incl. angle. This is what is used in Racer.

So the problem is: in the PDF and the Pacejka model, what is the
(world) direction of positive camber?? With just 'camber', you'd
expect different formulae for the left and right side tires of the
car! (sign changes)

In other words, is the Pacejka tire model completely broke?  Not
really ofcourse, but I have no idea on what side the Pacejka model is
based.
---

Anyone?

Ruud van Gaal
Free car sim: http://www.racesimcentral.net/
Pencil art  : http://www.racesimcentral.net/

SS

Car physics: Pacejka camber signs?

by SS » Sun, 16 Feb 2003 06:31:53



[big snip..]

To start the discussion going... I'll say... umm... the left side?
;-)

itazura

J. Todd Wass

Car physics: Pacejka camber signs?

by J. Todd Wass » Sun, 16 Feb 2003 08:35:58

Hi Ruud,

I saw that thread :-)

To fix it up, either negative or positive inclination is going to increase
force along the positive direction of your lateral axis.  Couldn't you try both
and see which it is? Imagine looking down on one tire with no car attached
instead...  The "right" or spin axis vector is either pointing up or down in
the presence of camber.  You could define either one (up or down) as being
negative inclination depending on how your coordinate systems work.  I'd try
both and get rid of camber entirely in the physics model and just use the angle
between the spin axis vector and surface normal vector (minus 90 degrees) to
get inclination, then try both signs in Pacejka and see which works correctly.

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

J. Todd Wass

Car physics: Pacejka camber signs?

by J. Todd Wass » Sun, 16 Feb 2003 08:42:02

Whoops, one more thing.  After you've got that worked out and you still want to
display camber on screen, it's easiest (for me anyway) to just make that a text
operation where you reverse the signs for one side of the car.  You're already
doing that though, I'm sure :-)

As far as the other part goes, what I meant was if your positive lateral
direction is to the right, then find out which sign when fed into the Magic
model will result in increased force to the right (most likely negative
inclination).  If your positive axis goes left instead, swap signs and you
should be fine I think.

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Stephen Clibber

Car physics: Pacejka camber signs?

by Stephen Clibber » Sun, 16 Feb 2003 10:09:35

I agree entirely with Todd about just using inclination.
One other thing though, if you're using the Magic Formula with conicity and
ply-steer effects, then you may want to either remove them or flip the signs
of the appropriate coefficients on the left hand side of the car (the
equivalent of matching the tyres on each side of the car), otherwise you
will have an imbalance and it'll be easier to turn left than right or
whatever. Unless you want that to happen, since tyres on real cars are
unlikely to be exactly balanced. Although in that case, you should probably
apply random coefficients from within a pre-set range to each tyre at
load-time rather than just use the same ones all round. Anyway, I'll shut up
now. :)

Cheers,
Steve.



Matt Jessic

Car physics: Pacejka camber signs?

by Matt Jessic » Sun, 16 Feb 2003 14:00:47


> The camber sign is related to which side of the car the tire is. When
> camber is negative the tire leans in. In fabulous ASCII art:

> / - \ (looking from the rear of the car forward to the nose)

> Both tires have negative camber. However, Fy (lateral force) points in
> the same direction for both tires, as it is a world axis (!). The sign
> of gamma (camber) in the formula in that PDF therefore is undefined?!

You can just do what we did: (IIRC)
Use the angle as inclination but mistakenly call it camber.
Then write a lot of lines of comments to that effect rather than
just changing the variable and accessors everywhere.

I think something like this is most traditional ;)

- Matt

J. Todd Wass

Car physics: Pacejka camber signs?

by J. Todd Wass » Sun, 16 Feb 2003 14:08:03

LOL !  I didn't guys like you were prone to this sort of thing too , Matt! :-D

Thanks for the chuckle.  You wouldn't even believe the blunder I'm trying to
fix now :-P

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Doug Millike

Car physics: Pacejka camber signs?

by Doug Millike » Mon, 17 Feb 2003 12:06:15

Sounds like you are not using SAE axis system (no reason why
you should be)...  RCVD pages 62-63.

We actually went through and called it inclination angle everywhere
that we use it (at least in all our docs, not sure about comments
all through the code).


> Hi all,

> Here's a nice one that some people stumbled upon on the Racer forum,
> and frankly I'm not sure what to do with it:

> (see also
> http://forum.racesimcentral.com/showthread.php?s=&postid=655668 )

> The PDF that is talked about is a standard talk about the Magic
> Formula. The problem is about the sign of camber.

> Quote from the forum:
> ---
> The camber sign is related to which side of the car the tire is. When
> camber is negative the tire leans in. In fabulous ASCII art:

> / - \ (looking from the rear of the car forward to the nose)

> Both tires have negative camber. However, Fy (lateral force) points in
> the same direction for both tires, as it is a world axis (!). The sign
> of gamma (camber) in the formula in that PDF therefore is undefined?!

> The reason being that for both tires in the above diagram, you'd
> expect the delta-Fy to be negative for one tire, and positive for the
> other. But from the formula the camber (gamma) effect is the same for
> both tires (on Fy). This clearly isn't right.

> For this camber-dependeny reason, there is inclination angle, which is
> the angle as viewed from the rear of the vehicle. So for the above
> diagram, the left tire has a negative incl. angle, the right tire has
> a positive incl. angle. This is what is used in Racer.

> So the problem is: in the PDF and the Pacejka model, what is the
> (world) direction of positive camber?? With just 'camber', you'd
> expect different formulae for the left and right side tires of the
> car! (sign changes)

> In other words, is the Pacejka tire model completely broke?  Not
> really ofcourse, but I have no idea on what side the Pacejka model is
> based.
> ---

> Anyone?

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

Matt Jessic

Car physics: Pacejka camber signs?

by Matt Jessic » Tue, 18 Feb 2003 00:14:45



>> The camber sign is related to which side of the car the tire is. When
>> camber is negative the tire leans in. In fabulous ASCII art:

>> / - \ (looking from the rear of the car forward to the nose)

>> Both tires have negative camber. However, Fy (lateral force) points in
>> the same direction for both tires, as it is a world axis (!). The sign
>> of gamma (camber) in the formula in that PDF therefore is undefined?!

> You can just do what we did: (IIRC)
> Use the angle as inclination but mistakenly call it camber.
> Then write a lot of lines of comments to that effect rather than
> just changing the variable and accessors everywhere.

> I think something like this is most traditional ;)

This was a bit facetious. But you should be able to
imagine the chaos if anyone else ever has to work on
your code and you have neglected to define for each variable:
    The coordinate system (including positive direction)
    The units
    Concise purpose

And if you choose a non-standard coordinate system you
need even more comments. Starboard is the same direction
on every ship for a reason :)

I'm working on someone elses code now where whole
classes are mysterious. This thing isn't working
because the "pool" member variable is empty. The purpose
of this pool object could have been written in a sentence
in 5 seconds and I would have then immediately known that
not having one was a serious problem. Instead I spent
at lest an hour figuring out what it was, what object
was supposed to have created it and why it failed.

I believe people sometimes think that those type of comments
aren't needed if they are the only person that will ever
be looking at this code.  Until 6 months later and they
can't remember what the class is for either! :)

- Matt

Dave P

Car physics: Pacejka camber signs?

by Dave P » Tue, 25 Feb 2003 16:19:50

<pedantic>
Getting sign, unit, or axis conventions wrong is a very common problem
(I know I'm always getting bitten by it), especially because each paper
seems to use a different set of conventions (and they don't always
specify them exactly), but it's generally a bad idea to just flip the
sign of different things in your program until you get the expected
result, instead of actually being rigorous and tracking down exactly
what sign convention each equation uses and making sure they're all
correct in the code before you run it...

when doing "random sign flipping", you can often get something where two
things are backwards, but (at least mostly) cancel each other out, but
then when you make some other change, things will be off in some way...

Not that I always follow my own advice, but at least I feel guilty when
I do...   ;)  and try to remember to go through the code again to
double-check.  (It's very easy to get impatient when you have a model
that is very close to working and you're just itching to be able to
drive it around and do donuts and stuff instead of squinting at rows of
numbers...)
</pedantic>

-Dave P.
MGI

PS.  Hey Doug, I think RCVD could use another chapter on tire
behavior--it would be great to have one overview reference that went
over more tire modelling stuff, hopefully all using the same notation
conventions... ;-)

[snip]

J. Todd Wass

Car physics: Pacejka camber signs?

by J. Todd Wass » Wed, 26 Feb 2003 08:07:41

<snip>

I'm somewhat familiar with this occurance :-D

My vehicle model runs in one axis system, my graphics testbed (OpenGL) runs in
another, and a game this is going into runs in still another (DirectX).  I have
had at least a couple of funny - signs scattered about to get things working
right on all systems at the same time :-D

Oh well, some of us have to learn everything the hard way :-D

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Ruud van Ga

Car physics: Pacejka camber signs?

by Ruud van Ga » Wed, 26 Feb 2003 18:58:42


If the game is still in its infancy, and the programmer is not too
religious; you can switch DirectX into a righthanded system (making it
the same as OpenGL).

If nobody had invented the minus sign, we'd sure be up a smelly brown
creek yes. ;-)

Dave is right though; 'debug' minus signs have a high probability of
coming back and haunting you on the search for very deeply hidden
bugs.

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

J. Todd Wass

Car physics: Pacejka camber signs?

by J. Todd Wass » Thu, 27 Feb 2003 06:32:43

Ah well, that's his problem ;-)  In all seriousness, it's all sorted out fine
now.  

Yep :-)

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Dave Pollatse

Car physics: Pacejka camber signs?

by Dave Pollatse » Mon, 03 Mar 2003 09:43:19

Right now the number of sign/axis/unit conventions in our codebase is pretty
rediculous...
Models in 3DSMAX are done in inches, and with the cars tipped on their ends
for some reason, so I think +z is forward and +x is left.  The 3DS exporter
for the pitcrew used meters, though.  Tracks in Multigen are in meters, and
Y is up.  Our game's graphics system uses meters, with +x = left, +y = up.
Our internal matrix routines use left-handed notation: x' = x M and
left-handed cross products, but my new physics stuff uses my pseudo-C to VU
compiler using the more standard linear algebra notation.  Our physical
constants are stored in mostly english/SAE units (horsepower,
pounds-per-inch, etc.), and converted to metric at load time for internal
computations, which are all in SI units.  The various platform-specific
graphics backends use different axis conventions as well, especially on
PC/Xbox/GameCube which actually force you to call into someone else's code
to put something on the screen... ;)
Although it's not really that bad, because usually the parts that use
different conventions are pretty independent... but I do remember the one
time we had 20,000 lb AI cars briefly (someone thought the mass was in
Newtons or something), that were just sort of bobbing up and down at the
start finish line (the suspension system automatically calculated the
preload to get the desired ride height, so they had normal spring-rates but
with huge preload).  Strangely enough, they had a hard time getting going...



Ruud van Ga

Car physics: Pacejka camber signs?

by Ruud van Ga » Tue, 04 Mar 2003 04:21:14

On Sun, 02 Mar 2003 00:43:19 GMT, "Dave Pollatsek"


>Models in 3DSMAX are done in inches, and with the cars tipped on their ends
>for some reason, so I think +z is forward and +x is left.  The 3DS exporter
>for the pitcrew used meters, though.  Tracks in Multigen are in meters, and
>Y is up.  Our game's graphics system uses meters, with +x = left, +y = up.
>Our internal matrix routines use left-handed notation: x' = x M and
>left-handed cross products, but my new physics stuff uses my pseudo-C to VU
>compiler using the more standard linear algebra notation.

...

Enough perhaps at times to get you in a straightjacket if you don't go
out once in a while. ;-)

So I guess you do all your debugging output in SI units?

Well, you can call that a 'feature', I'd say. :) Call it 'Old American
Cars Heat' and you're set...

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.