Notices
ECU Flash

does the Evo 1-9 adjust timing to fractions of a degree?

Thread Tools
 
Search this Thread
 
Old Dec 16, 2009, 07:43 AM
  #1  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 129 Likes on 97 Posts
does the Evo 1-9 adjust timing to fractions of a degree?

I started working my way through the ignition retard limit code last week when I realized that the ignition timing parameters at MUT05 and MUT06 are not the actual values used by the ECU. In the first part of the ignition advance determination code, the code takes the ignition timing from the ignition timing advance tables and then applies all the environment related trims. I'll call this IgnLookup. This value gets rescaled to what I'll call IgnECUTemp

IgnECUTemp = 231 - 256/90*IgnLookup

After this occurs, the code then adds knocksum and some other value I'm still working to understand:

IgnECUTemp = 231 - 256/90*IgnLookup + KSUM + UNK

This is how KSUM affects timing. Then the code applies the ignition retard limit:

IgnECUTemp = constrained{231 - 256/90*IgnLookup + KSUM + UNK}

A few other calculations are performed that I'm working to understand, but ultimately, this Temp value gets written to another ignition timing variable:

IgnECU = IgnECUTemp

It appears that this IgnECU value is used to generate the actual ignition spark timing. It is also used to create the value that we have been logging for ages:

IgnMUT06 = 81 - (IgnECU - 42)*90/256 [This is the (x-20) scaling.]

IgnMUT05 = 61 - (IgnECU - 42)*90/256 [This is the (x) scaling.]

So, what's the big deal? I suspect that the Evo actually adjusts timing to fractions of a degree, but because MUT05 and MUT06 are always integer values, we never see it.

If anyone wants to try logging the IgnECU value, a MUT channel needs to be setup. I think most people are still using the x-20 scaling (MUT06), so the easiest thing to do is to overwrite MUT05:

Open up your MUT table in ECUFlash and write the following value to MUT05 according to your ROM:

8859 ROMs: 0x6DE3
9653 ROMs: 0x8C17
9417 ROMs: 0x8BEB

Save the ROM and flash it to your ECU.

Then create the following entry in your EvoScan Data.xml file:

<DataListItem DataLog="Y" Color="" Display="ECU Timing Advance" LogReference="ECUTimingAdv" RequestID="05" Eval="61 - (x - 42)*90/256" Unit="deg" MetricEval="" MetricUnit="" ResponseBytes="1" GaugeMin="-20" GaugeMax="50" ChartMin="-20" ChartMax="50" ScalingFactor="1" Notes="" Priority="1" Visible="False" />
Old Dec 16, 2009, 07:47 AM
  #2  
Former Sponsor
iTrader: (2)
 
FTY Motorsports's Avatar
 
Join Date: Sep 2009
Location: california
Posts: 189
Likes: 0
Received 0 Likes on 0 Posts
so will this let us adjust timing to fractions of a degree like subarus?
Old Dec 16, 2009, 08:01 AM
  #3  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 129 Likes on 97 Posts
Originally Posted by FTY Motorsports
so will this let us adjust timing to fractions of a degree like subarus?
Eventually, it may be possible, but it would take a decent size patch to do it.
Old Dec 16, 2009, 08:25 AM
  #4  
Evolved Member
 
acamus's Avatar
 
Join Date: Mar 2008
Location: Lattitude 48.38°, Longitude 17.58°, Altitude 146m = Slovakia, for common dude
Posts: 730
Likes: 0
Received 3 Likes on 2 Posts
Nice, now we finally have the formula for degree per knocksum

KSUM * 90 /256 = ignition retard
Old Dec 16, 2009, 08:41 AM
  #5  
EvoM Moderator
iTrader: (10)
 
scheides's Avatar
 
Join Date: Oct 2006
Location: Minneapolis
Posts: 4,827
Likes: 0
Received 12 Likes on 6 Posts
Originally Posted by acamus
Nice, now we finally have the formula for degree per knocksum

KSUM * 90 /256 = ignition retard
Seems about right with what I've heard, 1/3 degree per knock sum, or 1 full degree per 3 counts.
Old Dec 16, 2009, 08:54 AM
  #6  
Evolved Member
iTrader: (2)
 
