rec.autos.simulators

My sim: differentials

Stefano Casil

My sim: differentials

by Stefano Casil » Sat, 17 Aug 2002 17:23:40



> > > For an open diff:
> > >  torque 1 = torque 2 = input torque / 2

> > This is only true for torque coming from the engine of course.

> Surely it's true at all times, unless you're being *really*
> excessive and modelling the inertia of the *diff*... ;-)

Which of course I do.. but that just adds confusion to this
discussion... With no inertia my newtwork system will fail
immediatly...

Stefano Casillo
www.drivingitalia.com/netkar

Ruud van Ga

My sim: differentials

by Ruud van Ga » Sat, 17 Aug 2002 20:25:59

On Thu, 15 Aug 2002 21:14:55 +0100, "Jonny Hodgson"



>> > For an open diff:
>> >  torque 1 = torque 2 = input torque / 2

>> This is only true for torque coming from the engine of course.

>Surely it's true at all times, unless you're being *really*
>excessive and modelling the inertia of the *diff*... ;-)

At the end, you get torques on every component, so you ultimately will
have to get a full inertia sum of all involved (connected) components.
So adding in the diff inertia is easy in that case, if not natural. :)

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Sat, 17 Aug 2002 20:42:02



...

They should market a thing like that. Have been searching for small
models like that for some time. :)

...

Let me see if I get this: suppose T_engine=300, T_w1_rr=100Nm,
T_w2_rr=30 (where rr=road reaction).
Then T_w1=T_w2=T_engine/2 = 300/2 = 150Nm (engine torque to wheels).

The engine reaction torque (coming back from the wheels) is
max(T_w1_rr,T_w2_rr) = 30N. So the engine accelerates with
T_engine_net=T_engine-T_engine_reaction=300-30=270Nm?

For the wheels, how is the (100-70) Nm transferred then? Is it:
T_w1_net=T_w1-T_w1_rr = 150Nm - 100Nm = 50Nm?
T_w2_net=T_w2-T_w2_rr+T_transfer = 150Nm - 30Nm + 70Nm = 190 Nm?

It seems like a nice basis. I have a system solving formula, but that
does take into account braking. The problem with brakes is that they
will only supply so much torque to keep their side from moving.
So just adding braking torque into the road reaction torque isn't
really right. On the other hand, Gregor Veble once suggested a system
where you'd make the braking torque a bit like relaxation lengths in
SAE950311; so the braking torque quickly comes up to its maximum value
to keep the axle from rotating (as long the brake torque can go up to
its maximum, determined by the brake discs and pedal setting).

Sorry for redoing a thing like this above, but in this example you get
a 0 on one end so that simplifies some calculations.

Get a bit of error around that btw. if(fabs(...)>EPSILON))error;

And why wasn't your sim on my links list yet? Looks very good. :)

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Sat, 17 Aug 2002 20:43:39

On Wed, 14 Aug 2002 20:30:36 +0100, "Jonny Hodgson"



>> So w1 received 100 from the engine and 100 from the road. so basically
>> stays there... w2 got 100 from the engine plus 100 from w1 and it's
>> spinning like a crazy...

>Careful here.  If we're talking about an open diff, remember what
>you wrote above: the output torques *must be equal*.  In the "wheel
>on ice" example, since wheel 2 cannot sustain any reaction torque
>(other than by inertia as it accelerates), the steady state torque
>on wheel 1 is *also* zero and the car does not move!

Steady state yes, but still 0 because of the sum of torques adding up
to 0. There's still going 100Nm of torque to that end, it's just that
the ground can counter all of that. Put your hand under that wheel and
you should be able to feel it. (Kids, don't do this at home!) ;-)

Why is this last inequality needed? Why can't the output torque
difference not do what it likes?

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Sat, 17 Aug 2002 20:49:52

On Wed, 14 Aug 2002 13:10:21 +0000 (UTC), "Alex Smith"


>> Inertia is used to calculate acceleration, not torque ratios.

>Not sure I follow exactly. So I am not using torque to find the engine
>acceleration?

You are. It's all torque, inertia, acceleration. 2 main formulae
dealing with torque: T=F*r to convert force into torque (and back),
and second, T=I*w, where I=inertia (for spinning objects, just a
scalar with rotational inertia around the spin axis), and w=angular
acceleration (so v=v+w*dt in your timestep).

Depends on how gear A and B are connected. :)
If you have:

