Sunteți pe pagina 1din 8

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882

Volume 4, Issue 5, May 2015

Design of Digital FIR High Pass Filter Using Particle Swarm Optimization
(PSO) Technique
Amarjeet Kaur Jatana1, Darshan Singh Sidhu2
1,2

(Department of Electronics and Communication Engineering,


Gaini Zail Singh PTU Campus, Bathinda, Punjab, India)

ABSTRACT
Digital filters play a vital role in todays broadening
field of signal processing and communication. FIR filters
are used in wide variety of applications due to linear
phase response and stability. The traditional nonoptimization methods for filter design suffer from the
problem of inefficient frequency response and also it
needs analog to digital conversion. Various conventional
gradient based optimization techniques are not able to
solve non-differential functions. Thus this paper presents
one of the evolutionary computation techniques i.e.
Particle Swarm Optimization (PSO) for the design of
digital FIR high pass (HP) filter. PSO is a random
algorithm which provides optimal filter coefficients.
PSO offers many advantages such that error function is
minimized, simple implementation, robust design
specifications, enhanced search capability and provides
fast convergence. PSO algorithm is implemented for the
design of FIR high pass filter. Simulation study affirms
that the proposed algorithm is accurate and has fast
convergence speed. Various results reveal the superiority
of the algorithm.
Keywords-Finite Impulse Response (FIR) Filter, High
Pass (HP) Filter, Particle Swarm Optimization (PSO),
Ripple magnitude.
I.

INTRODUCTION

A signal is defined as any physical quantity that varies


with time, space, or any other independent variable or
variables. Basically signal is the carrier of information
which is germinated in almost every field of science and
technology. Depending on time, signals can be classified
as, continuous time and discrete time signals. We can
say analog and digital signals. Digital signal processing
(DSP) is the flavor of signal processing which provides
an alternative method for processing the analog signal. It
is a mathematical manipulation of an information signal
to modify it. It is characterized by the representation of
discrete time, discrete frequency, or by a sequence of
numbers or symbols. To perform the processing digitally

an interface is needed between the digital processor and


the analog signal. The popularity of DSP can be owed to
the extraordinary behavior of filters. Basically filters
refers to the frequency selective devices which extracts
useful portion of the input signal and rejects the
unwanted portion such as noise. Filters basically serve
two purposes of signal separation and signal restoration.
Signal separation is required when a signal is
contaminated with interference, noise or other signal.
Signal restoration is needed when a signal is distorted in
some way. Both these problems can be rectified using
both analog and digital filters. Analog filters are
implemented with discrete components but digital filters
perform mathematical operations on sampled, discrete
time signals to enhance the desired features. Digital
filters are more in demand due to various advantages
over analog filters such as high-data-rate digital
communication systems, wide-band image processing,
aerospace, control systems, defense equipments,
telecommunications, etc. Digital filters are capable of
performance specifications such as ability to achieve
multi-rate operation and exact linear phase. In addition,
digital filter characteristics are easy to change under
software control. Thus digital filter outperforms analog
filter in various aspects.
Digital filters are of two types: finite impulse
response (FIR) and infinite impulse response (IIR) filter.
A finite impulse response (FIR) filter is a type of digital
filter whose impulse response is of finite duration.
Whereas an IIR filter has infinite impulse response,
means unit sample response exists for zero to infinity.
The impulse response never dies out. FIR filter has a
number of useful properties, which gains a lot of
preferences over the IIR filter. FIR filter requires no
feedback, which makes its implementation simpler. The
lack of feedback ensures that the impulse response will
be finite [1]. Since there is no required feedback, all the
poles are located at the origin and thus are located within
the unit circle. FIR filters have only zeros (no poles),
hence these are also known as all-zero filters. FIR filters
are also known as feed forward or non recursive filters.
FIR filters can be easily designed to have linear phase by

www.ijsret.org

472

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015

making the coefficients symmetric. There is a great


