# Torque flow in car differential spider gear system

## Recommended Posts

On 4/7/2019 at 11:44 AM, bmarci said:

Equal torques mean equal acceleration, but not equal speed. Somehow you can do tricks with torques to equalize the speed, but if you had access to the angular velocity and just override them...

Oh my goodness I totally forgot this . What I have right now is based on a faulty and naive assumption that angular velocity of 2 wheels are the same initially, and forgot the case when the diff unlocks and locks again. In this case the velocity of the two wheels will be different but will remain different if I apply equal torque.

I'm thinking of doing it differently like this with locked state: I'd find the average velocity of the 2 wheels. If one wheel has different velocity than the average, I'd apply a torque that would bring that wheel velocity to the average.

Or maybe, not having a state, but a continuous locking torque: I would still find the average, still apply torque to each wheel. But now the sum of locking torque of two wheels will be capped to the maximum locking torque. So if the maximum cap is not enough then there would still be an amount of torque keeping the wheel back, but only to an extent. Still this would not work, because in the case when the total required locking torque is larger than the maximum cap. In that case I don't know how the maximum cap would be distributed.

I do have access to angular velocity though, but I'm being very stubborn here because I don't want to have a mess of angular velocity and torque and lose control of them in the system. Really sorry about this

Thank you very much for replying. I'm getting the hang of things now.

##### Share on other sites
2 hours ago, Vu Chi Thien said:

I'm thinking of doing it differently like this with locked state: I'd find the average velocity of the 2 wheels. If one wheel has different velocity than the average, I'd apply a torque that would bring that wheel velocity to the average.

This could cause a lot of headache. You cannot tell (or not easy to tell) how much torque you need to apply to reach a certain speed. As it depends on the whole tire formula and brakes...etc. You have good chances that you just overshoot, and eventually the whole simulation explodes

The best approach would be a kind of viscous diff like locking, but it'll never perfectly lock, but oscillate, and if you choose a fairly big coeff, it'll go out of control.

You don't have to make a mess with torques and angular velocities. What worked for me was, separating the update to various steps.

1. Calculate the forces and torques
2. Integrate (this is the actual advance-in-time)
3. Derive

In the first step you don't have to bother with time, only apply the formuals/equations...etc, and get forces/torques.
The integration is the actual time-update, nothing to do with physics, just "animate" with previously calculated values.
And finally calculate some "misc" values from the simulation. Here you can deal with speeds, RPMs...etc. Personally, I don't have this, I just do it at the end of the Integrate step

##### Share on other sites
Posted (edited)
On 4/9/2019 at 11:27 AM, bmarci said:

1﻿. Calculate﻿﻿ the forces and torques﻿﻿﻿﻿

I'm actually confused on what to do in this step :). Because I structure my model to have the wheel and diff and separate class, so the wheel updates its own, same with diff. The diff would give torque to wheelInput of wheel class. The wheel would only have wheelInput to work with, then update itself, then throw feedback torque  and velocity back to the diff and apply force to the rigidbody. Anything that needs to affect the wheel would have to feed a torque to wheelnput, not modifying the velocity of the wheel directly. This is why I am so stubborn, insisting on only using torque, not modifying velocity. Sorry about this

Also, I'm very confused when reading the article on limited slip diff on wikipedia. In basic principle section, there is this formula:

On 4/9/2019 at 11:27 AM, bmarci said:

1﻿. Calculate﻿﻿ the forces and torques﻿﻿﻿﻿

I'm actually confused on what to do in this step :). Because I structure my model to have the wheel and diff and separate class, so the wheel updates its own, same with diff. The diff would give torque to wheelInput of wheel class. The wheel would only have wheelInput to work with, then update itself, then throw feedback torque  and velocity back to the diff and apply force to the rigidbody. Anything that needs to affect the wheel would have to feed a torque to wheelnput, not modifying the velocity of the wheel directly. This is why I am so stubborn, insisting on only using torque, not modifying velocity. Sorry about this

Also, I'm very confused when reading the article on limited slip diff on wikipedia. In basic principle section, there is this formula:

• Trq 1 = ½ Trq in + ½ Trq d for the slower output
• Trq 2 = ½ Trq in – ½ Trq d for the faster output

The torque difference between the two axles is called Trq d .[3] (In this work it is called Trq f for torque friction[4]). Trq d is the difference in torque delivered to the left and right wheel. The magnitude of Trq d comes from the slip-limiting mechanism in the differential and may be a function of input torque (as in the case of a gear differential), or the difference in the output speeds (as in the case of a viscous differential).

What I don't get here is Trq d . It is explained above as the difference in torque delivered to left and right wheel, and it comes from the diff mechanism. Then is the diff just create a new torque into the system out of nothing? And because this Trq d  is split half half to both wheel, then how can it make sure that both wheel would then have the same velocity, just like how you addressed the problem before.?

Even worse, in the article that is quoted, here:

Trq d  is explained to be the difference in feedback torque from the wheel. So now I'm confused that where this amount of extra torque is, and where it comes from, feedback torque, engine torque (biased), or out of something else.

Again, thank you very much for replying. Thanks to you I realized so many flaws in my model in time so that I won't go too deep into quick sand

Edited by Vu Chi Thien

##### Share on other sites
On 4/12/2019 at 11:20 PM, Vu Chi Thien said:

Because I structure my model to have the wheel and diff and separate class, so the wheel updates its own, same with diff. The diff would give torque to wheelInput of wheel class. The wheel would only have wheelInput to work with, then update itself, then throw feedback torque  and velocity back to the diff and apply force to the rigidbody. Anything that needs to affect the wheel would have to feed a torque to wheelnput, not modifying the velocity of the wheel directly.

