# Fault Diagnosis of Induction Motor Using Convolutional Neural Network
## 3 Proposed Fault Diagnosis Method for Induction Motors
### Convolutional Neural Network  
A CNN model integrates feature extraction and classification, which is different from existing pattern-recognition methods. A CNN is composed of a plurality of convolutional layers and a subsampling layer [16; 17]. The CNN used in the proposed induction motor fault detection system consists of one input layer, two convolutional layers, two max pooling layers and one fully connected layer, and three output layers, as shown in Figure 4.  
Figure 4: Structure of proposed CNN (convolutional neural network) model.  
Figure 3: Block diagram of proposed fault diagnosis method.  
Figure 2: Fault types of induction motor.  
The convolutional layer uses the kernel to convolve the input data and then passes the activation function to generate an output feature map. Considering the convolutional layer is the \(l\)-th layer, its output feature map is as follows:  
\[x_{j}^{l}= \text{f}(\sum\
olimits_{i}x_{i}^{l-1}*k_{ij}^{l}+b_{j}^{l}), \tag{1}\]  
where \(x_{j}^{l}\) is the \(j\)-th feature map generated by the \(l\)-th layer, and \(x_{j}^{l-1}\) is the \(i\)-th input feature map. The input feature map is a specific input data pattern, \(k_{jj}^{l}\) is the \(j\)-th kernel connected to the \(i\)-th input feature map, f( ) is the activation function, \(b_{j}^{l}\) is the bias corresponding to the \(j\)-th kernel, and \({}^{*}\) is the two-dimensional convolution operation [18].  
The subsampling layer reduces the dimension of the extracted feature map. Various techniques are available for pooling. In the present study, the max pooling method, which extracts the maximum value from a feature map, is used. The max pooling technique reduces the size of the entire data, which reduces the computational cost and helps extract only the necessary data [19].  
In CNN, when the convolutional layer and the max pooling layer are repeated, only the main features are extracted, and the extracted features are transmitted to the fully connected layer. As the convolutional layer and the max pooling layer contain two-dimensional data, they are transformed into one-dimensional layers for transmission to the fully connected layer and subsequent transfer to the output layer.  
The softmax function is used as the cost function to transform the class classification problem, that is, the output of the previous layer, into the probability of each state when solving the state classification problem. The softmax function is as follows [20]:  
\[y_{l}=\frac{e^{a_{l}}}{\sum_{i=1}^{n}e^{a_{i}}}, \tag{2}\]  
where \(n\) is number of output neurons, and \(y_{l}\) is the \(l\)-th output. The numerator is an exponential function of the input data \(e^{al}\), and the denominator is the sum of all input data. Take the exponent on each output and divide by the normalization constant so that the sum is 1.  
The optimization function of the proposed CNN model uses RMSprop. The RMSprop algorithm does not uniformly add all past gradients but reflects the information of only the new gradient so that the learning rate does not decrease to 0 [21]. The algorithm is given as follows:  
\[G_{t}= \gamma G+(1-\gamma)(\
abla_{\theta}f_{t}(\theta_{t}))^{2}, \tag{3}\] \[\theta_{t}=\theta_{t-1}-\sqrt{\frac{\eta}{G_{t}-\epsilon}}.\
abla_ {\theta}f_{t}(\theta_{t-1}), \tag{4}\]  
where \(\gamma\) is the forgetting factor, typically 0.9. \(\theta\) is a network parameter, and \(f(\theta)\) is the cost function. In this study, the softmax function is used. \(\
abla_{\theta}f(\theta)\) is the network gradient. \(t\) is the time step, and if the network parameter is k, Gt is a k-dimensional vector that stores the sum of the squares of the gradient to which each variable moves until time step \(t\). \(\eta\) is the learning rate. In this study, the learning rate was set to 0.001. \(\epsilon\) is a small value ranging from \(10^{-4}\) to \(10^{-8}\) to prevent division by 0. Figure 5 shows a block diagram of the learning process for CNN.