flexibility in shaping their magnitude response. FIR
filters are dependent upon linear-phase characteristics,
whereas IIR filters are used for applications which are
not linear. FIR filters delay characteristic is much better
but they require more memory. IIR filters are dependent
on both input and output whereas FIR filters are only
dependent on the input. IIR filters can become difficult
to implement, and also delay and distortion adjustments
can amend the poles and zeros, which make the filters
unstable, whereas FIR filters always, remain stable. FIR
filters are used for tapping of a higher order, and IIR
filters are better for tapping of lower-orders, since IIR
filters may become unstable with tapping higher orders.
Traditionally, there are many well known methods of
filter design such as the window method, frequency
sampling method and the optimal filter design methods.
The windowing method simply consists of truncating or
windowing a theoretically ideal filter impulse response
by some suitably chosen window function. The window
method for digital filter design is fast, convenient, robust
but generally suboptimal. A window is a finite array of
coefficients selected to satisfy the desirable
requirements.
There are various kinds of window functions such as
Butterworth, Chebyshev, Kaiser etc [1-2] for FIR filters
and which can further be transformed to digital Low
pass, High pass, Band pass or Band stop filter using
transformation technique such as bilinear transformation
for IIR filter designs. Remez exchange algorithm
proposed by Parks and McClellan [2] (called PM
algorithm) is better than all other traditional methods for
design of FIR filters but it also has the limitation of
computational complexity and high pass-band ripples.
Such filters have many errors and need optimization, i.e.
minimization of mean square error between desired
response and estimated filter output. Steepest-descent
method of optimization can approximate any kind of
frequency response for linear phase FIR filter but the
transition width is to be compromised which is not
acceptable. The other classical gradient based
optimization methods are not suitable for FIR filter
optimization because of several reasons [3].
As the filter optimization technique is not new and
several efforts have already been made for optimum
filter design. Evolutionary optimization techniques such
as Genetic Algorithm [4], Artificial Bee Colony
optimization [5], Differential Evolution [6] are
implemented for the design of optimal digital filters.
These approaches proved themselves quite efficient by
providing better control of performance parameters in
addition to high stop-band attenuation. Heuristic
optimization technique of Genetic Algorithm gives

efficient results for local optimum but is not very


successful in determining global optimum [7]. This
paper presents the use of one of the evolutionary
optimization technique called Particle Swarm
Optimization (PSO) for design of digital FIR High Pass
filter with better parameter control & to better
approximate the ideal filter. The PSO technique was
developed by Kennedy and Eberhart [8] simulating the
social behavior of swarm of birds searching for food.
The merits of PSO lie in its simplicity to implement as
well as its fast convergence speed. This optimization
method requires no gradient and achieves a global
optimal solution for the given multimodal objective
function minimization in digital design problems.
Several modifications of the conventional PSO also
exist. The use of PSO with differential evolution for
design of optimal filter is another approach. The method
converges faster but with higher value of pass-band
ripples.
But all these algorithms have results that are further
needed to be optimized due to their inherent problems of
control parameter, dependence and premature
convergence. The intent of this paper is to design High
Pass digital FIR filter using PSO. The designed highpass digital FIR filter has the minimum magnitude error
& minimum ripples in pass-band and stop-band. Also
the designed high pass FIR filter well optimizes the ideal
filter characteristics being computationally fast.
This paper is arranged as follows: In section II the FIR
filter design problem is formulated. Section III presents
a brief summary of the proposed PSO algorithm. Section
IV describes the simulation results obtained for high
pass FIR digital filter. Finally section V concludes the
paper.

II.

FIR FILTER DESIGN PROBLEM

FIR filter is classified as non-recursive type filter which


means it requires no feedback. The lack of feedback
ensures that the impulse response will be finite. The
traditional design of FIR digital filter is described by the
difference equation expressed as:
M

y m bk xm k

(1)

k 0

where b k is the set of filter coefficients. The output

ym is a function only of the input signal xm . M is


the order of filter. The transfer function of FIR filter is
given as:

www.ijsret.org

473

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015
N

