RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 10:06 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Oct 25, 2012 3:40 am 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
I'm pretty sure this is the smoothing factor table applied to the front O2 sensor current reading just before using the value to perform the Front O2 Sensor Scaling table lookup.
Attachment:
O2sensorSmoothing.png


Here's the table def in RomRaider Editor format. This applies to CAL IDs A2WC522N & A2WC522S.

Code:
    <table type="3D" name="AF Sensor 1 Current Smoothing Factor" category="ALPHA" storagetype="float" endian="big" sizex="4" sizey="4" storageaddress="0xCD7CC">
      <!-- min: 0.05  max: 0.9  average: 0.609375 -->
      <scaling units="factor" expression="x" to_byte="x" format="0.00" fineincrement="0.01" coarseincrement="0.1" />
      <table type="X Axis" name="Mass Air Flow" storagetype="float" storageaddress="0xCD7AC">
        <!-- 20 to 44 -->
        <scaling units="g/s" expression="x" to_byte="x" format="0" fineincrement="1" coarseincrement="5" />
      </table>
      <table type="Y Axis" name="Engine Load" storagetype="float" storageaddress="0xCD7BC">
        <!-- 0.6 to 1.2 -->
        <scaling units="g/rev" expression="x" to_byte="x" format="0.00" fineincrement="1" coarseincrement="5" />
      </table>
      <description>
      </description>
    </table>


Edit:
Here's how smoothing works in the 32bit ECU.
There are 4 parameters passed to the smoothing function:
  • current reading
  • previous smoothed reading
  • a minimum limit
  • and the factor for the smoothing (in this example, from the table)

The processing begins by subtracting the 'current reading' from the 'previous smoothed reading' to get a 'reading difference'.
Then the raw smoothing factor is subtracted from 1 to get the 'smoothing multiplier'.
The 'reading difference' is multiplied by the 'smoothing multiplier' to get a 'reduced reading difference'.
The 'reduced reading difference' is then added to the 'current reading' to get a 'current smoothed reading'.
Then the 'current smoothed reading' is subtracted from the 'current reading' and if the |result| is less than the 'minimum limit' then the 'current smoothed reading' is thrown out and the 'current reading' is used unmodified in the next iteration of the routine.

So ultimately what the smoothing table represents is the fraction of the difference between readings that will be used to modify the 'current reading' to create the new reading.

If the smoothing factor is 1 then there is no change to the current reading at all, effectively unsmoothed.
If the smoothing factor is 0 then all of the difference in readings is applied to the current reading.
If you wish to view the factor as a percentage then:
1 = 0% smoothing affect
0 = 100% smoothing affect

So the table above has 95% in the lower left and 10% in the upper right.
An alternate scaling for the factor represented as % is:
Code:
<scaling units="Applied Smoothing (%)" expression="(1-x)*100" to_byte="1-(x/100)" format="0" fineincrement="1" coarseincrement="10" />


Note that with a 'minimum limit' value other than 0, a certain difference in readings is required before smoothing takes affect. In the case with this table the limit is 0.
Also note, the smaller the factor (or higher the %) causes the reading to change at a much slower rate.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Oct 25, 2012 6:26 am 
Offline
Experienced
User avatar

Joined: Thu Jul 23, 2009 5:46 pm
Posts: 863
The numbers/shape look just like the one I was testing on the 06 WRX and 07 STi. It's a bit of an odd table with the load vs maf axes.

Some discussion on this table here: viewtopic.php?f=25&t=8746

Quote:
It's an interesting table, because the axes are so closely related.

Because the main difference between MAF and engine load is RPM, for a given MAF value on the X axis, the Y axis is a representation of RPM.

For example, in the first column. 0.6g/rev at 20g/s represents 2000rpm. 1.2g/rev at 20g/s represents 1000rpm. As you go higher on the MAF, the rpm increases. (44g/s column is 4400 to 2200rpm from 0.6g/rev to 1.2g/rev). However, this breaks down MAF and engine load go out of range and the idle end up in the top left instead of bottom left.

I would test by changing the top left cells around. Maybe try the 10 value at 1, 10, 25, 50, 95 and see if there is a noticeable improvement.. If that doesn't help, then try rescaling the axes such that idle range follows the same scheme as the the table (low rpm = higher smoothing).

I'm also very curious to see the smoothing factor in action. Will try to get you a logger xml to watch it.

_________________
Please do not send me support questions via PM, use the forum instead!


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Oct 25, 2012 5:32 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Ah, didn't realize you found it. I just ran into it while looking through engine cranking routines.
I think I've also found another table for additional IPW compensations...


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Oct 25, 2012 11:05 pm 
Offline
Moderator

Joined: Thu Nov 23, 2006 2:23 am
Posts: 2565
I have a hunch that somewhere near this code you might find the code that sets the 'floor' for the front O2 sensor readings.

No matter how rich your AFR, the front O2 sensor will only read down to about 11.1 (approx 0.75 lambda). If we could find that limit and drop it down to 10:1 (.68 lambda) then I think we could tune Subarus pretty well without aftermarket widebands.

I've gone hunting for that floor a few times but never found it. However I never found this table either, and there's a good chance that they're close together in the code...

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, BC 272, LC, FFS, OMG
Please don't send questions via PM. Post a thread and send me a link to it instead. Thanks!


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Oct 25, 2012 11:19 pm 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
Other than this limit?
Attachment:
richLimit.png


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Oct 25, 2012 11:20 pm 
Offline
Moderator

Joined: Thu May 20, 2010 8:01 am
Posts: 3117
Location: Johannesburg, South Africa
dschultz wrote:
Other than this limit?
Attachment:
richLimit.png


