International Journal of Scientific & Engineering Research, Volume 4, Issue 9, September-2013 2691

ISSN 2229-5518

An Analysis of FIR Filter using Particle Swarm

Optimization

Saurabh Kumar Onkar Chand

M.Tech (ECE) Astt.Prof. (ECE)

IET Bhaddal, Ropar SVIET Patiala, Punjab saurav.sharma16@gmail.com bkonkar.chd16@gmail.com

Abstract— In this paper we analysis the FIR filter using PSO. The purpose of the filters is to allow some frequencies to pass unaltered, while completely blocking others. FIR filters are linear phase filters both phase delay and group delays are constant in these filters. When the search space is too large to search exhaustively, population based searches may be a good alternative, however, population based search techniques cannot guarantee you the optimal (best) solution. The simulations of designing FIR have been done and the simulation results show that the method of FIR filter design proposed in this paper is better than the method of genetic algorithm (GA) and immune algorithm (IA) not only in the convergence speed but also in the performance of filter.

Index Terms— FIR Filter, Particle Swarm Optimization, Matrix laboratory, Genetic Algorithm, Immune

Algorithm, TLMS.

—————————— ——————————

1. INTRODUCTION

A digital filter is a system that performs mathematical operations on a sampled, discrete-time signal to reduce or enhance certain aspects of that signal. This is in contrast to the other major type of electronic filter, the analog filter, which is an electronic circuit operating on continuous-time analog signals. There are two major classes of digital filters namely, finite impulse response (FIR) filters and infinite impulse response (IIR) filters depending on the length of the impulse response [7]. FIR filter is an attractive choice because of the ease in design and stability. By designing the filter taps to be symmetrical about the center tap position, a FIR filter can be guaranteed to have linear phase. Finite impulse response (FIR) digital filters are known to have many desirable features such as guaranteed stability, the possibility of exact linear phase characteristic at all frequencies and digital implementation as non- recursive structures. Linear phase FIR filters are also required when time domain specifications are given [1].
The most frequently used method for the design of exact
linear phase weighted Chebyshev FIR digital filter is the one based on the Remez-exchange algorithm proposed by Parks and McClellan [2]. Further improvements to their results have been reported in [3]. The main limitation of this procedure is that the relative values of the amplitude error in the frequency bands are specified by means of the weighting function, and not by the deviations themselves. Therefore, in case of designing low-pass filters with a given stop band deviation, given filter length and cutoff frequencies, the program have to be iterated many times [4]. Different heuristic optimization algorithms such as genetic algorithm (GA), simulated annealing algorithms etc. have been widely used for the optimal design of digital filters. When considering global optimization methods for digital filter design, the GA seems to have attracted considerable attention. Filters designed by GA have the potential of obtaining near global optimum solution. Although standard Gas (herein referred to as Real Coded GA (RGA) have a good performance for finding the
promising regions of the search space, they are inefficient

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 9, September-2013 2692

ISSN 2229-5518

in determining the local minimum in terms of convergence speed and solution quality. For the purpose of efficient results and better response we use the new algorithm technique which is particle swarm optimization.

2. FIR FILTERS

In finite impulse response filters, the impulse response is of finite duration. This means that the impulse response of FIR filters has a finite numbers of non-zero terms. Consider the FIR filter with the input-output relationship governed
by:

N

y[n] = ai x[n i]

i =0

where x(k) and y(k) is the filter’s input and output, respectively, and N is the filter order. The transfer function of this FIR filter can be written in the following general form [11]:

N

search or optimization technique with implicit parallelism, which can easily handle with non-differential objective functions, unlike traditional optimization methods. PSO is less susceptible to getting trapped on local optima unlike GA, Simulated Annealing etc. Eberhart and Shi developed PSO concept similar to the behavior of a swarm of birds. PSO is developed through simulation of bird flocking in multidimensional space. Bird flocking optimizes a certain objective function. Each agent knows its best value so far (pbest). This information corresponds to personal experiences of each agent. Moreover, each agent knows the best value so far in the group (gbest) among pbests. Namely, each agent 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.

H (z ) ==

I = 0

a z i

The particle swarm algorithm is used here in terms of
An important task for the designer is to find values of ai such that the magnitude response of the filter approximates a desired characteristic while preserving the stability of the designed filter. The stability is assured if all the poles of the filter lie inside the unit circle in the z-plane. The Digital filters have various stages for their design.

3. PARTICLE SWARM OPTIMIZATION

The PSO algorithm is an adaptive algorithm based on a social-psychological metaphor; a population of individuals (referred to as particles) adapts by returning stochastically toward previously successful regions. Particle Swarm has two primary operators: Velocity update and Position update. During each generation each particle is accelerated toward the particles previous best position and the global best position. The new velocity value is then used to calculate the next position of the particle in the search
space. PSO is a flexible, robust population-based stochastic

social cognitive behavior. It is widely used for problem solving method in engineering. In PSO, each potential solution is assigned a randomized velocity, are “flown” through the problem space. Each particle adjusts its flying according to its own flying experience and its companions’ flying experience. The ith particle is represented as Xi = (xi1, xi2, -------xid ). Each particle is treated as a point in a D- dimensional space. The best previous position (the best fitness value is called pBest) of any particle is recorded and represented as Pi = (pi1 , pi2 ------pid ).Anther “best” value (called gBest) is recorded by all the particles in the population. This location is represented as Pg = (pg1, pg2 ----

--pgd) . At each time step, the rate of the position changing

velocity (accelerating) for particle i is represented as Vi = (vi1, vi2 -----vid ). Each particle moves toward its pBest and gBest locations. The performance of each particle is measured according to a fitness function, which is related to the problem to be solved [3]. We have differing variants

of optimizer among which one is binary swarm optimizer

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 9, September-2013 2693

ISSN 2229-5518


and another is standard swarm optimizer. The probability of an individual deciding Yes or No relates with Binary swarm optimizer while in real number space the parameter of a function can be conceptualized as a point in space. A number of particle can be evaluated and there is presumed to be some kind of preference for better region of search space.

Initialize each particle with random position and velocity.

Figure 2: Conventional PSO flowchart

4. SIMULATION RESULTS

A swarm can be described as a population of interacting elements that is able to optimize some global objective through collaborative search of a space. Interactions that are relatively local (topologically) are often emphasized. There is a general stochastic (or chaotic) tendency in a swarm for individuals to move toward a center of mass in the population on critical dimensions, resulting in
convergence on an optimum. This section represents the

Evaluate the desired optimization fitness function (F) of each particle.

If F (Xi)>F (gBest) then

If F (Xi)>F (pBest) then

N

Manipulate next particle

Optimize the position of each particle.

Optimize the velocity of each particle.

simulation frame work for the design of FIR filter using
PSO.
Simulation is carried out for certain specification such as velocity (T1) = 5 dB, position (T2) = 7 dB, central frequency = 1000 Hz, These specification are chosen by the designer itself. These can have different values as per the

If criterion is, meet

Y

pBest is the best solution

requirement. The plots of normalized frequency and
magnitude are shown in Figure 3 for the specification specified above.

Magnitude Response (dB)

60

Figure 1: Flow diagram of PSO.

50

40

30

20

10

0

-10

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8

Normalized Frequency (×π rad/sample)

Figure 3: Magnitude Response

In the graph of Figure 4 the value of (velocity) T1 = 10 dB
and the value of (position) T2 = 14 dB and the central

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 9, September-2013 2694

ISSN 2229-5518

frequency = 1500 MHz Now the simulation results will be as per the specification given by designer.

Magnitude Response (dB)

To analysis filters with special requirements such as a trade-off in norms or concerning quantization effects there
is a need of more general optimization techniques.FIR

70

60

50

40

30

20

10

0

-10

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8

Normalized Frequency (×π rad/sample)

Figure 4: Magnitude Response

In the graph of Figure 5 the value of (velocity) T1 = 15 dB and the value of (position) T2 = 21 dB and the central frequency = 2000 MHz

Magnitude Response (dB)

70

60

50

40

30

20

10

0

-10

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8

Normalized Frequency (×π rad/sample)

Figure 5: Magnitude Response

5. CONCLUSION AND FUTURE SCOPE

digital filters are widely used in the field of signal processing due to its distinguishing features such as: the stability, linear phase and easiness for realization. Traditionally, there exist some methods for FIR digital filters design, such as window method, frequency sampling method and best uniform approximation. Unfortunately, each of them is only suitable for a particular application. In recent years, many evolutionary computation techniques, such as simulated annealing approach (SA), genetic algorithms (GA), particle swarm optimization (PSO), have been employed to design FIR digital filters. GA is a good global searching method, but it is difficult to realization because of the complexity of coding. PSO is a recently proposed random search algorithm and has been applied to many real-world problems, PSO can be efficiently used to digital IIR filter design due to its global search ability. During simulation work we have analyzed or seen the plot for FIR filter for differing parameter in terms of magnitude and central frequency value. This PSO algorithms technique can be used for the application area like telecommunication where desired frequency can be selected to get globally best result of position and velocity that are shown correspondence with amplitude axis. This will result to attain best parameter as per user requirement.

REFERENCES

1) Dag Stranneby and William Walker (2004). Digital Signal Processing and Applications (2nd Edition). Elsevier.

