speeduino icon indicating copy to clipboard operation
speeduino copied to clipboard

TPS or MAP load for AFR Target table

Open shiznit304 opened this issue 3 years ago • 6 comments

Allows the user to select MAP or TPS as the load source for AFR target table. It uses a single bit.

shiznit304 avatar Oct 19 '21 02:10 shiznit304

What is the reason for wanting the AFR Target to use a different load axis to whatever is set for the VE table? On the face of it, it just seems like an unnecessary complication that will be confusing when trying to tune an engine unless both are using the same load (which is how it works now).

ric355 avatar Oct 19 '21 09:10 ric355

@ric355 when used with include afr target, it can work like power enrichment, a feature found on other ECUs

shiznit304 avatar Oct 19 '21 13:10 shiznit304

@ric355 when used with include afr target, it can work like power enrichment, a feature found on other ECUs

Incorporate AFR already works like this abit using the same axis as the main table. The "include AFR Target" you reference is really a proportional only O2 feedback comparing measured O2 to this table. But since it has no time delays, sensor checks or any other limitations it is extremely unreliable way to tune an engine. (IMO this "feature" should be removed)

I can see that if O2 feedback was disabled having the AFR table on a different axis would provide the power enrichment function you talk about. But I think for clarity it would be easier to add this as a seperate single axis table. i.e. Above TPS XX take the minimum of regular AFR table and [Insert new value or table]. Also For everyone that has O2 enabled and Incorporate AFR on (which IMO is the "correct" way to tune) it would be confusing to have AFR on a different axis to the main VE Table.

HWright9 avatar Oct 21 '21 02:10 HWright9

@ric355 when used with include afr target, it can work like power enrichment, a feature found on other ECUs

Incorporate AFR already works like this abit using the same axis as the main table. The "include AFR Target" you reference is really a proportional only O2 feedback comparing measured O2 to this table. But since it has no time delays, sensor checks or any other limitations it is extremely unreliable way to tune an engine. (IMO this "feature" should be removed)

@HWright9 Include AFR target isn't O2 feedback. it multiplies by radio of stoich AFR/target AFR. I believe you're thinking of "multiply ratio of AFR to Target AFR".

shiznit304 avatar Oct 21 '21 03:10 shiznit304

I am referring to the definition in speeduino.ino Where "Include AFR" uses the O2 sensor value.

if ( (configPage2.includeAFR == true) && (configPage6.egoType == 2) && (currentStatus.runSecs > configPage6.egoStartdelay) ) { iAFR = ((unsigned int)currentStatus.O2 << 7) / currentStatus.afrTarget; //Include measured O2 AFR from sensor (vs target) if enabled }

and "Incorporate AFR" Uses the table vs the stoic ratio (no O2 sensor feedback) if ( (configPage2.incorporateAFR == true) && (configPage2.includeAFR == false) ) { iAFR = ((unsigned int)configPage2.stoich << 7) / currentStatus.afrTarget; //Incorporate stoich / target AFR, if enabled. }

The confusion you have is exactly why we should remove the "include AFR" method.

HWright9 avatar Oct 21 '21 04:10 HWright9

Yes i am with @HWright9. The Include AFR function is really confusing and not useful. (The incorporate AFR is the one you want). Include AFR is a form of EGO feedback that is enabled in another place as the other EGO control (simple and PID EGO feedback controls). Also the concept is flawed from a control perspective and i don´t see anyone using it because a properly tuned EGO controller works much much better. What @shiznit304 wants to use i think is incorporate AFR, that would even work without any O2 sensor connected (if the VE table is tuned correctly)

For this PR. I can see a use case where you have 80% TPS but still 100kpa MAP. If your intention is not to accelerate quick. But when you want to go full power you fully press the pedal and you want a lower AFR at the same 100kpa. (talking about NA engines). With this you create a challenge where at higher boost (Higher kpa) you want a lower AFR too because of knock and EGT etc (boosted engine). This can than not be easily done anymore.

So in my opinion this function would be better incorporated to as a simple if TPS>xx% set AFR target to yy. And than use the lower AFR value of the table or the TPS power adder based one.

Tjeerdie avatar Oct 23 '21 11:10 Tjeerdie