
Advertisement

Content Count
39 
Joined

Last visited
Community Reputation
0 NeutralAbout Vu Chi Thien

Rank
Member
Personal Information

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.

Limited Slip Differential Modelling
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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? 
Limited Slip Differential Modelling
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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 
Limited Slip Differential Modelling
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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 
Limited Slip Differential Modelling
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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 onpower and offpower 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 5050, feedback torque is total at both wheels: leftOut = rightOut = engineTorque * 0.5 totalFeedbackToEngine = leftOut + rightOut 2  Like you said, the torque is split 5050, 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 
Limited Slip Differential Modelling
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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/simarcade 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. 
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.

Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
Thanks for joining the discussion. I'm making a track and offroad 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. 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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 reimagine 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? 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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: 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 sliplimiting 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: https://web.archive.org/web/20120229060754/http://www.torsen.com/files/Traction_Control_Article.pdf 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 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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. 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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) 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
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. 
Torque flow in car differential spider gear system
Vu Chi Thien replied to Vu Chi Thien's topic in Math and Physics
Actually that's incorrect though. The Power would go to the path of least resistance, not Torque. In an open diff, the Torque is always split 50:50 across 2 sides. Power is Torque * Speed, so while the Torque is the same at 2 wheels, the one spinning faster (higher speed) would have more power, thus Power goes to the path of least resistance. For the "weight" you are talking about, I have that all taken care of with my tire model. That "weight" is the traction force/torque from the road that propel the car forward and oppose the rolling direction of the wheel (which is F = mu * load, hence heavy loaded wheel is harder to turn). So my current simple open diff model would be like this: Engine torque is split 50:50 between 2 wheels. That torque spins the 2 wheels, creating traction force from slip. This traction force is then added to the engine torque the wheel received to calculate the final wheel angular velocity (netTorque = engineTorque  roadTorque). Basically, throw torque at the wheel and the wheel takes care of itself using forces acting on it. This way, heavily loaded wheel would have lower angular velocity due to higher roadTorque, while the lightly loaded one would have higher angular velocity, taking all the power. angularVelocity += engineTorque / Inertia * deltaTime; //The instantanious angular velocity of this frame after the wheel receive motor torque from engine slip = CalSlip(angularVelocity, wheelHubSpeed); //the tire deforms/slip, creating force roadForce = CalForce(slip, load); //the force the propel the car from the road roadTorque = roadForce * radius; //turn force to reaction torque on the wheel angularVelocity = roadTorque / Inertia * deltaTime; //final angular velocity after factoring in reaction torque For the torque split from engine to each wheel, it's an open diff, so just simple as engineTorque * 0.5f; leftWheel.engineTorque = rightWheel.engineTorque = driveTorque * 0.5f; 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. Currently in my model, there are only roadTorque and engineTorque acting on the wheel, nothing else, so I don't understand where to have that "extra torque" mentioned above into. The correct model would satisfy this equation: leftWheel.engineTorque + rightWheel.engineTorque = engineDriveTorque. So when driveTorque is 0 but there is engineTorque at one wheel, then the other wheel would have a torque in opposite direction. However implementing this is something that I'm still confused about. Thank you very much for the reply. 
Hi everyone. I'm working on a vehicle (more specifically: cars) simulation in Unity3D with a complete drivetrain system of engine, gearbox, differential, and wheels as separate components. Each component will update itself with the torque passing through the system. More specifically: The torque starts from the engine initially, then through the clutch and gearbox to the differential, where the torque is splinted appropriately to two sides (either active wheels or axle differentials). The wheels update themselves and pass the force to the rigidbody. The feedback torque from the wheels is then passed through the system back the the engine in the next step to determine engine torque for this next step. Currently my system is at early step where the engine never stall, the clutch is permanently locked. So the engineRPM is a simple (wheelLeftRPM + wheelRightRPM) * 0.5f. I'm trying to simulate the open differential by splitting the torque 5050 to both active wheels simply: wheelLeftTorque = wheelRightTorque = engineTorque * gear * 0.5f. This works OK when the torque comes from the engine. But in the case where the torque comes from one of the active wheel or outside, for example, when the car is jacked up and one wheel got spun when the engine is not running. In this case, the other wheel will spin the other way. I've watched some videos about open diff to be able to understand this. When one wheel is spinning and the diff case is held static, the spider gear that sits in between the side gears of two wheel axle, would spin (because the sun gear that the spider gear is connected to is held static, so it can only spin on its own axis). This rotation of the spider gear transfer rotation of one side gear to the other, making the other wheel spins the other way. Mathematically, since wheelSpeedLeft + wheelSpeedRight = 2.0f * CageSpeed, when CageSpeed is 0, then wheelSpeedLeft and wheelSpeedRight must have opposite sign, which illustrates the opposite rotations of the wheels. However, that's in term of speed and power flow. Since I'm working with torque, I don't know how the flow of torque going from one wheel to the other in this case. What is the amount of torque that goes from one wheel to the other? How should I model or come up with a formula that covers both cases when torque comes from the engine or from one side, or rather, fully cover the full flow of torque in the diff? The final answer that I need is the amount of torque that will flow to each wheel. Thank you very much.

Advertisement