Understanding the MAF conversion formula in GUFB

This is where the BIN Hackers and definition junkies discuss the inner workings of the EEC code and hardware. General tuning questions do not go here. Only technical/hardware-specific/code questions and discussions belong here.

Moderators: cgrey8, EDS50, Jon 94GT, 2Shaker

Post Reply
User avatar
cgrey8
Administrator
Posts: 10565
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Understanding the MAF conversion formula in GUFB

Post by cgrey8 » Tue Dec 01, 2015 8:15 am

I'm trying to update the GUFx defs to use conversion variables in the formula section so BE can convert between common units on its own.

In an unreleased version of the GUFx defs, I have the "X" in the MAF conversion formula replaced with "KG" and this works to convert the MAF curve from kg/hr to lb/min. However it and the MAF payload are the only entities in the def file that are KG in the def file.

I'd like to make the formula native to lb/min so I know the conversion being done on the MAF transfer and MAF payload is the same formula used on every other number in the def file that is lb/min. At the moment, I don't have confidence that the conversion is being done exactly the same. Differences in the conversions, even slight differences, could make comparing BE-converted values in the def directly to the datalogged MAF value more difficult/invalid.

In the released GUFB def, the formula is:

Code: Select all

X/0.0000024*3600/2.20463/2^31
where X is the machine value as used by the EEC processor.

Simplifying all that math, I'm getting:

Code: Select all

X/3.156261228
(please confirm I've done this right)

Conversion from lb/min to kg/hr, I calculate to:

Code: Select all

1 lb/min * 60 min/1hr * .45359237 kg/lb = 27.2155422
My plan was to multiply the divisor, 3.156261228, by 27.21554 and discover a value that converts the machine value (X) into lb/min. Additionally, I was expecting this to come up to some common value used elsewhere in the def file like 1024, 2048, 4096 or some similar power of 2 commonly used on word-sized values. But that didn't happen. I just end up with yet another deep-decimal number that happens to be close to 86. But no other lb/min entity in the def file uses a conversion near that. So either my math is wrong or there's something going on that I'm not understanding and I would like to.

So I thought I would post the dilemma here, get some thoughts & possibly some history as how the formula was devised, and ultimately to get a "cleaner" conversion formula for the MAF curve/payload that results in lb/min.

Now I realize that if I change the formula, this will alter everybody's MAF curve values as they see them (actual values in the tune won't change at all). I'll be sure to point this out when I post the latest defs. If this is a big-enough deal, I'll put 2 views of the MAF curve/payload in the def...one with the original conversion formula and one with the newer one.
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, 1.6RRs, FMS Explorer (GT40p) headers, Slot Style MAF, aftermarket T5 'Z-Spec', 8.8" rear w/3.27s, Powertrax Locker, Innovate LC-1, GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

decipha

Re: Understanding the MAF conversion formula in GUFB

Post by decipha » Sat Dec 05, 2015 7:58 pm

its not a direct divisor because its in clock tics and not natively in an airmass value like the eec-v's are

you got the math right, here's a little tip to double check your work

the max flow value you can toss in the maf transfer is 20,763.5 kg/hr

its a word so 65535 / 20763.5 == /3.15625

20,763.5 * 2.2 / 60 = 761.3283 lbs/min

65535 / 761.3283 == / 86.08 = lbs/min

User avatar
cgrey8
Administrator
Posts: 10565
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Re: Understanding the MAF conversion formula in GUFB

Post by cgrey8 » Sat Dec 05, 2015 8:21 pm

Interesting that it is in clock ticks. I might have vaguely remembered hearing that.

The conversion you came up with has a value also very near 86 as well...just over. I think my calculations came up with something just under 86...~85.899ish (going from memory). I'd like to get a more absolute conversion.

It sounds like the most "native" conversion for this MAF is lb/tick. Armed with this info, I went digging in the GUFB doc and found:
GUFB doc wrote:1 tick = 2.4*10E-6 sec, 15 MHz EEC (pg 19-44 or 387)
Looking back at the original formula posted above:

Code: Select all

X/0.0000024*3600/2.20463/2^31
It makes a bit more sense:
  • 0.0000024 is tick ==> sec conversion
  • 3600 is sec ==> hr conversion
  • 2.20463 is the lb ==> kg conversion
  • 2^31 must be the native binary ==> lb conversion
So if I got this right, the most accurate lb/min conversion is:

Code: Select all

X*60/0.0000024/2^31 or X/85.89934592
I'll use the 1st one in the def, but it's good to see the simplified version also calculates to 85.899 as I remembered.

With the def setup like this, I'll have a much higher confidence in comparing MAF values to other flowrate values elsewhere in the def.

Thanks for the response. You got me the piece of info that ultimately got me to the answer I was looking for.
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, 1.6RRs, FMS Explorer (GT40p) headers, Slot Style MAF, aftermarket T5 'Z-Spec', 8.8" rear w/3.27s, Powertrax Locker, Innovate LC-1, GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

decipha

Re: Understanding the MAF conversion formula in GUFB

Post by decipha » Sun Dec 06, 2015 8:39 pm

I recommend keeping the kg/hr flow in the def and just copying it with another in lbs/min

just show them both, in my fbfg2 def i have the maf curve in there 3 times, above and in raw hex»»decimal so folks can copy and paste when swapping strats

User avatar
cgrey8
Administrator
Posts: 10565
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Re: Understanding the MAF conversion formula in GUFB

Post by cgrey8 » Mon Dec 07, 2015 7:55 am

I'm pleased to find the new formula gives me the same exact values in my MAF curve when BE is set to display kg/hr.
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, 1.6RRs, FMS Explorer (GT40p) headers, Slot Style MAF, aftermarket T5 'Z-Spec', 8.8" rear w/3.27s, Powertrax Locker, Innovate LC-1, GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests