Jump to content
Mopar1973Man.Com LLC
  • Welcome To Mopar1973Man.Com LLC

    We are a privately owned support forum for the Dodge Ram Cummins Diesels. All information is free to read for everyone. To interact or ask questions you must have a subscription plan to enable all other features beyond reading. Please go over to the Subscription Page and pick out a plan that fits you best. At any time you wish to cancel the subscription please go back over to the Subscription Page and hit the Cancel button and your subscription will be stopped. All subscriptions are auto-renewing. 

Fuel economy on iQuad


adamey1000

Recommended Posts

I have had the offset at 125% for the whole tank so far, so that wouldn’t be an issue. 

 

15 minutes ago, Quadzilla Power said:

You will have to reset the AVG MPG after you get the MPG offset fixed. 

 

You can do the maths to figure out how you need to adjust the MPG offset from 125%, but you really need a full tank at a particular offset before you change it otherwise it will skew the numbers. If you had it on 90%, but change it to 125 just recently you will probably want to start over. 

 

The instant MPG (ECO) going to 99.99 is because that is the biggest number that we are going to send back. The way it is calculated is because the fueling message sent to the VP44 at times when you're coasting is literally 0, which we believe means 0 fuel. When you divide the amount of distance you travelled by 0 your going to have a bad time. In math its infinite, in computers its NaN (which stands for Not a Number) and throws an error code and make everything die. So, when we see the fueling message of 0, we say you are getting 99.99 mpg at that instant. If we find out that the 0 fueling message means to still deliver a minimal amount of fuel then we will need to adjust it accordingly. 

 

 

I assume that even at a 0 fuel command the engine is fueling at least at the idle level. But the amount of fuel that you are burning at that point probably is not significant enough to change the average. I will do a data log this evening on my drive home from work. I forgot to export the one from this morning. 

 

An app feature that would be handy for those with my kind of memory problems would be storing the last data log until the app connects to the iQuad again. I often forget to export the log after I shut down. If that log was stored locally in the app until the next start-up, I know it would be better for me. I am unsure how much storage that would demand though. It’s just frustrating to shut down, close the app, and THEN remember to export the data log. 

Link to comment
Share on other sites

On 7/13/2018 at 2:52 PM, adamey1000 said:

Here is a data log from my drive home from work today. I am confident that my offset is wrong. I would love to be averaging 37mpg! I need some miles on the tank before I check the offset though. I just filled up this morning, so it shouldn’t be too long. 

iquad-2018-07-13-03.07.30.csv

I'm at 155-160 for off set, should be close for you 

Link to comment
Share on other sites

  • Owner

As for the MPG display it has serious errors. If you travel 100 miles and consume 5 gallons of fuel you expect to see 20 MPG

 

Not...

Capture+_2018-07-21-09-50-50.png

 

Like when I pulled in for breakfast it was now showing 26 MPG since that screen shot and miles was 109 and 5.2 gallons that 20.96 MPGs on my calculator.

Link to comment
Share on other sites

So right now, the AVG MPG is literally just an "average" of the  "ECO" gauge. Its seriously just a low pass filtered version of the "ECO" gauge that increases in its filtering over time. After a set number of samples, it will increase in the filtering. Basically, at first, its very reactive to how much fuel you're using, then a switch gets thrown and it becomes less reactive. What that means is that if you were coasting downhill when the switch is thrown you will start out unusually high and it will take a lot more time for it to come back down to your actual fuel mileage. To complicate things, the switch is thrown multiple times increasing the level of filtering every time. 

 

Now, I can base the MPG number off of the gallons used per trip, but I'm not sure that I can get a reading on the odometer through the J1939 bus. I will have to look into that. If everyone wants them to correlate that way I can change the AVG to just be the gallons used / distanced traveled to get an MPG for that trip. That way those two will always correlate, but I don't think that's what you want otherwise the avg MPG will always be reset with the reset of the gallons used per trip. 

I am not sure that having those gauges not correlate constitutes a "serious error" but I can see the desire to have them correlate.

 

Let's take @Mopar1973Man's example. First, he has an usually high AVG MPG because he drove 100 mile and used an estimated 5 gallons of fuel to do that.  Then he resets his stuff and lets his truck idle for a while, in the meantime, the AVG MPG gauge goes through probably two transitions of filtering slowing it down, then it takes a while for the gauge to react after hes moving so its still on the low side of what his calculations show it should be when he finishes his 25 mile drive.

 

Lets further complicate that with someone who doesn't reset the AVG MPG for several tanks of fuel which then puts the LPF in it highest filtering point yet (so high that I had to use a special data structure to account for the newer inputs in order for them to affect the output at all). Say he resets his gallons used per trip then drives up hill for a while using more fuel than average. At the end of the trip, he will say, "I've used way more fuel than my AVG says that I do". He then fills up again and resets his gallons used per trip, then returns home going downhill the whole way. When he gets home he will say, "This time I've used way less fuel than the AVG says I did". That's because the AVG is taking his average fuel usage over a very long period of time rather than just on those two trips. In this same scenario, if the AVG is reset every time with the gallons used per trip it should correlate better but it will also depend on the length of the trip. If it is short, the first few minutes will weigh much heavier than the last few minutes just due to how the filter changes over time. It should correlate much better over a longer trip, but the first few minutes after the AVG has been reset will still weigh heavier than the rest. 

 

In order to really check to see if the AVG is erroring on the high side or low side we need a much longer time period between resets and checks. I think it would be better to burn through a few tanks of fuel and then try to correlate the gallons used for all the trips versus the AVG that was calculated. If there is a large error, the we will have to make appropriate adjustments and find out where the error comes from. @Mopar1973Man's data gives the error in opposite directions so it makes it hard to try and find where the error comes from in that data. 

 

In summary, can you extend the tests? Can you take the average over several tanks of fuel without resetting the AVG MPG or Gallons Used per Trip and keep track of the odometer readings? Can you see if the discrepancies start to go away and the values start to merge? 

If the values don't start to merge then we will have to make changes. 

 

 

  • Thanks 1
Link to comment
Share on other sites

I will be filling up again in the next few days, and I will not reset the trip or average. I think I am following your explanation of the filtering, but the hand calculated MPG should be close to the average I would think. In order to keep the data useful, should I hold off on adjusting my offset? I was going to correct it after this tank. 

Link to comment
Share on other sites

  • Owner

I've got to ask how are you doing the math? If it's not based on gallons and miles? 

 

So I'm only a bit below 7/8 of a tank now. 164 miles and Quadzilla shows 11.98 MPG. So if I idle for any extended time say stuck on a traffic jam, warming up the engine on a cold morning to break the frost on the glass, that means the Quadzilla will show inherently super low. MPG's. Like this tank I've idled in a parking lot for about 30minutes so I didn't fry in the 102*F temperatures in Ontario, OR.

 

I know my current actual MPG is right about 18 MPG right now hand mathed off the gallons and odometer. 

 

In the past I played the game of watching the odometer every 20. (20, 40, 60, 80, etc.) So if I was above 20 MPG the gallons used should be below the 20 multipler. If I was below 20 MPG then the gallons would be above 20 multipler.

 

Example: 100 miles and 4.8 gallons used you know you are above 20 MPG (actually 20.8 MPG). 

 

Example: 120 miles and 6.5 gallons used you know you are well below 20 MPG (actually 18.4 MPG)

 

Currently, the Average is a long way from right... So if Quad shows about 12 MPG and my quick math show 18 that's an error of -6 MPG because I idled in the parking lot for 30 minutes. I think that formula needs some reworking.

 

Link to comment
Share on other sites

54 minutes ago, adamey1000 said:

I will be filling up again in the next few days, and I will not reset the trip or average. I think I am following your explanation of the filtering, but the hand calculated MPG should be close to the average I would think. In order to keep the data useful, should I hold off on adjusting my offset? I was going to correct it after this tank. 

 

I would go ahead and reset everything and give the corrected offset. Then from there run a few tanks of fuel and do the tests that way. 

Link to comment
Share on other sites

47 minutes ago, Mopar1973Man said:

I've got to ask how are you doing the math? If it's not based on gallons and miles? 

 

So I'm only a bit below 7/8 of a tank now. 164 miles and Quadzilla shows 11.98 MPG. So if I idle for any extended time say stuck on a traffic jam, warming up the engine on a cold morning to break the frost on the glass, that means the Quadzilla will show inherently super low. MPG's. Like this tank I've idled in a parking lot for about 30minutes so I didn't fry in the 102*F temperatures in Ontario, OR.

 

I know my current actual MPG is right about 18 MPG right now hand mathed off the gallons and odometer. 

 

In the past I played the game of watching the odometer every 20. (20, 40, 60, 80, etc.) So if I was above 20 MPG the gallons used should be below the 20 multipler. If I was below 20 MPG then the gallons would be above 20 multipler.

 

Example: 100 miles and 4.8 gallons used you know you are above 20 MPG (actually 20.8 MPG). 

 

Example: 120 miles and 6.5 gallons used you know you are well below 20 MPG (actually 18.4 MPG)

 

