Tyre Physics progress spinoff thread for physics geeks
Quote from JeffR :LFS players knew all along that it was a small development team, and early on, many of the LFS fans seemed to be proud of the fact that the development team was so small. It was obvious to a few of us that this would result in a slow development cycle, and I was considered a pessimist when back in 2005 soon after S2 release when I estimated that S3 would get released sometime in 2009. This probably would have happened if it wasn't for the setback with the tire physics. Also S2 ended up with a bit more content than some of us expected, so what we have now is more like S2.5, compared to what S2 was back in 2005.

I would explain it that smaller developmemnt team meant better physics quality with lower need of commercial simplystics for racers.
Quote :
I don't see the Scirocco as a big deal. It's a front wheel drive econobox, not exactly an exciting car.

Actually I'm a bit surprised that they're willing to re-implement the tire physics model for S2 now rather than just live with the current model and save the physics re-do for S3, since each stage was originally planned to include physics improvments.

Other than the Scirocco, I'm not sure what else was planned to be included with S2, if anything, beyond what we have now, so maybe consider the tire physics re-do as a preview of S3.

Again, the physics re-do seems like a monumental task, I just hope they eventually get something implemented that they're happy with.

I would repeat myself here but I see why Scirocco was the trigger - I dont think many of ppl here had BF1, FBM, RAC or MRT available to compare data provided in settings with output data. Now with real and quite popular Scirocco they cant be told that the results differ in case of the same settings.
I still hope Scawen would be ambitious enough to redo the physics engine to obtain data comparable to the real ones.
Segmented tire model has some issues - adding any new ralations between them (ie. to model heat propagation) multiplies exponentially number of calculations... but this can be modelled using virtual layer (like "average tire temp" that intereferes with every segment). Another thing is as I remember problem with different tire characteristics going out of grip and regaining grip which combined with change in longitunal/latitudal slip components gets quite complex and really obtained.
http://www.racer.nl/reference/pacejka.htm
Quote from JeffR :The issue is that reality got in the way of whatever simplifying assumptions he made when creating the original tire model.

Yeah so sensible. We shouldn't forget however that a lot of updates are not necessarily blocked by the tyre model and could have been released nonetheless. E.g. interiors?

Scawen himself said he's not always banging his head against the tyre model, so there has to be more work done that hasn't been released.

So many long-standing bugs that could be fixed or small improvements that could be made...

Quote from tristancliffe :I suspect the reality is in the middle, and it'll just bumble along at its own pace for a while yet, as it has always done...

Very well put, if I close my eyes I can almost imagine a past when patches were never released more often than once every few years
#3 - JeffR
Quote from AndRand :I would explain it that smaller developmemnt team meant better physics quality with lower need of commercial simplystics for racers.

The issue with a smaller development team is isolation from the rest of the development community and/or access to real world data. The larger teams generally have some ongoing influx of people and/or data that helps them keep up to date with current methods and to avoid any pitfalls already discovered by others in the community.

Quote :Now with real and quite popular Scirocco they cant be told that the results differ in case of the same settings.

To this date, I'm not aware of any racing game that drives the same as a real car at the limits. The fastest laps in a game occur when a player drives it like a game, not like a real car. The setups that provide the fastest laps in a racing game would never work in the real world. Most racing games tend to reward loose setups and essentially drifting through turns more so than what works in real life. LFS isn't going to change this.

Quote :Segmented tire model has some issues

In my opinion, the segmented tire and clutch overheat models were uneeded, implemented too soon and too compromised, when there should have been more attention paid to other basic features and the core physics, which did end up with a problem.

Quote :pacejka

An attempt to model tires that fails in the simplest of situations, a stopped car on an inclined or banked section of track. It's a "backwards" approach that tries to model everything based on slip ratio and slip angles, and working it's way back to forces, as opposed to the other way around. It's OK if you're happy with an 80% to 85% solution, but a 90+% solution requires a different or a hybrid approach.
Quote from JeffR :The issue with a smaller development team is isolation from the rest of the development community and/or access to real world data. The larger teams generally have some ongoing influx of people and/or data that helps them keep up to date with current methods and to avoid any pitfalls already discovered by others in the community.

