As promised step by step guide for setting up knock sensor in V3 software:
EMU Knock Detection and Control - Step-by-Step Guide
This document explains how knock detection works in EMU and describes the recommended step-by-step procedure for configuring the knock sensor, engine noise tables, and knock protection strategy.
1. Engine Knock and Knock Sensor Basic s
Engine knock, also known as detonation or knocking combustion, is an abnormal combustion phenomenon in a spark-ignition engine where part of the unburned air-fuel mixture, called the end-gas, auto-ignites spontaneously before or immediately after the normal flame front reaches i t.
Instead of a smooth, controlled flame propagation initiated by the spark plug, multiple rapid pressure waves are generated inside the combustion chamber. These pressure oscillations typically occur in the range of several kHz and can lead to sharp pressure spikes, increased thermal loading, and potential engine damage, such as piston erosion, ring land failure, or bearing stre ss.
A knock sensor is a piezoelectric accelerometer mounted on the engine block. It detects structure-borne vibrations caused by combustion events. The sensor contains a piezoelectric element that generates a voltage when subjected to mechanical stress or vibrat ion.
When knock occurs, the high-frequency pressure oscillations in the combustion chamber excite the engine structure, producing vibrations that propagate through the engine b lock.
Knock-induced vibrations have a characteristic frequency range, usually between approximately 5 kHz and 15 kHz, depending mainly on the cylinder bore. EMU applies band-pass filtering to isolate knock-related signals from general engine noise.
2. Knock Detection Window
Knock does not occur randomly during the engine cycle. It is most likely to appear shortly after ignition, when cylinder pressure and temperature reach their peak values.
Typically, knock is evaluated in a narrow crank-angle window, often around 5 to 15 degrees after Top Dead Center (ATDC). The exact range depends on engine design and cal ibration.
To improve signal quality, EMU samples and evaluates the knock sensor signal only within this defined crank-angle window. Outside this window, the signal is ignored for knock detection purposes, which helps reject unrelated mechanical noise, such as valvetrain noise or pi ston slap.
3. Step 1 - Determine the Knock Frequency
To properly configure a knock sensor in EMU, the first step is to determine the resonant frequency associated with knock combustion for the specific engine.
Recommended empirical method
1. Record the baseline signal with no knock present. Record the knock sensor signal while the engine is operating correctly and safely, with no knock present.
2. Record the signal with knock present. Record the knock sensor signal under conditions where knock is present. This can be done using a computer with a line-in input or any suitable data acquisition system.
3. Perform frequency analysis. Use audio or signal analysis software with a spectrum analyzer function to compare both recordings and identify which frequency components are significantly amplified when knock is present.
4. Select the most useful frequency band. The detected frequency does not have to be the fundamental knock frequency; it may also be one of its harmonics. What matters most is that this frequency band clearly separates knock from normal combustion.
5. Avoid false detection. Ensure that the selected frequency is not strongly excited during normal engine operation by mechanical noise, such as valvetrain noise, piston slap, or other engine vibrations. If strong normal engine vibration exists in the selected frequency band, false knock detection may occur.
Alternative theoretical estimation
The knock frequency can also be estimated using the following formula:
F = 900 / (pi * R)
where:
· F - knock frequency in kHz
· R - cylinder radius in meters
In practice, this calculated frequency should be treated only as a rough starting point. Real engines exhibit complex vibration behavior, and other mechanical components, such as pistons, connecting rods, and valvetrain elements, may generate strong signals in the same frequency range. This can make the theoretically calculated frequency unsuitable for reliable knock detection without further validation.
Once the appropriate frequency has been identified, set it in:
Knock sensors → Sensor parameters → Knock frequency
Select the closest available value from the predefined list.
4. Step 2 - Assign Knock Sensors to Cylinders
The next step is to assign knock sensors to individual cylinders.
· If the engine uses a single knock sensor, assign it to all cylinders.
· If the engine uses two knock sensors, assign each cylinder to the sensor that is physically closest to it.
This configuration is done in:
Knock sensors / Sampling
If no knock sensor is assigned to a cylinder, no knock voltage will be measured for that cylinder.
5. Step 3 - Configure the Sampling Window
In the Sampling settings, you can also configure the knock detection window:
· Knock window start - the crank angle position, in degrees after Top Dead Center (ATDC), where knock detection begins.
· Knock window duration - the duration over which the sensor signal is integrated, expressed in crankshaft degrees.
If you are not sure how to configure these parameters for your engine, it is recommended to leave the default values, as they are suitable for most applications.
Figure 2. Knock voltage peak signals and Engine Noise thresholds for a 5-cylinder engin e under normal, non-knocking conditions.
Figure 2. Knock voltage peak signals and Engine Noise thresholds for a 5-cylinder engine under normal, non-knocking conditions.
Figure 1. Knock window visualisation.
6. Step 4 - Configure the Integrator Constant
The knock sensor signal is processed according to the following relationship:
Vout = V in * Gain * ( Knock window duration (ms) / Tc)
w he re :
· Vin - raw knock sensor voltage
· Gain - cylinder gain
· Knock window duration - duration of the knock detection window, expressed in milliseconds
· Tc - integrator constant
The integrator constant (Tc) determines how strongly the signal is averaged within the knock window.
Effect of Tc
· Higher Tc values result in stronger signal averaging, lower noise, a smoother signal, lower amplitude, and reduced sensitivity to short spikes.
· Lower Tc values result in less averaging, higher signal amplitude, faster response, increased sensitivity, more noise, and a higher risk of false knock detection.
How to adjust Tc
· If the signal is too noisy or false knock is detected, increase Tc.
· If the system is not sensitive enough and misses real knock events, decrease Tc.
· Noisy engines, for example engines with stiff mounts or aggressive valvetrain, typically require higher Tc values.
· Well-damped engines can usually use lower Tc values for better responsiveness.
In practice, Tc is a trade-off between sensitivity and noise immunity.
7. Step 5 - Adjust Sensor Gain
After selecting the desired knock filter frequency and integrator constant, the next step is to set the analog gain of the knock sensor signal for each cylinder.
The gain should be adjusted so that, across the full engine speed and load range with no knock present, the signal level remains within approximately 2.0-2.5 V and is as uniform as possible across all cylinders.
· If the gain is too high, the usable dynamic range for detecting knock will be very small.
· If the gain is too low, light knock events may not be detectable.
It is normal for the knock sensor voltage to increase with engine speed.
The current knock sensor voltage for each cylinder can be monitored using the following log channels:
Knock voltage peak cyl #1-#8
These channels report the maximum voltage value recorded for each cylinder between consecutive log frames. Since logging occurs at 25 Hz, this ensures that short-duration peaks are not missed, even if they occur between log samples.
Per-cylinder gain is allowed only when the engine operates in full sequential mode with cam sync. Otherwise, all values in the cylinder gain fields should be the same.
8. How Knock Detection Works
EMU detects knock by comparing the peak voltage for each cylinder, Knock voltage peak cyl #, with the corresponding engine noise level, Knock engine noise cyl #.
· If the voltage measured from the knock sensor exceeds the defined engine noise level, EMU interprets this as a knock event.
· The greater the difference between the measured voltage and the engine noise threshold, the stronger the knock intensity.
This information is stored in the Knock level peak channel:
· 0 V indicates no knock detected.
· A value above 0 V represents the highest knock level recorded across all cylinders.
Additionally, the Knocking cylinders channel indicates all cylinders for which knock was detected between two consecutive log samples.
9. Step 6 - Tune the Engine Noise Characteristic
The goal of knock sensor tuning is to define, for each cylinder, the Engine Noise characteristic. This is the voltage level at which knock is definitely not present.
Tuning procedure
6. Ensure the engine is operating without knock by using a correct air-fuel ratio and safe ignition timing.
7. Record knock sensor signals in the log across the required operating range.
8. Fill the Engine Noise table using the recorded values.
9. Apply per-cylinder adjustments using the Engine noise corr. #1-#8 tables.
The graph below shows knock sensor voltage for a 5-cylinder engine under normal, non-knocking conditions.
Figure 2. Knock voltage peak signals and Engine Noise thresholds for a 5-cylinder engine under normal, non-knocking conditions.
Looking at the knock sensor voltage and the defined Knock engine noise values, it is clear that the voltage characteristic is different for each cylinder. This is normal and results from sensor location, cylinder filling differences, and mechanical vibration distribution in the engine block.
The voltage characteristic shown in the graph was recorded during correct combustion of the air-fuel mixture, with no knock present.
Based on these data, use the correction tables to adjust the Knock engine noise values for each cylinder so that the cylinder Engine Noise curve is slightly above, and as close as possible to, the measured Knock voltage peak signal for that cylinder.
This approach provides maximum sensitivity to real knock while minimizing the risk of false detection.
Important notes
· Per-cylinder knock functions work only in full sequential ignition mode.
· After the Engine Noise table and Engine noise per-cylinder corrections are properly defined, the knock detection system is correctly calibrated.
· Any real knock event should then be visible in Knock level peak, Knocking cylinders, and Knock count.
This method ensures accurate cylinder-specific knock detection despite differences in vibration levels between cylinders.
10. Step 7 - Enable Knock Protection Strategy
To protect the engine from the negative effects of knock, enable the Knock sensor / Action strategy. Under defined conditions, this strategy retards ignition timing, which should help eliminate knock.
You can define the RPM range in which the strategy is active. This is important because, in some engines, high levels of mechanical vibration at high RPM may make reliable knock detection impossible.
Ignition control type
When running full sequential ignition, the following ignition control types are available:
· Per cylinder - ignition timing is retarded only for the cylinder in which knock was detected.
· All cylinders - ignition timing is retarded for all cylinders. This option is the only allowed when the ignition system doesn’t work in full sequential mode.
Knock retard algorithm
In every engine cycle, for each cylinder where the Knock level is greater than zero, the value of Knock ignition retard is increased proportionally to the Knock level and Ignition retard rate:
if (Knock level > 0)
{
Knock ignition retard = Knockignition retard + Knock level * Ignition retard rate;
i f ( Knock ignition retard > Max ignition retard )
Knock ignition retard = Max ignition retard;
}
else every Knock restore rate engine cycles
{
Knock ignition retard = Knock ignition retard - 1;
}
· When knock is detected, ignition retard increases.
· When knock is no longer present, ignition timing is gradually restored.
Knock Action Status
Information about the current status of the knock action strategy is available in the Knock action status log channel:
Disabled - the knock sensor action strategy is not enabled.
Inactive - condition not met - The necessary conditions for the strategy (e.g., too low RPM) have not been met.
Inactive no knock - the conditions for the action strategy have been met, but no knock has been detected.
Active - knock has been detected, and the action strategy is active.
Monitoring ignition retard
The current ignition timing correction caused by Knock Action is available in the following log channels:
Knock ign retard cyl #1-#8
These channels show the real-time ignition retard applied to each cylinder.

