Analog circuit fault diagnosis based on enhanced Harris Hawks optimization algorithm with RBF neutral network

Circuit faults are caused by the change of device parameters in the analog circuit. Aiming at the problems that the fault feature extraction is difficult and the fault signal cannot be effectively classified, an enhanced Harris Hawks algorithm is proposed to optimize the parameter optimization process in the RBF neural network, so as to realize the fault identification and diagnosis of the analog circuit. Based on wavelet packet analysis, the output response of the analog circuit is decomposed, and the fault feature vector is extracted. Taking the power conversion circuit in the electronic interlocking system as the research object, 500 sets of data are collected, and the EHHO‐RBF algorithm is trained and tested to realize the fault diagnosis of different faults, and compared with other neural network fault algorithms, the experimental results show the accuracy of fault diagnosis of EHHO‐RBF method is about 96.5%, which verifies the effectiveness and feasibility of the algorithm.

of analog circuit fault diagnosis have been put forward, the fault diagnosis theory or method is still a considerable distance from practicality because of various fault phenomena, large discreteness of component parameters and extensive nonlinearity. The development of neural network with the ability of self-learning and classification has certain guiding significance in the diagnosis of analog circuit faults. 9 Heidari proposed a new swarm intelligence algorithm, the Harris Hawks Optimization (HHO) algorithm in 2019. 10,11 Compared with other heuristic algorithms, this way of searching and chasing prey is very competitive. 12,13 At the same time, HHO has been widely used in the fields of image recognition, engineering constrained optimization problems, neural network and photovoltaic cell modeling because of its excellent search ability and implementation ability. 14 The traditional HHO algorithm has some shortcomings such as low optimization accuracy, slow convergence speed, and easy to fall into local optimization. Many scholars have proposed different improvement to enhance the traditional HHO algorithm. Guo Yuxin introduced elite reverse learning and golden sine algorithm to improve population diversity and algorithm convergence accuracy. 15 Liu et al. jumped out of the local optimum by setting the square neighborhood topology and random numbers. 16 Zhu et al. introduced the chemotaxis correction mechanism of the bacterial foraging algorithm to improve the optimization accuracy, and integrated the energy consumption law of biological movement into the energy factor to balance the exploration stages. 17 Chen et al. proposed a novel HHO algorithm that integrates mutually beneficial symbiosis and reverse learning of lens imaging to improve the convergence speed and optimization accuracy of the algorithm. 18 Sihwail et al. improved the global search ability by introducing an elite reverse learning mechanism and three search strategies to avoid falling into local optimum. 19 Li et al. speeded up the exploration by the logarithmic spiral and adversarial learning strategy. 20 An enhance HHO algorithm proposed and applied to the optimization of the RBF neural network to form an EHHO-RBF algorithm. A common power conversion circuit is used as an experimental example, and its diagnostic performance is analyzed to explore the application possibility.

WAVELET PACKET ANALYSIS
The wavelet packet realizes the non-redundant decomposition of the signal, including the low-frequency signal part and the high-frequency signal part of the sample, as the basis for the analysis of frequency and time resolution. 21 In the signal sampling of the analog circuit, the energy change within each frequency band of the output signal reflects whether the important components in the analog circuit are faulty, and the signal energy within the frequency bands represent fault states. The conditions are compared with the change in the energy value of each frequency layer in the simulated output response. The wavelet packet function U n i,j (a) is defined as follows In the Equation (1), n is the number of oscillations; i is the scale coordinate; j is the position coordinate. If and only if n = 0,1; i = j = 0, the initial wavelet packet function is defined as In the Equation (2), (a) is the orthogonal scale function; (a) is the orthogonal wavelet function. When n = 1, 2, … , other wavelet packet functions are expressed as The function set {U 2n (a)} (n = 0, 1, … ) defined by Equation (3) is the wavelet packet about the orthogonal scale function.
Wavelet packet analysis is divided into two processes: decomposition and reconstruction. The wavelet packet decomposition process is shown below.
Set g n i (a) ∈ U n i , then g n i (a) is expressed as In Equation (4) In Equation (5), t l−2n is the low-pass filter coefficient in the multi-scale analysis, b l−2n is the high-pass filter coefficient.
In wavelet packet reconstruction algorithm, {d n i+1,j } is obtained from {d n i,2j+1 } and {d n i,2j } as Wavelet packet decomposes the signal into low-frequency coefficients and high-frequency coefficients at a certain scale, and then changes the scale to continue to perform more finer divisions, and finally obtains 2 n frequency bands with equal frequency ranges.
When the output response changes, the energy value of the output response in each state will change significantly. The number of layers of wavelet packet decomposition is set to 2. Through 2-layer wavelet reconstruction, the waveform energy in different frequency bands is calculated, and the eigenvector corresponding to the fault state is formed after normalization. Specific steps are as follows.
1. The energy of each frequency band in the last layer of wavelet packet decomposition is calculated, the each sub-band signal energy is shown as follow In the Equation (7), E 2i is the energy value of the wavelet packet decomposition subband i of the fourth layer; j is the discrete point of the ith subband of the fourth layer; x ij is the amplitude. 2. Calculate the total energy of the 2th layer subband: 3. For normalization, replace the energy-normalized eigenvalues with: 4. Construct the eigenvectors of the output waveform energy of analog circuit fault diagnosis:

