The wavelet transform, which is a well-known and remarkable way of processing unsteady signals, is considered to surpass Fourier analysis and is applied in various fields. In this study, we analyze the pressure signal in a spark-ignition engine and the vibration of the engine block under the knocking conditions when knocking is caused. We then propose a new knocking detection method which we call wavelet pattern matching and is based on the frequency characteristics of the knocking signal to detect the knocking. Our experiments demonstrate the advantages of our approach and the main results obtained can been summarized as follows: 1) Knocking resonant frequencies decrease with time, and this phenomenon is useful for the knocking detection. 2) The wavelet pattern matching method which is based on the frequency characteristics of the knocking is very useful for knocking detection, even when the noise level is higher than the knocking level.