Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   Knock-window...it is time (https://www.miataturbo.net/megasquirt-18/knock-window-time-60243/)

hustler 09-06-2011 12:16 AM

Knock-window...it is time
 
Will this ever happen?

richyvrlimited 09-06-2011 06:52 AM

In MSIII yes 100% definitely, I think it's scheduled for the code 2.xx release on MSIII. The coders are writing a new clock angle algorithm thingy (way over my head) which will allow this to happen.

in MS1/2 no never ever ever.

curly 09-06-2011 07:00 AM

I believe it has something to do with your sig quote.

Ben 09-06-2011 08:25 AM

MS3 alpha code has some awesome knock stuff going on. When Ken gets his angle clock code done, it should get even better.

Savington 09-06-2011 10:49 AM



How about 2D rpm filtering and user-adjustable frequency filtering?

Faeflora 09-06-2011 11:10 AM

What is knock window?

Ben 09-06-2011 11:17 AM


Originally Posted by Savington (Post 768079)

How about 2D rpm filtering

There is already a sensitivity vs RPM function.


and user-adjustable frequency filtering?
That would be a hardware function of the knock conditioner. Keep in mind current MegaSquirt hardware does not include an onboard conditioner--You have to use an external box such as KnockSenseMS or a GM ESC module.


Originally Posted by Faeflora (Post 768088)
What is knock window?

Looking for knock only at specific crank angles when it can occur. It helps to eliminate false knock signals. It can also be used to determine exactly which cylinder is knocking.

Reverant 09-06-2011 03:03 PM


Originally Posted by hustler (Post 767986)
Will this ever happen?

I plan to offer this on my next generation of Megasquirt II ECUs.


Originally Posted by richyvrlimited (Post 768041)
in MS1/2 no never ever ever.

Unless of course, I have say in this. ;)


Originally Posted by Savington (Post 768079)
How about 2D rpm filtering and user-adjustable frequency filtering?

Most definitely. The frequency will be fixed based on whether this is a 1.6 or a 1.8, and there weill user-adjustable RPM filtering.

richyvrlimited 09-06-2011 05:06 PM


Originally Posted by Reverant (Post 768188)
I plan to offer this on my next generation of Megasquirt II ECUs.



Unless of course, I have say in this. ;)



Most definitely. The frequency will be fixed based on whether this is a 1.6 or a 1.8, and there weill user-adjustable RPM filtering.

Just

:bowdown: :bowdown:


That would be a hardware function of the knock conditioner. Keep in mind current MegaSquirt hardware does not include an onboard conditioner--You have to use an external box such as KnockSenseMS or a GM ESC module.
Now that's disappointing. I was under the assumption one of the spare analogue MS3X inputs would be able to be used to analyse the knock signal.

Relying on a KnockSenseMS is pointless, it doesn't rpm filter so you just get noise induced knock BTDT. No amount of MS trickery will stop a poor input signal.

Shame.

Faeflora 09-06-2011 06:31 PM


Originally Posted by Ben (Post 768092)
Looking for knock only at specific crank angles when it can occur. It helps to eliminate false knock signals. It can also be used to determine exactly which cylinder is knocking.

That's pretty darn cool. Does this exist in any EMS's out there, factory or aftermarket?

JasonC SBB 09-06-2011 07:48 PM

6.5 kHz bandpass filter is appropriate for the miata. And then said knock window.

I have a schematic for a simple bandpass filter somewhere. One could maybe add it on board a MS.

jtothawhat 09-06-2011 08:02 PM

EDIT: Realized this is for MS

ProEFI has this...

Techsalvager 09-06-2011 10:21 PM


Originally Posted by Faeflora (Post 768273)
That's pretty darn cool. Does this exist in any EMS's out there, factory or aftermarket?

yeah a good amount of the more expensive EMS solutions have support for knock windowing.

hustler 09-06-2011 11:26 PM

AEM has it and AEM is fairly inexpensive.

