508
Views
6
CrossRef citations to date
0
Altmetric
Original Articles

AN OPTIMAL DESIGN OF IIR DIGITAL FILTER USING PARTICLE SWARM OPTIMIZATION

&
Pages 429-440 | Published online: 03 Jul 2013

Abstract

In this article, a novel approach for infinite-impulse response (IIR) digital filters using particle swarm optimization (PSO) is presented. IIR filter is essentially a digital filter with recursive responses. Because the error surface of digital IIR filters is generally nonlinear and multimodal, so global optimization techniques are required in order to avoid local minima. This study is based on a heuristic way to design IIR filters. PSO is a powerful global optimization algorithm introduced in combinatorial optimization problems. This study finds the optimum coefficients of the IIR digital filter through PSO. It is found that the calculated values are more optimal than the FDA tool and GA available for the design of the filter in MATLAB. Design of low-pass and high-pass IIR digital filters is proposed in order to provide an estimate of the transition band. The simulation results of the employed examples show an improvement on the transition band. The stability of designed filters is described by the position of Pole-Zeros.

INTRODUCTION

Over the past few decades, the field of digital signal processing (DSP) has grown too important, both theoretically and technologically. Digital filtering is one of the most powerful tools of digital signal processing. Digital filters are capable of performance specifications that would, at best, be extremely difficult, if not impossible, to achieve with an analog implementation. In addition, the characteristics of a digital filter can be easily changed under software control (Abdesselam Citation2000). Digital filters are classified either as finite duration impulse response (FIR) filters or infinite duration impulse response (IIR) filters, depending on the form of impulse response of the system. In the FIR system, the impulse response sequence is of finite duration, in other words, it has a finite number of nonzero terms (Argenti and Del Re Citation1998). Digital infinite-impulse-response (IIR) filters can often provide a much better performance and lower computational cost than their equivalent finite-impulse-response (FIR) filters and have become the target of growing interest. Digital IIR filters are extensively used in the fields of automatic control, telecommunications, speech processing, and other areas (Cousseau et al. Citation2007). There are two main methods for IIR digital filters design; however, because the error surface of IIR filters is usually nonlinear and multimodal, conventional gradient-based design methods may easily get stuck in the local minima of error surface (Dai et al. Citation2010). Therefore, some researchers have attempted to develop design methods based on modern heuristic optimization algorithms such as particle swarm optimization (PSO), ant colony optimization (ACO), genetic algorithm (GA), simulated annealing (SA), tabu search (TS), and others (Kacelenga et al. Citation1990; Tang et al. Citation1998; Tseng et al. Citation2001; Liang et al. Citation2003; Skaf and Boyd Citation2008).

Like most other engineering problems, analytical or simple iterative methods usually lead to suboptimal designs (Engelbrecht Citation2005). Consequently, there is a need for optimization methods (heuristic type) that can be use to design digital filters that would satisfy prescribed specifications (Cao Citation2010). Swarm intelligence has become a research interest to many research scientists from various areas in recent years. Swarm intelligence can be defined as any attempt forto design algorithms or distributed problem-solving devices inspired by the collective behavior of insects and other animal societies (Tarasewich and McMullen Citation2002). Particle Swarm Optimization (PSO), which was originally proposed by J. Kennedy and R. Eberhart, is a novel algorithm inspired by birds flocking in the sky or fish schooling. Benvenuto and Marchesi (Citation1992) described the salient features of using a simulated annealing (SA) algorithm in the context of designing digital filters with a linear phase digital filter. The algorithm was then applied to the design of the FIR filter. The result was not impressive. Moreover, it is computationally very expensive. Liang et al. (Citation2003) used genetic algorithm to design a 1-D IIR filter with canonical-signed-digit coefficients restricted to a low-pass filter. Ahmad and Antoniou (Citation2006) explored FIR filters and equalizers through the use of GA. It was found that GAs require a large amount of computation. Oliveira et al. (Citation2007) presented a new approach for designing linear FIR filters by using nonlinear stochastic global optimization based on simulated annealing techniques. Jung, Yang, and Chun (Citation2008) found the design method of a linear-phase finite word length FIR filter using simulated annealing. The basic limitation of all of the above methods is that they can mainly be used to design FIR digital filters. The drawback of preceding design methods is that the computation time is quite long. The proposed algorithm has strong search capability and is superior to the SA and GA. The objective of this article is to introduce PSO as an adaptive learning tool for the design of IIR digital filters. To test the optimization procedure, the proposed algorithm is implemented in MATLAB, and results are found to be very encouraging.

PARTICLE SWARM OPTIMIZATION