2) Penley, Bill, and Jonathan Penley, "Early Radar

History - an Introduction". 2002.
3) S. Salivahanan, A. Vallavaraj and C. Gnanpriya, Digital signal Processing. N. Delhi: Tata McGraw Hill, 3rd Edition, 2001.

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 9, September-2013 2695

ISSN 2229-5518

4) Lathi, B.P., Signal Processing & Linear Systems, Berkeley-Cambridge Press, 1998,

5) Ricardo A. Losada Practical FIR Filter Design in

MATLAB Revision 1.0. The MathWorks, Inc.3
Apple Hill Dr. Natick, MA 01760, USA March 31,
2003.

6) Arojit Roychowdhury Supervisor: Prof P.C.

Pandey, FIR Filter Design Techniques. Credit seminar report, Electronic Systems Group, EE Dept, IIT Bombay, submitted November2002.

7) Eberbart, R.C., and Shi, Y. (2001)(a). Tracking and optimizing dynamic systems with particle swarms. Proc. Congress on Evolutionaly Computation 2001, Seoul, Korea. Piscataway, NI IEEE Service Center.

8) R. Eberhart, Y. Shi, “Comparison between Genetic Algorithms and Particle Swarm Optimization”, Proc. 7th Ann. Conf. on Evolutionary Computation, San Diego, 2000.

9) J. I. Ababneh, M.H. Bataineh. “Linear phase FIR filter design using particle swarm optimization and genetic algorithm”. Elsevier, Digital Signal Processing, 2006.

10) Y. L. Lin, W. D. Chang, and J. G. Hsieh, “A particle swarm optimization approach to nonlinear rational filter modeling”, Expert Systems with Applications, vol. 34, pp. 1194–1199, 2008.

11) ]http://www.data ompression.info/Algorithms/AC/
index.html.

12) Steven W. Smith, Ph.D. The Scientist and

Engineer's Guide to Digital Signal Processing.

IJSER © 2013 http://www.ijser.org