Bearing Fault Diagnosis Based on Stochastic Resonance and Improved Whale Optimization Algorithm

: In light of the problem of difﬁcult model parameter selection and poor resonance effects in traditional bearing fault detection, this paper proposes a parameter-adaptive stochastic resonance algorithm based on an improved whale optimization algorithm (IWOA), which can effectively detect bearing fault signals of rotating machinery. First, the traditional WOA was improved with respect to initial solution distribution, global search ability and population diversity generalization, effectively improving the global convergence of the WOA. Then, the parameters of the bistable stochastic resonance model were optimized using the improved WOA, and adaptive adjustment of the stochastic resonance parameters was realized. Finally, the Case Western Reserve University bearing data set and the XJTU-SY bearing data set were used as fault data for the actual bearing to be tested for experimental veriﬁcation. The signal-to-noise ratios of the detected fault frequencies for the above two data sets were − 20.5727 and − 21.1289, respectively. Among the algorithms compared, the IWOA proposed in this paper had the highest signal-to-noise ratio of the detected fault frequencies. The experimental results show that the proposed method can effectively detect a weak bearing fault signal in enhanced noise.


Introduction
Rotating machinery, such as gas turbines, blowers, water pumps, etc., represents a very important type of power equipment used in industry. Bearings, as an important part of rotating mechanical systems, may fail when overloaded for a long time, affecting the safe and stable operation of the equipment. Because the characteristic signal of bearing failure is often submerged in the intense noise of rotating machinery operation, it can be difficult to detect and analyze effectively. Thus, it is of great importance to investigate how to detect weak bearing fault signals in intense noise to ensure the safe and stable operation of rotating machinery.
At present, there are several research directions relating to the detection of weak signals of bearing faults. One is to detect weak signals by suppressing noise, such as by using one of the following methods: the wavelet transform method [1], the coherence analysis method [2], the chaotic oscillator method [3], Hilbert variation [4], empirical mode decomposition [5], variable Partial mode decomposition [6] and others. The second is to detect weak signals based on data-driven and deep learning methods [7,8]. These methods can obtain a comprehensive evaluation, with high accuracy, of the system operation and fault conditions using the experience and knowledge of many subject experts to process and analyze various types of information concerning system operation. However, due to the large number of experimental samples required, such methods are not suitable for all fault diagnostic purposes. The third is to use noise energy to enhance the signal energy to be tested-an example of this approach is the stochastic resonance (SR) method [9,10]. SR has the advantage that it can superimpose part of the noise energy on the signal and achieve enhanced detection of weak signals when the input and output signals of the system are synchronized [11]. Benzi et al. proposed the use of an SR algorithm when they studied paleo-meteorological glaciers [12,13]. Over the past two decades, the theory underpinning the stochastic resonance method has continued to develop, and application of the method has been extended to mechanical fault diagnosis [14], image processing [15], optics [16], medical information processing [17], and many other areas.
The stochastic resonance (SR) method has been applied to bearing fault diagnosis of rotating machinery [18,19]. Relevant studies have shown that the selection of the model parameters of the stochastic resonance directly affects the resonance effect and has a significant impact on the fault diagnosis results obtained. Therefore, investigation of parameter-adaptive stochastic resonance has become one of the main research directions in this field. Using an intelligent optimization method to select stochastic resonance parameters has also been a major research direction in recent years [20]. However, available research suggests that problems remain, such as optimization results easily falling into local optima and low computational efficiency [21,22]. Therefore, obtaining the stochastic resonance parameters by selecting an appropriate intelligent optimization algorithm is very important to ensure the accuracy of fault diagnosis.
Whale optimization algorithms (WOAs) are a new group of intelligent optimization algorithms proposed by Seyedali Mirjalili et al. in 2016 [23]. Based on the foraging behavior of humpback whales, the algorithm constructs theoretical models of searching, encircling and hunting to achieve the optimal solution to a target problem. Compared with other optimization algorithms, WOA has the advantages of using a unique search mechanism, having fewer parameters, and being easier to understand. However, similar to other swarm intelligence algorithms, WOA also has the problems of slow convergence speed and ease of falling into local optima.
In this paper, parameter-adaptive stochastic resonance is used to detect and study the bearing fault signal. In view of the difficulty in selecting parameters for the stochastic resonance algorithm and the slow convergence speed of the whale optimization algorithm, their ease of falling into local optima, poor optimization accuracy, and other problems, combined with previous research concerning these issues, a parameter-adaptive SR using an improved whale optimization algorithm (IWOA) is proposed. The method uses chaotic iterative mapping to generate the initial whale population, which makes the initial solution distribution in the solution space uniform. Nonlinear time-varying factors and inertial weights are used to balance and improve the global search and local development capabilities and are combined with stochastic learning strategies to increase the population diversity during the iterative process. Last, but not least, Cauchy mutation is used to improve the ability of the algorithm to jump out of local optima. Experiments undertaken show that the method proposed has the advantages of using a simple model, having few algorithm parameters, exhibiting fast convergence speed, and having the capacity to detect bearing fault signals accurately and efficiently.

