follow ft86club on our blog, twitter or facebook.
FT86CLUB
Ft86Club
Speed By Design
Register Garage Community Calendar Today's Posts Search

Go Back   Toyota GR86, 86, FR-S and Subaru BRZ Forum & Owners Community - FT86CLUB > Technical Topics > Software Tuning

Software Tuning Discuss all software tuning topics.

Register and become an FT86Club.com member. You will see fewer ads

User Tag List

Reply
 
Thread Tools Search this Thread
Old 10-03-2015, 03:51 PM   #1
RustySocket
Slow Learner
 
RustySocket's Avatar
 
Join Date: Jul 2015
Drives: 15 Halo FRS
Location: Puget Sound
Posts: 206
Thanks: 147
Thanked 110 Times in 55 Posts
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Where are LTFT data stored?

I'm trying to understand how long term fuel trims are applied when in OL condition and where the learned data is stored. When looking at LTFT in a log does anyone know which table is storing the data and what breakpoints will cause it to shift from one learned value to the next?


I've found two tables AF learning #1 Airflow Ranges A and AF learning #1 Airflow Ranges B.


The tables contain different breakpoints:


[Table2D]
A B C D E
1.60 5.0 12.0 20.0 60.0


[Table2D]
A B C D E
0.80 3.4 8.5 16.0 45.0


There was some discussion I found on a search of RR forums here regarding these two tables but there was never a consensus of which table actually stored to data that I could find.


Anyone have any information on which table stores the data and how it is applied. Or are there conditions that will cause the learned trims to be pulled from table A vs table B?


The only information I can find is in this thread here:
http://www.ft86club.com/forums/showthread.php?p=1706473

Last edited by RustySocket; 10-03-2015 at 04:14 PM.
RustySocket is offline   Reply With Quote
The Following User Says Thank You to RustySocket For This Useful Post:
aagun (10-03-2015)
Old 10-03-2015, 09:36 PM   #2
steve99
Banned
 
Join Date: Dec 2013
Drives: FT86
Location: Australia
Posts: 7,996
Thanks: 1,035
Thanked 4,996 Times in 2,985 Posts
Mentioned: 598 Post(s)
Tagged: 2 Thread(s)
The ltft data is stored in RAM as its can change .and its cleared if you reset or reflash ecu as ecu is reset on flashing the ROM which is actually EEROM.

I dont claim to know how the exact learning occurrs but their are several bands of ltft that are storred related to maf flow rates. As you go through the rpm range maf flow changes and you move through the different maf flow rate bands and you will see the different ltft applied. These values will change as temperature,atmospheric pressure, fuel composition eg ethanol conrent, ect changes.

just note ltft is stored and applied reliative to maf flow rates not rpm or throttle position, its a continuous learning process

ltft is the ecus attempt to correct maf scaling errors and account for temperature air density pressure and fuel changes.

their is a bit more explaination in the MAF Scaling link below

if you use the VGI maf scaling utility it will sort all this out for you
steve99 is offline   Reply With Quote
The Following User Says Thank You to steve99 For This Useful Post:
RustySocket (10-04-2015)
Old 10-04-2015, 12:26 AM   #3
Wepeel
Senior Member
 
Join Date: May 2012
Drives: '13 BRZ Ltd
Location: PA
Posts: 458
Thanks: 265
Thanked 230 Times in 117 Posts
Mentioned: 8 Post(s)
Tagged: 0 Thread(s)
I've wondered this and I think I've asked it before on here. The thing that throws me off is I've seen LTFT jump when MAF flow was the same but crossing RPM thresholds. On my previous car (STI) it was all just MAF flow rate based, independent of RPM. On the BRZ it seems it might be a function of more than just that - not sure if it's due to 2 injector sets, but it seems different.
Wepeel is offline   Reply With Quote
The Following User Says Thank You to Wepeel For This Useful Post:
RustySocket (10-04-2015)
Old 10-04-2015, 03:06 AM   #4
Kodename47
Senior Member
 