E---A---W  (engine, gear A, wheel)

If T_e=100Nm, A's ratio is 2:1, then T_w=100*2=200Nm. BUT ofcourse it
rotates twice as slow. See the system as ONE. Sum the effective
inertia of E and W and A, and take the total net torque (on either E's
or W's side) and divide by the total EFFECTIVE inertia to get the
acceleration.

Depending on which side you took the torque from, you can calculate
the velocities by also taking into the gearing (!). Otherwise the
velocity of EA will not be 2*velocity(AW).

For the effective inertia, please take a look at my site,
Documents-><somewhere>. There's a description of summing inertia for
geared components. It's not just Ie+Ia+Iw, but involves squares.
There's a reasoning with energy behind it to prove the theory. Its
base though was from Gillespie's book 'Fundamentals of Vehicle
Dynamics' (very much recommended), where the squares are noted.

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Sat, 17 Aug 2002 21:54:16



...

Stefano, what do you do to add braking torques? How do you clip the
maximum brake torque when one of the axles stops moving?

I have the feeling even with your system it becomes quite complex with
braking when you have 4WD, i.e. 3 differentials, each with varying
properties (lots of 4WD differential configuration don't all have the
same type of differential, for example a viscous in the center, and
LSD's at the front/rear).

Just something I'm still thinking about... :)

If I get your system right, it would be relatively easy to do for
example a Salisbury diff (like in GPL) with drive/coast angles that
influence locking. It's just that the braking torques are somewhat of
a ***.

Ruud van Gaal
Free car sim: http://www.racesimcentral.net/
Pencil art  : http://www.racesimcentral.net/

Alex Smit

My sim: differentials

by Alex Smit » Sun, 18 Aug 2002 05:12:08

Right, I've implemented some stuff and it 'kind of' works

The two things with it at the moment are

a) It is very slow at top speeds, for example at max revs it is only going
about 15mph in top gear when previously it would go 90+
b) There is no reaction torque into the driveline from the wheels

I figure a) is because of using wrong inertia values which is making the
angularAcc too big for the engine

I have done as you have said Ruud and put in a clutch with

T_Clutch = (engSpeed - [diffSpeed * gearRatio]) * factor
where factor = (clutchAmount * maxClutchForce)

at the moment I am simply using this Torque against the engine so..

engAngularAcc -= T_Clutch/engineInertia

is this correct? Do I also need to do this to the torque into the
differential too?

Also, I have three inertia calculations;
a) I_EngineSide, The inertia of the system up to the clutch from the engine
side (so just I_engine)
b) I_Gearbox, The inertia from the clutch to the diff (I_gear *
(gearRatio^2) * I_finalDrive
c) I_Effective, The inertia for the whole thing form the engine side to the
diff, using the clutch amound

I_EngineSide + (clutchAmount * (gearRatio^2)  * I_GearboxSide)

Is this all I need? I am getting a bit confused about which inertias to use
in which calculations

For engine acceleration I am just using engAngularAcc =
T_Engine/I_EngineSide    [Just the engines inertia]
For  differential accelerationIn  I am using diffInAcc =
T_At_Differential/I_Effective [The whole gearbox]

It's slowly getting there, at least now it moves forward and because I am
using the difference in velocities of the engine speed and the gearbox speed
(based on gear ratios) the rpm now shifts down when I change up and vice
versa, which never happened before!

Jonny Hodgso

My sim: differentials

by Jonny Hodgso » Sun, 18 Aug 2002 05:52:58


No... with a truly open diff, if the right wheel has zero torque
then so does the left.  Trust me, my R/C car has enough torque
at the wheels for minispike tyres to seriously hurt your hands,
but hold one wheel still with the car in the air and punch the
throttle (you may need three hands ;-) and all that happens is
that the opposite tyre balloons - and that's with a slightly
limited-slip diff.

Because a differential inherently equalises torques; to get
a torque difference, you need some sort of LS device and this
will have a maximum torque transfer capacity in any given state.

Jonny

Doug Millike

My sim: differentials

by Doug Millike » Sun, 18 Aug 2002 23:50:37

Here is a very odd sort of limited slip diff:
  <http://homepage.mac.com/selode/lego/limited.html>
This model is a lot more "springy" than the real ones...

Google for +differential +lego ...




> ...
> >I found myself struggling for days trying to get the diff code working
> >without success.. then, one of my mate at work _built_ a real open
> >differential with meccano for me... and after 5 mins playing with it
> >in my hands I said: "right! now I know how to do it!"..

> They should market a thing like that. Have been searching for small
> models like that for some time. :)

Stefano Casil

My sim: differentials

by Stefano Casil » Mon, 19 Aug 2002 01:36:03


I just add the brake torque after the diff.. so they come back
together with the reaction torque. I had a quick read to the code and
I see a state prediction and a brake torque cap based on inertia seen
by the wheel... the code is a bit unclear.. i wrote it ages
ago...hmmmm...

yes.. think about that ;-)... 4WD isnt something coming soon in my
game.. if it's coming at all.. and.. anyway it scares me everytime...

Yes..  _VERY_ easy.. I coded it in 1 hour 2 days ago..

I'll have a deeper look at the brakes code... you never know.. it
could be a very well hidden strange behavior...

Stefano Casillo
www.drivingitalia.com/netkar

Ruud van Ga

My sim: differentials

by Ruud van Ga » Wed, 21 Aug 2002 18:01:53

On Fri, 16 Aug 2002 21:52:58 +0100, "Jonny Hodgson"



>> >Careful here.  If we're talking about an open diff, remember what
>> >you wrote above: the output torques *must be equal*.  In the "wheel
>> >on ice" example, since wheel 2 cannot sustain any reaction torque
>> >(other than by inertia as it accelerates), the steady state torque
>> >on wheel 1 is *also* zero and the car does not move!

>> Steady state yes, but still 0 because of the sum of torques adding up
>> to 0. There's still going 100Nm of torque to that end, it's just that
>> the ground can counter all of that. Put your hand under that wheel and
>> you should be able to feel it. (Kids, don't do this at home!) ;-)

>No... with a truly open diff, if the right wheel has zero torque
>then so does the left.

Not doubting your R/C car experiment, but how can that be?
If as you say the the left (grippy) wheel gets zero torque, then it
would never spin up again, even if you let go with your hand.
And how does this comply with the torque1=torque2=inputTorque/2 rule?

If the engine delivers 200Nm of torque, each side gets 100Nm, right?
So it would take at least 100Nm on one side to counter that, I'd
figure, for the 100Nm on the grippy side to be transferred to the
spinning side.
On the other hand though, that would mean that the car gets a forward
thrust of 100Nm at the grip side, hm...

But surely, if you let go of the tire in that experiment, both wheels
will start spinning again. So how much torque DOES it take then to
keep the one tire still? I'm confused and need the Lego model. ;-)

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Wed, 21 Aug 2002 18:03:06




>> Stefano, what do you do to add braking torques? How do you clip the
>> maximum brake torque when one of the axles stops moving?

>I just add the brake torque after the diff.. so they come back
>together with the reaction torque. I had a quick read to the code and
>I see a state prediction and a brake torque cap based on inertia seen
>by the wheel... the code is a bit unclear.. i wrote it ages
>ago...hmmmm...

Perhaps a brake torque cap so that the integration step won't make it
do velocity (spin) reversal?
Hm. Perhaps very difficult to predict with multiple diffs.

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Wed, 21 Aug 2002 18:04:54



Is that like:
k=cos(rampAngle)*clutches*maxTorquePerClutch+preload

where rampAngle changes depending on the incoming engine torque to
allow for drive/coast angles?

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Wed, 21 Aug 2002 18:06:49


>Here is a very odd sort of limited slip diff:
>  <http://homepage.mac.com/selode/lego/limited.html>
>This model is a lot more "springy" than the real ones...

Thanks for that, I'll have to enter the toystore pretty soon and check
out that wonderful Lego Tecnic. :-)

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/