Bistable Stochastic Resonance
The theory of stochastic resonance concerns the detection of weak characteristic signals through a noise transfer mechanism in nonlinear systems. Generally, the process of stochastic resonance can be described by the Langevin equation, which was first used to explain the irregular motion of Brownian particles in fluids. The expression is as follows where, x is the SR output signal, U(x) is a potential function of the nonlinear system, s(t) is an input signal, n(t) is a noise signal, M is the quality of the particle, and K is the friction factor. The potential function expression of the classical bistable model is as follows: In Equation (2), a and b are the parameters of the nonlinear bistable model, a > 0, b > 0. The potential function chart of the traditional bistable model is shown in Figure 1. The bistable model has two steady points x = ± √ a/b and one unsteady point x = 0; the barrier height is ∆U = a 2 /4b. The one-dimensional overdamped motion in the double potential well provides a description of the stochastic process of the classical bistable system. By neglecting the inertia term d 2 x/dt 2 in Equation (1), setting the damping ratio K = 1, changing U(x) into the potential function of the classical bistable model, and adding noise with intensity D to the system, the Langevin equation of classical bistable system is obtained: The trajectory of Brownian particles in the classical bistable system conforms to the description of Formula (3). When the noise of the system n(t) = 0, there is only a weak periodic input signal. If the input signal amplitude A is less than the threshold A c (A c = √ 4a 3 /27b) of this system, the Brownian particle only oscillates in a single-sided potential well, and the position of the particles in the unilateral potential trap depends on the initial state. If the input amplitude A is greater than the threshold A c , the Brownian particles cross the potential barrier under the driving force, and an inter-well transition occurs. If noise n(t) is added to the system, driven by the periodic force, the potential well of the nonlinear model potential function of the system will switch periodically.
Where the input signal amplitude A is sufficiently small, an effective resonance can be achieved among the noise, the signal and the nonlinear classical bistable system. The particles can transition under noise, enabling detection of weak periodic signals.

Determination of Parameter Ranges
Kramers' rate is an important index to describe the transition ability of particles in the two potential wells. According to the classical SR principle, the SR phenomenon occurs in the output of the system when the Kramers' rate r k is equal to half of the signal frequency, namely: The traditional stochastic resonance method is often used for weak signal detection with low frequency (frequency less than 1 Hz), but the frequency of the signal to be measured is often very large in practice. Generally, the signal frequency is compressed and sampled using a rescaling technique [24] and the compression ratio is set to R.
The relationship between the input periodic signal and the system parameter a and the calculation step h are shown below: The particles can jump over a higher barrier height by accumulating energy as a result of the effect of noise. According to the research theory [25][26][27], and many simulation experiments, the range of parameter a is set as [0, 0.5], and the value range of y 2 is set as [0, 10].