I was just going to ask that. Is there another threshold at play?

_________________
He who dies with the most gadgets wins.

Please do not PM me - use the email option.


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Fri Oct 26, 2012 1:10 am 
Offline
Senior Member

Joined: Sat Feb 12, 2011 11:27 pm
Posts: 2032
Location: Northern NSW
Front Oxygen Sensor Scaling appears to be the issue with reaching 10:1 AFR's, would be roughly -1.4mA though


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Fri Oct 26, 2012 3:25 am 
Offline
RomRaider Developer

Joined: Thu May 21, 2009 1:49 am
Posts: 7323
Location: Canada eh!
For sure the scaling will limit the low end lambda, but can the sensing current actually go lower than -1.4mA is the real question.


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Fri Oct 26, 2012 5:53 pm 
Offline
Moderator

Joined: Thu Nov 23, 2006 2:23 am
Posts: 2565
Yes, I've changed both the scaling table and the already-defined "rich limit" table, and I still don't get values lower than about 11.2 in my logs.

It could be a sensor limitation, but the floor is so solid that I suspect it's being enforced in the code.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, BC 272, LC, FFS, OMG
Please don't send questions via PM. Post a thread and send me a link to it instead. Thanks!


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Wed Nov 07, 2012 7:14 pm 
Offline
Experienced

Joined: Mon Jul 02, 2007 11:46 am
Posts: 430
This table works wonderful on my 07 STI since the front oxy is behind the 40R... changed the whole table to 98. Note that if you go over 100 on the STI one you get a cel and the front 02 Sits on 11.15 or whatever your max value is.

_________________
--2008 3.6 Tribeca --
--2007 STI limited Panda--
--Twinscroll GT40R 2.35L--


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Mon Jan 21, 2013 4:50 pm 
Offline
Experienced

Joined: Mon Jul 02, 2007 11:46 am
Posts: 430
Wanted to post up that i found this table in all the USDM roms. Works great. If you need it for others just let me know. Working with Merp to figure out how to get the findings into his Github easier. Feedback from other tuners (TurboMike) was that running big maf intakes or even larger then big KStech ones smoothed out the correction a lot. I have hopefully inserted a screen shot of how i did it on my 07sti. DO NOT set it to 100 or higher it will send the front 02 sensor to rich and not working mode.

Attachment:
frontafsmoothing_zpsfe820c2a.png



Scaling is
Data: SmoothingFactor
X: g/s
Y: g/rev

04 STI A2ZJ710J
Address: 621DC
X: 621BC
Y: 621CC

05 OUTBACK XT MT A2WC522S
Address: cd7cc
X: cd7ac
Y: cd7bc

05 STI A2ZJB11J
Address: CC620
X: CC600
Y: CC610

06STI A2ZJE11J
Address:CC724
X: CC714
Y:CC704

07STI A2UJ000J
Address: D1E50
X: D1E30
Y:D1E40

08WRX AZ1E401A
Address: D4684
X: D4664
Y:D4674

08STI AZ1G201I
Address: D5D80
X: D5D60
Y:D5D70

09WRX AZ1G401V
Address: D562C
X: D560C
Y:D561C

09STI INHERITS 08STI

2010WRX AZ1G701V
Address: D5C54
X: D5C34
Y:D5C44

2010STI AZ1G701I
Address:D64A8
X: D6488
Y:D6498

2011WRX AE5IA10L
Address: D80FC
X: D80DC
Y:D80EC

2011STI AE5IB00V
Address:D97DC
X: D97BC
Y:D97CC


You do not have the required permissions to view the files attached to this post.

_________________
--2008 3.6 Tribeca --
--2007 STI limited Panda--
--Twinscroll GT40R 2.35L--


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Mon Jan 21, 2013 10:44 pm 
Offline
Experienced

Joined: Mon Jul 02, 2007 11:46 am
Posts: 430
By Request

2008 Forester 2.5xt AZ1G101N
Address: d3ddc
X: d3dbc
Y: d3dcc

_________________
--2008 3.6 Tribeca --
--2007 STI limited Panda--
--Twinscroll GT40R 2.35L--


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Tue Jan 22, 2013 5:25 am 
Offline
RomRaider Donator
User avatar

Joined: Mon Dec 15, 2008 7:12 am
Posts: 672
Location: The Philippines
Thanks Bamofo :-) Here's table def In Ecuflash format. Applies to AZ1G101N

Code:
   <scaling name="SmoothingFactor" units="Smoothing Factor (%)" toexpr="(x*(-100))+100" frexpr="(x-100)/(-100)" format="%.1f" min="0" max="100" inc="5" storagetype="float" endian="big"/>

   <table name="Front AF Smoothing Table" category="Fueling - Closed Loop" address="d3ddc" type="3D" level="1" scaling="SmoothingFactor">
      <table name="Smoothed" address="d3dbc" type="X Axis" elements="4" scaling="g/s"/>
      <table name="Engine Load (g/rev)" address="d3dcc" type="Y Axis" elements="4" scaling="g/rev"/>
   </table>



Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Sat Oct 15, 2016 3:00 pm 
Offline
Newbie

Joined: Tue Jul 24, 2012 9:12 am
Posts: 2
Can your find table for CAL A2WC401F ?


Top
 Profile  
 
 Post subject: Re: Front O2 Sensor Current Smoothing Table
PostPosted: Thu Jul 20, 2017 11:24 am 
Offline
Newbie
User avatar

Joined: Tue Jun 09, 2015 7:15 am
Posts: 79
Location: Brisbane, Australia
can anyone show me the light for AZ1G101M? Thanks in advance!

_________________
09 audm wrx - merp full sd mode - running edm forester rom AZ1G101M


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl