# A Novel Capsule Network Based on Wide Convolution and Multi-Scale Convolution for Fault Diagnosis
## 3 Proposed WMSCCN for Fault Diagnosis
### Wide Convolution and Multi-Scale Convolution  
As the first layer of the proposed WMSCCN algorithm, the wide convolutional layers can be called the noise reduction layer in function. The core of the layers is to suppress high-frequency noise through larger-sized convolution kernels, thereby achieving the goal of improving the algorithm's noise resistance. Generally speaking, wide convolution kernels have a larger reception field than  
Figure 1: Framework of the novel capsule network based on wide convolution and multi-scale convolution (WMSCCN). The a @ b indicates that the number of current feature maps is a and the size is b. BN stands for Batch Normalization technology, and Dim denotes the dimension of the capsule. Conv1 and Conv2 denote the first and second convolutional layers, respectively.  
narrow convolution kernels and can effectively capture low-frequency features. The wide convolution kernel can act as a low-pass filter, so it can better suppress high-frequency noise, which has been confirmed in [22]. In the proposed WMSCNN algorithm, the wide convolutional layers contain two convolutional layers, and the sizes of the convolution kernels are 64 and 16, respectively.  
After the wide convolutional layer, the multi-scale convolutional layer is accessed. The precision of the fault feature extracted by convolutional layer depends on the size of convolution kernel. Small convolution kernels can extract fine features, while large convolution kernels can extract coarse-grained features. If a single layer only uses convolution kernels of the same scale, it is easy to ignore features of other precisions, resulting in incomplete information on the extracted features [28]. In order to enhance the fault feature extraction ability under different working conditions and strengthen the generalization of the algorithm, this paper introduces the idea of multi-scale convolution. The multi-scale convolutional layer consists of eight convolution kernels of different scales. The size of the convolution kernels is \(i\) (\(i=1,\ 2,\ 3,\ \ldots,\ 8\)). The stride denotes how much we move the convolution kernel at each step, and it is set to 1. The filter denotes the number of convolution kernels, and it is set to 16.  
Zero padding is used in the multi-scale convolutional layers to keep the output features mapped on the same scale. It allows the convolution kernel to slide from start to end in the input features. Therefore, it can extract boundary features more efficiently. For specific positions filled with zero, \(PL\) represents the number of zero padding on the left and \(PR\) represents the number of zero padding on the right, as shown in the following formula. It is worth noting that the following formula is only applicable when the stride is 1.  
\[PL=ceil\left(\frac{k-1}{4}\right)+floor\left(\frac{k-1}{4}\right), \tag{2}\]  
\[PR=k-1-PL, \tag{3}\]  
where \(k\) indicates the convolution kernel size. Function \(y=ceil(x)\) means that for the floating-point number \(x\) in the positive infinite direction takes the nearest integer. For example, \(ceil(6.5)=7\). Function \(y=floor(x)\) means that floating-point number \(x\) in the negative infinity direction takes the nearest integer. For example, \(floor(6.5)=6\). Following the above formula, if the total number of zeros to be filled is even, then \(PL=PR\). If the total number of zeros to be filled is odd, then \(PL\) is always odd and \(PR\) is always even and the difference between them is 1.