View unanswered posts | View active topics It is currently Wed Oct 18, 2017 12:17 pm



Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Rules instead of maps? 
Author Message
TO220 - Visibile

Joined: Fri Jul 17, 2015 11:54 pm
Posts: 13
Hello

I'm new to the forum, never built an ECU or had much experience with them but I am a tinkerer, a programmer, and very interested in engines.

It strikes me that an ECU could run an engine based on a few simple mathematical rules instead of maps.

I was wondering if there where any good reasons to use maps instead of a rule based system?

My hypothesis is that when ECU's where first developed the hardware was lacking in speed and power, making it faster to lookup a value in memory rather than calculate it. By the time hardware caught up maps would be the industry standard, but surely now we have the hardware to calculate the values on the fly?

Having a rule based system would be beneficial to the tuner in that there would only be a handful of rules and values to tweak.

Thanks Rufe0


Wed Jul 22, 2015 8:42 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14822
Location: Home sweet home!
On the contrary, we use tables because they're easy and fast to calibrate. Models are difficult to understand, and to model the typical curves of a million engines would be very difficult indeed, as the shapes vary wildy. OEMs use models, however they have large budgets and entire teams of engineers to develop calibrations with.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Thu Jul 23, 2015 10:37 am
Profile WWW
TO220 - Visibile

Joined: Fri Jul 17, 2015 11:54 pm
Posts: 13
Hmm the kind of formulas I'm thinking of would definitely be easier than maps and probably would fit all types of engines with only a few tweaks of a couple values.

I can see how some engines, variable valve timing etc would start to get considerably more difficult but still doable.

Consider a basic engine with fixed valves and intake geometry, throttle by wire so pedal position sensor, throttle servo, rpm sensor, knock sensor, temperature sensor and lambda sensor.

Startup rules would be something very simple like increase fuel by X% for 1min or until temp > 80degrees C or whatever, retard spark by Y% etc, simple stuff.

Then you would have a system where you have a target RPM(pedal position sensor) and actual RPM , if there is a discrepancy adjust throttle servo accordingly based on a percentage of a max aggressiveness value. This would give you an acceleration factor which is a temporary number which tells the rest of your code if the engine is trying to accelerate and by how much. Its a bit like tuning a servo motor on a CNC machine if you've ever done that. Basically just a few values which control how aggressively the algorithm tries to match the target and actual speed which stops overshooting and hunting.

Then you have a loop that would check the AF ratio and adjust your injector timing as necessary, factoring in a value that adjusts AF ratio based on acceleration factor.

Same for spark timing, adjust timing based on RPM*spark value+ any adjustments needed based acceleration factor + knock value.

Then simply max and min RPM.

Thats 4 tuning values and 3 or 4 basic parameters. The code needed to run it would be probably 4 or 5 code blocks probably couple hundred lines max.

You could easily optimize the 'tune' of this system by driving around, logging the acceleration factor, adjusting your values, rinse repeat untill you have a lowest average acceleration factor, meaning that the engine is achieving the desired RPM more of the time. It would even be easy to have the ECU adjust itself with some sort of learning algorithm based on average acceleration factor.

It could get more complicated if you have to set tuning values based on RPM instead of fixed values but still relatively easy to use.

Am I wrong?


Thu Jul 23, 2015 12:48 pm
Profile
TO220 - Visibile

Joined: Fri Jul 17, 2015 11:54 pm
Posts: 13
Obviously I left out that you need a crank position sensor and a code loop that would handle each cylinder based on crank position or whatever.


Thu Jul 23, 2015 1:09 pm
Profile
LQFP112 - Up with the play
User avatar

Joined: Thu Jun 02, 2011 8:17 pm
Posts: 112
Carburettors and distributors use rules.

_________________
<@TekniQue> but in the end, it's code that makes a computer useful


Fri Jul 24, 2015 2:30 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14822
Location: Home sweet home!
Rufe0 wrote:
Am I wrong?

Basically, yes :-) I don't have time to go into it more, though. Sorry.

PS, sim's post was before he could see your last two posts. Whether that affects what he'd have written, I don't know. Probably not much.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Fri Jul 24, 2015 7:47 am
Profile WWW
TO220 - Visibile

Joined: Fri Jul 17, 2015 11:54 pm
Posts: 13
Could you possibly go into detail when you have more time?


Fri Jul 24, 2015 8:21 am
Profile
QFP80 - Contributor

Joined: Sun Apr 14, 2013 8:50 am
Posts: 34
Location: Australia
Table based mapping is done because it's easy, not because it's the only correct way.
Model based engine control is just simply difficult and very engine specific by nature, which is why virtually every generic ECU avoids it.

Look at true VE and pulse width fuelling, some of the high end systems avoid even VE because it's not as easy to explain to the end user.
Some claim they use VE but don't, and others claim they only need milliseconds of fuel, and some are just misguided or following tradition.

There are still correction tables even in the OEM world regardless of the control strategy as engines are just not able to play nice and follow rational formulae.
Have a look at the SAAB Trionic8 system for a pretty well documented torque demand/delivery model, Bosch ME-Motronic might also be a relevant reference.

Given enough time and money anything is possible, so if you have an idea and some time to spend on developing it, then go ahead and have a whack at it.
The task won't be easy, but you know that :)

_________________
Steve
1981 Porsche 928S Bosch KE3-Jetronic Injection with FrankenCIS http://www.FrankenCIS.com


Fri Jul 24, 2015 10:20 am
Profile
QFP80 - Contributor

Joined: Sun Apr 14, 2013 8:50 am
Posts: 34
Location: Australia
Rufe0 wrote:
Having a rule based system would be beneficial to the tuner in that there would only be a handful of rules and values to tweak.

This is probably the sticking point, "tuners" aren't rocket scientists so there is going to be a bit of resistance to learning new things, new concepts and the science behind them just wont be an easy sell.

_________________
Steve
1981 Porsche 928S Bosch KE3-Jetronic Injection with FrankenCIS http://www.FrankenCIS.com


Fri Jul 24, 2015 10:28 am
Profile
TO220 - Visibile

Joined: Fri Jul 17, 2015 11:54 pm
Posts: 13
Hmmm OK so I think I'd like to have ago at making a virtual mathematical engine which I could write control algorithms for and run on a virtual dyno to see how well the control algorithm works.

I can see this being very useful but it would have to do a decent job of replicating a real engines oddities.

Writing the simulation and the control mechanism means I could easily get into a situation where I'm setting it up to work perfectly every time which wouldn't be useful at all.

Do you think it's feasible? Would it be useful? Is there already something out there like this? Would you be willing to help?

I guess for a start I would need a detailed list of all engine parameters, what effect a high value would have and what effect a low value would have. Assume I know nothing about engines at all.

Thanks Rufe0


Fri Jul 24, 2015 10:54 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.