Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43

Thread: THE Flash ECU knock sensor thread

  1. #1
    I lack color... verified

    Join Date
    Sep 2010
    Owner Since
    Aug 1998

    Posts
    3,589
    Thanks
    104
    Thanked 498 Times in 241 Posts

    THE Flash ECU knock sensor thread

    Put this off for too long. Mainly because I haven't been able to come up with a way to explain it in simple terms. Also because I didn't feel it was going to be necessary for anyone to really need to modify the knock sum calculation tables. Couldn't have been more wrong about that... We all know what knock is so I'm not going to get into too much detail with that. The juicy details everyone wants to know is what does the code do with the signals sent in by the knock sensor. This isn't easy nor straight forward so you might have to read it a few times before it makes sense.

    The code determines an occurrence of knock by using a statistical process and something called a Fast Fourier Transform process. The code learns an average noise value during a stable condition of the engine. This average noise value is used for determining ignition timing when the engine is in a transitional condition. Anything above the average noise level is considered real knock and the code mediates the timing to reduce a knock when the engine is in the transitional condition. To a point...

    If you followed the instructions properly for setting up my EVOScan XML, one of the loggable parameters are knock voltage. I've always used this to monitor the raw sensor voltage and look for sharp/sudden spikes in the noise level to make a judgement call if the noise is real knock or not. If you've ever graphed this, there's a lot of info you can take away from it:



    See that sudden dip in voltage around the 29 mark? The code switches an output port that brings the knock sensor signal thru a capacitor on the ECU board before it reaches the CPU. This switch is triggered by the average noise level reaching about 80. A few of you might remember a discussion about swapping in the correct knock circuitry hardware onto the Clone ECUs? This is what that circuitry does. Note: SOHC 3/S don't come with this on their ECUs so this is why you can't run that ECU in your car.

    The advantage to this is you can filter out all the low level noises while amplifying the high level ones to get more resolution out of the base signal. To my knowledge no standalone does this.

    Quick side track: Something interesting about this I've observed is when swapping out the stock crank pulley for one of those light weight non-dampened ones, there's an increase in the raw knock voltage (changing nothing else with the tune or setup with the motor). Swapping the stock pulley back then reduced the noise level. Just something to be aware of if you're considering running one. Be willing to bet an unbalanced flywheel would also resonate and get detected by by the knock sensor. ...or bad motor mounts... Anything that makes a sound.

    Real knock will always be a sharp and sudden spike in the noise level of the motor. Without strapping the car on a real dyno and observing torque flattening off or some real time compression ratio monitoring inside each cylinder, there's no real way to determine if the motor is pinging. It's all a judgment call observing the raw knock voltage.

    From a code stand point, there a bit more going on. Let's start with what exactly is knock sum?

    We know the higher the number, the more dangerous the knock. Exactly what is it though?? Knock sum is nothing more than the number of ignition noise counts the engine noise level peaked above the limit. Basically, if you see a knock sum of 1, that means the engine got "noisier" than it should have for 1 cycle count. Sum of 15 means it was "nosier" for 15 counts.

    BTW if you're wondering, the max number of Knock Sum counts the code will care about is 28 meaning the highest number you can log (assuming no garbage packets) for knock sum is 28.

    So the question then becomes, how is the average engine noise calculated?

    Let's start with the Knock sensor voltage. It ranges from 0-5V which translates between 0 and 255 in ECU language. This voltage after it passes thru or around the signal capacitor comes into the chip. The code does some basic min and max checking with this signal then gives it to a memory address the EVO guys refer to as KnockFilterADC. This is MUT request 6A which isn't in my public released EVOScan XML but if you wish to log it, you can (leave the scaling as X). It pretty much matches the knock voltage signals.

    One request you might want to add is one called Knock Variation or KnockVar for short. This is simply the calculated average engine noise. Open up EVOScan, right click anywhere in the while space and select Edit Data Items. This will popup. Click Add New Item and fill out the box like I have shown here:



    Next the code calculates a number the EVO guys refer to as Knock Base (which is logable in my EVOScan file). A better name for this number would be Noise or Knock Limit. Any time the KnockFilterADC (or knock sensor voltage) cross over this line, it's considered real knock and is added to the Knock Sum.

    Add this code to your Chrome V2 XML (go ahead and delete most of the other "Knock" tables except the knock CEL and Octane ones). Future versions of Chrome will come with the XML setup with these.

    Code:
    	<table name="Knock Signal Amplifier" category="Knock" address="10a46" type="2D" level="2" scaling="uint16">
    
    		<table name="X" type="Static Y Axis" elements="4">
    
    			<data>Multiplier</data>
    
    			<data>Triple Gain</data>
    
    			<data>Single Gain</data>
    
    			<data>MAX Knock Sum Count</data>
    
    		</table>
    
    	</table>
    
    	<table name="Background Noise Switch Points" category="Knock" address="10a62" type="2D" level="4" scaling="RPM31_16bit">
    		<table name="RPM" type="Static Y Axis" elements="2">
    			<data>Triple Gain -> Single Gain</data>
    			<data>Single Gain -> Triple Gain</data>
    		</table>
    	</table>
    
    	<table name="Knock Sensitivity RPM Switch" category="Knock" address="10a3a" type="2D" level="4" scaling="RPM31_16bit">
    		<table type="Static Y Axis" elements="1">
    			<data>Knock Sums below this RPM are disregaurded.</data>
    		</table>
    	</table>
    
    	<table name="Knock Sensitivity Load Switch" category="Knock" address="10a38" type="2D" level="4" scaling="Load8_16bit">
    		<table type="Static Y Axis" elements="1">
    			<data>Load switch point between the Low and High Knock Sensitivity Multiplier</data>
    		</table>
    	</table>
    
    	<table name="Knock Sensitivity" category="Knock" address="10a3c" type="2D" level="4" scaling="uint16">
    		<table name="Knock Sensitivity" type="Static Y Axis" elements="2">
    			<data>Background Noise High Load Multiplier</data>
    			<data>Background Noise Low Load Multiplier</data>
    		</table>
    	</table>
    
    	<table name="Sensor Fault Knock Sum" category="Knock" address="10a58" type="2D" level="4" scaling="uint16">
    		<table name="Knock Sum" type="Static Y Axis" elements="2">
    			<data>Knock Sum High Load</data>
    			<data>Knock Sum Low Load</data>
    		</table>
    	</table>
    If you did it right, this should be what you see:

    Last edited by Greg E; 04-05-2014 at 09:13 PM.

    2014 Exomotive Exocet - #101 "shocker yellow" - 1.8L 5-speed 3.9 torsen FMII powered
    Read more: http://mevowners.proboards.com/threa.../greg-pa-build

    99 Solano Black VR4 - #16 of 287 - ground up restoration - sold
    98 Pearl White VR4 #54 of 231 - 12.84@105mph - 93 Octane 12.50@107mph - 100 Octane with Chromed ECU - sold
    99 Pearl White VR4 #108 of 287 - 3RD place stock car class ECG 11 - Sold
    98 Black VR4: 100% stock - totalled by an Illegal 2-12-08
    95 White Stealth TT - 11.852 @ 118.25 - sold
    95 SSG Stealth TT - 11.981 @ 115.81mph - sold

    "I don't actually work on cars, I just talk about them on the internet."

  2. The Following 8 Users Say Thank You to Greg E For This Useful Post:


  3. #2
    I lack color... verified

    Join Date
    Sep 2010
    Owner Since
    Aug 1998

    Posts
    3,589
    Thanks
    104
    Thanked 498 Times in 241 Posts
    KnockVar (Average engine noise) is simply calculated from taking the peaks and valleys and dividing them by each other. The math behind it isn't anything important. After this is calculated, then we can determine the KnockBase (noise limit).

    This is how the math works out for KnockBase (Noise limit). Open up the new "Knock Signal Amplifier table".

    KnockBase = (Multiplier * KnockVar / 8) + Single Gain or Triple Gain

    In other words (21 * KnockVar / 8) + 3 or 6 = Noise Limit

    The trigger for the gain adder is a simple RPM switch point shown in the "Background Noise Switch points".

    What's interesting is our 4 cylinder counterparts (EVO, DSM...) all have a varying Multiplier and Gain based on RPM. My best guess as to why is because maybe they have balance shafts which cause a noise that varies with RPM so those tables were added. So far, I've seen no reason to add that to our code but it's easy enough to do.

    Here's the same log with the knock base value added in.



    I'll post another log soon with KnockVar factored in so you can do the math to see how it all ties together.

    Last thing to go over is the actual math for calculating knock sum. That's where the "Knock Sensitivity" table comes in. Note there are 2 multiplier values in there. Engine load determines which one is used. Simply put, this number determines how much the code cares that the engine noise has gone over the limit.

    KnockSum = (KnockSensitivityMultipier * (Knockfiltadc - knockbase) / (knockbase * 8)) + 1 (with 28 being the max number the code will allow)

    My PC has been acting up all week. I'm going to save this here for now and pick it back up when I get these issues sorted out. Being forced to retype this thread over and over has been more than frustrating.
    Last edited by Greg E; 04-05-2014 at 09:15 PM.

  4. #3
    I lack color... verified

    Join Date
    Sep 2010
    Owner Since
    Aug 1998

    Posts
    3,589
    Thanks
    104
    Thanked 498 Times in 241 Posts
    Saved for more space in the future

  5. #4
    Forum User Not Verified

    Join Date
    Sep 2010
    Owner Since
    2004

    Location
    Cape Girardeau
    Posts
    4,791
    Thanks
    365
    Thanked 296 Times in 214 Posts
    subscribed

    It is interesting I picked up a couple of counts right after that load switchover point, 80-90 load is where I saw it. I've got a lot of logging to do.
    Last edited by Chris@Rvengeperformance; 04-05-2014 at 09:20 PM.

    Parting 6 speed
    Pampena 3.5 Stroker, GTX 2867 Gen IIs, AEM Series2, oohnoo SMIC, DN Hardpipes, FIC 1650s, Walbro 525, aermotive fpr, Dejon intake pipes, Tial Q, Koyo Rad, Samco Hoses, Stoptech 332mm fronts, HKS GT4 Coilovers, Spec 4+ LW, JDM 6 Speed, Billet shift forks, Pampena brace

  6. #5
    I lack color... verified

    Join Date
    Sep 2010
    Owner Since
    Aug 1998

    Posts
    3,589
    Thanks
    104
    Thanked 498 Times in 241 Posts
    Quote Originally Posted by Forest Gump View Post
    subscribed

    It is interesting I picked up a couple of counts right after that load switchover point, 80-90 load is where I saw it. I've got a lot of logging to do.
    Grab a log showing TPS, RPM, KnockADC (or knock voltage), Knock Base and knock sum. Post it here. I'll walk you thru how to determine if the knock is real and how to tune it out if it's not.

  7. #6
    Forum User Not Verified

    Join Date
    Sep 2010
    Owner Since
    2004

    Location
    Cape Girardeau
    Posts
    4,791
    Thanks
    365
    Thanked 296 Times in 214 Posts
    Quote Originally Posted by Greg E View Post
    Grab a log showing TPS, RPM, KnockADC (or knock voltage), Knock Base and knock sum. Post it here. I'll walk you thru how to determine if the knock is real and how to tune it out if it's not.
    I will do all of that when I get the license stuff straightened. It didn't repeat any more than 1 knock count out of an entire 30 minute log today, so it may have been a fluke. The neighborhoods streets are rough too, so could've been a bump.

    I need to read this for a while to try to understand all of it, but I suppose the basic idea is to log knock voltage long enough under different conditions to see how "noisy" your motor naturally is and get the ecu to only care about the spikes by raising the base level appropriately? It almost makes sense to try this on fuel that knocks a little easier...

  8. #7
    I lack color... verified

    Join Date
    Sep 2010
    Owner Since
    Aug 1998

    Posts
    3,589
    Thanks
    104
    Thanked 498 Times in 241 Posts
    Quote Originally Posted by Forest Gump View Post
    I will do all of that when I get the license stuff straightened. It didn't repeat any more than 1 knock count out of an entire 30 minute log today, so it may have been a fluke. The neighborhoods streets are rough too, so could've been a bump.

    I need to read this for a while to try to understand all of it, but I suppose the basic idea is to log knock voltage long enough under different conditions to see how "noisy" your motor naturally is and get the ecu to only care about the spikes by raising the base level appropriately? It almost makes sense to try this on fuel that knocks a little easier...
    I wouldn't do that...

  9. #8
    Member
    Join Date
    Sep 2010
    Owner Since

    Location
    Arvada, CO
    Posts
    198
    Thanks
    0
    Thanked 25 Times in 20 Posts
    Subscribed but wont be able to do anything until I can figure out why my laptop crapped out (again).

  10. #9
    Low & Slow verified
    Join Date
    Sep 2010
    Owner Since
    2005

    Location
    Fortson, GA
    Posts
    577
    Thanks
    25
    Thanked 39 Times in 29 Posts
    Am I just seeing things or does knock have to be learned by the ECU. I thought I saw that happening every time I pulled the battery as I would get knock counts when there shouldn't be any after doing so. It seemed like once it "learned" I was able to get aggressive. This may be why adding timing last summer "appeared" to clear up some knock sum issues. This may be Forrest's issue but I will add, I never had knock happen at such a low load level. It would only happen when making power (250+ load).

    Thanks a bunch for sharing this Greg!!!

    Jeff

  11. #10
    Low & Slow verified
    Join Date
    Sep 2010
    Owner Since
    2005

    Location
    Fortson, GA
    Posts
    577
    Thanks
    25
    Thanked 39 Times in 29 Posts
    Quote Originally Posted by Forest Gump View Post
    I will do all of that when I get the license stuff straightened. It didn't repeat any more than 1 knock count out of an entire 30 minute log today, so it may have been a fluke. The neighborhoods streets are rough too, so could've been a bump.

    I need to read this for a while to try to understand all of it, but I suppose the basic idea is to log knock voltage long enough under different conditions to see how "noisy" your motor naturally is and get the ecu to only care about the spikes by raising the base level appropriately? It almost makes sense to try this on fuel that knocks a little easier...
    I did just the opposite last year to find the lowest race gas grade I could use and found out VP110 didn't measure up one bit to C16 lol. I started with C16 and felt nearly invincable. Ran that out and mixed another batch with VP110. This had nearly the same result as running just the 93+meth I normally ran. Maybe I was spoiled with the C16 results but there was a HUGE difference between the two. I won't run anything other than C16 on top of 93 when making glory pulls.

    Like Greg said, I wouldn't do that if I were you. Besides, you are still running E85 all the time, right? That stuff seems to have quite a high ceiling for power capability.

    Jeff

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The 3000GT/Stealth/GTO Web History Project
3000gt.com
3000GT / Stealth International WWWboard Archive
Jim's (RED3KGT) Reststop
3000GT/Stealth/GTO Information and Resources
Team 3S
3000GT / Stealth / GTO Information
daveblack.net
3000GT/Stealth/GTO Clubs and Groups
Michigan 3S
MInnesota 3S
Wisconsin 3S
Iowa, Nebraska, Kansas 3S
North California 3000GT/Stealth
United Society of 3S Owners
3000GT/Stealth/GTO Forums
3000GT/Stealth International
3000GT/Stealth/GTO Event Pages
3S National Gathering
East Coast Gathering
Upper Mid-West Gathering
Blue Ridge Gathering