Baro fuel calculation

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Matt Cramer
Super MS/Extra'er
Posts: 17507
Joined: Thu Apr 16, 2009 8:08 pm

Re: Baro fuel calculation

Post by Matt Cramer »

elaw wrote:Hey just a random thought... does the "initial MAP reading" code run when there's a sync loss?
It does not. But it can be triggered if you have a processor reset.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
savagerocco
Master MS/Extra'er
Posts: 756
Joined: Thu Oct 20, 2005 11:09 am
Location: Ogden UT USA
Contact:

Re: Baro fuel calculation

Post by savagerocco »

I had always thought that the baro sensor should be the same value as the main map sensor. I have a map daddy and it has two 4 bar sensors. is the code setup now to use a standard one bar baro?

Inherently the "Initial MAP Reading" concept is imperfect as there's always a risk that it will read engine vaccum instead of atmospheric pressure. However, it has been there since MS1 and we haven't removed it. If you really want baro correction then a second 1bar sensor should be used.

James[/quote]
Brent Savage
life behind the zion curtain
90 audi RS2 20VTQ 6sp MS3, MSX COP and Sequential and now MAF
87 Scirocco 2.0 ABA 16v EIP tubular cast MSII COP
86 Audi 4K20VTQ MSII
90 Audi 90 sedan 3.6l DOHC V8TT (project car)
89 VW cabbie (bitch basket) 2.0 ABA Turbo MSII
jsmcortina
Site Admin
Posts: 39619
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Baro fuel calculation

Post by jsmcortina »

To my knowledge, MS2 and MS3 have always allowed different sensor types.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
savagerocco
Master MS/Extra'er
Posts: 756
Joined: Thu Oct 20, 2005 11:09 am
Location: Ogden UT USA
Contact:

Re: Baro fuel calculation

Post by savagerocco »

I went from ms1 to ms3, so maybe i just brought that over from my ms1 days
Brent Savage
life behind the zion curtain
90 audi RS2 20VTQ 6sp MS3, MSX COP and Sequential and now MAF
87 Scirocco 2.0 ABA 16v EIP tubular cast MSII COP
86 Audi 4K20VTQ MSII
90 Audi 90 sedan 3.6l DOHC V8TT (project car)
89 VW cabbie (bitch basket) 2.0 ABA Turbo MSII
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Baro fuel calculation

Post by subwoofer »

jsmcortina wrote:Inherently the "Initial MAP Reading" concept is imperfect as there's always a risk that it will read engine vaccum instead of atmospheric pressure. However, it has been there since MS1 and we haven't removed it. If you really want baro correction then a second 1bar sensor should be used.
It is IMHO pretty useless, since it will wreak havoc on your tune with altitude changes. Climb 1000m and the engine may still run pretty fine, restart the engine at altitude and drive back down everything is way out of whack by the time you are down. I really don't see the point, either you run baro correction and have a dedicated sensor for it or you don't correct at all.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
Nightstalker1993
Helpful MS/Extra'er
Posts: 75
Joined: Tue Jun 03, 2014 11:09 am

Re: Baro fuel calculation

Post by Nightstalker1993 »

subwoofer wrote:
jsmcortina wrote:Inherently the "Initial MAP Reading" concept is imperfect as there's always a risk that it will read engine vaccum instead of atmospheric pressure. However, it has been there since MS1 and we haven't removed it. If you really want baro correction then a second 1bar sensor should be used.
It is IMHO pretty useless, since it will wreak havoc on your tune with altitude changes. Climb 1000m and the engine may still run pretty fine, restart the engine at altitude and drive back down everything is way out of whack by the time you are down. I really don't see the point, either you run baro correction and have a dedicated sensor for it or you don't correct at all.
Actually it's the other way round, climb up a hill and it will run slightly leaner, restart the engine up there and it will run richer as you come down.
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Baro fuel calculation

Post by subwoofer »

I once made the mistake of having initial baro on while running VEAL, driving down a mountain. VEAL pulled a LOT of fuel all over the place, and everything was hunky dory until I had to stop at a service station. Restarted the engine and it was undrivably lean. It took some time to figure out what had happened, I actually thought the FPR or an injector had quit on me.

But doesn't baro correction manipulate load as well? Coming down would then put you into unmapped cells, potentially. Anyway, I think it's a misfeature and should be removed.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
Nightstalker1993
Helpful MS/Extra'er
Posts: 75
Joined: Tue Jun 03, 2014 11:09 am

Re: Baro fuel calculation

Post by Nightstalker1993 »

subwoofer wrote:I once made the mistake of having initial baro on while running VEAL, driving down a mountain. VEAL pulled a LOT of fuel all over the place, and everything was hunky dory until I had to stop at a service station. Restarted the engine and it was undrivably lean. It took some time to figure out what had happened, I actually thought the FPR or an injector had quit on me.

