# Analog Circuit Fault Diagnosis Using a Novel Variant of a Convolutional Neural Network
## 4 Case Studies Using the Proposed System
### Experimental Comparison and Result Analysis  
In order to verify the effectiveness of the proposed MSCNN-SK network, this section conducts fault diagnosis comparative experiments based on the data sets simulated by the two benchmark test circuits built earlier. In the experiment, four typical DL networks were used for comparison, namely: Recurrent Neural Network (RNN), Long Short-Term Memory (LSTM) and Back Propagation Neural Network (BPNN). The RNN and LSTM network consists of two hidden layers, with 128 hidden units. The BPNN network has 3 hidden layers. The 1 DCNN network includes 3 layers of convolutional layers, 3 layers of pooling layers, and the size and number of convolution kernels are set to 1 \(\times\) 3 and 32, respectively. The MSCNN-SK network has three branches corresponding to the 0 th order, 1 st order, and 2 nd order mean difference sequences, and the network structure of each branch is the same. Note that we determine the parameters of the network according to popular recommendations [20,21] as well as trial and error. Take the first branch as an example, the parameters of the convolutional layer and pooling layer of the initial part of the network are 1 \(\times\) 1 \(\times\) 32 and 1 \(\times\) 5, respectively. In the convolution module based on the dynamic selection mechanism of the convolution kernel, the three convolution layer parameters are 1 \(\times\) 3 \(\times\) 32, 1 \(\times\) 5 \(\times\) 32, and 1 \(\times\) 7 \(\times\) 32, that is, the size of the convolution kernel is 1 \(\times\) 3, 1 \(\times\) 5 and 1 \(\times\) 7, and the compression ratio is set to 16. In addition, all test models are independently tested 10 times to reduce the influence of random errors. All the DL networks are implemented by the Pytorch library. During the network training phase, the cross-entropy function is adopted as the loss function, and the Adam optimizer is used with a learning rate fixed to 0.001 and a batch size of 64. It should be mentioned that all the hyper parameters are determined by trial and error. The size of the Shalley-Key Bandpass Filter fault diagnosis dataset is 18,000 \(\times\) 150, and the input size of each network is 1 \(\times\) 150. A total of 70% of the data are taken as the training set while the other 30% data are used as the testing set. Table 4 lists the maximum, minimum, average and standard deviation results of all test networks in the Sallen-Key band-pass filter circuit fault diagnosis. As shown in Table 4, the average fault diagnosis accuracy rate of 1 DCNN and MSCNN-SK networks has reached 100%, while the average fault diagnosis accuracy rate of BPNN, RNN and LSTM networks is also close to 100%. As mentioned above, the Sallen-Key bandpass filter circuit has fewer components and a relatively simple structure. The tested deep learning methods can achieve high diagnostic accuracy. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Fault Code** & **Mode** & **Nominal Value** & **Tolerance Band** & **Fault Value** \\ \hline S0 & No fault & - & - & - \\ S1 & C1 \(\downarrow\) & 5 nF & 10\% & 2.5 nF \\ S2 & C1 \(\uparrow\) & 5 nF & 10\% & 7.5 nF \\ S3 & C2 \(\downarrow\) & 5 nF & 10\% & 2.5 nF \\ S4 & C2 \(\uparrow\) & 5 nF & 10\% & 7.5 nF \\ S5 & R1 \(\downarrow\) & 6.2 k\(\Omega\) & 5\% & 3.1 k\(\Omega\) \\ S6 & R1 \(\uparrow\) & 6.2 k\(\Omega\) & 5\% & 9.3 k\(\Omega\) \\ S7 & R2 \(\downarrow\) & 6.2 k\(\Omega\) & 5\% & 3.1 k\(\Omega\) \\ S8 & R2 \(\uparrow\) & 6.2 k\(\Omega\) & 5\% & 9.3 k\(\Omega\) \\ S9 & R3 \(\downarrow\) & 6.2 k\(\Omega\) & 5\% & 3.1 k\(\Omega\) \\ S10 & R3 \(\uparrow\) & 6.2 k\(\Omega\) & 5\% & 9.3 k\(\Omega\) \\ S11 & R4 \(\downarrow\) & 1.6 k\(\Omega\) & 5\% & 0.8 k\(\Omega\) \\ S12 & R4 \(\uparrow\) & 1.6 k\(\Omega\) & 5\% & 2.4 k\(\Omega\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Failure mode of the Four-opamp biquad high-pass filter circuit.