RBF NETWORK
The RBF network includes an input layer, a hidden layer and an output layer, as shown in Figure 1.
The number of nodes in the layers is m, k and n. The input layer represented the abnormal feature vector by X = [x 1 , x 2 , … x m ] T , and the output layer is the fault type, represented by Y = [y 1 , y 2 , … y n ] T . The radial basis function, Gaussian function, realizes the nonlinear mapping between the input layer and the hidden layer. The hidden layer to the output layer is a linear mapping. Gaussian function contains two undetermined parameters, the center h and the variance . The output of the ith hidden layer node k k is as formula (11) i (X, h i ) = exp In Equation (11), the Euclidean distance is chosen as the norm index: is the function center and i is a variable.
The jth output node of the output layer is expressed as formula (12) In Equation (12) ij is the connection weight coefficient between the ith hidden node and the jth output node.

The basic idea of HHO algorithm
Aiming at the problems of the traditional algorithm, EHHO algorithm has been improved in three aspects. First, chaotic initialization is performed before the algorithm iteration to generate the initial population, so that the individuals are evenly distributed in the solution space, and the search ability of the algorithm is improved; second, the step size of the Levy flight is controlled by the Cauchy function to achieve a smooth transition and improve the search accuracy; finally, random noise interference is added in the late iteration to increase the variability and convergence speed. The HHO algorithm consists of a global exploration phase and a local development phase, each of which is described as follows.

Global exploration stage
In this stage, the exploration mechanism of HHO was put forward. In HHO, Harris Hawks randomly perch at certain locations and wait to discover prey based on two strategies, each with equal chances.
where, X(t + 1) is the position of the Hawks in the next iteration, X rabbit (t) is the position of the current optimal solution, X(t) is the current position of the hawk, r 1 , r 2 , r 3 , r 4 and q is the random number within (0, 1), UB and LB is the upper and lower bound of the population, respectively, X rand (t) is the randomly selected individual from the current population, and X m (t) is the average position of the current population.

Transition stage
The HHO algorithm is transferred from the exploration stage to the exploration stage according to the escape energy of the prey. During the escape behavior, the energy of the prey is significantly reduced and is calculated as follows.
where, E is the escape energy of the prey, T is the maximum iteration number, E 0 is the initial state of the energy, and is a random number within (−1, 1).

