An engine ECU executes a program including the steps of: calculating a
coefficient of correlation K in accordance with a result of comparing a
waveform of a vibration of a frequency band including a resonance
frequency of an engine with a knock waveform model previously created as
a waveform of a vibration caused when the engine knocks (S112);
calculating a knock intensity N from an intensity of a vibration of a
frequency band excluding the resonance frequency of the engine (S114); if
knock intensity N is larger than a reference value and coefficient of
correlation K is larger than a threshold value (YES at S116), determining
that the engine knocks (S118); and if knock intensity N is smaller than
the reference value and/or coefficient of correlation K is smaller than
the threshold value, determining that the engine does not knock (S122).