Knocking is a phenomenon characterized by undesirable vibration and noise that can cause engine damage. A knock sensor (KS) is mounted on the cylinder block and senses engine knocking. A knocking vibration from the cylinder block is applied as pressure to the piezoelectric element. A knock sensor (KS) detects vibration when RPM rises or drops and generates voltages based on this vibration. The ECM/PCM controls the ignition timing based on the amplitude and frequency of the knock sensor signal. For example, if engine knocking occurs, the ignition timing is retarded to prevent it.