[Car Physics] Turbochargers and friends

Started by
24 comments, last by bmarci 9 years, 2 months ago


Your video is awesome!!! I really love your work, it feels natural and youve got the tire sounds pretty nicely done.

Thanks! Your drifting stuff is cool, that's what I was after :)

The tire sounds are very simple, using only one skid sample!

I'm precalculating long/lat optimal slips and based on those values just adjusting the frequency of the sample (playing 4 looping instances) according to the current slip values.

eg:

skid_start = opt_sa * 0.8 << the slip value when the sound starts playing (low freq)

skid_max = opt_sa* 1.2 << the slip value when the sound reaches it's highest freq

skid_mark = opt_sa * 1.0 << when skidmark appears

using the current_sa and the above thresholds, I just set the frequency between 18000 and 24000Hz (the sample is in 22Khz)

Fade-in/out the volume is just a nice touch to it ;) And the same goes to longitudinal slips.


Tire model, belive it or not, I'm using the old pacejka89 tire model.

I do! And I'm using that too :D

For pure slips the Pacejka89 is perfect, problems come when combining Fx/Fy. I have 6-7 different methods here for the "friction circle". All of them are good in some way but all of them have weirdnesses, I haven't found the "one-fits-all" model yet :(


mah I don't really think about bias. I have an open diff, to make a salisbury I just calculate the slip between the diff cage and the arms and apply friction from the clutches based on that, it all works out by itself.

I'll give it a try. Also I was thinking about using the torque-bias to determine the clutch factor, so it could work for both power and coast locking.


BTW, great stuff both of you. Are you using some game engine for your things or custom code?

Thanks! It's 100% custom code, but only DirectX 8, so it looks like %$#!! compared to WhateverMan's :)

Advertisement

BTW, great stuff both of you. Are you using some game engine for your things or custom code? Are you looking for a job perhaps?


Thanks! Well in my case I'm using Unity3d as the game engine but I did a complete overhaul on the shaders and physics. Once Unity dies, I'll be ready for a custom game engine.
About the job, was this ment for the thread author or both of us? biggrin.png


I'll give it a try. Also I was thinking about using the torque-bias to determine the clutch factor, so it could work for both power and coast locking.

I think I did my diffs the same way as Kunos. Also I'm not completely locking the diff, I'm doing what rFactor did, pumpTorque as the locking torque and poer/coast ratios to define the locking ammount in the specifyed direction. If it helps then the way I deffined wich way the diff is locking was quite simple. If driveTorque>0 then it was power locking and otherwise it was coast locking.

I'm pretty bad in english when it comes to really detailed sentences, so I hope you understood what I was trying to say. smile.png

Also about pacejka combining, Beckman's method is the best. And SAE low peed friction model at 400hz or 1000hz works perfectly well, this is how I got my simulation stable now. But what I did notice is that something gets lost when doing the simulation through a .dll lib. Its funny because the code in my C# version and C++ version are identical in every aspect, but the C++ version works with a small bug. Some small, really small values wobble making the car unstable at some point.

And the funny thing is that I dont know which values they are, is it the differential or the tires... but what I do know is that at high speed when going straight the car wants to do a long repetive S on the road, going from left to right and back like a sine wave. I tryed to trace down the values in debug mode, but the numbers are really really small.


ALSO about drift cars, what I said earlyer, 52/48 was 52% on the front and 48% on the back. Drift cars are Front Rear Layout cars. You need more weight on the front because you controll with your wheels and lighter rear to get more wheel spin. Later you use rear wings aerodynamics to balance the angles with speed requirement.

If driveTorque>0 then it was power locking and otherwise it was coast locking.

I'd think of (drivetorque+roadtorque)>0 ;)

Also about pacejka combining, Beckman's method is the best. And SAE low peed friction model at 400hz or 1000hz works perfectly well,


