1 Introduction

In real world, especially in nowadays with information technology developing rapidly, many fields have faced or are facing a variety of complex optimization problems. However, with the increasing complexity of problems, traditional optimization methods have been difficult to deal with them. Fortunately, evolutionary algorithms (EAs) have very good optimization performance over these complex problems and play a more and more important role in the field of optimization. In order to solve various complex optimization problems, more and more EAs have been proposed such as particle swarm optimization (PSO) (Kennedy and Eberhart 1995), differential evolution (DE) (Storn and Price 1997), genetic algorithm (GA) (Goldberg 1989; Holland 1992) and artificial bee colony (ABC) (Karaboga 2005).

In this paper, the research object is the ABC algorithm which was proposed by Karaboga in 2005 inspired by the foraging behavior of honey bee (Karaboga 2005). The ABC algorithm has risen wide spread attention from researchers due to its outstanding optimization performance over many complex optimization problems in various fields such as artificial neural networks (Yeh and Hsieh 2012; Bullinaria and Alyahya 2014), load balancing (Xing et al. 2018), scheduling problem (Zhang et al. 2013; Sundar et al. 2015; Horng 2017; Pang and Shan 2019), power flow optimal problem (Adaryani and Karami 2013; Bai et al. 2017), optimal filter design (Bose et al. 2014), parameter estimation (Oliva et al. 2017; Chen et al. 2018) and sensor placement (Yang and Peng 2018) and so forth. Compared with traditional optimization methods, ABC has few requirements of objective function and constraints such as continuity and non-convexity. Moreover, it does not use external information in the searching process and only takes fitness function as the basis of evolution (Karaboga and Basturk 2007). ABC has some advantages such as simple operation, fewer control parameters, high search accuracy and strong robustness. But it has a disadvantage of slower convergence, especially in the middle and last stages of the search process (Zhou et al. 2016b). In order to overcome these demerits, scholars have proposed some excellent improved ABC variants which mainly concentrated on balancing the exploration and exploitation.

In this paper, on the one hand, for the sake of enhancing the exploration of ABC further, the unified opposition-based learning (UOBL) based on refraction principle (Shao et al. 2015), an improved strategy of opposition-based learning (OBL) (Tizhoosh 2005), is employed in ABC to improve its performance. The main idea of UOBL is to improve the opposite process of OBL according to the refraction phenomena of light, which can increase the population diversity to enhance the probability of finding the global optimal solution. Based on the idea of the strategy, UOBL has been employed in the performance improvement in PSO (Shao et al. 2015), and in the improved PSO a large number of experimental results demonstrate that it has achieved very good optimization performance. On the other hand, the UOBL strategy is used again in ABC as a mutation strategy. When ABC algorithm traps into the local optimal domain, UOBL can generate the mutation solution based on refraction principle and guide the algorithm to search for the global optimal solution rather than random mutation resulting in aimless search. To verify the effectiveness of the adopted UOBL in ABC, 23 benchmark functions are tested in the next experiments, and extensive experimental results demonstrate that EABC-RP can achieve better optimization performance over the majority of them compared with other ABC variants.

The other parts of this paper can be organized as follows: In Sect. 2, related works including the basic idea of ABC and some other excellent ABC variants are introduced briefly. The main design idea of proposed ABC is described in detail in Sect. 3. Section 4 demonstrates the experimental results and analysis of the results. Finally, in Sect. 5 the conclusions are drawn.

2 Related works

2.1 Artificial bee colony algorithm

Similar to other swarm intelligent algorithms such as PSO, ABC is proposed inspired by collective intelligent behavior of biology in the nature and it simulates the collaborative foraging behavior of a swarm of honey bees. In the nature, a bee swarm is categorized into three groups in process of collaborative foraging, and they are the employed bees, the onlooker bees and the scout bees. Similarly, in ABC, the entire search process of the algorithm is also divided into three phases, the employed bee phase, the onlooker bee phase and the scout bee phase, and each specified phase plays itself role in ABC. The employed bees play a role that searches food sources, and after all the employed bees finishing their search of food sources, they will share some information including the positions and the nectar amounts of food sources on the dance area to the onlooker bees. The onlooker bees make a decision to choose a better food source according to the information provided by the employed bees and then continue exploiting other food sources around the chosen food source. The food source that has more amount of nectar has a higher probability to be chosen by the onlooker bees compared with one of less nectar. If a food source is exhausted, the scout bee is translated from its associated employed bee, which abandons the food source and continues searching a new food source randomly (Zhou et al. 2016b; Bao and Zeng 2011).

