May 20, 2012, 12:48:56 PM

Author Topic: VE Tuning sheet  (Read 3715 times)

snapc33

  • WEREWOLF Owner
  • *
  • Posts: 86
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: HX40
VE Tuning sheet
« on: February 20, 2011, 06:39:49 AM »
I have been working on this for a little while now.  My goal was to create a spreadsheet that automaticly adjusts your VE table according to a log.  My idea came from Megalogviewer used with Megasquirt. 

The one assumption most of this is based on is that when the rpm and map are between numbers on the tables, that the values are linear interpolated.  If we find out this is not how to ECU functions then it can be changed.

It seems a little tedious to get setup at first but once once you run through it once its simple.
There are multiple sheets,  The first one is instructions, that will get you going (hopefully).

To give you an example on how it works we will examine an idle log row from my car.
Say we are idling at 850 rpm at -16 map.  The sheet will round up and down the rpm to the nearest 500, and the map up and down to the next highest and lowest value on the VE table.
In this case we get  500 and 1000 rpm, and -18 and -13 map. 

This gives us the 4 cells that are being examined at the current values:
500 X -18, 1000 X -18, 500 X -13, 1000 X -13

For ease of calculation lets say these values are 25, 30, 35, 40, correspondingly.



So at 850 rpm and -16 map we are in between these 4 values.  To find out exactly what value is being calculated we need to use interpolation.

So at our 850 rpm:  to get the interpolation from 500-1000 rpm:
(850-1000)/(500-1000)= 0.3
1-0.3=0.7
This means that between 500 and 1000,  850 is 30% 500 and 70% 1000
Thinking about it, it makes sense because if we were at 501 RPM: (501-1000)/(500-1000)=499/500=0.998 ,  So we are 99.8% at 500 RPM.

