A method for detecting auto-ignition in a spark-ignited internal combustion engine having at least one cylinder which, together with a piston connected to a crankshaft, bounds a combustion chamber, a combustion chamber pressure sensor configured to measure a pressure in the combustion chamber, a crankshaft angle sensor that supplies a signal which represents the crankshaft angle, and a control device configured to perform open-loop and/or closed-loop control of the internal combustion engine, the method comprising:
- during a compression stroke of the internal combustion engine, acquiring values for the combustion chamber pressure at defined crankshaft angles within an evaluation window,
- determining a filtered pressure value from the acquired values for the combustion chamber pressure,
- determining, for the defined crankshaft angles, theoretical pressure values in the combustion chamber that would occur if no combustion were to take place in the combustion chamber,
- determining a value of the pressure difference between the filtered pressure value and the theoretical pressure values,
- comparing the value of the pressure difference with a predefined threshold value, and
- determining an auto-ignition in the combustion chamber upon a determination that the threshold value is exceeded.