Local development stage
In this stage, the Harris Hawks make a raid by attacking the target prey detected in the previous stage, while the prey tries to escape. Based on the escape behavior of the prey and the pursuit strategy of the Harris Hawks, HHO proposed four possible strategies to simulate the attack phase. The successful escape probability of the prey is denoted by r. When r < 0.5, the prey successfully escapes; when r ≥ 0.5, the prey fails to escape. The siege strategy of Harris Hawk is simulated by the parameter E, when |E| ≥ 0.5, the soft siege is executed; when |E| < 0.5, the hawk executed the hard siege.
In the case of r ≥ 0.5 and |E| ≥ 0.5, the prey has enough energy to escape by randomly jumping but eventually fails. Harris Hawks make a raid on the prey through soft siege with the following update equation.
where X(t) is the difference between the optimal position and the current position in the iteration, r 5 is random within (0, 1), and J = 2 (1 − r 5 ) represents the random jump strength of the prey during the escape condition.
In the case of r ≥ 0.5 and |E| < 0.5, the exhausted prey has low escape energy. Harris Hawks conducts a surprise attack by hard siege, and the position update equation is as follows: Case 3. Soft siege with progressive rapid dives.
In the case of r < 0.5 and |E| ≥ 0.5, the prey has enough chance to escape successfully, and the Harris Hawks still conduct a soft siege before attacking, implementing two strategies, and when the first strategy is ineffective, the second strategy is implemented.
In the Equation (20), D is the dimension of the problem, S is a random vector of dimension D, LF is the levy flight function, and the calculation equation is as follows: where, μ, v is a random number within (0, 1), and β is set to 1.5, so the strategy for position update is as follows: Case 4. Hard siege with progressive rapid dives.
In the case of r < 0.5 and |E| < 0.5, the prey does not have enough energy to escape, so a hard siege is made before attacking and killing the prey, the Harris Hawks try to shorten the average positional distance to the prey. The update strategy is as follows:

Chaos initialization
Whether the initialization population is evenly distributed in the solution space is an important factor affecting the algorithm convergence speed and optimization accuracy. The chaotic variable has good ergodicity and randomness, which can improve the global search ability of the algorithm while ensuring the diversity of the population. The principle of chaotic initialization is the chaotic principle, similar to the butterfly effect, a small difference in the initial stage may produce a huge difference after iteration. Taking advantage of this feature, a chaotic sequence is generated in the initialization stage, which can spread over the solution space after several iterations. In order to make the initial Harris Hawks population evenly distributed in the solution space, the logistic chaotic map is used to initialize the population. The logistic chaotic map equation is as follows: In the Equation (27), μ is the logistic control parameter, ∈ [0, 4], Z ∈ [0, 1], it takes μ = 4. Map the resulting chaotic sequence into a new solution space: In the Equation (27), X(t + 1) is the position of the Harris Hawks, X U and X L are the upper and lower bounds of the solution space, and Z n+1 is the chaotic sequence generated in the above equation.
In the two-dimensional search space, assuming that the population size is 30, the initial population generated by random initialization and Logistic chaotic initialization is shown in Figure 1. Compared with random initialization, the initial population generated by Logistic chaotic mapping can be more uniformly distributed in the solution space.

Cauchy adaptive Levi flight
Levy flight is a strategy to help the algorithm jump out of the local optimum. In the traditional HHO algorithm, Levy flight uses a fixed step size, and it is likely that a larger step will appear in the search process. The accuracy of the algorithm will be weakened by later searches. Therefore, the Cauchy function is used to control the step size of Levi's flight, which is a smoothly decreasing function to the transitions from initial large step search to small. Based on the above analysis, the value of β in Equation (21) is changed into the adaptive step size of the following equation instead of 1.5:

Random noise interference
In the search stage, most individuals of the Harris hawk population will gather in a small area. the similarity of individuals increases dramatically. After many iterations, the optimal solution may not be updated and the algorithm will perform invalid search. The mining ability of the algorithm is weakened, and computing resources are wasted. Therefore, random white noise interference is performed on individuals to enhance the ability of algorithm to jump out of the local optimum and improve the convergence speed. The model is as follows: In the Equation (29), X(t + 1) is the position of Harris Hawks after interference, X * (t + 1) is the position of Harris Hawks before interference, α is a coefficient and obeys a normal distribution, and is a random number within (0, 1).
The EHHO enhances the search optimization performance of the algorithm in many aspects. The EHHO algorithm is shown in Figure 2:

Performance of EHHO algorithm
In order to investigate with the performance of EHHO optimizer, 23 classical benchmark functions with three categories are selected. 22 Seven unimodal functions can reveal the exploitative capacities of the optimizers; six multimodal functions and 10 fixed-dimension functions give the diversification and local optimal avoidance ability of algorithms. The details of the benchmark functions are shown in Table 1. SCA (Sine Cosine Algorithm), SSA (Salp Swarm Algorithm), 23 as well as traditional HHO, 10 are chosen as referenced algorithms to verify the effectiveness and superiority of the EHHO algorithm. All the algorithms programmed by Matlab R2017b are carried out in the same simulation experimental platform including 64-bit Windows 10 operating system, the Intel i7-6500U processor, and the memory of 8 GB. The population number is set to 30 and the maximum number of iterations is 500, other parameters of the comparison algorithm are consistent with the original literature. The average value and standard deviation value are taken as evaluation metrics. The average value is used to measure F I G U R E 2 the flow chart of EHHO algorithm the solution accuracy of the algorithm, and the standard deviation value is used to measure the robustness of the algorithm.
To verify the optimization ability of the improved algorithm in low dimensions, f 1 ∼ f 12 in Table 1 are solved independently in 30 dimensions, and the dimensions of f 13 ∼ f 20 are consistent with those in Table 1, and the average and standard deviation of each algorithm calculated independently for 30 times are recorded, and the experimental results are shown in Table 2. The optimal results calculated by the individual algorithms are sorted in the rank line.
As can be seen from Table 2, for the selected test function, the optimization ability of the EHHO algorithm is significantly better than that of the other three comparison algorithms. When solving the unimodal test function f 1 ∼ f 7 , the optimization effect is the best and significantly better than the HHO algorithm, in which the global minimum value of f 5 is located in a parabolic valley, the fastest descent direction on the valley surface is approximately perpendicular to the direction of reaching the global optimal value, and the value in the valley does not change much, most intelligent optimization algorithms are difficult to find the global optimal solution, EHHO is significantly better than other comparison algorithms. Overall, EHHO has a stronger optimization ability when solving the unimodal test function. For the

Range The optimal value
Unimodal benchmark functions Multimodal benchmark functions

5]
0.398 multimodal test functions f 8 ∼ f 13 , EHHO outperforms all comparison algorithms except solving f 13 . As for fixed dimension multimodal benchmark functions f 14 ∼ f 23 , EHHO continues showing the best performance in 7 functions. The above statistics show that among the 23 benchmark functions; the proposed EHHO is better than all comparison algorithms in 18 test functions, place the second place in 3 test functions, which proves that EHHO has strong optimization ability.
In order to further elaborate the convergence performance of EHHO, three represent algorithms in each benchmark category are calculated in 30 times independently to solve the convergence curves as shown in Figure 3, listing results of f 1 , f 10 and f 14 . It is easy to find that EHHO can converge to the global optimal value faster among all the functions and reach the best convergence accuracy.

EHHO-RBF ALGORITHM
The basic idea of analog circuit fault diagnosis based on EHHO-RBF neural network is to excite the circuit to obtain fault output signal and data, and then extract fault characteristics. When the value of the feature extraction is large, the data are normalized. The processed data is input into the neural network for training. The location of fault is calculated from the output of the neural network. The weights and thresholds of the neural network are optimized through the EHHO optimization algorithm, as shown in Figure 4.

Application of EHHO algorithm
The electronic interlocking system is used in CBTC system and System safety was ensured by various safety measures adopted in the software and hardware. 24 Its output performance is highly sensitive to the voltage stability, which means the voltage conversion circuit should be considered as one step in the system critical design.

