does the Evo 1-9 adjust timing to fractions of a degree?
#1
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" />
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" />
#6
Evolved Member
iTrader: (2)
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
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.
#7
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
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 mrfred; Dec 16, 2009 at 09:11 AM.
Trending Topics
#10
Evolved Member
iTrader: (2)
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.
#11
Evolved Member
iTrader: (8)
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?
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?
Last edited by 03whitegsr; Dec 16, 2009 at 09:53 AM.
#12
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.
#13
Evolved Member
iTrader: (30)
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.
I will look for the appropriate values if it will help.
Last edited by JohnBradley; Dec 16, 2009 at 04:13 PM.
#14
Evolved Member
iTrader: (8)
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?
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?