Currently, the Average is a long way from right... So if Quad shows about 12 MPG and my quick math show 18 that's an error of -6 MPG because I idled in the parking lot for 30 minutes. I think that formula needs some reworking.

 

mm^3 per minute to Miles per Gallon

First, here's a rough idea of the math for getting an "instantaneous" MPG

injection amount = (125 * offset * engine load/100 + wiretapp_approximation) * RPM * 3 cylinders firing/rotation. Gives us an approximation of mm^3 per minute.  (These pumps usually have a capacity of about 125 mm3 per injection event after calibration) -- This part is used for the gallons per trip. 

injection_in_gallons  = injeciton amount (mm3/m) / 3785410.0;

miles_per_minute = MPH / 60;

if(mm3_gln != 0)

mpg_inst = miles_per_minute / injection_in_gallons per minute;

else //*case when coasting downhill*

mpg_inst = 99.99

if mpg_inst > 99.99

mpg_inst = 99.99; //(max value for mpg_inst is 99.99)

mpg_inst_avg = average of 32 last mpg_inst calculations. 

 

 GALLONS PER TRIP: The injection_amount/minute is used to calculate injamnt/second and then that is accumulated once per second into the gallons_per_trip until it is cleared). This is done on a timer once per second. The code takes a snapshot of the "injection amount" every second and uses that to sum the gallons used per trip. Some error here but overall pretty good. 

 

Average MPG: The stuff I added for the MPG_AVG tages the mpg_inst_avg and then throws it into a low pass filter where the previous values have more weight than the incoming values and is calculated constantly (several thousand times per second), not once per second. 

It is basically MPG_LPF = (mpg_inst_avg * MPG_LPF_ALPHA) + (1-MPG_LPG_ALPHA) * mpg_lpf_last;

The formula guarantees a unity gain by multiplying by the _ALPHA on the incoming and the (1- _ALPHA) on the last calculated value. (unity gain means the gross affect is to multiply the output value by 1). 

 

By making alpha smaller and smaller, you get more filtering. Having an _ALPHA value of .01 does filter the average but its so close to the average as to not make much difference. Having it be .001 is what you see after about 10 seconds. Having it be .0001 is what you see after about 2 minutes. Having it be .00001 is what you see after about 20 minutes and so on an so forth until you get to have the alpha being .0000000001 after about 2,000,000,000 cycles with cycles running about 3000 per second. So roughly 7 or 8 days worth of continuous driving. With each step in the cycles you get slower and slower updates to the average because the input has less and less weight on the output. It still matters and it will approach the final value asymptotically but the change is very slow. 

 

Link to comment
Share on other sites

On 7/21/2018 at 12:38 PM, adamey1000 said:

When I parked, the truck was at 247.4 miles according to the trip set. I suspect there may be something off. I know my off set isn’t right, but with the gallon trip and the trip set on miles, the average still doesn’t work out that high. 

iquad-2018-07-20-03.27.44-1.csv

 

Just some quick math, the average of all the samples of the ECO gauge gives you 32.56mpg. The average of the AVG gauge gives you 30.51. The miles/gallons used per trip is only 19.60 if you have 247.4 miles on 19.6 gallons. 

 

If you have your offset set to 125% and your offset should have been set to 150%, then your actual average MPG should be closer to 25.45 on the AVG MPG gauge, and your gallons used should be  closer to 23.52 which would give your actual MPG based off the gallons used per trip and the mileage closer to 10.51 mpg which is terrible. 

 

Regardless, there is a big discrepancy between the two values. I'm trying to figure out what could account for the large discrepancy. There might be an issue in the math that I described above after the mm3/minute calculation. 

I guess the error could come from having it calculate too often. If we are running at 2000 RPM that gives us 6000 injections events per minute or 100 injection events per second. If we are calculating at roughly 3000 events per second there are roughly 30 calculations per injection even and only one of those really matters. If the ECM turns off the fueling or reduces it between injection events for some reason and we take those at face value and apply them it could artificially increase the MPG.  

Link to comment
Share on other sites

Another data log. No new information, just more miles. Miles when I parked after work were at 332.3. Hand calculated, I am usually around 17-18mpg average on work weeks. So the 19.6 calculated from the last data log is not terribly far off. I am a shade off of half tank at the moment. Unfortunately I think we all know how accurately fuel consumption can be estimated based on gauge reading, but I know that I can put 26 gallons in when the light comes on. If I am on track to do around 450 miles by the time the light comes on, that’s ballpark 17mpg. That usually has me right around 300 miles at half tank. 

iquad-2018-07-23-04.37.15.csv

Edited by adamey1000
Forgot the data log
Link to comment
Share on other sites

