Knock presence handling code discussion

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Knock presence handling code discussion

Post by Fred »

An interesting thread I came across on the MR2 board :

http://www.mr2oc.com/showthread.php?t=53 (requires membership)

Does anyone have any thoughts about how to handle knock retard/re advance at all?

The obvious and workable one is simply time based and uniform over all of the load sites, but maybe we can do something better?

Fred.
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!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Knock presence handling code discussion

Post by SleepyKeys »

I think this is a very important function especially with the quality of fuels these days, at least in my area.

If X number of knock events occur within X number of ignition events remove X amount of timing. In this scenario there is a ratio of knock to ignition events which can determine the severity of knock. Just about every motor I have seen killed by spark knock has just one or two pistons damaged.

If the ratio is very high we could add a burst knock function which agressively removed timing and takes more time to add timing back in(recover).


I hope I didn't reiterate what was on the mr2 forum as I didn't create a membership yet.

-Sean
You snooze, you lose!
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: Knock presence handling code discussion

Post by AbeFM »

That's a good point. Also, fuel trim, as a function of cylender, might be good to do, with windowing, it'd work dandy.

I've been thinking about fuel rails lately, and perhaps RPM would be a function as well.


Anyway, the point is, yeah I like having a severity handling. Also, it'd be nice to note it, on my car, when I get knock, it pulls spark for a long time, slowing me down. I'd like to pull it just long enough, and I'm sure it's something the computer could "learn"
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Knock presence handling code discussion

Post by Fred »

8InchesFlacid wrote:Also, fuel trim, as a function of cylender, might be good to do, with windowing, it'd work dandy.
Already at the top of the feature wishlist and IN CODE :-)
Anyway, the point is, yeah I like having a severity handling.
I'm not certain there is a lot of benefit to it though esp if we are on a combustion by combustion basis.
Also, it'd be nice to note it, on my car, when I get knock, it pulls spark for a long time, slowing me down. I'd like to pull it just long enough, and I'm sure it's something the computer could "learn"
Learning heavily depends on resources in the CPU. It would be nice, but...

Knock retard time decay etc should be fully tunable. If they aren't in MS land, I suggest you rub your name in the mud a little more and ask for them to be :-) There could be more to it than that though. Like how long boris's output pulse is, and how many pulses it looks like to your ms (maybe there is one knock and it sees it 5 times?) etc.

Fred.
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!
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: Knock presence handling code discussion

Post by AbeFM »

I *need* to learn more about the options for getting the knock signal into the ECU. I would like to see something more than a line held high for seconds at a time because it's "knock like"....

Definitely the duration of the knock retard/fueling taper is important, a hot cylinder will knock with fuel/timing a cold one wouldn't.

I guess my experiences with MLV, and not being able to use it to pull timing, kinda bugs me. It should be pretty easy - all I do is go in by hand and pull a degree in the knock cell, and a half out of the cells leading up to it. It works well enough. And it's not exactly heavy on intuition, it's just a mechanical process any software could do.


Learning... I dunno, it sure would be nice, especially if it could get a feeling for this batch of fuel. Maybe change maps under some conditions.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Knock presence handling code discussion

Post by Fred »

8InchesFlacid wrote:I *need* to learn more about the options for getting the knock signal into the ECU. I would like to see something more than a line held high for seconds at a time because it's "knock like"....
If we use an interrupt line that is window enabled then we can know when in the cycle the signal came in and ignore others outside that/ignore duplicates in the same window. The other older knock thread has my thoughts on this in it. Not sure where that is though right now. (or was it this one?)

Fred.
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!
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: Knock presence handling code discussion

Post by AbeFM »

I'm thinking more is there a 'severity' associated with it as well, an analog voltage...

I remember the thread you're talking about, and (for the theory) it doesn't need more than that: Using windowing.

I wonder if you could get a feel for severity from the timing? Certainly pre-ignition ignition (knock before the spark fires) tells you something is going on which is different from knock 10 degrees after the event.

What's the speed of sound in steel (alum for you losers with modern engines)? Could a sensor on each end of the block tell you where it happened? :-)
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Knock presence handling code discussion

Post by Fred »

8InchesFlacid wrote:I'm thinking more is there a 'severity' associated with it as well, an analog voltage...
I'd like to subscribe to this, BUT, you are supposed to tune your engine!!! This is supposed to be a safety net for catching you when you fill her up with 83 "octane" and then without thinking floor it to redline a few times in 5th. Therefore it can be a bit heavy handed in it's response. If you are getting knock retard in certain cells, remove timing from there or richen it up a bit there. Sooner or later it won't happen and you will have a smooth reliable tune. If I recall correctly you are getting false knock that is killing your advance aren't you?
I wonder if you could get a feel for severity from the timing? Certainly pre-ignition ignition (knock before the spark fires) tells you something is going on which is different from knock 10 degrees after the event.
Interesting idea. Probably yes, but preignition is a pretty serious place to get to... if your boosted engine is there, it already has a hole in something.
What's the speed of sound in steel (alum for you losers with modern engines)? Could a sensor on each end of the block tell you where it happened? :-)
I doubt it. Density increase = speed increase from memory, so VERY fast :-)

Fred.
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!
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: Knock presence handling code discussion

Post by AbeFM »

Fred wrote:I'd like to subscribe to this, BUT, you are supposed to tune your engine!!! This is supposed to be a safety net for catching you when you fill her up with 83 "octane" and (etc)
Ok. Granted. I'm being lazy, though like when you;ve got something blocking your intercooler, or it's hotter out that you'd like, it would be nice to have a mild response.

Then again, that should be captured in the tuning of how things respond to increases in the IAT sensor! It'd be a nice adjustment to have maybe.
( pre-ignition ignition (knock before the spark fires) tells you something is going on which is different from knock)
Probably yes, but preignition is a pretty serious place to get to... if your boosted engine is there, it already has a hole in something.
Maybe, maybe not. But that would certainly justify pulling all sorts of spark out and adding some serious fuel. Maybe even running too rich to run for a bit, just to cool things off. Maybe save a valve?
What's the speed of sound in steel (alum for you losers with modern engines)? Could a sensor on each end of the block tell you where it happened? :-)
I doubt it. Density increase = speed increase from memory, so VERY fast :-)

Admin.
Yeah, I mean... That's reasonable. Just out of curiosity:

Aluminum 4877m/s 16000ft/s
Steel 6100 20000

Well, we're maybe 2 ft at most from the sensor, want to know within 6"?

Let's say worst case, steel for a 6" difference, the sound waves would hit 2e-5 or 25us apart. Well, this is something I'd want a DSP to look at, then it would be trivially obvious.

Of course, which cyl just fired is a better way to go.

Also:
1 m/s = 3.6 km/h = 196.85 ft/min = 3.28 ft/s = 2.237 mph
Speed of sound in normal air is 343 m/s. In water the speed is 1,433 m/s.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Knock presence handling code discussion

Post by Fred »

8InchesFlacid wrote:Then again, that should be captured in the tuning of how things respond to increases in the IAT sensor!
Precisely :-)

Only bad fuel should really get you doing this, and if you are good about using only a certain grade (my skyline never saw less than 93aki/98ron) you should never have a problem if your tune is realistic and good.

Fred.
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!
Post Reply