Kodename47's Avatar
 
Join Date: Oct 2012
Drives: UK GT86
Location: UK
Posts: 3,040
Thanks: 185
Thanked 1,633 Times in 1,113 Posts
Mentioned: 156 Post(s)
Tagged: 1 Thread(s)
Quote:
Originally Posted by Wepeel View Post
On the BRZ it seems it might be a function of more than just that - not sure if it's due to 2 injector sets, but it seems different.
I think that this might be the case. However I've only played with one set of learning ranges, ECUtek only has one which ties in with Romraider's A so B is new to me.

Someone could always test it out if they have access.
__________________
.: Stealth 86 :.
Abbey Motorsport/K47 Tuned Sprintex 210 Supercharger

Kodename 47 DJ:
Soundcloud / Instagram / Facebook
Kodename47 is offline   Reply With Quote
The Following User Says Thank You to Kodename47 For This Useful Post:
RustySocket (10-04-2015)
Old 10-04-2015, 03:22 AM   #5
steve99
Banned
 
Join Date: Dec 2013
Drives: FT86
Location: Australia
Posts: 7,996
Thanks: 1,035
Thanked 4,996 Times in 2,985 Posts
Mentioned: 598 Post(s)
Tagged: 2 Thread(s)
be very difficult to work out unless somone looked at the code.
but maybe the change was due to a new learnt value of ltft being stored rarther than a threshold range being crossed ?
steve99 is offline   Reply With Quote
The Following User Says Thank You to steve99 For This Useful Post:
RustySocket (10-04-2015)
Old 10-04-2015, 09:28 AM   #6
RustySocket
Slow Learner
 
RustySocket's Avatar
 
Join Date: Jul 2015
Drives: 15 Halo FRS
Location: Puget Sound
Posts: 206
Thanks: 147
Thanked 110 Times in 55 Posts
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Thanks for the responses guys. I guess it doesn't really matter, I'm not a programmer and just looking for the information using a search function was difficult for me. I was happy to be able to find out anything at all. I don't have the background or skillset to take it any further than this.


I'm just trying to learn about the ECU and how all the sensors and tables in the rom interact to make adjustments to fueling in a broader sense. Not that I ever hope to become some great tuner that knows everything there is, but I'd like to understand how to read the datalogs and why the ECU makes the adjustments it does. I certainly understand that there can be multiple data sources being polled and that when looking at a datalog I am only seeing the result of those changes. I'm just trying to understand why to fuel trim changes when it does within OL conditions and what triggers it to happen. Whether it is airflow, rpm, load AF reading, or some combination of all.


One thing is becoming readily apparent ,it is much more complicated than I imagined. There are some incredibly smart people on these forums and I'm not as smart as I thought I was.
RustySocket is offline   Reply With Quote
Old 10-04-2015, 09:54 AM   #7
steve99
Banned
 
Join Date: Dec 2013
Drives: FT86
Location: Australia
Posts: 7,996
Thanks: 1,035
Thanked 4,996 Times in 2,985 Posts
Mentioned: 598 Post(s)
Tagged: 2 Thread(s)
Quote:
Originally Posted by RustySocket View Post
Thanks for the responses guys. I guess it doesn't really matter, I'm not a programmer and just looking for the information using a search function was difficult for me. I was happy to be able to find out anything at all. I don't have the background or skillset to take it any further than this.


I'm just trying to learn about the ECU and how all the sensors and tables in the rom interact to make adjustments to fueling in a broader sense. Not that I ever hope to become some great tuner that knows everything there is, but I'd like to understand how to read the datalogs and why the ECU makes the adjustments it does. I certainly understand that there can be multiple data sources being polled and that when looking at a datalog I am only seeing the result of those changes. I'm just trying to understand why to fuel trim changes when it does within OL conditions and what triggers it to happen. Whether it is airflow, rpm, load AF reading, or some combination of all.