Ruud van Ga

My sim: differentials

by Ruud van Ga » Wed, 21 Aug 2002 18:20:55

On Fri, 16 Aug 2002 20:12:08 +0000 (UTC), "Alex Smith"


>a) It is very slow at top speeds, for example at max revs it is only going
>about 15mph in top gear when previously it would go 90+
>b) There is no reaction torque into the driveline from the wheels

>I figure a) is because of using wrong inertia values which is making the
>angularAcc too big for the engine

>I have done as you have said Ruud and put in a clutch with

>T_Clutch = (engSpeed - [diffSpeed * gearRatio]) * factor
>where factor = (clutchAmount * maxClutchForce)

So how could A happen then? Debug that. ;-)
If engSpeed=maxRevs, and the car is driving 15mph, so
diffSpeed*gearRatio comes out at 15mph, surely the
(engSpeed-(diffSpeed*gearRatio)) calculation would not become 0?
In other words, if the engine rpm is high, and car speed is low,
T_Clutch will NOT be 0.

Should be easy to find where it goes wrong there.

Hm, I'd suggest summing ALL torques, and diving the summed torque over
ALL (effective) inertia. Don't do it piecewise.

In fact, I have a (bidirectional) tree of components, from engine ->
clutch -> gearbox -> diff -> wheel1 & 2. From the bottom or top you
can calculate effective inertia (by walking the tree up or down).
Every component has a gear ratio (make sure you get the direction
right), so it recursively dives into the tree, multiplying by
gearRatio^2 when it returns with the (total) child inertia. Something
like that at least. ;-) Be sure to check these things by hand or
different formula.

Combine everything. In my sim there's really 2 situations; either the
clutch is locked or not. Locking the clutch isn't strictly necessary,
but more stable.
Once locked, the entire drivetrain is one big rotating object, only
different parts rotate at different velocities because of gear ratios.
Once they go out of sync, you've got a problem. ;-) It happens because
of floating point roundoffs at least. That's why I think I just ignore
some velocities (like axle from gearbox to diff) and use the wheel
velocities to set that axle's velocity, if needed. Too much round-off
really.

I do get occasional moments where the engine speed != diffspeed (even
when the clutch is locked). Then I switch to unlocked clutch mode.
(note: every components is accelerated separately, so with all this
gearing going on, floating pt error is bound to happen).

In unlocked mode, you have 2 objects; pre-clutch (engine) and
post-clutch (gearbox, diff etc). You rotate these then independently,
with the clutch torque attempting to make the velocities equal. But
note that it can be seen as 2 bodies with their own effective inertia.
I have a separate 'ApplyAcceleration' type of function (abstract)
which then applies the acceleration to each component (depending on
gear ratio). Total acceleration = total summed torque / total
effective inertia.

Once you get velocity reversal (a very important concept which happens
everywhere in the digital carsim world), meaning the engine suddenly
is faster than the post-clutch part (or vice versa), you switch back
to locked-clutch mode.
Again, you could do without locked-clutch mode, but then you'd get the
same back & forth behavior as you do with wheel with slipratios that
keep switching from +10..-10. And even though that might seem to work,
I think the average behavior is not the same as the smooth behavior.
Like with a twitching wheel, the high SR's make for lower forces,
giving problems. Although for tires this only is a pain at low speed,
for engine-diff speeds this goes on at every RPM.

Still there seems to be a bug in that clutch torque generation.
Also make sure you have enough clutch torque; the engine braking
torque may be too high or something. Other than that, the clutch
torque should be somewhat higher than your engine's maxtorque (as
otherwise when flooring the throttle, your clutch would start to
slip).

Hope that helps,

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.