Knock sensor —> FUNCTIONAL PRINCIPLE
The knock sensor is located on the outside of the engine block. It is intended to record knocking noise in all engine operating states in order to prevent engine damage.
The knock sensor "listens out for" the structure-borne vibrations from the engine block and converts these into electrical voltage signals. The signals are filtered and evaluated in the control unit. The knocking signal is assigned to respective cylinder. If knocking occurs, the ignition signal for the respective cylinder is adjusted in the "late" direction until knocking combustion no longer occurs.
In desi terms the knock sensor determine the ignition timing as "retarded or advanced". It can also pop the CEL in 'computer wali' vehicles.