WOA
The whale optimization algorithm (WOA) is a new heuristic optimization algorithm proposed by Mirjalili to imitate the hunting behavior of humpback whales. In nature, humpback whales swim spirally to their prey and shrink the enclosure at the same time, as shown in Figure 2. This predation behavior is named the bubble net predation strategy, and the following is its mathematical model expression.
where, X * represents the optimal solution in each iteration, C and B are the coefficient vectors and E is a position vector. It is important to note that each iteration should update the optimal solution, unless the optimal solution in the current iteration is better than that in the next iteration. The coefficient vectors B and C are shown as where, as the number of iterations increases, v linearly decays from 2 to 0. To enable some agents to reach optimal positions, r is an arbitrary vector in [0, 1]. In the process of humpback whale capturing prey in a spiral route, it is assumed that the chance of choosing the constriction encirclement system and the spiral model to update the whale's position are half to half, and the following is its mathematical model expression: where, p is a random number in [0, 1] and m is a constant that defines the shape of the spiral.
l is a random number in the range [−1, 1]. The following is the formula for calculating The following is the mathematical model formula for humpback whales looking for food: where, X rand is the randomly selected whale position vector.

Improved Whale Optimization Algorithm
The article presents an improved whale optimization algorithm. Firstly, this algorithm uses a chaotic iterative map to generate the initial whale population. Secondly, nonlinear time-varying factors and inertia weights are used to balance and improve the global search and local development capabilities. Then stochastic learning strategies are combined to increase the population diversity during optimization. Last, but not least, Cauchy variation is used to prevent the algorithm from falling into a local optimum.

Chaos Sequence Initialization
A chaotic iterative map is used to generate the initial whale population model to solve the problem of uneven distribution of the initial population position. The mathematical expression of the iterative map is: where, d is the control parameter, d ∈ (0, 1), and d = 0.5 is given in the paper.

Linear Time-Varying Factors and Adaptive Weights
If the traditional WOA does not search the prey thoroughly in the preceding phase, then the convergence speed during the later hunting process is slow due to the linear descent of the convergence factor v. Therefore, a piecewise nonlinear convergence factor v is proposed in the paper, which is described as follows Compared with the original convergence factor v, v enhances the ability for global exploration in the preceding phase and local development in the later period.
Because the update of the whale group location will be affected by the prey target, an adaptive weight strategy is added to optimize the position update of whales in the process of hunting, which is: So, the formula for updating the position becomes the following: The adaptive weight gradually increases with the number of iterations in the middle and late period of this iteration, which enhances the local development ability of the algorithm, enabling the whale swarm to find the target solution more quickly and accurately. The improvement effectively strengthens the optimization performance of the algorithm, accelerates the algorithm convergence and improves algorithm stability.

Random Learning Strategy
A random learning strategy [28] is added to simulate the learning mode of discussion and communication between whales. This model optimizes its own position by learning from better individuals, thereby improving the global optimization ability. The better individuals are selected in our method by comparing fitness values between individual x and a randomly selected individual x p from the population. The optimized location of better individuals can be expressed as where, the learning factor rand(0, 1) is a random number between (0, 1), which represents the difference of each individual's learning ability. The randomness learning of individuals enhances the information-sharing ability and the diversity of the population, and effectively improves the global optimization performance of the algorithm.

Cauchy Mutation Strategy
A Cauchy mutation strategy is introduced to solve the problem that the whale optimization algorithm easily falls into local optimization. The optimal individual position update with Cauchy mutation equation can be expressed as where, x * new (t) represents the new value obtained from the current optimal value after Cauchy disturbance, and cauchy(0, 1) is a Cauchy operator. The standard Cauchy distribution function formula [29] is According to the mathematical theory, the extension of the Cauchy distribution at both ends can generate random numbers far from the origin, which can enable the disturbed whales to have the ability to quickly avoid local traps. At the same time, compared with other functions, if the highest peak of the Cauchy distribution is lower, which can shorten the time spent by individuals in this search space, then the convergence speed of the algorithm is accelerated.
To verify the performance of the proposed algorithm and other optimization algorithms, four typical benchmark test functions were selected (Table 1), where F 4 represents the unimodal benchmark function, F 10 and F 11 represent the complex multimodal benchmark functions, and F 15 represents the fixed-dimension multimodal benchmark function. The algorithms involved in the comparison were the whale optimization algorithm (WOA), gray wolf optimization (GWO), bat optimization algorithm (BOA), gravity search algorithm (GSA), particle swarm optimization (PSO), and the artificial bee colony (ABC).
The population size was set to 30, the maximum number of iterations was 500, and each algorithm ran independently 30 times. The mean value (mean) and standard deviation (std) of the optimal simulation results were used as the algorithm performance evaluation index. The results are shown in Table 1.
It can be seen from Table 2 that when the average value of the optimal value was used as the evaluation index, among the four test functions of F 4 , F 10 , F 11 , and F 15 , the optimization results of the IWOA algorithm were all the best. Taking the standard deviation of the optimal value as the evaluation index of the algorithm stability, it can be seen from 30 independent simulation calculations that the stability of the IWOA algorithm proposed in this paper was worse than that of ABC in F 15 , but in F 4 , F 10 , and F 11 , the stability was better than the other six optimization algorithms, so the overall stability was still the best.
In order to more intuitively reflect the convergence speed of the algorithm proposed in this paper and the ability to jump out of the local optimum, the convergence curve of each algorithm is shown in Figure 3. As can be seen from the figure, the IWOA algorithm proposed had the fastest optimization process for the four test functions of F 4 , F 10 , F 11 , and F 15 , which can effectively save optimization time.