In ABC, the position of each food source is generated randomly in the initial population and it is regarded as a candidate solution \(X_{i}\) for optimization problems which is expressed as \(X_{i}=(x_{i1},x_{i2,}{\ldots },x_{iD})\) and D is the dimensional size of optimization problems. The main idea of ABC algorithm can be described as follows:

Firstly, the employed bees are in charge of searching food sources generated randomly. After all employed bees complete the search process, some information including the nectar amounts and the positions of food sources is shared by employed bees to the onlooker bees by the way of dancing in dancing area. Each employed bee generates a new food source \(V_{i}=(v_{i1},v_{i2,}{\ldots }, v_{iD})\) in the neighborhood of its parent position \(X_{i}\) by the following equation:

$$\begin{aligned} v_{ij}=x_{ij}+r_{ij}\cdot (x_{ij}-x_{kj}) \end{aligned}$$
(1)

where \(k\in \){1,2,...,SN} and \(j\in \){1,2,...,D} are selected randomly, but k has to be different from i and k is a solution in the neighbor domain of i; \(r_{ij}\in [-1,1]\) is a random number which controls the generated range of the neighbor domain of \(x_{ij}\); SN is the number of generated food sources randomly and the number of employed bees corresponds to the number of food sources.

Then, if the fitness of the new food source \(V_{i}\) generated by Eq. (1) is better than the one of its parent \(X_{i}\), and \(X_{i}\) is replaced with \(V_{i}\). The onlooker bees continue searching other food sources according to Eq. (1) after receiving the related information including nectar amounts and positions of food sources from the employed bees. A food source is chosen by onlooker bees according to the probability related with amount of nectar, and the more amount of nectar food sources have, the greater the probability they are chosen. The probability \(p_{i}\) depends on the nectar amount (fitness value) of food sources, which is defined as follows:

$$\begin{aligned} p_{i}=\frac{\text {fitness}_{i}}{\sum \nolimits _{j=1}^{SN} {\text {fitness}_{j}} } \end{aligned}$$
(2)

where \(p_{i}\) is the selection probability and the parameter fitness\(_{i}\) is the fitness value of the solution \(X_{i}\) evaluated by its employed bee, and from Eq. (2) we can see that the number of the onlooker bees is also equal to the one of the food sources.

Lastly, if the quality of a food source is not improved further in predetermined generations, it can be considered that the algorithm has trapped into the local optimal domain. Therefore, it is taken into consideration to abandon the food source. The employed bee associated with the food source would be transformed into the scout bee to continue searching a new food source randomly. In ABC, the parameter limit is used to control the role changing of employed bees and scout bees. When the value of limit exceeds the predetermined generations, a new food source is generated randomly by scout bees to replace the abandoned food source according to the following equation.

$$\begin{aligned} x_{ij}=a_{j}+\textit{rand}_{j}\cdot (b_{j}-a_{j}) \end{aligned}$$
(3)

where [\(a_{j}\), \(b_{j}\)] is the boundary constraint for the jth dimensional variable and the parameter rand\(_{j}\) is a distributed random number within the range [0, 1] uniformly.

2.2 Some excellent ABC variants

Since the original ABC is proposed, it has attracted many scholars attention and many excellent ABC variants have been proposed in the past decade. To overcome the poor exploitation ability further and enhance the optimization performance of ABC algorithm, some good strategies have been introduced to improve its optimization performance. For example, Zhou et al. (2016b) proposed an improved ABC based on Gaussian bare-bones (GBABC). Zheng et al. (2010) proposed a Gbest-guided artificial bee colony algorithm (GABC) for numerical function optimization. The GABC improved the exploitation by incorporating the information of global best solution into the solution search equation. Huo et al. (2015) proposed a discrete Gbest-guided ABC (DGABC) to simulate the search for the optimal service composition solution. Cui et al. (2017) proposed a modified Gbest-guided ABC algorithm with new probability model (MPGABC). In MPGABC, the novel search strategy was proposed by utilizing the useful information from the current best solution and the new probability selected model was proposed. The OBL strategy was applied into ABC algorithm by some scholars. For instance, El-Abd (2011) proposed an opposition-based ABC and after 1 year El-Abd (2012) used a generalized opposition-based learning strategy in initialization population and generation jumping to improve ABC (GOABC). Guo et al. (2015) proposed an elite opposition-based artificial bee colony algorithm for global optimization (EOABC). In EOABC, it executed the elite opposition-based learning strategy with a preset learning probability to enhance its exploitation capacity. Moreover, Wang et al. (2014) combined several strategies into ABC algorithm to propose multi-strategy ensemble artificial bee colony algorithm (MEABC). Zhou et al. (2016a) proposed an improved multi-strategy ensemble artificial bee colony algorithm with neighborhood search (MEABC). Zhou et al. (2015) used the neighbor search strategy to propose an enhancing the modified artificial bee colony algorithm (MABC-NS). Fan et al. (2018) proposed a hybrid artificial bee colony algorithm with variable neighborhood search and memory mechanism (HABC). Zhong et al. (2017) adopted modified neighborhood based on update operator and independent-inheriting-search strategy to propose and improve artificial bee colony algorithm for global optimization (MNIIABC). In the MNIIABC algorithm, a modified neighborhood-based update operator was applied in the employed bee stage and an independent-inheriting-search strategy was used in the onlooker stage.

In this paper, what the search strategy mainly adopts is the UOBL model based on refraction principle to enhance the optimization performance of ABC algorithm. Note that some prominent ABC variants are listed briefly and other excellent ABC variants are not listed in this paper.

3 The proposed algorithm design

3.1 OBL based on refraction principle

3.1.1 Opposition-based learning

Opposition-based learning (Tizhoosh 2005) (OBL), proposed by Tizhoosh, is an excellent scheme for machine intelligence, which has been applied to various optimization algorithms and proved to be effective. The main idea of OBL is that the candidate solution for a given problem is computed to obtain its opposite solution according to Eq. (4), which increases the probability of finding a candidate solution closer to the global optimum solution. Tizhoosh gives the following definition for OBL.

Let \(X_{i}=(x_{i1},\,x_{i2,\ldots ,}x_{iD})\) be as a candidate solution in D-dimensional space and the value of \(X_{i}\) be a real number defined in interval [\(a_{j}\), \(b_{j}\)]. The opposite solution \(X_{i}^{*}\) of \(X_{i}\) can be defined as follows:

$$\begin{aligned} x_{ij}^{*} =a_{j}+b_{j}-x_{ij}, \quad j=1,2,3,\ldots ,D \end{aligned}$$
(4)

The OBL strategy has been applied to improve the global optimization of intelligent algorithms such as PSO and ABC, and it has obtained very good optimization performance. However, in the later stage of algorithms, due to the narrowing of the search interval, the opposition solution still falls into the local extremum region with a larger probability, which results in trapping into the local optimal solution easily (Wang et al. 2007). Some scholars proposed some improved OBL strategies to enhance its optimization performance. For example, Wang et al. (2011a) proposed a generalized opposition-based learning strategy to optimize PSO algorithm. Shao et al. (2015) proposed an improved OBL strategy based on refraction principle to optimize PSO algorithm.

3.1.2 The unified model of opposition-based learning based on refraction principle

As mentioned above, OBL is easy to trap into the local optimum solution in the later stage of algorithms so that some improved OBL strategies are proposed such as UOBL using the refraction principle (Shao et al. 2015) to improve its opposite process.

The refraction of light is a common physical phenomenon in the nature. When the light slants from a medium into another medium, its propagation direction will be changed, that is, a part of light is refracted. According to the refraction phenomenon of light, in our previous work (Shao et al. 2015), an improved OBL (UOBL) is proposed to ameliorate its performance, and the improvement process of UOBL is described in Fig. 1.

Fig. 1
figure 1

Opposite learning process based on refraction principle (UOBL)

