Vehicle dynamics

Vehicle physics, suspension, tires etc

Vehicle dynamics

Postby fhauer3 » Wed Aug 14, 2013 7:53 pm

Hi,
I am using X-Motor to try some control algorithms for aggressive autonomous driving and I have a couple questions:
- are the equations of the dynamics model available somewhere ? I am mostly interested in how you determine the acceleration of the center of mass given the state of the vehicle
- what is the difference between G-force and acceleration in the InGameDataSDK structure?
- is the InGameDataSDK structure in shared memory updated at each iteration of the simulation?
Thank you,
Florian
fhauer3
 
Posts: 1
Joined: Wed Aug 14, 2013 7:41 pm

Re: Vehicle dynamics

Postby Eugene Cojocar » Thu Aug 15, 2013 4:49 am

Hi Florian,

The acceleration of the center of mass is calculated by dividing the change in velocity (car's coordinates) by the time interval.
The G-force diagram is quite the same except for the .lateral_g_force component which is calculated as a centripetal acceleration.
The .car_accel_x is calculated by dividing the change in velocity (lateral coordinate) by the time interval and tends to 0 at a stable turn.

Yes, the InGameDataSDK structure is updated at each iteration.
XMR Developer
User avatar
Eugene Cojocar
 
Posts: 937
Joined: Thu Oct 18, 2012 2:49 pm

Re: Vehicle dynamics

Postby Chronus » Mon Jun 09, 2014 12:25 pm

Eugene,

been meaning to ask you if there is a way to plugin our own inertia figures. Due to my work since late 2010, I have been given access to extensive data (engineering data from cars used by the teams, but also proprietary data concerning tires, aerodynamics implements - a lot of info and data released under NDA), and have done thousands of hours of calculations on various aspects of cars and tires. Inertias included in this.

It would be great to plug in the inertia figures myself, instead of letting the editor do all the work.
Chronus
 
Posts: 18
Joined: Fri May 09, 2014 1:38 pm

Re: Vehicle dynamics

Postby Eugene Cojocar » Tue Jun 10, 2014 4:00 am

Chronus wrote:Eugene,

been meaning to ask you if there is a way to plugin our own inertia figures. Due to my work since late 2010, I have been given access to extensive data (engineering data from cars used by the teams, but also proprietary data concerning tires, aerodynamics implements - a lot of info and data released under NDA), and have done thousands of hours of calculations on various aspects of cars and tires. Inertias included in this.

It would be great to plug in the inertia figures myself, instead of letting the editor do all the work.


Do you mean moment of inertia?
If yes, then you can change it for the body and wheels in the Common Tab. It depends on the mass and mass distribution.
If you enter any values into the fields Mass/Sprung and/or Width, Height, Length then you can see final moment of inertia in the Mass Distribution group: Mass Moment of Inertia (Along Lateral Axis, Along Vertical Axis, Along Longit. Axis). And of course, you must feel the car at driving at once, because moment of inertia is one of the most important characteristics.
XMR Developer
User avatar
Eugene Cojocar
 
Posts: 937
Joined: Thu Oct 18, 2012 2:49 pm

Re: Vehicle dynamics

Postby Chronus » Tue Jun 10, 2014 6:28 pm

Eugene Cojocar wrote:
Do you mean moment of inertia?
If yes, then you can change it for the body and wheels in the Common Tab. It depends on the mass and mass distribution.
If you enter any values into the fields Mass/Sprung and/or Width, Height, Length then you can see final moment of inertia in the Mass Distribution group: Mass Moment of Inertia (Along Lateral Axis, Along Vertical Axis, Along Longit. Axis). And of course, you must feel the car at driving at once, because moment of inertia is one of the most important characteristics.


I know we can input mass and dimensions, which will obviously alter the MOI of wheels and the car.

No, I mean instead of working with the output from the internal calculations of the editor, input our own MOI calculations. Giving you an example:
- my calculations are rather complex and accurate, almost identical to CAD output. If I can use my calculated MOI or the MOI from CAD data, I would prefer that.
Chronus
 
Posts: 18
Joined: Fri May 09, 2014 1:38 pm

Re: Vehicle dynamics

Postby Eugene Cojocar » Wed Jun 11, 2014 5:04 am

Chronus wrote:
I know we can input mass and dimensions, which will obviously alter the MOI of wheels and the car.

No, I mean instead of working with the output from the internal calculations of the editor, input our own MOI calculations. Giving you an example:
- my calculations are rather complex and accurate, almost identical to CAD output. If I can use my calculated MOI or the MOI from CAD data, I would prefer that.


Unfortunately it's not possible in the current version. And frankly, I wouldn't like to add this feature for the same reason - limits of performance. Games must have at least 70-100 fps to enjoy gameplay. This is one of the most important restriction. From my experience with CAD software I can say they can afford to compute something as long they want. Games must do that as quickly as possible.
XMR Developer
User avatar
Eugene Cojocar
 
Posts: 937
Joined: Thu Oct 18, 2012 2:49 pm

Re: Vehicle dynamics

Postby Chronus » Wed Jun 11, 2014 9:33 am

Eugene Cojocar wrote:Unfortunately it's not possible in the current version. And frankly, I wouldn't like to add this feature for the same reason - limits of performance. Games must have at least 70-100 fps to enjoy gameplay. This is one of the most important restriction. From my experience with CAD software I can say they can afford to compute something as long they want. Games must do that as quickly as possible.


What impact on performance would that be?

It's just ONE calculation. I mentioned CAD as an example. I developed my own tool for calculating inertia, instead of relying on CAD, but I did use CAD and get data for it occasionally.

As I said, it's one calculation. As you did with all the cars you designed, I input dimensions of the car, locations for many masses (engine, gearbox, auxiliary power unit, wheels, brake disks, suspensions, chassis, even the pilot's, etc, etc), the masses for all items involved, and THAT IS IT. One calculation, done once, and you have the inertia calculated before the sim is even launched. The calculated figures become part of the physics calibration files (phs), the physics engine uses them as it uses the coefficient of friction you give tires. Zero impact on performance, obviously.

