Theory of knocking
Knocking is an uncontrolled burning of fuel in engines. In normal operation, the fuel-air mixture is ignited by the spark plug (gasoline engine) and burns continuously. When the engine is knocking, a self-ignition starts in the outer side of the combustion chamber causing high pressure transients, which will overload the engine mechanically and thermally. This can seriously harm the engine’s parts, especially the piston. The knock detection algorithm indicates this knocking, so that the user can react to this abnormal condition.
Knocking can be detected by extracting the high frequency component out of the cylinder pressure signal. This can be done with an high pass filter. The knocking frequencies are typically between 5 kHz – 12 kHz.
The example shows a standard internal combustion pressure curve.
The high-pass (HP) filter (red) extracts frequency components which are above the cut off frequency.
In comparison to the Illustration above, we can see pressure fluctuations on the falling slope of the pressure curve (blue). The combustion pressure curve can reach very high pressures >>100 bar, so sometimes it is hard to observe it on top of the main combustion pressure curve. If we only extract the high frequency components above 5000 Hz we can analyse knocking much easier. The high-pass filtered pressure signal (red line) indicates the pressure fluctuation around the maximum of the pressure curve.
Another important value is the maximum pressure of this high-pass filtered signal (red), which can be extracted and visualized in a recorder display, immediately reflecting the pressure transients of the previous cycles.
This value is a good indication of knocking, but in some circumstances it can show incorrect information. If the pressure curve is very noisy, or a spike (caused by some external electrical signal) is present, the maximum value extracted out of the high-pass filtered signal shows high values, which are not related to knocking.
Knocking typically starts at the pressure maximum, and continues on the falling slope of the pressure signal. So instead of taking only one value (peak), we could integrate the high-pass filtered signal of the negative part of the pressure slope.
This integrated value (knock integral = KI) will give a more stable value for single transient noise peaks. The high-pass filter outputs the absolute pressure (positive values only). So, if we integrate the signal, we can reject a single transient, but will also sum up the noise which may be present all the time. Depending on the engine speed, the noise will also increase which in turn will cause an increase of the integrated signal. With a single integration it will be hard to determine if it is knocking, or simply noise?
To prevent this, the integration can additionally be done before the maximum pressure, so that the results before and after the maximum can be compared.
KnockFactor = INT_Knock / INT_Reference
KF will give a weighted result related to knocking.
Without any knocking present, the KF is around 1. The integration windows (reference window; knock window) will separate at the average maximum pressure position.
The example on the left, shows the pressure curve (blue) and the high-pass filtered signal (red) in the diagram at the top. And then, the maximum pressure extracted from the high-pass filtered signal (red) and the calculated KF (orange).
Both maximum graphs show peaks, so knocking is present and could be detected in either way – as long as no spikes are present.
Some cycles before, we can see an error spike (red curve). While the maximum of the filtered signal still shows a peak here, the KF algorithm does not indicate knocking at all, and the value obtained is close to 1.
This way Dewesoft® can provide robust knock detection, even if there are accidental spikes in the signal.
The next example shows a very noisy pressure signal. The KF (orange) will stay around 1, because integrated noise is similar in the reference (green) window and knock (red) window.
Set up the algorithm (Mannesmann VDO AG)
The previous chapters have described which signals can be obtained from the knock detection algorithm:
- HP filtered pressure signal
- Maximum value of HP filtered pressure signal
- Knocking factor
Below you can see the settings for the getting the knocking factor.
Low-pass filter: The reference window and the knocking window are separated at the maximum pressure point (red curve), without the influence of noise or already present knocking peaks. A running average filter is used here, with setup taps corresponding to the angle resolution. If the angle of the CA is set to 0.2 deg and 40 taps are used, we get a moving average window (smoothing) of 40*0.2 deg= 8 deg.
Out of the filtered (smoothed) curve the maximum pressure position is the knock and reference window separation position.
recommended value [deg]: 4-10 deg → Info TAPS = deg/angle resolution!
High-pass filter: Here the high-pass filter frequency is set in Hz. The pressure curve is high-pass filtered (blue) and the result can be shown in the CA-Scope. The channel is named CylinderChannelname/KnockHP.
recommended value [Hz]: 5000 Hz
Background information about high pass filter:
The cylinder pressure channel is already present as angle domain result. So the time between the samples varies with the engine speed. Since we need to set the high pass filter cut off frequency in Hertz, a conventional IIR would not work.
The high-pass filter is created from a moving average window with a specific width, which is subtracted from the original signal, and (as for all filters) a minimum sampling rate is required for the filter to work properly:
minsamplerate [Hz] >= high-pass frequency [Hz] * 4.5
With the high-pass filter set to 5000 Hz a sampling rate of at least 22,500 Hz is required. With an angle resolution of 0.1° (3600 pulses per revolution) we need 375 rpm to get to this sample rate.
Engine speed [rpm] = Sample rate [Hz] / pulses per revolution * 60 = 22500 / 3600 * 60 = 375
In the table below the minimum engine speed is shown depending on resolution and a set HP filter of 5000 Hz.
|resolution [° CA]||HP filter [Hz]||Min. engine speed [rpm]|
If the engine speed is lower than required, the HP filter will be set to a lower frequency until the minimum engine speed is reached!
Noise threshold: For the Knock Factor, the quotient of the integrated signal of the Knock window and the Reference window is obtained. If the pressure value is lower than the specified threshold, then the threshold value will be used for integration. This is done to reduce the influence of different base noise levels between the reference window and knocking window.
recommended value [bar]: 0.1 – 0.5 bar
Reference, Knock signal window width: The width of the reference window and the knock window is defined here. It is recommended to set both windows to the same length. If this is done and the noise threshold is set to a reasonable level, the KF will be about 1 without knocking. If the window sizes are set differently, the base value without knocking is the quotient between the two window lengths.
|reference window size [° CA]||knocking window size [°CA]||knocking factor KF, base value|
Shift reference window: At higher RPM, it can happen that knocking already starts before maximum pressure. In this case, part of the knock signal will fall into the reference window area, which reduces the knocking factor value. To avoid this, the knocking window and the reference window can be shifted according to the actual engine speed.
With the above settings the window is shifted at 6000 rpm by 10° CA (or 5° CA at 3500 rpm). If any knocking before the maximum pressure point occurs now, we don’t get an increased KF reading, as no knocking leaks into the reference window when shifted correctly.