PSO is an evolutionary algorithm developed by Eberhart and Kennedy in 1995. It is a population-based search algorithm and is inspired by the observation of natural habits of bird flocking and fish schooling. PSO is a flexible, robust, population-based stochastic search/optimization technique with implicit parallelism, which can easily handle nondifferential objective functions, unlike traditional optimization methods. It is developed through the simulation of bird flocking in multidimensional space. Bird flocking optimizes a certain objective function (Luitel and Venayagamoorthy Citation2008). Each particle knows its best value so far (pbest). This information corresponds to the personal experiences of each particle. Moreover, each particle knows the best value so far in the group (gbest) among pbests. Namely, each particle tries to modify its position using the following information:

The distance between the current position and pbest

The distance between the current position and gbest

Each individual is treated as a particle without volume in the D-dimensional space, with the position and velocity of ith particle X i  = (X i1, X i2,…., X iD ) and V i  = (V i1, V i2, …, V iD ). The particles move according to the following equation:

where c1 and c2 are acceleration coefficients, and r1 and r2 are two random numbers. Vector P i  = (P i1, P i2,…, P iD ) is the best previous position (the position giving the best fitness value) of particle i called pbest, and vector P g  = (P g1, P g2,…, P gD ) is the position of the best particle among all the particles in the population and called gbest. Parameter w is the inertia weight introduced to accelerate the convergence speed of the PSO.

Like GA, in PSO the system is initialized with a population of random solutions (Yao et al. Citation1999). It is unlike a GA, however, in that each potential solution is also assigned a random velocity, and the potential solutions, called particles, are then “flown” through the problem space. Each particle keeps track of its coordinates in the problem space that are associated with the fitness (best solution) it has achieved so far. The fitness value is also stored and is called pbest. Another “best” value that is tracked by the global version of the particle swarm optimizer is the overall best value, and its location, obtained so far by any particle in the population. This location is called gbest.

The process for implementing PSO is as follows:

Initialize a population (array) of particles with random position and velocities on d dimensions in the problem space.

For each particle, evaluate the desired optimization fitness function in d variables.

Compare particle's fitness evaluation with particle's pbest. If current value is better then pbest, then set pbest location equal to the current location in d – dimension space.

Compare fitness evaluation with the population's overall previous best. If current value is better then gbest, then reset gbest to the current particle's array index and value.

Change the value and position of the particle according to above equations.

Loop to Step 2, until a criterion is met, usually a sufficiently good fitness or a maximum number of iterations (generation).

The pseudocode for PSO is shown in Figure .

FIGURE 1 Pseudocode of PSO.

FIGURE 1 Pseudocode of PSO.

With the increasing computing power offered by advancement in integrated circuit technology, the simulation of evolutionary systems is becoming more and more tractable, and PSO is predominately used to find solutions for optimization problems. PSO are being applied to many real-world problems.

PSO AND FILTER DESIGN

Consider the IIR filter with the input-output relationship governed by:

where x(k) and y(k) are the filter's input and output, respectively, and M (≥L) is the filter order. The transfer function of this IIR filter can be written as:

These parameters a 0, a 1, a 2,…, a L, b 1, b 2, …, b M appearing in Equation (Equation3) and Equation. (4) are called the filter coefficients. These determine the characteristics of the filter (Zhang and Iwakura Citation1996).

There are various stages for the design of digital filters. These are illustrated in the flow chart shown in Figure (Zheng Citation2003). An important task for the designer is to find values of a i and b i such that the frequency response of the filter approximates a desired characteristic while preserving the stability of the designed filter.

FIGURE 2 Flow chart of the digital filter design.

FIGURE 2 Flow chart of the digital filter design.

So, the design of this filter can be considered as an optimization problem of cost function J(w) stated as min J(w), where w = [a 0, a 1, a 2, …., a L, b 1, b 2, …, b M] is filter coefficient vector. 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 defined by:

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

The error surface of digital IIR filters is generally nonlinear and multimodal, so global optimization techniques are required in order to avoid local minima. In designing an IIR digital filter, the values of a i and b i must be such that the magnitude response of the filter approximates a desired characteristic while preserving the stability of the designed filter. Relatively little work has been published so far on PSOs applied to analogue filters. A number of practical issues are important in analogue filter design. One of them is the choice of component values.

PSO is less susceptible to getting trapped on local optima unlike GA, SA, and others. PSO is used to perform the design of the IIR digital filter. A PSO-based infinite impulse response (PSOIIR) digital filter was implemented by MATLAB. The benefit of such an operation is to restore the lost genetic values when the population converges too fast. The filter coefficients belonging to PSO were achieved using the following parameters: with acceleration constants c1 and c2 each equal to 2, and the population size of 100. As originally developed, w often is decreased linearly from 2 to 0.1 in 300 iterations. The PSOIIR produces filter's coefficients that satisfy both magnitude and phase templates.