l2r99gst's Avatar
 
Join Date: Mar 2004
Location: CA
Posts: 3,499
Likes: 0
Received 4 Likes on 4 Posts
Yep, I think I have posted that several times in the past. Nice to finally see it disassembled in the ECU. (Edit: Actually a quick search shows that John mentioned this as well when he was disassembling the knock/ignition routines).

mrfred, I could probably log that variable today on the way to the gym if you want some data. No reflashing necessary with LiveMap, so it makes it easy. But, just looking at the formula, the results are obviously going to be in fractions of a degree.


Eric

Last edited by l2r99gst; Dec 16, 2009 at 09:05 AM.
Old Dec 16, 2009, 09:08 AM
  #7  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 129 Likes on 97 Posts
Originally Posted by l2r99gst
Yep, I think I have posted that several times in the past. Nice to finally see it disassembled in the ECU. (Edit: Actually a quick search shows that John mentioned this as well when he was disassembling the knock/ignition routines).

mrfred, I could probably log that variable today on the way to the gym if you want some data. No reflashing necessary with LiveMap, so it makes it easy. But, just looking at the formula, the results are obviously going to be in fractions of a degree.


Eric
Because the base timing is all done with integer values, fractional amounts of timing will mostly likely only show up when there's knock, so if you could generate some knock while you're logging, that would be great.

Last edited by mrfred; Dec 16, 2009 at 09:11 AM.
Old Dec 16, 2009, 09:11 AM
  #8  
Evolved Member
iTrader: (6)
 
donour's Avatar
 
Join Date: May 2004
Location: Tennessee, USA
Posts: 2,502
Received 1 Like on 1 Post
Originally Posted by mrfred
Eventually, it may be possible, but it would take a decent size patch to do it.
I can see that, though a scaling factor in the lookup routine might get you 80% there, no? Most of the timing maps that I've seen only use about 20% of the 8bit space.

d
Old Dec 16, 2009, 09:15 AM
  #9  
Evolved Member
iTrader: (6)
 
donour's Avatar
 
Join Date: May 2004
Location: Tennessee, USA
Posts: 2,502
Received 1 Like on 1 Post
Originally Posted by mrfred
Because the base timing is all done with integer values, fractional amounts of timing will mostly likely only show up when there's knock, so if you could generate some knock while you're logging, that would be great.
Really? I have to concede my ignorance here. What do the interpolation routines look like?

d
Old Dec 16, 2009, 09:39 AM
  #10  
Evolved Member
iTrader: (2)
 
l2r99gst's Avatar
 
Join Date: Mar 2004
Location: CA
Posts: 3,499
Likes: 0
Received 4 Likes on 4 Posts
Originally Posted by mrfred
Because the base timing is all done with integer values, fractional amounts of timing will mostly likely only show up when there's knock, so if you could generate some knock while you're logging, that would be great.
That's not a problem. I can generate knock pretty easily, I think.

But, what I was saying is that, based on your formula, that new eval is going to be in fractions of a degree, no matter what. It will be a multiple of 90/256, which always has some decimal value to it.

For example:
PHP Code:
0.3515625    1    0.3515625
0.3515625    2    0.703125
0.3515625    3    1.0546875
0.3515625    4    1.40625
0.3515625    5    1.7578125
0.3515625    6    2.109375
0.3515625    7    2.4609375
0.3515625    8    2.8125
0.3515625    9    3.1640625
0.3515625    10    3.515625
0.3515625    11    3.8671875
0.3515625    12    4.21875
0.3515625    13    4.5703125
0.3515625    14    4.921875
0.3515625    15    5.2734375
0.3515625    16    5.625
0.3515625    17    5.9765625
0.3515625    18    6.328125
0.3515625    19    6.6796875
0.3515625    20    7.03125
0.3515625    21    7.3828125
0.3515625    22    7.734375
0.3515625    23    8.0859375
0.3515625    24    8.4375
0.3515625    25    8.7890625
0.3515625    26    9.140625
0.3515625    27    9.4921875
0.3515625    28    9.84375
0.3515625    29    10.1953125
0.3515625    30    10.546875
0.3515625    31    10.8984375
0.3515625    32    11.25
0.3515625    33    11.6015625
0.3515625    34    11.953125
0.3515625    35    12.3046875
0.3515625    36    12.65625
0.3515625    37    13.0078125
0.3515625    38    13.359375
0.3515625    39    13.7109375 