scientific surveys are quite open to whole engieneering community and all of the data are secretly kept by manufacturers. But I was referring not to the knowledge of the developers but to the commercial pressure..
[quote]

[quote]An attempt to model tires that fails in the simplest of situations, a stopped car on an inclined or banked section of track. It's a "backwards" approach that tries to model everything based on slip ratio and slip angles, and working it's way back to forces, as opposed to the other way around. It's OK if you're happy with an 80% to 85% solution, but a 90+% solution requires a different or a hybrid approach.[/QUOTE]
Well, I think it is only because natural approach to gathering data - slip angles and ratios are set, forces measured in result. As they are empirical data (or diagrams derived from empirical data not theoretical assumptions) you can always switch them as you alike.
As I reckon, x and y force components are measured separately. What is probably the unknown is the area when they are combined - both combined force and separate components (I attach a sketch to show that area - the plane shows force combined, a vector Fx+Fy, on the top-right wall you can see the force y vs. slip angle, the top-left wall is force x vs. slip ratio + these are not real data, just the sketch to imagine relations between vector components ).
Additionally tires characteristics are surveyed for different behaviour under different change dynamics (small slip angle/ratio changes vs. sharp changes) and there probably hysteresis is involved (characteristic when loosing grip is different than when regaining) All in all, this would be long time till simulators purposed for online races would be precise in all that.
Attached images
Pacejka combined.JPG
Quote from JeffR :An attempt to model tires that fails in the simplest of situations, a stopped car on an inclined or banked section of track. It's a "backwards" approach that tries to model everything based on slip ratio and slip angles, and working it's way back to forces, as opposed to the other way around. It's OK if you're happy with an 80% to 85% solution, but a 90+% solution requires a different or a hybrid approach.

Pacejka's MF models dynamic friction. When you're stopped you need a static friction model. This doesn't make the formula any less useful for behaviour at speed. Many tyre models work solely from slip inputs (as the main factors).

As empirical models go it is very good at reproducing tyre curves when a program can fit coefficients to real data. So to model one tyre accurately it works well. As a generic solution to model different tyre types it is quite poor, and you're perhaps better off with a more physically based model, that will lack some of the subtle details that Pacejka's MF can support, but gives a better overall match for multiple tyres.
Quote from AndRand :(I attach a sketch to show that area - the plane shows force combined, a vector Fx+Fy, on the top-right wall you can see the force y vs. slip angle, the top-left wall is force x vs. slip ratio + these are not real data, just the sketch to imagine relations between vector components ).

oh nows, this diagram shows in one half of the quarter Fx in function of SlipRatio and SlipAngle and in other half Fy in function of SA and SR. Frankly speaking there should be 2 such diagrams connected in result giving one plane with F combined, but in terms of simulations those 2 would be needed more. Those could be obtained... empirically?

I'll provide them later today
#7 - JeffR
Quote from Bob Smith :Pacejka's model

I'm not an expert on this stuff. I only vaguely recall some of Todd Wasson's comments on tire models while he was working on his own tire model. I don't know how far he got. I recall a video of a wire frame model. Based on what I've read from people involved with this stuff, pacejka isn't all that great, especially when dealing with transitions back and forth between static and dynamic friction, something you need if the goal is to create a realistic model for a racing game. A good model is probably going to involve a large table of coefficients (the same as most other real world models, for example supersonic ballistics with tables of coefficients indexed by speed and bullet shape) and something to deal with the transition between static and dynamic friction states.

An alternative could be to assume all tires behave like an idealized bias-ply racing slick, where the dynamic friction is essentially the same as static friction (real world bias-ply racing tires come very close to this, and this "forgiving" quality makes them popular in some racing classes, examples are included here: https://www.hoosiertire.com/specrr.htm more info http://importnut.net/tiretech.htm).
Quote from JeffR :A good model is probably going to involve a large table of coefficients (the same as most other real world models, for example supersonic ballistics with tables of coefficients indexed by speed and bullet shape) and something to deal with the transition between static and dynamic friction states.

Well, I dont know how LFS engine actually works - does it calculate equations on table of coefficients or does it make a table of "raw data" for given setup and then uses them in calculations (which I dont know to what extent applicable as coefficients are also dynamically changing (pressure, load and so on))?
Quote from AndRand :Well, I dont know how LFS engine actually works - does it calculate equations on table of coefficients or does it make a table of "raw data" for given setup and then uses them in calculations (which I dont know to what extent applicable as coefficients are also dynamically changing (pressure, load and so on))?

As far as I'm aware, the current LFS model is purely mathematical. No tables, just equations.
Quote from Degats :As far as I'm aware, the current LFS model is purely mathematical. No tables, just equations.

But I think there is nothing wrong with data table when they are not changing dynamically on some coefficients - simply because it goes like that: you take empirical data, then create equations that represent those data (usually with reference to coefficients known from theory of given area) and then when you need them in some calculations you first calculate those coefficients, then use them in next equations. So... if it is more efficient to get raw data (or "raw data") from table and then use them in calculations... then why not?

I mentioned about diagrams with longitunal and lateral components in function of slip ratio and slip angle.
This is how I think they would look like - I zeroed negative values from vector difference, combined is vectro sum of these two... and they look awkward. Honestly I wonder if this really look like that? (this just EXAMPLE to visualize the planes - no real data)
Attached images
Pacejka Fx.JPG
Pacejka Fy.JPG
Pacejka combined.JPG
Quote from AndRand :But I think there is nothing wrong with data table when they are not changing dynamically on some coefficients - simply because it goes like that: you take empirical data, then create equations that represent those data (usually with reference to coefficients known from theory of given area) and then when you need them in some calculations you first calculate those. So... if it is more efficient to get raw data (or "raw data") from table and then calculate them... why not?

I mentioned about diagrams with longitunal and lateral components in function of slip ratio and slip angle.
This is how I think they would look like - I zeroed negative values from vector difference, combined is vectro sum of these two... and they look awkward. Honestly I wonder if this really look like that? (this just EXAMPLE to visualize the planes - no real data)

Those are bizarre curves. Nothing like reality. Not sure what you did there, but at least the colors are pretty

Saw your post with the pic of that green buggy type thing you built. Impressive
Quote from jtw62074 :Those are bizarre curves. Nothing like reality. Not sure what you did there, but at least the colors are pretty

thats why I wrote "awkward" - I know I should see grip ellipse but...
I assumed that if the F vector is vector sum of Fx and Fy then knowing Fx (for Fy0, slip angle = 0) and Fy (for Fy0, slip ratio = 0) I should obtain grip circle plane (saddle type of plane with maximum on part of ellipse from Fxmax to Fymax and steeping down to zero) by diminishing vector component by the other component, right? But I didnt.

I deliberately didnt use coefficient equations from Pacejka model - first, I just needed 2 characteristics, second - I didnt want to deal with problem of proper calculation there As I see in that model measurements were made for Fx (for fy=0) and Fy (for fx=0). I couldnt get empirical data for both slip ratio and slip angle changing.

Honestly, I posted for some hint what I pressumed wrong.
#13 - Juls
Is it possible to "sense" a patch approaching? If yes, then since few days I "sense" it.
So if I am right I can start a new career, and if I am wrong nobody will remember anyway.

This curves are....surprising. After 30% longitudinal slip your tyre suddently regain some grip.
AndRand - If you wanted something really simple just to turn a friction square (i.e. no force combining) into a friction ellipse, why not just check if the combined forces would put you outside the friction ellipse, and if so, clamp to the edge of the friciton ellipse, keeping the direction of the force vector but limiting the magnitude. That's what I used for my first ever combination slip model and it works well enough to drive on and not feel like a spaceship (although it's not realistic and doesn't handle locked wheels, etc).
Pacejka is a clever guy though, his model can ... model .. lat, long and combined slip and isn't a well known model for nothing.. But the output is only as good as the tire measurment that went before it.. And the curve fitting that people do trying to match the dozens of parameters to the raw test data.

Since it has little physical nature, you can go all nuts with the values and the curves will look very odd indeed. Plus rarely are tires measured beyond 10 degrees slip angle, and curve fitted only for this range, and its not unusual for the friction coefficient to go near 0 at higher slip angles.

You would have to tweak and adjust pacejka coefficients often to make them look believable at high slip angles and ratios, which is a little weird anyway and for simulation doesn't make much sense. Also, often, effects are linear, such as camber, where running 89 degrees camber makes the friction coefficient uber high. This is probably also due to incomplete test data, or even the magic formula not catering for extremes.
Quote from Bob Smith :AndRand - If you wanted something really simple just to turn a friction square (i.e. no force combining) into a friction ellipse, why not just check if the combined forces would put you outside the friction ellipse, and if so, clamp to the edge of the friciton ellipse, keeping the direction of the force vector but limiting the magnitude. That's what I used for my first ever combination slip model and it works well enough to drive on and not feel like a spaceship (although it's not realistic and doesn't handle locked wheels, etc).

This is the easier method, as proposed here (racer.nl):
Quote :The Fx and Fy formulae are really only applicable when there is only 1 of them; so Fx is valid if Fy=0, and Fy is valid if Fx=0. If both longitudinal and lateral forces are applied, things are different. A tire can only generate so much total force. This is where the term 'friction circle' comes from: when combining Fx and Fy, you'll never get an added result (as Pythagoras, sqrt(Fx^2+Fy^2)) that goes beyond a maximum radius. This radius is the maximum total force that the tire can generate.

Actually, the friction circle really looks more like an ellipse, and for most tires adding just a little lateral force generates more total force than just the maximum longitudinal force (Fx) alone.

A simple method to combine Fx and Fy (when both are non-zero) is an elliptical approach:

Calculate Fx and Fy separately (as usual)
Cut down Fy so that the vector (Fx,Fy) doesn't exceed the maximum magnitude:
Fy=Fy0*sqrt(1-(Fx/Fx0)^2)
Where:
- Fy is the resulting combined slip lateral force
- Fy0 is the lateral force as calculated using the normal Fy formula
- Fx is the longitudinal force as calculated using the normal Fx formula
- Fx0 is the MAXIMUM longitudinal force possible (calculated as D+Sv in the Pacejka Fx formula).
This method favors longitudinal forces over lateral ones (cuts down the lateral force and leaves Fx intact).

I modified this method using not only the Fx maximum but also Fy maximum.

Second method is "magic Pacejka formula" which considers so many coefficients that you cant have reliable data without relevant empirical data. But, all the work to determine the equations to represent those data is made, now it is only getting coefficients right
Quote :Fx = Fx0 * Gxa(a,k,Fz)
Where Fx is the longitudinal force, Fx0 is the original Pacejka Fx formula described above, Gxa is a weighting function. We move on:

Fx = Dxa*cos [ Cxa * arctan{ Bxa * ( a + SHxa ) } ]
with coefficients:

Bxa = r_Bx1 * cos [ arctan ( r_Bx2*k ) ] * lamba_xa
Cxa = r_Cx1
Dxa = Fx0 / cos [ Cxa * arctan ( Bxa * Shxa ) ]
SHxa = r_Hx1
and the weighting function is defined as:

Gxa = cos [ Cxa * arctan { Bxa * (a + SHxa ) } ] / cos [ Cxa * arctan ( Bxa * Shxa ) } ]
Notice that Shxa and SHxa are 2 different variables. The parameters for combined slip are:

