Outdated Throttle-Based Torque Converter Lockup Logic 1.3

Smooth & Efficient Acceleration

  1. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Repository download page
    I made some change to the Automatic gearbox shiftlogic and introduce some more Jbeam variables.
    DOWNLOAD (remove the WIP
    tclockupthrottle_covet_d0p.zip first), Repo version

    It's quite common for automatic gearboxes to delay the TC lockup by throttle value before downshifting.

    Mod feature: Delay the TC lockup RPM by throttle settings with adjustable parameters, NO more 3rd gear bogging down.
    The Covet is already configued for demonstration.
    Vehicles:
    Wentward DT40L
    Gavril Pickup/Roamer/Van
    Ibishu 200BX
    ETK I-Series
    Gavril Grand Marshal
    Ibishu Covet
    Ibishu Hopper
    Bruckell LeGran
    Ibishu Pessima/Midsize
    Gavril T-Series

    Other vehicle shifting is unchanged.

    Choose the mod Converter in the vehicle parts

    Jbeam parameters:
    Code:
            "shiftLogicName":"automaticGearboxmod", //using the modded shiftlogic
            "torqueConverterThrottleLockupRange": 1000, //increase this RPM with throttle application
            "torqueConverterDelayLockupMinThrottle":0.2, //throttle below this does not increase the lockup RPM
            "torqueConverterDelayLockupMaxThrottle":0.7, //throttle at or above this fully increase the lockup RPM

    Lua modifications:
    Code:
    lockupTarget = clamp((gearboxInputAV - torqueConverterHandling.lockupThrottleRange * clamp(M.throttle / (torqueConverterHandling.lockupDelayMaxThrottle - torqueConverterHandling.lockupDelayMinThrottle) + torqueConverterHandling.lockupDelayMinThrottle / (torqueConverterHandling.lockupDelayMinThrottle - torqueConverterHandling.lockupDelayMaxThrottle),0,1) - torqueConverterHandling.lockupAV) / torqueConverterHandling.lockupRange, 0, 1)
    and this:
    Code:
        torqueConverterHandling.lockupThrottleRange = (jbeamData.torqueConverterThrottleLockupRange or 0) * constants.rpmToAV
    
        --delay torqueConverterLockup with throttle application
        torqueConverterHandling.lockupDelayMinThrottle = jbeamData.torqueConverterDelayLockupMinThrottle or 0
        --no lockup delay below this throttle value
        torqueConverterHandling.lockupDelayMaxThrottle = jbeamData.torqueConverterDelayLockupMaxThrottle or 1
        --max lockup delay above this throttle value
    How to use it

    Put the zip in your mods folder and drive the Covet the above vehicleafter selecting the Throttle-based Locking Torque Converter part.
    For other vehicles, enter the Jbeam code in the converter section, right below the "torqueConverterLockupRPM".
    Parameters value adjustment: important for a good driving experience.
    torqueConverterDelayLockupMinThrottle: Must at or above 0 and below the "torqueConverterDelayLockupMaxThrottle" value, should be set to a bit above cruising throttle.
    torqueConverterDelayLockupMaxThrottle: Must at or below 1 and above the "torqueConverterDelayLockupMinThrottle" value, should be set to just below downshift throttle.
    torqueConverterThrottleLockupRange: Not set or set to 0 to disable the function. Note that above certain engine speeds, the lockup action merely affect the RPM, set to roughly that RPM minus the "torqueConverterLockupRPM" then divided by two. Trial-and-error might needed to fine-tune for the best driving experience.

    Lockup RPM basic calculation example: The throttle setting is 0.4, the "torqueConverterDelayLockupMinThrottle" is 0.2, the "torqueConverterDelayLockupMaxThrottle" is 0.6, the "torqueConverterThrottleLockupRange" is 1000 and the "torqueConverterLockupRPM" is 1300.
    The actual lockup RPM would be 1800.
     

    Attached Files:

    #1 default0.0player, Oct 5, 2019
    Last edited: Feb 17, 2021
    • Like Like x 7
    • Agree Agree x 1
  2. _Tanco

    _Tanco
    Expand Collapse

    Joined:
    Jan 7, 2017
    Messages:
    247
    Awesome mod ! The automatic gearbox feels way better than before, it resolved the problem where the engine revs raise when the gearbox change speed and significantly increased the gearbox reactivity while driving, i hope the devs while take a look at what you did because actually the automatic gearboxes feels very bad (when you are at max rpm and you need to wait 5 seconds for the gearbox to upshift to reduce to 2000RPM is a bit boring...) it still needs some tweaks (specially for the upshifting rpm values, at 90% of throttle the gearbox shouldn't upshift at 3000RPM, but that's easy to change). Now you should try to do it on a gearbox with more speeds, like the ETK 8-speed who is an absolute pain to use when you're not always at 100% of the throttle.
     
    #2 _Tanco, Oct 5, 2019
    Last edited: Oct 5, 2019
    • Agree Agree x 3
    • Like Like x 1
  3. Michaelflat

    Michaelflat
    Expand Collapse

    Joined:
    Jul 10, 2014
    Messages:
    1,543
    Amazing, will be interested to try this out next time I'm on BeamNG
     
    • Like Like x 1
  4. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    No lua is needed, just lower the "aggressionHoldOffThrottleDelay" value to zero.
    Older mechanical transmissions don't "sense" throttle position, they only had a kickdown switch that activate via full throttle. In BeamNG, these kinds of transmission always using the highest gear below 80% throttle.
    The ETK 8-speed is actually more efficient than manual transmission becalse the TC lock up early at 2nd gear. To prevent rev bouncing the throttle is reduced to 70% during upshifting. The "pain" is actually caused by the slow shift at low throttle. In the "etk_transmission.jbeam", the "gearChangeTime" is the minimum physically possible shift time, while the "maxGearChangeTime" and the "minGearChangeTime" is for the contoller to smoothen the shift, lowering the "maxGearChangeTime" by half may help.
    --- Post updated ---
    Finished! Repo version is waiting approval.
     

    Attached Files:

    • Like Like x 2
  5. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    673
    This is great! it works really well. If you approve, I would like to try and implement this into some of my mods, it would work a whole lot better than my current solution (2 gears with the same ratios, with lockup enabled in one of them)
     
    • Agree Agree x 1
  6. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Feel free to implement this in your mod (cuz reuploders and meshslappers don't even understand this mod lol). One purpose of this thread is to provide some pratical ways to improve shiftlogic so we can contribute to the vehicle handling in BeamNG.drive.
    One way is to DIY it, copy the shiftLogic-automaticGearbox.lua to your user folder C:\Users\yourusername\Documents\BeamNG.drive\lua\vehicle\controller\ and edit it, it'll (temporarily)override the original lua. You can do this ingame, just press Ctrl+L then Ctrl+R to refresh after each edit).
    Another way is to create other drivetrain mod with those Jbeam parameters, keeping this mod enabled.
    Another way is to take the lua folder and rename it (eg.shiftLogic-automaticGearboxmodmod.lua) then edit the file to implement your custom shiftlogic, then in the vehicle Jbeam vehiclecontroller (eg.
    "shiftLogicName":"automaticGearboxmodmod").

    Also you may want to check out this mod. Note that I don't know how to rename the file and specify them in the Jbeam file, so it changes the shift globally, thus it's not allowed in the repo(You must not overwrite any default game data.).

    Good luck with your modding
     
    #6 default0.0player, Oct 6, 2019
    Last edited: Oct 6, 2019
    • Like Like x 2
  7. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    673
    Thanks. I'll use it to improve my automatic transmissions for my Wentward mod. The CVT and DCT fix looks interesting too, I might have a use for those as well in the future.
     
    • Like Like x 1
  8. Michaelflat

    Michaelflat
    Expand Collapse

    Joined:
    Jul 10, 2014
    Messages:
    1,543
    Haha we both have the same idea..

    Gearbox optimisation, what vehicle do we fit this technology to... A bus! :p
     
    • Agree Agree x 2
  9. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    The CVT still needs some work completed. In the original tuning the CVT low RPM(600 in the Sunburst) is lower than the TC lockup RPM(1800 in the Sunburst), making low throttle cruising inefficient. And the TC Always lock up at the specified RPM regardless of vehicle speed, making launching sluggish. I'm trying to make the CVT shift map an adjustable exponential curve and do the same throttle based TC locking. Another problem is, unlike automatics, the TC always lockup in an instant. The "torqueConverterLockupRate" only works in automatics.
     
    #9 default0.0player, Oct 6, 2019
    Last edited: Oct 10, 2019
    • Like Like x 2
  10. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    673
    I know IRL Subaru CVTs lock up at 11 mph. Could you use electrics.wheelspeed or something to trigger lockup, instead of an RPM value?
     
  11. Michaelflat

    Michaelflat
    Expand Collapse

    Joined:
    Jul 10, 2014
    Messages:
    1,543
    It's a little clunky, based purely on throttle value.. could it be based upon agression value? or make your own version of agression value?

    The problem is that its a little quick to lockup once you let off gas, maybe a simple delay could help.
     
    • Agree Agree x 1
  12. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    The "aggression" value is in the "vehiclecontroller.lua" and I (currently)don't know how to mod it.
    Note: the non-aggressive shiftmap is way different than the aggressive shiftmap, the former is throttle^3, the latter is throttle * 1.333 or 0.75 when stopped, this is a bit confusing.

    EDIT: The aggression calculation in the "vehiclecontroller.lua" is a little bit clunky. First the aggression is calculated according to the throttle increase speed (dt) add up to the throttle position X 1.333, thus, even you move the throttle very slowly, the aggression is always higher than the throttle. Then the "aggressionCoef" is introduced, which is basically squared aggression value. Finally the shiftRPM is a function of low/highShiftUp/DownRPM and the aggressionCoef.
    For older transmission, the aggression is throttle cubic (throttle^3) and the aggressionCoef is (throttle^6), this is a very low RPM shifter, you may apply more than 90% throttle in order to downshift.
    ssssssshhhhhiiiiiiiffffffffffffftttttttttttttt.png
    As shown, with 70% throttle the non-aggression is about 0.1 and the aggreession is about 0.9, that's why older mechanical transmission is described as slushbox.
    I'm planning to do a custom shiftmap without modding the "vehiclecontroller.lua".

    A simple delay is about setting these value just below "torqueConverterLockupRPM"
    Code:
    "torqueConverterLockupInRate":5,
    "torqueConverterLockupOutRate":0.15,
    Good idea, do you know you don't even need to implement wheelspeed sensors in the lua because of this
    cvtdrive.png
    As shown, the wheelspeed is tied to the gearbox output RPM, just set the TC lockup according to the gearbox output RPM and adjust the RPM to where the wheelspeed is 11mph.
     
    #12 default0.0player, Oct 8, 2019
    Last edited: Oct 8, 2019
    • Like Like x 1
  13. on3cherryshake

    on3cherryshake
    Expand Collapse

    Joined:
    May 12, 2015
    Messages:
    438
    Am I free to implement this in my engines mod?
     
  14. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Yes, just don't forget to rename to avoid mod conflict. Also note the "torqueConverterLockupInRate" is TC unlock speed and"torqueConverterLockupOutRate" is TC lockup speed
     
  15. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    • Like Like x 1
  16. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    • Like Like x 1
  17. ralokh5

    ralokh5
    Expand Collapse

    Joined:
    Oct 16, 2020
    Messages:
    7
    I was interested in this mod, altough it is 1 year old and it works really well. Automatic transmissions perform almost like irl. But is it possible to disable this feature in top gear - O/D somehow? Real automatic transmission does not that in O/D, at least on cars I have driven. thanks
     
  18. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    default0.0player updated Throttle-Based Torque Converter Lockup Logic with a new update entry:

    compatibility update

    Read the rest of this update entry...
    --- Post updated ---
    OK so back on topic, the bus.
    The most visible problem of the automatic transmission in BeamNG is on the bus. If you drive the highway version DT40L (no mods) and apply 75% throttle and you can watch the RPM jumps up and down.
    Current solutions(with mods):
    1. Use two gears with the same ratio, but the lockup gear is one of them, this is effectively 1C-2C-3C-4C-4L-5L, but the transition between 4L and 5L is not perfect(but still much better than the unmodded bus), since vehicles accelerate slower at higher speed, reducing shifts in lower gears save time in both MT and AT. Thus the ratio between 4th and 5th is "closer" than the ratio between 1st and 2nd, when the driver applies moderate throttle
    I searched "angery" and found this thread lol
    Torque Converter Lockup Questions
    IRL 5-speed 1C-2C-3C-4C-4L-5L, 8-speed 1C-2C-2L-3L-4L-5L-6L-7L-8L(since already close-ratio)
    5th gear low engine RPM the vehicle will downshift to 4th, if in 4th the TC unlocks, then downshift(if the throttle is depressed even more). And since the gear ratio between 4th and 5th are close, the TC remains locked during the shift between 4th and 5th. However in BeamNG you cannot fully remedy the "jolt" even with throttle cut, if the TC lockup is delayed the RPM will rise after the shift, if the TC lockup time is default there's still a jolt.
    2. Unlock the TC based on throttle value, this is a little smoother since in acceleration with moderate throttle, the TC remains unlocked until the driver reduce the throttle at the end of the acceleration, in acceleration with low throttle, the "jolt" is less intense bc the engine torque is low. However you cannot get a 5L without 5C gear.






    I'm going to mod the shiftLogic-automaticGearboxmod.lua and make another transmission mod, which will eventually supersede this mod. Planned features are:

    TC always locked in overdrive(highest) gears: make a "torqueConverterFullyLockupMinGear" in addition to the "torqueConverterLockupMinGear", if the former is 5 and the latter is 3, then 1C-2C-3C-3L-4C-4L-5L-6L
    Winter mode, always 2nd gear: some shifters IRL when selected to "2" will only in 2nd instead of shifting between 1st and 2nd, some vehicles have separate W mode, In BeamNG mod there will be PRNDW1 and PRND21W, respectively.
    "autoDownShiftInM" to a certain gear: when the "autoDownShiftInM" is false the vehicle can start at the highest gear and "autoDownShiftInM" is true the gear is always M1 in M mode when stopped. PRNDSM vehicle IRL often allows the driver to start at higher than 1st(2nd in some 6ATs and 3rd in some 8ATs), which is useful when starting on slippery surface.
     
    #18 default0.0player, Feb 16, 2021
    Last edited: Feb 16, 2021
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice