# Vu Chi Thien

Member

39

0 Neutral

• Rank
Member

• Role
Programmer
• Interests
Design
DevOps
Education
Production
Programming

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Limited Slip Differential Modelling

So it will behave like a spring until feedback torque from both side equal each other? torqueOut = torqueEngine +- t_locking0? What is the starting point for the diff to "start locking"? I thought it behaves like a clutch which when it's locked, it's locked for good?
2. ## Limited Slip Differential Modelling

Please then, thank you for the answer I can see what you mean. In the end I still need to have an if statement to check the locking state, so I think I'm gonna cheat after all How should I structure my diff class so it can directly modify wheel speed and also the speed of other diff? I'm trying not to directly reference other wheel or diff class, but instead trying to have a package that contains torque and get passed along the drivetrain
3. ## Limited Slip Differential Modelling

Thanks for the link. I haven't found this page until now. Very informative and cleared a lot of mist. Thanks However, the part on open diff: I think it refers to the first statement I stated above, where engine torque is divided evenly and feedback torque is the sum of both wheels: leftOut = rightOut = engine * 0.5f; feedbackToEngine = leftFeedback + rightFeedback; And also: Where would the extra 10 Nm go? And the case when the diff locks: then what would be the amount of diff locking torque? As in the formula: torqueOut = engineTorque * 0.5f +- diffTorque Again thank you so much. I'm really nearly there, just this locking torque thingy and I will be done, with the diff at least, the clutch still bothers me
4. ## Limited Slip Differential Modelling

You helped me a lot, I'm starting to get it now. I think the locking percentage also apply to all kind of diffs not just viscous like I mistakenly said above. I remember it being the amount of torque being transferred around over the total amount of feedback torque. In AC there are only percentage of on-power and off-power so I mistakenly assume that it's viscous diff. And so I started to get confused after understanding this: I can understand that the resistance torque of the diff is caused by the different in speeds, but I what I don't understand after reading all the writing on diffs is that: How can feedback torque from the road be transferred from one wheel to another? Let's do an example to clear things up. Let's say we have: engineTorque = 200Nm leftWheelFeedback = 100Nm (on tarmac) rightWheelFeedback = 50Nm (on dirt) The LSD has TBR of 2:1, so it is locking at the moment. The LSD first acts as an open diff, then add resistance torque: leftWheelOut = engineTorque * 0.5 + diffTorque = 200 * 0.5 + diffTorque = 100 + diffTorque rightWheelOut = engineTorque * 0.5 - diffTorque = 200 * 0.5 = 100 - diffTorque Then what is diffTorque in this case? Say another case. This time the right wheel is now on less grippy surface, so; engineTorque = 200Nm leftWheelFeedback = 100Nm (on tarmac) rightWheelFeedback = 20Nm (on dirt) The torque bias is now 5:1 so the LSD is unlocked. In this case, what will be the diffTorque? Where will the extra torque go? Again thanks a lot for helping Also there are 2 types of answer to the question of open diff, as I read on recs.auto.simulators: 1 - The torque is always split 50-50, feedback torque is total at both wheels: leftOut = rightOut = engineTorque * 0.5 totalFeedbackToEngine = leftOut + rightOut 2 - Like you said, the torque is split 50-50, but feedback torque is 2 times the less grippy wheel, and extra difference is transferred to the less grippy one: leftOut = rightOut = engineTorque * 0.5 feedBack = leftFeedback * 2 (let's say left wheel is less grippy) leftOut += rightFeedback - leftFeedBack (transfer extra difference in feedback to less grippy wheel) So which one is correct? I'm super confused about this, since both seems ok if I put them in the wheel on ice example
5. ## Limited Slip Differential Modelling

Thanks for the help. I already am writing a viscous, but forgot that I need to times 0.5 until I read your reply There is one thing I don't quite get about viscous is locking percentage, say 25% is "weaker" than 40%, and 100% is a fully locked/spool. How does locking percentage translate to math equation relating to coefficient, and into something programming wise? I thing many sims/sim-arcade still use viscous, such as Gran Turismo Sport, Forza 7 and even Assetto Corsa. But then multiple linked diff system will be a trouble, say AWD or 4WD since diffs are not necessary connected to wheels. Most of what I've read are similar to this, but the one thing in common that I don't understand is the phrase "x times the Amount of torque go transferred from slipping wheel to grippy wheel" . I dont know what kind of torque this is, the feedback/friction torque or the amount of engine torque to each wheel.
6. ## Limited Slip Differential Modelling