We can do the same thing for the maps:
At out -16 map: interpolation from -18 to -13:
(-16-(-13))/((-18-(-13))= 0.6
1-0.6=0.4
This means that between -18 and -13, -16 is 60% -18 and 40% -13

Now we can find the percentages of each VE value that make up our calculated VE at our point by multiplying the row vs column percentages.



We can see that these percentages will add to 100%
Multiplying the percents by the VE numbers at those points we can get the calculated VE for our point.



So our calculated VE for 850 RPM and -16 Map is 32.5

A similar routine is used at each point with RPM vs Load to find out what the AFR is on the fuel table. If you have the fuel table flattened out then it will calculate out the that value.  It is set up this way so that even if you don’t have the table flattened out, it will still calculated the needed VE to hit that AFR.

So lets say that at our point 850 RPM and -16 Map, the logged AFR was 12.00, and the targeted AFR is 14.7.  By dividing (12.0)/(14.7)= 0.816. 
This Percentage (81.6) is what we need to multiply by our current VE to get a new VE number that will mathematically corresponding with the new AFR

So from before our VE number was 32.5,  32.5(0.816)=26.52.  This is our new VE number.

This could be achieved by changing any 1 of the 4 cells by an amount so after taking the percentages of each cell it results in 26.52.  This would not give us a smooth table, so we need to make the result of the 4 cells equal to 26.52 by adding an amount to each cell proportional to the weight of each cell.

So to find the percentage change at each cell we do:
1+[(calculated VE - current VE)*(cells percentage)/(cells VE)] 
So for our 800 RPM and -16 Map at the top left cell:
1+[(26.52-32.5)*(0.18)/(25)] =  0.967
So our upper left cell, 25 needs the be multiplied by .967 to get the new VE for that point.
This is done for all 4 cells involved.

At this point we have the needed changes for the 4 VE cells used at out idle of 850 RPM and -16 Map.

After all these percentages are found and recorded in relation to the point they modify.  The points are  then averaged at each point over the entire log, this makes up the VE % Modifier table. 

These percentages are multiplied by your provided VE table and the new VE table is Generated.


Alright So I'm sure I messed something up along the way So please take caution when using this.  Make sure you check the VE % modifier table(the upper one) To make sure it isnt trying to make some stupid change like 50%.

I have driven around and logged, plugged it in then tried it out again, and it is just about dead on.
Pivot tables will most likely do the same thing but this is pretty sweet and I believe it will be more accurate then rounding and averaging values like the pivot table does.

I’m working on an Excel version.  Only a few changes need to be made as Excel using a different notation on referencing a cell on another sheet.

Right now the VE % modifier tables will only sum down to row 9994.  So don’t use a log bigger then that,  even if you do you better have a good computer because it will lock mine up while it is calculating.

60mm 8 blade HX35/40 , Treadstone manifold, Tial waste gate, custom 3" turbo back exhaust, Comp 100200's, 1200's, Air to water intercooler, Jacks transmission, AEM big brakes, Ksports, Werewolf

snapc33

  • WEREWOLF Owner
  • *
  • Posts: 86
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: HX40
Re: VE Tuning sheet
« Reply #1 on: February 20, 2011, 10:53:07 AM »
oops here the sheet.

VE tuning sheet v.01.ods

Not sure how to upload a file but thats a link to it.

Also you need to uses the compensation VE table with this.
60mm 8 blade HX35/40 , Treadstone manifold, Tial waste gate, custom 3" turbo back exhaust, Comp 100200's, 1200's, Air to water intercooler, Jacks transmission, AEM big brakes, Ksports, Werewolf

Airmail96

  • Full Member
  • ***
  • Posts: 96
  • Car Ramrod
    • 1993
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: 16G
Re: VE Tuning sheet
« Reply #2 on: February 26, 2011, 04:42:26 AM »
 :clap great work man, haven't really gotten a chance to try it out myself, but it def. looks promising. 
Jason
Stock motor, small16g, stock smic, -6an feed line, walboro 255

Future: FP2s, T/S HX-40 (8-Blade), Red Jack Racing T/S Manifold, FMIC, Tial Q, Hawver Intake Manifold, Walboro 255lph x2, Fuel Pump Rewire, Tial MV-S x2.  HE351Ve VGT(on the back burner),

Spectre22

  • JACKAL Owner
  • *
  • Posts: 25
    • 1992
    • Eclipse GSX
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: EVO III
Re: VE Tuning sheet
« Reply #3 on: February 26, 2011, 07:11:11 PM »
This looks Awesome great job!!! :clap Alot better than the program I wrote in python for calculating new VE
92 GSX auto, Evo III 16g ported, DSMap, FP exaust manifold, Punishment racing Intercooler piping, Innovative LC1, Tubular o2 housing, 3" downpipe, Greddy BOV, FP 255 fuel pump, FIC 750cc injectors, AFPR set at 43psi

snapc33

  • WEREWOLF Owner
  • *
  • Posts: 86
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: HX40
Re: VE Tuning sheet
« Reply #4 on: March 14, 2011, 09:54:14 AM »
Fixed an error in a formula.  Works correctly now.

VE tuning sheet_v0.2.ods
60mm 8 blade HX35/40 , Treadstone manifold, Tial waste gate, custom 3" turbo back exhaust, Comp 100200's, 1200's, Air to water intercooler, Jacks transmission, AEM big brakes, Ksports, Werewolf

John_H

  • JACKAL Owner
  • *
  • Posts: 227
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: gt3076r
Re: VE Tuning sheet
« Reply #5 on: March 14, 2011, 11:57:20 PM »
really great work man!!!   :clap

Its way over my head so I probably won't ever use it, but its awesome!!

If you could figure out a way to incorporate that into the program itself, THAT would be a gift from the gods. 

think about it.  you start the car, hook up the logger and tuning cable, start Jackal, have it set to start logging at your set parameters.

go drive the car.

Stop, look at logs, hit a button and watch the changes in your VE and timing and boost control tables.

Go drive again, check logs, make some fine tuning adjustments as you see fit.

Put all laptops and cables away.

Go drive the car for fun with nothing else to do.  Take it to the track and beat on Corvettes.

Ibbanez

  • WEREWOLF Owner
  • *
  • Posts: 197
    • 1990
    • Talon TSI AWD
    • Motor: 4G63 2.3L (stroked)
    • Head: 1G (large ports)
    • Turbo: FP3065
Re: VE Tuning sheet
« Reply #6 on: March 15, 2011, 01:57:57 AM »
Hmmmmm.......Im forseeing something in the near future in my crystal ball......There may be something on the horizon...... oooooooooooooo oooooooooooooo oooooooo :whistling   8;)  While a quick little version of mine wont be exactly what your asking for, it will be easy.  What your asking for is what is called auto tune.  While I believe that will eventually be a feature in Werewolf, it wont be in Jackal.  Another thing is Autotune is ok for somethings, its not gonna change you boost control table.  Thats just to dangerous and all that stuff.  Also, auto under WOT conditions arent really ideal, expecially since a lot of calculations would be going on all at the same time to try and make adjustments.  If it were me and autotune was out now.  I might be inclined to use it for help settingup vacuum areas, but would never use it for boost.  Tuning is just to easy to take the change under boost.  Now my version will be an executable program that you can run, it'll look similar to Jackal and Werewolf with the AFR table, VE table, and a new VE table.  Now you'll have to input your afr and ve numbers, but then you would open the log file and the program will do the rest.  that is my goal anyways.  Im working on a few things right now, plus working with the author of this thread so maybe something will come of this sort of.  :)
Built 2.3 and head,shep stage 4 tranny w/ welded center diff, 1000cc inj, fp3065, dnp mani,Magnus v5 Cast IM, meth kit, eboost 2 ebc, ksport pro coilovers, 5Zigen ZR+ 17x8, Hoosier Drag Radials, 10 pt roll cage, and loads and loads of suspension stuff