In Fig. 1, the parameter x* represents the refraction solution of the candidate solution x, and the incident angle and the refraction angle are \(\alpha \) and \(\beta \), respectively. According to the refraction law of light and Fig. 1, it can be concluded that the refractive index n is expressed by the following equation:

$$\begin{aligned} n=\sin \alpha /\sin \beta \end{aligned}$$
(5)

Let \(k=h\)/h*, and it can be seen from Fig. 1 that we can conclude the computational formula of refraction solution \(X_{i}^{*}=(x_{i1},x_{i2,}{\ldots },\,x_{iD})\) is presented as follows:

$$\begin{aligned} x_{ij}^{*} =(a_{j}+b_{j})/2+(a_{j}+b_{j})/(2kn)-x_{ij}/kn \end{aligned}$$
(6)

where \(a_{j}\) and \(b_{j}\) are the minimum and maximum values of the jth dimension, respectively, in current population and \(x_{ij}\) represents the value of the jth dimension of the ith particle in current population and \(x_{ij}^{*}\) is the refraction solution of \(x_{ij}\); h and h* are the length of the incident light and refraction light, respectively. When \(n=1\) and \(k=1\), Eq. (6) can be simplified to the OBL model (Eq. (4)). Hence, the improved OBL model based on refraction principle can be regarded as the unified model of opposition-based learning (UOBL). Due to very good optimization performance of UOBL model, it is employed to enhance the global optimization performance of PSO in our previous work (Shao et al. 2015). Meanwhile, the enhanced PSO based on UOBL model is applied to optimize FIR digital filters, which achieves very good filtering performance.

3.2 Modified employed bee phase

The original ABC has excellent global optimization performance for many complex problems. That is to say, ABC has good exploration for optimization problems. The OBL is also a global optimization strategy, which has been applied to improve the global optimization of evolutionary algorithms such as PSO and ABC and achieves very good optimization performance. In order to enhance the performance of OBL further, the UOBL model is used to enhance the global searching ability of ABC algorithms. In this paper, UOBL is adopted to modify the search process of employed bees in ABC.

In ABC, the employed bees are responsible for searching optimal solutions in an initiate population generated randomly. The diversity of population has a great influence on the evolution of species. Similarly, in swarm intelligence algorithm, the diversity of population has a great influence on finding the optimal solution. For the sake of enhancing the population diversity in ABC, the UOBL model [as shown in Eq. (6)] which has a better optimization performance over PSO (Shao et al. 2015) is introduced to the employed bees to improve the diversity of the population and then enhance the global search of ABC algorithm.

The main idea of modified employed bee phase is that firstly each employed bee generates a new food source (a candidate solution) \(V_{i}\) according to Eq. (1) and its fitness value is calculated. And then the refraction solution \(X_{i}^{*}\) of the candidate solution \(V_{i}\) is obtained according to Eq. (6) and its fitness value is also computed. If the fitness value of the refraction solution is better than the one of the candidate solutions, the candidate solution is replaced with the refraction solution. The modified process of the employed bee phase is described in algorithm 1.

figure a

3.3 Probability selection for the onlooker bee phase

As mentioned above, after all employed bees finished their search of food sources according to Eq. (1), the onlooker bees will receive nectar amounts and positions of food sources that all employed bees provide. And the food source which has more nectar amounts is chosen with higher probability by the onlooker bees. In ABC, the probability of selecting food source is calculated according to Eq. (2). From the above equation, we can see that the probability is proportional to the fitness value, that is, the food source with higher fitness value is bound to be selected, which adopts a greedy selection method to choose a better food source actually, and its disadvantage is that the algorithm is easy to fall into the local optimum solution with the very big probability.

For the above problem, in EABC-RP, Eq. (2) is modified modestly and a linear equation as Eq. (7) is adopted to reduce the probability of falling into local optimum region.

$$\begin{aligned} p_i =maxValue*\frac{Fitness_i }{max\text{( }Fitness\text{) }}+minValue \end{aligned}$$
(7)

where the parameters maxValue and minValue are numbers between [0, 1] and the parameter maxValue is greater than the parameter minValue. The max(Fitness) represents the maximal fitness value of all bees.

3.4 Mutation for the scout bee phase