Last edited by l2r99gst; Dec 16, 2009 at 09:44 AM.
Old Dec 16, 2009, 09:50 AM
  #11  
Evolved Member
iTrader: (8)
 
03whitegsr's Avatar
 
Join Date: Nov 2006
Location: Utah
Posts: 4,001
Received 15 Likes on 13 Posts
Very interesting, great work mrfred. It produces some pretty interesting results.

Here is a quick table of how the values in the main ignition table would equate to actual ignition advance, if you disregard any corrections, KSUM and the unknown variable. I also wasn't sure what the contraint was, so I did not try to include it at all.



Here is what happens if the ignition advance is held constant and the KSUM increases.


The table seems to be about 5 degrees low across the board. Maybe it's just coincidence, but does that unknwon table tend to add in 5 degrees under most situations? Actually, doesn't the ECU see the falling edge of the crank trigger 5 degrees early? Thus 0 in the table and the signal being 5 degree BDC would actually cause 5 degrees of retard?
Attached Thumbnails does the Evo 1-9 adjust timing to fractions of a degree?-ignition-timing.jpg   does the Evo 1-9 adjust timing to fractions of a degree?-ignition-timing2.jpg  

Last edited by 03whitegsr; Dec 16, 2009 at 09:53 AM.
Old Dec 16, 2009, 09:58 AM
  #12  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 129 Likes on 97 Posts
Originally Posted by donour
Really? I have to concede my ignorance here. What do the interpolation routines look like?

d
All the timing tables are scaled 1:1 with actual degrees timing, and because the ECU only deals with integer values, the final result is an integer value even after interpolation between cells. This value is then converted into units closer to the ECU timing units (different only by an offset).

Originally Posted by l2r99gst
That's not a problem. I can generate knock pretty easily, I think.

But, what I was saying is that, based on your formula, that new eval is going to be in fractions of a degree, no matter what. It will be a multiple of 90/256, which always has some decimal value to it.
I see what you're saying. Because of the math, you'll see fractional degrees, but when you log, I suspect when there is no knock, you'll see 0, 1.05, 2.11, 3.16, etc. When knock occurs, you'll see values in between these.

Last edited by mrfred; Dec 16, 2009 at 10:00 AM.
Old Dec 16, 2009, 10:08 AM
  #13  
Evolved Member
iTrader: (30)
 
JohnBradley's Avatar
 
Join Date: Jan 2004
Location: Northwest
Posts: 11,398
Received 70 Likes on 52 Posts
I am not sure if it is in use in the test cars, but make sure to disable the EGR advance table (set to 0) to make sure you arent getting errant readings. For awhile I had suspected the Timing Alpha value to be the EGR advance since it was a value that had no other table that would match up. I have long since stopped logging it, but I have the data in the "what does your Evoscan xml look like thread".

I will look for the appropriate values if it will help.

Last edited by JohnBradley; Dec 16, 2009 at 04:13 PM.
Old Dec 16, 2009, 10:19 AM
  #14  
Evolved Member
iTrader: (8)
 
03whitegsr's Avatar
 
Join Date: Nov 2006
Location: Utah
Posts: 4,001
Received 15 Likes on 13 Posts
Just throwing out a thought here, and I realize this is a little difficult as it would require probably rescaling a whole bunch of other tables and may cause issues with conditionals.

But essentially changing the code here:
IgnECUTemp = 231 - 256/90*IgnLookup

to

IgnECUTemp = 231 - 256/180*IgnLookup

Would essentially give 0.5 degree resolution without changing the knock sum effects?
Old Dec 16, 2009, 10:19 AM
  #15  
Evolved Member
iTrader: (30)
 
JohnBradley's Avatar
 
Join Date: Jan 2004
Location: Northwest
Posts: 11,398
Received 70 Likes on 52 Posts
https://www.evolutionm.net/forums/5485240-post9.html


Quick Reply: does the Evo 1-9 adjust timing to fractions of a degree?



All times are GMT -7. The time now is 12:17 AM.