Techsalvager 09-06-2011 11:31 PM


Originally Posted by hustler (Post 768374)
AEM has it and AEM is fairly inexpensive.

I meant more than megasquirt costs, which I paid about 300 after I did mine up

I use a J&S safeguard on my miata for knock detection and retarding per cylinder
Got it for a good price so I jumped on it.

miatauser884 09-06-2011 11:50 PM

This thread has made my upgrade to MS3 worth it. Thank You!

hustler 09-07-2011 12:05 AM

1 Attachment(s)
For people who don't know how knock-window works:
https://www.miataturbo.net/attachmen...ine=1315368354

Matt Cramer 09-07-2011 11:08 AM


Originally Posted by richyvrlimited (Post 768240)
Now that's disappointing. I was under the assumption one of the spare analogue MS3X inputs would be able to be used to analyse the knock signal.

Relying on a KnockSenseMS is pointless, it doesn't rpm filter so you just get noise induced knock BTDT. No amount of MS trickery will stop a poor input signal.

Shame.

An analog input reading the knock signal won't work. It doesn't have enough sampling speed to use an analog input for knock processing.

The knock sensing will use some more sophisticated hardware - I wouldn't count out user specified frequency ranges or other features.

JasonC SBB 09-07-2011 12:33 PM

The windowing not only ID's which cylinder is knocking, it filters out noise that occurs outside said window.

Faeflora 09-07-2011 02:30 PM


Originally Posted by Matt Cramer (Post 768514)
An analog input reading the knock signal won't work. It doesn't have enough sampling speed to use an analog input for knock processing.

The knock sensing will use some more sophisticated hardware - I wouldn't count out user specified frequency ranges or other features.


? So how do other EMS's analyze the signal? Does the analog voltage signal go through an A/D converter and then through a DSP chip before feeding into a closed loop "burned in" timing trim?

I'm not trying to derail the discussion from MS; I'm just curious about how this stuff works.

NiklasFalk 09-07-2011 03:32 PM


Originally Posted by JasonC SBB (Post 768579)
The windowing not only ID's which cylinder is knocking, it filters out noise that occurs outside said window.

That "filter" could be called infite I guess :).
Why bother listening for knock when there can't be any.
So it only listen for knock in the small time windows, otherwise it just don't care (smart way to deal with noise).

Would it work with less exact crank angle sensors (e.g. OEM) or would it require a 36 tooth wheel or similar?