As previously mentioned, if food sources are abandoned, the scout bees are transformed from a few employed bees and then generate new food sources randomly according to Eq. (3). However, the way of randomly generating new ones still has its disadvantage such as easy to get caught in the local optimal region when the search space becomes smaller in the later stage of the algorithm. Furthermore, if food sources are directly abandoned, the more helpful search information obtained by the abandoned food source during the process of evolution would be lost, which makes it more difficult to find the optimal solution.

To overcome these drawbacks and enhance the performance of ABC, Eq. (6) is also employed in scout bee phase as a mutation operation to generate refraction solutions of the abandoned food sources. On the one hand, as mentioned above, in a narrow search space, the random mutation method is extremely vulnerable to falling into the local extremum region. But the method of generating the refraction solution can enlarge the search space and increase the probability of jumping out the local extremum region. On the other hand, by computing the refraction solution of the abandoned food source, the more helpful information that the abandoned food source contains can be preserved to guide the search direction close to the optimal solution . The mutation diagram of scout bees is described in Fig. 2.

In summary, based on the above basic idea, the pseudocode of EABC-RP is described in detail in algorithm 2.

Fig. 2
figure 2

Diagram of mutation for scout bees

figure b

4 Experimental verifications

4.1 Test problems and parameter setting

In order to verify the effectiveness of the proposed algorithm, in the next experiments, a set of 23 benchmark functions (F01–F23) are adopted, which are also tested widely in some excellent ABC variants mentioned above. The brief introduction of these benchmark functions is listed in Table 1, and more detailed description of them can be found in the following literatures (Xin et al. 1999; Xiong et al. 2014; Dervis and Bahriye 2009).

Table 1 23 benchmark functions tested in the experiments

Note that, in Table 1, U, M, S and N, respectively, represent unimodal, multimodal, separable and non-separable. Furthermore, for the Rosenbrock function, it has the characteristic of multimodal functions when D is greater than 3.

For the sake of comparison fairness, the common parameters of all ABC variants are set as follows in the next experiments. The dimensional size D of benchmark functions is 30 and 50, respectively, and the corresponding maximum number of function evaluations (MaxFEs) is set to 5000\(\cdot D\). Each benchmark function is tested for 30 times. In the proposed algorithm, maxValue and minValue are 0.9 and 0.1, respectively, and the optimal combination of other parameters is set according to our previous work (Shao et al. 2015).

4.2 Comparison of EABC-RP with other excellent ABC algorithms

4.2.1 Comparison of EABC-RP, ABC and GOABC-s

In this subsection, amounts of experiments are carried out at \(D=30\) and \(D=50\), respectively, to verify the effectiveness of EABC-RP algorithm. In the next experiments, the parameters SN and limit are set to 30 and 100, respectively. A comprehensive comparison study is carried out between EABC-RP and other two ABC variants. The mean values and standard deviation (SD) are listed in Tables 2 and 3 at \(D= 30\) and \(D=50\), respectively. Furthermore, the Wilcoxon signed-rank test, a nonparametric statistical hypothesis test, is employed to compare the significant difference between two algorithms, which can be used as an alternative to the paired t test when the results do not obey the normal distribution (Garcia et al. 2010). “+,” “−” and “\(\approx \)” indicate EABC-RP is better than, worse than and similar to that of other ABC variants, respectively, according to the Wilcoxon signed-rank test when the significance level \(\alpha \) is 0.05. The experimental results are summarized as “w/l/t,” which denotes that EABC-RP wins on w functions, loses on l functions and ties on t functions compared with other ABC variants, respectively.

  • ABC: the original ABC;

  • GOABC-s: the simplified GOABC. GOABC-s is an improved ABC based on generalized OBL (GOBL) for simplify. That is to say, GOABC-s removes other strategies and only retains the GOBL strategy compared with GOABC. Correspondingly, similar to EABC-RP, the GOBL strategy is also used to improve employed bees and scout bees, respectively, in GOABC-s, which is to compare the performance of GOBL and UOBL in improving ABC algorithm to prove the effectiveness of UOBL strategy.

Table 2 Comparison of EABC-RP with ABC and GOABC-s at \(D=30\)

Table 2 presents the comparison results of EABC-RP, ABC and GOABC-s at \(D=30\). As can be seen from the data presented in Table 2, the optimization performance of EABC-RP significantly outperforms the other two ABC algorithms for majority of benchmark functions. Specially, EABC-RP outperforms ABC over 16 out 23 benchmark functions while ABC only obtains the better results on 3 out 23 benchmark functions (F02, F17 and F21). For F02, EABC-RP has no advantage compared with ABC when D is greater than 3, which is because its global optimal solution is located in a narrow parabolic-shaped flat valley which results in more difficulty to get better results, and the above three ABC variants also do not achieve better results for F02. However, for the most of other multimodal problems EABC-RP obtains better optimization performance than ABC or at least similar to ABC. For F17 and F21, EABC-RP slightly loses to ABC. For GOABC-s, EABC-RP also obtains significantly better performance than its over 15 out of 23 benchmark functions while GOABC-s merely slightly outperforms EABC-RP on 2 out of 23 benchmark functions (F17 and F21). Moreover, for F06, the above three ABC variants all obtain the optimal solution. But the difference among them is that the SD of EABC-RP is minimal, which indicates that the optimization performance of EABC-RP is the most stable than other two ABC algorithms.

The convergent speed of EABC-RP, ABC and GOABC-s is presented in Fig. 3. As seen in Fig. 3, for the majority of benchmark functions the EABC-RP has faster convergent speed and lower convergent accuracy compared with other two ABC variants. From this perspective, EABC-RP is better than the other two ABC variants.

Table 3 demonstrates the comparison results of EABC-RP, ABC and GOABC-s at \(D=50\). From Table 3, we can draw that the optimization performance of EABC-RP is significantly better than ABC and GOABC-s at D=50 on the whole. Specifically, EABC-RP outperforms ABC over 17 out 23 benchmark functions and outperforms GOABC-s on 15 out 23 benchmark functions. These benchmark functions that outperform ABC and GOABC-s at \(D=50\) are almost same as at \(D=30\) besides the slight different results of few functions such as F16, which shows that the optimization performance of EABC-RP is not significantly affected along with the complexity increase of problems.

Fig. 3
figure 3figure 3

Convergent curves of ABC, GOABC-s and EABC-RP on some representative functions at \(D = 30\)

Table 3 Comparison of EABC-RP, ABC and GOABC-s at \(D=50\)

Moreover, to validate the effectiveness of EABC-RP further, the Friedman test, a statistical analysis method, is employed to compare the significant difference of three ABC variants at a statistical level \(\alpha =0.05\). When the parameter p value is smaller than \(\alpha =0.05\), it shows that there is the significant difference among algorithms. In Table 4, average rankings are presented for three algorithms at \(D=30\) and \(D=50\), respectively, and the best value is boldface. As can be seen from it, whether \(D=30\) or \(D=50\), p value is lower than 0.05, and the best average rankings are obtained by the proposed EABC-RP.

4.2.2 Comparison of EABC-RP and other ABC variants

In this subsection, we present a comparison and analysis between EABC-RP and other excellent ABC variants at \(D=30\) and \(D=50\). In the next experiments, the GBABC (Zhou et al. 2016b), an excellent improved ABC based on Gaussian bare-bones, is used to be compared with EABC-RP and ABC. The experimental results on 17 representative functions are listed in Table 5.

From Table 5, it can be seen that EABC-RP obtains better optimization performance compared with ABC on the majority of benchmark functions besides three benchmark functions (F02, F17 and F21). For F02, EABC-RP outperforms GBABC, but they are defeated by ABC. For F17 and F21, EABC-RP has slight worse accuracy than those of other two ABC variants. Compared with GBABC, EABC-RP outperforms it on 8 benchmark functions and loses it on 5 benchmark functions while EABC-RP has similar results on 4 benchmark functions. From this view, the optimization performance of EABC-RP outperforms those of ABC and GBABC.

Table 4 Average rankings of ABC, GOABC-s and EABC-RP at \(D=30\) and \(D=50\)

Table 6 presents experimental results of EABC-RP, ABC and GBABC at \(D=50\). As can be seen from it, EABC-RP outperforms the other two ABC variants. More specifically, EABC-RP outperforms ABC over 13 benchmark functions and outperforms GBABC on 10 benchmark functions.

Moreover, the Friedman test is also conducted to compare the optimization performance of the above three ABC variants at \(D=30\) and \(D=50\), respectively. The average rankings are presented in Table 7. As can be seen from it, whether \(D=30\) or \(D=50\), p value is lower than 0.05, which shows that there is the significant difference among algorithms. The best average rankings are obtained by EABC-RP and presented in boldface, which means that the sort of three ABC variants is EABC-RP, GBABC and ABC.

4.3 FIR low-pass digital filter optimization

4.3.1 FIR digital filters

Digital filters, which can be used to filter out the noise of interfering signals, have been concerned over years and achieved some intensive research works. Digital filters can be classified into two categories, namely infinite impulse response filters (IIR) and finite impulse response filters (FIR), according to the length of unit impulse response (Cheng 2009). In comparison, FIR digital filters have the characteristics of strict linear phase and arbitrary amplitude which makes the filters more stable. What’s more, it is known to all that the communication channels that image processing and data transmission need must have the characteristic of linear phase. In other words, FIR digital filters have practical application more widely such as image processing, remote sensing, defense and medicine.

The transform function H(z) of FIR digital filters can be expressed using z transform by Eq. (8) (also called the systemic function) (Cheng 2009):

$$\begin{aligned} H(z)=\sum \limits _{n=0}^{N-1} {h(n)z^{-n}}, \quad 0\le n\le N-1 \end{aligned}$$
(8)

where N is the orders of the filter; the parameter h(n) is the unit impulse response, namely filter coefficients; (N+1) is the number of filter coefficients.

Table 5 Comparison of EABC-RP, ABC and GBABC at \(D=30\)
Table 6 Comparison of EABC-RP, ABC and GBABC at \(D=50\)
Table 7 Average rankings of ABC, GBABC and EABC-RP at \(D=30\) and \(D=50\)

According to the characteristics of FIR digital filters such as the linear phase (Shao et al. 2015), Eq. (8) can be transformed as the following expression:

$$\begin{aligned} H(\omega )=\sum \limits _{n=1}^{N/2}{h\left( \frac{N}{2}-n\right) \bullet 2\cos \left[ \left( n-\frac{1}{2}\right) \omega \right] } \end{aligned}$$
(9)

where \(H(\omega )\) is the amplitude function.

The types of digital filters, such as low pass and high pass, are determined by the coefficients h(n). For evaluating the filtering performance of FIR digital filters, some generalized specifications such as the maximal pass band ripple (Cheng 2009; Wang et al. 2011b) have been taken into consideration.

What is the FIR low-pass digital filter? In signal filtering, the FIR low-pass digital filter allows the low-frequency components of the signal to pass through in the pass band and suppresses the high-frequency components in the stop band to remove the mixed noise in the signal. For FIR low-pass digital filter with linear phase, its ideal frequency response can be described as the following equation:

$$\begin{aligned} H(\omega )=\left\{ \begin{matrix} {1}&{} \quad 0\le \omega \le \omega _\mathrm{p} \\ {0}&{}\quad \omega _\mathrm{s}\le \omega \le 1 \\ \end{matrix} \right. \end{aligned}$$
(10)

where \(\omega _\mathrm{p}\) and \(\omega _\mathrm{s}\) are the normalized cutoff frequency of the pass band and the stop band, respectively.

4.3.2 Fitness functions

The filtering performance of digital filters is related to their coefficients h(n) to a large extent, and to be exact, it is concerned with the combination of filter coefficients h(n) for FIR digital filter optimization. Hence, the process of obtaining the coefficient combination of digital filters can be regarded as the combinational optimization problem. In order to obtain a set of optimal combination of FIR digital filter coefficients, EABC-RP is employed to optimize FIR low-pass digital filter to verify its optimization performance and effectiveness for solving practical application.

It is of importance that designing or choosing a proper error function (fitness function) evaluates the performance of evolutionary algorithms. In this paper, Eq. (11) has been used as the fitness function because of achieving better digital filtering performance compared with other fitness functions which is adopted in Saha et al. (2013).

$$\begin{aligned} J= & {} \sum {abs[abs(|H(\omega )|-1)-\delta _\mathrm{p}]}\nonumber \\&+\sum {[abs(|H(\omega )|)-\delta _\mathrm{s}]}\ \end{aligned}$$
(11)

where \(\delta _\mathrm{p}\) and \(\delta _\mathrm{s}\) are the ripples of the pass band and the stop band, respectively.

4.3.3 Results and analysis

In this subsection, the numerical experiments are presented for designing the FIR low-pass digital filter and each algorithm is performed in MATLAB for 500 iteration times. The parameters of FIR low-pass digital filters are set as follows: The order N is 20, and the number of coefficients is 21. The pass band ripple \(\delta _\mathrm{p}\) and stop band ripple \(\delta _\mathrm{s}\) are 0.1 and 0.01, respectively. The normalized pass band cutoff frequency \(\omega _\mathrm{p}\) is 0.45, and normalized stop band cutoff frequency \(\omega _\mathrm{s}\) is 0.55. The transition width (\(\omega _\mathrm{p}-\omega _\mathrm{s}\)) is 0.1. In order to demonstrate the effectiveness of FIR low-pass digital filter designed by the EABC-RP algorithm, the zero-phase FIR digital filter as H0 (Ngamtawee and Wardkein 2013), the PM algorithm (Parks and Mcclellan 1972) and ABC are adopted for comparison algorithms to design the FIR low-pass digital filter, respectively.

Figures 4 and 5 demonstrate the magnitude responses and the magnitude attenuations of FIR low-pass digital filters which are designed by different comparative algorithms, respectively. In Fig. 4, from the magnitude responses we can be see that the stop band ripple of FIR low-pass digital filter designed by EABC-RP is closest to 0, which shows that most high-frequency components are suppressed. From Fig. 5 as can be seen, the FIR low-pass digital filter designed by EABC-RP achieves the minimal magnitude attenuation compared with the ones optimized by H0, PM and ABC, respectively.

Fig. 4
figure 4

Magnitude response for FIR low-pass filters

Fig. 5
figure 5

Magnitude attenuation for FIR low-pass filters

The maximal pass band ripples are listed in Table 8. From Table 8, we can see that the FIR low-pass digital filter designed by EABC-RP obtains the maximal pass band ripple compared with the ABC algorithm.

Table 8 Maximal pass band ripples
Table 9 Coefficients of FIR low-pass digital filter

The coefficients of the FIR low-pass digital filters are listed in Table 9.

The comparison results of the mean values, SD and optimal values of two ABC variants are listed in Table 10.

Moreover, Fig. 6 presents the convergent speed of EABC-RP and ABC.

Table 10 Comparison results of ABC and EABC-RP
Fig. 6
figure 6

Convergent comparison of two ABC variants

From Fig. 6, we can conclude that the EABC-RP has faster convergent speed and higher convergent accuracy compared with the ABC when they optimize the FIR low-pass digital filter, respectively.

To sum up, according to the above experimental results and analysis, it is evidently shown that the FIR low-pass digital filter designed by EABC-RP has obtained better filtering performance compared with the ones designed by the other algorithms, which also proves that the effectiveness of the EABC-RP algorithm.

5 Conclusions

In order to enhance the global search capability and local search capability further to improve the optimization performance of ABC, an improved OBL (UOBL) based on refraction principle is used to improve the search process of employed bees and mutation process of scout bees. On the basis of these, an enhancing ABC based on refraction principle (EABC-RP) is proposed. In the aspect of the global search of EABC-RP, the UOBL model is adopted to increase the population diversity by calculating the refraction solutions of the current candidate solutions to increase probability of finding the optimal solution. In the aspect of the local search of EABC-RP, to prevent trapping into the local optimal solution resulted from the mutation randomly and preserve the search experiences of the scout bees in ABC, UOBL plays an important role over leading the candidate solution to mutate toward the optimal solution to skip the local optimal solution with greater probability. The large number of experiment results and analysis shows that EABC-RP has a better optimization performance compared with other ABC variants. Meanwhile, the proposed EABC-RP is used to optimize the FIR low-pass digital filters and the better filtering performance is obtained by the designed FIR low-pass digital filters using EABC-RP, which proves the effectiveness of the proposed algorithm further.