a new design method based on artificial bee colony algorithm for digital iir filters

21
Journal of the Franklin Institute 346 (2009) 328–348 A new design method based on artificial bee colony algorithm for digital IIR filters 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 filters can be broadly classified into two groups: recursive (infinite impulse response (IIR)) and non-recursive (finite impulse response (FIR)). An IIR filter can provide a much better performance than the FIR filter having the same number of coefficients. However, IIR filters might have a multi-modal error surface. Therefore, a reliable design method proposed for IIR filters must be based on a global search procedure. Artificial 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 flexible algorithm. In this work, a new method based on ABC algorithm for designing digital IIR filters 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 filters; System identification; Swarm-based optimization; Artificial bee colony algorithm 1. Introduction Filtering is a process by which the frequency spectrum of a signal is modified, reshaped, or manipulated according to some desired specifications. Design of a digital filter is the process of synthesizing and implementing a filter network so that a set of prescribed excitations results in a set of desired responses [1–4]. Digital filters can be broadly classified into two groups: recursive and non-recursive. The output from a recursive digital filter ARTICLE IN PRESS www.elsevier.com/locate/jfranklin 0016-0032/$32.00 r 2009 The Franklin Institute. Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.jfranklin.2008.11.003 E-mail address: [email protected]

Upload: ilham-luthfi

Post on 20-Jan-2016

49 views

Category:

Documents


0 download

DESCRIPTION

Artificial Bee Colony

TRANSCRIPT

Page 1: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

Journal of the Franklin Institute 346 (2009) 328–348

0016-0032/$3

doi:10.1016/j

E-mail ad

www.elsevier.com/locate/jfranklin

A new design method based on artificial bee colonyalgorithm for digital IIR filters

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 filters can be broadly classified into two groups: recursive (infinite impulse response (IIR))

and non-recursive (finite impulse response (FIR)). An IIR filter can provide a much better

performance than the FIR filter having the same number of coefficients. However, IIR filters might

have a multi-modal error surface. Therefore, a reliable design method proposed for IIR filters must

be based on a global search procedure. Artificial 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 flexible algorithm. In this work, a new method

based on ABC algorithm for designing digital IIR filters 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 filters; System identification; Swarm-based optimization; Artificial bee colony algorithm

1. Introduction

Filtering is a process by which the frequency spectrum of a signal is modified, reshaped,or manipulated according to some desired specifications. Design of a digital filter is theprocess of synthesizing and implementing a filter network so that a set of prescribedexcitations results in a set of desired responses [1–4]. Digital filters can be broadly classifiedinto two groups: recursive and non-recursive. The output from a recursive digital filter

2.00 r 2009 The Franklin Institute. Published by Elsevier Ltd. All rights reserved.

.jfranklin.2008.11.003

dress: [email protected]

Page 2: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 329

depends on one or more previous output values, as well as on inputs. In other words, itinvolves feedback. From the digital signal processing point of view, its great advantage iscomputational economy. A filter characteristic requiring more coefficients in a non-recursive realization can often be obtained using just a few recursive coefficients.However, there are two potential disadvantages [5–7]. First, a recursive filter may becomeunstable if its feedback coefficients are chosen badly during the adaptation process.This problem can be easily handled by limiting the parameter space. Secondly, recursivedesigns cannot generally provide the linear-phase responses so readily achieved bynon-recursive methods. Apart from these two disadvantages, the possibility of having amulti-modal error surface is another important design challenge for recursive filters.In order to overcome this problem, a design method which can achieve the global minimain 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 atlocal minima of error surface. Therefore, some researchers have attempted to develop thedesign methods based on modern global optimization algorithms such as the simulatedannealing (SA) [8–10], genetic algorithm (GA) [11–16], and differential evolutionalgorithm [17,18].

Swarm intelligence has become a research interest to many research scientists fromvarious areas in recent years. The swarm intelligence can be defined as any attempt fordesigning algorithms or distributed problem-solving devices inspired by the collectivebehaviour of insects and other animal societies [19]. More specifically, swarm intelligenceterm can be used in a general manner to refer to any restrained collection of interactingagents or individuals. The classical examples of swarm: bees swarming around their hive; acolony of ants; a flock of birds; and an immune system which is a swarm of cells and acrowd that is a swarm of people. Recently, particle swarm optimization algorithm has beenintroduced for numerical optimization problems [20] and successfully applied to digitalfilter design and other real-world problems [21,22]. PSO algorithm that is a population-based stochastic optimization technique models the social behaviour of bird flocking orfish schooling [20] and is well adapted to the optimization of nonlinear functions in multi-dimensional space. PSO consists of a swarm of particles moving in a search space ofpossible solutions for a problem. Every particle has a position vector representing acandidate solution to the problem and a velocity vector. Moreover, each particle contains asmall memory that stores its own best position seen so far and a global best positionobtained through communication with its neighbour particles. Miranda and Fonseca [23]have proposed an improved version of PSO called evolutionary particle swarmoptimization (EPSO). In [23], it is presented that EPSO which joins together thecharacteristics of evolutionary and of particle swarm algorithms is much more reliablethan PSO for practical applications.

In 2005, Karaboga [24] introduced a bee swarm algorithm called artificial 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-basedoptimization algorithms. In this work, firstly the performance comparison of PSO, EPSO,and ABC algorithms are presented on a set of numeric test functions. Secondly, a newmethod based on ABC algorithm is described for designing IIR filters. The paper isorganized 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 ofa well-known numeric test functions [23] and LSQ-nonlin, which is a conventional

Page 3: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348330

optimization algorithm, PSO and ABC algorithms are applied to the design of low- andhigh-order digital IIR filters and the results obtained are discussed.

2. Artificial bee colony algorithm

The flowchart of the artificial bee colony algorithm is given in Fig. 1. Each cycle of thesearch consists of three steps after initialization stage: placing the employed bees onto thefood sources and calculating their nectar amounts; placing the onlookers onto the foodsources and calculating the nectar amounts; and determining the scout bees and placingthem onto the randomly determined food sources. In the ABC, a food source positionrepresents a possible solution to the problem to be optimized. Therefore, at theinitialization step, a set of food source positions are randomly produced and also thevalues of control parameters of the algorithm are assigned. The nectar amount of a food

Yes

No

Yes

NoAll onlookersdistributed?

Calculate nectar amounts

Memorize the position of best food source

Find the abandoned food source

Produce new position for the exhausted food source

Select a food source for the onlooker

Determine a neighbour foodsource position for the onlooker

Calculate the nectar amounts

Determine the new food positionsfor the employed bees

Initial food source positions

Is the termination criteria satisfied ?

Final food positions

Fig. 1. Flow chart of the ABC algorithm.

Page 4: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 331

source corresponds to the quality of the solution represented by that food source. So thenectar amounts of the food sources existing at the initial positions are determined. In otherwords, the quality values of the initial solutions are calculated. Each employed bee ismoved onto her food source area for determining a new food source within theneighbourhood of the present one, and then its nectar amount is evaluated. If the nectaramount of the new one is higher, then she forgets the previous one and memorizes the newone. After the employed bees complete their search, they come back into the hive and sharetheir information about the nectar amounts of their sources with the onlookers waiting onthe dance area. All onlookers successively determine a food source area with a probabilitybased on their nectar amounts. If the nectar amount of a food source is much higher whencompared with other food sources, it means that this source will be chosen by most of theonlookers. This process is similar to the natural selection process in evolutionaryalgorithms. Each onlooker determines a neighbour food source within the neighbourhoodof the one to which she has been assigned and then its nectar amount is evaluated.

A honey bee colony has scouts that are the colony’s explorers who do not need anyguidance while looking for food. They are primarily concerned with finding any kind offood source. As a result of such behaviour, the scouts are characterized by low search costsand a low average in food source quality. Occasionally, the scouts can accidentallydiscover rich, entirely unknown food sources. In the case of artificial bees, the artificialscouts could have the fast discovery of the group of feasible solutions as a task. In ABCalgorithm, at most one employed bee at each cycle is selected and classified as the scoutbee. The selection of the scout bee is controlled by a control parameter called ‘‘limit’’. If asolution representing a food source cannot be improved by a predetermined number oftrials, it means that the associated food source has been exhausted by the bees and then theemployed bee of this food source becomes a scout. The position of the abandoned foodsource is replaced with a randomly produced food position. The number of trials forreleasing a food source is equal to the value of ‘‘limit’’ which is an important controlparameter of ABC algorithm. These three steps are repeated until the termination criteriaare satisfied.

As other social foragers, bees search for food sources in a way that maximizes theratio E/T (where E is the energy obtained and T the time spent for foraging). In the case ofbee swarms, E is proportional to the nectar amount of food sources discovered by bees andthe bee swarm works to maximize the honey being stored inside the hive. In amaximization problem, the goal is to find 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) andis proportional to the energy E(yi). Let PðcÞ ¼ fyiðcÞji ¼ 1; 2; . . . ; sg (c: cycle, s: number offood sources around the hive) represent the population of food source positions beingvisited by bees. As mentioned before, the preference of a food source by an onlooker beemainly depends on the nectar amount F(y) of that food source. As the nectar amount of afood source increases, the probability with that the source is chosen by an onlooker beeincreases proportionally. The probability with that the food source located at yi is selectedby an onlooker bee can be calculated by

pi ¼F ðyiÞPs

k¼1F ðykÞ(1)

Page 5: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348332

