# An Improved ABC Algorithm and Its Application in Bearing Fault Diagnosis with EEMD
## 2 The Improved Artificial Bee Colony Algorithm
### Generalized Ackley Function  
\[ \begin{split} f_{4}(x)=-20 exp\left(-0.2\sqrt{\frac{1}{D}\sum_{i= 1}^{D}x_{i}^{2}}\right)-exp\left(\frac{1}{D}\sum_{i=1}^{D}cos(2\pi x_{i}) \right)+20+e(-32\leq x_{i}\leq 32)\\ min(f_{4})=f_{4}(0,\dots,0)=0\end{split}  \tag{10}\]  
This function is a multi-peak function that is rotated, continuous, and inseparable. Since it adjusts the exponential function by the cosine wave, it has many local optimal values, which makes it difficult to find the global optimal value. This function is used to detect the global convergence speed of an algorithm. When the dimension increases, its direction gradient and the direction of advancement are various. Figure 2: _Cont._It is found from Figure 2 that using the improved ABC algorithm, a smaller objective function value can be obtained when iterating the same times (bigger than 200) compared with the genetic algorithm, particle swarm algorithm and artificial bee colony algorithm. (The smaller the objective value, the better the decomposition result). The precision and accuracy of searching the best solution are significantly better than that of the other three algorithms. So the improvement has the effect. Figure 2: Evolution curve of each function. (**a**) Sphere function; (**b**) Rosenbrock function; (**c**) Griewank function; and (**d**) Ackley function. The Implementation of Optimizing the EEMD Parameters Using Improved Artificial Bee Colony Algorithm  
According to the experience, the decomposition number \(N\) required by EEMD is closely related to the white noise amplitude coefficient \(e\), the intrinsic relationship is shown in Equation (11) [17]. \[N=\Big{(}\frac{e}{\varepsilon}\Big{)}^{2}, \tag{11}\]  
where, \(\varepsilon\) is the decomposition error. Generally, \(e=0.2\), \(\varepsilon=2\%\), and \(N=100\)[17]. In order to reduce the error caused by the addition of noise, according to literature [18], the minimum value of \(N\) is 20. Therefore, \(N\) is taken as 20 in this paper, the white noise amplitude coefficient \(e\) will be optimized using improved artificial bee colony algorithm. The purpose of adding white noise in EEMD is to smooth the abnormal events to make the distribution of signal extreme points more uniform, yet the influence of different \(e\) on the distribution uniformity of extreme points is different. The amplitude difference and the spacing (interval points) of the adjacent points of the maximum (minimum) sequence respectively reflect the longitudinal and the lateral distribution of the maximum (minimum). When the amplitude difference and the spacing of adjacent points of the maximum (minimum) sequence do not change too much, which means when the fluctuation is small, the distribution of the maximum (minimum) is uniform. The degree of the fluctuation of the maximum (minimum) sequence can be measured by the standard deviation. If the standard deviation is small, the fluctuation is small, and vice versa. According to literature [18], in order to make the distribution of the maximum (minimum) sequence more uniform, the amplitude difference and the spacing fluctuation of the adjacent points of the maximum (minimum) sequence should be smaller. So, for different \(e\), calculating the standard deviation std1_max (std1_min) of the amplitude difference and the standard deviation std2_max (std2_min) of the spacing of the adjacent points of the maximum (minimum) sequence, taking into account the two variation together, the multiplication std_max (std_min) can be gotten. When std_max and std_min are the smallest, the vertical and horizontal fluctuations of the signal maximum (minimum) sequence are the smallest, which means the distribution is the most uniform. Std_max and std_min are shown in Equations (12) and (13). In the optimization process, the objective function is selected as (std_max) + (std_min), and the white noise amplitude coefficient \(e\) which minimizes the objective function is selected as the best one.