The Beckman's method is vey good indeed, but only second best.
For me, it becomes very slippery when the car starts skidding.
I let the slip ratio go over 1 thus the scaling factor cuts back the lateral forces (no donuts), and with locked wheels the sideway resistive forces "disappear". Maybe this is the reality, I never tried handbraking at 160km/h :))
I found some interesting in the RCVD: "tire data nondimensionalization". I might play around with that too.

Regarding low speed, is it SAE950311? I bought that paper too, but the lateral relaxation didn't work. Also the longitudinal was "sliding" when stopped on a hill, so I ended up with my own approach.

I'll try the drifting setup and get back to you.

I'm doing what rFactor did


I don't mean to be awkward but you must know something I don't :)
Did you find/get info on rFactor's stuffs or just checking RF car settings to get inspired?
As we came together so nicely, I'd come up with one more question which is more visual than physical. That is backfire.
Does it happen with some random chance when rpm drops or more scientific than that?
And the same question applies to exhaust splutter.

As we came together so nicely, I'd come up with one more question which is more visual than physical. That is backfire.
Does it happen with some random chance when rpm drops or more scientific than that?
And the same question applies to exhaust splutter.


As far as I know backfire occurs when there is a significant change in engine compression(friction torque for programmers), lets say from -60 to -120. Such a change is critical and causes the engine to pop flames through exhaust. I use this method, but theres also some logic and timing into it otherwise you get mad explosions every now and then. In my GTR35 video, where the backfire sound is to loud, you can hear when it occurs. I'm not saying this is the way its done, but this is how I think it works. I've been watching alot of race material for reference and serious backfire only occurs on down shifts and sometimes while coasting all of wich lead to a conclusion that it's caused by the change of compression.

As for rFactor, I only played with the values and did tests and thats how I figured it out, also there is some info around the net that confirms that this is how they did it. If I'm wrong (I think I'm not...) then id like to hear the truth. Atleast what I figured out, works for me perfectly.

The 'science' behind backfires is that they usually occur due to a bad air-fuel-ratio. Such as the engine running rich when it's air starved (eg when boost pressure drops via blow off valve and the ecu adds more fuel than it needs). They can also occur due to ignition timing. Both the AFR and timings change while the engine is running, and sometimes the changes might not keep up with the engine speed causing backfire.

It's also explained here:

Note he talks about anti lag systems using ignition timing to actually cause backfire and keep the turbo spooling.

That is correct, but how do you but all of this in code where you have basically "baked" data. There are no ignition timing or air-fuel-ratio. You have a Dyno curve for power and a the opposite for engine braking.

It would be really interesting to see if someone can combine the real theory with programming ways!

Hey there!

I wanted to join this interesting conversation as I'm too developing a vehicle physics simulation. It's at an early stage, but I've reached a point where I can begin testing the physics in a more serious way. I wanted to ask you guys where do you get the track models for your tests. I've been searching for a good 3D model of an actual track but no luck. Can you recommend a good source for 3D models of racing tracks?

Here's a video of my vehicle simulation if you're interested. I had spent most of the time designing a correct tire simulation solution, which is exposed at the video (ensure annotations are enabled):

[media]https:

[/media]

The tire simulation is now completed and now I'm developing the internal vehicle parts. The actual state is much more advanced, with an entire vehicle being properly simulated (engine, clutch, gearbox, differential...).

WhateverMan:

I was playing yesterday with tire settings and managed to get quite good results with Beckman's method, but far not as good as yours. A small amount of TCS (20-30%) helped a lot and managed to drift with the F40, but without it it was a complete disaster...

Shifting the weight to front made it even worse, the grip increased on the front tires and during the drift when the rear end regained some traction the car instantly went off the track.

Maybe my tire curve is too "responsive" or the general settings are more racing than drifting. I have very stiff 200-250kN tire and 70kN suspension and 30kN antirollbar.

Also the front/rear doesn't differ too much, the rear is a bit softer (maybe 5-10%).

This topic is closed to new replies.

Advertisement