rBx1, rBx2; stiffness factor B
rCx1; shape factor C
rHx1; horizontal shift H

I'm familiar with both methods. That document from racer describes the exact same method I was describing, albeit with a very slightly different approach. You'd never want to use it in a game though, it's only a proof of concept. I should probably graph it up and see how it compares to Pacejka's model with good data.

Niels - you are correct, camber in particular is pants in Pacejka's MF, for sim use. In his books he even recommends curtailing high values, but the method he suggests (sine of camber angle) only has effect at very high angles, by which point most data sets have gone nuts. On the plus side, the main part of the camber function of Pacejka's should be simple enough to rewrite for a different curve. And load sensitivity can be reworked to tie in to contact patch area, so pressures instantly start working (somewhat) just from making pressure affect vertical stiffness. It's still a good base to start playing from, I think, and with sensible controls and limits, a better start than just using a lookup table where there is no sanity checking.
Quote from AndRand :This is the easier method, as proposed here (racer.nl):

I modified this method using not only the Fx maximum but also Fy maximum.

Second method is "magic Pacejka formula" which considers so many coefficients that you cant have reliable data without relevant empirical data. But, all the work to determine the equations to represent those data is made, now it is only getting coefficients right

I get tickled whenever somebody posts one of Ruud's writings from the Racer site. It took a fair bit of arm twisting from me to get Ruud to use Pacejka in the first place back in 2000 or so. If you'll go through Rec.Autos.Simulators at groups.google.com searching for our names around 2000-2004 or so you'll find plenty of detailed discussions on all sorts of things sim development related, including plenty of info where Doug Milliken and quite a few commercial sim developers at that time would pop in and give input.

Ruud saved a lot of those postings at the Racer web site so you might want to check those out. I think there's a fair bit of discussion about combined slip and tire modelling there. I haven't looked in years though so my memory might be playing a trick on me.

Anyway, combined slip is really critical to get right. The first mistake I made was to not treat the lateral and longitudinal force curves as two separate things that influence each other. I started out calculating lateral force from slip angle, then longitudinal from slip ratio, and using them together as a vector sum. Probably something like you're trying to do, maybe? I did that for upwards of four years probably without knowing any better, but just knew something wasn't right...

If you do that (treating it as a sort of friction square with trimming to the limit as Bob suggested) it'll drive fairly well, but you'll get the all too familiar snap spin type of behavior on throttle seen in quite a few sims over the past decade or so, among other problems. However, it's not a bad start at all if you're writing your own tire model and sim. You'll get the effect of the tail sliding out when you hit the throttle, for instance, although it'll feel like it's on a knife edge and overly snappy compared to using other methods.

There were several of us at r.a.s. way back when having a lot of discussions about how to handle even the trimming part. One method I proposed was to let the longitudinal force go to whatever it wanted to go to (as long as it was inside the friction circle), then limit the lateral force to keep you right at the limit, which would change the direction of the force vector. Don't do this though unless you're curious what it's like. It feels awful and makes the car really hard to control (not realistic at all). The other way was to do the "friction square and trim the force vector to the limit" which works a lot better even though that isn't physically correct either. I'm pretty sure most sims worked that way until fairly recently though. Two developers back in those days said that's how they were doing it. No wonder they were "realistic sims" but still too hard to drive at the limit