where s is the number of food sources (number of solutions in the population) and is alsoequal to the number of employed bees in the colony. An onlooker bee selects a food sourceregion depending on the probabilities calculated and determines a neighbour food sourcearound the chosen one. For example, in the selection process for the first onlooker, arandom number is produced between [0,1] and if this number is less than p1, the first foodsource (solution) is selected for the first onlooker. Otherwise, this random number iscompared with p2 and if less than that, the second source is chosen. Otherwise, theprobability of third source is checked. This process is repeated until all onlookers aredistributed onto the food sources (solutions). In this way, most of the onlookers arerecruited to the food sources with high nectar amount (the solutions with high fitnessvalue) that have been determined by the employed bees. Assume that the position of thefood source selected by the onlooker is yi. The neighbour food source position of yi iscalculated 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 find a food source withmore 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

artificial bee memorizes yi(c+1) and shares her information with onlooker bees; and theposition yi(c) of the food source i is changed to be yi(c+1), otherwise yi(c) is kept as it is. Asmentioned before, every food source has only one employed bee; therefore, the number ofemployed 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 thefood source i is abandoned and then the employed bee becomes a scout. The scout starts tosearch for a new food source randomly, and after finding the new one, the new position isaccepted 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. Definition of the problem

Consider the IIR filter with the input–output relationship governed by

yðkÞ þXM

i¼1

aiyðk � iÞ ¼XL

i¼0

bixðk � iÞ (3)

where x(k) and y(k) are the filter’s input and output, respectively, and M (XL) is the filterorder. The transfer function of this IIR filter can be written in the following general form:

HðzÞ ¼BðzÞ

AðzÞ¼

PLi¼0biz

�i

1þPM

i¼1aiz�i(4)

Hence, the design of this filter can be considered as a minimization problem of the costfunction J(w) stated as the following:

minw2W

JðwÞ (5)

where w ¼ ½b0 b1 . . . bL a1 a2 . . . aM �T is the filter coefficient vector.

Page 6: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 333

The aim is to minimize the cost function J(w) by adjusting w. The cost function is usuallyexpressed as the time-averaged cost function defined by

JðwÞ ¼1

N

XN

k¼1

ðdðkÞ � yðkÞÞ2 (6)

where d(k) and y(k) are the desired and actual responses of the filter, respectively, and N isthe number of samples used for the calculation of cost function.

4. Simulation results

In this section, firstly the performance of the ABC algorithm is compared with that ofthe PSO algorithm and its improved version EPSO on a set of numeric test functions; andsecondly LSQ-nonlin, PSO, and ABC algorithms are applied to the design of low- andhigh-order digital IIR filters for the purpose of system identification.

4.1. Numeric function optimization

Four functions (F1–F4) presented in Table 1 have been used by Miranda and Fonseca todemonstrate the superiority of EPSO over the classic PSO [23]. These functions are asfollows:

F1 (Sphere): The first function is smooth, unimodal, strongly convex, and symmetric.F2 (Banana): Rosenbrock’s valley is a classic optimization function, also known as

Banana function. The global optimum is inside a long, narrow, parabolic shaped flatvalley. To find the valley is trivial, however, convergence to the global optimum is difficultand hence this problem has been repeatedly used to assess the performance of optimizationalgorithms.

F3 (Schaffer): This function is the two-dimensional Schaffer’s 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 stoppingcriterion are compared. The maximum number of evaluations was fixed in 200,000 and theaverage number of evaluations to meet the stopping criterion is presented in Table 2.

Table 1

Test functions and stopping criteria.

Function number Function Limits Stopping criterion

F1 P30

i¼1

x2i

�50pxip50 0.01

F2 P30

i¼1

100ðxiþ1 � x2i Þ

2þ ðxi � 1Þ2

0pxip30 100

F30:5þ

ðsinffiffiffiffiffiffiffiffiffiffix2þy2p

Þ2�0:5

ð1:0þ0:001ðx2þy2ÞÞ2�50pxip50 1.0E�10

F4 sinðx1Þsinðx2Þffiffiffiffiffiffiffiffiffiffix1x2p

0pxip100 98.9627

Page 7: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

Table 2

Comparison of ABC with the classical PSO and EPSO.

Function PSO EPSO ABC

F1 161625.0 16421.4 6113.6

F2 180310.8 27005.3 10135.2

F3 59547.0 11862.2 51202.4

F4 199190.1 78539.8 5125.3

Table 3

Comparison of ABC with the classical PSO and EPSO.

Function PSO EPSO ABC

F1 1.91E�02 7.81E�04 2.486E�16

F2 114.443 33.8828 4.391669

F3 5.45E�11 2.15E�13 2.5E�12

F4 86.1071 98.9627 98.9627

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348334

The average function values produced by three algorithms for a fixed number ofevaluations were also compared. So, considering a number of evaluations of 200,000, theresults 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 usingdifferent seed numbers. The results belonging to the ABC algorithm in Tables 2 and 3 wereachieved using the following parameter values: colony size ¼ 20; limit value ¼ 20D. FromTable 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 qualityof solutions found after 200,000 evaluations, the ABC algorithm outperforms PSO andEPSO on F1 and F2 functions. On F3 and F4 functions, EPSO and ABC produce similarperformances. Consequently, compared with PSO and EPSO, ABC shows better or similarperformance on the set of test functions considered in [23]. Particularly, the performance ofABC becomes much clearer on the functions with many variables such as F1 and F2.