John_H

  • JACKAL Owner
  • *
  • Posts: 227
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: gt3076r
Re: VE Tuning sheet
« Reply #7 on: March 15, 2011, 09:16:19 AM »
sounds good!

I don't see why boost control couldn't be used in an auto tune situation. not for adding boost, but for pulling it when lots of knock comes on.

Ibbanez

  • WEREWOLF Owner
  • *
  • Posts: 197
    • 1990
    • Talon TSI AWD
    • Motor: 4G63 2.3L (stroked)
    • Head: 1G (large ports)
    • Turbo: FP3065
Re: VE Tuning sheet
« Reply #8 on: March 15, 2011, 11:53:54 AM »
Honestly, Im not sure how hard it would be to add that to the code or if there is even any room left for more new code.  Now my Eboost2 ebc has an overboost function, that bleeds the boost down like 15 psi as soon as the overboost limit is hit.  Only thing in the ecu with knock is it pulls timing.  But hey maybe it can be changed, maybe not.  Idk....
Built 2.3 and head,shep stage 4 tranny w/ welded center diff, 1000cc inj, fp3065, dnp mani,Magnus v5 Cast IM, meth kit, eboost 2 ebc, ksport pro coilovers, 5Zigen ZR+ 17x8, Hoosier Drag Radials, 10 pt roll cage, and loads and loads of suspension stuff

John_H

  • JACKAL Owner
  • *
  • Posts: 227
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: gt3076r
Re: VE Tuning sheet
« Reply #9 on: March 15, 2011, 09:30:51 PM »
oh its a good idea if knock pulls timing.  I think the code also enriches it a bit.

If the boost controlled auto tune is out, hey, no problem, that is a variable I can easily and simply take care of myself.

A nice auto tune to get things worked out would be the sHIZZAAyyy!!  Fine tune on your own, but the auto tune could get any combination of cams, head, compression, turbo, exhaust, intake, fuel system, altitude, temp etc under control in a few pulls any time all the time.

And a good robust closed loop system could keep things that way for all but big boost situations.

Ibbanez

  • WEREWOLF Owner
  • *
  • Posts: 197
    • 1990
    • Talon TSI AWD
    • Motor: 4G63 2.3L (stroked)
    • Head: 1G (large ports)
    • Turbo: FP3065
Re: VE Tuning sheet
« Reply #10 on: March 16, 2011, 08:31:06 PM »
Now snap33 I know I have been talking with you in pm's lately, but ive been thinking about something.  Ok I know your spreadsheet takes the logs and everything and then does the calculations to it.  Now here is my question.....Is it doing the calculations line by line from the log??? Im asking this because of the interpolation calculations involved.  I ask this because I see a flaw in the two ways it can be done the more I think about it.  1st, if it does it line by line, then its constantly going to be changing its values based on wrong numbers.  For example, first line changes say cell 3500 rpm x -18 inHG from say 73.4 to 78.9.  Then what if the next line in the log is cell 3500 rpm x -18 inHG and then it'll do that calculations based on the already changed ve number.  So then we have adjustments that are based on already changing numbers without new logs to verify the changes.  Is this making since to anyone other than me.  Now the next thought is this, how can you do the interpolation calculations based on partial numbers inbetween the main set points for the same reasons above.  Now I am not knocking this by any means, cuz as you know I honestly love the idea and thats why I was talking to you about me writing a full fledged program to do this for us.  But the more I started thinking about it and looking over your spread sheets, this idea popped in my head.  Maybe Im missing something, but it doesnt seem very relavant because its not logging at the same time the changes are being made.  Im not sure how we could work around this or not.  Let me know what you think and others please chime in with ideas cuz Id like this to work out and continue.  Thanks.