But doesn't baro correction manipulate load as well? Coming down would then put you into unmapped cells, potentially. Anyway, I think it's a misfeature and should be removed.
Well, don't think you should tune with elevation changes anyway. You can always select no baro correction if you dislike the feature, but it will still run lean/rich as elevation changes. And I don't get what you mean by putting the engine in an unmapped cell? As you climb if it's an NA, your max engine MAP will be the same as atmospheric, which would be whatever number less than 100kpa.
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Baro fuel calculation

Post by subwoofer »

Nightstalker1993 wrote:Well, don't think you should tune with elevation changes anyway. You can always select no baro correction if you dislike the feature, but it will still run lean/rich as elevation changes. And I don't get what you mean by putting the engine in an unmapped cell? As you climb if it's an NA, your max engine MAP will be the same as atmospheric, which would be whatever number less than 100kpa.
I didn't start the tuning until I was down to about 300 meters, but the engine kept the baro reading from 1100... Doesn't really matter to me, I am a MAF guy, but I fail to see the point of the feature. CL EGO takes care of fuel quality changes and any changes in breathing due to atmospheric conditions anyway.

If control algorithm is set to %baro (for whatever reason, by mistake?) and you do this your load with go way over 100 if you start at altitude.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Re: Baro fuel calculation

Post by whittlebeast »

I think getting the Baro correction sorted out is well worth the effort. I don't think it will ever work as a one time before cranking as designed now.
Last edited by whittlebeast on Thu Apr 30, 2015 2:21 pm, edited 1 time in total.
savagerocco
Master MS/Extra'er
Posts: 756
Joined: Thu Oct 20, 2005 11:09 am
Location: Ogden UT USA
Contact:

Re: Baro fuel calculation

Post by savagerocco »

That was industry standard for several years. Very few cars had bar sensors on them and most took a sample before cranking and some even updated at full throttle. It works with less but isn't ideal.
Brent Savage
life behind the zion curtain
90 audi RS2 20VTQ 6sp MS3, MSX COP and Sequential and now MAF
87 Scirocco 2.0 ABA 16v EIP tubular cast MSII COP
86 Audi 4K20VTQ MSII
90 Audi 90 sedan 3.6l DOHC V8TT (project car)
89 VW cabbie (bitch basket) 2.0 ABA Turbo MSII
TheSilverBuick
Experienced MS/Extra'er
Posts: 358
Joined: Thu Feb 02, 2012 9:08 am

Re: Baro fuel calculation

Post by TheSilverBuick »

Nightstalker1993 wrote: Actually it's the other way round, climb up a hill and it will run slightly leaner, restart the engine up there and it will run richer as you come down.
You have this backwards. With zero baro correction the AFR gets richer as you go up in elevation, and engines tend to be tolerant of running rich so little change in the way of drivability going from sea level on up if all is tuned well at sea level, but if you do your base tune at elevation (as I live at 6,500 feet and do), going down hill with no baro correction it quickly goes from reasonably lean while cruising to lean mis-fires and nearly undrivable. Been there, done that.

In fact, my method of tuning baro correction is to start with a flat line of no correction, start driving down the mountain until I feel/hear the lean mis-fire, pop the laptop open and move the baro correction dot upwards until the AFR stabilizes where it was at back at 6,500ft.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
suberimakuri
Master MS/Extra'er
Posts: 632
Joined: Sun May 02, 2004 2:16 pm
Location: Auckland, NZ
Contact:

Re: Baro fuel calculation

Post by suberimakuri »

Skylark: Unless you're running % Baro or MAF, I don't agree.
I've found going up in elevation my engines run leaner. Partly because they don't hit same kpa row at full load (ie 100kpa) and partly because I'm told exhaust flows better.
I realise this isn't expected behaviour.
We tune at sea level in my city, it's only when I drive to an elevated circuit.
I always fit a second map sensor for constant baro.
TheSilverBuick
Experienced MS/Extra'er
Posts: 358
Joined: Thu Feb 02, 2012 9:08 am

Re: Baro fuel calculation

Post by TheSilverBuick »

That is a VE table tuning thing on your particular VE table. If you have no baro correction and ran at 80kPa load at sea level and had an AFR of 14:1, then went WOT at 6500ft elevation, aka 80kPa atmospheric, it's going to be 12.5:1 or lower, same RPM and manifold pressure, but the AFR is significantly different because actual oxygen density differences as well as exhaust pressure changes. My carburetor's also lean out going down hill and richen going up hill. I do run %Baro for fuel and speed density for spark.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Re: Baro fuel calculation

Post by whittlebeast »

TheSilverBuick

Could you please post your street tune. I would love the see a fully tuned motor with closed loop O2, climb a big hill. I would think this will show up quick in the logs as you climb the hill.

Andy
TheSilverBuick
Experienced MS/Extra'er
Posts: 358
Joined: Thu Feb 02, 2012 9:08 am

Re: Baro fuel calculation

Post by TheSilverBuick »

I don't have a data log showing the full elevation change as I don't live on a cliff, but more of the high desert. The elevation change is about ~2,500 feet in one non-stop drive over 3 hours. I don't run closed loop EGO on any of my cars, so the baro correction has to be doing its job. So conversely, my TargetAFR table has default numbers in it so the EGO correction logged doesn't mean anything.


**I tried to upload a 377kB zipped datalog, but got a "Sorry, the board attachment quota has been reached." error. I may try later***
Here is an old data log of going through Eisenhower tunnel outside Denver, Colorado. The elevation is around 11,200 feet, and the baro drops as low as 67.7kPa. I've seen as low as 64kPa there, lol. Its running on the rich side because I was way outside my tuned baro window. Normally for 30% TPS opening it runs around 14:1-14.5:1 as the engine is hardly loaded at 30% TPS, so is running about a full point richer than normal. It cruises at lower elevation (6500ft) around 20% TPS. It's a progressive throttle body so the throttle position reads higher than actual airflow availability until around 75% TPS.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
Nightstalker1993
Helpful MS/Extra'er
Posts: 75
Joined: Tue Jun 03, 2014 11:09 am

Re: Baro fuel calculation

Post by Nightstalker1993 »

Nope, I'm pretty 100% sure that as altitudes go up(barometric reading goes down), there is less pressure at the exhaust system, causing the engine VE to go up, which with the same amount of fueling(pw/duty), the engine would run leaner. Even the default hardcoded corrections(now removed), is tuned to add fuel as barometric pressure drops.

I myself encountered it before, tune at sea level just fine, go for a mountain run and my AFR safety system kicks in, which is why I installed a 2nd map sensor for baro.
Barometric pressure correction has come up multiple times on the MS Yahoo! discussion board. Almost all OEM ECUs and the MS in its normal configuration grab the barometric pressure right before the engine starts up. Barometric pressure is a factor because as the engine goes up in altitude it experiences less backpressure on the exhaust, increasing its volumetric efficiency. Contrary to what would seem obvious, you must richen the mixture as you go up in altitude to compensate for this. The effect of reduced air/oxygen to burn at altitude is already taken into account by lower MAP sensor readings.

Even with large elevation changes during operation, having some error in the barometric pressure correction factor is not a big deal. Many people use closed loop EGO control. If you do, then MB is not really needed as the o2 sensor is controlling the mixture. But, if you run your engine in open loop MAP mode most of the time, MB is beneficial.

The 1990 Corvette ECU was one of B&G's guiding designs when developing MS. They calculated based on the GM correction factor, this engine would experience a 1.0 AFR reduction for every 5000 foot increase in elevation. Engines run well on a much wider range of AFRs than this. But by having dynamic barometric correction, you might recover a little performance lost to the decreasing backpressure causing reduced AFRs when operating at increasing altitudes.

I have since learned that the change in AFR as estimated by GM is 7.7% per 5000 feet. It is interesting to note that the NASA standard altitude table also estimates a 7.7% decrease in pressure by going up 5000 feet. So GM believes that for their engine, VE is directly proportional to exhaust backpressure. A valid question would be, is this approximately equal for all engines? If anyone has comments, shoot me an email. Until then, please note that the code changes only direct the processor to constantly grab the baro value from a spare pressure sensor on the AD0-6 port. If you would like to alter the baro correction, you would need to change the barofactor.inc file and recompile megasquirt.asm to download to the processor.
http://home.earthlink.net/~jcgebhart/megabaro.html

I'm guessing this is the GM correction factor that James is referring to which stayed from the original MS until now
jsmcortina
Site Admin
Posts: 39619
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Baro fuel calculation

Post by jsmcortina »

That page is _ancient_ !!!

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Nightstalker1993
Helpful MS/Extra'er
Posts: 75
Joined: Tue Jun 03, 2014 11:09 am

Re: Baro fuel calculation

Post by Nightstalker1993 »

jsmcortina wrote:That page is _ancient_ !!!

James
just opening the page screams ancient :lol:
TheSilverBuick
Experienced MS/Extra'er
Posts: 358
Joined: Thu Feb 02, 2012 9:08 am

Re: Baro fuel calculation

Post by TheSilverBuick »

What do airplane pilots do? They manually lean the mixture out as they go up because the engines start to run richer, despite fixed throttle position and rpm..
http://flighttraining.aopa.org/students ... xture.html

Holley recommends going down 1 jet size for every 2,000 feet of elevation gain because it starts to run rich....

Bonneville racers tuning at sea level have to pull upwards 15% of their fueling when they get to the higher elevations of Bonneville.
http://www.speedtalk.com/forum/viewtopi ... 9&start=15

There are dozens of similar examples and experiences like the above with simple google searches, everything from motorcycles, to miata's, to landspeed and drag racing.

Here is an old screen shot of one of my car's baro table, and they all have the same general shape. Fuel subtracted with elevation gain and added with elevation loss and my AFR's stay in the same place without EGO correction turned on.
Image

You can disagree, but some solid examples other than a web page citing a sketchy test that probably caused the goof in the megasquirt calculation and why my corrections are over 30%, and with the new calculation will probably drop to a more sensible number, but until I take the time to re-tune with the new calculation, I won't have an answer to that.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
Post Reply