H z hn z n , n 0,1,...,N

(2)

n 0

where N is the order of filter having N+1 coefficients.


h(n) is filters impulse response. h(n) coefficients are
symmetrical due to which the dimension of the problem

1 number of h(n) coefficients


2

p and s are the ripple magnitudes of pass-band and


stop-band.

p maxi H i , x min i H i , x
for i passband

(9)

is halved. Thus

s maxi H i , x

are actually optimized. The frequency response of the


filter is given as:

Four objective functions for optimization are:

H d e j hn e jn

(3)

n 0

where h(n) represents the impulse response of the filter.


For a HP filter the response of the filter is defined as:

0
H i e j
1

for

0 c

(4)

otherwise

where c is the cut-off frequency.

response is defined as:


p
K
errm x H I i H D i , x
i 0

(5)

where H I i is the magnitude response of the ideal

FIR filter and H D i , x is the magnitude response of


the designed FIR filter. For p=1, the magnitude response
error denotes the L1 norm error and for p=2, the
magnitude error denotes L2 norm error. L1 norm error
is defined as:
K

E1 x H I i H D i , x

(6)

i 0

and the L2 norm error is defined as:


1

(7)

Ideal magnitude response H I i of FIR filter is given


as:

1
H I i
0

f 2 x Minimize E 2 x

f 3 x Minimize p

f 4 x Minimize s
The multi-objective function is converted to single
objective function: Minimize

i passband
for
i stopband

(8)

(11)

1 , 2 , 3 and 4 are weights.


III.

(10)

f 1 x Minimize E1 x

f x 1 f1 x 2 f 2 x 3 f 3 x 4 f 4 x

The L p norm approximation error for the magnitude

2
K
E 2 x H I i H D i , x
i 0

for i stopband

PARTICLE SWARM OPTIMIZATION

Particle Swarm Optimization (PSO) is a computational


technique motivated by simulation of social behavior
inspired by bird flocking and fish schooling. The PSO
algorithm was first introduced by Kennedy and Eberhart
in 1995 [8]. PSO is used for solving problem in
engineering and computer science, as it has capability to
handle non-differential objective function and larger
search space. It is a naturally inspired technique that is
not affected by non-linearity, size and convergence of
the problem. It is a kind of swarm intelligence that is
based on social psychological principles. The population
in PSO is called a swarm and each individual is called a
particle. To search the global optima each particle flies
through the solution space. The particles iteratively
evaluate the fitness function at different locations and
remember that location which they had their best fitness
value. Each particle knows its best value so far (pbest) or
local best and each particle know their best value so far
in group or swarm (gbest) among pbests. Each particle
tries to modify their position using the following
information:1. The distance between the current position and the
pbest.
2. The distance between the current position and the
gbest.

www.ijsret.org

474

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015

In PSO the system is initialized with population of


random solutions. A randomized velocity is assigned to
each potential solution. This potential solution is called
particle. Each particle is treated as a point in a N
dimensional space which adjusts its flow according to
its own flying experience as well as the flying
experience of other particles. So after finding the p best
and g best values, the particle updates their velocity and
positions by using these two equations:

k 1
i

w v c1 rand1 pbest x
k
i

c 2 rand 2 gbest xik


x

k 1
i

x v
k
i

k
i

given in Table 2. The values for pass-band, stop-band


and H , x are mentioned in the table.
Table 1
PSO Parameters
Parameters

Value

Population Size

100

Iteration Cycle

200

C1, C2

(12)

k 1
i

(13)

where rand 1 and rand 2 are random numbers between


0 and 1 and c1 and c2 are learning factors usually having
value 2. x i and v i are the initial position and velocity
k 1

k 1

vector of a particle, whereas x i


and v i
position and velocity vector of the particle.

IT
w wm ax ( wm ax wm in )

max IT

wm in

0.1

wm ax

0.4

the final

Table 2
Desired Design Conditions for High Pass Filter

(14)

w is the weighting function IT is used for iterations and