4.2. Digital IIR filter design

Application of IIR filter in system identification has been widely studied since manyproblems encountered in signal processing can be characterized as a system identificationproblem (Fig. 2). Therefore, in the simulation study, IIR filters are designed for the systemidentification purpose. In this case, the parameters of the filters are successively adjusted bythe ABC algorithm until the error between the output of the filter and the unknown systemis minimized. The filter coefficients are encoded in the string form as shown in Fig. 3. Thefitness value of a solution i in the population is determined by using the following formula:

fitðiÞ ¼1

k þ JðwÞi(7)

Page 8: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

x(k)e(k∑

_

+

y(k)

d(k)unknown plant

IIR filter

ABC algorithm

)

Fig. 2. Block diagram of system identification process using the IIR filter designed by the ABC algorithm.

bL a1 a2b0 b1 aM... ...

Fig. 3. Representation of a solution.

Table 4

Control parameter values of the algorithms used for the first two examples.

PSO algorithm ABC algorithm

Swarm size ¼ 20 Colony size ¼ 20

f1 ¼ 2, f2 ¼ 2, w ¼ 0.8 limit value ¼ 40

Iteration ¼ 100 Iteration ¼ 100

Xmax ¼ 2, Xmin ¼ �2

Vmax ¼ 0.15Xmax Xmax ¼ 2

Vmin ¼ 0.15Xmin Xmin ¼ �2

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 335

where J(w)i is the cost function value computed for the solution i and k the number of thepoles outside the unit circle.

Using this fitness function, the poles of the IIR filters being designed by algorithmsare forced to move into the unit circle. Hence, the IIR filters of which the stabilitycondition is satisfied are produced at the end of each run. Simulation results were carriedout on four filter examples. The first two examples (low-order IIR filters) used in thesimulation studies were taken from [6,27] and the third one from [27]. The results of theABC-based method were compared with that of LSQ-nonlin which is a conventionaloptimization algorithm and PSO. LSQ-nonlin is a nonlinear least-squares data fittingalgorithm [28], more specifically the algorithm implemented in the Optimization Toolboxof Matlab.

In order to carry out the comparison of the algorithms in similar conditions, the valuesof the similar control parameters of the algorithms were chosen to be equal to eachother. 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 firsttwo IIR filter design examples. In the table, Xmin and Xmax represent the minimum andmaximum limit values of the filter parameters.

Page 9: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348336

Example 1. In the first example, the unknown plant and the filter had the followingtransfer functions:

H½z�1� ¼1

1� 1:2z�1 þ 0:6z�2; HM ½z

�1� ¼1

1� a1z�1 � a2z�2(8)

The input, x(k), to the system and the filter was a white sequence. Since the filter order isequal to the system order, a local minima problem does not occur. Fig. 4 presents the errorsurface for this filter. Fig. 5 shows the evolution of the mean-square-error (MSE) averagedover 50 different runs of LSQ-nonlin, ABC, and PSO. Each run had a randomly choseninitial 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 filter wasa first-order IIR filter with the following transfer functions:

H½z�1� ¼0:05� 0:4z�1

1:0� 1:1314z�1 þ 0:25z�2; HM ½z

�1� ¼b

1� az�1(9)

The system input was a uniform white sequence. The data length used in calculating theMSE was N ¼ 100. Since the reduced order filter is employed the MSE is multi-modal. Theerror surface is given in Fig. 7. Fig. 8 presents the cost-function value versus number ofcost-function evaluations averaged over 50 random runs. Each run had a randomly choseninitial w as in the first 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 transferfunction [29]:

H½z�1� ¼1� 0:4z�2 � 0:65z�4 þ 0:26z�6

1� 0:77z�2 � 0:8498z�4 þ 0:6486z�6

a 2

0.9 0.7 0.4

0.05

0.2

1.0

0.5

0.0

-0.5

-1.0

-2.0 -1.0 0.0 1.0 2.0a1

0.99

Fig. 4. Error surface for the first filter.

Page 10: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

0 10 20 30 40 50 60 70 80 90 1000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Iteration

MS

E

ABCPSOLSQ-NONLIN

Fig. 5. Cost-function value versus number of iterations averaged over 50 random runs for LSQ-nonlin, PSO, and

ABC algorithms (Example 1).

0 10 20 30 40 50 60 70 80 90 100-1

-0.5

0

0.5

1

1.5

Iteration

a1,a

2

a1 (ABC)a2 (ABC)a1 (PSO)a2 (PSO)

Fig. 6. Evolution of the parameters of the first filter for PSO and ABC algorithms.

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 337

The IIR filter was the fourth-order and had the following transfer function:

HM ½z�1� ¼

b0 þ b1z�1 þ b2z

�2 þ b3z�3 þ b4z�4

1þ a1z�1 þ a2z�2 þ a3z�3 þ a4z�4(10)

