Any general discussion around the firmware, what is does, how it does it etc.
By Tjeerd
#48199
A topic started in the STM32 topic but i hope to continue here. Below the start of it all
PSIG wrote: Tue Feb 09, 2021 1:42 am I apologize if this response is too far off-topic for STM32 dev. :roll:
Tjeerd wrote: Mon Feb 08, 2021 10:24 pmI do live in a flat area so no baro issue.
There is still a barometric issue even if staying at one altitude. This is called density altitude, and the baro pressure is affected by temperature and humidity, as well as altitude. This is why we use an intake temperature sensor, as another part of Speed Density fueling calculations based on the ideal gas law (PV=nRT) .
Tjeerd wrote: Mon Feb 08, 2021 10:24 pmAlso i think most cars with EFI have no baro sensor only MAP.
Almost all do, including all OEM cars I've worked on. Most MAF cars also use a baro sensor to modify the MAF readings, as MAF cannot sense the pressure effects by itself. But, less-dense air would affect the MAF similarly to part-throttle, right? Not quite, in a similar way carburetors are also affected.
Tjeerd wrote: Mon Feb 08, 2021 10:24 pmAnd i still not sure what the reason for a baro sensor is. The MAP already reads a lower value and reduces fuel if it reads less dense air. So i still do not understand the theory why baro is necessary at all for EFI cars using MAP. :? .
Because air has two commonly interchanged values of density and pressure. However, their effects are different, and carburetor users have had the same enrichment as you go higher (or weather causes lower density) for over 100 years. The effect on EFI is no different, as the lower pressure affects cylinder filling and exhausting, while the density affect available oxygen.

To use a carburetor analogy, they use air flow to pull fuel, and more air flow pulls more fuel. Cool. But while the air is lower density, it is also lower pressure with lower oxygen content. In order to offset all of these effects, aircraft carbs and some others use altitude-compensation that also corrects due to pressure effects, usually a big diaphragm housing on the carb or a crude manual mixture adjustment.

So, Speeduino (and other EFI systems) reads the baro value for relative effects at power-up. It even offers baro correction for Alpha-N (TPS-RPM) with no MAP sensor. Then it's corrected, but only at that moment, at that baro value. Real-time baro sensing allow ongoing corrections as weather or altitude change, with obvious benefits to correct fueling for whatever you're doing. I hope that helps.

David
My main assumptions/theory
The mass of air and therefore oxygen entering an engine cylinder is determined by the pressure of the cylinder before closing the intake valve before compression (in a perfect engine this is the pressure before the intake valve (that is the MAP)) and the "fixed" volume of the cylinder . The mass/density of air is determined by the pressure AND temperature (there is the IAT correction), because cold air is more dense. See ideal gas law ideal gas law (PV=nRT) . Now we have
P=Cylinder pressure when closing intake valve (ideally this is MAP)
V=Cylinder volume
T= temperature
R = gas constant (does not change)
so n = can be calculated (this the amount of oxygen)

n is only affected by T and P(MAP) NOT by environmental or baro P in an ideal engine. This is used by tuner studio with your engine constants, desired AFR and injector flow to calculate required fuel. (with 100% VE and 100kpa MAP i assume)

P and V and T are all effected by scavenging, intake restrictions, intake duration of cams, heat soak etc.) but i see not why it is changed by barometric pressure.

If there is no intake restrictions and the cylinder is fully emptied by the exhaust stroke (infinite large inlet/outlet valve and no restrictions, cam overlap, intake closes when cylinder is perfectly down etc) the whole Volumetric Efficiency table should be 100% and follows the ideal gas law or in tuner studio therms Pulse width = MAP/100 * required fuel. No need for a special VE table anymore all cells 100% and the amount of fuel needed is calculated by the ideal gas law only. The pulse width for each intake stroke would be exactly determined by MAP only in that case. (A Turbo or compressor increases MAP above ambient increasing oxygen = more hp)

There are a couple of things influencing this
More cylinder intakes per second (higher RPM). Influences the cylinder filling time and therefore end cylinder pressure before closing the intake valve. So that is why the VE table has MAP and RPM axis. Still no barometric component. Temperature component is in the ideal gas law.

My main possible idea i have why there is a barometric effect
The back pressure on the exhaust is less with lower baro, making it easier for the exhaust gas to flow out. leading to more air be able to enter the cylinder? So in that case you would want baro correction maybe? But i assume the effect is neglect-able? Also the effect is the reverse of what is now implemented, more fuel for lower baro (no source sorry).

