Page 1 of 2

MAF lookup bug ?

Posted: Sun Nov 12, 2017 1:22 am
by W126
Hi,

the MAF lookup (mapping MAF voltage to MAF) seems buggy to me.
I have sorted a log file by MAF voltage and got different MAF values for identical voltages.
Then I made a Tuner Studio custom channel "MafCurve" which does a MAF lookup in the
MAF Flow Curve and compared that to the MAF values.
MafCurve = { tableLookup(array.mafflow, array.mafv, maf_volts) }, "g/s";
The max error in this log is 24% !.
error.jpg
error.jpg (45.29 KiB) Viewed 864 times
FW 1.5.1

I had to cut the log.

Re: MAF lookup bug ?

Posted: Sun Nov 12, 2017 5:34 pm
by jsmcortina
Please attach your MSQ.
There could be a number of factors here, ones that spring to mind:
- the datalog points are not synchronised with the actual calculation.
- the curve is linearly interpolated which might not be exactly the same as your comparison curve.

I did a scatter plot in MegaLogViewer of MAF vs. MAFvolts and it give a "fat" line, showing a bit of a spread.

James

Re: MAF lookup bug ?

Posted: Mon Nov 13, 2017 9:45 pm
by W126
Hi James,

thank you for your reply.
Attached you'll find my tune.

Jan

Re: MAF lookup bug ?

Posted: Tue Nov 14, 2017 5:39 am
by jsmcortina
I looked at your log again and your tune. Nothing is jumping out as incorrect. You have a 50% lag enabled on MAF. So the value will rarely match the instantaneous table lookup due to the smoothing. This will be especially visible during transients.

James

Re: MAF lookup bug ?

Posted: Tue Nov 14, 2017 6:25 am
by W126
Hi James,

thank you for your analysis.
The 50% lag is the default.
Which lag factor do you recommend for MAF ?

Jan

Re: MAF lookup bug ?

Posted: Fri Dec 22, 2017 8:56 am
by W126
Hi James,

I made a new log with MAF lag factor 100.
Still there are significant deltas between logged and calculated MAF.
The max error is 67%.
error.JPG
error.JPG (27.37 KiB) Viewed 723 times
A scatter plot MAF vs. MAF Volts shows a lot of spread.
scatter.JPG
scatter.JPG (58.43 KiB) Viewed 723 times
I don't want to claim that this is a bug, I simply want to understand it.

[ I had to cut the log ]

Regards,
Jan

Re: MAF lookup bug ?

Posted: Tue Dec 26, 2017 10:20 am
by theturbodog
I couldn't quite tell from the msq/msl, but my guess would be this variance is caused by MAT correction or MAT air density table corrections(In 1.4.x/1.5.x firmware I've noticed that MAT air density correction table has an effect on MAF even though it's greyed out in TS and is meant for speed density). Correction would give several MAF values for each voltage, but what I don't know is whether the log value is the raw MAF calculation before corrections or if it is post correction.

Re: MAF lookup bug ?

Posted: Wed Dec 27, 2017 2:14 am
by W126
I don't think so.
There is no MAT dependency visible in the zoomed scatter plot.
Air correction is between 97% and 103% through the whole log.
There should be no air correction at all with MAF.
mafmat.JPG
mafmat.JPG (86.58 KiB) Viewed 679 times

Re: MAF lookup bug ?

Posted: Wed Dec 27, 2017 6:04 am
by ashford
also when in maf mode i think it also uses map sampling as maf sampling, that will add a bit of smoothing as well.

for giggles try out map/maf logging in high speed loggers once, it will blow your mind how sensitive it is

Re: MAF lookup bug ?

Posted: Wed Dec 27, 2017 2:09 pm
by W126
interesting, I will make a high speed log.

Re: MAF lookup bug ?

Posted: Thu Dec 28, 2017 8:18 am
by theturbodog
[quote="W126"]
There should be no air correction at all with MAF.
[/quote]

Right, at least that's the desire anyway. What I had to do to get my MAF to behave somewhat like I expected it to was to zero out all the air correction factors both for MAT air density and MAF/MAT correction. Even though the air density temp corrections shouldn't affect MAF they do for me. You can easily test this by increasing/decreasing the air density correction factor to large/small values and you can see large AFR swings from it.

Re: MAF lookup bug ?

Posted: Thu Dec 28, 2017 10:27 am
by whittlebeast
I did a scatter plot of MAPxRPM vs MAF and all looks fairly normal.

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 10:50 am
by W126
@theturbodog: Air correction cannot be zeroed out, it's disabled in MAF mode.

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 10:52 am
by W126
@whittlebeast: What do you mean by "all looks fairly normal" ?
MAPxRPM and MAF voltage are two different things.

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 11:13 am
by whittlebeast

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 2:52 pm
by W126
the question is why I get different MAF values for same voltages.

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 3:08 pm
by whittlebeast
My guess is this is an issue with data packets may not be synced in the data log. Try logging way faster if on MS3.

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 3:29 pm
by W126
Tunerstudio is at the max, I could try SD card logging.
If I understand you correctly, your guess is the logged value is not the value actually used by MS ?

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 3:39 pm
by whittlebeast
That's my guess

Re: MAF lookup bug ?

Posted: Sat Dec 30, 2017 3:59 pm
by W126
but what's the meaning of a log file who's values are not the values used by MS ?