Btw have anyone tried Fourier Transform analysis of knock (as a chemist I'm quite familiar with NMR, which in principle is analysis of the squeel molecules sends out after you kick them)?

JasonC SBB 09-07-2011 03:34 PM

No, it just goes like this:

Knock signal -> bandpass -> Amplitude Detector -> windowing -> software

Up until the windowing, it's just like an AM radio, which was invented, oh, like 100 years ago. I can design one using a single 8-pin op-amp package. The windowing will be triggered by the software and can use a "CMOS switch".

Techsalvager 09-07-2011 04:21 PM

Here is another solution for anyone that wants knock windowing

http://cgi.ebay.com/ebaymotors/Knock...item3a69ed9532

JohnP 09-08-2011 06:31 AM

SafeGuard with individual cylinder knock retard was released in 1991. Features included constant energy dwell control with internal igniter and adjustable rev limit.

The detector employed a knock window, but this feature was not disclosed until about 2003.

The processor was an HC11, running at 2MHz bus speed. All the code had to fit in the internal 2k EEPROM.

The detection and thresholding algorithm is elegant, wish I could show it.

I was doing a spark energy test earlier this year, and fired up one of the first gen units, circa 1995. It made 90 mj firing a plug, 109 mj dumping the coil into a high voltage zener string:

http://www.youtube.com/user/strokema.../6/wHtI1FOBKJ4

damir130 09-08-2011 06:46 AM

Fuck windowed knock detection. We need ion sensing capability. Why has that never progressed?

Reverant 09-08-2011 07:04 AM

Because those that have the technology try to keep it for themselves? On the other hand, the MS-II had things like nitrous control, but no A/C control. The reasoning? Nitrous is used by drag racers, who help get the name of the ECU out more than the average Joe and his POS daily driver that has A/C on it.

damir130 09-08-2011 08:49 AM

Here you go:
http://vvnet.fi/ville/ion/DIY-Ion-Sensing-2.pdf

Could you take a look and see where the really big hurdles are?
Just getting things to the point where we can start measuring ionisation profiles with a small community of MS users could be enough to kick things off. Dunno how realistic that is, but auto-tune for spark and fuel based on current conditions would be nice.

miatauser884 09-08-2011 10:37 AM


Originally Posted by damir130 (Post 768908)
Here you go:
http://vvnet.fi/ville/ion/DIY-Ion-Sensing-2.pdf

Could you take a look and see where the really big hurdles are?
Just getting things to the point where we can start measuring ionisation profiles with a small community of MS users could be enough to kick things off. Dunno how realistic that is, but auto-tune for spark and fuel based on current conditions would be nice.

or AMAZING!

Is the idea that you used the wideband, the knock window,a dn the theoretical point of diminishing return to autotune spark? It sounds liek the knock detection is the most complicated part. There seemed to be plenty of theory in one of Hustler's threads about tuning spark and where the point of diminishing return is located in the spark table.

y8s 09-08-2011 10:41 AM


Originally Posted by JasonC SBB (Post 768670)
No, it just goes like this:

Knock signal -> bandpass -> Amplitude Detector -> windowing -> software

Up until the windowing, it's just like an AM radio, which was invented, oh, like 100 years ago. I can design one using a single 8-pin op-amp package. The windowing will be triggered by the software and can use a "CMOS switch".

I'll donate to a megasquirt 3 compatible PCB design.

I've got easy access to 12V, regulated 5V, ground, and whatever comes from the factory harness connected to the sensor inside the MS3 box. keep the overall height to under 3/8" and square footage to less than an inch and a quarter square and it should fit easily.

Input would be the sensor itself, output would be an analog signal strong enough to clearly distinguish knock from noise and place the threshold line appropriately. I think it's 0-5V but I'd have to check with the dev dudes. Ken tells me the analog portion may not even be operational yet.

Windowing is all done in software.

Whattaya say? :)

damir130 09-08-2011 10:45 AM

The idea is that you measure when peak cylinder pressure occurs and you tweak ignition timing so that the cylinder pressure does the maximum amount of work during a cycle. The result would be more torque, which is what look for while tuning spark on a dyno.

The knock sensing capability you get more or less for free as the whole ionisation profile goes to hell during knock and is easily detected.

I dunno how accurate you can get this stuff, so maybe you would still need to calibrate on a dyno. But perhaps tuning/correlation could be done quicker, or it could be used to monitor and correct for changes in circumstances: fuel burn rate (octane, temp, additives), humidity etc.

Saab was running ION sense a long time ago. BMW is using it on most cars in their new range. Maybe it is to far of a stretch if even windowed knock detection is beyond our capabilities.

miatauser884 09-08-2011 10:46 AM


Originally Posted by y8s (Post 768961)
I'll donate to a megasquirt 3 compatible PCB design.

I've got easy access to 12V, regulated 5V, ground, and whatever comes from the factory harness connected to the sensor inside the MS3 box. keep the overall height to under 3/8" and square footage to less than an inch and a quarter square and it should fit easily.

Input would be the sensor itself, output would be an analog signal strong enough to clearly distinguish knock from noise and place the threshold line appropriately. I think it's 0-5V but I'd have to check with the dev dudes. Ken tells me the analog portion may not even be operational yet.

Windowing is all done in software.

Whattaya say? :)

I would also donate money to this project. Brain is working on my MS3x at the moment. If this is something that could be implemented quickly, maybe he would be willing to use my MS3x. That would eliminate the need to buy a whole MS3 test mule.

