A New Design Method Based On Artificial Bee Colony Algorithm For Digital IIR Filters
A New Design Method Based On Artificial Bee Colony Algorithm For Digital IIR Filters
A new design method based on articial bee colony algorithm for digital IIR lters
Nurhan Karaboga
Erciyes University, Faculty of Engineering, Department of Electrical-Electronics Engineering, 38039 Melikgazi, Kayseri, Turkey Received 7 August 2007; received in revised form 28 June 2008; accepted 18 November 2008
Abstract Digital lters can be broadly classied into two groups: recursive (innite impulse response (IIR)) and non-recursive (nite impulse response (FIR)). An IIR lter can provide a much better performance than the FIR lter having the same number of coefcients. However, IIR lters might have a multi-modal error surface. Therefore, a reliable design method proposed for IIR lters must be based on a global search procedure. Articial bee colony (ABC) algorithm has been recently introduced for global optimization. The ABC algorithm simulating the intelligent foraging behaviour of honey bee swarm is a simple, robust, and very exible algorithm. In this work, a new method based on ABC algorithm for designing digital IIR lters is described and its performance is compared with that of a conventional optimization algorithm (LSQ-nonlin) and particle swarm optimization (PSO) algorithm. r 2009 The Franklin Institute. Published by Elsevier Ltd. All rights reserved.
Keywords: Digital IIR lters; System identication; Swarm-based optimization; Articial bee colony algorithm
1. Introduction Filtering is a process by which the frequency spectrum of a signal is modied, reshaped, or manipulated according to some desired specications. Design of a digital lter is the process of synthesizing and implementing a lter network so that a set of prescribed excitations results in a set of desired responses [14]. Digital lters can be broadly classied into two groups: recursive and non-recursive. The output from a recursive digital lter
E-mail address: [email protected] 0016-0032/$32.00 r 2009 The Franklin Institute. Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.jfranklin.2008.11.003
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 329
depends on one or more previous output values, as well as on inputs. In other words, it involves feedback. From the digital signal processing point of view, its great advantage is computational economy. A lter characteristic requiring more coefcients in a nonrecursive realization can often be obtained using just a few recursive coefcients. However, there are two potential disadvantages [57]. First, a recursive lter may become unstable if its feedback coefcients are chosen badly during the adaptation process. This problem can be easily handled by limiting the parameter space. Secondly, recursive designs cannot generally provide the linear-phase responses so readily achieved by non-recursive methods. Apart from these two disadvantages, the possibility of having a multi-modal error surface is another important design challenge for recursive lters. In order to overcome this problem, a design method which can achieve the global minima in a multi-modal error surface is required. However, the conventional design methods, widely employed to tackle the problem, based on gradient search can easily be stuck at local minima of error surface. Therefore, some researchers have attempted to develop the design methods based on modern global optimization algorithms such as the simulated annealing (SA) [810], genetic algorithm (GA) [1116], and differential evolution algorithm [17,18]. Swarm intelligence has become a research interest to many research scientists from various areas in recent years. The swarm intelligence can be dened as any attempt for designing algorithms or distributed problem-solving devices inspired by the collective behaviour of insects and other animal societies [19]. More specically, swarm intelligence term can be used in a general manner to refer to any restrained collection of interacting agents or individuals. The classical examples of swarm: bees swarming around their hive; a colony of ants; a ock of birds; and an immune system which is a swarm of cells and a crowd that is a swarm of people. Recently, particle swarm optimization algorithm has been introduced for numerical optimization problems [20] and successfully applied to digital lter design and other real-world problems [21,22]. PSO algorithm that is a populationbased stochastic optimization technique models the social behaviour of bird ocking or sh schooling [20] and is well adapted to the optimization of nonlinear functions in multidimensional space. PSO consists of a swarm of particles moving in a search space of possible solutions for a problem. Every particle has a position vector representing a candidate solution to the problem and a velocity vector. Moreover, each particle contains a small memory that stores its own best position seen so far and a global best position obtained through communication with its neighbour particles. Miranda and Fonseca [23] have proposed an improved version of PSO called evolutionary particle swarm optimization (EPSO). In [23], it is presented that EPSO which joins together the characteristics of evolutionary and of particle swarm algorithms is much more reliable than PSO for practical applications. In 2005, Karaboga [24] introduced a bee swarm algorithm called articial bee colony (ABC) algorithm for numerical optimization problems; and Basturk and Karaboga [25,26] compared the performance of ABC with that of some other well-known population-based optimization algorithms. In this work, rstly the performance comparison of PSO, EPSO, and ABC algorithms are presented on a set of numeric test functions. Secondly, a new method based on ABC algorithm is described for designing IIR lters. The paper is organized as follows: Section 2 presents ABC algorithm. Section 3 describes the problem. In Section 4, the performance of ABC is compared with that of PSO and EPSO on a set of a well-known numeric test functions [23] and LSQ-nonlin, which is a conventional
ARTICLE IN PRESS
330 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348
optimization algorithm, PSO and ABC algorithms are applied to the design of low- and high-order digital IIR lters and the results obtained are discussed. 2. Articial bee colony algorithm The owchart of the articial bee colony algorithm is given in Fig. 1. Each cycle of the search consists of three steps after initialization stage: placing the employed bees onto the food sources and calculating their nectar amounts; placing the onlookers onto the food sources and calculating the nectar amounts; and determining the scout bees and placing them onto the randomly determined food sources. In the ABC, a food source position represents a possible solution to the problem to be optimized. Therefore, at the initialization step, a set of food source positions are randomly produced and also the values of control parameters of the algorithm are assigned. The nectar amount of a food
Initial food source positions Calculate the nectar amounts Determine the new food positions for the employed bees Calculate nectar amounts No Determine a neighbour food source position for the onlooker Select a food source for the onlooker
Yes Memorize the position of best food source Find the abandoned food source Produce new position for the exhausted food source
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 331
source corresponds to the quality of the solution represented by that food source. So the nectar amounts of the food sources existing at the initial positions are determined. In other words, the quality values of the initial solutions are calculated. Each employed bee is moved onto her food source area for determining a new food source within the neighbourhood of the present one, and then its nectar amount is evaluated. If the nectar amount of the new one is higher, then she forgets the previous one and memorizes the new one. After the employed bees complete their search, they come back into the hive and share their information about the nectar amounts of their sources with the onlookers waiting on the dance area. All onlookers successively determine a food source area with a probability based on their nectar amounts. If the nectar amount of a food source is much higher when compared with other food sources, it means that this source will be chosen by most of the onlookers. This process is similar to the natural selection process in evolutionary algorithms. Each onlooker determines a neighbour food source within the neighbourhood of the one to which she has been assigned and then its nectar amount is evaluated. A honey bee colony has scouts that are the colonys explorers who do not need any guidance while looking for food. They are primarily concerned with nding any kind of food source. As a result of such behaviour, the scouts are characterized by low search costs and a low average in food source quality. Occasionally, the scouts can accidentally discover rich, entirely unknown food sources. In the case of articial bees, the articial scouts could have the fast discovery of the group of feasible solutions as a task. In ABC algorithm, at most one employed bee at each cycle is selected and classied as the scout bee. The selection of the scout bee is controlled by a control parameter called limit. If a solution representing a food source cannot be improved by a predetermined number of trials, it means that the associated food source has been exhausted by the bees and then the employed bee of this food source becomes a scout. The position of the abandoned food source is replaced with a randomly produced food position. The number of trials for releasing a food source is equal to the value of limit which is an important control parameter of ABC algorithm. These three steps are repeated until the termination criteria are satised. As other social foragers, bees search for food sources in a way that maximizes the ratio E/T (where E is the energy obtained and T the time spent for foraging). In the case of bee swarms, E is proportional to the nectar amount of food sources discovered by bees and the bee swarm works to maximize the honey being stored inside the hive. In a maximization problem, the goal is to nd the maximum of the objective function F(y), yARp. Assume that yi is the position of the ith food source (ith solution to the problem); F(yi) represents the nectar amount of the food source located at y ( the quality of solution) and is proportional to the energy E(yi). Let Pc fyi cji 1; 2; . . . ; sg (c: cycle, s: number of food sources around the hive) represent the population of food source positions being visited by bees. As mentioned before, the preference of a food source by an onlooker bee mainly depends on the nectar amount F(y) of that food source. As the nectar amount of a food source increases, the probability with that the source is chosen by an onlooker bee increases proportionally. The probability with that the food source located at yi is selected by an onlooker bee can be calculated by F yi pi Ps k 1 F yk (1)
ARTICLE IN PRESS
332 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348
where s is the number of food sources (number of solutions in the population) and is also equal to the number of employed bees in the colony. An onlooker bee selects a food source region depending on the probabilities calculated and determines a neighbour food source around the chosen one. For example, in the selection process for the rst onlooker, a random number is produced between [0,1] and if this number is less than p1, the rst food source (solution) is selected for the rst onlooker. Otherwise, this random number is compared with p2 and if less than that, the second source is chosen. Otherwise, the probability of third source is checked. This process is repeated until all onlookers are distributed onto the food sources (solutions). In this way, most of the onlookers are recruited to the food sources with high nectar amount (the solutions with high tness value) that have been determined by the employed bees. Assume that the position of the food source selected by the onlooker is yi. The neighbour food source position of yi is calculated as the following: yi c 1 yi c fi yi c yk c (2)
where fi is a randomly produced number in the interval [1,+1] to nd a food source with more nectar around yi(c) and k is a randomly produced index which is different from i. If the nectar amount F(yi(c+1)) at yi(c+1) is higher than F(yi(c)) at yi(c), then the articial bee memorizes yi(c+1) and shares her information with onlooker bees; and the position yi(c) of the food source i is changed to be yi(c+1), otherwise yi(c) is kept as it is. As mentioned before, every food source has only one employed bee; therefore, the number of employed bees is equal to the number of food sources. If the position yi of the food source i cannot be improved through the predetermined number of trials limit of bees, then the food source i is abandoned and then the employed bee becomes a scout. The scout starts to search for a new food source randomly, and after nding the new one, the new position is accepted to be yi(c+1). The ABC algorithm has three control parameters: colony size (number of employed bees or food source positions), maximum cycle number or iteration number, and the limit value. 3. Denition of the problem Consider the IIR lter with the inputoutput relationship governed by y k
M X i1
ai y k i
L X i0
bi xk i
(3)
where x(k) and y(k) are the lters input and output, respectively, and M (XL) is the lter order. The transfer function of this IIR lter can be written in the following general form: PL i Bz i0 bi z H z (4) P i A z 1 M i1 ai z Hence, the design of this lter can be considered as a minimization problem of the cost function J(w) stated as the following:
w 2W
(5)
where w b0
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 333
The aim is to minimize the cost function J(w) by adjusting w. The cost function is usually expressed as the time-averaged cost function dened by J w
N 1X d k yk2 N k1
(6)
where d(k) and y(k) are the desired and actual responses of the lter, respectively, and N is the number of samples used for the calculation of cost function. 4. Simulation results In this section, rstly the performance of the ABC algorithm is compared with that of the PSO algorithm and its improved version EPSO on a set of numeric test functions; and secondly LSQ-nonlin, PSO, and ABC algorithms are applied to the design of low- and high-order digital IIR lters for the purpose of system identication. 4.1. Numeric function optimization Four functions (F1F4) presented in Table 1 have been used by Miranda and Fonseca to demonstrate the superiority of EPSO over the classic PSO [23]. These functions are as follows: F1 (Sphere): The rst function is smooth, unimodal, strongly convex, and symmetric. F2 (Banana): Rosenbrocks valley is a classic optimization function, also known as Banana function. The global optimum is inside a long, narrow, parabolic shaped at valley. To nd the valley is trivial, however, convergence to the global optimum is difcult and hence this problem has been repeatedly used to assess the performance of optimization algorithms. F3 (Schaffer): This function is the two-dimensional Schaffers function. F4 (Alpine): This function is interesting for testing the search of an extremum since there are many local extrema depending on xmax while there is only one global extrema. To demonstrate the superiority of the ABC algorithm over the classic PSO and EPSO, the average number of evaluations that three algorithms need to reach the stopping criterion are compared. The maximum number of evaluations was xed in 200,000 and the average number of evaluations to meet the stopping criterion is presented in Table 2.
Table 1 Test functions and stopping criteria. Function number F1 F2 F3 F4 Function
30 P i 1 30 P
x2 i
ARTICLE IN PRESS
334 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 Table 2 Comparison of ABC with the classical PSO and EPSO. Function F1 F2 F3 F4 PSO 161625.0 180310.8 59547.0 199190.1 EPSO 16421.4 27005.3 11862.2 78539.8 ABC 6113.6 10135.2 51202.4 5125.3
Table 3 Comparison of ABC with the classical PSO and EPSO. Function F1 F2 F3 F4 PSO 1.91E02 114.443 5.45E11 86.1071 EPSO 7.81E04 33.8828 2.15E13 98.9627 ABC 2.486E16 4.391669 2.5E12 98.9627
The average function values produced by three algorithms for a xed number of evaluations were also compared. So, considering a number of evaluations of 200,000, the results in Table 3 were obtained. The average results of ABC algorithm presented in Tables 2 and 3 were obtained for 30 runs. For every run, the initial population was randomly created by means of using different seed numbers. The results belonging to the ABC algorithm in Tables 2 and 3 were achieved using the following parameter values: colony size 20; limit value 20D. From Table 2, it is seen that the convergence speed of ABC is better than PSO and EPSO for F1, F2, and F4. For F3, ABC is better than PSO but worse than EPSO. In terms of the quality of solutions found after 200,000 evaluations, the ABC algorithm outperforms PSO and EPSO on F1 and F2 functions. On F3 and F4 functions, EPSO and ABC produce similar performances. Consequently, compared with PSO and EPSO, ABC shows better or similar performance on the set of test functions considered in [23]. Particularly, the performance of ABC becomes much clearer on the functions with many variables such as F1 and F2.
4.2. Digital IIR lter design Application of IIR lter in system identication has been widely studied since many problems encountered in signal processing can be characterized as a system identication problem (Fig. 2). Therefore, in the simulation study, IIR lters are designed for the system identication purpose. In this case, the parameters of the lters are successively adjusted by the ABC algorithm until the error between the output of the lter and the unknown system is minimized. The lter coefcients are encoded in the string form as shown in Fig. 3. The tness value of a solution i in the population is determined by using the following formula: fiti 1 k J wi (7)
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 335
unknown plant
d(k)
x (k)
IIR filter
y(k)
+
e(k)
ABC algorithm
Fig. 2. Block diagram of system identication process using the IIR lter designed by the ABC algorithm.
b0
b1
...
bL
a1
a2
...
aM
Table 4 Control parameter values of the algorithms used for the rst two examples. PSO algorithm Swarm size 20 f1 2, f2 2, w 0.8 Iteration 100 Xmax 2, Xmin 2 Vmax 0.15Xmax Vmin 0.15Xmin ABC algorithm Colony size 20 limit value 40 Iteration 100 Xmax 2 Xmin 2
where J(w)i is the cost function value computed for the solution i and k the number of the poles outside the unit circle. Using this tness function, the poles of the IIR lters being designed by algorithms are forced to move into the unit circle. Hence, the IIR lters of which the stability condition is satised are produced at the end of each run. Simulation results were carried out on four lter examples. The rst two examples (low-order IIR lters) used in the simulation studies were taken from [6,27] and the third one from [27]. The results of the ABC-based method were compared with that of LSQ-nonlin which is a conventional optimization algorithm and PSO. LSQ-nonlin is a nonlinear least-squares data tting algorithm [28], more specically the algorithm implemented in the Optimization Toolbox of Matlab. In order to carry out the comparison of the algorithms in similar conditions, the values of the similar control parameters of the algorithms were chosen to be equal to each other. For example; swarm size and colony size of the algorithms were equal to each other. Table 4 shows the control parameter values used for PSO and ABC algorithms in the rst two IIR lter design examples. In the table, Xmin and Xmax represent the minimum and maximum limit values of the lter parameters.
ARTICLE IN PRESS
336 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348
Example 1. In the rst example, the unknown plant and the lter had the following transfer functions: H z1 1 1 1:2z1 0 :6 z 2 ; H M z1 1 1 a1 z1 a2 z 2 (8)
The input, x(k), to the system and the lter was a white sequence. Since the lter order is equal to the system order, a local minima problem does not occur. Fig. 4 presents the error surface for this lter. Fig. 5 shows the evolution of the mean-square-error (MSE) averaged over 50 different runs of LSQ-nonlin, ABC, and PSO. Each run had a randomly chosen initial w. Fig. 6 also demonstrates the evolution of parameters for a run. Example 2. In the second example, the plant was a second-order system and the lter was a rst-order IIR lter with the following transfer functions: H z1 0:05 0:4z1 ; 1:0 1:1314z1 0:25z2 H M z1 b 1 az1 (9)
The system input was a uniform white sequence. The data length used in calculating the MSE was N 100. Since the reduced order lter is employed the MSE is multi-modal. The error surface is given in Fig. 7. Fig. 8 presents the cost-function value versus number of cost-function evaluations averaged over 50 random runs. Each run had a randomly chosen initial w as in the rst example. Fig. 9 presents the evolution of both parameters for a run. Example 3. In the third example, the plant was a sixth-order system and had the transfer function [29]: H z1 1 0:4z2 0:65z4 0:26z6 1 0:77z2 0:8498z4 0:6486z6
1.0
0.5
a2
0.0
-0.5
0.99 0.9 0.7
0.05
0.4
0.2
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 337
0.5 0.45 0.4 0.35 0.3 MSE 0.25 0.2 0.15 0.1 0.05 0 0 10 20 30 40 50 60 Iteration 70 80 90 100
ABC PSO LSQ-NONLIN
Fig. 5. Cost-function value versus number of iterations averaged over 50 random runs for LSQ-nonlin, PSO, and ABC algorithms (Example 1).
1.5
0.5 a1,a2
-0.5
-1 0 10 20 30 40 50 60 Iteration 70 80 90 100
Fig. 6. Evolution of the parameters of the rst lter for PSO and ABC algorithms.
The IIR lter was the fourth-order and had the following transfer function: H M z1 b0 b1 z1 b2 z2 b3 z3 b4 z4 1 a1 z1 a2 z2 a3 z3 a4 z4 (10)
Since the system was a sixth-order system and the lter fourth order, the error surface is not unimodal as in the second example. The system input was a uniform white sequence
ARTICLE IN PRESS
338 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348
1.0
0.3
0.4
0.6 0.8
0.5
0.98 1.2
1.4
0.0
1.0 0.99
-0.5
0.98
0.5 0.45 0.4 0.35 0.3 MSE 0.25 0.2 0.15 0.1 0.05 0 0 10 20 30 40 50 60 Iteration 70 80 90 100
LSQ-NONLIN PSO ABC
Fig. 8. Cost-function value versus number of evaluations averaged over 50 random runs for LSQ-nonlin, PSO, and ABC (Example 2).
and the data length in calculating the MSE was N 200 in this example. Fig. 10 presents the cost-function value versus number of cost function evaluations averaged over 50 random runs. Figs. 11 and 12 present the evolution of the denominator and the nominator parameters for a run, respectively. Also, Fig. 13 demonstrates the positions of
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 339
1 0.8 0.6 0.4 a1,b1 0.2 0 -0.2 -0.4 -0.6 -0.8 0 10 20 30 40 50 60 Iteration 70 80 90 100
a1 (ABC) b1 (ABC) a1 (PSO) b1 (PSO)
Fig. 9. Evolution of the parameters of the second lter for PSO and ABC algorithms.
1 0.8 0.7 0.6 MSE 0.5 0.4 0.3 0.2 0.1 0 0 50 100 150 200 250 300 350 400 450 500 Iteration
LSQ-NONLIN PSO ABC
Fig. 10. Cost-function value versus number of evaluations averaged over 50 random runs for LSQ-nonlin, PSO, and ABC (Example 3).
the poles and the zeros of the stable lter designed with the minimum MSE value by using the parameter values given in Table 5 for algorithms. The control parameter values employed in this example were the same as in the rst two examples except the iteration number and limit value. In this example, the algorithms were run for 500 iterations and limit value for ABC was 180.
ARTICLE IN PRESS
340 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348
-1 0 50 100 150 200 250 300 350 400 450 500 Iteration 0 50 100 150 200 250 300 350 400 450 500 Iteration
Fig. 11. Evolution of the denominator parameters of the high-order lter for both algorithms: (a) PSO and (b) ABC.
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 0 50 100 150 200 250 300 350 400 450 500 Iteration a b1 b2 b3 b4 b5
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 50 b1 b2 b3 b4 b5 100 150 200 250 300 350 400 450 500 Iteration a
Fig. 12. Evolution of the nominator parameters of the high-order lter for both algorithms: (a) PSO and (b) ABC.
Example 4. In the fourth example, the unknown plant was a 24th-order system and the IIR lter to be designed was the 20th order. Both of them had the following transfer function: H z1 b0 b1 z1 b2 z2 bL1 zL1 bL zL 1 a1 z1 a2 z2 aM 1 zM 1 aM zM (11)
The coefcients of the unknown plant are given in the rst two columns of Table 6. Since the system was 24th order and the lter 20th order, the error surface is not unimodal. The system input was a uniform white sequence and the data length in calculating the MSE was N 1000 in this example. Fig. 14 presents the cost-function value versus number of
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 341
1 0.8 0.6 Imaginary Part Imaginary Part 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.5 0 Real Part 1 0.8 0.6 0.4 Imaginary Part 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.5 0 0.5 1
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.5 0 Real Part 0.5 1
0.5
Real Part
Fig. 13. The positions of the poles and zeros of the lter designed using the coefcients presented in Table 5: (a) PSO, (b) ABC, and (c) LSQ-nonlin.
Table 5 The values found by LSQ-nonlin, ABC, and PSO algorithms for the coefcients of the lter designed with the minimum MSE in Example 3. Coefcients a1 a2 a3 a4 b0 b1 b2 b3 b4 ABC (0.0015) 0.086 0.066 0.078 0.798 0.995 0.103 0.282 0.073 0.347 PSO (0.0056) 0.086 0.067 0.078 0.798 1.000 0.119 0.286 0.067 0.339 LSQ-nonlin (0.0008) 0.0008 0.0048 0.0023 0.8597 0.9994 0.0003 0.3414 0.0044 0.3940
ARTICLE IN PRESS
342 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 Table 6 The coefcients of the unknown plant and IIR lters with the minimum MSE value designed by the algorithms. Unknown plant (elliptic lter) Coefcients 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 b 0.0006 0.0029 0.0122 0.0355 0.0913 0.1942 0.3700 0.6202 0.9425 1.2912 1.6161 1.8434 1.9280 1.8434 1.6161 1.2912 0.9425 0.6202 0.3700 0.1942 0.0913 0.0355 0.0122 0.0029 0.0006 ABC (MSE 0.0199) a 1 0.0030 0.0001 0.3539 0.0186 0.1636 0.0255 0.1489 0.0891 0.1535 0.0538 0.0733 0.1684 0.2447 0.0030 0.2592 0.0385 0.1967 0.0681 0.0532 0.0850 PSO (MSE 0.0232) b 0.0385 0.0436 0.0256 0.0413 0.0933 0.1804 0.2000 0.0501 0.0680 0.1167 0.0446 0.1068 0.2162 0.1235 0.0461 0.0883 0.0249 0.0462 0.0371 0.0378 0.0158 a 1 0.3104 0.2274 0.1045 0.0022 0.2759 0.2618 0.2305 0.0515 0.2371 0.0458 0.0588 0.1007 0.0706 0.1110 0.0597 0.2294 0.0539 0.0427 0.0270 0.0563 LSQ-nonlin (MSE 0.0129) b 0.0084 0.0154 0.0269 0.0905 0.2298 0.4118 0.5751 0.6457 0.5723 0.3912 0.2375 0.2270 0.3214 0.3779 0.3200 0.2154 0.1509 0.1239 0.0757 0.0143 0.0127 a 1 0.6738 0.7790 0.6790 0.6279 0.3461 0.4206 0.4827 0.5886 0.4645 0.4755 0.4541 0.4625 0.3147 0.2092 0.1145 0.1153 0.0799 0.0527 0.0899 0.2193
a (1.0 e+003) b 0.0010 0.0043 0.0182 0.0502 0.1271 0.2615 0.4894 0.7995 1.1928 1.5988 1.9647 2.1971 2.2563 2.1174 1.8223 1.4298 1.0239 0.6619 0.3867 0.1994 0.0914 0.0350 0.0116 0.0027 0.0005 0.1089 0.1032 0.0094 0.0877 0.1558 0.1275 0.1304 0.0702 0.0564 0.0484 0.0691 0.1356 0.0725 0.0391 0.3083 0.0496 0.0441 0.1359 0.0473 0.0396 0.5000
cost-function iterations averaged over 50 random runs. Fig. 15 demonstrates the positions and zeros of the stable lters with the minimum MSE value designed by using the parameter values given in Table 6 for each algorithm. The control parameter values employed in this example were the same as in the rst three examples except the iteration number and limit value. In this example, the algorithms were run for 1000 iterations and limit value for ABC was 1000. From Figs. 5 and 8, it is seen that the ABC algorithm can design an acceptable lter only after 10 iterations. From the gures, it is also clear that although PSO seems more quick through the rst iterations, it has problem with the ne tuning of the parameters due to its poor local search ability. For the LSQ-nonlin, it can be concluded that it often fails while discovering the global minimum in Example 2. For the high-order lter examples, as expected, the algorithms require more iterations to design an acceptable lter. For the third example, the ABC algorithm needs about 100 cycles, PSO does 250 iterations and LSQ-nonlin needs more than 500 iterations for designing a stable lter having similar performance. From Figs. 11 and 12, it is very clear that the ne tuning ability of ABC is much better than PSO. In the case of ABC, the values
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 343
0.8 0.7 0.6 0.5 MSE 0.4 0.3 0.2 0.1 0 0 100 200 300 400 500 600 700 800 900 1000 Iteration
ABC PSO LSQ-NONLIN
Fig. 14. Cost-function value versus number of evaluations averaged over 50 random runs for LSQ-nonlin, PSO, and ABC (Example 4).
of the lter parameters converge to their nal values very quickly and smoothly. For Example 4, ABC is able to design acceptable lters around 1000 iterations and continuously can improve the solutions. PSO needs more iterations for convergence and LSQ-nonlin cannot improve the solutions after a certain number of iterations although it seems quite quicker through the rst iterations. For all examples, the MSE values obtained by the algorithms after 50 runs and the standard deviations (SD) calculated are given in Table 7. From Table 7, it is clear that LSQ-nonlin has the highest MSE and SD values for the examples. This is because the conventional technique LSQ-nonlin has a serious problem with the local minima. Its performance highly depends on the initial solution. This is a result expected from a gradient-based optimization algorithm. The proposed method produces the minimum MSE and SD values. This shows that the ABC algorithm is more robust than other two algorithms. It means that its performance does not depend on initialization process too much. It is a known fact that the control parameters of an optimization algorithm might affect its performance signicantly. Therefore, in order to investigate how much the proposed design method is affected by the control parameters limit value and colony size of ABC, more simulations were carried out on the lter examples. Firstly, for each example, the algorithm was run 50 times for each colony size: 10, 20, 40, and 80. The mean MSE values and standard deviations calculated are presented in Table 8. In all cases, the total evaluation number was 10,000. It means that iteration number was 1000 for the colony size 10, 500 for 20, 250 for 40 and 125 for 80. Notice that in the case of the rst example MSE value is very small since it is a unimodal problem. From Table 8, it can be concluded that when the colony size increases or decreases too much and total evaluation number is xed, the performance might get worse. Therefore, an appropriate value for colony size should be assigned. For the examples considered in this work, the appropriate value for this control parameter should be between 20 and 40.
ARTICLE IN PRESS
344 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348
1 0.8 0.6 Imaginary Part 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.5 0 Real Part 0.5 1 1.5 Imaginary Part 0.4
0.5
-0.5
-1
-1.5
-1
-0.5
0 Real Part
0.5
1.5
-0.5
-1
-1.5
-1
-0.5
0 Real Part
0.5
1.5
Fig. 15. The pole-zero positions of the lters with the minimum MSE designed by algorithms: (a) ABC algorithm, (b) PSO algorithm, and (c) LSQ-nonlin algorithm.
MSE and SD values computed for different limit values when the colony size and the iteration number are xed are presented in Table 9. As in previous simulations, the algorithm was run 50 times using different seed numbers for each limit value. From Table 9, it can be said that the limit value should be at least equal to 100. Otherwise, the algorithm is not able to make the ne tuning process sufciently. In Table 10, the computation times required for a run by the algorithms for each example are presented. It is clear that the LSQ-nonlin algorithm needs less time as compared with PSO and ABC. However, its performance highly depends on the initial solution. If it converges to a local minimum, it cannot get out of this region even if maximum iteration number is increased and not design an acceptable lter. Therefore, it might be necessary for the algorithm to be run several times with different initial solutions to design a lter satisfying required features. However, the ABC-based method can produce an acceptable lter for each run. From the table, it is seen that the computation time of the ABC method is less than PSO. Notice that as the order of the lters increases, the difference between the computation times of LSQ-nonlin and ABC methods decreases.
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 Table 7 The average MSE and SD values obtained by algorithms for the examples. ABC Example 1 MSE SD Example 2 MSE SD Example 3 MSE SD Example 4 MSE SD PSO LSQ-nonlin 345
0.0000 0.0000
0.0002 0.0001
0.0573 0.0717
0.0610 0.0121
0.0646 0.0185
0.2563 0.1178
0.0015 0.0005
0.0056 0.0018
0.0420 0.0611
0.0421 0.0186
0.0764 0.0219
0.1140 0.0966
Table 8 MSE and SD values calculated for different colony sizes when the total evaluation number is xed. Colony size 10 MSE SD 20 MSE SD 40 MSE SD 80 MSE SD Example 1 5.1410 1016 6.2527 1016 Example 2 Example 3 Example 4
0.0706 0.0021
0.0144 0.0069
0.1409 0.0940
0.0697 0.0014
0.0112 0.0039
0.1226 0.0638
0.0684 0.0016
0.0142 0.0045
0.1277 0.0244
0.076 0.0018
0.0195 0.0040
0.1496 0.0380
Consequently, ABC is a new population-based algorithm and it has the advantages of nding the true global minimum of a multi-modal search space regardless of the initial parameter values, fast convergence, being simple and exible, and using very few control parameters. In this work, a new design method for digital IIR lters, which is based on the ABC algorithm, was described. The new method produced good solutions to both the unimodal and multi-modal lter cases. From the simulation results obtained for the test functions and the lter examples, it can be stated that, particularly in terms of the nal
ARTICLE IN PRESS
346 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 Table 9 MSE and SD values calculated for different limit values when the iteration number and colony size are xed. Limit value 10 MSE SD 100 MSE SD 500 MSE SD 1000 MSE SD Example 1 (iteration 100) Example 2 (iteration 100) Example 3 (iteration 500) Example 4 (iteration 1000)
0.0233 0.0029
0.0690 0.0018
0.1106 0.0341
0.5260 0.7701
0.0022 0.0004
0.0666 0.0021
0.0971 0.0288
0.1054 0.0768
0.0021 0.0003
0.0674 0.0015
0.1175 0.0453
0.1295 0.0826
0.0020 0.0004
0.0687 0.0021
0.1093 0.0287
0.0917 0.0646
Table 10 Computation times required for each run by the algorithms (in s). Max iteration number Example Example Example Example 1 2 3 4 100 100 500 1000 ABC 1.2200 2.9400 4.9000 26.3250 PSO 4.2400 4.9100 7.0820 28.3600 LSQ-nonlin 0.4850 0.8690 2.3290 16.0940
solution the performance of ABC is better than that of PSO and LSQ-nonlin due to its good global and local search ability. 5. Conclusion A new design method based on the articial bee colony algorithm was introduced for designing low-and high-order digital IIR lters. The performance of the proposed method was compared with that of a well-known conventional optimization algorithm and particle swarm optimization algorithm on unimodal and multi-model IIR lter design problems for the system identication purpose. From the simulation results, it was observed that the method based on the articial bee colony algorithm seems as an alternative approach for designing digital low- and high-order IIR lters. References
[1] T. Gulzow, T. Ludwig, U. Heute, Spectral-subtraction speech enhancement in multirate systems with and without non-uniform and adaptive bandwidths, Signal Processing 83 (2003) 16131631.
ARTICLE IN PRESS
N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 347 [2] J. Kliewer, T. Karp, A. Mertins, Processing arbitrary-length signals with linear-phase cosine-modulated lter banks, Signal Processing 80 (2000) 15151533. [3] X. Zhang, H. Iwakura, Design of IIR digital lters based on eigenvalue problem, IEEE Transactions on Signal Processing 44 (1996) 13251333. [4] W.S. Lu, T. Hinamoto, Optimal design of IIR digital lters with robust stability using conic-quadraicprogramming updates, IEEE Transactions on Signal Processing 51 (2003) 15811592. [5] J.J. Shynk, Adaptive IIR ltering, IEEE ASSP Magazine 6 (1989) 421. [6] S.D. Stearns, Error surface of recursive adaptive lters, IEEE Transactions on Acoustics, Speech and Signal Processing 29 (1981) 763766. [7] M. Radenkovic, T. Bose, Adaptive IIR ltering of nonstationary signals, Signal Processing 81 (2001) 183195. [8] R. Nambiar, P. Mars, Genetic and annealing approaches to adaptive digital ltering, in: IEEE 26th Asilomar Conference on Signals, Systems and Computers, 1992, pp. 871875. [9] J. Radecki, J. Konrad, E. Dubois, Design of multidimensional nite-wordlength FIR and IIR lters by simulated annealing, IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing 42 (1995) 424431. [10] S. Chen, R.H. Istepanian, B.L. Luk, Digital IIR lter design using adaptive simulated annealing, Digital Signal Processing 11 (2001) 241251. [11] D.M. Etter, M.J. Hicks, K.H. Cho, Recursive adaptive lter design using an adaptive genetic algorithm, IEEE International Conference on ASSP (1982) 635638. [12] K.S. Tang, K.F. Man, S. Kwong, Q. He, Genetic algorithms and their applications, IEEE Signal Processing Magazine 13 (1996) 2237. [13] S.C. Ng, S.H. Leung, C.Y. Chung, A. Luk, W.H. Lau, The genetic search approach: a new learning algorithm for IIR ltering, IEEE Signal Processing Magazine 13 (1996) 3846. [14] R. Thamvichai, T. Bose, R.L. Haupt, Design of 2-D multiplierless IIR lters using the genetic algorithm, IEEE Transactions on Circuits and SystemsI: Fundamental Theory and Applications 49 (2002) 878882. [15] A. Lee, M. Ahmadi, G. Jullien, W. Miller, R.S. Lashkari, Design of 1-D FIR lters with genetic algorithms, IEEE International Symposium on Circuits and Systems (1999) 295298. [16] N.E. Mastorakis, I.F. Gonos, M.N.S. Swamy, Design of two dimensional recursive lters using genetic algorithms, IEEE Transactions on Circuits and SystemsI: Fundamental Theory and Applications 50 (2003) 634639. [17] N. Karaboga, Digital IIR lter design using differential evolution algorithm, EURASIP Journal on Applied Signal Processing 8 (2005) 19. [18] N. Karaboga, B. Cetinkaya, Design of digital FIR lters by using differential evolution algorithm, Circuits Systems and Signal Processing Journal 25 (2006) 649660. [19] A.P. Engelbrecht, Fundamentals of Computational Swarm Intelligence, Wiley, New York, 2006. [20] J. Kennedy, R.C. Eberhart, Particle swarm optimization, in: Proceedings of the 1995 IEEE International Conference on Neural Networks, 1995, pp. 19421948. [21] V. Aggarwal, W.O. Jin, U.M. OReilly, Filter approximation using explicit time and frequency domain specications, in: Proceedings of the Eighth Annual Conference on Genetic and Evolutionary Computation, 2006, pp. 753760. [22] W.P. Huang, L.F. Zhou, J.X. Qian, FIR lter design: frequency sampling lters by particle swarm optimization algorithm, in: Proceedings of the Third International Conference on Machine Learning and Cybernetics, 2004, pp. 23222327. [23] V. Miranda, N. Fonseca, New evolutionary particle swarm algorithm (EPSO) applied to voltage/VAR control, in: Proceedings of the 14th Power Systems Computation Conference, Spain, 2002 [online], available at: /http://www.pscc02.org/papers/s21pos.pdfS. [24] D. Karaboga, An idea based on honey bee swarm for numerical optimization, Technical Report-TR06, Erciyes University, Engineering Faculty, Computer Engineering Department, 2005. [25] B. Basturk, D. Karaboga, An articial bee colony (ABC) algorithm for numeric function optimization, IEEE Swarm Intelligence Symposium (2006). [26] D. Karaboga, B. Basturk, A powerful and efcient algorithm for numerical function optimization: articial bee colony (ABC) algorithm, Journal of Global Optimization 39 (2007) 459471. [27] S. Chen, B.L. Luk, Adaptive simulated annealing for optimisation in signal processing applications, Signal Processing 79 (1999) 117128.
ARTICLE IN PRESS
348 N. Karaboga / Journal of the Franklin Institute 346 (2009) 328348 [28] J.W. Ponton, J. Klemes, Alternatives to neural networks for inferential measurement, Computers and Chemical Engineering 17 (1993) 4247. [29] M.S. White, S.J. Flockton, Adaptive recursive ltering using evolutionary algorithms, in: D. Dasgupta, Z. Michalewicz (Eds.), Evolutionary Algorithms in Engineering Applications, Springer, Berlin, 1997, pp. 361376. Nurhan Karaboga received the B.S., M.S., and Ph.D. degrees in electronics engineering from the Erciyes University, Turkey, in 1987, 1990, and 1995, respectively. From 1987 to 1995, she was a research assistant in the department of electronics engineering at the Erciyes University. Currently, she is an associated professor at the same department. From 1992 to 1994, she also worked as an academic visitor in the University of Wales College of Cardiff, UK. Her current research interests include genetic algorithms, ant colony algorithms, simulated annealing algorithm, differential evolution algorithm, immune algorithm, digital lter design, and data communication.