F I G U R E 5 The schematic diagram of the voltage conversion circuit
The voltage conversion circuit in the signal module of the electronic interlocking system is selected as the research object, whose schematic diagram is shown in Figure 5. The SC1655 LDO module DCDC03 is used to realize the voltage conversion from 5 to 3.3 V. F04 is the self-recovery insurance of the current 1 A, which realizes the overcurrent protection of the input voltage of 5 V and the current greater than 1 A. Capacitor C09 = 10 uF/16 V, C10 = 0.1 uF/50 V to realize filtering the input voltage of 5 V. Resistor R013 = 1.65 K, R012 = 2.87 K, and the output voltage set 3.3 V. C011 = 220 uF/16 V and C012 = 0.1 uF/50 V realize filtering the output voltage of 3.3 V, TVS04 realizes overvoltage protection for SMAJ5A. Resistor tolerance is 1%, and capacitance tolerance is 5%. The output voltage is 3.3 V.
By comparing the detection sensitivity, it is found that the capacitors C09 and C11 and the resistors R012 and R013 have the most obvious influence on the output voltage waveform. Therefore, it is necessary to focus on these four kinds of devices. Eight separate fault states C09↑, C09↓, C11↑, C11↓, R012↑, R012↓, R013↑, R013↓. Symbol ↑ indicates that the device failure value is greater than the allowable error, and symbol ↓ indicates that the device failure value is less than the allowable error.
The circuit is analyzed through Matlab simulation, and the normal state and 8 abnormal state values of the circuit are obtained, with a total of 500 groups. The feature vector [c 0 , c 1 , c 2 , c 3 ] is extracted by wavelet packet decomposition and used as the input of the neural network after normalization. Assume the expected outputs of RBF are n 1 , n 2 , n 3 . Then 300 sets of data are taken as training samples, and the remaining 200 sets of data are used for experiments. Table 3 shows part of the training data. The diagnosis results for the remaining 200 groups of sampling data are shown in Table 4. As can be seen from Table 3, the diagnostic performance of the EHHO-RBF algorithm is good. The diagnostic accuracy of normal state, C09↓, C11↓, R012↓ and R013↑ is 100%, and the diagnosis of other types of samples is less than 2 misdiagnosis. One hundred and ninety three samples were correctly diagnosed and only 7 samples were misdiagnosed, with an accuracy rate of 96.5%. In order to further, verify the effectiveness of the algorithm, BP neural network, RBF neural network, HHO-RBF neural network and EHHO-RBF neural network are trained and tested by the samples respectively. The comparative results are shown in Table 5.
As can be seen from Table 4, compared with BP neural network, RBF neural network has better performance, shorter training time and smaller training error. The accuracy rate of RBF neural network is 91.4%, and that of BP neural network is 81.3%. The accuracy rate of HHO-RBF neural network reaches 93.1%, and the training time is only 8.73 s. The training time and error of EHHO-RBF neural network reaches nearly half that of HHO-RBF neural network, and the training time is 8.73 s and error is 0.54%, which indicates that the model has the ability to find fault with minimum error in a short time. The accuracy of the EHHO-RBF algorithm is 96.5%, proving the effectiveness and great advantages in the field of fault diagnosis.

Comparison analysis
Some innovative methods are developed to analyze the fault in the analog circuits. Paper Gao et al. 24 gives a method with generalized multiple kernel learning support vector machine (GMKL-SVM) based on wavelet fusion features. The fault diagnosis of the analog circuit was achieved by an improved deep forest scheme based on nonparametric predictive inference (NPIDF) in Ref. 25. Two standard circuits, sallen-key bandpass filter circuit (case 1) and four-op-amp biquad high-pass filter circuit (case 2), are testbench cases to show the comparative performance. The experimental parameters in two circuits are the same as Table I and Table III from paper Gao et al. 24. Five common metrics, false positives, false negatives, precision, accuracy and fault diagnosability, are used to evaluate the performance of fault diagnosis. 25 Comparative experimental results are listed in Table 6. According to the results in Table 6, it can be found that the EHHO-RBF algorithm shows slight better performance than GMKL-SVM classifier in five evaluation index. That is inherited from better character of EHHO algorithm compared with SCA algorithm in the similar computing framework. NPIDF method gives relatively undesirable results, because it has a high risk of overfitting and low explanatory effect for predictions, furthermore, its training requires a large number of parameters leading to the slow training process.

CONCLUSION
An algorithm that combines the RBF neural network and the EHHO algorithm is proposed. Taking the fault state of the voltage conversion circuit in the electronic interlocking system as the research object, the experimental samples were obtained and diagnosed by proposed EHHO-RBF algorithm. This research results show that the designed EHHO-RBF algorithm has good performance with short training time, small error and high accuracy rate compared with another algorithms. A theoretical basis for the application of the algorithm is provided in the field of analog circuit fault diagnosis.