BaroCor Calculation

General support questions and announcements for MS3. See also MS3 manuals.

Moderators: jsmcortina, muythaibxr

webkris
MS/Extra Newbie
Posts: 7
Joined: Sun Nov 03, 2013 6:25 pm

Re: BaroCor Calculation

Post by webkris »

Hey Sedd,

Kudos! This is literally one of the only threads I could find with good information on barometric correction. I've got a full standalone setup running in my rally car and our stages are often over 15 miles where the elevation could change from 1,800 to 6,000ft and back again. I was able to get the stock MAP sensor working for ext_map and the internal is now open and just for barometer calculation.

Does this look correct in TunerStudio?
Image

I'll be testing it at an event in 3 weeks.
- Kris
kaeman
Master MS/Extra'er
Posts: 643
Joined: Sun Nov 06, 2005 12:31 am
Location: NORTHERN CALIFORNIA

Re: BaroCor Calculation

Post by kaeman »

Hey Sedd, I have found that my engine requires more fuel the higher I have been going in elevation... I found out what my warmed up idle afr was (13.8 to 14.2) then headed to the track, warmed up the engine there and then adjusted the baro correction to bring my idle back to (13.8 to 14.2) its normal operating range, at the track it was 15.2 to 15.6, I ended up changing the baro correction value for 98.3kpa to 102.5%. I have been back there twice and both times the engine idle is the same as down in the valley where I tune. mind you I need to try out some more elevations. but I just was running into the opposite effect of what would normally happen with a carb on the engine because rather than going rich with altitude my engine has been going lean with altitude.

good luck.
64 el camino, 383 SBC, 11.7 to1 CR, accufab tb/rhs intake, 44lb injectors, trick flow heads, xr292r solid roller cam, belt drive camshaft, dry sump oil system, 2400 stall, turbo 350, spooled 9 inch, strange axles, 3.89 gears, dual wideband, full sequential fuel/cop, MS3x using 1.4.1 code.
dancrev
Helpful MS/Extra'er
Posts: 48
Joined: Sat Nov 16, 2013 4:21 pm
Location: Los Alamos, NM

Re: BaroCor Calculation

Post by dancrev »

sedd wrote: The theory is that with reduced back pressure the compressed volume space at the end of the exhaust stroke has less left over gasses. The change in volume uses PV=nRT equation. That change in volume of left over gas is replaced with an equal amount more fresh air on the intake stroke = better VE. I suspect this is overly simplistic and there are many more variables and interactions to consider. For instance for a given kPa what is the effect of the flow rate change in trying to put more air in the cylinder.
The equation for that process is in Volume 1 of Charles Taylor's book "The Internal Combustion Engine in Theory and Practice" (Eq 6-10 on page 157). It depends on the ratio of the exhaust pressure (roughly Baro) and the intake pressure (MAP). As that ratio approaches unity (wide open throttle) the correction factor gets very close to 1, so that factor is really only important near idle and slightly above. It's based on how much residual exhaust gas flows backward into the manifold during the induction process. When the intake valve opens, the exhaust pressure in the cylinder is larger than MAP, so some gasses initially flow backward before turning around and going back into the cylinder with the new air (decreasing the effective VE). As a function of MAP, the largest pressure difference is at idle, so that is where the effect (decrease in VE) will be largest. At wide open throttle (MAP = Baro), the pressures are the same and the residual gas does not push back through the intake valve (so no correction to the VE required). As a function of Baro, for the same MAP value the VE will increase with decreasing residual gas pressure (Baro). So as you go up in altitude, the VE values at the same MAP need to increase to account for the smaller amount of residual gas pressure pushing against the intake.

