Alfa Romeo Forums banner

Self learning EFI - Design Thoughts

8.8K views 49 replies 13 participants last post by  slyalfa  
#1 ·
Here's a wild idea I'm working on. Perhaps I can pitch it to someone.

It's a global design for a self learning EFI. The system would incorporate a Wide Band O2 sensor with an RPM meter and computer software, combined with an accelerometer such as the G-Tech, a programmable ECU and some statistics software.

I don't believe this is as far fetched as one might think. The hardware exists. The real hurdle is getting through the proprietary software from each manufacturer.

I'm looking as some graphs by Motec, Logitech, and Statistica. The Logitech software can plot real-time A/F against RPM. The G-tech can plot acceleration against RPM. Using this as a common denominator, the statistics package could be set up to compare various runs with alterations in injector timing and A/F changes.

The system would require "learning" runs on the same road. After a large enough sample of runs, the software could make reccomendations for changes in the injector timing. The changes could be instituted in small increments and the computer could then compare the gains/losses against the previous curves.

Statistica is very good at making predictions. A second "testing" phase could then occur as the reccommended changes are made to the ECU map. There may be many occasions where the changes were detrimental to efficency, but after a while the software could bracket-in the best solutions. This is very similar to how a Tank calculates a firing solution.

The best advantage of this system is that it could tailor itself to individual driving habits.

As the accelerometers get more advanced, G forces for inclines and curves could be taken into account, and the software could remap the ECU on-the-fly in situations were richer mixtures were needed for more power up hills and around curves, and then at other times, lean the mixture for high speed straight driving.

What do you think?
 
#2 ·
How about adding a GPS into the mix? This would add information about topology and route, which will make road segments and conditions more comparable (and fun to watch with a Google-maps overlay).
 
#5 ·
I believe what he's describing would be an aftermarket EFI system that didn't require any kind of mapping or setup by the installer other than connecting things.

Just a hook it up and it'll learn as it goes kind of thing.
 
#6 ·
EXACTLY!!!!!

The GPS would be nice, but the basic requirement would just be the on-the-fly feedback loop for autotuning.

Greg,

What I'm proposing is that just having the perfect static map for A/F at all RPMs is not enough. Sometimes different A/F ratios at different RPMs in different conditions MIGHT be plausible. That would be the real debate. People may have drastic driving habit differences that could be fine tuned with a "intelligent" mapping system.

In Innovate system has a five channel logging component that could record additional engine temp and throttle position. A marriage between these components and an "end result" monitor such as an accelerometer, could quantify the "seat of your pants" changes that a dyno/tuner would ultimately be after.

The system could try various tweaks during its learning mode and compare the results.

The counter argument of course, is that after the system went through all its trial and error changes, it would simply end up with a A/F based map that would have been available from the start on a dyno. But that's part of the debate. Would it really, or would we be suprised that it developed a slightly different reciepe for fuel mixture that gave more pronounced acceration and handling for each specific driver.

As far as the system being an overwhelming undertaking (PITA); I propose that the latest technology has now put this next generation of mapping within reach. If any reasonable shade-tree mechanic with a few thousand dollars could install a "smart" ECU and just drive around the same streets for a hundred miles or so, and gain the same results a professional tuner could...well wouldn't that be a great aftermarket product?

The hardware is there. Their software spreadsheets already have the necessary data. The missing link is the laptop software to combine the various inputs and then an ECU that allowed RAM changes of the map in real time instead of ROM flashing.
 
#7 ·
For myself, I'd rather see something that doesn't require a laptop.

There's nothing wrong with flash ROM, especially since it'll do what RAM won't: hold it's information once the power is cut.

