10-20-2009, 08:08 AM,
|
|
flo
Junior Member
|
Posts: 15
Threads: 4
Joined: Apr 2008
|
|
mathematical model of vdrift cars
Hey everyone,
I'm interested in the mathematical model of the cars of VDrift. That means i.e. how is the engines torque, the braking force, etc. calculated out of the actual velocity, controls and car parameters.
Can I find a (complete) math. model anywhere or do I have to go to the whole code?
Thanks,
flo
|
|
11-27-2009, 11:05 AM,
|
|
flo
Junior Member
|
Posts: 15
Threads: 4
Joined: Apr 2008
|
|
Okay, I'm trying to create a nice diagram to get an overview about the car model and also a description of equations with example parameters of two cars, to get an idea about the functionality in detail.
Can you tell me, how the crankshaft speed is calculated, which means the engines angular velocity?
And why does the added clutch torque to the crankshaft torque, has to be negative?
|
|
12-20-2009, 08:31 PM,
|
|
flo
Junior Member
|
Posts: 15
Threads: 4
Joined: Apr 2008
|
|
I do know understand, that the clutch torque is an opposite torque and I imagine it as a drag torque, depending on the difference of crankshaft and clutch.
But if the clutch torque gets bigger than the crankshaft torque or lets say we have no crankshaft torque at all (throttle = 0), the torque is set to -max. clutch torque and hence car accelerates anyway ( because of two negative signs ).
Are there any mistakes in my thoughts or do I just don't get the physics behind that effect?!?
|
|
12-22-2009, 11:32 AM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
Here's how everything is connected together:
engine --- crankshaft --- clutch --- transmission --- driveshaft --- wheels
The engine is simulated as a rotating body with inertia and the wheels are simulated as rotating bodies with inertia. The crankshaft is always spinning at the same speed as the engine, and the driveshaft is always spinning at the same speed as the wheels. Let's also assume that the transmission is in a forward gear that has a 1:1 ratio, so we can ignore it.
Quote:But if the clutch torque gets bigger than the crankshaft torque or lets say we have no crankshaft torque at all (throttle = 0), the torque is set to -max. clutch torque and hence car accelerates anyway ( because of two negative signs ).
Correct me if I misunderstand your statement, but you're saying that the engine is at idle but the wheels are rotating like the car is moving backward, right? Let's assume that we had the clutch disengaged and then we rapidly engage it. In that case, the torque at the crankshaft from the engine is zero, the torque at the driveshaft from the wheels is negative, so the clutch causes the wheels to get positive torque and the engine to get negative torque, which pushes the car forward a little and slows the engine (probably killing the engine). This makes sense if you think about it.
|
|
12-22-2009, 01:55 PM,
|
|
flo
Junior Member
|
Posts: 15
Threads: 4
Joined: Apr 2008
|
|
No, that was not what I meant.
If you look at the equation in clutch.GetTorque (in carclutch.h):
new_speed_diff = engine_speed - drive_speed
There is on the one hand the engine speed, calculated from modified euler method in rotatinalframe and on the other hand the driveshaft speed computed "backwards" from the wheel speed over transmission to the clutch. The difference is multiplied with the maximum force at the clutch, which leads to a friction force. But this result is only active if new_speed_diff is between (-1, 1), elsewise the friction force is set to (-max_force) respectively (max_force). So if the current drive_speed is bigger than the engine_speed+1(both forward speed), you get in return -max_force, which in turn is getting positive because of the minus at the total torque.
total_torque = combustion_torque + friction_torque - (-max_force)
(with max_force from clutch)
What I meant in the last post was, you are driving with forward speed, but without use of the throttle at the moment you get something like this.
total_torque = 0 + (-small_friction_value) - (-max_force)
And the engine would accelerate because of the high torque from the clutch, without any use of the throttle.
So in my opinion, the clutch.GetTorque function only make sense, if new_speed_diff is really small and engine_speed is bigger than drive_speed, than you can see it additionally friction force.
I hope I made my problem more obvious this time :-p
|
|
12-23-2009, 11:40 AM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
flo Wrote:new_speed_diff = engine_speed - drive_speed
There is on the one hand the engine speed, calculated from modified euler method in rotatinalframe and on the other hand the driveshaft speed computed "backwards" from the wheel speed over transmission to the clutch. The difference is multiplied with the maximum force at the clutch, which leads to a friction force. But this result is only active if new_speed_diff is between (-1, 1), elsewise the friction force is set to (-max_force) respectively (max_force). So if the current drive_speed is bigger than the engine_speed+1(both forward speed), you get in return -max_force, which in turn is getting positive because of the minus at the total torque.
total_torque = combustion_torque + friction_torque - (-max_force)
(with max_force from clutch)
What I meant in the last post was, you are driving with forward speed, but without use of the throttle at the moment you get something like this.
total_torque = 0 + (-small_friction_value) - (-max_force)
Yes, this is all correct.
Quote:And the engine would accelerate because of the high torque from the clutch, without any use of the throttle.
Yep! That's right. That's how it's supposed to be. If the wheels are moving faster than the engine, the clutch friction will cause the engine to speed up. This happens every time you downshift.
Quote:the clutch.GetTorque function only make sense, if new_speed_diff is really small and engine_speed is bigger than drive_speed
No, I disagree. I think the crucial idea you're missing is that the friction from the clutch is relative. Any time one side of the clutch is spinning faster than the other side, you'll get friction. Depending on which side is spinning faster determines the sign of the friction. If the engine speed is faster than the driveshaft, the clutch friction will generate torque to slow the engine and speed up the wheels. If the engine speed is slower than the driveshaft, the clutch friction will generate torque to speed up the engine and slow the wheels.
|
|
12-30-2009, 08:31 AM,
|
|
flo
Junior Member
|
Posts: 15
Threads: 4
Joined: Apr 2008
|
|
Okay I got it!
Another question:
What does the friction_factor in the Pacejka formula do (cartire.h)?
I didn't find it neither in Beckman's paper, nor in Gentas book - so where do you have it from?
|
|
12-31-2009, 03:45 PM,
|
|
portets
Member
|
Posts: 152
Threads: 12
Joined: Apr 2009
|
|
joevenzon Wrote:It's a simple multiplier that gets set depending on what surface the car is driving on. A grass track surface could be set to 0.5 times friction, for example, which would cause the tire to only generate half the usual forces. It's not a very good way to model real off-road driving but it works well enough for when a car goes off the track accidentally.
does this mean that the code will need a little reworking to allow realistic off-road rally type events?
by realistic i mean gran turismo 1 or 2's rally realism. which isn't too realistic, but works
|
|
|