Announcement

Collapse
No announcement yet.

Could this be a method to calculate diesel mpg?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Could this be a method to calculate diesel mpg?

    I've been chewing over how to calculate diesel mpg from obd data, as we know diesel engines do not meter fuel out in the same way as a petrol engine, so it makes the calculation very difficult.

    But, we can work out mpg when refilling the tank for ourselves.

    Would the method below work ? -

    Record average speed, along with engine load and rpm, maybe mass air flow too.

    Plug in the mpg we worked out when refilling.

    Then some how use the recorded speed, engine load, rpm etc to map out the average mpg.

    So if you do a lot of town driving

    you might get average speeds of 30mph, low rpm values and a mixture of engine loads giving you an average 35 mpg for example

    Then if you do a lot of A road driving

    Higher speeds of 60mph, higher rpms and more steady engine loads giving you an average of 50mpg

    Eventually working out a map of engine speed, rpm and engine load with approximate mpg. The more trips you do, the more accurate the result.

    Anyone good at mathmatical formulas?

  • #2
    Could someone please explain to me why it is so important to know the average mpg?

    I read these sort of topics everywhere, everyone seems to want to know the mpg of the car..

    My car ECU can't supply these values either, but it would be the last thing I want to know about the car.. When the $$ is low, I just drive relaxed, nog more then 2500rpm and the car takes 4L / 100km.. When times are not so though, the car (read: I, the driver) consumes 6l / 100km

    I know this, and I know the car can't do better.. But still. I'm a curious person, so this is not a bash or something, I just would like to know why..

    thnx m8

    Comment


    • #3
      Agreed w/ hakkow, this topic seems to be one of religious fervor for reasons that are unclear. I still calculate average MPG the way I always have, with a calculator, the odometer, and the metering device built into every service station's fuel pump.

      @ sonicmule, my knowledge of modern diesel engine management is somewhat limited as to particulars, however I'm not clear on what you mean by "diesel engines do not meter fuel out in the same way as a petrol engine." Since you are speaking of OBD, MAF, and load calculation, I assume that we are dealing with a common-rail diesel system using electronic fuel injectors. In what way does this system vary from that of a petrol engine? Granted, the fuel pressure is higher and the injection duration shorter, but in both systems you have a set of injectors with a known mass flow rate, being electronically operated for a variable length of time per cycle.

      How is this hard?

      Comment


      • #4
        Petrol cars measure the amount of air going into the engine and calculate from that the amount of fuel needed. So, there's always some relation between air and fuel.
        Diesels don't care how much air is going into the engine, as there's no throttle it's always a lot. The amount of fuel injected is controlled by the drivers foot. The more you press the accelerator pedal, the more fuel is injected (well, up to a limit). This means there's no relation between air and fuel.

        Comment


        • #5
          Airflow does not matter one bit insofar as calculating MPG is concerned.

          If you know either the duty cycle of the injectors (%), or engine RPM and the duration of the injector pulses (in milliseconds), then based upon the injectors' static mass flow rate (cc / min) you can compute the total amount of fuel per unit time being delivered, again, in cc / min or L / hour. (you'll need to correct for the injectors' on and off lag times, if unequal.)

          If you also know the vehicle speed (in KPH) then you can calculate mileage. If you are traveling at 100 KPH, and your injectors are delivering 5 LPH, then your mileage is 5L / 100 KM. (For Americans, that's 47 MPG.)

          Easy.

          Comment


          • #6
            If you're lucky you can get the length of the main injection through OBD2/EOBD.
            However, diesel's use 3 to 5 injections per cycle.
            Don't think you can get it right.

            Besides that, flow rate and injection time are not enough. Diesels also vary the injection pressure from 300 bar at idle up to 1500 or 1800 or even 2000 bar depending on the system. And the amount injected changes with the pressure.

            Comment


            • #7
              Originally posted by p2psmurf View Post
              If you're lucky you can get the length of the main injection through OBD2/EOBD.
              And if not, you can measure it directly with a simple microcontroller (such as a Parallax stamp), and pass the data into the PC as RS232.


              However, diesel's use 3 to 5 injections per cycle.
              ?!

              This contradicts my admittedly outdated understanding of diesel theory, but I'll accept it. In that case, just measure each pulse and sum them. You need monitor only one injector.


              Besides that, flow rate and injection time are not enough. Diesels also vary the injection pressure from 300 bar at idle up to 1500 or 1800 or even 2000 bar depending on the system. And the amount injected changes with the pressure.
              Sounds like a variable that can easily be accounted for in software once it is measured and its effect on injector flowrate known. That much can be determined with a pressure gauge, a graduated cylinder, and a means of triggering the injector externally. It's probable that a shop which services diesel injectors may already have this data, or at least the means to collect it. Dynamic flow testing is a common procedure on gasoline injectors, and I have to assume the same service exists for diesel injectors.

              Comment


              • #8
                A pressure gauge for 2000 bar? That's 29000 (twenty-nine thousand) psi.
                I would be a bit careful here. Oil at that pressure will cut a hole in a steel plate, so imagine what that will do to a human body.

                But why this difficult? Just monitor the fuel-consumption signal from the ecu, the same as the instrument panel does.

                But that wasn't the original question. The original question (as I understand it) was how to calculate it using OBD2/EOBD pid values which should work for every vehicle.
                If we start with measuring injection times or fuel-consumption signals, you would have to calibrate it for a vehicle.

                A good article on diesel injection systems:
                http://autospeed.com/cms/title_Commo...4/article.html
                It seems we also have to measure fuel temp if we want to use injection times to calculate MPG.

                Comment


                • #9
                  Originally posted by p2psmurf View Post
                  A pressure gauge for 2000 bar? That's 29000 (twenty-nine thousand) psi.
                  Sure. Industrial suppliers that deal with big hydraulic systems will have gauges calibrated in that range. Heck, even Enco Tools has one for US$32 that's rated to 10,000 PSI (690 bar). I get all of my pressure and temperature instruments from them- much lower price (and much better quality) than dealing with automotive vendors.


                  But why this difficult? Just monitor the fuel-consumption signal from the ecu, the same as the instrument panel does.

                  But that wasn't the original question. The original question (as I understand it) was how to calculate it using OBD2/EOBD pid values which should work for every vehicle.
                  Well, that's where I'm hazy. If the ECU already tells you fuel consumption, then why the business of reading Mass Air mentioned in the first post? (Do direct-injection diesels even use MAF sensors?)


                  A good article on diesel injection systems:
                  http://autospeed.com/cms/title_Commo...4/article.html
                  It seems we also have to measure fuel temp if we want to use injection times to calculate MPG.
                  Thanks, I'll check that out. I know gasoline EFI pretty much inside and out, but the only diesels I've worked with were older marine engines w/ mechanical injection.

                  Comment


                  • #10
                    I agree your method could be used, but think of the costs involved if you need the injector flow to be measured before you can use those figures. And then you have to flow them at different pressures and with different fuel temps as well.
                    You also need hardware to get the injection times, pressure and fuel temperature.
                    I think this is to costly for most enthusiasts.

                    Yes, a lot of modern diesels have a MAF, but you can't use that signal for MPG calculation. Let's say the MAF is saying 800 mg/cycle. That doesn't tell you how much fuel is going in. That is solely dependent on the drivers foot, the main injection could be 3 cubic centimeters per cycle or 30 cubic centimeters per cycle and everything in between. There's not a fixed relation between air and fuel, in contrast with petrol cars where you know this relation and can deduce fuel from the amount of air going into the engine. That is why everybody wants to read the MAF value.

                    A lot of ecu's have either a dedicated wire for fuel consumption or they communicate with the instrument panel over can-bus or J1850 bus. Then you need hardware and software to get that signal. And quite a lot of reverse engineering to find out which signal it is and what it means. Not my idea of what the average do-it-your-self enthusiast is capable of. It is not a signal that can be read by simple OBD2/EOBD protocols.

                    Comment


                    • #11
                      Ok, I thought you were saying that the fuel consumption signal was OBD accessible.

                      So it sounds to me that if you want to compute fuel consumption based on OBD-II data alone, you're gonna have to measure and reverse-engineer something. Either come up with a plot of MAF vs. TPS vs. actual fuel, or measure the flow caracteristics of the injectors. Neither will be simple.

                      Do you have a chart showing all of the various data that are available from a diesel's OBD-II port? There must be some way of reading injector duration from it.

                      Comment


                      • #12
                        Data is described in SAE J1979, which is not available on the internet.
                        Most of the data (pids) are described here: http://en.wikipedia.org/wiki/OBD-II_PIDs
                        This applies to vehicles produced until 2006. In 2007 more than 50 new pids were defined which may have some information needed for this problem, but that information is not publicly available, and only used in 2007 and newer vehicles.

                        With the available pids there will be problems. Pid 10 (Maf airflow) is insufficient. Maximum is 655 grams/second and big diesels may use more air than that.
                        Injection duration is not present within the 2002 specification.
                        Fuel temperature is also not present within this spec.
                        You tell me how it should be done. I don't think it's possible for a diesel, which is what I have been saying all along.

                        Comment


                        • #13
                          If you want a one-size-fits-all solution, running entirely off OBD-II, with no external data inputs and no external references, then yeah, it's probably impossible.

                          If you're willing to do a little bit of app-specific configuration, then I don't see it being too hard.

                          Looks like the fuel pressure problem is solved for us: PID 23, Fuel Rail Pressure, Diesel (0 - 655,350 kPa) ought to cover that.

                          Either PID 04, Calculated engine load value or PID 43, Absolute load value ought to be useful. I'm not sure whether they are considering "load" to be a static value (independent of RPM, IOW, reflective of instantaneous torque and thus correlating to injector duration) or a dynamic value (varying with RPM, IOW, reflective of HP and thus correlating to injector duty cycle %) but either way, you can do some empirical observation and then solve for actual injector duration based on one of 'em without needing to know airflow, TPS, or anything else.

                          Is fuel temp really that big of a variable? Honest question. If it is, then I'm guessing you can solve it based on CLT and be "close enough" for our purposes.

                          So let's see. Fuel pressure? Check. Injector duration? Check. Fuel temp? Check(ish).

                          At that point, all you need are the lag characteristics and static mass flowrate curve of the injectors themselves, and you've got MPG.


                          Still haven't found any references to an injector firing more than once per cycle. I can't imagine how that would be either physically possible or practically useful.

                          Comment


                          • #14
                            Have you read the article I gave the link for?
                            I'll quote:
                            Unlike a conventional port fuel injected petrol engine, where the amount of fuel injected can be considered to be directly proportional to the injector opening time, a diesel injector will vary in mass flow depending on the difference between the injection and combustion chamber pressures, the density of the fuel (which is temperature dependent), and the dynamic compressibility of the fuel. The specified injector duration must therefore take these factors into account.

                            Diesel fuel injectors do not add the fuel for a combustion cycle in one event, instead they operate in up to four different modes. The first is pre-injection, a short duration pulse which reduces combustion noise and Oxides of Nitrogen (NOx) emissions. The bulk of the fuel is then added in the main injection phase, before the injector is turned off momentarily before then adding a post-injection amount of fuel. This post-injection reduces soot emissions. Finally, at up to 180 crankshaft degrees later, a retarded post-injection can occur. The latter acts as a reducing agent for an NOx accumulator-type catalytic converter and/or raises the exhaust gas temperature for the regeneration of a particulate filter.

                            Comment


                            • #15
                              Originally posted by p2psmurf View Post
                              Have you read the article I gave the link for?
                              Yes, though I glossed over the multi-event part. That's quite interesting, and is definitely a feature unique to common-rail systems. Learn something new every day. Doesn't matter for our purposes though if we forget about measuring pulsewidth directly and instead take load data from the ECU.


                              Unlike a conventional port fuel injected petrol engine, where the amount of fuel injected can be considered to be directly proportional to the injector opening time, a diesel injector will vary in mass flow depending on the difference between the injection and combustion chamber pressures, the density of the fuel (which is temperature dependent), and the dynamic compressibility of the fuel. The specified injector duration must therefore take these factors into account.
                              Yep, and if we use the load computation from the OBD-II datastream, then all this will have already been accounted for. Now that I think about it, it's even simpler than I stated above.

                              We don't need to concern ourselves at all with fuel pressure and temperature, chamber pressure, yadda yadda. I started overcomplicating this after your first response, and I failed to step back and appreciate the actual simplicity of the problem. Load, be it in a petrol engine, a diesel, a jet turbine or a reaction rocket, is all about fuel mass per unit time. It really is exactly as the OP described it.

                              Comment

                              Working...
                              X