RESULTS AND DISCUSSION

Experimentation was carried out for well-known IIR digital filters (see Appendix I), which has been used by many authors as a “benchmark filter” for comparison purposes. To compare the performance of the proposed method, the results of the filter design analysis (FDA) and GA methods are also obtained through simulations. The examples were performed on a Pentium IV, 2.80 GHz CPU with 2 GB of RAM. The simulation study was carried out in MATLAB to demonstrate the potentiality of PSO for the design of IIR digital filters. The magnitude and phase response of the first example is shown in Figure and Figure , in which a zoomed-in curve for a transition band is included. It is observed from the magnitude responses that the gain is −62.61 at 0.9868 without using any heuristic method, but using the proposed method, this gain occurs at 0.9746. This gives us a better transition band compared with the other technique. It is clear from the phase response that the phase is identical to the FDA tool response.

FIGURE 3 Magnitude response of the low-pass filter. (Color figure available online.)

FIGURE 3 Magnitude response of the low-pass filter. (Color figure available online.)

FIGURE 4 Phase response of the low-pass filter. (Color figure available online.)

FIGURE 4 Phase response of the low-pass filter. (Color figure available online.)

In Figure , we have summarized pole-zero behavior of the low-pass filter. It can be seen that the pole-zeros location of the designed filter falls within the unit circle. This shows that the designed filter is also stable using the proposed method.

FIGURE 5 Pole-zero position of the low-pass filter using (a) PSO; (b) FDA. (Color figure available online.)

FIGURE 5 Pole-zero position of the low-pass filter using (a) PSO; (b) FDA. (Color figure available online.)

The resulting values of the low-pass filter in terms of coefficients (numerator and denominator) and mean-square-error (MSE) are shown in Table and Table . Table provides a comparison of coefficients with the filter design tool and GA. It is observed from Table that the proposed method gives optimal values of coefficients with minimum mean-square-error (MSE).

TABLE 1 Coefficients of Low-pass Filter Designed with Third Order

TABLE 2 Results of MSE of Low-pass Filter

Figure and Figure . illustrate the magnitude and phase response of the second example, in which a zoomed-in curve for the transition band is included.

FIGURE 6 Magnitude response of the high-pass filter. (Color figure available online.)

FIGURE 6 Magnitude response of the high-pass filter. (Color figure available online.)

FIGURE 7 Phase response of the high-pass filter. (Color figure available online.)

FIGURE 7 Phase response of the high-pass filter. (Color figure available online.)

From the magnitude response, we have observed that a gain of −54.41 occurs at 0.3446, which changes to 0.4546 through PSO. This gives us a better transition band compared with the other technique.

It is clear from the phase response shown in Figure that the phase is almost identical to the FDA tool response. Figure summarized the pole-zero position of the high-pass filter using FDA and PSO. It is clearly seen that thepoles and zeros placement gives us a stable high-pass filter.

FIGURE 8 Pole-zero position of the high-pass filter using (a) PSO; (b) FDA. (Color figure available online.)

FIGURE 8 Pole-zero position of the high-pass filter using (a) PSO; (b) FDA. (Color figure available online.)

Table summarizes the coefficients of the high-pass filter under the same specifications. Table evaluates the values of the MSE for the filter's coefficients. The designed example is compared with the other methods (FDA tool and GA) method. On comparison, it is found that the proposed algorithm gives optimal coefficients for the high-pass filter and least MSE. It is seen that the optimal coefficients provide minimum value of MSE equal to 1.5356.

TABLE 3 Coefficients of High-pass Filter Designed with Fifth Order

TABLE 4 Results of MSE of High-pass Filter

CONCLUSION

This article has presented the developed efficient algorithm for the IIR digital filter. It is concluded that particle swarm optimization is a global optimization technique for IIR digital filters, and the benefits of PSO for designing digital filters have been studied. The simulation results show that PSO has better, or at least equivalent, global search ability and convergence speed than others. The examples demonstrate the versatility of the proposed approach. The performance of the proposed method has been compared with the FDA tool and GA. Better transition band is calculated from the proposed method. The position of pole-zero of the designed filters using optimal coefficients gives us stable filters. Thus, it is believed that the proposed algorithm is capable of quick and high performance. The proposed method can be extended to arbitrary magnitude response specifications and multiband. Further, the design of IIR filters can be done using other evolutionary algorithms or mematic algorithms.

