Fox Tuning Related School Project

FastDriver

I was uncomfortably high & wearing a helmet
SN Certified Technician
Sep 5, 2001
6,057
2,663
224
Vass, NC
I'm currently in grad school taking computational programming and statistics. In an upcoming project due in mid-march, it's looking like they're going to let me analyze my cars' Big Stuff 3 logs in order to optimize base fuel tables. So far, my tuning method has been less than ideal, and somewhat inconsistent under varying conditions. It's just basically been trial and error while driving, scarily enough.

After writing some computer code to sort, filter, and assist in statistically analyzing the logs, I will be able to look at hundreds of observations so that I can do a better job optimizing the base fuel table.

If this works out, I may be able to expand this in the future to help with tuning the rest of the tables.

I'm not sure if anyone else is interested in this sort of thing, but I'm pretty excited about it. It's probably going to lead to learning quite a bit about tuning and programming, altogether. So, hopefully, I'll make some good progress to post about here. -Chris

Race tune VE table.webp

upload_2018-2-5_19-6-27.webp
 
Last edited:
Looks like a .CSV file. Keep us posted. I used to write a lot of VB script in Excel to do the same thing with my tweecer logs, it really helped getting a better picture of what was going on. Looking at raw data can be deceiving sometimes.
 
Awesome! Yep. Just a csv file.

Cool to know you've got some experience. did you do similar stuff? Averaging O2 feedback across the fuel table cells?
 
There are several inputs that affect AFR. Do you plan on accounting for things like ACT, ECT, timing, load, etc?
Perhaps limiting your code to only look at AFR when within certain windows of these values?

I am curious about some of the details on what you plan on doing, it sounds like a very fun project, but also one that you could potentially spend several years perfecting... I would go into this very cautious of scope creep.

I have always been fond of the simplicity of the KAM corrections done in the factory ecu. I have not seen the background code that creates the KAM, and not sure if it is in the GUFB... but from a user/tuner standpoint, it is a simple and effectie way to make minor closed loop changes to fueling.

My background is materials/structural testing, and as part of that I have written some software programs for controlling test temperatures (hot and cold). I used PID control for up to 4 independent channels.

What code are you working within?
 
There are several inputs that affect AFR. Do you plan on accounting for things like ACT, ECT, timing, load, etc?

Initially, just load and RPM, as per the table above. My initial, sort of lowest level, intent is to simply bin the data by cells in the table above. Then determine the 'best' approach to calculating the VE to input.

During this initial phase, I'll do my best to control other variables. I'll keep the engine at operating temps (185-205) in order to control that variable. I *might* go as far as setting the two ECT correction cells to the same value to further control that. I'm not quite certain how the ACTs are dealt with in the Big Stuff. There is a Air temperature correction table, but it's listed under the "Warm Up" drop down, and my adjustments there did not *seem* to affect things at operating temps. There's also a MAP v. Coolant correction table under the Warm Up drop down, and I'm uncertain if it affects things at operating temperature. Needless to say, I still have a lot to learn.

upload_2018-2-6_15-8-2.webp


Later, and I likely will play with this for years, I may bin again within the above bins by each successive variable I want to tackle, i.e. ECT, ACT, Timing, dMAP, dTPS, etc... This would allow me to inspect the affects on each cell. Another way would be to group all cells and determine the overall effect of ECTs and ACTs in order to make a global adjustment.

Edit: So it turns out that the top "Air Temperature Correction" table is not used with Speed Density, only Alpha-N. Only the bottom table with Map v. Coolant is used. I think it's just during warm-up. If there's a way to adjust fuel on ECT or ACT while at operating temp. It also turns out that the Warm-up MAP vs. Coolant isn't just for warm up. I took the car for a drive today, and I can definitely adjust fuel trims with this table.

Regarding timing, my initial thought is that since timing is also based on load and RPM, it will be consistent as is, meaning that every time I visit a cell in the VE table, the base timing at that point will also be consistent. However, adjustment tables might interefere. Here's how the base timing table is laid out:

upload_2018-2-6_15-13-27.webp


As far as tuning timing, that's still a bit of a black box to me. I was hoping to use the optional accelerometer I got for the BS3 to help me with timing at WOT. However, I frankly do not know a good method for tuning timing at partial and light loads. So far, I'm basing it off of what a "real" tuner plugged into my 1st car. The above example is the 93 octane tune for my '91 LX. If you have any methodology pointers here, I'm all ears. My best guess would be trying adjust based on the look of the plugs. Seems pretty infeasible to do for every cell.

Perhaps limiting your code to only look at AFR when within certain windows of these values?
Yep, that's a similar approach. I could filter out that data, or just bin it separately. One of the challenges in binning is that the BS3 interpolates across cells. So, I'm not sure how I'm going to account for the interpolation, yet. Based on that, the values may never truly be entirely from a single cell.

For example, if I'm halfway between a cell containing "22" and a cell containing "26", then the VE the computer uses might be "24." I'm assuming the underlying software uses a linear interpolation. I would love to see the underlying code, though I'll bet John Meaney is unlikely to disclose anything I can't access myself.

