DIY Tuning walk-through (TunerPro)
#106
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
-Rogue
#107
Rainman
Rennlist Member
Rennlist Member
oh ok cool thanks.
about the FQS "fuel scale" table...this is the numbers that came with the .bin.
i am looking at the published FQS table (position vs timing/fuel) on frwilk and cannot see a correlation between those numbers and the ones in the table. im going to hazard a guess that maybe the numbers in the fuel scale table represent injector flow at a particular position? this would make sense to me as at higher constant flow say for position 3 (+6% fuel) the maximum duty of the injector is reduced. i also notice that taking the "stock" number of 34.6 and dividing by either 1.06, 1.03 or .97 (+6%, +3%, or -3% fuel) gets almost identical numbers to those listed in the fuel scaling table
i love this software lol
about the FQS "fuel scale" table...this is the numbers that came with the .bin.
i am looking at the published FQS table (position vs timing/fuel) on frwilk and cannot see a correlation between those numbers and the ones in the table. im going to hazard a guess that maybe the numbers in the fuel scale table represent injector flow at a particular position? this would make sense to me as at higher constant flow say for position 3 (+6% fuel) the maximum duty of the injector is reduced. i also notice that taking the "stock" number of 34.6 and dividing by either 1.06, 1.03 or .97 (+6%, +3%, or -3% fuel) gets almost identical numbers to those listed in the fuel scaling table
i love this software lol
#108
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
-Rogue
#109
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
Updated bundle to include the newest release of TunerPro - this version has the data-tracing which works in the majority of the MAPs.
#110
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
Ok, attached is an Excel worksheet that allows you to play with the three AFM Transfer Function Tables. This worksheet will output a graph of the transfer function, and will hopefully allow people to get a better understanding of the 944/951 workings by manipulating the tables.
Transfer Function Worksheet
Furthermore, those with aftermarket MAFs, can try to get the transfer function to match their aftermarket unit (and see why the 944/951 stock code is limiting).
-Rogue
Transfer Function Worksheet
Furthermore, those with aftermarket MAFs, can try to get the transfer function to match their aftermarket unit (and see why the 944/951 stock code is limiting).
-Rogue
#111
Rennlist Member
#112
Great project!
I'm a little confused about you interpretation of the FQS injection time scaling (*34.6) and the injection table target air fuel ratio (*14.5). Could you explain this a little more detailed?
I'm a little confused about you interpretation of the FQS injection time scaling (*34.6) and the injection table target air fuel ratio (*14.5). Could you explain this a little more detailed?
#113
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
And the target AFR should be * 14.7... I'll update the bundles.
-Rogue
#114
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
#115
Take the FQS values as simple factors (x/128) and compare the result with the description of the FQS in the workshop manual...
#116
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
From my understanding the injectors flowrate at a given fuel pressure is part of the AFM curve. For any volume flow the AFM curve delivers a basic injection time. Propably based on a stoichiometric mixture. That is corrected in a first step by an abstract filling rate of the engine (2000/rpm). The rest are just correcting factors to this value.
Yes it is the basic injector pulse width calculation which uses the VAF signal that I changed. That calculation is performed before any maps (ie. cell values) are applied. I could for instance remove all three maps (idle/pt/wot), put in an appropriate constant multiplier and the car would operate under all conditions with a 14.7 AFR.
The FQS fuel change values are:
position / change
0 / 0%
1 / +3%
2 / -3%
3 / +6%
The scaling I used for the FQS represents this change, smaller injector size will increase IDC, larger injector will decrease IDC (this is doing the X/128):
position / injector size / percent change
0 / 34.6 / 0%
1 / 33.55 / +3%
2 / 35.72 / -3%
3 / 32.54 / +6%
Perhaps this is not the best way of displaying the FQS values, but I haven't had a problem with it yet. The numbers are just guidelines, and not hard values.
-Rogue
#117
Rennlist Member
Well, there’s a little more to the formula than what’s been given before. Here’s what I make it out to be:
It would be interesting to see the code that implements this. I don’t quite understand the need for the final division term (the / 16384). Since 16384 is a power of 2 this could have been incorporated into the values in the T2 table. There must be something more going on that I’m not aware of.
When I read this I remember thinking that the two curves didn’t look all that different to me, which left me puzzled as to why the existing AFM code couldn’t be adapted to match the transfer function of the lightning MAF. Once I got your spreadsheet and understood the basic algorithm I began to explore the math behind the algorithm and what types of curves it was capable of representing. As it turns out, the AFM code is capable of making a reasonable approximation of the Lightning MAF transfer function given the right input tables. (Since I don’t have access to the data sheet for the Lightning MAF I used the values from the following post by toddk911: link. Hopefully it’s close to the real thing.)
I discovered that the AFM algorithm is capable of representing curves of the form y = a * b ^ x, for reasonably sized values of a and b. Using a curve fitting algorithm I came up with values for a and b that produce a curve fairly close to that of the Lightning MAF transfer function, in this case a=12.11433, b=1.60063. I then developed a spreadsheet that helped me pick the correct values for the three tables based on these values. Here are the table values I came up with:
T1: 155 248 199 159 254 204 163 130
T2: 3 3 4 5 5 6 7 8
T3: 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 247 250 253
The following graph shows the computed air flow based on my new table values as compared to the actual air flow from Lighting MAF transfer function:
For most of the curve the maximum error in the computed value is around +/-20 g/s. While small, my guess is that this is still too big to ignore in the lower range of the curve. I wonder however if this could be trimmed out by adjusting other tables.
This was mostly an exercise in curiosity on my part. But I wonder if one couldn’t use this approach to adapt an off the shelf MAF without requiring a piggyback.
Flow (g/s) = T1[ Vmaf / 32 ] * T3[ Vmaf % 32] * 2 ^ T2[ Vmaf / 32 ] / 16384
where Vmaf is an 8-bit representation of the MAF output voltage from 0 to 5 volts.It would be interesting to see the code that implements this. I don’t quite understand the need for the final division term (the / 16384). Since 16384 is a power of 2 this could have been incorporated into the values in the T2 table. There must be something more going on that I’m not aware of.
Originally Posted by Rogue_Ant
This function predetermines the basic curve, so that no matter how we play with the data in the three tables, it is impossible to truly match the Lightning MAF.
I discovered that the AFM algorithm is capable of representing curves of the form y = a * b ^ x, for reasonably sized values of a and b. Using a curve fitting algorithm I came up with values for a and b that produce a curve fairly close to that of the Lightning MAF transfer function, in this case a=12.11433, b=1.60063. I then developed a spreadsheet that helped me pick the correct values for the three tables based on these values. Here are the table values I came up with:
T1: 155 248 199 159 254 204 163 130
T2: 3 3 4 5 5 6 7 8
T3: 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 247 250 253
The following graph shows the computed air flow based on my new table values as compared to the actual air flow from Lighting MAF transfer function:
For most of the curve the maximum error in the computed value is around +/-20 g/s. While small, my guess is that this is still too big to ignore in the lower range of the curve. I wonder however if this could be trimmed out by adjusting other tables.
This was mostly an exercise in curiosity on my part. But I wonder if one couldn’t use this approach to adapt an off the shelf MAF without requiring a piggyback.
#118
Rainman
Rennlist Member
Rennlist Member
by changing the transfer function, like in order to use a 951 afm on my NA, is that to ensure that when the 951 afm measures X volume airflow, that the NA computer puts out Y fuel corresponding to X? otherwise, like if the 951 afm were just plugged in, it would measure X airflow but the DME would read it as less than X since it is programmed for an afm that flows less, therefore it would send too little fuel and run lean?
#119
Rennlist Member
The DME uses the transfer function to determine how much air is flowing into the engine when it sees a particular voltage from the AFM. A different size AFM will likely output a different voltage for the same amount of air. Conversely, two different AFMs that are both outputting the same voltage are likely to have differing amounts of air flowing through them. Since the DME needs to base its fueling decision on the actual amount of air flowing into the engine, it needs a transfer function that matches the behavior of the attached AFM.
In the case of using a 951 AFM on an NA car, without knowing the difference between the NA and 951 AFMs I can’t really say what would happen. However if I had to guess, I’d say you’re probably right about the car running lean.
In the case of using a 951 AFM on an NA car, without knowing the difference between the NA and 951 AFMs I can’t really say what would happen. However if I had to guess, I’d say you’re probably right about the car running lean.
#120
Addict
Rennlist Member
Rennlist
Small Business Partner
Rennlist Member
Rennlist
Small Business Partner
Thread Starter
Well, there’s a little more to the formula than what’s been given before. Here’s what I make it out to be:
It would be interesting to see the code that implements this. I don’t quite understand the need for the final division term (the / 16384). Since 16384 is a power of 2 this could have been incorporated into the values in the T2 table. There must be something more going on that I’m not aware of.
When I read this I remember thinking that the two curves didn’t look all that different to me, which left me puzzled as to why the existing AFM code couldn’t be adapted to match the transfer function of the lightning MAF. Once I got your spreadsheet and understood the basic algorithm I began to explore the math behind the algorithm and what types of curves it was capable of representing. As it turns out, the AFM code is capable of making a reasonable approximation of the Lightning MAF transfer function given the right input tables. (Since I don’t have access to the data sheet for the Lightning MAF I used the values from the following post by toddk911: link. Hopefully it’s close to the real thing.)
I discovered that the AFM algorithm is capable of representing curves of the form y = a * b ^ x, for reasonably sized values of a and b. Using a curve fitting algorithm I came up with values for a and b that produce a curve fairly close to that of the Lightning MAF transfer function, in this case a=12.11433, b=1.60063. I then developed a spreadsheet that helped me pick the correct values for the three tables based on these values. Here are the table values I came up with:
T1: 155 248 199 159 254 204 163 130
T2: 3 3 4 5 5 6 7 8
T3: 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 247 250 253
The following graph shows the computed air flow based on my new table values as compared to the actual air flow from Lighting MAF transfer function:
For most of the curve the maximum error in the computed value is around +/-20 g/s. While small, my guess is that this is still too big to ignore in the lower range of the curve. I wonder however if this could be trimmed out by adjusting other tables.
This was mostly an exercise in curiosity on my part. But I wonder if one couldn’t use this approach to adapt an off the shelf MAF without requiring a piggyback.
Flow (g/s) = T1[ Vmaf / 32 ] * T3[ Vmaf % 32] * 2 ^ T2[ Vmaf / 32 ] / 16384
where Vmaf is an 8-bit representation of the MAF output voltage from 0 to 5 volts.It would be interesting to see the code that implements this. I don’t quite understand the need for the final division term (the / 16384). Since 16384 is a power of 2 this could have been incorporated into the values in the T2 table. There must be something more going on that I’m not aware of.
When I read this I remember thinking that the two curves didn’t look all that different to me, which left me puzzled as to why the existing AFM code couldn’t be adapted to match the transfer function of the lightning MAF. Once I got your spreadsheet and understood the basic algorithm I began to explore the math behind the algorithm and what types of curves it was capable of representing. As it turns out, the AFM code is capable of making a reasonable approximation of the Lightning MAF transfer function given the right input tables. (Since I don’t have access to the data sheet for the Lightning MAF I used the values from the following post by toddk911: link. Hopefully it’s close to the real thing.)
I discovered that the AFM algorithm is capable of representing curves of the form y = a * b ^ x, for reasonably sized values of a and b. Using a curve fitting algorithm I came up with values for a and b that produce a curve fairly close to that of the Lightning MAF transfer function, in this case a=12.11433, b=1.60063. I then developed a spreadsheet that helped me pick the correct values for the three tables based on these values. Here are the table values I came up with:
T1: 155 248 199 159 254 204 163 130
T2: 3 3 4 5 5 6 7 8
T3: 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 247 250 253
The following graph shows the computed air flow based on my new table values as compared to the actual air flow from Lighting MAF transfer function:
For most of the curve the maximum error in the computed value is around +/-20 g/s. While small, my guess is that this is still too big to ignore in the lower range of the curve. I wonder however if this could be trimmed out by adjusting other tables.
This was mostly an exercise in curiosity on my part. But I wonder if one couldn’t use this approach to adapt an off the shelf MAF without requiring a piggyback.
That is the closest I've curve I've seen to the lightning MAF... However, The low-loads are quite a bit off. I would be iterested in a % comparison between the lightning MAF and your curve. 20g/s difference is lot when, the engine is only injesting, say, ~4g/s.
And yes, there is a little bit more to the transfer function, but it really is not necessary for most to know. The VMAF/32 is to simply divide an 8bit number to divide an 8bit number to get a 0-7 pointer for he T1 & T3 tables... And the airflow value is a 24bit number, then is divided to get an 8bitnumber (IIRC). I'm out of state, so I'll double-check when I get back home.
It is easy to see the limitations of the stock transfer functin code, and why it nees to be changed to truely match up to an aftermarket MAF.
-Rogue