Hi fellow gamedevs. Currently I'm working on a vehicle simulation. My goal is to have a sim that is as realistic as possible using as simple math as possible. My model is torque transferring model, which means the components are separated and will be given torque. Each will compute the speed and transfer the reaction torque to the other. For example: The engine produce torque, that torque is multiplied through the gear, then divided in the differential, then to the wheels. The wheels compute speed and traction force, apply force to the body then send back the reaction torque all the way to the engine, end of frame. Next frame the engine will use the reaction torque to compute net torque then pass that along the pipeline, beginning a new cycle.With that model, I now have a simple open diff by simply constantly dividing the engine torque by 2 and give to the wheels equally. So leftWheelTorque = rightWheelTorque = engineTorque * 0.5f.My problem now is to figure out the exact amount of torque from limited slip diff that will go to each wheel. I'm using this formula:leftWheelTorque = engineTorque * 0.5f + diffTorque;rightWheelTorque = engineTorque * 0.5f - diffTorque; I can't find any formula to calculate the diffTorque (locking torque). Can somebody point me to what I need to do or what book/article I need to read? The stuffs I've read are just overview and not very suitable for programming. A book with a ready to use formula would be awesome.
7. ## Torque flow in car differential spider gear system

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. I would say everything in the drivetrain: engine, clutch/torque converter, gearbox, differential, tire. Also some tweaking with body mass and inertia.
8. ## Torque flow in car differential spider gear system

Sorry for the long silence, somehow I didn't get reply notification in my email So what if they are locked as in a spool? Can this Trq d 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. 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. 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?

10. ## Torque flow in car differential spider gear system

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.
11. ## Torque flow in car differential spider gear system

That's the intention of motorTorque, it means all torques that drive the wheel, backward or forward. Other torques that depend on angular velocity, i.e oppose motorTorque, but must not drive it the opposite way, I put into frictionTorque. This includes braking, rollingResistance, roadTorque. Sort of like how friction would be applied. I'm actually using this formula to implement a simple vicious diff: lockingTorque = (rightRPM - leftRPM) * lockingCoeff; //assume right wheel is slipping leftWheel.motorTorque = engineTorque * 0.5f + lockingTorque; rightWheel.motorTorque = engineTorque * 0.5f - lockingTorque; And I'm going to use this formula later on for implementing locking and other types of limited slip diff. So basically the diff is open until there is a change in wheel speed or feedback torque. This brings another question: How should I integrate engine friction and limited slip diff torque? Since they are friction torque, should I treat them similar to brake/handbrake torque? For engine friction, most (if not all) implementation I've seen just apply a constant negative torque: netTorque = combustionTorque - engineFrictionTorque. However, what would happen in low wheel speed case when the frictionTorque is so large that it causes the wheel to spin backward, just like applying a negative torque for reverse gear? Should this engineFrictionTorque be treated as brake friction Torque? Same thing with limited slip diff locking torque. I tried not to do this and instead, treat everything separately and control using only input torque. That way I don't mess up later on because both torques and velocities are used and I got confused what uses what as input :). However I can be wrong Currently my idea of implementing LSD/locking is to just use the difference in roadTorque between wheels, then distribute that torque between wheels so that the net torques of the two wheels are equal, leading to equal angular velocity. I haven't actually tested this in runtime yet, only constructed as a simple steady state formula and punching in numbers to get result for an instantaneous frame: torqueDiff = leftWheel.frictionTorque - rightWheel.frictionTorque; //assume leftwheel has more grip. //friction torque includes brake and road torque, basically all feedback torques. appliedLocking = min(torqueDiff, lsdMaxLocking); //the maximum amount of locking depends on how strong the lsd can hold. //For locked diff locking torque is infinity, so 2 wheels will always have equal velocity. //For lsd, the locking reaches a threadhold, after that 2 wheels will accelerate away from each other. lockingTorque = appliedLocking * 0.5f; //distribute the difference evenly //so that net torques are equal, leading to equal angular velocity //since netTorque is motorTorque - frictionTorque; leftWheel.motorTorque = engineTorque * 0.5f + lockingTorque; rightWheel.motorTorque = engineTorque * 0.5f - lockingTorque; Not sure if this would work, but that's what I have in mind right now. I'm coming back to this after fully understanding how torques run inside the open diff. Sorry for the long post, but let's go back to the case of jacking the open diff up and spinning one wheel. There is no road torque going back from both wheels, so how can the standing still wheel can receive torque to spin backward when the other is spun? Again thank you so so much for continuing this discussion with me. The few replies in this forum enlightened me a lot
12. ## Torque flow in car differential spider gear system

