The knock sensor prevents harmful spontaneous combustion.
The knocking effect is caused by uncontrolled combustion outside of the normal cycle which causes extreme local temperatures in the cylinder. These high amounts of heat put a strain on engine components such as pistons, valves and the cylinder head and can lead to damage.
The knock sensor registers the sound of the engine in the structure and converts it into electrical impulses.
The engine control unit compares the measured pulses with the stored reference values and intervenes accordingly in the control of engine, fuel injection and ignition before combustion reaches the knock limit. Another function is performed by the knock sensor relating to the detection of the fuel quality. The higher the octane rating, the less prone the fuel is to knocking. That means that 98-octane super grade ignites at a higher temperature than regular petrol with an octane rating of 95. If only lower quality fuel is available, the engine control unit automatically corrects the ignition timing based on the information from the knock sensor. Damage to the motor is thus avoided.