One thing is becoming readily apparent ,it is much more complicated than I imagined. There are some incredibly smart people on these forums and I'm not as smart as I thought I was.

have a look here
http://www.norcalmotorsports.org/use...gGuide-0_5.pdf

the more you look into it the more complex it gets :-) never ending learning curve ignore all the turbo stuff in that guide the brz ecu operates in a similar manner

www.romraider.com also has some good guides

but if you just scaling maf use VGI utility then look at wayno's tune guide for OFT tunes
steve99 is offline   Reply With Quote
The Following 2 Users Say Thank You to steve99 For This Useful Post:
aagun (10-04-2015), RustySocket (10-04-2015)
Old 10-04-2015, 10:01 AM   #8
RustySocket
Slow Learner
 
RustySocket's Avatar
 
Join Date: Jul 2015
Drives: 15 Halo FRS
Location: Puget Sound
Posts: 206
Thanks: 147
Thanked 110 Times in 55 Posts
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by steve99 View Post
have a look here
http://www.norcalmotorsports.org/use...gGuide-0_5.pdf

the more you look into it the more complex it gets :-) never ending learning curve ignore all the turbo stuff in that guide the brz ecu operates in a similar manner

www.romraider.com also has some good guides

but if you just scaling maf use VGI utility then look at wayno's tune guide for OFT tunes

@steve99, thanks. It was @Waynos guides, your helpful links and the gathering of all my logs to fine tune my OFT tune that led me to ask the question. I have been reading everything I can find to learn how this all interacts expecially the guides over on romraider. As always, thanks for sharing information and your helpful responses.
RustySocket is offline   Reply With Quote
Old 03-14-2026, 04:13 AM   #9
callisto
Senior Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: PNW, US
Posts: 109
Thanks: 88
Thanked 88 Times in 46 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
Quote:
Originally Posted by steve99 View Post
be very difficult to work out unless somone looked at the code.
but maybe the change was due to a new learnt value of ltft being stored rarther than a threshold range being crossed ?
I now have almost worked out this answer, and with precisely two results on the forum for "airflow ranges", am documenting what I've found in the only thread that seems relevant:

A/F Learning #1 Airflow Ranges A controls define the stored LTFT (long term fuel trims) boundaries; the table defines buckets A through F by specifying the maximum of buckets A through E. So, table A = buckets { A <= 1.60; B <= 5.00; C <= 12.00; D <= 20.00; E <= 60.00; F > 60.00 } means that MAF 0.4 is bucket A, MAF 10.0 is bucket C, etc.

A/F Learning #1 Airflow Ranges B specified the midpoint of the LTFT learning range within each bucket. This is annoying to explain in words, but easy in math — (learning min = midpoint – (learning max – midpoint)). So, then, given table B = midpoints { A : 0.80, B : 3.40, C : 8.50, D : 16.00, E : 45.00 }, the learning MAF ranges for LTFT buckets are:

{ A: 0.00-1.60; B: 1.80-5.00; C: 5.00-12.00; D: 12.00-20.00; E: 30.00-60.00; F: not defined }

Note the gaps from MAF 1.60-1.80 and from MAF 20.00-30.00. I'd always wondered why the Ranges A/B tables were slightly weird, and that at least answers the outcome of that weirdness. Couldn't say why, though; maybe CL/OL transitions, or who knows what. (There are various conditions that I haven’t listed that will suspend LTFT learning as well, like you must be going at least 3 km/h.)

But the interesting part here is that the learning range for F can't be determined by this logic, because there's no maximum for LTFT bucket F. And so the ECU hard-codes the maximum learning range for F as 200.0 (K00G float @10eddc). Since stock has "MAF Limit (Maximum)" set (elsewhere) to 200.0 and CELs when the sensor reaches MAF >= 272, I know some end up raising the MAF limit or outright replacing it. However, I don't think(?) it's well-known that the ECU stops learning fuel trims at 200 g/s regardless of what MAF Limit (Maximum) is set to. So, duly noted!