Since the system was a sixth-order system and the filter fourth order, the error surface isnot unimodal as in the second example. The system input was a uniform white sequence

Page 11: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

0.3 0.4

0.6

0.8

0.981.4

1.2

1.0 0.99

0.98

a

1.0

0.5

0.0

-0.5

-1.0

-1.0 -0.5 0.0 0.5 1.0b

Fig. 7. Error surface for the second filter.

0 10 20 30 40 50 60 70 80 90 1000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Iteration

MS

E

ABCPSOLSQ-NONLIN

Fig. 8. Cost-function value versus number of evaluations averaged over 50 random runs for LSQ-nonlin, PSO,

and ABC (Example 2).

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348338

and the data length in calculating the MSE was N ¼ 200 in this example. Fig. 10 presentsthe cost-function value versus number of cost function evaluations averaged over50 random runs. Figs. 11 and 12 present the evolution of the denominator and thenominator parameters for a run, respectively. Also, Fig. 13 demonstrates the positions of

Page 12: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

0 10 20 30 40 50 60 70 80 90 100-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Iteration

a1,b

1

a1 (ABC)b1 (ABC)a1 (PSO)b1 (PSO)

Fig. 9. Evolution of the parameters of the second filter for PSO and ABC algorithms.

0 50 100 150 200 250 300 350 400 450 500

0.5

0.4

0.3

0.2

0.1

0

0.6

0.7

0.8

1

Iteration

MS

E

ABCPSOLSQ-NONLIN

Fig. 10. Cost-function value versus number of evaluations averaged over 50 random runs for LSQ-nonlin, PSO,

and ABC (Example 3).

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 339

the poles and the zeros of the stable filter designed with the minimum MSE value by usingthe parameter values given in Table 5 for algorithms. The control parameter valuesemployed in this example were the same as in the first two examples except the iterationnumber and limit value. In this example, the algorithms were run for 500 iterations andlimit value for ABC was 180.

Page 13: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

0 50 100 150 200 250 300 350 400 450 500-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

Iteration

a a1a2a3a4

0 50 100 150 200 250 300 350 400 450 500

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

Iterationa

a1a2a3a4

Fig. 11. Evolution of the denominator parameters of the high-order filter for both algorithms: (a) PSO and

(b) ABC.

0 50 100 150 200 250 300 350 400 450 500

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

0

1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.8

-1

-0.6

0

1

Iteration

a

0 50 100 150 200 250 300 350 400 450 500

Iteration

a

b1b2b3b4b5

b1b2b3b4b5

Fig. 12. Evolution of the nominator parameters of the high-order filter for both algorithms: (a) PSO and

(b) ABC.

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348340

Example 4. In the fourth example, the unknown plant was a 24th-order system and theIIR filter to be designed was the 20th order. Both of them had the following transferfunction:

H½z�1� ¼b0 þ b1z

�1 þ b2z�2 þ � � � þ bðL�1Þz

ðL�1Þ þ bLzL

1þ a1z�1 þ a2z�2 þ � � � þ aðM�1ÞzðM�1Þ þ aMzM(11)

The coefficients of the unknown plant are given in the first two columns of Table 6. Sincethe system was 24th order and the filter 20th order, the error surface is not unimodal. Thesystem input was a uniform white sequence and the data length in calculating the MSEwas N ¼ 1000 in this example. Fig. 14 presents the cost-function value versus number of

Page 14: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

-1

-1 -0.5 0 0.5 1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Part

Imag

inar

y P

art

-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

Real Part

Imag

inar

y P

art

Real Part

-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

Imag

inar

y P

art

Fig. 13. The positions of the poles and zeros of the filter designed using the coefficients 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 coefficients of the filter designed with the

minimum MSE in Example 3.

Coefficients ABC (0.0015) PSO (0.0056) LSQ-nonlin (0.0008)

a1 0.086 0.086 0.0008

a2 �0.066 �0.067 �0.0048

a3 �0.078 �0.078 �0.0023

a4 �0.798 �0.798 �0.8597

b0 0.995 1.000 0.9994

b1 0.103 0.119 0.0003

b2 0.282 0.286 0.3414

b3 �0.073 �0.067 �0.0044

b4 �0.347 �0.339 �0.3940

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 341

Page 15: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

Table 6

The coefficients of the unknown plant and IIR filters with the minimum MSE value designed by the algorithms.

Unknown plant

(elliptic filter)

ABC

(MSE ¼ 0.0199)

PSO

(MSE ¼ 0.0232)

LSQ-nonlin

(MSE ¼ 0.0129)

Coefficients b a (1.0 e+003) b a b a b a

1 0.0006 0.0010 0.1089 1 �0.0385 1 0.0084 1

2 0.0029 �0.0043 �0.1032 0.0030 �0.0436 �0.3104 0.0154 0.6738

3 0.0122 0.0182 0.0094 �0.0001 0.0256 0.2274 0.0269 0.7790