If we were talking about CFDs and aerodynamics models, I would've agreed completely with you. Not inertias.

Anyway, you gave me the answer.
Chronus
 
Posts: 18
Joined: Fri May 09, 2014 1:38 pm

Re: Vehicle dynamics

Postby Eugene Cojocar » Wed Jun 11, 2014 2:44 pm

Chronus wrote:What impact on performance would that be?

It's just ONE calculation. I mentioned CAD as an example. I developed my own tool for calculating inertia, instead of relying on CAD, but I did use CAD and get data for it occasionally.

As I said, it's one calculation. As you did with all the cars you designed, I input dimensions of the car, locations for many masses (engine, gearbox, auxiliary power unit, wheels, brake disks, suspensions, chassis, even the pilot's, etc, etc), the masses for all items involved, and THAT IS IT. One calculation, done once, and you have the inertia calculated before the sim is even launched. The calculated figures become part of the physics calibration files (phs), the physics engine uses them as it uses the coefficient of friction you give tires. Zero impact on performance, obviously.

If we were talking about CFDs and aerodynamics models, I would've agreed completely with you. Not inertias.

Anyway, you gave me the answer.


I'm a little confused. Would you like to enter your own values of moments of inertia around their axis of rotation?
In other words you have moment of inertia around x, y and z axes and would like to use it? For example you have three numbers for moment of inertia and want to use it, like 152.84 around X axis, 169.09 around Y axis and 24.25 around Z axis.

If yes, what about the mass?
Moment of inertia depends on mass and its distribution.
I can't understand how its possible to use one mass and another moment of inertia if they are related to each other. Or to be more exact, moment of inertia depends on mass.
XMR Developer
User avatar
Eugene Cojocar
 
Posts: 937
Joined: Thu Oct 18, 2012 2:49 pm

Re: Vehicle dynamics

