TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

On the topic of "Tuning" a Model S

Discussion in 'Model S: Driving Dynamics' started by lolachampcar, Nov 6, 2015.

  1. lolachampcar

    lolachampcar Active Member

    Joined:
    Nov 26, 2012
    Messages:
    4,454
    Location:
    WPB Florida
    Someone was asking about when we would see aftermarket "Tuners" hoping up the Model S. Here is how I responded.

    You capture a full car software update including inverter firmware update. Reverse the firmware update or otherwise hack it so that you can bypass Tesla's firmware validation process*. Disassemble the inverter firmware and locate the torque demand mapping table. This is where the inverter takes the throttle pedal input (the potentiometers on the throttle pedal go directly to the inverter and not through any other device thus the inverter is managing pedal integrity - validating that all three pedal potentiometers agree - and directly developing driver torque demand input) and maps it to power applied to the motor. You then modify that table to provide more power to the motor like you would increasing allowable boost at an operating point in an ICE boost control table. Now that you have the throttle pedal system requesting more torque, you will need to identify fail safes and safeties within the inverter firmware that limit maximum torque. These are simply known as torque limits in the biz. Anyway, you need to find and defeat all of these limits that might intervene to limit maximum motor power.

    Simple really provided you have the time and energy to do it. The number of people outside the Electronic Control Module manufacturers that truly understand ICE ECUs is small. The number of people outside Tesla that understand the MS' inverter firmware is like still near zero :)


    * Automotive ECU firmware updates are more and more being protected by file signing. The manufacturer performs a cryptographic checksum on the new or updated firmware region. Bosch uses RipeMD160 on a lot of their stuff. This checksum is then encrypted in an RSA message using a private key.

    The encrypted message is sent after the firmware update to the ECU. The ECU then checksums the region of interest then decrypts the RSA message using the public key and, if the comparison does not match, refuses to allow the new code to run. Change just one bit in the firmware update and it will not take.
     
  2. J1mbo

    J1mbo Member

    Joined:
    Aug 20, 2013
    Messages:
    613
    Location:
    UK
    I guess you could intercept the input from the potentiometers before it feeds into the CAN and replace the data, but then you would be putting your map on top of Tesla's map, which may not be such a good idea.

    Has anyone ever managed to improve the drivetrain cooling? I would have thought that was one area where some tuning effort would pay dividends.
     
  3. jpet

    jpet Jan P.

    Joined:
    Aug 8, 2014
    Messages:
    3,288
    Location:
    Herne & Leuven, BE
    It might also be possible to change the gearing setup. One could sacrifice 0 to 60 performance to get a higher top speed and better acceleration at somewhat higher speeds.
     
  4. AB4EJ

    AB4EJ Member

    Joined:
    Feb 25, 2015
    Messages:
    585
    Location:
    Tuscaloosa, AL
    "Tuning" assumes that the manufacturer has not already tuned the vehicle to your liking. Are people actually dissatisfied with the Tesla's performance (other than taking issue with horsepower claims in the performance models)? Wow. The cars can already beat almost everything else that is street-legal.
     
  5. lolachampcar

    lolachampcar Active Member

    Joined:
    Nov 26, 2012
    Messages:
    4,454
    Location:
    WPB Florida
    J1,
    The three throttle pedal potentiometers go directly into the inverter and are not resolved to a CAN message along the way. This is done so that the primary power train component responsible for moving the car has a redundant element constantly comparing two potentiometers sweeping one direct and a third sweeping the opposite direction. If the three do not agree, drive is shut down. Normal ICE ECUs have the throttle function resident in the primary controller and on board a separate micro controller so that two independent sources must agree that all three pots are working correctly.
     
  6. tstafford

    tstafford Member

    Joined:
    Jul 4, 2015
    Messages:
    790
    Location:
    Nashville, TN
    I've done all the basic things to my P-cars and BMWs - exhaust mods, chip flash, intakes, etc. I wouldn't monkey with Tesla's firmware. That sounds like a terrible idea.
     
  7. Caligula

    Caligula Member

    Joined:
    Oct 14, 2015
    Messages:
    600
    Location:
    San Diego
    I'm all for voiding warranties, but when the product costs 6 figures, it gives me pause.
     
  8. kennybobby

    kennybobby Member

    Joined:
    Sep 14, 2014
    Messages:
    479
    Location:
    Heart o' Dixie
    You know i'm all about that bass (monkey) and it's more fun when nobody thinks it can be done. i have a reverse engineering col-leak in Oz who has written a boomerang program that you can throw at a compiled executable and it comes back to you with the source code. We are looking forward to the challenge.
     
  9. SabrToothSqrl

    SabrToothSqrl Active Member

    Joined:
    Dec 5, 2014
    Messages:
    1,532
    Location:
    PA

    This was my thought, as you could make a quicker 0-60, but I'm guessing the 1/4 mile would suffer.
     
  10. lolachampcar

    lolachampcar Active Member

    Joined:
    Nov 26, 2012
    Messages:
    4,454
    Location:
    WPB Florida
    kenny,
    There be some work in that there project.
     
  11. LetsGoFast

    LetsGoFast Active Member

    Joined:
    Oct 13, 2014
    Messages:
    1,342
    Location:
    Virginia
    I've had a quick peek at the encryption on the firmware downloads themselves. If you are capable of breaking it, there are some much more lucrative things you could do with that ability.

    There may be avenues of attack that would allow you to gain access to the installed, unencrypted stuff, but it is not a trivial challenge. Some pretty serious guys have tried and failed. I'm not in the league required to do it myself.
     
  12. jpet

    jpet Jan P.

    Joined:
    Aug 8, 2014
    Messages:
    3,288
    Location:
    Herne & Leuven, BE
    When I look at this from a European perspective, I believe Tesla would be able to sell more cars in Germany if the performance would be better at highway speeds. Here in Europe we don't have dragstrips and don't do 1/4 mile runs. We can drive faster on the highway and can legally max the car out on some parts of the autobahn. Or we can take it to a track and do some laps, which I have done. IMO, the current performance "profile" of the Model S is a better fit for the US market than it is for the European market. So tuning it, as lolachampcar suggests, is not a crazy idea. It could give the car better characteristics for specific markets or purposes.
     
  13. lolachampcar

    lolachampcar Active Member

    Joined:
    Nov 26, 2012
    Messages:
    4,454
    Location:
    WPB Florida
    To be clear, I'm not suggesting the MS needs to be tuned. I was just asked why someone has not gone out and done it already so I responded with some insight on the innards of automotive electronic control modules. LGF added some information wrt the over the air downloads being equally daunting an element.

    Also, tuning a MS is basically over riding Tesla's power limits. It is the same for ICE but OEMs are terribly conservative when it comes to protecting product and making warranty life terms without major failure. I think there is a lot more room to manipulate ICE calibrations than there is for Tesla's calibrations. I suspect there are significant longevity consequences for pulling more power from the pack especially more sustained high power draw.

    I would not do it on my MS.
     
  14. jpet

    jpet Jan P.

    Joined:
    Aug 8, 2014
    Messages:
    3,288
    Location:
    Herne & Leuven, BE
    Apparently, Saleen did some tuning on their "GTX" version of the P85D:

    Propelling the new GTX is the 3-phase, four pole AC induction motor and copper rotor with the upgraded Saleen drivetrain including an all-new 11.39:1 final gear ratio for quicker acceleration. Also new for the GTX is a Saleen specific MAXGRIP locking differential that allows each wheel to efficiently apply rotational force and maximize traction and grip in performance environments. All of the Saleen engineered driveline components increase efficiencies in torque management, give a track capable throttle response, and provide faster acceleration. Overall the GTX is a well-balanced vehicle and sounds great too!

    Electric motor cooling has also been made more productive from the Saleen high-efficiency drivetrain cooling system. Comprising the system is a larger volume radiator, upsampled cooling fans, and a high-flow water pump to help maintain consistent temperatures in more stressful performance applications.

    Saleen | GTX
     
  15. Jool

    Jool Member

    Joined:
    Jun 26, 2015
    Messages:
    285
    Location:
    San Diego, CA
    I looked up a video about that Saleen Tesla a while back and apparently their modifications make the car sound like an RC car :eek: Not so hot on that noise...

    You can hear it at around 7:19 - Tesla Model S, Fully Tuned: Saleen ST - XCAR - YouTube
     
  16. lolachampcar

    lolachampcar Active Member

    Joined:
    Nov 26, 2012
    Messages:
    4,454
    Location:
    WPB Florida
    I believe they did straight cut gears, a differential and some cooling upgrades. I do not believe they ever understood or entered the inverter control code.
     
  17. Cobbler

    Cobbler Member

    Joined:
    Sep 22, 2015
    Messages:
    62
    Location:
    België
    #17 Cobbler, Nov 7, 2015
    Last edited: Nov 7, 2015
    With my previous background of programming B&R and AB controls (automation industry), a servo controller usually has a parameter set to change the behavior of the current loop, controlled by the torque feedback loop, controlled by the velocity feedback loop and this controlled by the position loop (every loop is build on top of the 'lower' layer). Each loop with their own PID settings.
    I'm not sure if Tesla uses position control in their inverters. I do suppose the invertor uses closed feedback (resolver or encoder?) and works in velocity control mode.

    Faster acceleration or higher speed should imply more current draw from the battery (electronic fuse adjustment?) and more power going into the motor (> meaning more heat dissipation of the entire drive unit). The parameters involved can be typically:
    - maximum current limit
    - maximum velocity limit
    - increase temperature limit, this in the calculated software temperature model (I²x t)
    - ACC/DCC time (minimum time to reach max speed from zero or the opposite)
    - Jerk control (derative from acceleration): I assume that the acceleration rate is build up, instead of being maximum from start. Keeping mechanical stress under control.
    - PID settings. Proportional gains increased for example...
     
  18. trond.strom

    trond.strom Member

    Joined:
    Mar 3, 2015
    Messages:
    62
    Location:
    Norway
    It seems to me that the Tesla has to major challenges when it comes to "racing": cooling and current draw. Cooling could be solved using LN2 and current draw with some ultracapacitors. The PxxD(L) should then be able to output its 700 hp and do it confidently over time. If you also start swapping out body panels for carbon fibre you might get a resaonably much quicker car.
     

Share This Page