Stochastic Resonance Parameter Adaptation Based on Improved Whale Optimization Algorithm
The signal-to-noise ratio (SNR) is widely used to evaluate the output of SR systems. WOA focuses on searching parameters to minimize the objective function values, so this paper uses the inverse of the SNR as the fitness function. Below is the expression for SNR: where, A t is the amplitude of the target frequency, A n is the amplitude of the input signal at a frequency other than the target frequency, and N is the number of agents. According to the above analysis, the flow chart of rotating machinery fault signal detection based on the improved whale algorithm to optimize SR parameters is shown in Figure 4. The steps of optimizing SR parameters for fault signal detection of rotating machinery based on the improved whale algorithm are as follows: Step 1: Input the noisy signal, establish the calculation process of Formulas (9) and (11), and initialize the parameters of the whale optimization system. The value ranges of a, y 1 , and y 2 are [0, 0.5], [0, 1], [0, 10], respectively. The maximum iteration time is 200 and the whale population is 30.
Step 2: Optimize SR parameters through IWOA and calculate the SNR. Update the best position for particles until the maximum number of iterations.
Step 3: Obtain the optimal solution of a, y 1 , y 2 by IWOA. Then the parameters b and h are calculated according to Equations (9) and (11).
Step 4: Substitute a, b, h into the stochastic resonance system to run, and convert the calculation results into the frequency domain through Fourier transform. Diagnose the fault signal by analyzing the results of the frequency domain.

Simulation
The correctness of the method proposed in this article was confirmed by simulation experiments. The amplitude of the input signal A = 0.2, the target frequency f = 32 Hz, the phase angle θ = 0, the sampling frequency f s = 2000 Hz, the sample data length N = 2000, the noise intensity D = 1.5, and SNR = −25.0042. The waveforms in the time and frequency domains of the input signal are shown in Figure 5. As shown in Figure 5, the target frequency of the input signal was difficult to capture under the influence of noise. The SR parameters obtained after IWOA optimization and calculation were a = 0.24628, b = 0.0444, and h = 0.5844. The three parameters, a, b and h, were then substituted into the stochastic resonance system to obtain the time-domain and frequency-domain waveforms of its output, as shown in Figure 5. The SNR of the output was SNR = −14.9571, which, compared with the input signal-to-noise ratio, increased by 10.0471 dB. According to the frequency domain waveform in Figure 6, a significant spike was observed at the target frequency, and the amplitude of the frequency at the spike was much greater than the amplitude of the other surrounding frequencies. Thus, the method proposed can accurately detect weak signals.