The downside is that you would be relying on my inexperience and I would need some hand holding for testing. My wallet is open to give donation.

miatauser884 09-08-2011 11:08 AM


Originally Posted by damir130 (Post 768963)
The idea is that you measure when peak cylinder pressure occurs and you tweak ignition timing so that the cylinder pressure does the maximum amount of work during a cycle. The result would be more torque, which is what look for while tuning spark on a dyno.

The knock sensing capability you get more or less for free as the whole ionisation profile goes to hell during knock and is easily detected.

I dunno how accurate you can get this stuff, so maybe you would still need to calibrate on a dyno. But perhaps tuning/correlation could be done quicker, or it could be used to monitor and correct for changes in circumstances: fuel burn rate (octane, temp, additives), humidity etc.

Saab was running ION sense a long time ago. BMW is using it on most cars in their new range. Maybe it is to far of a stretch if even windowed knock detection is beyond our capabilities.

Even if it didn't end up being the end all be all of spark tuning. It would be nice to have the autotune feature with a pair of electronic det cans as back up. Spark is increased until knock is detected. Then based upon a little theory the spark is retarded by a predetermined number of degrees. Those that want to be more aggressive can do as they wish.

miatauser884 09-08-2011 11:16 AM

I'm not sure if this is possible, or detectable. BUT here goes. If it is based on peak cylinder , is the MAP sensor sensitive enough to notice the change in pressure if the engine is held constant but the timing is being changed? So if I were able to get on a flat piece of highway in the gear of my choosing to keep the car at a steady rpm and then the timing were adjusted, would you see a difference in map signal?

Where I am headed with this: Could you then have a test area in tuner studio that allowed you to like your pulsewidth for a predetermined number of seconds. Basically a tunerstudio cruise control. Once activated tunerstudio listens for knock while adjusting the timing.

Reverant 09-08-2011 11:42 AM

How would the MAP sensor be able to see the pressure inside the cylinder, since the cylinder is sealed and any pressure is vented through the exhaust valve first?

miatauser884 09-08-2011 11:49 AM

I was wondering if the ouput through the turbo would be slightly increased. Higher cylinder pressure should equal higher exhaust pressure, which powers turbo, which plumbs into intake.

JasonC SBB 09-08-2011 11:57 AM

No, when spark timing is less retarded from optimum, cylinder pressures go up and then less energy is in the exhaust. Turbine Inlet Pressure (TIP), goes down. And no, there are too many other variables affecting TIP more, to be useful for spark timing tuning, even in an n/a car.

JasonC SBB 09-08-2011 12:07 PM


Originally Posted by djp0623 (Post 768975)
Even if it didn't end up being the end all be all of spark tuning. It would be nice to have the autotune feature with a pair of electronic det cans as back up. Spark is increased until knock is detected.

Fail because you can have too much timing and NO knock.

The one and only ECU that had a "best timing finder" feature is the Adaptronic, and mysteriously, nobody was interested in the feature. Such that they removed it in later revs:

https://www.miataturbo.net/adaptronic-63/anyone-play-ignition-auto-tuning-yet-42882/
http://adaptronic.com.au/forum/index...ic=252.msg7487

The way it does it, is it adjusts the timing several times per second, then detects if the acceleration improved or not. No mean feat.

JasonC SBB 09-08-2011 12:09 PM


Originally Posted by y8s (Post 768961)
I'll donate to a megasquirt 3 compatible PCB design.

I've got easy access to 12V, regulated 5V, ground, and whatever comes from the factory harness connected to the sensor inside the MS3 box. keep the overall height to under 3/8" and square footage to less than an inch and a quarter square and it should fit easily.

Input would be the sensor itself, output would be an analog signal strong enough to clearly distinguish knock from noise and place the threshold line appropriately. I think it's 0-5V but I'd have to check with the dev dudes. Ken tells me the analog portion may not even be operational yet.