Other possible reason is oxygen content over altitude
The air gets more CO2 and N2 in them as a percentage of molecules the higher you go. (yes altitude sickness is a thing because at higher altitude leading to lower pressure and less molecules of oxygen per volume. still following (PV=nRT). This is NOT because of the part of oxygen per CO2 and N2 |(and other gasses) is getting lower i assume so also no altitude component there.

Why a carburetor is affected?
The carburetor uses the venturi effect see: http://ecoursesonline.iasri.res.in/mod/ ... php?id=677. So the system behaves differently. The venturi is before the butterfly valve and so the venturi itself is in the ambient (barometric) environment.

https://www.simscale.com/blog/2018/04/w ... ri-effect/ shows the venturi effect is influenced by mass of the flow passing the venturi. (and that is influenced by outside pressure). So maybe that is the reason? (not sure)

I do not have the knowledge on those. I do know airplanes with carbs can lean or richer fuel depending on altitude but i was always under the impression that was because better fuel economy (lean burn).

OEM ecu
My volvo 740 (MAF system) has no pins for a baro sensor any where. So no compensation i assume
My G16B Suzuki engine (MAP) also did not have OEM baro sensor pins. So no compensation i assume

This is why i put my baro correction to fixed (100%) also not effected by the first reading. That is also why i think baro correction as MAP/baro is absolutely not correct!

For alpha N this is different and you need baro correction.

So my question remains WHY does a MAP operated engine is effected by baro (in theory) because i see no influence of the baro pressure on engine operation using MAP readings, other than the exhaust pressure. So in my view baro correction should be a curve (for unforeseen very small changes) or disabled when using speed density algorithms.
#48217
I think some of your assumptions is off, the mass off air is less att higher alltitudes because the molecules are under less pressure witch in turn means they are further apart.
For your volvo that means a richer mixture, it then compensates for with the o2 sensor and if its a lh 2.4 it even blends in another map.

I havent seen a efi system in cars developed after -00 that isnt using a separate baro sensor.
I used to work with snowmobiles when they still where carbed. If I brought a sled from the mountains (I live at sea level) and didint re jet it, they would size up the first ride. And the sledes didnt care much if it where -25c or +5c.
You could run the high alltitude -25 jetting at sea level when its +10 - +15.
In snowmobiles these days they do it with a baro sensor, egt and efi.
What I mean is its almost as important as to compensate for IATs if its mountain climbing time.
User avatar
By PSIG
#48229
Perhaps we are not explaining it well. You might consider coming at your concerns knowing that baro does affect fueling. That's a well-known fact. Now explain why in your own words. ;)

BTW, MAP sensors are used to read baro in many systems, as they read pressure (barometric if not running) before cranking. Also many systems use on-board baro, not wired separately in the system (barometric pressure on the PCB is the same as anywhere else around the vehicle). I have experienced rich-running in many vehicles climbing mountain passes, where O2 corrections couldn't compensate fully.

For those vehicles that only read MAP (baro) on power-up (such as my Samurai or Suburban), my technique was to shift to neutral, shut the engine down while coasting, then restart for a new baro reading. O2 (EGO/Lambda/AFR) would fall directly into "normal" range, even at the lower running MAP, as it was now compensated for the current density-altitude. I would repeat the exercise descending the other side as it drifted too lean. On the track, baro can change with weather through the day, so it's helpful there in order to remain at peak performance.

As aircraft see even greater density-altitude changes with much more life-critical effects, you'll find more info about their engine operations, though ground vehicles are affected similarly. A different perspective on the same topic that may help, describing carbureted, turbine, injected engines, etc, at density-altitude: The Fuel Air Mixture

[EDIT] You'll also see combustion temperature in that article, which is also accurate for fixed, mechanical or vacuum-operated timing. We can alter the timing electronically with our systems, so those burn-temperature effects are altered or mitigated. That's a different conversation.
#48239
Thanks again for the answer. Before you answer please read the opening post, or do not read it but then also do not respond ;-). Telling me I am most likely wrong without reading/understanding my explanation is not really a good way to go about this :-D. I am describing the why the gas pressure outside (with lower density) is not relevant because the gas pressure inside the manifold (with lower density) is what the engine “sees” (MAP) and what the fueling algorithm uses

As said before,
carbs yes altitude might have influence (I do not have the theory behind this)
MAF, yes might be affected but also not as much (I do not have the theory behind it)
Alpha-N yes baro correction is needed!

All the above mentioned systems work different and can have a barometric component. I am just saying that the speed density fueling algorithm is inherently compensated in theory. And in practice might need a small compensation because exhaust pressure is lower but that is difficult to theoretically determine. The current implementation is just really extremely over fueling at higher altitudes.

I actually found an explanation on speed density that describes the theory: http://support.moates.net/theory-speed-density/ and it does say exactly what I try to explain in the opening post (a bit better).

The theoretical calculation for PW of speed density should have the following terms
VE = Volumetric efficiency (from table, pure theoretical this is 100%)
reqF = Required fuel calculated as injector opening time at the sea level air density using:
moles of O2 molecules at sea level (101kpa) using Engine displacement and fuel injector flow rate
Using the following formula

PW = VE[%] * reqF[ms] * MAP[kpa]/101[kpa]

Example at altitude with "fixed" setting
At higher altitude the air is less dense (less molecules), so at 2500 meter altitude your barometric reading is ~75kpa. https://www.mide.com/air-pressure-at-al ... calculator.

If you press the gas paddle fully the MAP reading is ~75kpa (same as baro) For an NA engine that means you need the cell in your VE table for VE = 75kpa at given RPM to get to the desired and tuned AFR. Lets say for simplicity that it is VE in that cell =75%
Values:
VE = 75%
Required Fuel = 5ms
MAP = 75kpa
0.75*5*75/101 = 2,78465ms