4 0.0355 �0.0502 0.0877 0.3539 0.0413 0.1045 0.0905 0.6790

5 0.0913 0.1271 0.1558 �0.0186 0.0933 �0.0022 0.2298 0.6279

6 0.1942 �0.2615 0.1275 0.1636 0.1804 0.2759 0.4118 0.3461

7 0.3700 0.4894 0.1304 0.0255 0.2000 0.2618 0.5751 0.4206

8 0.6202 �0.7995 0.0702 �0.1489 0.0501 0.2305 0.6457 0.4827

9 0.9425 1.1928 �0.0564 �0.0891 �0.0680 0.0515 0.5723 0.5886

10 1.2912 �1.5988 �0.0484 0.1535 �0.1167 0.2371 0.3912 0.4645

11 1.6161 1.9647 0.0691 �0.0538 �0.0446 �0.0458 0.2375 0.4755

12 1.8434 �2.1971 0.1356 0.0733 0.1068 0.0588 0.2270 0.4541

13 1.9280 2.2563 0.0725 0.1684 0.2162 0.1007 0.3214 0.4625

14 1.8434 �2.1174 0.0391 �0.2447 0.1235 0.0706 0.3779 0.3147

15 1.6161 1.8223 �0.3083 �0.0030 �0.0461 �0.1110 0.3200 0.2092

16 1.2912 �1.4298 �0.0496 0.2592 �0.0883 0.0597 0.2154 0.1145

17 0.9425 1.0239 0.0441 �0.0385 �0.0249 0.2294 0.1509 0.1153

18 0.6202 �0.6619 0.1359 �0.1967 �0.0462 0.0539 0.1239 0.0799

19 0.3700 0.3867 �0.0473 0.0681 �0.0371 0.0427 0.0757 0.0527

20 0.1942 �0.1994 �0.0396 0.0532 �0.0378 �0.0270 0.0143 0.0899

21 0.0913 0.0914 �0.5000 �0.0850 0.0158 0.0563 �0.0127 0.2193

22 0.0355 �0.0350 – – – – – –

23 0.0122 0.0116 – – – – – –

24 0.0029 �0.0027 – – – – – –

25 0.0006 0.0005 – – – – – –

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348342

cost-function iterations averaged over 50 random runs. Fig. 15 demonstrates the positionsand zeros of the stable filters with the minimum MSE value designed by using theparameter values given in Table 6 for each algorithm. The control parameter valuesemployed in this example were the same as in the first three examples except the iterationnumber and limit value. In this example, the algorithms were run for 1000 iterations andlimit value for ABC was 1000.

From Figs. 5 and 8, it is seen that the ABC algorithm can design an acceptable filter onlyafter 10 iterations. From the figures, it is also clear that although PSO seems more quickthrough the first iterations, it has problem with the fine tuning of the parameters due to itspoor local search ability. For the LSQ-nonlin, it can be concluded that it often fails whilediscovering the global minimum in Example 2.For the high-order filter examples, as expected, the algorithms require more iterations

to design an acceptable filter. For the third example, the ABC algorithm needs about100 cycles, PSO does 250 iterations and LSQ-nonlin needs more than 500 iterations fordesigning a stable filter having similar performance. From Figs. 11 and 12, it is very clearthat the fine tuning ability of ABC is much better than PSO. In the case of ABC, the values

Page 16: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

0 100 200 300 400 500 600 700 800 900 10000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Iteration

MS

E

ABCPSOLSQ-NONLIN

Fig. 14. Cost-function value versus number of evaluations averaged over 50 random runs for LSQ-nonlin, PSO,

and ABC (Example 4).

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 343

of the filter parameters converge to their final values very quickly and smoothly. ForExample 4, ABC is able to design acceptable filters around 1000 iterations andcontinuously can improve the solutions. PSO needs more iterations for convergence andLSQ-nonlin cannot improve the solutions after a certain number of iterations although itseems quite quicker through the first iterations. For all examples, the MSE values obtainedby the algorithms after 50 runs and the standard deviations (SD) calculated are given inTable 7. From Table 7, it is clear that LSQ-nonlin has the highest MSE and SD values forthe examples. This is because the conventional technique LSQ-nonlin has a seriousproblem with the local minima. Its performance highly depends on the initial solution. Thisis a result expected from a gradient-based optimization algorithm. The proposed methodproduces the minimum MSE and SD values. This shows that the ABC algorithm is morerobust than other two algorithms. It means that its performance does not depend oninitialization process too much.

It is a known fact that the control parameters of an optimization algorithm might affectits performance significantly. Therefore, in order to investigate how much the proposeddesign method is affected by the control parameters limit value and colony size of ABC,more simulations were carried out on the filter examples. Firstly, for each example, thealgorithm was run 50 times for each colony size: 10, 20, 40, and 80. The mean MSE valuesand standard deviations calculated are presented in Table 8. In all cases, the totalevaluation 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 first example MSEvalue is very small since it is a unimodal problem. From Table 8, it can be concluded thatwhen the colony size increases or decreases too much and total evaluation number is fixed,the performance might get worse. Therefore, an appropriate value for colony size should beassigned. For the examples considered in this work, the appropriate value for this controlparameter should be between 20 and 40.