Windowing is all done in software.

Whattaya say? :)

Someone else has to do the PCB layout because I don't like doing it.

y8s 09-08-2011 12:26 PM

put it in an eagle pcb compatible format and i'll do it... or maybe altium and I'll coax a coworker into doing it.

miatauser884 09-08-2011 02:05 PM


Originally Posted by JasonC SBB (Post 769000)
Fail because you can have too much timing and NO knock.

The one and only ECU that had a "best timing finder" feature is the Adaptronic, and mysteriously, nobody was interested in the feature. Such that they removed it in later revs:

https://www.miataturbo.net/showthread.php?t=42882
http://adaptronic.com.au/forum/index...ic=252.msg7487

The way it does it, is it adjusts the timing several times per second, then detects if the acceleration improved or not. No mean feat.

That is where retarding the timing based on where the theoretical optimum timing is based on knock. If research suggested that knock occurred 5 degrees past the optimal timing configuration, then retard timing by at least 5 degrees after knock is detected.

I know I should probably stay out of this conversation since my expertise is zero, but I'm learning something.

Is one of the GPS transponders that people are using for lap timers sensitive enough to use it for calcing timing based on acceleration? Probably not. It seems like a speed sensor used while locking in a fixed pulsewidth would work. Question is, where do you mount a generic speed sensor.

Matt Cramer 09-09-2011 09:47 AM


Originally Posted by djp0623 (Post 769058)
That is where retarding the timing based on where the theoretical optimum timing is based on knock. If research suggested that knock occurred 5 degrees past the optimal timing configuration, then retard timing by at least 5 degrees after knock is detected.

Unfortunately, research makes it clear that there's no fixed angle between optimal timing and the knock threshold. Some cars (Subarus are Exhibit A) have the MBT timing ahead of the knock threshold. Some combination could have MBT 20 degrees or more behind the knock threshold - I suspect a NA Miata running on methanol would fall into that category, for example.

miatauser884 09-09-2011 10:03 AM


Originally Posted by Matt Cramer (Post 769407)
Unfortunately, research makes it clear that there's no fixed angle between optimal timing and the knock threshold. Some cars (Subarus are Exhibit A) have the MBT timing ahead of the knock threshold. Some combination could have MBT 20 degrees or more behind the knock threshold - I suspect a NA Miata running on methanol would fall into that category, for example.

That's unfortunate. So is a speed sensor method the best solution?

JohnP 09-09-2011 10:11 AM

Yes, a knock window is easier to do in software. The first SafeGuards were a combination of analog and discrete digital, made from '88 to '91. It didn't do individual cylinder control, but it did have a knock window. The knock window was controlled by a PLL clock synchronized to the ignition trigger. Two counter chips set the window start and end points. Dip switches on the front set the counters for 4, 6, or 8 cylinder.

I love doing layouts, but they take a fair amount of time. Good layouts can be works of art. I've found that if they don't look pretty, there's probably a better way to do it, so I start over.

This is part of the Interceptor layout, showing the Altera CPLD chip and the 9S12 processor. The CPLD contains I/O, trigger detection, and retard logic for eight channels. A single line to and from the processor is all that's required to individually control eight ignition channels.

http://www.jandssafeguard.com/layout.png

richyvrlimited 09-09-2011 10:23 AM

John, how come you know so much about J&S? Is it your business? ex Employee?

just curious!

JohnP 09-09-2011 10:31 AM

Coming to you from World Headquarters.

richyvrlimited 09-09-2011 10:40 AM

http://www.welovewhq.com/

http://www.viewnewcastle.co.uk/clubs...nfo-47177.html

:confused:

;)

JohnP 09-09-2011 10:50 AM

Not THAT whq. Looks like something from the Great Whole Earth Catalog (pre-internet era).

Matt Cramer 09-09-2011 02:50 PM

Thanks for chiming in, John!

So current the SafeGuard uses a similar processor to the MS2? Interesting.