I used to think that as you increase altitude the required fuel should go down, but MAP is MAP... sure, at different altitudes the same MAP value will occur at a different throttle position, but if you are fueling based on MAP then you are measuring it and don't need to correct with a table that tells you the density is decreasing. The fueling equation already knows that because it's calculated with a measured pressure! What isn't measured is how the VE table changes with altitude. As mentioned above, that is a function of both Baro and MAP, so a 1 dimensional look-up table isn't going to cut it (gets close though). The VE dependence on MAP is factored into the overall shape of the VE table for the given Baro that it was tuned at. The Baro dependence doesn't factor out as a multiplier in the equation mentioned above though, so the multiplier needs to depend on both Baro and MAP.

This particular process increases the amount of fuel required (for the same MAP reading) as you go up in altitude. There are many other processes that affect VE though, so the net result simply "is what it is" for your engine.

At least that's how I understand things... might be wrong. I just decided to tune my EGO pid loop and be done with it :D

-Dan
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

yea, I have been hoping to get some feedback on this.

I don't claim to understand this fully but had wondered if the opposite curve might be needed. I tried to use the equation to fit real data that indicated less fuel at you went up in altitude. So that may not be accurate? The theory noted in the articles seemed to indicate the opposite of what I had suggested.

dancrev notes some good points. I still think more data supported by actual testing at altitudes will be the only way to confirm. So if you have overall less back pressure on the exhaust you should get more exhaust flow and cylinder filling and thus need more fuel.

kaeman To confirm and put in my own language, as you went up in altitude you needed more fuel pulse width at the same map pressure.

I will try to adjust the curve for the opposite affect and see if it gets close to the numbers you have noted.

Also I think there is a table to adjust this versus the map and rpm. I will have to look for that again. could easily be wrong about that............... If true that would allow us to adjust for idle and higher rpm situations.

I got a new sensor and also placed the sensor back at the exhaust tips. I have data that shows the old sensor installed inside the engine bay gave fluctuating readings. It would vary with the speed of the car. Now the sensor if better behaved.

I still get spikes in the readings, and the reason for getting a new sensor. No idea why it spikes up. Must have some bad connections or grounds or ?????? I wish we were able to average out the readings independently for this versus other sensors. At the same time I doubt the very short time of the spike would cause any significant tuning problems.
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
kaeman
Master MS/Extra'er
Posts: 643
Joined: Sun Nov 06, 2005 12:31 am
Location: NORTHERN CALIFORNIA

Re: BaroCor Calculation

Post by kaeman »

I changed the baro correction curve to make my engine idle the same at the higher altitude as it does where I live, no both times I have been back to the track the engine idles the same as it does down where I live, I was just surprised by the amount of fuel the engine wanted at that small change in altitude, my 98kpa baro correction point is now 102.5%... I am planning to trailer the vehicle up the hill stopping at several points and adjust the idle to my target afr.. and see what happens with the barometric correction curve... I would like to be able to drive my hotrod in reno again.
64 el camino, 383 SBC, 11.7 to1 CR, accufab tb/rhs intake, 44lb injectors, trick flow heads, xr292r solid roller cam, belt drive camshaft, dry sump oil system, 2400 stall, turbo 350, spooled 9 inch, strange axles, 3.89 gears, dual wideband, full sequential fuel/cop, MS3x using 1.4.1 code.
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

check out the curves on this file. The value from the curves at 98 baro is pretty close to 102.5 It is much closer if you assume a higher backpressure.

It will be interesting to see if you get other values to match up.

Note how at the higher rpm and backpressures there are different values calculated. I couldn't find the table I thought was in tuner studio?
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
dancrev
Helpful MS/Extra'er
Posts: 48
Joined: Sat Nov 16, 2013 4:21 pm
Location: Los Alamos, NM

Re: BaroCor Calculation

Post by dancrev »

Here is a plot of that equation I was referencing in an earlier post. The colors of the traces repeat, but they stack on the plot the same way they do in the legend.

The values aren't absolute... they are corrections to a VE table tuned at (in my case) a Baro of 78 kPa. That is why the value is 1.0 for the 78 kPa trace (the back pressure effect is tuned into the table already). As the Baro decreases for a given MAP value, the VE increases. The correction gets closer to 1.0 for all Baro values as MAP increases. In my case, MAP is never greater than Baro, but the equation doesn't know that.

