I found some time to write a simple data recorder for my data logging interface. Currently it dumps the entire log to a CSV file to make it easy to load into Excel. Once in Excel I am able to create graphs, charts, and what not. At the moment I have about 40 variables defined, and I am working on getting all of the ones needed for performance tuning defined. Once I have that setup, I will go back to tuning my car in the next few days hopefully.
In doing some bug fixes to my data logger, and writing my simple data recorder, I ran into some problems with my asynchronous multi-cast delegates that I use for handling messages from the OBD port on the car. Turns out the entire problem came from an unhandled exception in one of my asynchronous worker threads. It took me a while to realize this was the problem, because when you don’t handle an exception, the thread which executed the exception terminates, which caused my worker thread to disappear without doing any work. Once I had tracked the problem down it was an easy fix, but still a painful few hours of debugging.
I also had a chance to spend some time speaking with one of my friends who is a very knowledgeable Audi tuner. I asked him about the problems I was having using the enrichment tables to control the air fuel ratio. He told me that my problem most likely came from the underscaled MAF and injector settings I was using. Since the ME7 ecu is load based, and the fueling tables are all load based, if I had screwed up the load calculation, then all of the fueling calculations would be off. So I then spent some time going through the assembler code for the fueling calculations.
What I found was the ME7 ecu does all of its fueling calculations assuming an air fuel ratio of 14.7:1, always. The way it achieves different air fuel ratios is by scaling the load value that is used as a reference for the fueling calculations. So if the ecu wants to run lean, it scales the reference load down, and if it wants to run rich, it scales the reference load up. After I had that sorted out I went back to some of the air flow to load calculations I had looked at previously. The ecu uses many different maps and correction factors to convert air flow to load, and this makes the conversion non-linear. This causes my air fuel ratio problem when trying to control the ratio using the load based enrichment maps. Underscaling the MAF and injectors to avoid dealing with the load or air flow limits, assumes a linear relationship between air flow and fuel. But, because the amount fuel to inject is based on load, and load does not have a linear relationship with air mass the MAF reads, you end up with the wrong air fuel ratio.
My approach going forward is not to underscale the MAF and injectors, but instead raise any of the necessary limits to allow more load, and air in the system. This means starting from scratch with a new tune, but that is fine, since my current one is more a beta test.