Car's physics and setting...

Post new topic   Reply to topic

Page 2 of 5 Previous  1, 2, 3, 4, 5  Next

View previous topic View next topic Go down

from the code...

Post  aegidian on Mon Nov 24, 2008 2:58 pm

Tomte wrote:Can I raise the next issue:
Code:
jerkRPM

What does that exactly do? Apart from making the engine unwilling to rev from idle if jerkRPM is set higher than idleRPM?


jerkRPM appears to set the absolute minimum RPM for the engine ie. if the clutch is engaged and the wheels are at a standstill the engine will still be turning over at jerkRPM rather than stalling.

aegidian
Moderator
Moderator

Number of posts: 111
Age: 42
Location: London, Great Britain.
Interests: Skiing, Motor racing, Karate
Favorite Car: BRM P57
Favorite Track: Black Forest
Registration date: 2008-10-07

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  Tomte on Tue Nov 25, 2008 5:29 am

aegidian wrote:
jerkRPM appears to set the absolute minimum RPM for the engine ie. if the clutch is engaged and the wheels are at a standstill the engine will still be turning over at jerkRPM rather than stalling.

Thanks for clearing that up.
I wonder what's the difference to
Code:
idleRPM

_________________
Jabber/GTalk: tomtar0@gmail.com


Tomte
Veteran
Veteran

Number of posts: 426
Location: Bordeaux, France
Interests: Ermn, Redline? Photography, cycling, sailing, horseback riding
Humor: I'm German. Was ist Humor?
Favorite Car: I'm not the driver, I'm the mechanic.
Favorite Track: Spa-Francorchamps
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  DonaemouS on Tue Nov 25, 2008 8:03 am

so:

Code:
idleRPM


Is just sound pitch related? I asking cause I hit an issue with CTS-V engine hole...

_________________
join #tRc.clan @ irc.quakenet.org
---
Third place in RRL Winter 2007
First place in See Flat Invitational RLTCC
First place in ::: Porsche 550 Rumble Cup :::
Second place in Time Trial Tournament Fall 2008 - 5848 points

DonaemouS
Moderator
Moderator

Number of posts: 461
Age: 34
Favorite Car: BMW M Coupe
Favorite Track: Black Forest
Registration date: 2008-08-28

View user profile http://www.games4mac.it

Back to top Go down

Re: Car's physics and setting...

Post  DANDY on Tue Nov 25, 2008 9:58 am

DonaemouS wrote:so:

Code:
idleRPM


Is just sound pitch related? I asking cause I hit an issue with CTS-V engine hole...

I don't believe so...
untested, but jerk should probably be less than idle, as in trying to brake to a stop without clutching in a manual car, it starts to jerk about, before finally stalling. It probably doesn't do anything with a properly set clutchRPM, which should normally be as low as possible, but not lower than idle. I had the 'hole' problem as well, I think on the XKR, which was solved by setting it higher.

DANDY
Veteran
Veteran

Number of posts: 258
Age: 32
Location: Long Island, Soviet Canuckistan
Interests: Auto/Moto (Virtual and actual), Tunes
Humor: Saint-Louis du Ha! Ha!
Favorite Car: 2002 tii
Favorite Track: Schwarzer Wald
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  DonaemouS on Sun Dec 14, 2008 12:04 pm

Engine inertia

Stored in engine.inertia.engine. (notice that engine.inertia.final_drive isn't used anymore) The engine takes power to spin up. For example, with the clutch fully disengaged you would otherwise spin up the engine far too fast. This slowed engine acceleration represents the engine inertia, and is specified by engine.inertia.engine (in units kg*m^2). A typical value may be 0.09, but I'm not too sure about this.

This is how engine inertia work in Racer. Is the kg*m^2 the same unit used in Redline?

_________________
join #tRc.clan @ irc.quakenet.org
---
Third place in RRL Winter 2007
First place in See Flat Invitational RLTCC
First place in ::: Porsche 550 Rumble Cup :::
Second place in Time Trial Tournament Fall 2008 - 5848 points

DonaemouS
Moderator
Moderator

Number of posts: 461
Age: 34
Favorite Car: BMW M Coupe
Favorite Track: Black Forest
Registration date: 2008-08-28

View user profile http://www.games4mac.it

Back to top Go down

Re: Car's physics and setting...

Post  Tomte on Mon Jan 05, 2009 4:48 am

DonaemouS wrote:
Engine inertia

Stored in engine.inertia.engine. (notice that engine.inertia.final_drive isn't used anymore) The engine takes power to spin up. For example, with the clutch fully disengaged you would otherwise spin up the engine far too fast. This slowed engine acceleration represents the engine inertia, and is specified by engine.inertia.engine (in units kg*m^2). A typical value may be 0.09, but I'm not too sure about this.

This is how engine inertia work in Racer. Is the kg*m^2 the same unit used in Redline?

According to one of Giles' comments, the intertia in redline is in kg*m^2. But how do we know that 0.09 is realistic?

_________________
Jabber/GTalk: tomtar0@gmail.com


Tomte
Veteran
Veteran

Number of posts: 426
Location: Bordeaux, France
Interests: Ermn, Redline? Photography, cycling, sailing, horseback riding
Humor: I'm German. Was ist Humor?
Favorite Car: I'm not the driver, I'm the mechanic.
Favorite Track: Spa-Francorchamps
Registration date: 2008-08-28

View user profile

Back to top Go down

Turning circle

Post  C14ru5 on Mon Jan 05, 2009 11:52 am

Just to make things clearer: The document DonaemouS mentions that explains Racer's physics is here.

I would take all of Ruud's comments in the Racer document with a grain of salt. There are several values in car physics that programmers don't have any good way of determining by themself. I remember Jonas explaining that he added 'wheels.loadSensitivity' mainly because he was unsure about the default value himself.

Yesterday I finally confirmed something else: 'wheels.maxAngle' is given in radians. A value of 1.57 is approximately 90 degrees. The most common value in Redline Plug-in cars, 0.48, is equal to about 27.5 degrees. On The Steering Bible, I found a formula for calculating the turning circle using the steering angle, track, and wheelbase of a car. Note that this turning circle is not the same as the "curb-to-curb turning circle" that many brochures provide, since that value is the diameter that the outermost body part is able to "draw". Also, the formula is just an approximation that doesn't take into account Ackermann steering (not in Redline) or differential effects. Anyway, here is a version of the formula using radians instead of degrees:

Curb-to-curb tire turning diameter = 2 * (track / 2 + wheelbase / sin(angle*(pi/180)))
(Correct me if my math is wrong, or if the formula can be simplified using trigonometry)

'steeringWheelTurns' has no effect on how fast the wheels steer, it's just a graphical effect. On the other hand: wheels.maxAngle effects how fast the wheels steer when using the keyboard as input, as they always use about 0.5 seconds from neutral to extreme. According to Racer's Car Physics Reference, race cars rarely need a steering angle of more than 10 degrees. In Redline, however, since the keyboard input steering speed is determined by the angle, you may need to use a larger value than 0.18 radians. The reason I think so, is because race cars have only a small amount of steering wheel rotation. Not only does that help you keep both hands on the wheel, but it makes you go into opposite lock much faster, in order to correct oversteer and near-accidents. Inside Redline, it will take one half second to make full opposite lock to correct oversteer, so higher values may be necessary to be able to make faster steering corrections. It may be that the default value of 0.48 is nice, but my point is that this should be a value that we dare to experiment with.

That last paragraph was very long. Was this all just incomprehensible babble, or did it make sense?

C14ru5
Veteran
Veteran

Number of posts: 229
Age: 28
Location: Oslo, Norway
Interests: Student / Synth geek / Vinyl collector
Humor: Don't panic, and don't forget your towel.
Favorite Car: Radical SR4 Clubsport
Favorite Track: Black Forest
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  aegidian on Mon Jan 05, 2009 12:48 pm

Tomte wrote:
DonaemouS wrote:
Engine inertia

Stored in engine.inertia.engine. (notice that engine.inertia.final_drive isn't used anymore) The engine takes power to spin up. For example, with the clutch fully disengaged you would otherwise spin up the engine far too fast. This slowed engine acceleration represents the engine inertia, and is specified by engine.inertia.engine (in units kg*m^2). A typical value may be 0.09, but I'm not too sure about this.

This is how engine inertia work in Racer. Is the kg*m^2 the same unit used in Redline?

According to one of Giles' comments, the intertia in redline is in kg*m^2. But how do we know that 0.09 is realistic?


Hmm - the engine inertia should be equivalent to the inertia of the flywheel and moving parts of the engine, expressed as a moment of inertia at the final drive (the driveshaft).

Let's try a few elementary mechanical premises,

A lightweight flywheel masses between 5 and 15 kg, a standard flywheel between 10 and 20kg. Now the flywheel is supposed to keep the mechanical parts of the engine moving when there's no force from the piston, so we could estimate that the moment of inertia of the engine is approximately equivalent to the moment of inertia of the flywheel, and therefore the moment of inertia at the final drive is approximately twice the moment of inertia of the flywheel, so...

http://www.autopartswarehouse.com/mmp/lincoln~town_car~flywheel~parts.html

Let's say the flywheel of a standard engine masses 15kg, then we can calculate the moment of inertia of a disc 0.30m radius (and about 7cm thick) as...

mass x radius squared divided by two

15 x 0.30 x 0.30 = 1.35 kgm^2

So, with a calculated engine inertia of 2.70 kgm^2, 0.09 really don't seem right. Crying or Very sad I'll have to go look at the code again.

aegidian
Moderator
Moderator

Number of posts: 111
Age: 42
Location: London, Great Britain.
Interests: Skiing, Motor racing, Karate
Favorite Car: BRM P57
Favorite Track: Black Forest
Registration date: 2008-10-07

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  C14ru5 on Mon Jan 05, 2009 1:32 pm

Remember that Racer has several inertia settings that Redline lacks: In addition to engine inertia, there's also gear inertia and differential inertia. (There's also engine mass, but that only seems to affect the car's total mass.) Since there are more inertia variables, that may explain Ruud's lower 0.09 recommendation compared to our values that typically are around 0.2

Let's not forget the two questions "What does it do to the car in Redline?" and "Are there any other factors that can affect this behavior?". Luckily, this engineInertia seems to be pretty isolated in Redline's physics. The answer to the first question is that engineInertia determines how quickly the engine changes RPM when the clutch is detatched and power is applied or removed. The answer to the second question is torque and engineFriction.

By all means, if it's possible to find a real world equivalent to the value, I'm not holding you back Smile
I'm just saying that it's not a crucial value to fully understand, since its effects are rather obvious.

C14ru5
Veteran
Veteran

Number of posts: 229
Age: 28
Location: Oslo, Norway
Interests: Student / Synth geek / Vinyl collector
Humor: Don't panic, and don't forget your towel.
Favorite Car: Radical SR4 Clubsport
Favorite Track: Black Forest
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  djpimley on Mon Jan 05, 2009 4:08 pm

C14ru5 wrote:I'm just saying that it's not a crucial value to fully understand, since its effects are rather obvious.

Yes, it can be considered an X factor. We don't need it to be a real-world equivalent, we can just suck it and see.

djpimley
Veteran
Veteran

Number of posts: 396
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  Tomte on Tue Jan 06, 2009 3:59 am

C14ru5 wrote: It may be that the default value of 0.48 is nice, but my point is that this should be a value that we dare to experiment with.

True, Redline uses radians for the steering angle. I think Andreu wrote up an article about that on the Redline Wiki a while ago.

I'm using different steering angles in my cars since the beginning, basically the road cars get 0.48 or similar, while the race prepped cars get a lower steering angle (0.36-0.42 I think). In theory, it should help the steering precision to use a lower angle, while it is counterproductive to quick opposite lock steering corrections.

_________________
Jabber/GTalk: tomtar0@gmail.com


Tomte
Veteran
Veteran

Number of posts: 426
Location: Bordeaux, France
Interests: Ermn, Redline? Photography, cycling, sailing, horseback riding
Humor: I'm German. Was ist Humor?
Favorite Car: I'm not the driver, I'm the mechanic.
Favorite Track: Spa-Francorchamps
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  Andreu on Thu Jan 08, 2009 2:06 am

Tomte wrote:
C14ru5 wrote: ... but my point is that this should be a value that we dare to experiment with.

True, Redline uses radians for the steering angle. I think Andreu wrote up an article about that on the Redline Wiki a while ago.
...

Yes, I did, although it contains a *small* mistake in the example. I'll try to fix it when I have a chance.

As for experimenting with this value, I'd be careful. I think the wheel turning angle setting is more important than it seems with respect to controlling the handling of the car. Just an example here. Recently, I have been working on an update for my S2K. My older releases all contain a vast number of mistakes. One of these is a huge wheel turning angle of 1 radian. This was a mistake, granted, but recently I observed, and this is what I find interesting, that the greater turning angle gave the car understeer, and not oversteer, which is what I would have predicted. The reason for this, I noticed, is that when the front wheels turn too much, they no longer help the car in the turn, but become skidding surfaces, which causes understeer.

So, this is my point here: try to calculate the turning angle value from the specifications of the car. These specs can be found for many cars, and it is simple math after all. Smile


Last edited by Andreu on Thu Jan 08, 2009 4:27 pm; edited 1 time in total

Andreu
Rookie
Rookie

Number of posts: 5
Favorite Car: Built-in Golf, Lancia Fulvia
Favorite Track: Built-in Rally Track, Silverstone, Brands
Registration date: 2008-12-01

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  Toad on Thu Jan 08, 2009 3:53 pm

Andreu wrote:This was a mistake, granted, but recently I observed, and this is what I find interesting, that the greater turning angle gave the car understeer, and not oversteer, which is what I would have predicted. The reason for this, I noticed, is that when the front wheels turn too much, they no longer help the car in the turn, but become skidding surfaces, which causes oversteer.
Smile


Sorry to butt in here on a topic that I don't have much technical understanding; but I'm somewhat confused by Andreu's comments about giving a car greater turning angle setting will end up with a car that oversteers.

The simplest defininition of oversteer I have seen is that the rear wheels lose adhesion while the front tires maintain grip with the road. There are more than a couple of ways to induce this condition. And one ugly one for any driver is as a result of the front tires regaining grip after having "become skidding surfaces" due to understeer, as Andreu describes. The front tires losing grip, regardless of wheel and tire angle defines understeer to me, an that is what Andreu says he would have expected before making tests on the car settings. So it seems that if wheel position were turned in during the skid (an understeering condition) and then the car regains front wheel traction, now we have gone from one extreme to the other and now have a wicked snap oversteer.

Is that what you are saying here Andreu? If so then I would agree with both of you that this setting is very important indeed to Redline cars. Even more so than real cars as we just don't have the feedback to sense when this condition is happening. I've heard it said what makes great drivers (real cars) is the ability to make the adjustments between oversteer and understeer better than the competition.

Toad
Veteran
Veteran

Number of posts: 137
Age: 49
Location: Left Coast United States of Amnesia
Interests: Norton motorbikes, Argentine Tango
Humor: I child proofed my house; but they still get in.
Favorite Car: BMW e90, ZO6.R
Favorite Track: Donington
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  Andreu on Thu Jan 08, 2009 4:32 pm

[quote="Toad"]
Andreu wrote:This was a mistake, granted, but recently I observed, and this is what I find interesting, that the greater turning angle gave the car understeer, and not oversteer, which is what I would have predicted. The reason for this, I noticed, is that when the front wheels turn too much, they no longer help the car in the turn, but become skidding surfaces, which causes oversteer.
Smile

Don't worry about intervening. That's what it's alll about.

As for what I said, sorry, but I meant to say understeer. Somehow in my head they get mixed up.

Sorry if I was confusing the issue. Embarassed

Andreu
Rookie
Rookie

Number of posts: 5
Favorite Car: Built-in Golf, Lancia Fulvia
Favorite Track: Built-in Rally Track, Silverstone, Brands
Registration date: 2008-12-01

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  aegidian on Thu Jan 08, 2009 7:08 pm

One thing I hope to add to the wheel physics is Ackerman and ANti-Ackerman adjustments to the steering, just to complicate things for car developers already struggling with ways of dialling out over/under-steer.

Cool

aegidian
Moderator
Moderator

Number of posts: 111
Age: 42
Location: London, Great Britain.
Interests: Skiing, Motor racing, Karate
Favorite Car: BRM P57
Favorite Track: Black Forest
Registration date: 2008-10-07

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  slowDan on Fri Jan 09, 2009 3:31 am

aegidian wrote:One thing I hope to add to the wheel physics...


If only huh?

Laughing Wink


Last edited by slowDan on Fri Jan 09, 2009 12:55 pm; edited 1 time in total (Reason for editing : oh nothing!)

slowDan
Addict
Addict

Number of posts: 92
Age: 36
Location: UK
Interests: Design/Racing!
Favorite Car: Porsche 968 RS Turbo
Favorite Track: Spa Francorchamps
Registration date: 2008-08-28

View user profile http://slowdan.co.nr

Back to top Go down

Re: Car's physics and setting...

Post  aegidian on Fri Jan 09, 2009 12:48 pm

slowDan wrote:
aegidian wrote:One thing I hope to add to the wheel physics...


Suspect

Shocked

Did I miss something? This sounds like you are adding things already! (keeps fingers firmly crossed!) Wink


Should I ever get my hands on the code, that is... Embarassed

aegidian
Moderator
Moderator

Number of posts: 111
Age: 42
Location: London, Great Britain.
Interests: Skiing, Motor racing, Karate
Favorite Car: BRM P57
Favorite Track: Black Forest
Registration date: 2008-10-07

View user profile

Back to top Go down

Center of Gravity and Moments of Inertia

Post  C14ru5 on Wed Jan 28, 2009 7:23 pm

There's a thread over at RaceSimCentral with a theory about the CoG height being a percentage of the roof height (from the ground), where this percentage is given by the car type. I'm not so sure about that theory, I think there would be a better pattern if one saw the CoG height in relation to the distance between the wheel axles and the roof. Anyway, the theory says that depending on car type, for road cars at standard running height you could get a good estimate of the CoG height as 38-40% of the roof height.

Reading through the thread, I came across a technical document containing Y and Z CoG and moments of inertia for 90 (not so interesting) pre-1999 road cars. I've put a local copy for you to download: Measured Vehicle Inertial Parameters (144KB)

We've suspected that the inertia formula on the wiki is only accurate for cuboids, but after having inserted the dimensions and CoG data into that inertia formula and comparing my results to the measured moments of inertia in that data sheet, I fall within two-three digits of precision. That means that we can trust our inertia formula pretty much - the challenge lies in finding the right center of gravity.

Some of you may find some interesting specific data in that document as well: Audi Quattro, BMW 320, Merc 190E, Saturn SL, Volvo 240...
The document quotes an older document from 1992 that supposedly has more than 400 cars in it: Garrott W.R. "Measured Vehicle Inertial Parameters" SAE Paper 930897
It's not available digitally, it seems, so I'll try to get a copy through the library at the University where I'm studying.

C14ru5
Veteran
Veteran

Number of posts: 229
Age: 28
Location: Oslo, Norway
Interests: Student / Synth geek / Vinyl collector
Humor: Don't panic, and don't forget your towel.
Favorite Car: Radical SR4 Clubsport
Favorite Track: Black Forest
Registration date: 2008-08-28

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  Andreu on Wed Jan 28, 2009 8:31 pm

Thanks for the tips! Very good information there. It would be nice to put it in the Redline wiki.

Andreu
Rookie
Rookie

Number of posts: 5
Favorite Car: Built-in Golf, Lancia Fulvia
Favorite Track: Built-in Rally Track, Silverstone, Brands
Registration date: 2008-12-01

View user profile

Back to top Go down

Re: Car's physics and setting...

Post  DonaemouS on Sat Feb 07, 2009 1:35 am

Code:
wheels.friction x

I think it's time to understand how this value is calculated. I saw Jonas used higher values for small street cars, like Mini and Golf with a value of 15.

Otherwide, on sports cars like Viper and Maserati, is reduced to 10. Is this based on what?

I mean, is based on the type of the tires, the weight of the wheel, the car's dimension and what is the range?

_________________
join #tRc.clan @ irc.quakenet.org
---
Third place in RRL Winter 2007
First place in See Flat Invitational RLTCC
First place in ::: Porsche 550 Rumble Cup :::
Second place in Time Trial Tournament Fall 2008 - 5848 points

DonaemouS
Moderator
Moderator

Number of posts: 461
Age: 34
Favorite Car: BMW M Coupe
Favorite Track: Black Forest
Registration date: 2008-08-28

View user profile http://www.games4mac.it

Back to top Go down

Page 2 of 5 Previous  1, 2, 3, 4, 5  Next

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum