Page 1 of 5 12345 LastLast
Results 1 to 20 of 99

Thread: SD tuning for E38/E67 ECM's

  1. #1
    HP Tuners Owner Chris@HPTuners's Avatar
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    5,249

    SD tuning for E37/E38/E67 ECM's

    I haven't updated the help files yet for the new SD parameters, but here's a simlified view for those vehicles that don't have variable camshaft or switched (active) intake manifold.

    Bascially the engine operation is divided up into 30 "zones" and then there is a coefficient for each zone that forms an equation for the PCM to calculate the VE value (instead of looking it up in a traditional table). The simplified equation is (leaving out all the variable cam stuff that isn't used):

    VE = Constant + KMap².MAP² + KMap.MAP + KMapRPM.MAP.RPM + KRpm².RPM² + KRpm.RPM

    where:
    - Kxxx is the coefficient from the current zone
    - MAP² is MAP squared
    - MAP is MAP
    - RPM is RPM
    - RPM² is RPM squared
    As you can see it is far from simple

    The way this kind of thing is typically done in a mathematical sense is you create the solution matrix that they are trying to achieve (ie. in this case the multi-dimensional VE table). Then put that into a math package like Matlab etc. that then churns out the filter coefficient matrix, which is then put into the calibration tables.

    It is completely non-intuitive, but you could construct a spreadsheet or something to calculate the VE value at given RPM and MAP values for any set of coefficients (using the formula above). For those 4cyl guys who have variable camshaft your world is another 2 orders of magnitude more complex) becuase the Intake and Exhaust cam terms are not zero.

    Here's the full formula for those that are interested:

    VE = Constant + KMap².MAP² + KMap.MAP + KMapRPM.MAP.RPM + KMapEx.MAP.Ex + KMapIn.MAP.In + KRpm².RPM² + KRpm.RPM + KRpmEx.RPM.Ex + KRpmIn.RPM.In + KRpm.RPM + KEx².Ex² + KEx.Ex + KExIn.Ex.In + KIn².In² + KIn.In

    where:
    - Kxxx is the coefficient from the current zone
    - MAP² is MAP squared
    - MAP is MAP
    - RPM is RPM
    - RPM² is RPM squared
    - Ex is Exhaust Cam Angle
    - Ex² is Exhaust Cam Angle squared
    - In is Intake Cam Angle
    - In² is Intake Cam Angle squared
    If you open an early E38 file, under Engine Airflwo, Dynamic Airflow you will see the zone mapping thresholds and numbering.

    For the later code they eliminated the ability to map the zone #'s but the convention is the same as below.



    Now most of you are wondering, why, for the love of god, would anyone think this is a better system than before? The answer is simple really, this mathematical approach gives a highly accurate result in the new multidimensional space created by adding the exhaust, intake camshaft and also the variable intake systems. For example, to do this the traditional way would require multiple VE tables for each camshaft, then some mehtod to mix the result and then another set of VE tables for each depending on the switched manifold state, not to mention you have DoD thrown in as well. ie. the old way being conservative assuming 5 VE tables for each cam position, three differnt states for the manifold switch and a couple of states for DoD. gives a total of 5 x 5 x 3 x 2 = 150 VE tables and then you still have a giant interpolation mess to deal with at the end. Not to mention you just blew out the size of the calibration a huge amount.

    Unfortunately folks this is the way of the future, and this aspect of the PCM control is not the only thing headed this way - things like torque estimation, idle control and throttle control will all go this way eventually. Makes you wish you had paid attention in those engineering math classes

    So where to begin?
    So far you should have realized that the constant term is the only remotely intuitive part to the equation. Modifying these numbers effectively offsets each zone of the VE table up or down. ie. if you increase the constant term the VE value increases and the PCM will add more fuel. However, be warned that as soon as you change anything, the transition boundaries between zones will be out so don't move things too much or unexpected things may happen. The linear terms suchs as KMAP and KRPM multiply the current value of RPM or MAP, then you have the quadratic terms such as KMAP² and KRPM² which operate on the square of the MAP or RPM. You'll notice that these numbers are very small or zero, putting large numbers here will create major problems and/or instability.

    You will also notice that in some cases the coeffcients are negative numbers, there's no reason they can;t be negative, it's just a mapping to a final result after all.

    The good thing here is that in theory you can run 2bar without any operating system mods as the SD zones can be setup for boost as well, in fact some of the northstar engine calibrations do just that.

    Good luck,

    Chris...

    PS. after SEMA i will put as much detail in plain english as possible in the help files, although i have struggled to even explain it to myself and i know the thoery and mathematics behind this stuff quite well.
    Last edited by Bill@HPTuners; 06-23-2011 at 09:55 AM.
    I count sheep in hex...

  2. #2
    HP Tuners Support
    (foff667)
    Bill@HPTuners's Avatar
    Join Date
    Jun 2004
    Location
    Hailing from Parts Unknown
    Posts
    22,776
    I'll read this more thouroughly when i get to work...lot of stuff to take in during one sitting
    Needle, meet haystack

  3. #3
    Tuner
    Join Date
    Aug 2004
    Location
    Qld Australia
    Posts
    166

    Manifold Switch Open/Closed

    Hi Chris,
    I understand the multi-dimensional matrix for zone mapping for a VE table equivalent. Your explanation is pretty clear. Can you clarify for me what the difference is for the "manifold switch open" and manifold switch closed" rows?
    Thanks
    Brian
    Last edited by brh26; 10-16-2006 at 07:01 AM.

  4. #4
    HP Tuners Owner Chris@HPTuners's Avatar
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    5,249
    if the engine is fitted with variable length manifold runner technology, i don't know any production GM engines that are at this stage. Usually these things have a valve that is either open or closed to make the intake runners longer or shorter.

    Chris...
    I count sheep in hex...

  5. #5
    Tuner
    Join Date
    Aug 2004
    Location
    Qld Australia
    Posts
    166

    SD coefficient to tweak

    Chris, Given the formula and the size of the numbers, is it logical to say the Constant Coefficient is the main table to tweak in small increments? Also, can DOD be enabled on the L76 using the appropriate switch?
    Brian
    Last edited by brh26; 10-16-2006 at 07:18 AM.

  6. #6
    HP Tuners Owner Chris@HPTuners's Avatar
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    5,249
    Quote Originally Posted by brh26
    Chris, Given the formula and the size of the numbers, is it logical to say the Constant Coefficient is the main table to tweak in small increments? Also, can DOD be enabled on the L76 using the appropriate switch?
    Brian
    you can try, but beware it will change the transitions between zones. becuase the boundary conditions between zones are no longer accurate.

    enabling and calibrating DoD is a whole new world of hurt, we just put the switch in for those folks that want to turn it off. In anycase i don't think any of the Holden engines have the DoD hardware fitted.
    I count sheep in hex...

  7. #7
    HP Tuners Support
    (foff667)
    Bill@HPTuners's Avatar
    Join Date
    Jun 2004
    Location
    Hailing from Parts Unknown
    Posts
    22,776
    well thanks for the explanation Chris my head is spinning
    Needle, meet haystack

  8. #8
    Tuner Joe6pt0's Avatar
    Join Date
    Mar 2006
    Location
    Indiana
    Posts
    125
    What vehicles/engines use the E67 ECM?
    05 GTO M6 PBM
    1000+HP Home built engine/setup by ME
    ProCharger F1C on E85
    Aluminum LS2 block dowel pinned and line bored 11.8:1 CR 403cid 6.6L
    Lunati Pro crank/billet rods, Weisco turbo/nitrous pistons
    Comp LSr lobe 235/251 .621/.624 115lsa
    Ported AFR245 heads LS3 intake/Ferrera Boost exhaust valves
    Ported and gutted Edlebrock Victor Super intake with elbow and Nick Williams 102
    940rwhp/803rwtq@15psi

  9. #9
    HP Tuners Owner Chris@HPTuners's Avatar
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    5,249
    nice one! fwiw, i just added the full equation including the cams in my first post, try plotting that in 5d
    I count sheep in hex...

  10. #10
    Tuner
    Join Date
    Aug 2004
    Location
    Qld Australia
    Posts
    166

    VE fuelling feature

    I worked out how to smooth the transitions on the graph(at least). Now to try it in the real world. Does this mean this could be a feature in V2.1.16 for histograms and PID's in the scanner at least?
    Brian

  11. #11
    Супер Модератор EC_Tune's Avatar
    Join Date
    Apr 2003
    Location
    Almost 2000 feet.
    Posts
    7,880
    Carneb, mind posting your excel sheet? Me and the latest Excel don't usually get along well together. (BTW: I started out in Lotus 123 in DOS )

    EC
    Always Support Our Troops!

  12. #12
    Tuner carneb's Avatar
    Join Date
    Apr 2006
    Location
    Sydney, Australia
    Posts
    101
    Here is the spreadsheet: http://users.bigpond.net.au/bcar4179...d ve table.xls (165kB)

    I'm hoping to get some feedback from brh26 about the problem with the ridges in the data.

    Generating a VE table from the coefficents isn't too bad. I think the hard bit will be generating the coefficients from a VE table.
    Last edited by carneb; 10-18-2006 at 01:12 AM.

  13. #13
    Quote Originally Posted by carneb

    Generating a VE table from the coefficents isn't too bad. I think the hard bit will be generating the coefficients from a VE table.
    I am currently trying to do just that but it is testing my memory for solving the equation for the coefficient. It is taking a while, but I think I can get there - I hope To do it properly need a fancy simulataneous equation solver or about a billion years manually. I think the MAF is the go to begin with
    Last edited by SSUte01; 11-23-2006 at 05:16 AM.

  14. #14
    Tuner carneb's Avatar
    Join Date
    Apr 2006
    Location
    Sydney, Australia
    Posts
    101
    Quote Originally Posted by SSUte01
    I am currently trying to do just that but it is testing my memory for solving the equation for the coefficient. It is taking a while, but I think I can get there - I hope
    I have been looking online for shareware/freeware programs that will do 3D curve fitting AND let you specify the polynomial equation that is used to calculate the coefficients.

    I found an evaluation copy of one program which works. I input the data from zone 0 of the VE table of my spreadsheet, and the equation, and the coefficients that were generated were exactly the same as the ones I used to generate the table in the first place.

    That means it works, unfortunately it's slow and tedious. You have to enter the data from each zone into the program, generate the coefficients, then do the next zone, etc. Which means every time you do an iteration of logging and adjusting your VE table you have the labourious task of doing all the above!

    I'm sure other people have already come up with easier ways. It would be nice if it was all done in the tuning/scanning software (hint,hint) but I realise this would be a mammoth task.

  15. #15
    Tuner
    Join Date
    Aug 2004
    Location
    Qld Australia
    Posts
    166

    smoothing available in HPT?

    I can't see why existing HPT smoothing filters in VCM Editor couldn't be applied to correct the table and then apply AFR % Error then reapply as we do now.
    Chris is this possible?

    Brian

  16. #16
    Tuner
    Join Date
    Aug 2005
    Location
    Sydney Australia
    Posts
    94
    Quote Originally Posted by carneb
    I have been looking online for shareware/freeware programs that will do 3D curve fitting AND let you specify the polynomial equation that is used to calculate the coefficients.

    I found an evaluation copy of one program which works. I input the data from zone 0 of the VE table of my spreadsheet, and the equation, and the coefficients that were generated were exactly the same as the ones I used to generate the table in the first place.

    That means it works, unfortunately it's slow and tedious. You have to enter the data from each zone into the program, generate the coefficients, then do the next zone, etc. Which means every time you do an iteration of logging and adjusting your VE table you have the labourious task of doing all the above!

    I'm sure other people have already come up with easier ways. It would be nice if it was all done in the tuning/scanning software (hint,hint) but I realise this would be a mammoth task.
    Just a thought, could we regenerate all the SD values so that the constants where relational to each other, this way we could edit only the constants and apply percentages for AFR.
    LS1 LS2 LS7 tuner, L98, LT1 & Haltec

  17. #17
    Quote Originally Posted by SRPerformance
    Just a thought, could we regenerate all the SD values so that the constants where relational to each other, this way we could edit only the constants and apply percentages for AFR.
    I was thinking along similar lines as changing the coefficients should in theory alter the shape of the curve, but the constant will only change the size (height) of the curve. The issue will be whether or not the curve is an accurate reflection of the actual efficieincy of the engine or more likely it is a reasonable compromise.

    I envisage SD tuning this type of arrangment will be quite mandraulic at first because I imagine the way to tackle it is to plot the VE table at whatever resolution you choose, log AFR error, apply that error to the vaules and then (this is the bit I haven't figured out yet although I am interested in what carneb used) solve the simultaneous equation from the new VE values resulting new coefficients. Whether or not this will work in practice or is even the best approach I do not know.

    For those wiser than I, how do you plan to tackle matching commanded AFR to actual AFR.
    Last edited by SSUte01; 10-18-2006 at 10:01 PM.

  18. #18
    Tuner carneb's Avatar
    Join Date
    Apr 2006
    Location
    Sydney, Australia
    Posts
    101
    I've made some changes and additions to the spreadsheet. It's a bit of a dogs breakfast so I hope you can follow it.

    I've moved the chart next to the zone coefficents table so that you can see any changes straight way.

    Ive added a BEN table and a new VE table. (My appologies, I haven't used HPtuners, only Flashscan, so I don't know if BEN is used in HPT. Basically it is generated in the scan tool from a histogram which looks at the ratio of commanded AFR to measured AFR from WB02). The BEN table would be copied across from a histogram in the scan/logging tool. This BEN data is then multiplied by the VE table to give the new VE table.

    Next it gets really messy. I found a demo copy of a mathematical program which will generate the new coefficients. It likes its data in a certain form which is what all the mess is down the bottom left hand corner. I also had to manually copy/paste the data from excel into the program, then copy paste the coefficents back into excel which is very time consuming.

    I put some fictitious figures in the BEN table and went through the process of generating the new coefficients. You can see the new coefficients in the zone coefficients table and the graph. The graph now has ridges in it because of the changes and the whole process seemed to work.

    I'm going to see if I can make things easier and automate things. Don't hold your breath though as I'm not a computer programmer.

    I'm expecting someone to post up and say " why are you doing it that way? Here's a much easier way!"

    http://users.bigpond.net.au/bcar4179... table V11.xls 372 kB

  19. #19
    Tuner
    Join Date
    Aug 2004
    Location
    Qld Australia
    Posts
    166

    non-linear regression analysis

    carneb,
    I sent you a couple of pm's. I ahve been dabbling in the mystic arts of non-linear progression trying to follow your process to date. It looks good.
    However, as you said it is time-consuming and mentally taxing .
    I think a few macros and/or VB programming can automate the process a lot.
    It will be interesting to see how tweaking the coefficients this way makes the car behave. Now where is that VE SS-V owner......

    Brian

  20. #20
    Tuner checkmate's Avatar
    Join Date
    Oct 2004
    Location
    Clinton Township, MI
    Posts
    75
    My head hurts.
    97 Ram 5.2L 4x4 auto
    99 Camaro SS