Example at Sea level with "fixed" setting
If you press the gas paddle fully the MAP reading is ~101kpa (same as baro) For an NA engine that means you need the cell in your VE table for VE = 100kpa at given RPM to get to the desired and tuned AFR. Lets say for simplicity that it is VE in that cell is also 75%
Values:
VE = 75%
Required Fuel = 5ms
MAP = 101kpa
0.75*5*101/101 = 3.75ms

 So running full throttle at 2500 meter above sea level ~75% max torque is available at any given RPM. Also that means ~75% of your max horse power at ~max RPM. And you need 75% of your fuel (because the air is less dense). That is exactly what speed density already does without barometric correction!

More practical hands on indications this is true?
Actually the mega squirt guys show (with altitude test) that this is true, see https://www.msextra.com/forums/viewtopi ... 1&t=47321 The actual solution to the problem created with barometric correction is to set baro correction to 100% always (so basically no barometric correction).

And there is actually already also a hint that is not working in speeduino here: viewtopic.php?t=3205. Going up will make AFR go rich because MAP/baro = 100% @ full throttle but there is less air (lower air density) so too much fuel is used because the algorithm calculates with 100% and not 75% what it actually should do.

PW calulations with MAP/baro settings
PW = VE[%] * reqF[ms] * MAP[kpa]/Baro[kpa]

Example at altitude with "MAP/Baro" setting
If you press the gas paddle fully the MAP reading is ~75kpa (same as baro) For an NA engine that means you need the cell in your VE table for VE = 75kpa at given RPM to get to the desired and tuned AFR. Lets say for simplicity that it is VE in that cell =75%
Values:
VE = 75%
Required Fuel = 5ms
MAP = 75kpa
Baro = 75kpa
0.75*5*75/75 = 3.75ms

Example at Sea level with "MAP/Baro" setting
If you press the gas paddle fully the MAP reading is ~101kpa (same as baro) For an NA engine that means you need the cell in your VE table for VE at 100kpa at given RPM to get to the desired and tuned AFR. Lets say for simplicity that it is VE in that cell is also 75%
Values:
VE = 75%
Required Fuel = 5ms
MAP = 101 kpa
Baro = 101 kpa
0.75*5*101/101 = 3.75ms

So the same PW for a different air density at altitude! It should be less PW because the air density is lower so that needs less fuel! (around 25% less)

In this example at 2500m when barometric correction is enabled this will make your AFR go to 10.5 or 11 if you tuned it to 14.7 at sea level. (14.7*0.75=11) There is one assumption here and that is that the Fuel pressure regulator is actually connected to the inlet pressure to make the FPR have a pressure difference of X PSI. But it is already a good idea to do this anyway.

So I am pretty sure now barometric corrections as MAP/baro is just wrong. If you need any compensation (of course in practice things have an small effect) the effects are much smaller than that and are not theoretically correlated in the way it is compensated now. It would be really nice if someone has the ability to test this in his/her area :-D. Set the compensation setting to fixed vs map/baro.

In the speeduino tuning manual https://speeduino.com/Speeduino_manual.pdf page 39 it is recommended that barometric compensation is enabled. I propose to set this recommendation to fixed and not baro, because of the previous mentioned.
User avatar
By PSIG
#48248
Actually, I did read every one of your words, but OK. I don't care how you want to explain it, so long as you can provide solutions to those with real-world baro issues like I had, but are fixed now. "Can you imagine a world without hypothetical situations?" :lol:
By Tjeerd
#48249
Ah so you can show me with data logs at different altitudes that the "fixed" works way worse than the "Baro"? :-D. (unless you run some ridicules cam with lots of overlap that skews with vacuum. ;-).

Ow and i propose to use the correct theory for compensation first (which is no compensation). And add appropriate compensation for what is not cached in the theory. (so that means an adaptable curve compensation over baro/map).

I was just trying to understand the theory behind baro compensation that is implemented in speeduino, and i got... no explanation. :-D
#48260
That was my original question HWY does baro influence speed density systems (in theory). I did google it, couldn't find any theoretical explanation for speed density. Only people that didn't understand it either. That is why i tried to deduce it from the speed density calculations and got to the previous explanation

So if there is a theoretical explanation why MAP divided by Baro is the correct compensation term please share. I couldn't find it.

Ow and i think MS has the "curve" for compensation and that is initially set all to 100% (no compensation at all? i think?), i wonder why? I guess because its very dependent on the engine how baro correction needs to work.

I leave it for now
#48314
The OEM ECUs that have baro sensors that I have worked on have multiple tables for baro for both injection and ignition.
The G16B from the Baleno/Esteem takes a snapshot at engine on for baro but also continuously compares the baro reading with the MAP reading at WOT and high load and updates the baro if MAP is lower than baro.

Hi, I am trying to assign Signed values to the x-a[…]

Vr Conditioner Noise when cranking

New version 202305 don't fix the issue. Now after[…]

blitzbox

I've finally figured out why MAP and Lambda weren'[…]

Hello, I bring news!! Let me tell you that after […]

Still can't find what you're looking for?