# Application of Convolutional Neural Network to Defect Diagnosis of Drill Bits
## 3 Data Processing and Feature Extraction  
Figure 4 presents the time-domain vibration signals of the four drill bits with different health conditions. Defects #1, #2, and #3 represent the \"notched\" drill bit, the drill bit with a \"blunt edge\", and the drill bit with a \"blunt head\", respectively. \"Healthy\" represents the drill bit with no damage. The figure shows the accelerometer read-out. The amplitude corresponds to the unit in g (1 g = 9.81 m/s\({}^{2}\)). A larger amplitude represents a larger vibration amplitude. Each data set contains 32,770 data points. From the figure, it can be observed that the vibration signals contain a large amount of noise. It is challenging to distinguish the differences between each condition. In particular, the signal amplitude and vibration features of defect #1 and the \"healthy\" sample are very similar. Therefore, further data processing is needed for defect diagnosis. Although some researchers use raw vibration data to perform 1D CNN for bearing fault detection [16], it requires a large amount of computation. This study applied a short-time Fourier transform to reduce the data size and the noise effect. Figure 3: (**a**) An image of a notched drill bit, (**b**) an image of a blunt-edged drill bit, (**c**) an image of a blunt-headed drill bit, and (**d**) an image of a healthy dill bit without any defects. Short-time Fourier transform (STFT) was selected as the feature extraction method in this experiment. STFT applies Fourier transform for localization in both the frequency and time domains of time-varying signals [24]. Because of the advantages of frequency-domain analysis of nonstationary signals, STFT is considered a promising approach for analyzing vibration signals under complex conditions or with background noises [15]. A spectrogram takes several FFTs and overlaps them to show how the frequency domain changes with time. It could be a powerful method to describe how a vibration spectrum changes when vibration analysis is performed in a noisy environment. The STFT process can be represented as follows:  
Signal frames are extracted at regular time intervals by a finite window function w[m],  
\[x_{l}[m]=x[m+lH]w[m] \tag{1}\]  
where \(m\in\{1,2,\ldots,M\}\) is the local time, \(M\) is the analysis window length, \(l\) is the total number of frames, and \(H\) is the hop size. Furthermore, discrete Fourier transform (DFT) was performed on every frame to localize a two-sided spectrum using the following equation:  
\[X[k,l]=\frac{1}{M}\sum_{m-1}^{K}x_{l}[m]e^{-j2\pi\frac{mk}{K}} \tag{2}\]  
where \(k\in\{1,2,\ldots,N\}\) is the frequency band index and \(K\) is the DFT size. The term \(x[k,l]\) represents the STFT of \(x[n]\) and corresponds to the local time-frequency behavior of the signal around the time index \(l\) and the frequency range \(k\)[25]. Figure 5 presents the spectrograms for the different drill bits. In a spectrogram, the color reflects the signal response. In this case, a brighter color reflects a stronger signal response. This feature facilitates the use of 2D CNN algorithms to analyze and learn the various patterns in each health condition. As shown in the figure, most vibration features concentrate in a frequency range lower than 1000 Hz. Therefore, all of the data in the frequency range above 2000 Hz were removed in this experiment. The generated spectrograms were applied directly to the 2D CNN for classification and training. Figure 4: Read-out of vibration signals collected by the SmartCheck system. Defects #1-#3 represent the “notched” drill bit, the drill bit with a “blunt edge”, and the drill bit with a “blunt head”, respectively. “Healthy” represents a drill bit without any defects. Although 2D CNN is a promising method for fault diagnosis applications, it needs a massive amount of calculation to provide a high diagnostic accuracy. Furthermore, 2D CNN requires images as the input to perform the algorithm. It becomes a challenge to apply 2D CNN to real-time vibration analysis. One-dimensional CNN uses 1D data arrays as inputs.