Notices
ECU Flash

how ECU calculates its final value

Old Sep 14, 2007 | 09:01 AM
  #1  
lemmonhead's Avatar
Thread Starter
Account Disabled
 
Joined: Nov 2006
Posts: 1,296
Likes: 2
From: wexford,pa
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.
Reply
Old Sep 14, 2007 | 09:55 AM
  #2  
roger smith's Avatar
Evolving Member
iTrader: (4)
 
Joined: Dec 2003
Posts: 357
Likes: 0
From: Ventura County, CA
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.
Reply
Old Sep 14, 2007 | 10:28 AM
  #3  
TouringBubble's Avatar
Evolved Member
iTrader: (2)
 
Joined: Jul 2006
Posts: 2,639
Likes: 3
From: Chelsea, AL
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.
Reply
Old Sep 14, 2007 | 10:38 AM
  #4  
l2r99gst's Avatar
Evolved Member
iTrader: (2)
 
Joined: Mar 2004
Posts: 3,499
Likes: 4
From: CA
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
Reply
Old Sep 14, 2007 | 10:43 AM
  #5  
TouringBubble's Avatar
Evolved Member
iTrader: (2)
 
Joined: Jul 2006
Posts: 2,639
Likes: 3
From: Chelsea, AL
To me, it only ever seemed logical that the interpolation would be weighted.
Reply
Old Sep 14, 2007 | 12:47 PM
  #6  
lemmonhead's Avatar
Thread Starter
Account Disabled
 
Joined: Nov 2006
Posts: 1,296
Likes: 2
From: wexford,pa
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.



Originally Posted by roger smith
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.
Reply
Old Sep 14, 2007 | 02:24 PM
  #7  
coolguycooz's Avatar
Evolving Member
 
Joined: Sep 2006
Posts: 368
Likes: 0
From: California
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.
Reply
Old Sep 14, 2007 | 02:47 PM
  #8  
ziad's Avatar
Evolved Member
iTrader: (1)
 
Joined: Apr 2007
Posts: 529
Likes: 1
From: Melbourne
do the same principles apply to the VIII roms or only the IX roms?
Reply
Old Sep 14, 2007 | 03:35 PM
  #9  
lemmonhead's Avatar
Thread Starter
Account Disabled
 
Joined: Nov 2006
Posts: 1,296
Likes: 2
From: wexford,pa
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.
Reply
Old Sep 14, 2007 | 04:48 PM
  #10  
nothere's Avatar
Evolved Member
iTrader: (23)
 
Joined: Jan 2004
Posts: 2,680
Likes: 1
From: Bellevue. WA
Lemmon,

from the little bit of logs I've looked at, it doesn't look like the VIII is involved with map averaging*.

I may be wrong but 8 owners can overlook this issue.
Reply
Old Sep 14, 2007 | 04:52 PM
  #11  
mrfred's Avatar
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Its a specific type of weighted average called linear interpolation. I suspect that most people intuitively understood this already.
Reply
Old Sep 14, 2007 | 05:05 PM
  #12  
PVD04's Avatar
Evolved Member
iTrader: (23)
 
Joined: Jun 2004
Posts: 1,503
Likes: 0
From: Wisconsin
Originally Posted by mrfred
Its a specific type of weighted average called linear interpolation. I suspect that most people intuitively understood this already.
+1

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
Reply
Old Sep 14, 2007 | 07:10 PM
  #13  
tephra's Avatar
EvoM Guru
15 Year Member
iTrader: (6)
 
Joined: Feb 2007
Posts: 9,486
Likes: 67
From: Melbourne, Australia
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"
Reply
Old Sep 15, 2007 | 03:58 PM
  #14  
coolguycooz's Avatar
Evolving Member
 
Joined: Sep 2006
Posts: 368
Likes: 0
From: California
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
Reply
Old Sep 15, 2007 | 04:03 PM
  #15  
l2r99gst's Avatar
Evolved Member
iTrader: (2)
 
Joined: Mar 2004
Posts: 3,499
Likes: 4
From: CA
Originally Posted by coolguycooz
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 ECU will pull about 1* timing for each 3 knock counts irregardless of the octane number. So, you were probably seeing that effect.

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


Eric
Reply

Thread Tools
Search this Thread

All times are GMT -7. The time now is 08:35 AM.