Knock detection

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Knock detection

Postby jsmcortina » Thu Jun 09, 2011 10:45 am

I was having a look at the existing knock detection code the other day and noticed something that seemed just plain wrong.

It appears that the code is checking the knock input pin every time around the mainloop (up to 2000 times per second) and if the pin is set then it increments the knock counter and retards the timing.
This doesn't seem right at all.
- a short input pulse could perhaps be missed
- one single long input pulse can be counted as thousands of knock events completely retarding the timing.

Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.

I've not (yet) used the knock control, so I don't know if this ties up with actual observation.

James

(NB. intentionally posted in MS2 dev then moved to MS3 dev)
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33984
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Knock detection

Postby Matt Cramer » Thu Jun 09, 2011 10:49 am

The MS1/Extra knock circuit is designed to send a 0.4 second pulse when it gets even the shortest knock signal. Now I see why it's so long.
Matt Cramer
Super MS/Extra'er
 
Posts: 13733
Joined: Thu Apr 16, 2009 8:08 pm

Re: Knock detection

Postby prof315 » Thu Jun 09, 2011 10:50 am

jsmcortina wrote:Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.

James

(NB. intentionally posted in MS2 dev then moved to MS3 dev)


I'm pretty sure that that is how the OEMs do it. I know GM does something like that on engines that have a knock sensor(s)

Jeff
Linfert Performance: Come run up front
92 Corrado 2.0L ABA and Borg Warner EFR 6258 on MS3Pro.
94 Ranger 2.3 Twin Plug on MS2
Support the developers!
prof315
Super MS/Extra'er
 
Posts: 2486
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: Knock detection

Postby elaw » Thu Jun 09, 2011 11:09 am

jsmcortina wrote:Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.

Of course only a heartbeat away from that would be something *extra* cool, which would be storing a separate knock-retard number per cylinder! :mrgreen:
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
User avatar
elaw
Super MS/Extra'er
 
Posts: 2877
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Knock detection

Postby bubba2533 » Thu Jun 09, 2011 11:18 am

elaw wrote:
jsmcortina wrote:Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.

Of course only a heartbeat away from that would be something *extra* cool, which would be storing a separate knock-retard number per cylinder! :mrgreen:


Individual cylinder knock detection! Now that's a feature.
97 Subaru Impreza 2.2L - MS3 w/ MS3/x
bubba2533
Experienced MS/Extra'er
 
Posts: 342
Joined: Wed Jan 28, 2009 6:12 pm

Re: Knock detection

Postby UnaClocker » Thu Jun 09, 2011 11:49 pm

Chrysler had it in 85.. We should be able to have it.. ;) I remember reading numerous reports about the knock sense never working right. Has this always been broken like this (in MS2 and now MS3)? It'll be great to have a system that works better. I've never bothered with it because I've never seen someone report real success with the thing, just a lot of reports of epic failure. The way you describe what the code would do sounds pretty close to what I remember people saying about the knock code.. It reports way too much knock..
Brian
'84 Dodge Rampage
User avatar
UnaClocker
Super MS/Extra'er
 
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: Knock detection

Postby jsmcortina » Fri Jun 10, 2011 4:43 am

UnaClocker wrote:The way you describe what the code would do sounds pretty close to what I remember people saying about the knock code.. It reports way too much knock..

I'd be interested to hear some first hand feedback on that.

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33984
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Knock detection

Postby Keithg » Fri Jun 10, 2011 4:51 am

UnaClocker wrote:Chrysler had it in 85.. We should be able to have it.. ;) I remember reading numerous reports about the knock sense never working right. Has this always been broken like this (in MS2 and now MS3)? It'll be great to have a system that works better. I've never bothered with it because I've never seen someone report real success with the thing, just a lot of reports of epic failure. The way you describe what the code would do sounds pretty close to what I remember people saying about the knock code.. It reports way too much knock..

The knock code seems to work well for me. I have been using it for 2 years, I think. First in MS2 and now in MS3. I use a Saab APC box for the knock sensor/conditioner and it gives me a ground when it sees knock. I used it to tweak my WOT fuel and spark. I have no complaints and it seems to be 'similar' to what the original system would report from Saab (before I modified it)

KeithG
Keithg
Super MS/Extra'er
 
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA

Re: Knock detection

Postby jsmcortina » Fri Jun 10, 2011 5:06 am

From what I saw in the code I was rather expecting a single knock input pulse to pull out nearly all of the timing in a very short period of time - do you see that ?

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33984
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Knock detection

Postby Keithg » Fri Jun 10, 2011 5:23 am

jsmcortina wrote:From what I saw in the code I was rather expecting a single knock input pulse to pull out nearly all of the timing in a very short period of time - do you see that ?

James

Hmmm. I will have to make some changes and log it to see what it is doing. It has been so long ago that I tuned it. I am running fuel and spark pretty conservatively, so as to not experience knock at this time. Also, I always run Premium fuel.

Keith
Keithg
Super MS/Extra'er
 
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA

Re: Knock detection

Postby Tjabo » Fri Jun 10, 2011 5:55 am

This would open up a whole new world of possibilities if we got it to work right/well. I'm paying attention! :shock:

And BTW, when messing with my "electronic det cans," I've found that the broadband detonation sensors give out a signal that is nice for the ears to distinguish knock, but only when the ambient noise level is relatively low. I.e. NOT when the open WG dump pipe is wailing...