Page 17: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

-1.5 -1 -0.5 0 0.5 1 1.5

-1

-0.5

0

0.5

1

Real Part

Imag

inar

y P

art

-1 -0.5 0 0.5 1 1.5

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Part

Imag

inar

y P

art

-1.5 -1 -0.5 0 0.5 1 1.5

-1

-0.5

0

0.5

1

Real Part

Imag

inar

y P

art

Fig. 15. The pole-zero positions of the filters with the minimumMSE designed by algorithms: (a) ABC algorithm,

(b) PSO algorithm, and (c) LSQ-nonlin algorithm.

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348344

MSE and SD values computed for different limit values when the colony size and theiteration number are fixed are presented in Table 9. As in previous simulations,the algorithm was run 50 times using different seed numbers for each limit value. FromTable 9, it can be said that the limit value should be at least equal to 100. Otherwise, thealgorithm is not able to make the fine tuning process sufficiently.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 ascompared with PSO and ABC. However, its performance highly depends on the initialsolution. If it converges to a local minimum, it cannot get out of this region evenif maximum iteration number is increased and not design an acceptable filter. Therefore, itmight be necessary for the algorithm to be run several times with different initialsolutions to design a filter satisfying required features. However, the ABC-based methodcan produce an acceptable filter for each run. From the table, it is seen that thecomputation time of the ABC method is less than PSO. Notice that as the order of thefilters increases, the difference between the computation times of LSQ-nonlin and ABCmethods decreases.

Page 18: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

Table 7

The average MSE and SD values obtained by algorithms for the examples.

ABC PSO LSQ-nonlin

Example 1

MSE 0.0000 0.0002 0.0573

SD 0.0000 0.0001 0.0717

Example 2

MSE 0.0610 0.0646 0.2563

SD 0.0121 0.0185 0.1178

Example 3

MSE 0.0015 0.0056 0.0420

SD 0.0005 0.0018 0.0611

Example 4

MSE 0.0421 0.0764 0.1140

SD 0.0186 0.0219 0.0966

Table 8

MSE and SD values calculated for different colony sizes when the total evaluation number is fixed.

Colony size Example 1 Example 2 Example 3 Example 4

10

MSE 5.1410� 10�16 0.0706 0.0144 0.1409

SD 6.2527� 10�16 0.0021 0.0069 0.0940

20

MSE 1.4861� 10�14 0.0697 0.0112 0.1226

SD 3.8353� 10�14 0.0014 0.0039 0.0638

40

MSE 2.5644� 10�7 0.0684 0.0142 0.1277

SD 6.4913� 10�7 0.0016 0.0045 0.0244

80

MSE 7.6973� 10�6 0.076 0.0195 0.1496

SD 8.8152� 10�6 0.0018 0.0040 0.0380

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 345

Consequently, ABC is a new population-based algorithm and it has the advantages offinding the true global minimum of a multi-modal search space regardless of the initialparameter values, fast convergence, being simple and flexible, and using very few controlparameters. In this work, a new design method for digital IIR filters, which is based on theABC algorithm, was described. The new method produced good solutions to both theunimodal and multi-modal filter cases. From the simulation results obtained for the testfunctions and the filter examples, it can be stated that, particularly in terms of the final

Page 19: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESS

Table 9

MSE and SD values calculated for different limit values when the iteration number and colony size are fixed.

Limit

value

Example 1

(iteration ¼ 100)

Example 2

(iteration ¼ 100)

Example 3

(iteration ¼ 500)

Example 4

(iteration ¼ 1000)

10

MSE 0.0233 0.0690 0.1106 0.5260

SD 0.0029 0.0018 0.0341 0.7701

100

MSE 0.0022 0.0666 0.0971 0.1054

SD 0.0004 0.0021 0.0288 0.0768

500

MSE 0.0021 0.0674 0.1175 0.1295

SD 0.0003 0.0015 0.0453 0.0826

1000

MSE 0.0020 0.0687 0.1093 0.0917

SD 0.0004 0.0021 0.0287 0.0646

Table 10

Computation times required for each run by the algorithms (in s).

Max iteration number ABC PSO LSQ-nonlin

Example 1 100 1.2200 4.2400 0.4850

Example 2 100 2.9400 4.9100 0.8690

Example 3 500 4.9000 7.0820 2.3290

Example 4 1000 26.3250 28.3600 16.0940

N. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348346

solution the performance of ABC is better than that of PSO and LSQ-nonlin due to itsgood global and local search ability.

5. Conclusion