That way one avoids having to own a laptop (many of us don't) all that 'only operates with XP and such-n-such Mhz processor and X amount of RAM' type stuff along with not needing any extra junk like cables and adapters to tote along or keep track of.

All built into one brainbox with not much more than a few dip switches to set up whether it learns an economy or performance type map, how many cylinders, the impendace of the injectors, auto or manual trans, the ignition type and whether you want it to learn or hold what it knows, along with an LED to indicate it's learning, another for 'ok, we're done' and a book that tells you the trouble shooting/failure code that the LED's would flash if there was a problem.

A laptop just doesn't seem like a gotta-have for such a system, unless you wanted to do the programming yourself, in which case there would be no need for the self learning to begin with other than to correct for slight mis-programing errors made by the human.
 
#8 ·
You might want to search some SAE papers- I've read some suggestions for algorithms to self calibrate the spark.

Fuel is pretty easy- tune the open loop controller so that the closed loop controller has to do very little. It's how we do real production work.

Air/fuel is easy. Spark is the hard one.

Even harder is VCT.

If I could suggest- find one of the aftermarket systems that will run a "script" file- one where you have an input to try some numbers in the calibration automatically. With that, you can have two programs running at the same time- one running the car, the other optimizing the calibration.

Not easy, that's for sure. We take HOURS of data to map our engines- if there was such a thing as autotune, I'm sure we'd be doing it to save time and money.

Eric
 
#9 ·
Yes, and it's those hours of data I think this system could gain from. To make reasonable statistical predictions, one needs a VERY large sample size. This is far more than can be done in a few tuning sessions. From my readings on the various aftermarket ECUs, and even those with Auto-tune functions, none of them seem to data long much more than a few minutes of real world driving.

I'm thinking the next evolution should (or may even will) be a smart ECU that logs hundreds of hours of A/F and acceleration data and then tweaks the map accordingly.

I think you will admit, that at present most tuners are still using a good precentage of "art" in thier tweaks.

The closed loop systems make adjustments to target the A/F ratio only. None are measuring power at the rear wheel. If this was truly enough, then we'd be seeing the NASCAR and other racing entities letting thier ECUs do all the work. They don't however! They go back in and make thier own changes based upon experience.

The average Joe can't afford a pit crew or hours with an experienced tuner. But what if for a few thousand dollars, he could take his modified ametuer machine and let a statistical based system, with some form of rear wheel power monitor do the work for him. It could make small and subtle changes based upon its estimates and then actually measure the change. Those changes that were beneficial would be kept and those that were poor would be discarded.

The system could have options for choosing fuel economy vs. power/acceleration.

Tifosi is correct, the system could eventually have it's own CPU and input/output lights/buttons, but that of course would add to the cost.
 
#10 ·
I spoke with the guys at Innovate today. They have already designed a product very similar to what I am talking about. I ordered one. It arrives in a few days. They are also discussing merging it with one of the programmable ECU manufacturers. What they had not considered yet was the "trial" portion of my concept.

But this may support the merit of my idea.
 
#11 · (Edited)
I think one of the missed things. why you make it rich is to cool the mix so you can add more advance.
with out knock. I think max power is hard to do with out major risk to the motor. you need to log EGT as well, melted parts are also not good. I think some simple firmware upgrade could help out on the MPG part.
but there is still a risk of melted parts. but much less under light load. just moving the timming for a fixed TPS and RPM to get the smallest PW for the same mix would boost MPG. but the best is knowen to be where damage starts aka too hot and micro dets. almost any of this would need ION feedback and EGT to work at all with out breaking the motor.

BTW I am a hardware guy for the VEMS ECU.
 
#12 ·
I the MS world we have megalogviewer which records and logs data and can give suggestions for a revised VE table.
I have used it to great effect with both NB and WB sensors though the WB is much better provided you get your AFR table correct to start with.

Only problem is you need to carry a laptop in the car but there is someone working on a plug in memory stick.

MS also has autotune using Megatune but I've never had much success with that.
 
#13 · (Edited)
I think you could probably use neural net software w/a genetic algorithm to "learn" the operational range of the engine and then predict an optimum fuel delivery/advance curve. Probably, this wouldn't be a "drive and forget" installation, however. You'd still need a laptop or PDA. Still, it'd be cool to just drive around for a few days and then have the EFI/ECU program itself with a perfect performance map. That's quite a step away from replacing emulsion tubes in Webers. :)
 
#14 ·
I think you could probably use neural net software w/a genetic algorithm to "learn" the operational range of the engine and then predict an optimum fuel delivery/advance curve.
By genetic I gather you mean generic ;)
Its called a data logger but the problem is that at some stage you have to get it to talk the lingo of your EFI system, whatever that may be.
You could have it make up tables that you manually transfer but that is a step backwards from what is available today with the brand specific datalogging and autotune software.