Thanks a bunch and sorry for any confusion, English is not my first language, so I have a bit of difficulty explaining myself :). So put it in a formula, it would be like this? engineDriveTorque = 100f; leftWheel.feedback = 50f; rightWheel.feedback = 20f; //engine torque split 50:50 to each wheel //this happens in the Drivetrain class leftWheel.motorTorque = engineDriveTorque * 0.5f; //50Nm rightWheel.motorTorque = engineDriveTorque * 0.5f; //50Nm //take the motorTorque and wheelhub speed to calculate slip, then forces from slip and load //this happens in the Wheel class angularVelo += motorTorque / inertia * deltaTime; slip = CalSlip(angularVelo, wheelhubSpeed); forces = CalForces(slip, load); //then this result in //leftWheel.feedback = 50f; //rightWheel.feedback = 20f; //then integrate into final angular velocity angularVelo -= feedback / inertia * deltaTime; //back to drivetrain //now the torque flow gets crazy //get the extra torque in the system //right wheel have an extra 30Nm, leftFeedback - rightFeedback = 50Nm - 20Nm; extraTorque = max(leftWheel.feedback, rightWheel.feedback) - min(leftWheel.feedback, rightWheel.feedback); //however, where do I put this torque to? The angular velocity of the wheel is already taken care of using feedback and motorTorque, what function does the extra torque serve in this case? //now the engine part //torque back to engine //is the min of the 2 sides torqueFeedback = min(leftwheel.feedback, rightwheel.feedback); netEngineTorque = combustionTorque - torqueFeedback; //take the feedback torque to push the car forward //note that this is super simplified, feedback torque is the final torque after taking in motor and brake and other friction torque. carbody.AddForce(leftwheel.feedback, rightwheel.feedback); Sorry my bad, that's what I meant actually. I was going to say that the engine just drives itself, but the feedback from the wheels slows it down. The net torque is positive, so the engine accelerate instead of decelerate. In my current early model, that's exactly what I'm doing. I just take the average wheel speed as the engine speed. engineSpeed = (leftwheel.speed + rightwheel.speed) * 0.5f; //* gears also of course Well actually the locked diff is what I'm having difficulty on, so I'm still stuck with the simple 50:50 open diff split :). I don't know how the torque flow in the locked system. My model uses torque flow implementation, so I can't manually "set" the speed of the wheel. If you don't mind, can you help me out with this too? I really need to understand this to implement Limited Slip Differential later on. And... This is what I'm working on also :). I'm stuck with just using wheel speed for engine speed exactly because of this reason. I tried looking around for resources on angular momentum conservation, but still can't find the one fits what I'm trying to do. Again thank you very much for the help. I would love it if you continue this discussion as I still have quite a lot of confusions and questions to ask (like the one above in the code)
13. ## Torque flow in car differential spider gear system

Thanks for the reply. That helped a lot. That's what I'm doing actually. I have brake, road and anything friction related torque summed as reaction friction torque. How do you calculate the "common" fraction? I though the sum of reaction torques from both wheels go back to the engine? So for this example: - suppose the torque at the ring gear, fed from the engine, is 100Nm, split into 50Nm each wheel. - The "strong wheel" put down all 50Nm and react 50Nm back, thus no acceleration. The "weak wheel" only put down 20Nm and react 20Nm back, the other 30Nm accelerate that wheel, thus wheel slipping. So now the engine receives back 20Nm + 50Nm = 70Nm, the rest 100Nm - 70Nm = 30Nm accelerate the engine, thus increasing engine RPM. If this keeps on going, the engine would hit the rev limiter. Does my understanding have any problem? I think I'm missing something here. Can you help me out? Also this is still just an open diff. Later on dealing with internal friction inside the diff (say Limited Slip Diff, or a locked/spool), things are going to be a lot more crazy.