Postby Chronus » Wed Jun 11, 2014 3:40 pm

Eugene Cojocar wrote:
I'm a little confused. Would you like to enter your own values of moments of inertia around their axis of rotation?
In other words you have moment of inertia around x, y and z axes and would like to use it? For example you have three numbers for moment of inertia and want to use it, like 152.84 around X axis, 169.09 around Y axis and 24.25 around Z axis.

If yes, what about the mass?
Moment of inertia depends on mass and its distribution.


Yes, that is what I want. Your editor calculates inertias based on the vehicle/wheels/parts dimensions and mass.

When you save the phs file, the MOI stored are those calculated by your editor.

What I am proposing and asking is that you'd allow the MOIs to be calculated elsewhere and then stored in the physics (phs) files, thus bypassing the calculations done by your editor.

Why, you may ask? Because either my tool or CAD provide extremely reliable MOI calculations and allow me to specify a lot of factors (as I stated earlier and hinted at: APUs, engine, gearbox, transmission axle, front and rear axles, seats, rollcage, wheels, suspensions, brake disks, pilot, fuel tank, undertray, etc). The results, comparing to official data, differ by less than 1% or slightly higher than that at most (usually well under 2%), even with my own tool.

I can't understand how its possible to use one mass and another moment of inertia if they are related to each other. Or to be more exact, moment of inertia depends on mass.


There is some confusion indeed, as I never said that I would use "one mass" and "another moment of inertia". MOIs depend on mass and distribution (hence the importance of object dimensions and of knowing the location of the major - and minor - masses in a car). We must calculate each objects MOIs in regards to its own COG, and using the Parallel Axis Theorem, calculate the MOIs of those objects in regards to the COG of the whole vehicle.

As I have been saying for years, MOIs, together with tires and suspension design, the most important aspect of vehicle dynamics, and one often overlooked in regards to overall vehicle behaviour.

I use my own MOI calculations whenever a sim allows me to.
Chronus
 
Posts: 18
Joined: Fri May 09, 2014 1:38 pm

Re: Vehicle dynamics

Postby Eugene Cojocar » Thu Jun 12, 2014 12:12 pm

Chronus wrote:Yes, that is what I want. Your editor calculates inertias based on the vehicle/wheels/parts dimensions and mass.

When you save the phs file, the MOI stored are those calculated by your editor.

What I am proposing and asking is that you'd allow the MOIs to be calculated elsewhere and then stored in the physics (phs) files, thus bypassing the calculations done by your editor.

Why, you may ask? Because either my tool or CAD provide extremely reliable MOI calculations and allow me to specify a lot of factors (as I stated earlier and hinted at: APUs, engine, gearbox, transmission axle, front and rear axles, seats, rollcage, wheels, suspensions, brake disks, pilot, fuel tank, undertray, etc). The results, comparing to official data, differ by less than 1% or slightly higher than that at most (usually well under 2%), even with my own tool.

There is some confusion indeed, as I never said that I would use "one mass" and "another moment of inertia". MOIs depend on mass and distribution (hence the importance of object dimensions and of knowing the location of the major - and minor - masses in a car). We must calculate each objects MOIs in regards to its own COG, and using the Parallel Axis Theorem, calculate the MOIs of those objects in regards to the COG of the whole vehicle.

As I have been saying for years, MOIs, together with tires and suspension design, the most important aspect of vehicle dynamics, and one often overlooked in regards to overall vehicle behaviour.

I use my own MOI calculations whenever a sim allows me to.


Let me think about this feature. If I'm able to add it quickly I will do that.
At least I understand you very well now.
As an alternative I can add a solver of mass distribution to get your moments of inertia.
I will consider this feature in the code and its implementation when I work on the aerodynamics model .
XMR Developer
User avatar
Eugene Cojocar
 
Posts: 937
Joined: Thu Oct 18, 2012 2:49 pm

Next

Return to Physics

Who is online

Users browsing this forum: No registered users and 0 guests

cron