1. Introduction
As the electronic industry advances, the volume of electronic circuits is smaller, the functions are more abundant, and the integration and complexity are absolutely higher. A previous survey showed that nearly 80% of electronic circuits are digital circuits, while approximately 80% of faults are caused by analog circuits [
1]. Therefore, the analog circuit crucially influences the stability and reliability of the electronic system. If an analog circuit fails during use, it will lead to certain economic losses and even safety issues. In recent years, due to the important role played by analog circuits in electronic systems, analog circuit fault diagnosis has become a research hotspot in engineering and academia. However, due to the nonlinear nature of the analog circuit and the lack of a good fault diagnosis model, analog circuit fault diagnosis has also become a research difficulty [
2]. With the increased integration and complexity of electronic circuits, vulnerability to circuit noise, component tolerances, and difficulty of obtaining test points, fault diagnosis of analog circuits has become more intricate and difficult.
Currently, two main types of fault diagnosis methods are available for analog circuits: simulation before test (SBT) and simulation after test (SAT) [
2]. SBT simulates various faults prior to fault diagnosis of analog circuits by simulation tools. In practical applications, the actual measured data are compared with the dataset obtained from the simulation to complete the fault diagnosis. SAT refers to the realization of fault location through theoretical analysis and logical deduction based on the fault data of the analog circuit collected in the actual measurement, although small parameter disturbances will affect the fault location results [
1]. Compared with SAT, SBT is more widely used in analog circuit fault diagnosis due to its simpler theoretical and logical analysis and better real-time performance. The fault types of analog circuits are mainly divided into hard faults and soft faults [
1,
2]. Hard faults mainly refer to open and short faults. Such faults will contribute to relatively large changes in the relevant parameters of the circuit that directly cause circuit failure or destruction, and most of them can be found in the test stage before the circuit is promoted and used. Soft faults refer to failures in which the parameters of the components in the circuit deviate from the nominal value due to factors such as manufacturing, temperature, humidity, pressure, sunshine, dust, and component ageing. Furthermore, the probability of soft faults is much greater than that of hard faults, and the diagnostic demand and value of soft faults are greater than those of hard faults.
At the end of the 20th century, with the rise of artificial intelligence algorithms, a large number of fault diagnosis methods for analog circuits based on artificial intelligence algorithms were proposed, thereby realising the intelligence and automation of analog circuit fault diagnosis. From 2000 to 2007, Aminian used wavelet transform (WT) to preprocess the impulse response of the CUT and then realised the fault diagnosis of analog circuits by neural networks [
3,
4,
5]. In 2008, Tan extracted features from the feasible domain based on wavelet packet transform (WPT) and finally completed the fault diagnosis of analog circuits by probabilistic neural networks [
6]. In 2010, Cui used WPT to preprocess the response signal of the CUT, extracted the fault features and finally completed the fault diagnosis of the analog circuit by a support vector machine (SVM) [
7]. Yuan preprocessed the responses of the CUT and input the entropy and kurtosis of the responses into the neural network to complete the fault classification, thereby realising fault diagnosis of the analog circuit in 2010 [
8]. In 2013, Long combined the mean value and standard deviation of the WT components and the mean value, standard deviation, skewness, peak value, and entropy in the statistical characteristics of original responses to form a feature vector, and then used the least square support vector machine (LS-SVM) to finish the fault diagnosis of the CUT [
9]. In 2016, Xiong used ensemble empirical mode decomposition (EEMD) to preprocess the response of the CUT to obtain the amplitude modulation and frequency modulation (AM-FM) components and calculate the peak value and relative entropy of each AM-FM component to form the feature vector, and then they completed fault diagnosis by an extreme learning machine (ELM) [
10]. In 2020, He used a cross-wavelet transform (XWT) to obtain the spectrum map of the faulty signal and then fed the spectrum map to a generative adversarial neural network (GAN) to achieve fault diagnosis of the CUT [
11]. In 2021, Ji obtained the spectrogram of the response of the CUT by short-time Fourier transform (STFT) and input it to ResNet to complete feature extraction and fault diagnosis of the CUT [
12]. In 2021, Yang used WT to preprocess the signal at the output of the CUT and input the preprocessed data into an improved deep convolutional neural network to complete the diagnosis of incipient faults in analog circuits [
13].
According to the above methods, it can be concluded that the general process of analog circuit fault diagnosis is data preprocessing, feature extraction, and fault diagnosis. The experimental results of a large number of studies have shown that by preprocessing the response signal of the CUT, the speed and accuracy of fault diagnosis can be effectively improved. Common signal preprocessing methods include STFT, WT, WPT, EMD, EEMD, [
14] and empirical wavelet transform (EWT) [
15]. Although WT can be used continuously as a time function for signal localization analysis, it can only decompose the low-frequency part of the signal and the level of detail is insufficient. WPT can process the high- and low-frequency parts of the signal, but cannot perform data-driven frequency partitioning [
16]. EMD can realise the adaptive decomposition of the original signal, but it lacks a theoretical basis and is prone to modal aliasing and end effects [
17]. Although EEMD can eliminate mode aliasing and end effects, the algorithm is sophisticated and the time complexity is huge. The EWT proposed based on EMD and wavelet theory is not limited by the signal frequency band and can better eliminate mode aliasing and endpoint effects [
15]. In fault diagnosis, support vector machines (SVMs) and artificial neural networks (ANNs) are the two most popular fault classification methods. SVM as a classifier requires additional feature analysis, extraction, or fusion, which can increase the complexity of analog circuit fault diagnosis. Compared with SVMs, ANNs can automatically learn the characteristics of the signal without manual intervention for feature analysis and processing.
Inspired by the above papers, a novel analog circuit fault diagnosis method is proposed in this paper, which first applies a multi-input ResNet to analog circuit fault diagnosis. In addition, a square wave is used as the stimulus of the CUT, and then responses are preprocessed by the improved EWT. The multi-input ResNet is used to complete feature extraction and fault diagnosis on the basis of the components decomposed by the improved EWT. This paper is proposed mainly based on the following ideas.
The components of the response signal vary among different CUT fault types. The improved EWT can effectively extract each component of the response signal, which is conducive to reducing the input and layer number of the neural network and improving the efficiency of feature extraction and fault diagnosis;
The multi-input ResNet can richly learn the characteristics of each component without extra feature analysis and processing, which is beneficial for reducing the complexity of analog circuit fault diagnosis and improving the accuracy.
The rest of this paper is organized as follows. The second section introduces the analog circuit fault diagnosis method proposed in this paper. The third section verifies the effectiveness of the proposed method by the Sallen–Key bandpass filter circuit, CSTV filter circuit, and leap-frog low-pass filter circuit. Finally, the fourth section concludes and summarises the work of this paper.
2. Methodology
2.1. Proposed Framework for Fault Diagnosis
Based on the theory of EWT and ResNet, this paper makes subtle improvements to EWT and proposes a multi-input ResNet model. Moreover, the improved EWT and multi-input ResNet are applied to analog circuit fault diagnosis.
Figure 1 shows the framework of proposed method. The first step of the method is to take the square wave as the stimulus of the CUT and collect the response of the output of the circuit. Then, the improved EWT is employed to preprocess the collected data and divide the preprocessed data into a training set, validation set, and test set. The multi-input ResNet model is trained with the training set, and the optimal multi-input ResNet model corresponding to the highest verification accuracy is acquired with the validation set. Finally, the test set is input to the optimal multi-input ResNet model, and the result of fault diagnosis is obtained.
2.2. Theory of EWT
EWT is a new method of adaptive wavelet decomposition proposed by Gills in 2013 [
15]. The main idea is to extract different modes of a signal by constructing a set of bandpass filters.
Figure 2 shows the workflow of the EWT method. The first step of the algorithm is to convert the signal from the time domain to the frequency domain by using the Fourier transform method. Subsequently, we segment the Fourier spectrum by detecting the boundaries automatically to construct a bandpass filter bank. Finally, the AM-FM components of the original signal centred on a specific frequency are obtained by filtering.
Suppose the Fourier axis of a signal is normalised to . To follow Shannon’s theorem, the discussion scope is limited to . The Fourier support interval is partitioned into N consecutive segments, and each segment is denoted as , where and denote the boundary of each segment, with , , , and . N consecutive segments, excluding and , still need N-1 boundaries. The remaining boundaries of the divided Fourier spectrum can be determined according to the following:
Local maxima other than 0 and should be found in the spectrum and arranged in descending order;
If the number of local maxima is less than , retain all the maxima and reset the number of Fourier segments to . Otherwise, retain the first maxima;
Then, the −1 boundaries can be defined as the centre of two consecutive maxima.
As shown in
Figure 3, the transition zone is defined as the grey hatched area of width
, where
and
. We can ensure that there is no overlap between two consecutive transition zones when
.
The empirical wavelets are equivalent to bandpass filters with band width
. The empirical scaling function
and the empirical wavelet function
can be expressed by (1) and (2), respectively, based on the idea of constructing Littlewood–Paley and Meyer’s wavelets.
The function
is an arbitrary
function that meets the basic requirements, as in (3).
It has been proven in practice that many polynomials can satisfy this condition, although the polynomial proposed by Daubechies used by Gilles is widely used, as shown in (4).
EWT is analogous to the conventional WT. As shown in (5) and (6), the detail coefficients and approximation coefficients can be given by the inner product with the empirical wavelet function and empirical scaling function, respectively, where
indicates Fourier transform,
indicates inverse Fourier transform, and
represents complex conjugation.
Following this formalism, we can obtain the empirical mode component
, which is expressed as follows:
where
denotes convolution.
From the above, it is evident that the AM-FM components composed of are directly influenced by segmentation boundaries. Thus, boundaries can determine the decomposition effect of EWT.
2.3. Stimulus-Based Improved EWT
In this section, an improved EWT method with a new boundary condition based on stimuli is proposed. In the SBT method, stimuli are very important for simulation, and they must be capable of transmitting fault information between one or more nodes [
18]. At present, the two most prevalent excitation signals in analog circuit fault diagnosis are pulse signals [
9,
10,
12,
13] and sinusoidal sweep signals [
8,
11,
19,
20,
21]. Fault information can be transmitted by pulse signals and sweep signals, and fault diagnosis can be accomplished by analysing circuit response signals. However, the impulse response only contains time domain information; therefore, it is difficult to analyse in the frequency domain. The sweep response of the circuit is a kind of unsteady signal, which increases the difficulty of frequency domain analysis.
Previous studies [
22,
23] combined multiple sinusoidal signals of different frequencies as the excitation of the CUT and verified the effectiveness of multifrequency analysis in analog circuit fault diagnosis. Inspired by these articles, this paper takes advantage of the characteristic that the square wave signal consists of multiple frequency components of fundamental and odd harmonics, and a square wave is used as the stimulus at the input of the CUT. Assuming that the square wave signal
is of frequency
and amplitude E, (9) is the Fourier series expansion of
, where
. Using the square wave as the excitation of the CUT can not only transmit fault information and meet the needs of multiple frequencies but is also more convenient for the time and frequency domain analysis of the square wave response of the CUT.
The main idea of EWT is to construct a bandpass filter bank to obtain AM-FM components centred on a specific frequency. The traditional EWT arranges the local maximum values in the spectrum in descending order and takes the centre of two continuous local maximum values as the boundary of the spectrum segmentation. Thus, (1) and (2) can be used to construct a bandpass filter bank to obtain component signals.
Analog circuits are particularly complex, and most of them are nonlinear. When a square wave is used as a stimulus, the components of the circuit response are affected by different faults; therefore, the local maxima of the spectrum may be inconsistent in different faults. As a result, the centre frequency of the AM-FM components of the response of the same CUT in different faults is not necessarily the same, which will result in the inability to accurately analyse the impact of different faults on the components, thus limiting the improvement of the analog circuit fault diagnosis accuracy. Therefore, for the stimulus selected in this article, the traditional EWT used for the preprocessing of the response signal at the output of the analog circuit will no longer be applicable. To accurately reflect the effect of different analog circuit faults on the components, this paper uses a priori knowledge on the frequency of the excitation to determine the spectrum splitting boundaries in the improved EWT. Suppose that the Fourier axis of
is normalised to
, and the fundamental frequency of the square wave can be denoted as follows:
where
denotes the sampling frequency of
. According to (9), the square wave is mainly composed of fundamental and odd harmonics. If the boundary of the splitting spectrum is determined at even times,
, the components with odd times,
, as the centre frequency can be accurately extracted. Therefore, the boundaries in the improved EWT except for 0 and
can be expressed as follows:
The specific implementation steps of the improved EWT are as follows:
According to the characteristics of the CUT, select the square wave signal with frequency f as the excitation of the CUT;
Perform Fourier transform on the response signal at the output end of the CUT, obtain the spectrum and convert the signal to the frequency domain for analysis;
Use as the boundary for dividing the Fourier spectrum;
Obtain the AM-FM components of the signal based on Equations (1) and (2).
2.4. Construction Method for the Multi-Input ResNet
In the field of artificial intelligence, ANNs are widely used in fault diagnosis due to their strong expression ability and learning ability. However, with increasing ANN network depth, the training accuracy gradually increased to saturation and then began to degrade rapidly. The deep residual network (ResNet) proposed by He. Kaiming in 2016 can be used to resolve the problem of degradation [
24]. ResNet is based on the following concepts:
The features obtained by shallow neural networks are not sufficiently abstract. By increasing the layers of the neural network, the abstraction of features can be improved and the training effect for some specific tasks can be improved to some extent.
With the increase in neural network layers, the training accuracy of the neural network gradually becomes saturated and then rapidly decreases. This degradation problem limits the improvement of neural network training accuracy.
In theory, adding identity mapping to the optimal shallow neural network can not only increase the depth of the neural network, but also retain the same training errors as the shallow neural network so that the deeper network can perform better than the shallow network.
Based on these ideas, the problem of gradient degradation can be handled by adding identity mapping to the shallow neural network. The implementation of ResNet is equivalent to fitting an identity map.
The structure of the deep residual learning block is shown in
Figure 4. The residual block is realised by a shortcut connection, which is equal to adding the input and output of the block directly and activating the block by the activation function. Therefore, the introduction of the identity shortcut does not increase the computational complexity, nor does it require additional parameters. In fact, identity mapping is ideal and impossible to realise. And it’s a desired underlying mapping. Therefore, the deep residual learning block can only be used to infinitely close the identity mapping by underlying mapping.
Suppose that the underlying mapping realised by the deep residual learning block is H(x), where x represents the input of the deep residual block. F(x):= H(x) − x is defined as a residual mapping, and then H(x) = F(x) + x. The deep residual block is infinitely close to H(x), which is equivalent to stacking multiple nonlinear layers in the residual block to approximate F(x). It is easier to implement residual mapping with multiple nonlinear layers to approximate F(x) to 0 than to approximate identity mapping with multiple nonlinear layers.
Figure 5 presents the structure of the multi-input ResNet based on the deep residual learning block. The AM-FM components of the response of the CUT obtained by the improved EWT are input from different input terminals of the multi-input ResNet, and the feature vector of each AM-FM component is cascaded. Finally, the result is output through the fully connected (FC) layer and softmax function. The multi-input ResNet model is obtained by combining the input layer, multiple ResNet units, concat layer, and FC layer. There are N ResNet units with the same structure in
Figure 5. The main purpose of this structure is to use a ResNet unit to learn the characteristics of an AM-FM component and sufficiently learn the characteristics of each component. Although the structure of each ResNet unit is the same, their weights and biases obtained by training are different to obtain more abundant fault characteristics under different CUT fault types.
Each ResNet unit consists of a convolution block, 4 residual blocks and an average pooling layer. The convolution block consists of a one-dimensional convolution layer, batch normal (BN) layer, RELU layer, and average pooling layer. The residual block is constructed in the manner described in
Figure 4, and the details are shown in [
24].