Ben and I have been testing some of the future MS knock detection stuff on the dyno today. We're not going to sacrifice a Miata engine for it, but we've got an old beater Sentra sitting around to try this out on.

JohnP 09-09-2011 03:40 PM

Change is hard. I finally made the transition from HC11 to 9S12 in 2007.

JasonC SBB 09-09-2011 04:00 PM


Originally Posted by djp0623 (Post 769414)
That's unfortunate. So is a speed sensor method the best solution?

Adaptronic method seems best outside of a dyno.

miatauser884 09-09-2011 04:11 PM


Originally Posted by JasonC SBB (Post 769558)
Adaptronic method seems best outside of a dyno.

Does it combine it with some sort of cruise control so that any observed acceleration/deceleration is due to the timing adjustment? Obviously we would be assuming this would be done on a level road. Mounting an optical sensor system to one wheel doesn't seem like it would be that difficult. Add an input where you can lock the pulsewidth of the injectors. Pick a long level road, or inclined for boost cells. The boost cells seem like they would pose the most trouble, but they are the most important in my eyes.

I think the optical speed sensor idea might fall apart while you are under heavy acceleration to begin with trying to get into boost. How could one tell if the acceleration was due to timing or accelerator pedal movement.

Ok, so here is an idea.

The software would require you to do record multiple acceleration runs. This would log data that related TPS to acceleration through different rpm points. Done on the same road as the tune and you might be able to pinpoint the data changes due to the timing adjustment alone. This would require the user to treat it like an absolute calibration, meaning Temp, pressure, road used, etc all need to be monitored an held somewhat constant between the baseline data and the adjustment data.

JasonC SBB 09-09-2011 07:06 PM

No it looks at the RPM. It dithers the timing continuously, rather quickly (several times per second) at some frequency. It looks for an FM signal with the same frequency in the RPM. The sign and magnitude of that signal tells you if there was an increase in torque from the increase in timing.

JasonC SBB 10-07-2011 11:59 AM

Re: KNOCK WINDOWING

I just had a realization.

The time windowing should be BEFORE the filter.

The reason is that a bandpass filter rings like bell when stimulated by a noise with in-band frequency components. And the reason knock is hard to detect is that engine noise has some in-band components. Therefore to maximize discrimination, you don’t want engine noise reaching the filter outside of the crank-angle window where knock isn’t possible.

If the ECU had an output that simply went high when crank angle is “in window”, that signal could be used by the analog circuitry.

NiklasFalk 10-07-2011 04:03 PM


Originally Posted by JasonC SBB (Post 780792)
If the ECU had an output that simply went high when crank angle is “in window”, that signal could be used by the analog circuitry.

Uninformed question;
Could one of the cam wheels be modded so a hall sensor could go high/low during the knock window (if a section of the 720 degree cycle would be good enough, i.e. fix window in relation to rpm/load/TPS etc).
That way you could window the knock signal at the source.

Software is still needed to figure out what to do when,but even with simple knock check, you could stop listening during the times when there "cannot" be knock.

But uninformed, as I said.:)

JasonC SBB 10-07-2011 05:36 PM

A spare cam wheel? If you could make your own window, yea.

Reverant could add this functionality, if we could find out what crank angle range knock is valid. Obviously it has to be <90*, else it would be meaningless, unless one were doing per-cylinder knock detection and spark adjustment.

Martin Y 10-09-2011 07:05 AM


Originally Posted by JasonC SBB (Post 769000)
The one and only ECU that had a "best timing finder" feature is the Adaptronic, and mysteriously, nobody was interested in the feature. Such that they removed it in later revs...

They ditched it? I'm amazed. That was the one really cool feature that made me regret not buying an Adaptronic.

JasonC SBB 10-09-2011 12:19 PM

Here's an update:

http://adaptronic.com.au/forum/index.php?topic=252.15


All times are GMT -4. The time now is 09:14 PM.


© 2024 MH Sub I, LLC dba Internet Brands