Idea to improve Knock Retard

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Post Reply
ShirtUser
Master MS/Extra'er
Posts: 511
Joined: Wed Jun 29, 2022 4:38 am

Idea to improve Knock Retard

Post by ShirtUser »

The knock sensing in MS3 is really good once everything is setup properly.

When knock monitoring is enabled, knock events have different intensities and require different levels of retard in relation to how intense the knock event is. Which I can corroborate with lots of logs.

Right now, when a knock event is detected (signal level passes the threshold), an initial "Coarse Step" retard is applied incrementally until knock first stops, and subsequent knock events have a different "Fine Step" retard step applied until knock stops again. Both of which are definable. And will eventually result in the knock going away.

Instead, what if the "Coarse Step" it was a "Maximum Step" and the retard applied was a percentage of how far above the threshold the knock event was? Correctly configured, you could eliminate knock with a single event by applying the correct retard. You could change the "Fine Step" to "Minimum Step" so that even if things are configured poorly, you know that it will retard by a minimum amount for each event.

The retard amount could be a simple calculation: (MAX Step) * (Knock Signal - Knock Threshold) / (100 - Knock Threshold)

And if that result is less than the Minimum Step, then just apply the minimum step retard. End users could set the "Minimum/Maximum Step" fields to the same value if they want to effectively disable the new functionality. They would lose the "Fine Step" functionality, but that's probably an edge case.

So a "light" knock event, would get less retard applied, but a severe knock event would get much more applied.

For example, if there is a strong knock event with a signal of 70, and the current threshold is 40, and the maximum step is 10: (10) * (70 - 40) / (100 - 40) = 5 degrees of initial retard



I think that this would be a significant improvement in the knock logic because it could stop knock immediately, instead of incrementally, without using excessive retard when it's not needed. Both protecting the engine and giving only the retard needed, so there isn't an unnecessary loss of power.

What do you think?
lowkeyturbo
MS/Extra Newbie
Posts: 14
Joined: Tue Dec 21, 2021 6:34 am

Re: Idea to improve Knock Retard

Post by lowkeyturbo »

I am with this, but I would much rather it be in steps vs knock intensity I.e. knock level above threshold.

For example if threshold is 65 and knock level is 85 and knock intensity steps are 10 then you would get "level 2" knock retard which is the knock retard step size *2.
Ted75zcar
Experienced MS/Extra'er
Posts: 181
Joined: Fri Dec 23, 2016 7:21 pm

Re: Idea to improve Knock Retard

Post by Ted75zcar »

Related/unrelated... I will toss ideas into the mix

Individual threshold curves (per cylinder). Average bias profiles vary between cylinders, but I have found them to be repeatable and predictable. The one-curve-fits-all forces a compromise sometimes where normal bias for one cylinder exceeds the knock threshold of another.

Include load as an independent in a threshold table vs curve

Make gain a per-cylinder curve vs rpm (as opposed to a scalar)

Not intending to jack, just really appreciate this topic!
ShirtUser
Master MS/Extra'er
Posts: 511
Joined: Wed Jun 29, 2022 4:38 am

Re: Idea to improve Knock Retard

Post by ShirtUser »

I think a review and revision of knock control is warranted, in all areas.

The first question in my mind, though, is are the developers even reading this? And, if they are, is this something they would consider working on? And, if so, to what extent?

Because, without those answers, we're just whistling in the wind.
Post Reply