Bearing Fault Detection Based on IWOA
6205-2RS JEM SKF deep groove ball bearings and LDK UER204 bearings were used as the research objects to detect the inner ring signal of the faulty bearing, and the main parameters of the bearing are shown in Tables 3 and 4, respectively. The fault signal data of the actual bearing to be tested were the data of the electrical engineering laboratory of Case Western Reserve University [30] and the XJTU-SY bearing dataset [31], respectively. Since the rotation speed used in the Case Western Reserve University dataset is 1750 rpm, it can be calculated that the fault characteristic frequency of the inner loop is 158 Hz, the sampling frequency is 12 kHz, and the data length of the signal is 12,000. The rotation speed used in the XJTU-SY bearing data set is 2250 rpm, so it can be calculated that the fault characteristic frequency of the inner ring is 184.38 Hz, while the sampling frequency and the data length of the signal are 14.2 kHz and 14,200 respectively.  The time domain and frequency domain waveforms of the original signal input from the Case Western Reserve University dataset are shown in Figure 7. The optimal parameters of the IWOA were a = 0.32974, y 1 = 0.79091, y 2 = 6.0012. Then, the parameters b = 98.3366 and h = 0.2243 were calculated through Formulas (10) and (12). The three parameters a, b, and h were substituted into the SR system to obtain the frequency domain waveform of the output, as shown in Figure 8. In Figure 8, the ordinate of the fault frequency point is the amplitude A t of the target frequency. It can be observed that the amplitude of the fault characteristic frequency was the largest, and the output SNR can be calculated as −20.5727, with less interference components around it. It can be seen that the method proposed in this paper can achieve the adaptive selection of stochastic resonance parameters and detect the bearing fault signal.  The original signal time domain and frequency domain waveforms input from the XJTU-SY bearing dataset are shown in Figure 9. The optimization of the SR parameters by IWOA were a = 0.1871, b = 1.3462, h = 0.2468. The frequency domain waveform of the SR output results is shown in Figure 10. Since the amplitude of the fault characteristic frequency is the largest, and there are fewer interference components around it, the fault characteristic frequency can be easily observed-the output signal-to-noise ratio was −21.1289. Therefore, the algorithm proposed can effectively detect the bearing fault frequency in different datasets.

Comparison with Other Methods
To assess the advantages of the IWOA method proposed with respect to convergence and detection effectiveness, bearing fault detection experiments were carried out using a variety of adaptive SR parameters, such as the whale optimization algorithm (WOA) [32], the spotted hyena optimizer (SHO) [33], the gray wolf optimization (GWO) [34], the bat optimization algorithm (BOA) [35], the aquila optimizer (AO) [36] and particle swarm optimization (PSO) [37].
A comparison of fault detection results for the Case Western Reserve University dataset are shown in Figure 11. Figure 11a-f, respectively, show the fault frequencies detected after optimization of the SR parameters by WOA, SHO, GWO, BOA, AO and PSO. The optimized SR parameters and the detection effects are shown in Table 5. It is evident from Figure 11 that the amplitudes of the fault characteristic frequencies processed by the above six methods were all the largest. These optimization algorithms could obtain reasonable SR parameters and apply them to signal detection, and the effects were consistent with those obtained by the proposed method. It can be seen in Table 5 that, in terms of signal-to-noise ratio, the proposed method has a larger signal-to-noise ratio compared with the above six methods, and enables easier observation of the fault characteristic frequency. In terms of time performance, except for the BOA algorithm, the calculation time for the proposed algorithm was the shortest. In the field of fault diagnosis, the signal-to-noise ratio is one of the main metrics. Therefore, the method proposed in this paper has certain advantages.  A comparison of the fault detection results of the XJTU-SY bearing dataset using the above optimization algorithms is shown in Table 6. Although the running time of the algorithm in this paper was not the fastest, it was very close to the fastest time, and the detected fault frequency signal-to-noise ratio was still the highest. According to the experimental results for the above two datasets, the proposed parameter-adaptive SR algorithm based on the IWOA has some advantages in terms of convergence speed and detection effect.

Conclusions
To solve the problem that the parameters of the traditional SR model are difficult to obtain, a parameter-adaptive SR with an improved whale optimization algorithm was proposed. This method represents an improvement compared to the traditional WOA with respect to initial solution distribution, global search ability and population diversity generalization, and can adaptively select the parameters of the SR model. A 6205-2RS JEM SKF deep groove ball bearing and an LDKUER204 bearing were used as the research objects. Bearing fault detection was performed on the Case Western Reserve University dataset and the XJTU-SY bearing dataset. The experimental results showed that the proposed method can be used to detect bearing fault signals and can effectively enhance fault signals in the noise. Compared with stochastic resonance parameters optimized by other intelligent algorithms, the method has the advantages of fast convergence speed and accurate optimization of parameters.