For those interested in seeing this in Ghidra, these exact bytes point directly to the AFR learning limit for Bucket F — d2 1e 60 63 f9 26 d2 1e f8 26 f9 81 38 11 70 02 f9 82 31 91 30 01 f8 26 39 11 70 01 f8 91 e0 fc f1 87 60 43 88 04 89 09 e5 08 34 53 89 06 60 63 f8 26 39 11 70 01 f8 90 00 0b f1 8a d2 11 f8 28 — for K00G and V00C, and so presumably everything in between as well. If someone wants to patch a switch into the RomRaider XML to fix this, modifying four bytes — K00G @623a4: 00 10 ed dc — to instead point to the MAF Limit (Maximum) value — K00G @623a4: 00 10 44 3c — would do it. As always, please verify all of these addresses with both competence and a hex editor; if you don't know what you're doing and get this wrong, you'll brick your car, etc.

Logging K00G float 0xFFF8AAD4 and byte 0xFFF8AAE4 should verify all of this; that the learning limit is capping at 200 g/s and that learning stops (AAE4 flips from 1 to 0) at that point. With the above pointer patch in place and a raised MAF Limit (Max), the logging should show learning continuing beyond the prior 200 hard-coded limit. Hopefully, anyways. I don't have anywhere locally that's safe to exceed MAF 200 and my budget doesn't extend to a dyno run right now. Nor do I know if it matters to boosted folks. But: it might, and so I'm sharing now rather than when I finish solving the complete LTFT mystery.