I'm not sure what is available with other aftermarket ECUs but if two bit MS is capable of doing it then I don't see any reason why others can't do it as well.
This may be a feature that you need to keep in mind when purchasing a system.
Sure saves a lot in time, fuel and dyno costs.
 
#17 ·
Ha ha a genetic algorithm, that's an abstract metaphor if ever I've heard one. Thanks for that, I bothered looking it up on wiki, very interesting even though I struggle to understand it.
Hi, Brett:

I find the whole thing pretty arcane, myself. Outisde of knowing what it is and using it a bit, I can't claim any more than general knowledge. It is, however, very interesting to watch AI work on a problem. One of my trading software programs analyzed AMD (Advanced Micro Divices) which had been trading flat for months. It gave a "buy" signal 3 days before the stock broke out and rose 21 points in a matter of hours. It then made a run from $21 to $96 before breaking downward. If you had neural net software that could read a data logger, it should be able to predict optimum fuel/timing curves. You wouldn't necessarily have to have the neural net/AI software embeded in your ECU/EFI hardware (although that would be cool if you could), you could just feed the data to your computer and let it crunch data for awhile. Depending on how your instructed the software, you could generate curves for optimum performance and emissions test passing performance.

There is software for sale that could probably do this: Neuroshell Predictor comes to mind.

I wonder if we have any AI scientists on the BB? :)
 
#18 ·
Now we are talking. I'm liking the AI idea! If tuning was as simple as setting perfect A/F ratios, NASCAR and other racing circuits wouldn't pay so dearly for experienced tuners. Maybe a good AI system could someday rival professional tuners in our ameteur automobiles.

Of note: My AUXBOX arrived. It apparently already interfaces with Megasquirt. I can tune the Megasquirt based upon the AUXBOX datalogged information, but I HAVE TO MAKE THE EVALUATIVE DECISIONS MYSELF.

Both systems however, can interface through MicroSoft Excel. I've started a spreadsheet that I can track the "runs" and the Megasquirt changes made after each run. There will then be a column that shows the new measurements after the changes. I'll later plot the mods and their effects in order to make some statistal predictions. This is exactly what an AI system could do on the fly without user input.

My guess: This is already where the technology is headed. I'm probably late in the game even to suggest the marriage of these technologies. The guys as Innovate allude to having already begun R&D on the subject.
 
#19 ·
I do not think you need a AI, or that one would even help. the problem is the lack of inputs. ION gives most of what is needed. to do a good job let s look at what you need
ION can get the peak pressure so you can do the timing dead on. and it can tell if a misfire happeded and strike a plasma burst that makes up time due to its bigger starting kernel. it can also tell if a det happened. now with the WBO² you can set the mix dead on. so yoou still need to ckeck temps so you do not melt a valve or a piston. the EGT can help there.

so if you have all that it is going to be there with just the facts.

set the mix to .85 for power and let the ION figure out the best timming.
sets mix to 1.0 or 1.1 and let the ION set the best Timming for MPG
there is no magic. the number needed are well knowen. and most systems do not have the inputs needed so they have to just look it up. and the tuner some times add more inputs just for the tune (like det phones) and lookes at the spark plugs etc.

some tuners use a very very $$ custom sparkplug that can read the peak pressure.
but at the end of the day the problem is that most installs just do not have the info they need to do the setings. and all the software in the word will not make up for the lack of a critical data point



now there are some small things after that that a human will do. like I had to detune the low end a lot on my motor so I could drive in trafic. when I had the better tune the power came on so fast off idle that it was hard to drive in bumber to bumber.
 
#20 ·
Just out of curiosity, where can you get an aftermarket ION system???

While they work really well, ionization combustion detection isn't perfect- not like having pressure probes in cylinder (which is what we do for OEM calibration).

And if you can get an ION system, the general rule of thumb is to have peak pressure at 15deg ATDC for best power. Only retard to avoid knock or control idle speed.

Eric
 
