FIR digital filter design based on improved artificial bee colony algorithm

The traditional swarm intelligence optimization algorithm is prone to fall into local optimal solutions in finite impulse response (FIR) digital filter design and has slow convergence speed. In order to optimize the design of FIR filter, a FIR digital filter design method based on improved bee colony (ABC) algorithm is proposed. This improved ABC algorithm can adaptively adjust the step size of the selected neighborhood of nectar source location. At the same time, the information of the global optimal solution is used to guide the search of candidate solution, which improves the global search ability of the algorithm. The improved ABC algorithm can balance the conflict between local search ability and global search ability, so it can achieve better optimization effect. The time and space complexity of the algorithm is analyzed in detail. Then, the improved ABC algorithm is used to design three typical FIR digital filters, namely low-pass, band-pass and band-stop filter. The performance of the designed filter is tested by simulation experiments. The experimental results show that compared with other state-of-the-art optimization algorithms, the proposed FIR filter design method has achieved better effect and performance. Meanwhile, the proposed design method has shorter optimization time. The superiority of the proposed method is verified.


Introduction
Digital filter is an important part in digital signal processing system. Compared with the analog filter, the digital filter can be designed more widely. Because of the programmability, superior cost performance, small size requirement and easier implementation of the software, the digital filter has replaced the analog filter in many applications (Kaplun et al., 2020). According to the length of the impulse response, the digital filter can be divided into infinite impulse response (IIR) filter and finite impulse response (FIR) filter . IIR digital filter can be designed with analog filter or computer-aided methods, and their implementation process is also complex compared to FIR filter implementation (Agrawal et al. 2019a(Agrawal et al. , 2017. However, the phase frequency characteristic of IIR filter is nonlinear, which limits its application range (Dash et al. 2020). The phase of the FIR filter is strictly linear because of only zeros in transfer function and the structure is nonrecursive; therefore, FIR filters are always stable. Owing to this fact FIR filters are exploited in numerous applications in signal processing (Padmapriya et al. 2019;Umadevi et al. 2019), image compression (Li et al. 2019;Maeda et al. 2018), communication (Hameed et al. 2018), measurement (Park et al. 2019;Ryu et al. 2020), etc. However, a common limitation of FIR filter is that they require higher filter order to achieve the specifications, thus requiring more memory and processing time as compared to IIR filters. A proper design procedure is essential for the effective and reliable operation of FIR filter for a particular application. Thus, designing of digital FIR filters with high performance is a crucial task.
The traditional design methods of FIR digital filter are window function method (Hossin et al. 2018;Naderian et al. 2017). It can approximate the frequency & Lian Lian lianlian_syuct@163.com Zhongda Tian tianzhongda@126.com 1 characteristics of ideal filters approximately. The window function method is simple, but it is difficult to determine the boundary frequency of the pass-band and stop-band accurately and can only converge to the local optimum. Parks-McClellan algorithm is a representative method of the optimal design of traditional digital filters (Filip 2016). This method can achieve better pass-band and stop-band performance, but the algorithm is complex and the computation time is very long. Artificial neural networks have strong adaptive and self-learning ability. Many scholars combine the neural network and FIR filter, and obtain satisfactory design results. These neural networks for FIR filter design include Hopfield neural network (Jou et al. 2011;Xu et al. 2018), backpropagation neural network (Alwahab et al. 2018;Chauhan and Sathish, 2018), convolutional neural network (Kim and Kim, 2017), etc. However, it is difficult to determine the number of hidden layer nodes. If the hidden layer nodes are too few, the neural network cannot obtain all the characteristics of the signal, which leads to the approximation failure. Too many nodes in the hidden layer can cause excessive training, and the network may remember the redundant features generated by the interference in the signal (Mittal 2020). In addition, some scholars used the L 1 method (Aggarwal et al. 2016) and the L 1 method combined with some optimization algorithms (Aggarwal et al. 2018(Aggarwal et al. , 2015 to design the filter and have achieved good performance. Recently, some scholars have reviewed the use of evolutionary algorithm to design filters and pointed out that evolutionary algorithm is very suitable for filter design (Aggarwal et al. 2021;Dwivedi et al. 2018). These algorithms include simulated annealing algorithm Wu et al. 2015), genetic algorithm (Szopos et al. 2016;Miyata et al. 2018), particle swarm optimization (PSO) algorithm Shao et al. 2017;Kumar 2019), differential evolution (DE) algorithm (Chandra et al. 2016;Dash et al. 2017), ant colony optimization algorithm (Tsutsumi and Suyama, 2014), cuckoo search algorithm (CSA) (Sarangi et al. 2018;Kumar et al. 2018;Kumar et al. 2020), etc. These optimization algorithms have been used for digital filter design and have made some progress. However, these algorithms also have various limitations and disadvantages. SSA algorithm has the disadvantages of slow convergence, long execution time, sensitive parameters, which make it inefficient and even infeasible algorithm. GA and ACO algorithms are difficult to apply into practical applications because of their complex structure and slow operation speed. PSO algorithm is easy to fall into local optimum because each particle in the swarm only searches in a limited sample space. Similar to the commonly used evolutionary algorithm, DE algorithm achieves the optimal solution crossover and selection of the difference vector between the individuals. Therefore, for some complex optimization problems, DE algorithm also has a local optimum and premature convergence. There are some problems in CSA, such as low convergence accuracy and low convergence speed. Furthermore, the search probability and search step have a great influence on the performance of the CSA. In a word, these mature intelligent optimization algorithms have more parameters to be adjusted, and improper parameter adjustment is easy to make the algorithm fall into local extremum, thus reducing the performance of the designed FIR filter. On the other hand, some scholars combine multiple optimization algorithms to design filters, such as quantum PSO and ABC (Agrawal et al. 2019b), TVC-PSO and artificial bee colony (ABC) (Agrawal et al. 2018), hybrid PSO , ABC and Nelder-Mead simplex search (Dwivedi et al. 2017), modified multi-objective artificial bee colony algorithm (Dwivedi et al. 2016). The combination of optimization algorithms may increase the complexity of the algorithm. Some other optimization algorithms such as gravitational search algorithm (Saha et al. 2013a), bacteria foraging optimization algorithm (Saha et al. 2013b), cat swarm optimization algorithm (Saha et al. 2013c), seeker optimization algorithm (Saha et al. 2012), colliding bodies optimization algorithm (Mahata et al. 2016) and so forth also get good filter design results. Therefore, it is worth studying to find an intelligent computational algorithm with simple structure, strong robustness, few parameters and easy to adjust for the design of FIR filter.
ABC algorithm is an intelligent optimization algorithm based on bee behavior (Karaboga and Basturk, 2007). For a continuous optimization problem like CEC2005, CEC2014 and CEC2015 benchmark functions, ABC algorithm is preferred over other optimization algorithms, such as GA, adaptive GA, PSO and DE for its remarkable performance. Compared with other optimization algorithms, ABC algorithm has the characteristics of strong global convergence, few parameters and wide application range, which is especially suitable for the design of FIR filter (Sharma et al. 2016). In the study, ABC algorithm has been found to outperform the state-of-the-art evolutionary algorithm in meeting the specified FIR design (Kockanat et al. 2018). However, the strong randomness of the standard ABC algorithm in local search may lead to premature convergence of the algorithm, thus reducing the ability of the algorithm to converge to the global optimal solution. In this paper, the neighborhood search method of the standard ABC algorithm is improved, which can enhance the local chemotaxis search ability of the algorithm, so improve the optimization ability of the ABC algorithm. The improved ABC algorithm is more suitable for the design of FIR digital filters. The test results of 12 Benchmark functions show that the proposed improved ABC algorithm has better optimization results and optimization performance than standard ABC algorithm. Based on the improved ABC algorithm, the design of FIR filter is transformed into the optimization of filter parameters, and then the improved ABC algorithm is used to search the parameter space of FIR filter efficiently. It can guarantee the optimization of the parameters and make the FIR filter have better filtering performance. The effectiveness and superiority of the proposed FIR design method are verified by the simulation design of the filter.
In this paper, we focus on integrated, analytical and comparative study of improved ABC, ABC, GA, PSO, ACO, DE and CSA for the design of digital FIR low-pass, band-pass and band-pass filter. For achieving high accuracy, the optimal filter should have a low-pass-band ripple and optimum stop-band attenuation. Based on the above discussion, the main contributions of this paper are summarized as follows: 1. An improved ABC algorithm is proposed. This improved ABC algorithm can adaptively adjust the step length function of the selected neighborhood nectar source location, use the information of the global optimal solution to guide the search of the candidate solution and improve the development efficiency. 2. The superior performance of the proposed improved ABC algorithm is studied in detail. The analysis of time complexity and space complexity of several optimization algorithms are discussed. 3. Compared with the state-of-the-art algorithms, the capabilities of proposed algorithm dealing with practical problems in FIR filter design are verified. Three typical FIR filters are selected for simulation experiments. The results show that the designed FIR filter by the improved ABC algorithm has better amplitude frequency response characteristics and less optimization time.
The structure of this paper is as follows. Section 2 introduces the proposed improved ABC algorithm. Section 3 gives the design process of FIR digital filter based on improved ABC algorithm. Section 4 introduces the simulation results and verifies the effectiveness of the proposed FIR digital filter design method. The conclusions and future works are presented in Sect. 5.
2 Improved ABC algorithm

Standard ABC algorithm
The nectar source of ABC algorithm is seen as a point in solution space. The quality of nectar source is SN. Suppose the dimension of the problem to be solved is D, the location of nectar source is represented by . . x t iD ; i 2 f1; 2; . . .; SNg; d 2 f1; 2; . . .; Dg and x id 2 ðL d ; U d Þ, where i represents the position of the i-th honey source, d represents the d-th solution in D-dimensional solution space, t 2 f1; 2; . . .; Mg is the number of iterations, M represents the maximum number of iterations. L d represents the lower bound of the search space, and U d represents the upper bound of the search space (Dwived et al. 2018). Equation (1) gives the location of nectar source randomly generated in the search space.
where r is random distribution in the range of (0, 1). At the beginning of the search phase, according to Eq. (2), a new nectar source is generated by the employed bees around the search source (Karaboga and Akay, 2009).
where v id is a new randomly generated nectar source, j represents the position of the j-th honey source,j 2 f1; 2; . . .; SNg, j 6 ¼ i. u i;j is a random number, and u i;j 2 ½À1; 1. When the fitness of new nectar source V i is better than current nectar source X i , greedy algorithm is adopted to replace X i with V i . Otherwise X i is retained. Onlooker bees then share the information based on their nectar sources. Its follow probability is as follows.
Namely, fit i is the i-th fitness value. Onlooker bee generates a random number belonging to [0, 1] and compares it with p i . If the random number is less than p i , a new nectar source will be generated according to Eq. (2).
In the optimization process of the algorithm, in order to avoid the algorithm falling into the local optimum, it is necessary to make the algorithm have the ability to jump out of the local optimum. Namely, when the fitness value of the algorithm does not change, the algorithm should expand the search range and carry out further search beyond the local optimal value. In ABC algorithm, a threshold of the number of iterations (limit) is set. In the process of searching, if the nectar source X i reaches the threshold limit after trial iterative times and fails to find a better nectar source, the nectar source X i will be abandoned and the corresponding employed bees will be changed to scout bees. The scout bees will randomly generate a new nectar source instead of X i in the search space. The new nectar source is generated in following Eq. (4), and t is the current number of iterations.
In above Eq. (4), the value of limit needs to be set in combination with the actual problem. If limit is set too large, it will lead to large trial iterations of ABC algorithm to jump out of the local optimum. If the value of limit is too small, resulting in very small trial iterations of ABC algorithm, a new nectar source will be generated, and the exploration ability of local search will be lost.
The implementation steps of ABC algorithm are as follows.
Step 1 The generation of training data sample set. Initialization of parameters, including the number of nectar sources-SN, the maximum number of iterations-M and the maximum number of nectar sources mining-limit. The optimization parameters are given. Let t ¼ 1.
Step 2 A employed bee is assigned to collect nectar. According to Eq. (2), the search process is started to generate new nectar source V i .
Step 3 The fitness value is calculated from sample data. Update the nectar source according to the greedy algorithm.
Step 4 According to Eq. (3), the follow probability of onlooker is updated. Onlooker bees search and save nectar sources based on greedy algorithm.
Step 5 The algorithm determines whether the nectar source should be discarded. If true, onlooker bees become scout bees. Otherwise, go to Step 7.
Step 6 According to Eq. (4), scout bees will generate new nectar sources.
Step 7 Let t ¼ t þ 1. If the termination conditions have been met, the optimal parameters can be output. Otherwise it goes to Step 2 and continues.

Improvement of ABC algorithm
In the standard ABC algorithm, the location of the nectar source is locally updated and searched in a random way. The randomness of the standard ABC algorithm in local search is strong, which may lead to premature convergence of the algorithm, thus reducing the ability of the algorithm to converge to the global optimal solution (Ahirwal et al. 2014). Therefore, in the neighborhood search strategy of ABC algorithm, the adaptive step size parameter is added, and the global optimal solution guidance term is added. The improved ABC algorithm can enhance the local search ability of the algorithm and make the algorithm realize the balance between the global search and the local search, so it can achieve better optimization effect. The improved ABC algorithm will have better optimization performance for the optimization problems with more local optimal values.
In Eq.
(2), u id is a random number, and x jd is a random choice among neighbor individuals. Hence, the new global random search capability obtained from Eq. (2) is very strong. However, the solution may be a better one or a worse one, so the local search ability of neighborhood search in Eq. (2) is poor. In order to improve the local search ability of ABC algorithm, the random step u id in Eq.
(2) needs to be improved so that it can adjust adaptively with the change of fitness. The new step adjustment strategy is as follows.
where the random value of r id is ? 1 or -1, u id is a random number that varies from [-1, 1], and f i represents the fitness function in the optimization problem. t represents the current number of iterations. M represents the maximum number of iterations. c max , c min , a and b are constant values.
x bestd is the current optimal solution of D-dimension. f best is the optimal value of fitness function. Compared to the random step size u id , the value range of r id is broader. The absolute value of R id could be greater than 1. Therefore, in the early iteration process, a large step size is helpful to expand the search space of the algorithm. When f i is close to f best , R id approaches 0. In this case, a smaller step size is helpful for the algorithm to find the optimal solution in the local search. R id plays a guiding role in the trend of finding nectar sources. In the early stage of iteration, the parameter c id should be smaller to reduce the global optimization and improve the global search ability.
In the later stage of the iteration, c id should keep a large number, so that the algorithm can quickly converge to the global optimum.
In the new neighborhood search strategy, the global optimal solution guidance term is added to guide the artificial bee to move to the current optimal solution purposefully when searching the food source location, which overcomes the disadvantage of too strong randomness in the search process of the standard ABC algorithm. In the proposed improved ABC algorithm, the values of parameters a and b have an important influence on the guidance parameter of the global optimal solution. The values of a and b should be moderate to reduce the steady-state error of the algorithm and improve the convergence speed. Another important parameter is limit, which value directly affects the global search ability of swarm. In the optimization process, by comparing the honey content of the new solution and the original solution, the greedy selection mechanism is used to select the solution with larger honey content for local search, so as to guide the evolution of individuals in the population toward the optimal solution. The onlooker bees select the nectar source according to the roulette method. It is observed that the probability of onlooker bees searching for a certain nectar source is directly proportional to the honey content of the nectar source, so that the nectar source with high honey content can be exploited better, and the algorithm converges to the optimal solution with the increase of iteration times. When a solution is abandoned, the scout bees are generated to find a new nectar source. This operation makes the algorithm accept the degradation of the solution to a certain extent. On the other hand, it keeps the search range large enough in a period of time to avoid premature convergence.
In order to verify the performance improvement of the improved ABC algorithm, this paper selects 12 benchmark functions to verify the effective of the improved ABC algorithm. The details of these Benchmark functions, such as dimension, variable range, are given in Table 1. In Table 1, m is the dimension of the variable of the function.
The specific parameters of standard ABC and improved ABC are as follows. The number of nectar source (SN) is 50, the maximum number of iterations (M) is 5000, the parameter limit is set as 1000, c max is 1, c min is 0, a is 50, b is 5. For fairness, both algorithms run 20 times. The average value obtained by running 30 times is taken as the optimization result. The performance and stability of the algorithm are evaluated by the mean and standard deviation of the experimental results. In general, we believe that the smaller the mean of the algorithm is excellent. When the mean value is the same, the smaller the standard deviation, the better the algorithm more stable. Table 2 shows the optimization results of the standard ABC algorithm and the improved ABC algorithm. It can be seen from Table 2 that the mean value of the improved ABC algorithm is better than those of the standard ABC algorithm. At the same time, the standard deviation of the improved ABC algorithm is smaller, which indicates the strong robustness of the proposed algorithm. In sum, the designed improved ABC algorithm has obtained better optimization performance.

Complexity analysis
In this section, the complexity analysis of the proposed improved ABC algorithm is given. We discuss the complexity of the algorithm from two aspects of space and time. In this study, P is the number of population, D is the dimension of the problem to be solved, and M is the maximum number of iterations.
Firstly, the space complexity of the optimization algorithm is analyzed. According to the flow chart of these optimization algorithms, the number of variables needed is analyzed. Finally, we can get how much storage space these algorithms need.
1. Improved ABC. The number of population is P, the number of individuals is D, and the required space of 3 kind bees is 1.5 PD. The space of the position of nectar source is PD. The space needed for the feasible solution is D ? 2P. The space needed for the current solution is D ? 2P. c max , c min , a, b and other parameters are 23. Therefore, the total space required for improved ABC algorithm is 2:5PD þ 2D þ 4P þ 23. 2. ABC. The number of population is P, the number of individuals is D, and the required space of 3 kind bees is 1.5 PD. The space of the position of nectar source is PD. The space needed for the feasible solution is D ? 2P. The space needed for the current solution is D ? 2P. The total space needed for the upper and lower boundary, the selected probability and other parameters is 19. Therefore, the total space required for ABC algorithm is 2:5PD þ 2D þ 4P þ 19 3. GA. The number of population is P, the number of individuals is D, the space of all individuals is PD. The space of fitness value is PD. The space required for the selection operation is 0.5P ? 4D. The space required for the mutation operation is 0.5P ? 4D. The space required for variables such as crossover probability, selection probability and maximum number of iterations is 17. Therefore, the total space required for GA algorithm is 2PD þ P þ 8D þ 17. 4. PSO. The number of population is P, the number of individuals is D, the space of position and velocity individual is 2PD. The space required for the local optimal value is PD. The space required to update the position is 2P ? 0.5D. The space required to update the velocity is P ? 0.5D. The required space for parameters such as inertia weight, acceleration factor and maximum number of iterations, and etc., is 34. Therefore, the total space required for PSO algorithm is 3PD þ 3P þ D þ 34. 5. ACO. The number of population is P, the number of ant is D, and the space of all ants is PD. The space needed to calculate the transfer probability of ants is PD. The space needed to calculate the tabu table is PD ? P. The space needed for updating residual information is 2P ? D. Other parameters include the maximum number of iterations, heuristics, expectation heuristics, information intensity, etc. The required Table 1 The parameters of benchmark functions 100 [-5.12, 5.12] 0 F10 f 10 ðxÞ ¼ À20 exp

100
[-50, 50] 0 storage space is 19. Therefore, the total space required for ACO algorithm is 3PD þ P þ 2D þ 19. 6. DE. The number of population is P, the number of individuals is D, and the space of all individuals is PD. The space required for compilation and cross operations is PD. The space needed for greedy selection operations is PD ? P. The space needed to select the next generation of individual operations is D. The storage space required for parameters such as mutation operator, crossover operator and evolution algebra is 21. Therefore, the total space required for DE algorithm is 3PD þ 2P þ D þ 21. 7. CSA. The number of population is P, the number of individuals is D, and the space of all individuals is PD. The space required for the nest position is D. The storage space required for the number of available nests, the number of discarded and rebuilt nests is 1.5PD. The space needed for Levi's position update is P ? 3D. The storage space needed for other parameters, such as discovery probability and number of cycles, etc., is 23. Therefore, the total space required for CSA algorithm is 2:5PD þ P þ 4D þ 23.
From the above analysis results, the spatial complexity of these algorithms is shown in Table 3.
The results in Table 3 show that the space complexity of these optimization algorithms is a function of the number of populations and the dimensions of the problems to be solved. As a whole, the space requirements of these optimization algorithms are not much different. With the development of computer hardware, the space requirement of optimization algorithm has little influence on the realization of the algorithm. Therefore, it can be considered that these optimization algorithms are equal in space complexity, and the time complexity should be used to evaluate the algorithm.
The time complexity of these optimization algorithms is analyzed. In the calculation process, the addition and the subtraction are equal to 1 time unit, and the multiplication and the division are equal to 4 time units.
1. Improved ABC. (a) Initialization phase: The number of population is P, each employed bee has D characteristics, and the time required for initialization is PD. The information of employed bees and onlooker bees is stored, and the time required is PD. The total time is 2PD; (b) the employed bees phase: The time for the employed bees to find a new nectar source near the existing nectar source is 3PD. PD is needed to select the nectar source again. It needs to repeat M times in total, so it needs 4MPD; (c) according to Eq. (5), (6) and (7), it takes 4.5P 2 for the onlooker bees to select a new nectar source and 3.5PD to generate a new nectar source. It takes 1.5D to select a nectar source. It needs to repeat M times in total, so the time required is M(4PD ? 4.5P 2 ? 1.5D); (d) The time needed for onlooker bees to randomly select nectar source is D.
Up to 0.5P times. M times in total, so the time required is 0.5MPD. Therefore, the time complexity of improved ABC algorithm is 2PD þ Mð8:5PD þ 4:5P 2 þ 1:5DÞ. 2. ABC. (a) Initialization phase: The number of population is P, each employed bee has D characteristics, and  Table 3 The space complexity of the algorithms

Algorithm
The space complexity FIR digital filter design based on improved artificial bee colony algorithm the time required for initialization is PD. The information of employed bees and onlooker bees is stored, and the time required is PD. The total time is 2PD; (b) the employed bees phase: The time for the employed bees to find a new nectar source near the existing nectar source is 3PD. PD is needed to select the nectar source again. It needs to repeat M times in total, so it needs 4MPD; (c) it takes 0.5P (P ? 3D) for the onlooker bees to select a nectar source and 3.5PD to generate a new nectar source. It takes 1.5D to select a nectar source. It needs to repeat M times in total, so the time required is M(4PD ? 0.5P 2 ? 1.5D); (d) the time needed for onlooker bees to randomly select nectar source is D. Up to 0.5P times. M times in total, so the time required is 0.5MPD. Therefore, the time complexity of ABC algorithm is 2PD þ Mð8:5PD þ 0:5P 2 þ 1:5DÞ. In conclusion, the running time of these optimization algorithms is also shown in Table 4.
According to the time complexity comparison results of these algorithms in Table 4, the time complexity of each algorithm is a function of P, D and M. Considering that Table 4 The time complexity of the algorithms

Algorithm
The time complexity Improved ABC 2PD þ Mð8:5PD þ 4:5P 2 þ 1:5DÞ ABC 2PD þ Mð8:5PD þ 0:5P 2 þ 1:5DÞ M will be much larger than P and D, the M term in the time complexity expression of each algorithm is ignored. Although the value range of P and D is very different, it is generally considered that the time complexity of algorithm ACO is the highest, followed by improved ABC, ABC, CSA, DE, and the lowest are GA and PSO. When P is smaller (less than 20), the time complexity of PSO algorithm is higher than that of GA algorithm, while when P is larger, the time complexity of PSO algorithm is smaller than that of GA algorithm. The above time complexity analysis results are based on theory. In the optimization of practical problems, the calculation time is also affected by the convergence speed, which can make up for the high time complexity of the algorithm. For GA, DE and CSA, with the increase of the dimension of the problem to be solved, the control parameters of the algorithm are more and stricter, so the algorithm is not flexible in application. A good parameter setting will converge very fast. If the parameter setting is not correct, it may not converge all the time. Because PSO algorithm relies on local optimal and all optimal solutions, but lacks stochastic process, the convergence of PSO is not very good. In the case of a large number of local optimal solutions, it is very easy to fall into local optimal. Because of the time complexity of ACO algorithm, it needs more running time. The algorithm has a certain ability to deal with different problems, and the initial convergence speed is very fast, but when it falls into the local optimum, it cannot jump out of the local optimum quickly and approach the global optimum. The improved ABC algorithm and the standard ABC algorithm, although the time complexity is not low, have the convergence speed only slower than GA, can quickly converge to the global optimal solution. Therefore, the comparison of optimization results of practical problems can truly reflect the time complexity of optimization algorithm. In this paper, the average computing time of these optimization algorithms is given in the simulation. The simulation results show that the improved ABC algorithm improves the performance without increasing the time complexity of the algorithm.

The design of FIR digital filter based on improved ABC algorithm
The unit sampling response of the N-order FIR digital filter is hð0Þ, hð1Þ, . . ., hðN À 1Þ. The transfer function can be expressed as (Song et al. 2020;Bouhamla et al. 2020) Let z ¼ e jx , then the frequency response of the filter is (Ahirwal et al. 2013) where jHðe jx Þj and /ðxÞ are the magnitude response and the phase response, respectively. If the ideal frequency response for the FIR digital filter is jH d ðe jx Þj, then on the discrete points fx i ji ¼ 1; 2; . . .; Ng, the sum of the square error between the amplitude of the designed filter jHðe jx Þj and that of the ideal filter jH d ðe jx Þj is Equation (9) is substituted into Eq. (10), and there is The frequency response of the ideal filter is generally in the form of rectangular waveform (such as low-pass filter and high-pass filter). The ideal sampling response obtained by inverse Fourier transform is in the form of sampling signal, and the maximum amplitude of the sampling signal is 1, which requires that the modulus of the designed filter coefficient h(n) should be less than 1. Therefore, the parameter to be optimized, that is, the coefficient of FIR filter, is defined as [-1, 1]. It is clear that E is a nonlinear function of the filter coefficient hðnÞ. Therefore, E is a function with N unknown values. According to the minimum mean square error criterion in frequency domain, the design of FIR filter is to select the filter coefficient hð0Þ, hð1Þ, Á Á Á, hðN À 1Þ to minimize the objective function E. Obviously, this is a combinatorial optimization problem. Therefore, we can use the improved ABC algorithm to solve the above combinatorial optimization problem.
Optimization design of FIR filter is to search the optimal filter coefficients, and this process can be viewed as using improved ABC algorithm to find the most abundant nectar source. In this paper, the objective function is the minimizing operation for Eq. (11). The objective function is smaller, the frequency response of designed filter (jHðe jx Þj) is more close to the ideal frequency response of the filter (jH d ðe jx Þj).
Obviously, the smaller the value of fitness function is, the smaller the mean square error of the filtering coefficient corresponding to the nectar source is. It means that the nectar source corresponds to a better filtering coefficient. In the design of FIR filter based on improved ABC algorithm, Eq. (11) is chosen as fitness function. The smaller the fitness function is, the closer the frequency response Hðe jw Þ of the designed filter is to the frequency response jH d ðe jw Þj of the ideal filter. At the end of the improved ABC algorithm, the most abundant nectar source found by bees corresponds to the optimal filter coefficient of FIR filter, namely are hð0Þ, hð1Þ, Á Á Á, hðN À 1Þ. According to the above introduction, the implementation steps of FIR filter based on improved ABC algorithm are described as follows.
Step 1 The frequency response of the ideal filter is given.
Step 2 Initialization of improved ABC algorithm. Determine the number of nectar source-SN, the maximum number of iterations-M, the maximum number of nectar source mining-limit, c max , c min , a, b, etc. Randomly generate SN initial nectar sources.
Step 3 The optimization process based on improved ABC algorithm.
Step 3.2 An employed bee is assigned for nectar source. The searching process is begun according to Eqs. (5), (6) and (7). A new nectar source V i will be generated.
Step 3.3 The fitness value is calculated according to Eq. (11). The nectar source will be retained according to greedy algorithm.
Step 3.4 The probability of nectar source be followed is calculated by Eq. (3). The onlooker bees are searching and retaining the nectar source according to greedy algorithm.
Step 3.5 The algorithm determines whether the nectar source should be discarded. If true, the onlooker bees are changed into scout bees. Otherwise, go to step 3.7.
Step 3.7 Let t ¼ t þ 1. If the maximum numbers of iterations are satisfied, optimal parameters hð0Þ, hð1Þ, Á Á Á, hðN À 1Þ are output, go to Step 4. Otherwise, go to Step 3.2 and continue to execution.
Step 4 After the optimal filter coefficients of FIR filter are obtained, the performance of the filter is verified by experiments.

Simulation
In order to verify the effectiveness and feasibility of the FIR digital filter design method based on improved ABC algorithm and other algorithms, some simulation experiments are performed out. The simulation software is MATLAB 2010b. The configuration information of the simulation computer is CPU: Intel i7-4770 3.4 GHz, memory: 8 GBytes, operating system: Windows 7 professional.
This paper designs three typical FIR filters include lowpass, band-pass and band-stop digital filter. In this paper, the sampling points equal the FIR filter length. The length of the filter is the order of the filter. Assuming that the length of the filter is N, the purpose of designing the filter is to obtain N filter systems, namely, the number of sampling points (the number of tap-weight). From the perspective of implementation, FIR filter includes transversal, cascade, frequency sampling and fast convolution. In this study, frequency sampling FIR filter is selected as the research object.
Unlike IIR filter, FIR filter can guarantee arbitrary amplitude frequency characteristics and strict linear phase frequency characteristics. At the same time, its unit sampling response is finite, so the FIR filter is a stable system. The frequency response between the sampling points of FIR filter is formed by the extension and superposition of the weighted interpolation function of each sampling point, which will have a certain error. These approximation errors may lead to the existence of poles in the designed FIR filter, but these poles will never exceed the unit range, so they will not pose a threat to the stability of FIR system. However, the error will affect the performance of FIR filter, which can be solved by increasing the number of sampling points N, resulting in an increase in the amount of calculation. The sampling points of the band-stop and band-pass filters are slightly larger than the theoretical value.
The technical indicators of low-pass FIR digital filter are as follows. p rad/s. The sampling points N ! 2p Dx are 30. Therefore, the sampling points of low-pass FIR filter are 30.
The technical indicators of band-pass FIR digital filter are as follows.
The sampling interval Dx is 0:1 3 p rad/s. The sampling points N ! 2p Dx are 60. Therefore, the sampling points of low-pass FIR filter are chosen as 64.
The technical indicators of band-stop FIR digital filter are as follows.
The sampling interval Dx is 0:1 3 p rad/s. The sampling points N ! 2p Dx are 60. Therefore, the sampling points of low-pass FIR filter are chosen as 64.
In order to compare the convergence performance and the optimization effect of the proposed method, the same experiments are compared with GA (Szopos et al. 2016), PSO , DE (dash et al. 2017), ACO (Tsutsumi and Suyama, 2014), CSA (Sarangi et al. 2018) and standard ABC (Kockanat et al. 2018), respectively. The filter coefficients to be optimized are limited to [-1, 1]. The number of iterations of these algorithms is 500. The population number of these algorithms is 50. The parameters of all algorithms involved are given in Table 5.
In the experiment, these optimization algorithms run randomly 50 times. The optimal solution of each algorithm is recorded, and the optimal solution with the smallest fitness value among 50 results is selected as the filter coefficient to obtain the amplitude frequency response of the filter. Figure 1 shows the amplitude frequency response curves of the low-pass FIR digital filter designed by these optimization algorithms. Figure 2 shows the amplitude frequency response curves of the band-pass FIR digital filter designed by these optimization algorithms. Figure 3 shows the amplitude frequency response curves of the band-stop FIR digital filter designed by these optimization algorithms. It can be observed from Figs. 1, 2 and 3 that the amplitude frequency response of the designed FIR filter is closer to the ideal FIR filter. The filter can descend from the pass-band to the stop-band more smoothly; the passband ripple is closest to the zero phase digital filters.
Figures 4, 5 and 6 give the phase response of these optimization algorithms for low-pass, band-pass and bandstop FIR filters. Compared with other optimization algorithms, for low-pass, band-pass or band-stop filters, the stop-band attenuation of the designed FIR filter is smaller and closer to zero phase digital filter. The coefficients of the filter optimized by the improved ABC algorithm proposed in this paper are more reasonable, so better performance is achieved. Figure 7 shows the fitness curve of the low-pass FIR digital filter designed by these optimization algorithms. Figure 8 shows the fitness curve of the band-pass FIR digital filter designed by these optimization algorithms. Figure 9 shows the fitness curve of the band-stop FIR digital filter designed by these optimization algorithms.
It can be seen from Figs. 7, 8 and 9 that the fitness curve of the improved ABC algorithm is faster than the other optimization algorithms, and the effect is very obvious. On analyzing the convergence behavior with existing other Table 5 The parameters of the optimization algorithms

Algorithm
The parameters Improved ABC Limit is 50, c max is 1, c min is 0, a is 50, b is 5 ABC Limit is 50 GA Binary encoding, uniform crossover, crossover probability is 0.8, the single-point mutation, the mutation probability is 0.05 PSO The maximum velocity of particle v max is 1, the maximum weighted factor x max is 0.9, the minimum weighted factor x min is 0.4, and the weighting factor decreases linearly ACO Importance of pheromones a is 0.7, importance of heuristic information b is 0.3, pheromone residue factor q is 0.8

DE
The variation factor F and cross factor CR are adjusted linearly, F [ [0.3,0.6], CR [ [0.6,0.9], x 1 is 0.999, x 2 is 0.001, x 3 is 3 CSA Search step control value a is 1, position parameter b is 1.5, the discovering probability p is 0.25 Fig. 1 The amplitude-response curves of the low-pass FIR filter FIR digital filter design based on improved artificial bee colony algorithm 13499 evolutionary techniques it is observed that proposed improved ABC algorithm is better in stability, exploration ability. The main reason for the performance improvement is that in addition to the advantages of ABC algorithm itself, the improvement of local search strategy further improves the global optimization ability of the algorithm. Table 6 shows the average experimental results of the low-pass filters designed by these optimization algorithms. Table 7 shows the average experimental results of the Fig. 2 The amplitude-response curves of the band-pass FIR filter Fig. 3 The amplitude-response curves of the band-stop FIR filter Fig. 4 The phase response comparison of the low-pass FIR filter band-pass filters designed by these optimization algorithms. Table 8 shows the average experimental results of the low-stop filters designed by these optimization algorithms. From these tables, it can be concluded that the improved ABC algorithm is superior to other optimization algorithms in terms of robustness and solution. Namely, the other optimization algorithms are prone to premature and fall into the local optimal solution, which cannot guarantee the convergence to the optimal solution, and the robustness of these algorithms is poor. Because of the characteristics of the algorithm itself, the effect of FIR filter designed by GA is the most undesirable. If the population size, the number of iterations and other parameters of these algorithms are increased, it will undoubtedly increase the complexity of the algorithm itself. Compared with these algorithms, ABC algorithm can obtain better performance. But ABC algorithm also exists the problem of limited local search ability. In the proposed ABC algorithm, the local search ability of ABC algorithm is enhanced by improving neighborhood search strategy, which effectively balances the contradiction between global search and local search ability, thus improving the performance of FIR filter. Table 9 shows the performance parameters of the FIR low-pass filters designed by these optimization algorithms. Fig. 8 The fitness curves of the band-pass FIR filter Fig. 9 The fitness curves of the band-stop FIR filter   Table 10 shows the performance parameters of the FIR band-pass filters designed by these optimization algorithms. Table 11 shows the performance parameters of the FIR band-stop filters designed by these optimization algorithms. It can be seen from these tables that the filters designed by the improved ABC algorithm have smaller pass-band ripples, pass-band attenuation and transition band error, and larger stop-band ripples and stop-band attenuation. Therefore, the filters designed by the improved ABC algorithm have better performance parameters. From the data in the three tables, we can see that the stop-band attenuation of FIR filter designed by the improved ABC algorithm is more than 10 dB larger than that of the other six algorithms, and the transition band and stop-band have obvious boundaries, the stop-band changes uniformly, and the pass-band attenuation is small. At the same time, the filter designed by the improved ABC algorithm has smaller transition band error, which shows that its transition band is narrower. In addition, the filter designed by the improved ABC algorithm has a small fluctuation of stop-band attenuation variance, which shows the good stability of the algorithm. For the three kinds of filters designed in the simulation, the improved ABC algorithm proposed in this paper has higher convergence speed and accuracy than other algorithms, so it has better performance. Among other optimization algorithms, ABC is close to PSO and DE, followed by ACO and CSA, and GA is the worst. Combining the fitness curves of Figs. 7, 8 and 9, it can be analyzed that GA is too easy to fall into local convergence and cannot reach the optimal solution  compared with other algorithms. Compared with GA, CSA is more similar to PSO algorithm without optimal individual. In the later stage of iteration, CSA lacks vitality and optimization ability. Therefore, the performance of CSA is only better than GA and worse than other optimization algorithms. Therefore, in the design of low-pass, band-pass and band-stop filters, the improved ABC algorithm shows superior performance and high stability. The t test can determine the means of two groups, which are statistically different from each other or not. This paper performs t test by individually comparing ABC, GA, PSO, ACO, DE and CSA with improved ABC. The high positive t value indicates the superiority of the improved ABC over other optimization optimizations. Table 12 clearly indicates the superiority of the improved ABC over ABC, GA, PSO, ACO, DE and CSA for the design of FIR low-pass, band-stop, band-pass filters. All the t values of pass-band ripple and stop-band ripple for other optimization algorithms are positive t values, which signify the superiority of the improved ABC over other six optimization algorithms. Table 13 shows the results of Kruskal-Wallis test for FIR filters designed by these optimization algorithms. The algorithm runs 20 times, takes the maximum absolute value error of filter error as the evaluation object, and sets the significance level to 0.05. As can be seen from Table 13, the p-values of improved ABC, ABC and ACO are greater than the significance level of 0.05, so the assumption that there is a significant difference in the performance of the designed FIR filter can be rejected. Meanwhile, the p-values of GA, CSA, PSO, DE are smaller than the significance level of 0.05, and it can be inferred that there are differences in the performance of the filters obtained by these algorithms at least twice. Therefore, it can be concluded that the FIR design performance of improved ABC, ABC and ACO is better than GA, DE, PSO and CSA.
In order to compare the real-time performance and space complexity of the algorithms, Table 14 shows the average optimization time and space occupied by memory required for the FIR filters designed by these optimization algorithms. It can be seen from Table 14 that the improved ABC algorithm proposed in this paper has shorter optimization time. Although the time complexity of the improved ABC algorithm is increased, the actual calculation time is shortened because it can search the global optimal value faster. Furthermore, the results in Table 14 also show that the memory occupied by these optimization algorithms in the design of FIR filter is relatively close, which is also consistent with the conclusions obtained in Table 3.

Conclusions
In this paper, an improved ABC algorithm is exploited for the design of optimal digital FIR filter. A comparative and analytical study of FIR filter design using seven popular optimization techniques (improved ABC, ABC, GA, PSO, ACO, DE and CSA) is discussed. The performance of lowpass, band-pass and band-stop filters optimized by above seven optimization algorithms is studied. The aim of the filter design is to find the optimal filter coefficients having minimum relative error with respect to the ideal filter response. The simulation result clearly signifies that improved ABC performs better by means of magnitude response with high stop-band attenuation, optimum passband and stop-band ripples and smallest optimization time.
The proposed improved ABC uses the information of the global optimal solution to guide the search of candidate solution, improves the development efficiency and obtains good optimization performance. From the simulation results, it is observed that improved ABC may be treated as an efficient tool to be used for optimal filter design. It is concluded that improved ABC is more efficient, accurate, faster and a better global optimizer than other six optimization algorithms. The future work of this paper is to implement the FIR filter design method proposed in this paper on FPGA to verify the actual performance of the filter.