None of this explicitly says "here is where the LTFT values are stored", because my decoding so far shows two arrays of ten values and there's six LTFT buckets; I can't explain why there's two arrays, and I'm about 80/20 certain that I should be pointing to twelve value arrays instead of ten in each them, but which one is the important one? and so on. For anyone following after me, the above locations will put you into the dead center of LTFT calculation to work that out (unless I've updated since I posted this with a reasonable answer!). And that, at the very least, is progress worth noting. As Monty Python once didn’t say: "The thread’s not dead. It's sleeping!"

Last edited by callisto; 03-14-2026 at 04:27 AM.
callisto is online now   Reply With Quote
The Following 5 Users Say Thank You to callisto For This Useful Post:
bcj (03-14-2026), Compelica (03-14-2026), makinen (03-15-2026), T-Steve (03-14-2026), tomm.brz (03-16-2026)
Old 03-15-2026, 02:41 AM   #10
callisto
Senior Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: PNW, US
Posts: 109
Thanks: 88
Thanked 88 Times in 46 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
I missed a paragraph and it’s an important one: LTFT learning occurs for two independent conditions, with two sets of learned values: At PI (port injection) 0%, and at PI <70%. And, there’s a special LTFT learning bucket for PI >=70% that appears to disregard MAF outright. Which should help explain why LTFT can change when MAF doesn’t cross a bucket threshold, but load and rpm *do* cross a PI Ratio Thresholds table boundary to/from 0%.
callisto is online now   Reply With Quote
Old 03-16-2026, 04:31 PM   #11
tomm.brz
Senior Member
 
Join Date: Jan 2017
Drives: brz 2017 hksv2
Location: italy
Posts: 2,292
Thanks: 517
Thanked 1,125 Times in 815 Posts
Mentioned: 70 Post(s)
Tagged: 0 Thread(s)
but no oem tune (and actually virtually no custom.tunes) uses 70% of PI or more
tomm.brz is offline   Reply With Quote
Old 03-17-2026, 11:44 AM   #12
tomm.brz
Senior Member
 
Join Date: Jan 2017
Drives: brz 2017 hksv2
Location: italy
Posts: 2,292
Thanks: 517
Thanked 1,125 Times in 815 Posts
Mentioned: 70 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by callisto View Post
I missed a paragraph and it’s an important one: LTFT learning occurs for two independent conditions, with two sets of learned values: At PI (port injection) 0%, and at PI <70%. And, there’s a special LTFT learning bucket for PI >=70% that appears to disregard MAF outright. Which should help explain why LTFT can change when MAF doesn’t cross a bucket threshold, but load and rpm *do* cross a PI Ratio Thresholds table boundary to/from 0%.
also don't know if you are aware, if you put 14.7 in closed loop fueling tables, LTFT gets completely disabled which is nice if you have a good maf scaling
STFT continues to work all the time in closed loop

you can also offset the lambda scaling and put 0.99-0.995 instead of 1 for lambda=1 so the real AFR during closed loop is leaner: it shows 14.7 but real afr is more around 15.5
tomm.brz is offline   Reply With Quote
Old 03-17-2026, 01:20 PM   #13
callisto
Senior Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: PNW, US
Posts: 109
Thanks: 88
Thanked 88 Times in 46 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
Quote:
Originally Posted by tomm.brz View Post
but no oem tune (and actually virtually no custom.tunes) uses 70% of PI or more
Yeah, you’d have to hit 800cc(?) of total fueling with stock direct injectors to force that condition, which seems rather unlikely. I’d still encourage collecting LTFT offset in logs, though; look for bucket 9 and assess PI ratio in those areas. I believe there’s a 100% PI operation mode during various idle phases? I’m collecting logs with stock DI/PI and LTFT retraining post-flash this week and will revisit. (Some of my older logs have bucket 9, but I want controlled data rather than adhoc.)

Quote:
Originally Posted by tomm.brz View Post
also don't know if you are aware, if you put 14.7 in closed loop fueling tables, LTFT gets completely disabled which is nice if you have a good maf scaling
STFT continues to work all the time in closed loop
There are various direct switches to just turn off either, but I haven’t had cause to pursue that yet. Should I read a thread somewhere about disabling LTFT to learn more?

Last edited by callisto; 03-17-2026 at 02:08 PM.
callisto is online now   Reply With Quote
Old 03-17-2026, 04:53 PM   #14
tomm.brz
Senior Member
 
Join Date: Jan 2017
Drives: brz 2017 hksv2
Location: italy
Posts: 2,292
Thanks: 517
Thanked 1,125 Times in 815 Posts
Mentioned: 70 Post(s)
Tagged: 0 Thread(s)
It s possible to set more than 70% PI if you use port injectors bigger than 450cc, probably even less, could also be that stock 228cc are already enough for NA engine, but would not be smart as DI helps performance immensely.. PI only it knocks like hell and feels sluggish. You can run PI up to 18ms of injection opening time, but DI only for about 6ms

yes you are right about PI though, after a cold start , which is 50/50% with DI stratified (injected during exhaust stroke), fueling goes to 100% PI on idle and throttle release for a bit
Anyway i feel pretty good tuning with ltft completely turned off, STFT reacts already very quick and has plenty of headroom, smoother on transient also this way.. I also disable LTFT on open loop so my LTFT never ever works
People I tune, i keep LTFT activated on closed loop fueling for them as it helps diagnose eventual problems or leaks

i don t know about threads on this topic, i got the info from steve99 who found out that if you put 14.7 on closed loop targets, it forces LTFT to 0 all the time
tomm.brz is offline   Reply With Quote
 
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crazy high LTFT, lean codes, e85... nickw14 Software Tuning 18 06-23-2015 08:55 PM
high ltft at idle, my how to fix it(not fixed yet) trdric Software Tuning 16 06-18-2015 10:27 PM
LTFT increased over 10% after oil change (new E85 user) tracerit Software Tuning 19 05-21-2015 04:35 PM
FRS/BRZ used to deliver Sysco food stored in sheds BRZY Northern California 3 09-01-2014 07:03 AM
Temperature Swing = Large LTFT Swing? joneze93tsi Software Tuning 5 07-30-2014 11:10 PM


All times are GMT -4. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.

Garage vBulletin Plugins by Drive Thru Online, Inc.