#21 ·
yes. that is right. the pressure probes is the best but not the thing you can keep there for ever and the cost is $$$.

there is a ION/plasma box out there I do not have the link but I have seen it I think that is the box they use for F1 etc.. but the real problem is saab has all the IP on that so you will not see any mainstream product have it unless some sort of deal is struck with saab.

I saw a cool sparkplug gaskit that had a piezoelectric element in it but I could never find where to get any.
That seemed like a very good way of geting the data on the cheap. might even work on head bolts.
 
#22 ·
now there are some small things after that that a human will do. like I had to detune the low end a lot on my motor so I could drive in trafic. when I had the better tune the power came on so fast off idle that it was hard to drive in bumber to bumber.
This is the part I'm talking about. Most off-the-shelf systems today can accomplish a "target" setting for all RPMs. What the systems can't do is "detune" for these specific driving conditions.

A system that COULD monitor the poor performance at low speeds, would be able to identify this special condition and "detune" for best results.
 
#24 ·
"GM/Saab does not have all of the rights"
hmm that is good to know..

"A system that COULD monitor the poor performance at low speeds,"
The problem was not poor performance it was too good of performance. I had to make it poor. I guess some sort of algorithm could be made to work. some sort of rule that detunes at low TPS settings.
what I did was retard the timming to a bad spot to limit power at the low RPM and TPS setings.

when I had a good timming path as the RPM went up the timming advancd and that made more power which made the RPM go up more adding more advance and so on. this is good as far as the motor wants but with a direct throttle the postive gain in power made for hard slow speed driving.

now a drive by wire throttle would make this easy to fix keep the tune good but back off the throttle as the timming/RPM advances to keep a more constant power level.
 
#26 ·
By all means, please do! The more said about using the Alfa/MS combination, the easier it is for us to understand what's needed to get a car running with one. Are you planning to use the Motronic FI hardware or will you use different throttlebodies?
 
#27 ·
I'm using the single Dell'orto TB that came with the Bosch FI, but switched to somle bigger capacity fuel injectors. Apart from that and a GM intake air temp sensor, I'm using all the Parts that came with the car. The TB is plenty big at 70mm, doubt I'll get 280 Bhp out of the engine any time soon :)

I got rid of the flappy AFM, which also incorporates the Intake air temp sensor, so had to get a new one. The GM sensors don't need calibrating with the Megasquirt, so the easy choice...

As far as the series 2 TS engines go (1995cc as found in the 155), they got limited to 140-ish Bhp by use of a smaller than ideal AFM, and small injectors, both are calculated to around 140 Bhp output at 0.52 BSFC.
 
#28 ·
Genetic Algorithm are amazing but require a bit of horse power (computer) to be of any use.. a good friend of mine designed a GA solver for some work he was doing and the results were fantastic!

-Raffi
 
#30 ·
Yeah, but make it 20 dual processor machines running in parallel.
(and if you asked him he'd say that wasn't enough)

-Raffi
 
#31 · (Edited)
Interesting discussion. Went 'round on a subject like this once on a different post. I was suggesting the "killer-app" of an aftermarket programmable ECU would have a sort of "wizard" that would prompt for various key variables that would then result in a very good base map. I was promptly told that I knew nothing about tuning, and that all the system really needed was the normal inputs (O2, AIT, coolant temp, rpm, MAP, etc).

'can't argue with that. Just wondering why so many guys with their aftermarket programmable ECU's have vehicles that drive as if they were carburetted (with the wrong jets & no choke).:rolleyes:
 
#32 ·
mine drives much much better then the L-jet and that was my first time installing one.
I did the hardware but others do the installs so it was my first install. I found tuning easy to do. but I know the timming could be better. if I had some way to get the PSI in the cylnder I bet I could get a few more MPG. but with a WBO²geting the mix is easy. just tell it what I want get it to start the let the WBO²do the corrections log it while driving and change the MAP to what ever the delta of the WBO²was. in one drive you are 90% there and allready runing much better then the L-jet
do it a few more times and the WBO²will be almost dead on to start with and you have a perfect VE MAP. now for the spark that is the hard one as there is no (cheap)good way to tune that.