In reality, adding traction/braking force has a huge impact on the effective cornering stiffness of the tire and the resulting force vector needs to be pointing in the correct direction for high slip conditions. Once this dawned on me and I tried it with a new type of model, every car was transformed into something much better by leaps and bounds. It finally felt right. (Pacejka's Magic Model could probably be made to do this too without too much trouble.) There are more comprehensive versions of Pacejka's Magic Model that do this by effectively changing the parameters depending on both slip ratio and slip angle at the same time. For engineering work where you may have combined tire test data this is as good as you need, but for most of us sim folks you wind up chasing your tail trying to tune things. I'd advise anyone going with a Pacejka Magic Model to make sure they've got a "full version" that deals with combined slip in this way.

Anyway, looking at your graphs I suspect perhaps there's just a math error somewhere. I can't think of a reason why when taking that approach the result would look like that.

The plots are pretty though. What did you use for that? Mathematica?
Absolutely.. I've gotten to the stage where I can complain (and back it up a little bit) why things are wrong, but creating a proper model? Pffff no idea!

Definitely respect to the physics programmers who do their best to figure this out. Its just so easy for the rest to sit on the fence and point fingers while shouting 'booh!'
Quote from jtw62074 :
In reality, adding traction/braking force has a huge impact on the effective cornering stiffness of the tire and the resulting force vector needs to be pointing in the correct direction for high slip conditions.

Direction (and heading ) come from x and y components

Quote from jtw62074 :There are more comprehensive versions of Pacejka's Magic Model that do this by effectively changing the parameters depending on both slip ratio and slip angle at the same time. For engineering work where you may have combined tire test data this is as good as you need, but for most of us sim folks you wind up chasing your tail trying to tune things.

I would imagine that this is the best referrence apart the feeeling - to get some raw data from scietific surveys (they are open in univerities' libraries - I just checked here, in Poland, several papers on tires) for both slip angle and slip ratio changing.
#21 - Juls
Pacejka is great to develop a model faster. But now it is quite old. I mean there are plenty of models using other approach (for example focusing on the tyre contact patch shape and pression repartition) modern computers can crush far enough numbers to use such models.

Parameters for such models are more meaningful than in Pacejka, and they model transients quite well. And from the way they work Fx and Fy are already take each other into account.

Good comprehensive thesis:
http://www.control.lth.se/documents/2007/jsvenPDH.pdf
In my opinion, making a significant improvement over the current tire physics mode in LFS will end up going beyond what an individual can accomplish, without access to good documentation of the internals of newer physics models, in addition to sorting out which of the newer models will work well in a racing game environment. What I don't know is if access to such models exists.
Jeffr: I think Scawen IS actualy able to make it but he is probably in the "burned out" stage which is known for low human performance. I know it very well (im a hobbyist game developer myself) and it is even worse when you see dozens of people complaining every day.

Everything is possible when you have enough time.
Quote from JeffR :In my opinion, making a significant improvement over the current tire physics mode in LFS will end up going beyond what an individual can accomplish, without access to good documentation of the internals of newer physics models, in addition to sorting out which of the newer models will work well in a racing game environment. What I don't know is if access to such models exists.

Quote from Bigbob1993 :Jeffr: I think Scawen IS actualy able to make it but he is probably in the "burned out" stage which is known for low human performance. I know it very well (im a hobbyist game developer myself) and it is even worse when you see dozens of people complaining every day.

Everything is possible when you have enough time.

@BigBob - bear in mind JeffR hasn't got a clue what he's talking about. He just invents wild stories about how a team of 1000 is needed to add textures to cars, and believes himself. He fails to realise it is simply a man-hours thing.

He's also under the impression, it seems, that Scawen uses a preexisting model for his physics, which is also entirely pluck out of his arse.
Tristan, serious pants off NOW. Rather start to plan how you are going to survice the beer brawl in the kart meeting

I must admit, there are some interesting discussion about the tyre physics and modells, but I think most of the information given here is basically things taken out of the blue (as Tristan tells) or shamelessly copy-pasted.

Could be interesting with a propper physics disucssion thread, if it somewhat managed to stay on topic and with confirmed information. Oh, and btw - I have no clue what so ever so I don't claim to know anything

Can't belive how long this have whent on actually, this seems to be _THE_ LFS discussion thread, where you can discuss anything that comes to your mind. Not that I care, but strange how this is not locket yet
(Alltho I understand they want to keep the spam in one topic, instead of spreading it out on the forum).

FGED GREDG RDFGDR GSFDG