PS... I know I posted this on another site, but its only because Id like to get feedback so that we can look into this.  I still wanna work with you on writing a program that reads the logs and adjusts everything.  call it a group homebrew open source project :)  All Jackal and Werewolf coders unite :)  hahahahahaha
Built 2.3 and head,shep stage 4 tranny w/ welded center diff, 1000cc inj, fp3065, dnp mani,Magnus v5 Cast IM, meth kit, eboost 2 ebc, ksport pro coilovers, 5Zigen ZR+ 17x8, Hoosier Drag Radials, 10 pt roll cage, and loads and loads of suspension stuff

eclipsegst1990

  • WEREWOLF Owner
  • *
  • Posts: 64
    • 1991
    • Galant VR-4
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: E316g
Re: VE Tuning sheet
« Reply #11 on: March 20, 2011, 10:28:13 AM »
I have 17 map rows for the AFR table in Werewolf, will this make much of a difference?  Load row headings correspond with the load row headings for VE table (17 of them).   Rpm column starts at 750 and goes to 10000.  I know I can just stop at 8000, but they don't match up 8000 regardless. 

In VE table, werewolf starts at 750 rpm, I assume changing the header rows won't matter, but I have 18 columns starting at 750 going up to 8000 (actually stops at 10000).  Can I just edit the chart and add a column?  I just want everything to match...if it makes much of a difference. 
FIC-1150s, Walbro 255, EGT gauge, AEM Uego gauge, Evo3-16g not ported, Tial 38mm wastegate O2 housing, Accel 300+ wires, stock ignition, JE 8.5:1 pistons, Ferrea valves 3mm over, titanium retainers, dual springs, stock cams, stock trans, 3" turbo back exhaust (Apexi-no cat), Ostrich w/ 3bar GM map.

snapc33

  • WEREWOLF Owner
  • *
  • Posts: 86
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: HX40
Re: VE Tuning sheet
« Reply #12 on: March 22, 2011, 11:03:38 AM »
Right now the afr lookup references the logged load value.  I will make a version that will work with the values you need.   If you can just tell the the rows and columns of the VE and AFR tables, I can get it going for you.
60mm 8 blade HX35/40 , Treadstone manifold, Tial waste gate, custom 3" turbo back exhaust, Comp 100200's, 1200's, Air to water intercooler, Jacks transmission, AEM big brakes, Ksports, Werewolf

eclipsegst1990

  • WEREWOLF Owner
  • *
  • Posts: 64
    • 1991
    • Galant VR-4
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: E316g
Re: VE Tuning sheet
« Reply #13 on: March 22, 2011, 04:28:05 PM »
This is what I'm looking at as far as values for Werewolf.  Although this was cut off, the rpm values go all the way to 10000.  Let me know if you can help.  It will be appreciated.  If not, I'll try to go through the code myself and see what I can do.  I know it is tedious and a lot of work for you. 


FIC-1150s, Walbro 255, EGT gauge, AEM Uego gauge, Evo3-16g not ported, Tial 38mm wastegate O2 housing, Accel 300+ wires, stock ignition, JE 8.5:1 pistons, Ferrea valves 3mm over, titanium retainers, dual springs, stock cams, stock trans, 3" turbo back exhaust (Apexi-no cat), Ostrich w/ 3bar GM map.

snapc33

  • WEREWOLF Owner
  • *
  • Posts: 86
    • 1991
    • Talon TSI AWD
    • Motor: 4G63 2.0L
    • Head: 1G (large ports)
    • Turbo: HX40
Re: VE Tuning sheet
« Reply #14 on: March 22, 2011, 04:52:00 PM »
Ill get it done.
60mm 8 blade HX35/40 , Treadstone manifold, Tial waste gate, custom 3" turbo back exhaust, Comp 100200's, 1200's, Air to water intercooler, Jacks transmission, AEM big brakes, Ksports, Werewolf