Again, this could be totally wrong, not relevant, completely cancelled by some other effect, etc..... I'm going to try it out on my 5.3 LM7 though.

-Dan
BaroPlot1-2.jpg
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

could you share the equation?

it appears you created these curves. any chance to do that with 100kpa at unity? I chose to set mine up as if sea level approx. 101 kpa was unity. I am curious how these curves would look and compare to values from results from the spreadsheet at various backpressures. I think the backpressure will reflect the rpm.

interesting stuff.
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
dancrev
Helpful MS/Extra'er
Posts: 48
Joined: Sat Nov 16, 2013 4:21 pm
Location: Los Alamos, NM

Re: BaroCor Calculation

Post by dancrev »

Here it is for a tune at 101 kPa (still with r=9.5 and k=1.37). To make it a correction factor, I take the ratio of the value at the new Baro with the value at the tuned Baro. Basically dividing the old value out of the table and multiplying the new value in. That assumes that the individual factors contributing to the overall VE multiply together. I'm not certain that is always true. Also, the equation is an ideal approximation so....

Let me know if it makes sense or not with the values that you have.

-Dan
BaroPlot1-3.jpg
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Re: BaroCor Calculation

Post by muythaibxr »

The effects will largely depend on various factors. The original idea in ms1 and 2 was exactly what you say. MAP drops which causes a drop in VE naturally because you are lower in the VE table, then the correction slightly increased fuel to account for reduced exhaust backpressure. Most engines wanted the opposite of this, hence the creation of the %baro load calc and the exposure of the baro correction curve.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

dancrev:
the equations I have give curves that are much steeper than the ones your showing.

Based on muythaibxr comment, testing at altitudes is the only way to get the corrections. I was hoping to get it close with equations and then fine tune if I ever get a chance to do that at altitude.
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
dancrev
Helpful MS/Extra'er
Posts: 48
Joined: Sat Nov 16, 2013 4:21 pm
Location: Los Alamos, NM

Re: BaroCor Calculation

Post by dancrev »

Yeah, I think trial and error is the best way to go. It's fun to see how close the equations get though... if they are close enough, we can even pretend to know something :D

I have access to elevations between 5,000ft and 10,000 feet within an hour of where I live. I'm going to get some data and try to put some measurement points on that plot as soon as I get a chance. Mainly for an academic exercise :RTFM:

-Dan
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

sounds great. keep me posted.

I am 6 hours away from elevation at highest point in TN. It will likely be next year before I get a chance to go that way.

I too enjoy the academic challenge. I am still trying to figure out my tune and wanted to get this close while I tune at my home base. I figure that when I did get a chance to test at elevations it might not be so hard to fine tune. there is not much posted or in the manual on this so I think it must be a hard one to figure out.
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
webkris
MS/Extra Newbie
Posts: 7
Joined: Sun Nov 03, 2013 6:25 pm

Re: BaroCor Calculation

Post by webkris »

Guys - I'm more than a little lost in the "theory VS. practice" here.
I really have no idea why these corrections would be useful at idle...
No one has really validated my actual Megasquirt settings yet. Are they similar to how you have successfully set this up??

Say temp is constant at 70F. As you go up in elevation the air is less dense. If you were to fuel an engine the same at 100' as 10,000' the mixture would be too rich. Fuel an engine properly at 10,000' and move down to sea level (without changing fuel) and the mixture would be too lean.
It is my understanding that THIS ^ is what BaroCor does.

Well I went out and tested at a stage rally event:
This is data from one stage that goes from about 3300' to 7000' (a 7% change in correction) my correction table is posted above.
The scatter plot on the left shows %BaroCor as Z and the plot on the right shows AFR as Z.
I would imagine that I would see a dramatic AFR change if the loaded calculation was way off.
Thoughts?
Image
dancrev
Helpful MS/Extra'er
Posts: 48
Joined: Sat Nov 16, 2013 4:21 pm
Location: Los Alamos, NM