Yes, I've been trying to do the same, but I had to realize that it's not that simple sometimes. And that's why I separated the update into various steps. The physics only calculates the forces and torques and nothing more. And then I calculate the movements/rotations and CHEAT.

On 4/12/2019 at 11:20 PM, Vu Chi Thien said:

What I don't get here is Trq d . It is explained above as the difference in torque delivered to left and right wheel, and it comes from the diff mechanism. Then is the diff just create a new torque into the system out of nothing?

Not exactly out of nothing. It comes from the locking mechanism (clutch, fluid...etc) but yes, it comes from the diff and only affects the wheels, never goes back to the engine AFAIK.

On 4/12/2019 at 11:20 PM, Vu Chi Thien said:

then how can it make sure that both wheel would then have the same velocity, just like how you addressed the problem before.?

In reality they are never locked, only torques play as you would expect. The only problem is we don't have infinite small update steps, but we have floating point precision issues in return   And this is why we have to cheat sometimes.
The viscous never "locks", that's a simple case. The LSD is a bit trickier, but only because you have to mimic the locking state when the timestep is not small enough to calculate it properly.

Regarding diffs, you can go into the "deep forest", the question is whether you want to

You can get away with spool, open, viscous, and LSD, and leave the rest.
For a long time I didn't even have LSD because the viscous was so convincing

##### Share on other sites
On 3/27/2019 at 7:43 AM, Vu Chi Thien said:

What I'm curious about is that what is the extra torque that causes one wheel to rotate in opposite direction when the other is spun,﻿ in the case when the car is jacked up.

Imagine the car is jacked up, the engine is stopped and first gear engaged. When you move a wheel with your hands then you transmit a torque upwards to the engine. The engine won't move, so as result it returns a counteracting force (= negative force) downwards to the differential. Half of this force is the resistance you perceive when manually moving the wheel. The other half of this negative force goes to the other wheel, which then spins in the opposite direction.

So that "extra torque" is just the engine friction, which is a negative torque so makes the wheel rotate in opposite direction.

Here's my implementation of an open differential:

This example is a simplification as it assumes the inertia is the same in both ends (the formula used in my simulation is a bit more complex as it may handle different inertias).

##### Share on other sites

Sorry for the long silence, somehow I didn't get reply notification in my email

On 4/23/2019 at 4:01 PM, bmarci said:

In reality they are never locked, only torques play as you would expect. The only problem is we don't have infinite small update steps, but we have floating point precision issues in return﻿

So what if they are locked as in a spool? Can this Trq  still be used? Say left and right wheels are off by 10 Nm but still rotating at same speed. Since there is (sort of) no limit to the locking torque, assuming 2 wheels have same inertia, the difference in reaction torque is divided half, then subtract that amount from the faster wheel and add into the slower wheel.

On 5/21/2019 at 7:05 PM, Edy said:

So that "extra torque" is just the engine friction, which is a negative torque so makes the wheel rotate in opposite direction.﻿﻿﻿﻿﻿

So I can re-imagine it like this: The engine is not running, one drive wheel on tarmac with friction, the other on ice with no friction at all. The car rolls downhill and the engine is forced to rotate (because the car is in gear). The engine friction is divided half. One half resists the reaction torque from the tarmac (due to gravity) to the griping wheel slowing it down. The reaction torque from tarmac is equivalent to the torque from the hand rotating if the wheel was to be rotated by hand. The other half goes to the slipping wheel, and since there is no resistance, the wheel just rotate backward because negative torque. For example:

Tin = -200Nm at 1500rpm

ToutLeft = ToutRight -200 * 0.5 = -100 Nm

//Left wheel has grip

TfinalLeft = -100 + 150 = 50Nm //reaction torque is positive because it goes backward and spin the wheel forward

TfinalRight = -100 + 0 = -100Nm //no resistance, the wheel just spin backward.

On 5/21/2019 at 7:05 PM, Edy said:

This example is a simplification as it assumes the inertia is the same in both ends

So would the same formula, Lin = L1 + L2, Tout1 = Tout2 = Tin * 0.5, still the same if the inertia is different? Say a center diff that is open?

Also would you mind explaining locking percentage of vicious diff? For example 25% is weaker than 50%, and 100% is basically a spool?

And by the way, thank you guys so much. You guys are my life saver, since I have no one else to ask about these things  . Would you mind recommend some books or any medium that I should read/study to further understand vehicle mechanics?

##### Share on other sites

So basically you're making a track racing championship car game with tuning(Like Automotodróm Slovakia Ring in FIA GT championship)?

Well my suggestion is to define what kind of tuning groups are allowed, and whether to apply the helmet shading light before deciding for the actual physics/engine calculations?

##### Share on other sites

What I stated of above was just examples of some kind of preparations for the actual tuning coding.

I'll try to tell you about the code and help you solve the actual problem, but later(no offence).

##### Share on other sites
On 6/29/2019 at 4:43 AM, Acosix said:

So basically you're making a track racing championship car game with tuning(Like Automotodróm Slovakia Ring in FIA GT championship)?

Thanks for joining the discussion.

I'm making a track and off-road driving game with tuning, not just racing.

Actually, I'm making a physic system for vehicle simulation, not just a game, so I'm trying to code all the vehicle components with realistic behavior.

On 6/29/2019 at 4:43 AM, Acosix said:

define w﻿hat kind of tuning groups﻿ are allow﻿ed

I would say everything in the drivetrain: engine, clutch/torque converter, gearbox, differential, tire. Also some tweaking with body mass and inertia.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• 18
• 20
• 11
• 21
• 16