Just filled up the truck. Pumped 23.96 gallons and have turned 397.8 miles. Hand calculated average of 16.6. A little low for my daily driving, but I have been playing a lot lately, and running a higher wire tap, so it makes sense. 

 

Data log says when I pulled into the station, I had burned 20.79 gallons. Using the formula @Quadzilla Power gave earlier (23.96/20.79)125=144% offset. I assume that I would use my current offset (125%) as the multiplier, so correct me if I am wrong. 

 

If my math is right above, I will set my off-set to 144% and do an average across several tanks with no reset. I will upload periodic data logs with miles and hand calculated mpg when I fill up. 

iquad-2018-07-26-04.42.32.csv

Link to comment
Share on other sites

  • Owner

Yeah, the whole MPG display is screwed. 

 

Yesterday I made the run to dialysis for MoparMom I was half out of it (lack of sleep). I picked up fuel and reset all the Quadzilla and trip. Drove over dropped Mom off and then went over to the Ontario, OR state park. I left the engine idle 3 HOURS being it was 103*F and I needed sleep. Woke up still running and cool in the cab to see the MPG showing 2.36 MPG which was exactly the same amount of gallons used. Mind you the gallons used is correct it is right on the nail for the most part (-0.2 Gallons off when I filled). After finding out I had to go home another way. So added another 150 miles longer to the trip to get stuck and traffic jam (Idaho 55) in the canyon and idled another 1 full hour keeping the cab cool. Looking at the display showing 4 MPG. It's laughable because if it was true I would have run out of fuel about 40 miles back about (4 MPG = 140 total distance for 35 gallons of fuel) I was already at 180 and had 1/8 tank used. 

 

I hate to say it @Quadzilla Power you are going to have to come up with something totally different. This is real life usage for me being I've got a 4-hour wait for MoparMom's treatment and might end up sleeping in the truck or stuck in traffic. 

Link to comment
Share on other sites

20 hours ago, adamey1000 said:

Just filled up the truck. Pumped 23.96 gallons and have turned 397.8 miles. Hand calculated average of 16.6. A little low for my daily driving, but I have been playing a lot lately, and running a higher wire tap, so it makes sense. 

 

Data log says when I pulled into the station, I had burned 20.79 gallons. Using the formula @Quadzilla Power gave earlier (23.96/20.79)125=144% offset. I assume that I would use my current offset (125%) as the multiplier, so correct me if I am wrong. 

 

If my math is right above, I will set my off-set to 144% and do an average across several tanks with no reset. I will upload periodic data logs with miles and hand calculated mpg when I fill up. 

iquad-2018-07-26-04.42.32.csv

 

Unfortunately, running the wire-tap will throw all calculations out of wack. There is no good way to calibrate with the wire-tap so it won't really work that well for you. You would have to run on CAN bus only fueling in order to get the MPG gauges to be even remotely accurate. 

Link to comment
Share on other sites

8 hours ago, Quadzilla Power said:

 

Unfortunately, running the wire-tap will throw all calculations out of wack. There is no good way to calibrate with the wire-tap so it won't really work that well for you. You would have to run on CAN bus only fueling in order to get the MPG gauges to be even remotely accurate. 

Does is matter what gear you're in? I wouldn't think so but just wondering. 

I drove to Chicago the other day and there was lots of construction and just slow traffic, usually I'm really close with mpg and gallons used but this time it was off by about 1.5 ml. Not a big deal if usually don't drive in traffic like that.

Link to comment
Share on other sites

The gear doesn't matter directly. It only matters in the way that if you don't have your transmissions setup along with your tire size and rear end ratio then it won't give you the corrected speed which will play into the MPG. If you have that all set up then the actual gear selected shouldn't matter at all. 

  • Like 1
Link to comment
Share on other sites

I am going to run this tank on lvl 3 max. It looks like it is already tending to show much higher mpg on the display than I would expect, but I am only 60 miles or so into the tank. I will be taking the truck on an extended trip in a few weeks, so I should be able to get some good information in a short amount of time. 

Link to comment
Share on other sites

  • Owner

Yeah the last few trips down to Ontario, OR I've wound up idling extended periods just to stay cool in 100-105*F heat. Like my last trip down I was nauseous from the heavy smoke and got down to Ontario, OR and slept in the truck with the A/C going. Again there is no accuracy with the MPG displayed shows way, way, low talking single digit low constantly. 

 

As you can see my MPG logs are still fairly good even with extended idling. Nowhere near the 4-6 MPG that Quadzila is reporting.

Selection_061.png

Link to comment
Share on other sites

×
×
  • Create New...