how ECU calculates its final value
how ECU calculates its final value
It seems there is a misconception on how the ECU gets its final timing value. People think its a basic averaging of the 2 closest cells. i.e. x1 + x2 / 2
this is not correct. The ECU actually uses a weighted mean average.
actually formula is x(final value) = w1x1 +w2x2 +......wnxn / (w1+w2+.....wn)
lets take a 1 map 2 cell example for simplicity.
say your actually load is 255 (2byte load), say on your map its between load 240 and 260 cells and on your map 240 = 14 and 260 = 10
since 255 is more closer to load 260 than 240, its value weights more than 240.
i.e. 260 = 75% weight and 240 = 25% weight. because 255 is 75% closer to 260 than 240
so using the equation. 14(25) + 10(75) / 25+75 which equals 11.
the misconception average way would equal 14+10/2 = 12.
But in real life the ECU uses 2 maps to interpolate the final value from timings maps.
if your between load cells , equation would take 2 cells from each timing map giving you 4 x's with the following equation.
using above values to represet map 1. just plut in x3 w3 x4 w4 from map 2.
14(25) + 10*75) + x3w3 + x4w4 / 25+75 + w3+w4
if you view your logs you will see this is exactly how it works.
this is not correct. The ECU actually uses a weighted mean average.
actually formula is x(final value) = w1x1 +w2x2 +......wnxn / (w1+w2+.....wn)
lets take a 1 map 2 cell example for simplicity.
say your actually load is 255 (2byte load), say on your map its between load 240 and 260 cells and on your map 240 = 14 and 260 = 10
since 255 is more closer to load 260 than 240, its value weights more than 240.
i.e. 260 = 75% weight and 240 = 25% weight. because 255 is 75% closer to 260 than 240
so using the equation. 14(25) + 10(75) / 25+75 which equals 11.
the misconception average way would equal 14+10/2 = 12.
But in real life the ECU uses 2 maps to interpolate the final value from timings maps.
if your between load cells , equation would take 2 cells from each timing map giving you 4 x's with the following equation.
using above values to represet map 1. just plut in x3 w3 x4 w4 from map 2.
14(25) + 10*75) + x3w3 + x4w4 / 25+75 + w3+w4
if you view your logs you will see this is exactly how it works.
Which two maps does it calculate from? The high and low octane ignition maps?
Here is an example I tried. At 3562 RPM I have timing of 3 and 225 2-byte load.
High octane ignition at 3500, 220 = 4, 240 = 2
Low octane ignition at 3500, 220 = -2, 240 = -5
225 is 75% with 220
225 is 25% with 240
so
220 gets 75
240 gets 25
75(4) + 25(2) + 75(-2) + 25(-5) / (75 + 25 + 75 + 25) = 0.375
I noticed if I don't count the low-octane map then I get
75(4) + 25(2) / (75 + 25) = 3.5
And my log got 3 which would be correct if we're rounding down.
So maybe the ECU starts using the low-octane map (interpolating) when the octane number starts decreasing as I've always though.
Here is an example I tried. At 3562 RPM I have timing of 3 and 225 2-byte load.
High octane ignition at 3500, 220 = 4, 240 = 2
Low octane ignition at 3500, 220 = -2, 240 = -5
225 is 75% with 220
225 is 25% with 240
so
220 gets 75
240 gets 25
75(4) + 25(2) + 75(-2) + 25(-5) / (75 + 25 + 75 + 25) = 0.375
I noticed if I don't count the low-octane map then I get
75(4) + 25(2) / (75 + 25) = 3.5
And my log got 3 which would be correct if we're rounding down.
So maybe the ECU starts using the low-octane map (interpolating) when the octane number starts decreasing as I've always though.
Lemmon is referring to interpolation when the actual values are between rows and columns ... for instance, 232 load @ 5850 RPM. This refers to only a single map.
I believe this came up when someone mentioned interpolation between the multiple high octane maps on the IX ECU. As Lemmon explains it, the ECU is always referencing the nearest 4 cells to calculate a value ... if the ECU is always interpolating between ignition maps, then there are technically 8 cells being referenced at any given time. This would only happen on an IX ECU.
When octane drops, the ECU does begin to interpolate the low octane map as you've stated. I've mentioned a few times that I've seen the low octane map considered even with an octane value of 100. I don't think that's been proven or disproven ... it's been generally ignored.
I believe this came up when someone mentioned interpolation between the multiple high octane maps on the IX ECU. As Lemmon explains it, the ECU is always referencing the nearest 4 cells to calculate a value ... if the ECU is always interpolating between ignition maps, then there are technically 8 cells being referenced at any given time. This would only happen on an IX ECU.
When octane drops, the ECU does begin to interpolate the low octane map as you've stated. I've mentioned a few times that I've seen the low octane map considered even with an octane value of 100. I don't think that's been proven or disproven ... it's been generally ignored.
lemmonhead,
Some people may have had or do have this misconception, but many people, including myself, have stated that is uses weigthed averages from the beginning.
I think some people just form their own, incorrect understanding sometimes and go with that. All you have to do is go read through some other subforums on this site.
You make a good point though, and it's good to clear up some misunderstandings when you see them more and more often. I read so many posts where people just don't get the basics, but since the mods don't sticky anything in this forum, you see some of the same questions and mistakes over and over.
Eric
Some people may have had or do have this misconception, but many people, including myself, have stated that is uses weigthed averages from the beginning.
I think some people just form their own, incorrect understanding sometimes and go with that. All you have to do is go read through some other subforums on this site.
You make a good point though, and it's good to clear up some misunderstandings when you see them more and more often. I read so many posts where people just don't get the basics, but since the mods don't sticky anything in this forum, you see some of the same questions and mistakes over and over.
Eric
your data fits perfect,
I will try to be precise as I can, I know all this math is a drag.
ok first here is the data you provided.
ECU actual load 225 w/3.0 timing
#1 load timing #2load timing
220 4 240 2 (high octane)
220 -2 240 -5 (low octane)
weighted average #1 map
75(4) + 25(2) / (75 + 25) = 3.5
weighted average #2 map
-75(2) + -25(5) / (75+25) = -2.75
now because of ECU algorithm be it knocking, temp or whatever.. it decides to interpolate between both maps. Now there are many ways to interpolate.
From my own logs I think the ECU uses bilinear interpolation.
b1+b2x+b3y+b4xy where b1 = f(0,0)
b2= f(1,0)-f(0,0)
b3=f(0,1)-f(0,0)
b4=f(0,0)-f(1,0)-f(0,1)+f(1,1)
using your data f(0,0)=-2.00
f(0,1)=4
f(1,0)=-2.75
f(1,1)= 3.5
this gives you the equation -2-4.75x+6y+.25xy
x is the difference from load to nearest load so its 225-220 = 5
this gives y= 25.75/7.25 = 3.55.
and it must be safe and round down to the lower which is 3.
Test this on other data, it seems to be correct on mine anyways.
I will try to be precise as I can, I know all this math is a drag.
ok first here is the data you provided.
ECU actual load 225 w/3.0 timing
#1 load timing #2load timing
220 4 240 2 (high octane)
220 -2 240 -5 (low octane)
weighted average #1 map
75(4) + 25(2) / (75 + 25) = 3.5
weighted average #2 map
-75(2) + -25(5) / (75+25) = -2.75
now because of ECU algorithm be it knocking, temp or whatever.. it decides to interpolate between both maps. Now there are many ways to interpolate.
From my own logs I think the ECU uses bilinear interpolation.
b1+b2x+b3y+b4xy where b1 = f(0,0)
b2= f(1,0)-f(0,0)
b3=f(0,1)-f(0,0)
b4=f(0,0)-f(1,0)-f(0,1)+f(1,1)
using your data f(0,0)=-2.00
f(0,1)=4
f(1,0)=-2.75
f(1,1)= 3.5
this gives you the equation -2-4.75x+6y+.25xy
x is the difference from load to nearest load so its 225-220 = 5
this gives y= 25.75/7.25 = 3.55.
and it must be safe and round down to the lower which is 3.
Test this on other data, it seems to be correct on mine anyways.
Which two maps does it calculate from? The high and low octane ignition maps?
Here is an example I tried. At 3562 RPM I have timing of 3 and 225 2-byte load.
High octane ignition at 3500, 220 = 4, 240 = 2
Low octane ignition at 3500, 220 = -2, 240 = -5
225 is 75% with 220
225 is 25% with 240
so
220 gets 75
240 gets 25
75(4) + 25(2) + 75(-2) + 25(-5) / (75 + 25 + 75 + 25) = 0.375
I noticed if I don't count the low-octane map then I get
75(4) + 25(2) / (75 + 25) = 3.5
And my log got 3 which would be correct if we're rounding down.
So maybe the ECU starts using the low-octane map (interpolating) when the octane number starts decreasing as I've always though.
Here is an example I tried. At 3562 RPM I have timing of 3 and 225 2-byte load.
High octane ignition at 3500, 220 = 4, 240 = 2
Low octane ignition at 3500, 220 = -2, 240 = -5
225 is 75% with 220
225 is 25% with 240
so
220 gets 75
240 gets 25
75(4) + 25(2) + 75(-2) + 25(-5) / (75 + 25 + 75 + 25) = 0.375
I noticed if I don't count the low-octane map then I get
75(4) + 25(2) / (75 + 25) = 3.5
And my log got 3 which would be correct if we're rounding down.
So maybe the ECU starts using the low-octane map (interpolating) when the octane number starts decreasing as I've always though.
what i seemed to notice, as far as the interpolation between the high and low maps is. For example you got your 3.5 on the high map and -2.75 on the low map.
I would think from then it would base the final timing number on octane flag , but i have seen a case from my own logs where octane flag was like 98 and the lower map was way more significant in the final timing calculation then just 2% ( assuming the octane flag is on a 100 to 0% scale) Just wondering has anybody ever made their octane flag drop down to 0?
From my own logs it almost seemed as if, as soon as octane flag drops, it takes the high timing map timing value and averages it out with the low timing map value. Then again i could just be tripping because i swear my ECU seems to pull timing after just 1 count of knock vs the posted theory of 1* to every 3 counts.
I would think from then it would base the final timing number on octane flag , but i have seen a case from my own logs where octane flag was like 98 and the lower map was way more significant in the final timing calculation then just 2% ( assuming the octane flag is on a 100 to 0% scale) Just wondering has anybody ever made their octane flag drop down to 0?
From my own logs it almost seemed as if, as soon as octane flag drops, it takes the high timing map timing value and averages it out with the low timing map value. Then again i could just be tripping because i swear my ECU seems to pull timing after just 1 count of knock vs the posted theory of 1* to every 3 counts.
Trending Topics
give me data with octane low
I have not experienced octane below 100 so i cant say. Give me some data and I can see if I can figure it out. My guess is it shifts the weighted sum down whatever percent drop the octane is, then usues these numbers in the final bilinear interpolation.
If it did it by just averaging the two numbers people would rarely hit the exact number in their maps; they would hit the averages of the closest numbers.
-Paul
lemmonhead - if you are referrring to me as I stated in the other thread I was explaining how the 1,2 3 thing works for IX's0.
Of course its a weighted average calculation inside the map... I thought that was "Tuning 101"
Of course its a weighted average calculation inside the map... I thought that was "Tuning 101"
I have an 8, and as far as interpolating between the high and low map, like i said before, i have never had my octane flag drop bellow 98, but it seems that the low octane map was a much more significant influence in the final number then just 2%. Any other evo 8 owners have a take on this? I think its a good thing that it interpolates strongly, because it would take a ridiculous amount of long period knock to decay the octane flag way down. Oh well just self tune your car and tune it right and your good to go
I have an 8, and as far as interpolating between the high and low map, like i said before, i have never had my octane flag drop bellow 98, but it seems that the low octane map was a much more significant influence in the final number then just 2%. Any other evo 8 owners have a take on this? I think its a good thing that it interpolates strongly, because it would take a ridiculous amount of long period knock to decay the octane flag way down. Oh well just self tune your car and tune it right and your good to go 

The octane number is sort of like a long term knock trim, if you want to think about it that way.
Eric