I am curious about some of the details on what you plan on doing, it sounds like a very fun project, but also one that you could potentially spend several years perfecting... I would go into this very cautious of scope creep.

Scope is critical given the amount of time and other competing requirements. I think the simplest approach of averaging the feedback for each cell and adjusting the tune based on it will be easy enough to finish the project. However, I like how I can scale up, because that might lead to future related projects.

I have always been fond of the simplicity of the KAM corrections done in the factory ecu. I have not seen the background code that creates the KAM, and not sure if it is in the GUFB... but from a user/tuner standpoint, it is a simple and effectie way to make minor closed loop changes to fueling.

Big Stuff doesn't use KAM in the way I understand that the EEC IV does. Big Stuff's open-loop makes immediate feedback and corrections based on the actual AFR, but so far as I know, it doesn't store the value to reference against later. If I'm wrong about that, I have not found such a table. The VE table itself must be modified.

My background is materials/structural testing, and as part of that I have written some software programs for controlling test temperatures (hot and cold). I used PID control for up to 4 independent channels.

What code are you working within?

Excellent! The more brains/experience thinking about this stuff, the more likely I will approach things correctly. I welcome your interest and feedback as I progress.

Primarily python, though this might seqway into the use of R in the future.
 
Last edited:
Awesome! Yep. Just a csv file.

Cool to know you've got some experience. did you do similar stuff? Averaging O2 feedback across the fuel table cells?

Yep, it's been awhile since I've looked at the details, but I was taking values such as battery voltage/offset, KAMRF, Lambse, MAF transfer tables, A/F tables, timing tables, narrow band 02 sensor values, wideband 02 sensor values, INJPW high and low slope, INJ timing, load, ect, into consideration to deliver real time calculated values and averaging so I knew where to make my adjustments. When I first started tuning with the Tweecer I was all over the place with my adjustments and this was one way I was able to narrow down where I actually needed to make my changes. I pretty much read and memorized the entire EEV IV strategy book to come up with my calculations.

I've been concentrated on learning the copperhead ECU strategy the last couple years. Needless to say, it's WAY more involved then EEC IV.
 
Last edited:
@vristang

Ha, I just found a thread I saved in my "Tweecer Tuning Resources" folder that you made back from 2006. It was asking what an acceptable KAMRF is. Grady posted some great information that I used when I was tuning my '95 Cobra. Damn I'm getting older.....
 
I find this tuning stuff interesting, is there a book 'Tuning For Dummies'?

I don't know what level you're at, so I hope this isn't insulting, but here is an old school article that gives the absolute basics and theory behind the EEC-IV.

http://www.coyotemuscle.com/images/personal/to_post/tuning/Ford Fuel Injection-EEC IV.pdf

And here is a folder with that and a couple more documents that go into more specifics. This is where I started. I have tons more of this stuff saved back from when I had my 95.

http://www.coyotemuscle.com/images/personal/to_post/tuning/
 
  • Like
Reactions: General karthief
I don't know what level you're at, so I hope this isn't insulting, but here is an old school article that gives the absolute basics and theory behind the EEC-IV.

http://www.coyotemuscle.com/images/personal/to_post/tuning/Ford Fuel Injection-EEC IV.pdf

And here is a folder with that and a couple more documents that go into more specifics. This is where I started. I have tons more of this stuff saved back from when I had my 95.

http://www.coyotemuscle.com/images/personal/to_post/tuning/
Thanks I'll read it over.
 
With the deadline approaching on Wednesday, I've put 20 to 30 hours into this project. I haven't gotten very far with the car itself, but I put about 20 data logs into a single dataframe to build statistics and recommendations off of. As far as the code goes, it's almost done, at least for the project itself. I plan to keep working on it on my own as time allows in the future.

I am excited to share. Every bit of the software I use is open source and free, including the bigstuff software. So, anyone should be able to use my program with their big stuff.

The program compiles as many datalogs as you like together, bins the results by each cell in your VE table, compares the mean AFR readings you observe with the Desired AFR reading for that cell over the long run of all the times your car operated in that cell, and spits out the recommended table.

You can filter your logs by anything you can collect data on. So, you can see how voltage is affecting your results and adjust injector opening time accordingly. Or, you can see specific coolant temp ranges. It also allows you to limit the RPM and load ranges to adjust or the minimum time in cells before it will even recommend changes.

I'm working towards automating the importing and exporting of VE tables to and from the big stuff software.

The coding is super aggravating to write, but super cool to see something I never could have done, before.
 
I misspoke there. Big Stuff's software is proprietary, and I do not yet have access to it's inner API, but the software itself is free. You just go to their website and download bigcomm and/or bigcomm pro. In pro, some features like 'autotune' are for purchase, but I tgink it still supports all of the same features I'm using in the normal bigcomm package.

I understand that John Meaney initially designed the system FAST and Accel used. So, there's a small possibility that it might work with their legacy systems.

I can tell you that it exports tables in XML, stores data logs in CSV in raw hexadecimal with converted values, and the tune files are in pure hexadecimal txt/csv files. So, it's written in a basic coding language like C++ or an interpreted language like java or python.
 
Last edited: