MAF wish list

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

ashford
Super MS/Extra'er
Posts: 1603
Joined: Sun Apr 27, 2008 4:29 pm

Re: MAF wish list

Post by ashford »

tps based like this?
afr.jpg
techsalvager
Master MS/Extra'er
Posts: 443
Joined: Sat Jun 28, 2008 3:47 am

Re: MAF wish list

Post by techsalvager »

ashford wrote:tps based like this?
afr.jpg
No
MS2extra
Mass Air Flow fuel and spark
Miata 1.6 turbo
TechSalvager is banned for ignoring admin warnings not to link to his childish videos.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

That is just my point! You won't be at the same load! Load will change so you can change the commanded AFR with load. Meaning there is no need to separate AFR into two tables. The point of having a table at all is so that when conditions change you can change what is done under those conditions. If you are just going to switch lambda based on TPS, then why use a whole table... You would just have "unloaded AFR" and "Loaded AFR" and a switchpoint. Havig a table is much better than that.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: MAF wish list

Post by Peter Florance »

muythaibxr wrote:That is just my point! You won't be at the same load! Load will change so you can change the commanded AFR with load. Meaning there is no need to separate AFR into two tables. The point of having a table at all is so that when conditions change you can change what is done under those conditions. If you are just going to switch lambda based on TPS, then why use a whole table... You would just have "unloaded AFR" and "Loaded AFR" and a switchpoint. Havig a table is much better than that.
If the basic MAF subsystem works, I'd like to see some tuned cars where the MAF does a good job of measuring air mass and fueling the car steady-state. I suspect it does work but sounds like its a little clunky with units, calibration, etc.

For a wish list, some examples of how the existing subsystem's logic doesn't work in a particular case (msq and log) will lend credence to your case.
This is not onerous; it is how all the existing code was developed: from testing and feedback.

If I was coding, I would ignore any fix request that didn't come with log and msq as evidence that a change or fix is needed. But I'm not coding, so it's not my call.

I've been involved with MegaSquirt since the first V1.01 group buy, so I have a lot of confidence that every demonstrable feature concern is addressed over time. And I've had a lot of experience watching the interaction between tester and developers. It works when the above is followed.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

Good point Peter. Someone provide a log and msq where you think you are at the exact same load and RPM but need a different AFR.

My assertion is that if load and RPM are the same, then AFR should be as well. You don't change ignition timing because throttle position changes, you change it when load or RPM change. I do not see why AFR should be any different.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
techsalvager
Master MS/Extra'er
Posts: 443
Joined: Sat Jun 28, 2008 3:47 am

Re: MAF wish list

Post by techsalvager »

muythaibxr wrote:
techsalvager wrote:How can I run stoich at 60-100% load and say 2000-4000 rpm under mild acceleration?
How can I run richer then stoich at 60-100% load around the same 2000-4000 rpm under hard acceleration and wide open throttle?

there is places that I don't want to run rich at under certain conditions and there are the same places I want to run rich at the same location under different conditions.
I would say you can't be at 60-100% load and have mild acceleration AND be 60-100% load at the same RPM and have hard acceleration. The only thing you can change to cause that is the gear you're in. And in that case you wouldn't want to have different AFRs at those same loads... you'd want higher loads to be richer.

You can be at 90-100% load and have hard acceleration (for example), or be at 60-90% load and have mild-medium acceleration. In which case you'd just put Stoich values between 60-90%, and richer than stoich at 90-100%.

Again, what you're asking for doesn't make sense.
using the AFRtarget table with no closed loop operation.
under maf mode, putting lambda 1 commands lambda 1 based off the inputs the ecu uses and needs. If you put lambda 1 and you get lambda .95 then there is an issue, most likely transfer function is wrong.
Yes, so you'd fix your transfer function to give you 1 lambda where you ask for 1 lambda, and in the meantime, the closed loop algorithm would correct the fueling to lambda 1.

Ken
I can have hard acceleration and transfer though the 60-100% cells depending on from which point I hit the accelerator pedal.
But at the same time I can have mild acceleration and be in those same cells, just accelerating up to speed.
I deem hard acceleration based on how much desired throttle I need, if I need a good amount of throttle to roll out then we are entering hard acceleration reguardless of where the load and rpm on fuel map it is.

Yes, so you'd fix your transfer function to give you 1 lambda where you ask for 1 lambda, and in the meantime, the closed loop algorithm would correct the fueling to lambda 1.
How would it correct the fueling to lambda 1, I have disabled closed loop fueling.
MS2extra
Mass Air Flow fuel and spark
Miata 1.6 turbo
TechSalvager is banned for ignoring admin warnings not to link to his childish videos.
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: MAF wish list

Post by Peter Florance »

techsalvager wrote: I can have hard acceleration and transfer though the 60-100% cells depending on from which point I hit the accelerator pedal.
But at the same time I can have mild acceleration and be in those same cells, just accelerating up to speed.
I would have to see proof of this.

Speed density would take care of this automatically.

I feel that if MAF doesn't also handle this case with more air and fuel, it's either not set up correctly or broken.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

I don't think it matters how fast you are accelerating. If the load is the same the AFR should be too.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
baldur
Experienced MS/Extra'er
Posts: 256
Joined: Sun May 02, 2004 6:39 pm
Location: Reykjavik, Iceland
Contact:

Re: MAF wish list

Post by baldur »

I figured I'd chime in here.

You do understand that at low engine speeds, relatively small throttle openings can result in the same MAP and same airflow as wide open throttle, correct?
You also understand that best power (lowest specific air consumption) and best fuel economy (lowest specific fuel consumption) occur at different air:fuel ratios, correct?

With this in mind, MAP or MAF alone are insufficient data to determine whether the driver wants torque or fuel economy, for best results you need to consider the throttle input as well, as a secondary load dimension. This way you can both tune to best fuel economy and best low rpm torque, without compromise.
Baldur Gislason
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

That just implies TPS-based table switching, which we already support.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

Also, in my experience, once load maxes out, further throttle input makes little if any difference in the actual VE and therefore airflow. This effect is especially apparent with oversized throttles and ITBs. Once they are open a certain amount at low rpm, the only way the engine will ingest more air is with more RPM. As the RPM climbs, it takes progressively more throttle to max out load. I don't know if all engines with big throttles are that way, but my 20v 4age certainly is.

In that case you can request all the torque you want with your right foot and it won't make a bit of difference once load is maxxed out.

That still doesn't stop you from using table switching based on TPS to do your economy vs power tunes, nor does it mean that you want separate closed-loop AFR target vs non-closed-loop "power enrichment" AFR tables.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
baldur
Experienced MS/Extra'er
Posts: 256
Joined: Sun May 02, 2004 6:39 pm
Location: Reykjavik, Iceland
Contact:

Re: MAF wish list

Post by baldur »

muythaibxr wrote:in my experience, once load maxes out, further throttle input makes little if any difference in the actual VE and therefore airflow. This effect is especially apparent with oversized throttles and ITBs. Once they are open a certain amount at low rpm, the only way the engine will ingest more air is with more RPM. As the RPM climbs, it takes progressively more throttle to max out load. I don't know if all engines with big throttles are that way, but my 20v 4age certainly is.
That's exactly what I said, the MAP and airflow are poor inputs for torque request, they max out before the driver has really indicated with his right foot that he wants all the torque possibly available, but the engine can happily operate at the air:fuel ratio that gives the lowest specific fuel consumption. A small boost in torque is then available by injecting more fuel if requested by the right foot, at the cost of fuel economy.
muythaibxr wrote: That still doesn't stop you from using table switching based on TPS to do your economy vs power tunes, nor does it mean that you want separate closed-loop AFR target vs non-closed-loop "power enrichment" AFR tables.
Well I don't use closed loop O2 at all and I tend to use custom code for my cars anyway.
I'm just saying that for a road car, at lower engine speeds on an atmo engine, MAP and MAF are poor indicators of what AFR is appropriate, when the engine will happily operate across a wide range of air:fuel ratios, and best torque and best fuel economy (both desireable in the same tune) are found in different points across that range.
re TPS based table switching, sure that can be one means to get this functionality as long as it has some hysteresis.
Baldur Gislason
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

So the main things I was trying to point out:

- If you want a TPS-based economy vs torque tune, our switchable tables give you that
- For techsalvager, Nothing Baldur says there matches what you are asking for exactly, but I think my previous point above probably already addresses the actual end result you want without having a separate AFR table for closed loop vs what you keep calling the fuel table.
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

MAF wish list

Post by muythaibxr »

Also, I have personally never felt the need to do TPS-based table switching for economy vs power, with ITB mode, I have always just created a single normal looking AFR table and tuned the loads up to 80% for economy and the rest above that for power.

Not saying doing it with 2 tables is invalid, just that i have never felt like doing things with two tables would provide enough benefit to make it worthwhile to do it.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: MAF wish list

Post by elaw »

muythaibxr wrote:Good point Peter. Someone provide a log and msq where you think you are at the exact same load and RPM but need a different AFR.

Ken
Ken,

I could actually do that, although it would take a bit of digging around.

This may be a bit OT since I'm not sure techsalvager and I have the same perspective, but let me explain why I think TPS-based AFR-table switching would be useful with a turbocharged engine. I should also state that my philosophy is that the engine should run at a stoichiometric mixture at all times, unless there's a valid reason to run it rich. And there are two valid reasons to run rich: 1) to get maximum power in any given circumstance, and 2) to help prevent detonation at maximum load.

With an NA engine, those two reasons should easily be satisfied by a single AFR table. When the driver wants max. power, the throttle will be wide open, and in terms of MAP the engine will be at max load because the open throttle makes it that way. So in this case, you just make the top row of your AFR table rich and you're done - max. load always corresponds to max. throttle.

Now take the example of a turbocharged engine where MAP can go well above 100. An AFR table with only the top row set rich would satisfy the detonation-prevention requirement. But the engine will only go rich when the turbo is fully spooled, so at any point other than max. boost it won't be making as much power as it could. I can also say from experience that the turbo will spool more slowly with that kind of setup.

An alternative to the above with a turbo engine is to set up the AFR table so the engine runs rich at all MAP values of 100 or higher. Like the approach above, that satisfies the detonation-prevention requirement by having it rich at max. load, plus it will be making "best power" whenever under boost. This isn't a bad approach, but especially with a small highly-boosted engine there can be times when the turbo makes boost at part-throttle, and in that case the mixture will be enriched unnecessarily, which isn't a huge big deal but wastes fuel. It could also get tricky at higher altitudes, where WOT doesn't yield a MAP of 100 kPa.

With my TPS-based AFR-tableswitching setup, I don't have to make either of the above compromises. At < 70% throttle, I run an AFR table that's rich only in the top row to prevent detonation, and is 14.7 everywhere else to save fuel (and also make the cat that I'm about to install happy). When I push the throttle past 70%, it switches to an AFR table that gives best-power mixture on and off boost (except again the highest cells are a little richer to prevent detonation). With this setup, I get improved turbo spool, good power, and noticeably better fuel economy.

I guess another way of looking at it, and this again is from a turbocharged-engine perspective, is that MAP indicates when the engine *needs* enrichment, but TPS indicates when the driver might *want* enrichment. Sometimes the two coincide, but sometimes they do not.
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

MAF wish list

Post by subwoofer »

muythaibxr wrote:That just implies TPS-based table switching, which we already support.

Ken
Except for the one table in question, the AFR table. For AFR you have to loop back from a generic output to the Tableswitch input to get TPS based switching.

I hope this will be fixed soon.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: MAF wish list

Post by Matt Cramer »

muythaibxr wrote:That just implies TPS-based table switching, which we already support.

Ken
Or using SD or MAF as the fuel load but TPS based AFR tables. That sounds like it would accomplish a similar effect.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: MAF wish list

Post by Peter Florance »

elaw wrote:
muythaibxr wrote:Good point Peter. Someone provide a log and msq where you think you are at the exact same load and RPM but need a different AFR.

Ken
Ken,

I could actually do that, although it would take a bit of digging around.

This may be a bit OT since I'm not sure techsalvager and I have the same perspective, but let me explain why I think TPS-based AFR-table switching would be useful with a turbocharged engine. I should also state that my philosophy is that the engine should run at a stoichiometric mixture at all times, unless there's a valid reason to run it rich. And there are two valid reasons to run rich: 1) to get maximum power in any given circumstance, and 2) to help prevent detonation at maximum load.

With an NA engine, those two reasons should easily be satisfied by a single AFR table. When the driver wants max. power, the throttle will be wide open, and in terms of MAP the engine will be at max load because the open throttle makes it that way. So in this case, you just make the top row of your AFR table rich and you're done - max. load always corresponds to max. throttle.

Now take the example of a turbocharged engine where MAP can go well above 100. An AFR table with only the top row set rich would satisfy the detonation-prevention requirement. But the engine will only go rich when the turbo is fully spooled, so at any point other than max. boost it won't be making as much power as it could. I can also say from experience that the turbo will spool more slowly with that kind of setup.

An alternative to the above with a turbo engine is to set up the AFR table so the engine runs rich at all MAP values of 100 or higher. Like the approach above, that satisfies the detonation-prevention requirement by having it rich at max. load, plus it will be making "best power" whenever under boost. This isn't a bad approach, but especially with a small highly-boosted engine there can be times when the turbo makes boost at part-throttle, and in that case the mixture will be enriched unnecessarily, which isn't a huge big deal but wastes fuel. It could also get tricky at higher altitudes, where WOT doesn't yield a MAP of 100 kPa.

With my TPS-based AFR-tableswitching setup, I don't have to make either of the above compromises. At < 70% throttle, I run an AFR table that's rich only in the top row to prevent detonation, and is 14.7 everywhere else to save fuel (and also make the cat that I'm about to install happy). When I push the throttle past 70%, it switches to an AFR table that gives best-power mixture on and off boost (except again the highest cells are a little richer to prevent detonation). With this setup, I get improved turbo spool, good power, and noticeably better fuel economy.

I guess another way of looking at it, and this again is from a turbocharged-engine perspective, is that MAP indicates when the engine *needs* enrichment, but TPS indicates when the driver might *want* enrichment. Sometimes the two coincide, but sometimes they do not.
It seems like some OEM cars have that sort of fueling; as an autocrosser, I hate driving cars like that. I want smooth curve of power; if I don't want full power, I won't push pedal to floor.

I much prefer the power curve of my 1981 MegaSquirted BMW to much newer OEM controlled BMW's.
In my car or any SD car I've tuned, I can just "meter" out power with the pedal. Very smooth.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
baldur
Experienced MS/Extra'er
Posts: 256
Joined: Sun May 02, 2004 6:39 pm
Location: Reykjavik, Iceland
Contact:

Re: MAF wish list

Post by baldur »

Peter Florance wrote:It seems like some OEM cars have that sort of fueling; as an autocrosser, I hate driving cars like that. I want smooth curve of power; if I don't want full power, I won't push pedal to floor.

I much prefer the power curve of my 1981 MegaSquirted BMW to much newer OEM controlled BMW's.
In my car or any SD car I've tuned, I can just "meter" out power with the pedal. Very smooth.
Which is why you ideally want a smooth transition between the power and economy tables, not a switch. Also, this is not a feature that is of any significance on racing cars, its only purpose is to remove the compromise between best torque and best fuel economy when cruising in the highest gear where if the gearing is appropriate for the engine you'll be certain to spend a lot of time between 90-100% load on the SD scale without ever pushing the pedal to the floor.
Baldur Gislason
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MAF wish list

Post by jsmcortina »

That depends on engine and intake type for sure. My setup doesn't work like that, I only see >90% load when I'm booting it.

In a future implementation we could use VE1 as the normal "MAFMAP" trim table and could potentially allow VE2 as an "alpha-n" trim table too which I believe would achieve the TPS component you are desiring.

Or perhaps blend between AFR1 and AFR2 target tables depending on TPS.

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".
Post Reply