Hi Alex,
What I'm doing with netKar is using a gear network system. That could
look a bit overcomplicated (I'm sure it is), but it lets you look at
the problem in a very different way.
I got the idea of the network looking for infos about clutches and
diff while I was approaching the problem, and, "googling" around I
found several references to ADAMS and Modelica libraries for geared
components drivetrains.
So I came up with a complete modular system of geared components all
based on torques (no speed forcing anywhere)...
Now.. it'll be impossible to explain all that mess here now... but I
think it is an elegant way to go (not very optimized tough)...
Now... to the differential part...
Are you sure to understand what an open differential is doing and how
it's working? I found the information on the internet quite misleading
about diffs.. at least if u try to read those with a "programmer point
of view". You often read: "the open diff sends all the torque to the
less resistent wheel"... Now..it does.. but if u try to do that in
code, that is. sending the torque to one wheel u'll end up in
troubles...
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!"..
Try your local garage and have a go if u can with a real diff... it's
simple once u understand it.
I've tried to write a post here explaining my solution..but it was
really really messy... anyway.. I try again..
U have this situation:
E
|
_______
| |
w1 w2
E, w1 and w2 are torques from engine and the 2 wheels (from the road
reaction).
Now, E is always splitted in 2. equally.. if u see a diff it's easy to
convince yourself.. the engine can just act on the cage of the diff.
Now.. w1 and w2. You need to wait to have them both to actually decide
what to do. The "combined force" of w1 and w2 act on the cage.
Combined force for me is the fraction of the torques acting in the
same direction.
Example.. if w1=100 and w2=30.. the combined force is 30*2.. the 30
N/m of w1 is acting in the same direction of the 30 of w2. so they
combine and go to the cage..
Then u have the unbalanced torque.. the torque difference between w1
and w2.. this won't act on the cage but will be transfered to the
weaker wheel.. in our example we'll have 100-30=70N/m going from w1 to
w2...
This looks crazy I know.. let's do the "wheel on ice" example.. the
engine is sending say 200N/m of torque. .I split 50% and send it to
the wheels.. they accellerate and get the reaction from the road.. the
wheel on tarmac (say w1) will get 100 N/m of reaction force while the
wheel on ice (w2) will get 0N/m reaction...
Step 2.. the combined force is 0 so nothing is going back to the
engine. the unbalanced force is 100 that is sent right to w2 from
w1...
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...
It's very easy to get this system and add stuff like internal clutches
to make a limited slip (I just did it yesterday)..
Whatever system u do.. there's one thing u have to check ALWAYS.. the
diff cage speed MUST always be the sum of the wheel speed divided by
2.. always, no matter what kind of diff u have. In a torque based
system like mine.. speed is an output not an input... and u need to
check it always..I've been running with this in my code forever:
if (differential->speed!=(outShaftL->speed+outShaftR->speed)/2.0f)
{
printf("**** DIFF SPEED CHECK FAILED! ****\n");
exit(0);
I hope it helps... looks scary.. but it works..
ciao
Stefano Casillo
www.drivingitalia.com/netkar
> I'm attempting to get some sort of differential model into my game
> Initially I am just trying to implement a completely open one for
> simplicity.
> I have an input A and outputs B1 and B2
> I am simply applying torque to A from the gearbox
> B1 and B2 are currently A * differential Ratio
> However the difficulties start when I want some feedback from the road to
> travel
> from the wheels through the differential into the engine.
> I'm assuming the road reaction torque to be the resistive torque
> so
> torqueAtDiffB1/2 = resistiveForceWheel * radiusWheel
> torqueAtDiffA - = torqueAtDiffB1/2/drivelineInertia
> But this does not work in any way. So I must have the wrong end of the
> stick, or
> maybe not even a stick, but a twig (erm :)
> Does anyone know any decent articles for this? At the mo i'm doing it
> completely
> using my own newtonian physics knowledge, which isn't very much.