1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A spool differential as "active differential" help needed.

Discussion in 'Racer Physics and Technical' started by smr597, Mar 14, 2013.

  1. So my idea is to create a fully spool/welded differential through a script (mostly at learning purpose).
    Right now in the racer docs we have this code:
    * Viscous Differential
    #include "racer.oxs"
    float OnDifferential(int diffIndex)
      const float coeff=2000.0;
      float v1,v2;
      float torque;
      // Velocities of the wheels (rad/s)
      // Push towards equal velocities
      return torque;
    This differential uses speed difference to apply a torque coeficient, good for some balance between the powered wheels. But you cant actually get a fully locked (spool/welded) differential with this method.

    Now from my learning I understand that angular velocity and torque are a totally different characters in this case and are not related as I thought at first.
    Previously I thought that when both wheels have the same torque, they spinn equally but I was wrong.
    I learned that only a open differential has torque equal on both wheels and tottally different angular velocity's on each wheel.

    So in my theory a spool/welded differential will have equal angular velocity's and different torques on the wheels.
    So here comes my equation how I think a spool differential would look in code:

    // ratio of velocity difference
    float velocityRatio=0.5f;
    // Velocities of the wheels (rad/s)
    if ( velocityRatio>0.5f) 
        velocityRatio = (leftSpeed/rightSpeed)/2;
        velocityRatio = (rightSpeed/leftSpeed)/2;
    and my input to the wheels should ideally be like this:
    // torqueInput is suposed to be the final torque ((tEngine)*gearRatio*finalDriveRatio)
    leftTorque=(torqueInput * (1-velociotyRatio)) ;
    rightTorque=(torqueInput * velociotyRatio) ;
    //instead of
    //leftTorque=(torqueInput * 0.5f) ;
    //rightTorque=(torqueInput * 0.5f) ;
    As you can see my idea is to transfer torque from one side to the other via speed difference ratio.
    My question is, is this the right approach?
    Or does anyone have a better idea?
  2. Hmmm...

    Seems very complicated to make sure speeds and torques remain equal.

    Can't you just use the limited slip differential and put a big pre-load on it before it allows differential speeds?

    In theory if your engine makes say 500Nm peak and 1st gear is 4:1 and final drive is 3:1, then 1st gear torque is about 6000N, so having a pre-load of 6000N or more should mean no possibility of having the diff operate un-locked.


  3. If you want a spool differential in Racer, differentials.diff0.type=4 provides this functionality already. If you're using this as an example to try out some scripting/coding, then I'm wondering how you plan to set the "wheel torque" that you calculate above. As far as I know, we have no access to torque output per wheel on a 2WD vehicle, only partially through the AWD hack/powergearing.