max IT are the maximum iterations.

Filter
Type

Algorithm for PSO:

High
Pass

1. Initialize a population (array) of particles with


random positions and velocities on d dimensions in the
problem space.

Pass-band

0.8

Stop-band

Maximum
Value of
H , x

0 0.7

IV. RESULTS AND DISCUSSION

2. Evaluate the fitness function of each particle.


3. Compare each particles fitness with current particles
to obtain p best.
4. Now to obtain g best compare fitness evolution with
the populations overall previous best.
5. The position and velocity of each particle is updated
using equations (12) and (13).
6. Loop to step 2 until the stopping criterion is met.
7. Stop.
Table 1 shows the parameters chosen in order to run
evolutionary PSO algorithm. The proper selection of
these parameters plays an important role in the
convergence profile of the respective algorithm. Desired
Conditions for the design of FIR High Pass Filter are

For designing high pass FIR digital filter 200 equally


spaced points are set within the frequency domain 0, .
The order of the filter has been varied from 20 to 32. The
algorithm is run 100 times for each order and the results
are recorded accordingly. The main objective of this
paper is to minimize the objective function, magnitude
error and Pass-band and Stop-band ripples. Figure 1
represents the graph of different orders versus objective
function. The graph shows that initially as the order
increases the objective function decreases. At 28th order
the value is 2.6694, but at 30th order the objective
function increases and at 32nd order the value of
objective function is 12.0720 which is very large. The
objective function for order 28 is minimum as compared
to other orders and it also meets the objective of this

www.ijsret.org

475

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015

paper. So order 28 is selected for designing High Pass


FIR filter. Table 3 shows the various design parameters
of FIR HP filter for different orders. From the table it is
inferred that the designed High Pass FIR filter for order
28 provides minimum value of objective function. The
pass-band ripple is 0.060939 and the stop-band ripple is
0.049359. Table 4 shows the best optimized filter
coefficients obtained for designing HP FIR filter.

14
objective function

12
10
8
6
4
2
0
20

22

24

26

28

30

32

order of FIR HP filter

Fig.1 Filter order versus Objective function

Table 3
Various Design Parameters of High Pass FIR Filter for different orders

Filter
Order

Objective
Function

L1 -Norm Error

L2 -Norm Error

Pass-band
Performance

Stop-band
Performance

20

5.5209

2.663781

0.328815

0.124907

0.126031

22

4.4301

2.021664

0.256289

0.130451

0.084450

24

4.1773

1.836927

0.263674

0.148345

0.057541

26

3.7702

1.927878

0.248097

0.070976

0.088446

28

2.6694

1.396111

0.170330

0.060939

0.049359

30

4.9676

3.322492

0.376548

0.036599

0.090261

32

12.0720

18.860910

1.747700

0.484646

0.202543

www.ijsret.org

476

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015

Table 4
Optimized High Pass FIR Filter coefficients of order 28

h(n)
h(0)=h(28)
h(1)=h(27)
h(2)=h(26)
h(3)=h(25)
h(4)=h(24)
h(5)=h(23)
h(6)=h(22)

PSO result
-0.007027
0.009866
-0.003250
-0.010234
0.021418
-0.020307
0.002473

h(7)=h(21)
h(8)=h(20)
h(9)=h(19)
h(10)=h(18)
h(11)=h(17)
h(12)=h(16)
h(13)=h(15)
h(14)

0.025522
-0.046672
0.042242
-0.001159
-0.071979
0.157044
-0.224765
0.250648

Fig. 2 shows the normalized magnitude response drawn


from the optimized coefficients from Table 4. Fig.3
indicates the dB plot where the maximum stop-band
attenuation in dB is observed as 26.13 dB.

Fig.3 dB plot for FIR HP Filter

Fig.2 Magnitude plot for FIR HP Filter

Fig.4 Iterations versus Objective function

www.ijsret.org

477

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015

The convergence rate of the proposed algorithm is