REFERENCES

  • Abdesselam , K. D. 2000 . Design of stable, causal, perfect reconstruction, IIR uniform DFT Filters . IEEE Transactions on Signal Processing 48 ( 4 ): 1110 – 1117 .
  • Ahmad , S. U. , and A. Antoniou . 2006 . Design of digital filters using genetic algorithms . IEEE Transactions on Signal Processing 1 ( 1 ): 1 – 9 .
  • Argenti , F. , and E. Del Re . 1998. Design of IIR eigen filters in the frequency domain. IEEE Transactions on Signal Processing 46 (6): 1694–1700.
  • Benvenuto , N. , and M. Marchesi . 1992 . Applications of simulated annealing for the design of digital filters . IEEE Transactions on Signal Processing 40 ( 2 ): 323 – 331 .
  • Cousseau , J. E. , S. Werner , and P. D. Donate . 2007 . Factorized all-pass based IIR adaptive notch filters . IEEE Transactions on Signal Processing 55 ( 11 ): 5225 – 5236 .
  • Dai , C. , W. Chen , and Y. Zhu . 2010 . Seeker Optimization Algorithm for Digital IIR filter design . IEEE Transactions on Evolutionary Computation 57 ( 5 ): 1710 – 1718 .
  • Engelbrecht , A. P. 2005 . Fundamentals of computational swarm intelligence . New Delhi : John Wiley & Sons Ltd .
  • Jung , B. W. , H. J. Yang , and J. Chun . 2008 . Finite word length digital filter design using simulated annealing . IEEE Conference on Signals Systems, and Computers , California , USA , 546 – 551 .
  • Kacelenga , R. V. , P. V. Graumann , and L. E. Turner . 1990 . Design of filters using simulated annealing . IEEE proceedings of the international symposium on circuits and systems , 642 – 645 . New Orleans , LA .
  • Liang , Li. , M. Ahmadi , M. Ahmed , and K. Wallus . 2003 . Design of canonical signed digital filters using genetic algorithms . IEEE Transactions on Signal Processing 3 ( 1 ): 2043 – 2047 .
  • Cao , Liyu . 2010 . Practical issues in implementing a single-pole low-pass IIR filter . IEEE Signal Processing Magazine 27 ( 6 ): 114 – 117 .
  • Luitel , B. , and G. K. Venayagamoorthy . 2008 . Differential evolution particle swarm optimization for digital filter design . IEEE Congress on Evolutionary Computation, Hong Kong, China , 3952 – 3960 .
  • Oliveira , H. A. , A. Petraglia , and M. R. Petraglia . 2007 . Frequency domain FIR filter design using fuzzy adaptive simulated annealing . IEEE symposium on signal processing and information technology , Egypt , 884 – 888 .
  • Skaf , J. , and S. P. Boyd . 2008 . Filter design with low complexity coefficients . IEEE Transactions on Signal Processing 56 ( 7 ): 3162 – 3170 .
  • Tang , K. S. , K. F. Man , and S. Kwong . 1998 . Design and optimization of digital filter structure using genetic algorithm . IEEE Transactions on Industrial Electronics 45 ( 3 ): 481 – 489 .
  • Tarasewich , P. , and P. R. McMullen . 2002 . Swarm intelligence . Communications of the ACM 45 ( 8 ): 62 – 67 .
  • Tseng , C. C. , and S. C. Pei . 2001 . Stable IIR notch filter design with optimal pole placement . IEEE Transactions on Signal Processing 49 ( 11 ): 2673 – 2681 .
  • Yao , X. , Y. Liu , and G. Lin . 1999 . Evolutionary programming made faster . IEEE Transactions on Evolutionary Computation 3 ( 2 ): 83 – 102 .
  • Zhang , X. , and H. Iwakura . 1996 . Design of IIR digital filters based on eigen value problem . IEEE Transactions on Signal Processing 44 ( 6 ): 1325 – 1319 .
  • Zheng , W. X. 2003 . Adaptive filter design subject to output envelop constraints and bounded input noise . IEEE Transactions on Circuits & Systems 50 ( 12 ): 1023 – 1027 .
  • Zhou , Y. , and J. He . 2007 . A runtime analysis of evolutionary algorithms for constrained optimization problems . IEEE Transactions on Evolutionary Computation 11 ( 5 ): 608 – 620 .

APPENDIX I

Example 1

In the first example, design a low-pass filter with the following specifications: Pass/Stop band ripples 1 dB/15 dB, and band edges 200 Hz/400 Hz and a sampling frequency of 1000 Hz.

Example 2

This example is taken for the design of a high-pass filter with the following specifications: Pass/Stop band ripples 1 dB/75 dB, and band edges 600 Hz/200 Hz and a sampling frequency of 1500 Hz.

Reprints and Corporate Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

To request a reprint or corporate permissions for this article, please click on the relevant link below:

Academic Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

Obtain permissions instantly via Rightslink by clicking on the button below:

If you are unable to obtain permissions via Rightslink, please complete and submit this Permissions form. For more information, please visit our Permissions help page.