Conversely, the Chrysler version "tuned" knock sensor is pretty much like a continuous unintelligible screech no matter what. Maybe there is a specific frequency produced when the a "knock frequency" event occurs, but not that I was able to find. I've got to admit though, I couldn't take it for long, so maybe I just didn't give it a good chance.

Thad
--'97 BMW 540i/6spd -- Single Front/Top Mount Turbo -- MS3+MS3X V3.0 Full Sequential
User avatar
Tjabo
Master MS/Extra'er
 
Posts: 795
Joined: Sat Nov 05, 2005 7:36 pm

Re: Knock detection

Postby davcol » Fri Jun 10, 2011 5:02 pm

jsmcortina wrote:From what I saw in the code I was rather expecting a single knock input pulse to pull out nearly all of the timing in a very short period of time - do you see that ?

James

thats exactly what i have been experiencing with my knock sensing system , the default setting was 10 degrees and upon the first knock recorded MS pull all 10 degrees at once because of that i have to lower the settings to 4 degrees inorder not to have a draggie feel from it.
i am not an expert but i don't feel that this is work right and because of that i have made a lot of complaint to viatrak saying that the unit i bought was too sensitve and it was pull too much timing all at once.
this would be a really break through if this was to be corrected. :yeah!:
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
davcol
Experienced MS/Extra'er
 
Posts: 160
Joined: Tue Dec 22, 2009 6:12 pm

Re: Knock detection

Postby Paul_VR6 » Sun Jun 12, 2011 10:36 am

I have experienced multiple "did not work well" with ms1 and ms2 both with knocksense as well as the "extra" circuit. I could never keep things from detecting what was mechanical noise. The false triggers always seemed to retard a lot as well, which made it pretty useless.

Multiple channel sensing, with software filters and windowing could make it worth trying again.
-Paul
1995 GTI VR6 MS3/V3
kptuned.com - Megasquirting the World! Megasquirt Sales, Service, Tuning and More!
Image
User avatar
Paul_VR6
Super MS/Extra'er
 
Posts: 875
Joined: Wed Apr 15, 2009 11:31 am
Location: Oxford, PA

Re: Knock detection

Postby a73camaro » Sun Jun 12, 2011 8:20 pm

The knock sensor that I designed worked OK, but there were some limitations.
MSII v3.0, Extra 3.0.3s
User avatar
a73camaro
Experienced MS/Extra'er
 
Posts: 231
Joined: Fri Oct 08, 2004 6:44 am
Location: Dillon, CO

Re: Knock detection

Postby davcol » Mon Jun 13, 2011 5:41 am

So will there be any improvement to this feature? i am hoping.

Why is that upon first knock all the max. timing is used and not increments of the set value in the table, i have to reduce the max. timing to 4 degrees.
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
davcol
Experienced MS/Extra'er
 
Posts: 160
Joined: Tue Dec 22, 2009 6:12 pm

Re: Knock detection

Postby jsmcortina » Mon Jun 13, 2011 5:59 am

davcol wrote:Why is that upon first knock all the max. timing is used and not increments of the set value in the table

For the reason I mentioned in the first post. The timing is reduced in steps, but it seems these steps are applied maybe one thousand times per second, so it appears that the timing is all taken out in one go.

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33984
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Knock detection

Postby Keithg » Mon Jun 13, 2011 6:55 am

James,

That may be what I experienced as well, I do not remember. I do not run 'on the edge' like that and added fuel to keep knock at bay. It sounds like an 'unintended' bug was added that did not take into account the number of times the loop runs. I can pull a bit of fuel from my map and test this out if you want a guinea pig.

Keith
Keithg
Super MS/Extra'er
 
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA

Re: Knock detection

Postby savagerocco » Tue Jun 28, 2011 9:47 pm

I noticed this as well, i attributed it to an improperly tuned sensor for my application. Once it was enabled, it pulled a lot of timing, even into negative numbers.
Brent Savage
life behind the zion curtain
90 audi RS2 20VTQ 6sp MS3, MSX COP and Sequential and now MAF
87 Scirocco 2.0 ABA 16v EIP tubular cast MSII COP
86 Audi 4K20VTQ MSII
90 Audi 90 sedan 3.6l DOHC V8TT (project car)
89 VW cabbie (bitch basket) 2.0 ABA Turbo MSII
savagerocco
Master MS/Extra'er
 
Posts: 756
Joined: Thu Oct 20, 2005 11:09 am
Location: Ogden UT USA

Re: Knock detection

Postby gurov » Wed Jun 29, 2011 1:53 am

one will have to pry my j&s boxes from my cold dead hands.

duplication of THAT would save a boatload of money per install.
2014 BMW X1 35i MSport - single turbo N55 - stock!
2012 BMW X3 35i MSport - single turbo N55 - stock! (GONE)
2004 BMW 325xi Turbo MS3/X M54B25 j&s slc_oem
1994 Toyota Supra Twin Turbo - AEM EMS v2 - 2JZ-GTE slc_oem
2004 Nissan SE-R SpecV Turbo - MS3/X QR25DE j&s slc_oem (SOLD!)
gurov
Super MS/Extra'er
 
Posts: 1052
Joined: Sun Jun 01, 2008 11:54 pm

Re: Knock detection

Postby davcol » Wed Jun 29, 2011 3:55 am

So will there any fix for this feature in the new release that as been working on? hoping :D
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
davcol
Experienced MS/Extra'er
 
Posts: 160
Joined: Tue Dec 22, 2009 6:12 pm

Next

Return to MS3 Development

Who is online

Users browsing this forum: No registered users and 1 guest