Results 1 to 20 of 20

Thread: Excel calculator for virtual torque tables

  1. #1
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129

    Excel calculator for virtual torque tables

    Hi all,

    07GTS and I have come up with a quick and dirty virtual torque table calculator. This guide is suited to vehicles where there is suspicion that the air and or fuel model is off therefore resulting in incorrect torque data shown on the scanner. For cammed cars this will help with the throttle follower and for auto cars will ensure the correct line pressure is applied to the pressure control solenoids and torque management requests pull the appropriate amount of spark.

    Currently this is in draft form and I am looking for feedback to see if this can be something useful to the tuners and tinkerers out there.

    Please heed my statement above, this is quick and dirty. For the advanced users out there, shaping the torque table to reflect the dyno torque profile is not in the scope of this procedure. It merely ball parks the torque tables so car park driving is better and the trans won't get fried.

    After feedback is done, I'll create the MAP procedure if I'm not laughed out of the forum.

    Please be gentle, I'm not an expert and am not a tuner. Just a bloke that likes the shed and mucking around with cars.

    Draft_Guide to Airmass Virtual Torque Tables on a Gen 4.pdf
    Draft_VTT Calculator.xlsx
    Last edited by hjtrbo; 05-14-2021 at 10:26 PM.

  2. #2
    Advanced Tuner
    Join Date
    Aug 2010
    Location
    Detroit, MI
    Posts
    930
    Sent you some comments. And if you need any additional assistance with this, I am happy to put Marcin to work for you

  3. #3
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    Haha, thanks smoke. Replied to you via PM. Marcin aye, that's a good sledge hammer to use for these problems! 😁😁😁

  4. #4
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    And to clear up for everyone, the spreadsheet in the first post does NOT have the MAP table adjustments so please don't use it on your car. It's only there so people can look at it and give comments and suggestions on it so it can be improved to a point where it can be released (including both air mass and map) for everyone to use.

  5. #5
    Senior Tuner TheMechanic's Avatar
    Join Date
    Jan 2014
    Location
    SoCal
    Posts
    1,550
    Subscribed

  6. #6
    Intersting process you have going on right there,however I think the last time I checked virtual torque didn't have as much effect on gen 4 vehicles as it have on gen 5 ,it's not going to close the throttle during a wide open throttle pull because the torque model is off right so why bother doing this process on a gen 4 when you can do it on a gen 5 where it actually matters just a suggestion.

  7. #7
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    Quote Originally Posted by Varto20 View Post
    Intersting process you have going on right there,however I think the last time I checked virtual torque didn't have as much effect on gen 4 vehicles as it have on gen 5 ,it's not going to close the throttle during a wide open throttle pull because the torque model is off right so why bother doing this process on a gen 4 when you can do it on a gen 5 where it actually matters just a suggestion.
    Correct. For gen 4 not been right on the tables in a few areas will fuck with your throttle follower, idle control and transmission line and shift pressures. So no power gains to be had like on gen 5, but certainly some driveability gains and a transmission that actually shifts right and pulls a decent amount of spark on the shifts to keep it alive.

    To do this for gen 5 I would think every different engine combo that has been modified would need to be put on an engine dyno and be properly mapped. Gen 4 is far more forgiving to just ball parking the torque to get a few areas that matter right. I haven't got the resources to create something like this for gen 5.

  8. #8
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    Here is the working release guide and worksheet.

    To be clear:
    • These are not for Gen 5
    • These are quick and dirty. They are just numbers based off the factory numbers where a couple of key areas (idle and WOT) are corrected to get them reading semi close
    • Probably not needed to be used on a manual unless wishing to correct idle torque
    • If stock cam there might not be much needed to adjust
    • If you have good injector data and your dyno numbers (corrected to flywheel) are ball park with what the scanner shows, you will not need to adjust anything. (Lucky you)
    • These do not shape the torque curves to match what you see on the dyno. This just changes the torque slope along the airmass / map axes. The profile across the rpm columns remains as per OEM.
    • If you are happy with how your car runs, then don't change anything that ain't broke!


    From my testing I have found the following:
    • Corrected engine torque around the idle area has helped the return to idle characteristics and the adaptive idle spark has calmed down significantly
    • Car park style driving is awesome now. Used to have the occasional surge / hesitation
    • Increased transmission line pressure to give more holding pressure in between shifts
    • Transmission CT downshifts (rev match) are now almost seamless. I used to get a bit of surge sometimes, especially at low speeds coming to a stop
    • Transmission torque management spark is now pulling down into double digit negatives. More range of control with torque management settings now.
    • Was able to get rid of the jacked up base shift pressures to get the thing to shift fast. Now I am running stock shift pressures and my shift times now match exactly as commanded. Previously I would command say 0.2s and would end up with a shift at 0.12s. Now I'm hitting 0.2s as requested.


    Side effects
    • Trans took a few drive cycles to adapt to the new shift pressures. Just be aware of this, you may see the odd flare. It will adapt out, just be patient. If a few drive cycles doesn't sort it out, do a adapt reset / preset and repeat the drive cycles.
    • Had to re-visit shift pressure settings and shift time settings as different base shift pressure columns are now been hit.


    Potential improvements
    • Add a torque shape function. If someone owns a dyno, could you please do WOT back to back pulls from idle to rev cut with spark locked at some different safe values to establish a torque profile for spark.

    Happy to revise these as time goes on, and if someone wants to take them over, please PM me.
    Attached Files Attached Files
    Last edited by hjtrbo; 05-26-2021 at 03:27 AM. Reason: Include smoke's feedback

  9. #9
    Advanced Tuner
    Join Date
    Aug 2010
    Location
    Detroit, MI
    Posts
    930
    Quote Originally Posted by hjtrbo View Post
    Potential improvements
    • Add a torque shape function. If someone owns a dyno, could you please do 4 x WOT back to back pulls from idle to rev cut with spark locked at -10deg (if that's even possible?), 0deg, 10deg & 20deg.
    This would be helpful, but don't go that low with the spark. Especially if there are catalytic converters involved. I would only go as low as it takes to establish the trendline in excel. Too much retard will generate too much exhaust heat. -10? for an entire dyno pull is likely to damage something. But if you find best torque at 25-30?, the 20? point will be ok. 10?, maybe...exercise caution.

    This is a good effort in correcting the actual problem that is caused by installing a larger camshaft or other mod that changes engine torque characteristics. As it changes the input to all consumers of the torque estimate, they will all behave a little differently. In gen 4 these are slow path idle control for both steady state and transition, all sources of torque management, traction control, torque limits and AC compressor load. So if changes have been made to these previously to account for the torque model error, with the error now reduced with this procedure, the changes previously made will need to be revised as well. Just a disclaimer for those who may attempt this and then find that it made the idle worse because the earlier changes to throttle follower weren't adjusted.

  10. #10
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    Thanks smoke,

    I removed the reference to the spark numbers so I don't hurt anyone.

    Cheers, HJ

  11. #11
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    I was bored and worked out the torque table formula.

    Here it is if anyone can do something with it...

    Nm = (Airmass x Coeff_Airmass_A) + Coeff_RPM_A + (Spark x Coeff_Spark_A) + (Spark^2 x Coeff_SparkSq_A) + (Spark x Airmass x Coeff_Spark_Airmass_A) + (Spark^2 x Airmass x Coeff_SparkSq_Airmass_A)

    Note the co-efficients are referenced for each rpm column. I.e if you zero'd everything out and only adjusted the 550rpm cell in any of the co-efficient tables then only the 550rpm column in the virtual torque table will change.

  12. #12
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    This is very relevant. Posted on the Gen 5 sub forum.

    Quote Originally Posted by Keith@HPTuners View Post
    A tip. Try to reduce the yAxis (MAP or Airmass) to just outside the extremes of your vehicle.

    For example, in an NA setup, you might see 0-100 MAP. Right now, the default is 0-200. Change the yAxis to 0-105 and tune your tables that way. Do not worry about the MAP #'s you'll never reach (as long as you stay NA...).

    In an NA setup, if you use a yAxis of 0-200, the coefficient generator will try to line up the 100-200 MAP range values as well, which will reduce the accuracy of the 0-100 range, which is the range you care about.

    Remember, when you go from Calculated Torque -> Coefficients, the code is trying to come up with curves to calculate new coefficients that represent the torque #'s as accurately as possible. This is not a 1:1 solution. The point is, how you use the tool will greatly determine how accurate the calculated coefficients will be for your given application.

  13. #13
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    Quote Originally Posted by Chris@HPTuners View Post
    The torque model is important becuase when the trans shifts it is making all these acceleration, slip and pressure calculations based on how much torque the ECM is telling it the engine is making. If the model is too low, the shifts will flare becuase the TCM won't request enough tq reduction and calculate all the pressures too low. If the torque model is too high, the TCM thinks you are putting down some power and bumps everything up for a firmer, faster shift which is also wrong.

    The torque model needs to be in the ballpark, like 5-10%. I know GM TCM guys want 5% accuracy for the trans to behave nicely. <== This is the reason we added the virtual torque feature in the first place

  14. #14
    Advanced Tuner
    Join Date
    Aug 2010
    Location
    Detroit, MI
    Posts
    930
    Figured I'd dredge this one up. I put a 427 in my otherwise stock GMC Sierra and the shift/overall idle inconsistency have bugged me enough to look a bit deeper at what's possible to correct the torque models without some real engine dyno characterization. Anyone with a modded gen5 knows this well, but gen4 suffers all the same, albeit to a lesser extent because of the limited authority of the closed loop torque control. However it IS closed loop when shift torque management is active - when/how that presents itself depends on the application and shift mode. On my truck, it is exclusively spark from what data I see. The primary issue is excessive spark reduction to meet the trans torque request which is, per the OEM air mass torque calibration, an extreme exaggeration with such a large engine compared to the 5.3 that came out. The engine friction is huge now - and that's consuming some of the torque that it is actually making. It also has a larger than stock camshaft of course, which again consumes more air to make the same torque at low speed due to the combustion inefficiency that larger cams can cause.

    So we know there is a problem...but what does that mean to us that are trying to correct it? It means there is valuable data hidden in the torque model calibrations that we can use to our advantage. For some torque model background, the air mass version is used for steady state torque control. It is the 'truth' reference, which the MAP torque model will use for a limited correction when in steady state. The MAP torque model is responsible for controlling the throttle. Like dynamic airflow, transients will force control towards whatever happens to be more accurate for that condition...in this case, MAP is a better indicator of transient torque than the airflow. That means the engine brake torque should track the MAP torque model when you force it out of steady state..and re-entering steady state will show the torque error. So what you are left with should be a disagreement between brake torque and the air mass torque model....which can be corrected for using airflow correction. In this case, I referenced the idle integral airflow as justification for the idea, but simply monitoring the difference between MAP torque and brake torque as it begins to change upon re-entering steady state is sufficient to calculate the torque error. The image shows this in action from a Matlab plot. TRQ is engine torque from the HP tuners data, and APC and MAP torque are the torque calculations from the coefficients in the toon file. Torq_Corr is the calculated torque error.

    Screenshot_20220928-114159.png


    What's happening is the MAP torque correction trying to make up for the discrepancy because the air mass and MAP torques are not the same. What SHOULD happen is that growing error should be SUBTRACTED from the air mass torque model, rather than added to the MAP torque model as a correction. The ECM doesn't know that the air mass torque is not accurate anymore - but we can correct for it by using the brake torque and airflow error that comes as a result of disagreeing torque models. This image shows the AC compressor kicking on just past 170 seconds, however I've subtracted that from the error calc - will update with a current plot of the error and resulting corrected torques from drive data when I have time. In the end, the result is a set of new coefficients generated using a math optimization technique. Put in data, spit out results, as it should be. I should mention, this is meant to supplement hjtrbo's technique - it cannot make corrections at WOT. But what it does do is dial in the finer details of the closed loop torque control, where inaccurate torque models cause the biggest problem. Some extrapolation for WOT could be possible, but dyno data is always great to have


    Unfortunately the tool that you'd need to do this isn't a feature in HP tuners. Excel was a bit too slow for me to do investigation with this so I wrote a few scripts in Matlab to generate what I was looking for. I realize not everyone has Matlab so I'm still looking for a way to make this useful for the average guy. It may end up being excel....but it's too slow to use for development lol. I am leaving for vacation, but I will post this as a write-up once I've managed to shoehorn it into a spreadsheet and finalize the whole method.
    Last edited by smokeshow; 09-28-2022 at 03:28 PM.

  15. #15
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    This is good. Enjoy your time off.

  16. #16
    Advanced Tuner
    Join Date
    Aug 2020
    Posts
    335
    But post the MatLab stuff to. plz.

  17. #17
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    +1 😁

  18. #18
    Awesome stuff

  19. #19
    Advanced Tuner
    Join Date
    Jan 2016
    Posts
    329
    Would it be possible to model the "new" engine torque using a proper load bearing chassis dyno? I know the engine dyno is ideal but I wonder if it could be done on a really good load control chassis dyno in a cell with proper airflow to manage temperature etc.

    We would need an accurate way to correct to flywheel numbers but if we can get it within 5% would that be close enough?

  20. #20
    Senior Tuner
    Join Date
    Jul 2020
    Location
    VIC Australia
    Posts
    1,129
    You would need to know your engines pumping losses, accessory losses and drive train efficiency. I have found the pumping loss and accessory loss table in a binary but have not found the drive train efficiency table.

    FYI, at full beans an L77 pumping loss is 122Nm and the accessory loss is 9Nm. That makes sense when you look at your virtual torque table, it's always higher than reported in the scanner. Using the numbers above to subtract it puts the torque bloody close to scanner data.

    Find drive train efficiency and your method has potential.