# Hybrid Wavelet-CNN Fault Diagnosis Method for Ships' Power Systems
## 4 Research Methodology
### Convolutional Neural Networks  
Convolutional neural networks (CNNs) are similar to ANNs since they are composed of neural networks, but they include some distinctive features, which are the convolutional and pooling layers. Convolution acts as a sliding filter and it was first introduced by [PERSON] [26] back in 1980. Researchers utilize CNN to cope with challenging problems that are mainly divided into two main categories: (1) computer vision tasks with 2D input data such as image classification, object detection, and image segmentation;  
Figure 4: Time series of Current A during unrecognizable faulty operation.  
Figure 5: Reconstructed signals of Current A using DWT during unrecognizable faulty operation.  
(2) sequential problems with 1D input data such as time series forecasting, time series classification, and natural language processing. The power of CNNs lies in extracting valuable regional information. Furthermore, they are more effective to search for features in smaller portions rather than the entire data. The structure of a 1D CNN consists of three basic types of layers: 1D convolutional and 1D pooling layers for feature extraction, and fully connected layers for the final decision. The 1D CNN operation is briefly explained below, as described in our previous work [8]:  
First, raw 1D input vector \(x[n]\) is fed into a 1D convolutional layer. Output \(f[n]\) is called the feature map and it is calculated as in (3).  
\[f[n]=x[n]*k[n]=\sum_{m=0}^{w-1}k[m]x[n-m] \tag{3}\]  
Equation (3) is a linear elementwise multiplication, and the filters of kernels \(\kappa[n]\) are convolved with \(x[n]\) to produce feature map \(f[n]\). The most important parameter is the size of the kernel, expressed as \(w\), because it defines the size of the feature map [8].  
The feature map of the convolutional operation is fed into a nonlinear activation function, expressed as \(F\), to produce output \(Z(n)\) on the basis of Equation (4). A common activation function was sigmoid, but gradient vanishing problems during back-propagation prompted researchers to investigate alternative activation functions according to the authors of [8]. One of the most promising is rectifier linear unit (ReLU), expressed as in (5).  
\[Z(n)=F(f(n)) \tag{4}\]  
\[ReLU(x)=\max(0,x) \tag{5}\]  
The output of the activated convolutional layer is then fed into a pooling layer, aiming at decreasing computational costs. There is a variety of pooling operations, but 1D max pooling is a good option [27]. A window, such as the kernel stated in the convolutional layer, slides through the activated feature map to keep only the maximal values while discarding all other information.  
Many convolutional and pooling layers could be combined for a final output feature map. A special layer flattens the output, which is then fed into some fully connected layers. The fully connected layers follow the ANN structure. To overcome problems of overfitting, a dropout layer is implemented in many cases. This layer drops some neurons from the neural network during the training process. Lastly, depending on the task, the number of neurons and the type of activation function of the final dense layer must be chosen wisely. For a 3-class classification task, the dense layer is expressed as in (6).  
\[a^{[L]}=Softmax(W^{T}a^{[L-1]}+b) \tag{6}\]