depicted in Fig.4 which shows how efficiently the
algorithm converges to global optimal result. Initially the
algorithm converges but becomes stable after 40
iteration cycles for all 100 run case. Table 5 represents

the maximum, minimum, average value and standard


deviation of the objective function. In Table 5 the value
of standard deviation is very small which means system
is stable.

Table 5
Statistical Data for FIR HP Filter of order 28
Maximum value
of Objective
function

Minimum value
of Objective
function

Average value
of Objective
function

Standard Deviation
Of Objective
function

2.808803

2.669424

2.673466

0.016157

V.CONCLUSION
In this paper, particle swarm optimization (PSO)
algorithm has been applied to design Digital FIR High
Pass Filter. The order of the filter has been varied from
20 to 32. The values of all the parameters are optimal for
order 28. As shown through simulation results the
proposed PSO method possesses the merits of

REFERENCES
[1] J.G. Proakis and D.G. Manolakis, Digital Signal
Processing Pearson, fourth edition, 2013.
[2] T.W. Parks and J.H. McClellan, Chebyshev
approximation for non recursive digital filters with
linear phase, IEEE Transactions on Circuit
Theory, vol. 19, pp. 189194, 1972.
[3] S. Mandal, S.P. Ghoshal, R. Kar and D. Mandal,
Design of optimal linear phase FIR high pass filter
using craziness based particle swarm optimization
technique, Journal of King Saud University, vol.
24, pp. 8392, 2012.
[4] H.C. Lu and S.T. Tzeng, Design of arbitrary FIR
log filters by genetic algorithm approach, Signal
Processing, vol. 80, pp. 497-505, 2000.
[5] N. Karaboga, A new design method based on
artificial bee colony algorithm for digital IIR filters,
Journal of Franklin Institute, vol. 4, pp.328-348,
2009.

controllable convergence speed, easier implementation


and robustness. The computational results reveal that the
proposed algorithm converges to the specified optimum
result within very small number of iterations. Therefore,
PSO method is a powerful tool for the design of digital
FIR filters. Also any type of filter such as Low Pass
(LP), Band Pass (BP) and Band Stop (BS) can be easily
realized by using proposed PSO algorithm.

[6] N. Karaboga and B. Cetinkaya, Design of Digital


FIR Filters Using Differential Evolution Algorithm,
Circuits System Signal Processing, vol. 25, pp. 649660D, 2006.
[7] J.I. Ababneh and M.H. Bataineh, Linear phase FIR
filter design using particle swarm optimization and
genetic algorithms, Digital Signal Processing, vol.
18, pp. 657668, 2007.
[8] J. Kennedy and R. Eberhart, Particle Swarm
Optimization, In Proceeding of IEEE International
Conference On Neural Network, vol. 4, pp. 19421948, Perth, 1995.
[9] Amanpreet Kaur and Ranjit Kaur, Design of FIR
Filter Using Particle Swarm Optimization Algorithm
for Audio Processing, International Journal of
Computer Science and Networks,Vol. 1, Issue 2,
Aug 2012.
[10] Neha and Ajaypal Singh, Design of Linear Phase
Low Pass FIR Filter using Particle Swarm

www.ijsret.org

478

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 5, May 2015

Optimization, International Journal of Computer


Applications, Vol. 98, No.3, July 2014.
[11] Vijay P and M. Venkata Sudhakar, Comparison of
various Low Pass FIR filter Design Engineering,
Vol. 1, Issue 9, Nov 2012.
[12] Shalu Pandey, Surabhi Agarwal and Urvashi
Agrahari, FIR Filter Implementation and its
Performance Analysis, International Journal of
Advanced Technology and Engineering Research,
Volume 3, Issue 3, May 2013.
[13] Yadwinder Kumar and Er. Priyadarshni, Design of
Optimum Digital FIR Low Pass Filter using Hybrid
of GA and PSO algorithm, International Journal of
Advanced Search in Computer Science and
Software Engineering, Vol.3, Issue 9, Sep 2013.

www.ijsret.org

479

S-ar putea să vă placă și