Re: BaroCor Calculation

Post by dancrev »

webkris wrote:Say temp is constant at 70F. As you go up in elevation the air is less dense. If you were to fuel an engine the same at 100' as 10,000' the mixture would be too rich. Fuel an engine properly at 10,000' and move down to sea level (without changing fuel) and the mixture would be too lean.
"If you were to fuel an engine the same." The same with respect to what? Throttle position or MAP? If you are using speed density, then even without baro correction the fueling is not the same.

Consider this situation:
Wide open throttle at 100' gives a MAP around 100kPa, and the fueling equation calculates a density and returns the required amount of fuel.

Wide open throttle at 10,000' gives a MAP of around 70 kPa, and the fueling equation will calculate the density and return the required amount of fuel... which will be less than the value at 100'. No baro correction needed.

The system is already accounting for changes in density due to barometric pressure because MAP is being measured. The thing that is staying the same are the values in the VE table. If the volumetric efficiency of the engine were to change due to change in altitude, then the speed density algorithm will not know about it. Those changes would need to be accounted for in a separate baro correction table. From what I have read, the largest change in VE due to changes in altitude occurs at low RPMs (around idle).

-Dan
dancrev
Helpful MS/Extra'er
Posts: 48
Joined: Sat Nov 16, 2013 4:21 pm
Location: Los Alamos, NM

Re: BaroCor Calculation

Post by dancrev »

webkris wrote:This is data from one stage that goes from about 3300' to 7000' (a 7% change in correction) my correction table is posted above.
The scatter plot on the left shows %BaroCor as Z and the plot on the right shows AFR as Z.
I would imagine that I would see a dramatic AFR change if the loaded calculation was way off.
Thoughts?
It would be interesting to see a plot of AFR vs Barometric Pressure keeping MAP and RPM constant :RTFM:

Find a MAP vs RPM bin with a lot of data points in it (across all elevations) and, using only those points, plot AFR vs Barometric Pressure. That should tell you how well the correction curve is working. Make sure EGO correction is turned off (or factor it out of your data).

[edit] by the way, I'm really just thinking out loud here :D
pulsar747n
MS/Extra Newbie
Posts: 8
Joined: Tue Feb 23, 2010 10:55 pm

Re: BaroCor Calculation

Post by pulsar747n »

Dancrev, just go to the Los Alamos airport and ask any pilot what they do with the mixture control after they take off and begin to cruise at a much higher altitude. I would bet that everyone will say that they lean the mixture!
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

Dancrev:

I have not been on the site lately. Did you get a chance to do any testing as you noted?

Pulsar747n: Do airplane engines get leaned out because they want to conserve fuel? Are they monitoring the air fuel ratio to make these adjustments? This would seem to be a very good comparison. I thought there would be some theory on the internet by the airplane folks. I had done quite a few internet searches many months ago. I couldn't find any conclusive reasons for what is going on. I figured they wanted higher air fuel ratio (and boost if a turbo) at take off to get maximum power. Then they lean it out when cruising to conserve fuel? I seem to remember many engines had turbos and that maybe the boost was trimmed and thus leaning out was needed???
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
masterx81
Master MS/Extra'er
Posts: 776
Joined: Mon Oct 25, 2004 7:36 am
Location: Asti - Italy

Re: R: BaroCor Calculation

Post by masterx81 »

On my engine i've had to lean 7.5 % every 15kpa of baro. Tested from 150m over the sea up to 2000m
Enrico
Opel/Vauxhall Corsa GSi MS2
Subaru v4 EJ20 MS3
sedd
Experienced MS/Extra'er
Posts: 307
Joined: Sun Sep 18, 2011 5:55 pm

Re: BaroCor Calculation

Post by sedd »

Masterx81, are you saying you lean it as you go higher in altitude?
1970 Chevelle, 540 big block, AFR heads, headers, mild cam
MS3 release 1.4.0, sequential fuel, LS2 coil per plug
Tuner Studio MS V3.0.05
Post Reply