Page 13 of 13 FirstFirst ... 345678910111213
Results 121 to 123 of 123

Thread: Calculating MPG from VSS and MAF from OBD2

  1. #121
    Newbie
    Join Date
    May 2011
    Location
    Minot, ND
    Posts
    6
    Quote Originally Posted by lude-de View Post
    I've worked on this for two days now, and I've gotten to the point that I'm going to post my questions.

    My situation is unusual. I am working with the ODB1 Honda ECU that is chipped and has a data port installed. From this I can poll for information that the ECU is using to manage the engine.

    I am getting IAT in Fahrenheit , MAP in PSI, RPM and VSS in MPH.

    Here's an example of the numbers

    IAT = 88.39
    MAP = -16.97
    RPM = 3094
    VSS = 60.89


    IAT F to K = 304.3
    MAP PSI to kPa = -117.06
    RPM = 3094
    VSS = 60.89

    I plug that into the first formula to get IMAP:

    IMAP = RPM * MAP / IAT
    1190.218994413408 = 3094 * -117.06 / 304.3

    Then I plug that into the MAF formula:
    MAF = (IMAP/120)*(VE/100)*(ED)*(MM)/(R)
    MAF = (1190.218994413408/120)*(80/100)*(2.056)*(28.97)/8.314
    MAF = 9.918491620111732 * .8 * 2.056 * 28.97 / 8.314
    MAF = 56.84564559003256

    Then I plug that into the MPG formula with adjustments because I'm in MPH and not KPH:
    MPG = (14.7 * 6.17 * 454 * VSS) / (3600 * MAF / 100)
    MPG = (14.7 * 6.17 * 454 * 60.89) / (3600 * 56.84564559003256 / 100)
    MPG = 2507288.59794 / 2046.443241241172
    MPG = 1225.19332440382

    Now, as much as I'd like this to be true... it sadly isn't. I'm getting around 30 - 31.5 MPG on a tank of gas. I've checked my conversions several times and I'm sure they are correct.

    Can someone please put a second set of eyes on these equations to help me figure out what's wrong here. Unfortunately, I don't have an ODBII car to compare numbers with.

    Thank you in advance.
    Try #2 for posting...don't know where the first reply went...Here's the short version...

    #1 - MAP value figured wrong. You're reading manifold vacuum, not manifold pressure. Subtract your reading from ambient baro pressure (use 29.92 for starters) and work with that instead.

    #2 - F to K is off slightly.

    #3 - There's an extra /100 in the final solution.

    When I do the calculation the right way, I get about 31-ish MPG.

  2. #122
    Newbie lightner's Avatar
    Join Date
    Sep 2007
    Location
    La Jolla, CA
    Posts
    9

    On-Line Gasoline MPG Calculator (Using MAF and/or MAP/IAT/RPM)

    For those that want to calculate MPG using MAF (and/or MAP/IAT/RPM) for gasoline vehicles I've put together a Webpage with a Javascript-based air/fuel flow calculator...

    http://www.lightner.net/obd2guru/IMAP_AFcalc.html

    You may find this useful for "checking your work".

    As many of you have discovered---based on comments here and email that I regularly receive---getting all the units and calculations exactly right can be hard. And, in an embedded system without floating-point support, avoiding integer overflow errors can proved difficult.

    Best regards,

    Bruce D. Lightner
    [email protected]
    http://www.lightner.net/lightner/bruce/

  3. #123
    Newbie lightner's Avatar
    Join Date
    Sep 2007
    Location
    La Jolla, CA
    Posts
    9

    Usiing LOAD_ABS (OBD-II Mode 1 PID 0x43) to Estimate Vehicle MPG

    Quote Originally Posted by lightner View Post
    There seems to be at least two different interpretations of the OBD-II parameter called "engine load" (i.e., LOAD, in the range of 0-100%), as reported over the OBD-II bus by modern engine computers. One version gives a LOAD value with is directly proportional to MAF (i.e., mass air flow). The other version seems to show that MAF is proportional to (LOAD x RPM).

    So, if you want to solve for MAF using LOAD, first you need to determine which LOAD algorithm is being used by the vehicle in question, then you need to determine the appropriate constant scaling factor to derive MAF. Of course in one case you need to read RPM along with LOAD.

    Given a calculated MAF, plus a periodic VSS (i.e., vehicle speed) reading, integrating these gets you incremental fuel consumed and distance traveled. Divide one by the other and you get MPG.

    As I have noted before, using MAF to derive a fuel flow measured in gallons assumes a constant air-fuel (A/F) ratio and a fixed, known fuel density. Given that modern fuel injected engines are designed to run with a fixed, "stoichiometrically ideal" air fuel ratio of 14.7:1 almost all the time, using a constant A/F ratio for the MPG calculation makes good sense.
    SAE J1979 defines a new OBD-II parameter, LOAD_ABS (i.e., Mode 1 PID 0x43) which is the normalized value of air mass per intake stroke displayed as a percent. This value is directly proportional to air flow rate which, as we know, is directly proportional to fuel flow (almost 100% of the time). Therefore integrating this percentage and then multiplying it by a constant---which will be unique for a given vehicle make/model/engine, will provide a good estimate of fuel consumed. With that and distance traveled---derived from integrating vehicle speed readings---we can calculate fuel consumption in miles per gallon (MPG). Q.E.D.

    For the record, here's what the SAE standard says about this "new" OBD-II parameter:

    The absolute load value has some different characteristics than the LOAD_PCT defined in Mode 1 PID 0x04. Vehicles which utilize spark or compression ignition engines for propulsion shall use the following definition for calculating LOAD_ABS:

    LOAD_ABS = [air mass (g / intake stroke)] / 1.184 (g / litre) * cylinder displacement (litres / intake stroke)]

    Derivation:

    - air mass (g / intake stroke) = [total engine air mass (g/sec)] / [rpm (revs/min)* (1 min / 60 sec) * (1/2 # of cylinders (intake strokes / rev)],
    - LOAD_ABS = [air mass (g)/intake stroke] / [maximum air mass (g)/intake stroke at WOT@STP at 100% volumetric efficiency] * 100%.

    where:

    - STP = Standard Temperature and Pressure = 25 oC, 29.92 in Hg (101.3 kPa) BARO
    - WOT = wide open throttle.

    The quantity (maximum air mass (g)/intake stroke at WOT@STP at 100% volumetric efficiency) is a constant for a given cylinder swept volume. The constant is 1.184 (g/litre) * cylinder displacement (litres/intake stroke) based on air density at STP.

    Characteristics of LOAD_ABS are:

    - Ranges from 0% to approximately 95% for naturally aspirated engines, 0% to 400% for boosted engines,
    - Linearly correlated with engine indicated and brake torque,
    - Often used to schedule spark and EGR rates,
    - Peak value of LOAD_ABS correlates with volumetric efficiency at WOT.,
    - Indicates the pumping efficiency of the engine for diagnostic purposes.

    NOTE At engine off and ignition on the LOAD_ABS = 0 %.

    All vehicles with spark ignition engines used for propulsion are required to support PID 0x43.

    See Mode 1 PID 0x04 for an additional definition of engine LOAD.

Page 13 of 13 FirstFirst ... 345678910111213

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •