Experimental (Re)Mappable Engines

Discussion in 'Content Creation' started by gt02, Aug 19, 2022.

  1. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    (Re)mappable Engines



    Introduction
    Have you ever wanted to open a tuning shop in Belasco City or maybe in Utah?
    Maybe you had the will and money to do so, but you lacked the tools to do the job?
    Well, this changes today!
    This mod allows you to fine tune and map yours (or your customer's) car ECU.
    With a simple web interface accessible from any browser (Although I reccomend Mozilla Firefox)

    Disclamer

    This mod is NOT physically accurate in any way. It is just a kinda good approximation of a very complex and difficult to simulate problem.
    However, I have and will try to keep things as close to a simulation as I can.
    The Web interface does not have a refined look to it, but I will eventually make it prettier
    This mod is under developement and a perfect tune made in a version may become really bad with the next version.

    Features

    Injection map and compensations


    Ingition advance map and IAT compensation


    Boost target map


    PWM handling


    Options


    Accelerator map


    Knock autoadaptation


    Real time panel


    3D Graph view

    - Ignition timing tuning
    upload_2022-8-19_20-5-38.png

    - Injectors duty cycle tuning
    upload_2022-8-19_20-5-53.png

    - knock detection and on the fly correction
    - Real time view
    upload_2022-8-19_20-14-21.png
    - Auto-Tuner
    upload_2022-8-19_20-6-20.png
    - More to come (See Planned Features)

    Changelog
    0.4.1:
    Bug fix in tune updating

    0.4:

    Simulation updates:

    • Added fuel system simulation (Pump flow)
    • Added intake system with IAT simulation (Intake pipes heat soak, turbocharger effects on IAT and intercoolers), fuel cools air when injected, hot IATs have a higher knock probability, adding fuel or retarding ignition timing helps
    • Added sensors delays and noise (MAP, 02 sensor WB/NB, knock sensor)
    • ECU now reads data from sensors instead of directly getting data from the simulation, this calls for the need to use acceleration enrichment (No table available yet)
    • Added knock autoadaptation *
    • Engine can now be shut down with the ignition key
    Tuner updates:
    • Added 3D graph viewer
    • Added graphics to the real time panel
    • Added "On the fly tuning"
    • Added Accelerator Position map(For drive-by-wire throttles only)
    • Added After Start Enrichment map
    • Added IAT Fuel Compensation table
    • Added IAT Timing Compensation table
    • Added Boost Cut option
    • Added Knock Sensitivity option
    • Added Max Knock Retard option **
    • Added Knock Autoadaptation map *
    • Added Max Knock Timing Retard table *
    * Knock autoadaptation:
    Every knock event the ECU increases the cell corresponding to the working point by 1, regardless of the knock event strength. Once the engine reaches a working point where the ECU has previously registered knock, the ignition advance will be retarded by the amount specifyed by the Max Timing Retard table. To view the current autoadaptation map, click on "load" in the tuner interface.

    ** Max Knock Retard option:
    When a knock event is detected by the ECU through the knock sensor, the ignition advance will be rapidly retarded by the amount specifyed in the Max Knock Retard option.
    While the Knock Autoadaptation's retard is preventive, Max Knock Retard is reactive, to try and mitigate the knock conditions as quickly as possible.

    On the fly tuning:
    You can now save and load the tune without handling any file: it is all stored in a database file in the "yourTunes" folder. Just use the load and save buttons from the tuner interface. Reloading the vehicle is now not needed

    Known issues:

    • Sometimes the power curve in the UI app is not accurate (Ctrl + R should fix the graph)
    • Autotuner has not been tested
    To use the turbocharger you need my ALS mod (Version >= 1.4 (still pending approval))

    0.31:

    Simulation updates:
    • Changed code structure to have a more modular aproach
    • Added intake runners length resonance simulation (Helmholtz resonator)
    • Added variable length intake runners
    • Added turbocharger support (experimental) ***
    • Added fuel condensation in intake runners
    • Added Drive by Wire Throttle body
    • Improved timing calculations
    • Improved power output calculation
    Tuner updates:
    • Added Variable length intake runners target length table
    • Added Boost target table
    • Added Idle throttle position
    • Real time panel now has much more informations (But it is not formatted)
    Misc:
    • Added tunable config (NA)
    • Added tttunable config (Turbo)
    *** To use turbos you need to install and activate my (modifyed) ALS mod (tunableEnginesALS_0.31.zip)

    Known issues:
    • Reloading the vehicle (using R) results in a crash. Use only Ctrl + R to reload the vehicle
    • Thermals are disabled if not using a turbocharger
    • The engine starves of oil when it misfires too muchWeird behaviour when close to 0 RPM (The engine overtoques and kills itself)
    • Startup at low engine temperatures is too difficult, if experiencing issues, enable the preheating option in BeamNG
    • The engine looses too much power when cold
    • Covet support emporarily removed
    • Sometimes the power curve in the UI app is not accurate (Ctrl + R should fix the graph)
    • Autotuner has not been tested
    0.2
    • Updated MAP calculation method and as a consequence improved throttle response
    • Added a small delay to the sensors reading to improve the realism
    • Fixed covet engine not showing up after an update
    • Fixed crash caused by a wrong tune update method
    • New tune version: 0.21
    • Auto Tuner is broken
    0.1.1
    • Better Tuner UI (Some of the old features are missing, but I'm working on bringing them back)
    • Cleaned Code
    • Tune files version: 0.2
    0.1
    • First forum release


    Installation
    Copy the "yourTunes" folder in "YourBeamNgUserDir/GameVersion/mods/"
    This folder contains some really BAD (Sometimes the engines will knock themselves to death) base tunes for the 3.0 I6 Etk engine.

    If you whish to change the default web interface port, create a file in "yourTunes" named "tunerServerConfig.txt" and write a line containing the desired ip address and port in the format `"ip: port" in the ip part you can use your pc local ip address or "localhost". If you use "localhost" you will only be able to use the web interface from your pc.
    Usage
    Load the default tune on one of the default vehicles (See base tunes list):
    1. Create a configuration named "tunable"
    2. Select the mappable engine from the part selector
    3. Update the configuration you previously created

    Create a new tune:
    1. Create a new configuration and name it as you prefer
    2. Select the mappable engine from the part selector (The engine will stall)
    3. Update the configuration you previously created
    4. Open the web interface (Default address is: "http://localhost:9696/")
    5. Create your base tune or load one of the default ones
    6. Click save in the tuner interface

    Base Tunes List
    - Etk 3.0 I6

    Planned features
    - fix order in options tab
    - add ve map
    - add closed loop
    - fix idle
    - add cranking map
    - add acceleration enrichment map
    - add ignition timing retard based on engine temperature map
    - add/fix support for turbocharger/supercharger and nitrous
    - add supercharger clutch settings
    - simulate pre-ignition

    Github repo: https://github.com/Gabriele02/gt02RemappableEngines/
     

    Attached Files:

    #1 gt02, Aug 19, 2022
    Last edited: Mar 21, 2024
    • Like Like x 6
  2. Louie's Workshop

    Louie's Workshop
    Expand Collapse

    Joined:
    Feb 5, 2021
    Messages:
    3,005
    A mozilla firefox reccomendation
    Finally a man with good taste
     
    • Agree Agree x 3
    • Like Like x 1
  3. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,351
    I have no clue how this works but looks like an extreme amount of effort went into it so great job!
     
    • Agree Agree x 1
  4. Señor Krill

    Señor Krill
    Expand Collapse

    Joined:
    Dec 25, 2014
    Messages:
    67
    This needs more recognition. This is amazing. Can't wait to see what the future updates will include. Good Luck
     
    • Agree Agree x 1
  5. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    It acutally is more than a raccomandation, it is almost a requirement, since (I don't know why) FF is way smoother than any other browser I tested in showing animations and replacing content in the page. With Chrome the Tuner Interface really slows down by a lot
     
  6. coyoty

    coyoty
    Expand Collapse

    Joined:
    Mar 28, 2019
    Messages:
    27
    Can you do a video on how to use it?
    This is excellent and very promising!
     
  7. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    Hi guys,
    I managed to get round to update the mod.
    Unfortunately, I have little time to follow this project so updates will be slow but I have no intention in killing this project.

    Changelog:
    • Updated MAP calculation method and as a consequence improved throttle response
    • Added a small delay to the sensors reading to improve the realism
    • Fixed covet engine not showing up after an update
    • Fixed crash caused by a wrong tune update method
    • New tune version: 0.21
    --- Post updated ---
    Hi, sorry for the late response, but unfortunately I have little time (as of now) to follow this project. However, I managed to record a short video on how to load a tune. Note that if you want to load the default tune, the confugiration name must be "tunable"
     

    Attached Files:

    • Like Like x 1
  8. coyoty

    coyoty
    Expand Collapse

    Joined:
    Mar 28, 2019
    Messages:
    27
    many thanks for your support!
     
  9. NickHeemiith

    NickHeemiith
    Expand Collapse

    Joined:
    Aug 24, 2017
    Messages:
    29
    I’m am EXTREMELY interested in this mod and would like to help! If there is any way that i can help i will! Let me know!
     
  10. wind0ws01

    wind0ws01
    Expand Collapse

    Joined:
    Jul 1, 2020
    Messages:
    39
    oh no, the civic owners are coming
     
  11. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    Hi, thanks for the interest!
    Unfortunately I have no time between uni and work to support this project.
    However, I do not plan on killing it.
    Updates will be very slow (Maybe one or two a year)
     
  12. Kevin Murphy

    Kevin Murphy
    Expand Collapse

    Joined:
    Feb 13, 2021
    Messages:
    7
    hi its possible to play with the mods now ?
     
  13. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    Hi,
    I'm planning on releasing an update (a big one;)) maybe next week.
    However, I'm not currently planning on pushing this mod to the repo because as of right now I do not have enough time to keep it well mantained.

    You can still play it by manually installing the .zip file
     
  14. Kevin Murphy

    Kevin Murphy
    Expand Collapse

    Joined:
    Feb 13, 2021
    Messages:
    7
    yep i try but when i load the car my game is crashing ! i dont know why and im very interessed for the next update its a nice mod man very need this type of mods !!!
     
  15. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    Hi all,
    It has been a while since the last update, but here I am, releasing to the forum version 0.31!

    0.31 Changelog:
    Simulation updates:
    • Changed code structure to have a more modular aproach
    • Added intake runners length resonance simulation (Helmholtz resonator)
    • Added variable length intake runners
    • Added turbocharger support (experimental) ***
    • Added fuel condensation in intake runners
    • Added Drive by Wire Throttle body
    • Improved timing calculations
    • Improved power output calculation
    Tuner updates:
    • Added Variable length intake runners target length table
    • Added Boost target table
    • Added Idle throttle position
    • Real time panel now has much more informations (But it is not formatted)
    Misc:
    • Added tunable config (NA)
    • Added tttunable config (Turbo)
    *** To use turbos you need to install and activate my (modifyed) ALS mod (tunableEnginesALS_0.31.zip)

    Known issues:
    • Reloading the vehicle (using R) results in a crash. Use only Ctrl + R to reload the vehicle
    • Thermals are disabled if not using a turbocharger
    • The engine starves of oil when it misfires too much
    • Weird behaviour when close to 0 RPM (The engine overtoques and kills itself)
    • Startup at low engine temperatures is too difficult, if experiencing issues, enable the preheating option in BeamNG
    • The engine looses too much power when cold
    • Covet support emporarily removed
    • Sometimes the power curve in the UI app is not accurate (Ctrl + R should fix the graph)
    --- Post updated ---
    Yeah sorry for that, I forgot that 0.3 game update had broke it
     

    Attached Files:

    #15 gt02, Jan 19, 2024
    Last edited: Jan 20, 2024
  16. Kevin Murphy

    Kevin Murphy
    Expand Collapse

    Joined:
    Feb 13, 2021
    Messages:
    7
    hi man i test your update but i have same problem my car just stop working and the door its open like crash !
     
  17. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
    Hi,
    Have you followed the install procedure?
    Have you removed my repo ALS mod before activating the one for the tunable engines?
    Try to make sure that there is no turbo selected under the intake options.
    If the problem persists, you can PM me a screen shot of the game console and I will try to help.
     
  18. Kevin Murphy

    Kevin Murphy
    Expand Collapse

    Joined:
    Feb 13, 2021
    Messages:
    7
    how i give you the screenshot of my console ? and yeah i try every thing on 2 computer and i have the same problem
     
  19. gt02

    gt02
    Expand Collapse

    Joined:
    Feb 10, 2016
    Messages:
    25
  20. Kevin Murphy

    Kevin Murphy
    Expand Collapse

    Joined:
    Feb 13, 2021
    Messages:
    7
    its possible for adding you on discord ?
    --- Post updated ---
    here !
     

    Attached Files:

    • ttt.png
  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