A new design method based on the artificial bee colony algorithm was introduced fordesigning low-and high-order digital IIR filters. The performance of the proposed methodwas compared with that of a well-known conventional optimization algorithm and particleswarm optimization algorithm on unimodal and multi-model IIR filter design problems forthe system identification purpose. From the simulation results, it was observed that themethod based on the artificial bee colony algorithm seems as an alternative approach fordesigning digital low- and high-order IIR filters.

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) 1613–1631.

Page 20: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348 347

[2] J. Kliewer, T. Karp, A. Mertins, Processing arbitrary-length signals with linear-phase cosine-modulated filter

banks, Signal Processing 80 (2000) 1515–1533.

[3] X. Zhang, H. Iwakura, Design of IIR digital filters based on eigenvalue problem, IEEE Transactions on

Signal Processing 44 (1996) 1325–1333.

[4] W.S. Lu, T. Hinamoto, Optimal design of IIR digital filters with robust stability using conic-quadraic-

programming updates, IEEE Transactions on Signal Processing 51 (2003) 1581–1592.

[5] J.J. Shynk, Adaptive IIR filtering, IEEE ASSP Magazine 6 (1989) 4–21.

[6] S.D. Stearns, Error surface of recursive adaptive filters, IEEE Transactions on Acoustics, Speech and Signal

Processing 29 (1981) 763–766.

[7] M. Radenkovic, T. Bose, Adaptive IIR filtering of nonstationary signals, Signal Processing 81 (2001)

183–195.

[8] R. Nambiar, P. Mars, Genetic and annealing approaches to adaptive digital filtering, in: IEEE 26th Asilomar

Conference on Signals, Systems and Computers, 1992, pp. 871–875.

[9] J. Radecki, J. Konrad, E. Dubois, Design of multidimensional finite-wordlength FIR and IIR filters by

simulated annealing, IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing

42 (1995) 424–431.

[10] S. Chen, R.H. Istepanian, B.L. Luk, Digital IIR filter design using adaptive simulated annealing, Digital

Signal Processing 11 (2001) 241–251.

[11] D.M. Etter, M.J. Hicks, K.H. Cho, Recursive adaptive filter design using an adaptive genetic algorithm,

IEEE International Conference on ASSP (1982) 635–638.

[12] K.S. Tang, K.F. Man, S. Kwong, Q. He, Genetic algorithms and their applications, IEEE Signal Processing

Magazine 13 (1996) 22–37.

[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 filtering, IEEE Signal Processing Magazine 13 (1996) 38–46.

[14] R. Thamvichai, T. Bose, R.L. Haupt, Design of 2-D multiplierless IIR filters using the genetic

algorithm, IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications

49 (2002) 878–882.

[15] A. Lee, M. Ahmadi, G. Jullien, W. Miller, R.S. Lashkari, Design of 1-D FIR filters with genetic algorithms,

IEEE International Symposium on Circuits and Systems (1999) 295–298.

[16] N.E. Mastorakis, I.F. Gonos, M.N.S. Swamy, Design of two dimensional recursive filters using genetic

algorithms, IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications 50 (2003)

634–639.

[17] N. Karaboga, Digital IIR filter design using differential evolution algorithm, EURASIP Journal on Applied

Signal Processing 8 (2005) 1–9.

[18] N. Karaboga, B. Cetinkaya, Design of digital FIR filters by using differential evolution algorithm, Circuits

Systems and Signal Processing Journal 25 (2006) 649–660.

[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. 1942–1948.

[21] V. Aggarwal, W.O. Jin, U.M. O’Reilly, Filter approximation using explicit time and frequency domain

specifications, in: Proceedings of the Eighth Annual Conference on Genetic and Evolutionary Computation,

2006, pp. 753–760.

[22] W.P. Huang, L.F. Zhou, J.X. Qian, FIR filter design: frequency sampling filters by particle swarm

optimization algorithm, in: Proceedings of the Third International Conference on Machine Learning and

Cybernetics, 2004, pp. 2322–2327.

[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 artificial bee colony (ABC) algorithm for numeric function optimization, IEEE

Swarm Intelligence Symposium (2006).

[26] D. Karaboga, B. Basturk, A powerful and efficient algorithm for numerical function optimization: artificial

bee colony (ABC) algorithm, Journal of Global Optimization 39 (2007) 459–471.

[27] S. Chen, B.L. Luk, Adaptive simulated annealing for optimisation in signal processing applications, Signal

Processing 79 (1999) 117–128.

Page 21: A New Design Method Based on Artificial Bee Colony Algorithm for Digital IIR Filters

ARTICLE IN PRESSN. Karaboga / Journal of the Franklin Institute 346 (2009) 328–348348

[28] J.W. Ponton, J. Klemes, Alternatives to neural networks for inferential measurement, Computers and

Chemical Engineering 17 (1993) 42–47.

[29] M.S. White, S.J. Flockton, Adaptive recursive filtering using evolutionary algorithms, in: D. Dasgupta, Z.

Michalewicz (Eds.), Evolutionary Algorithms in Engineering Applications, Springer, Berlin, 1997,

pp. 361–376.

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 filter design, and data communication.