More Related Content Similar to Design of Optimal Linear Phase FIR High Pass Filter using Improved Particle Swarm Optimization (20) More from IDES Editor (20) Design of Optimal Linear Phase FIR High Pass Filter using Improved Particle Swarm Optimization1. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012
Design of Optimal Linear Phase FIR High Pass Filter
using Improved Particle Swarm Optimization
Sangeeta Mandal1, S.P.Ghoshal1, Purna Mukherjee2, Dyuti Sengupta2, Rajib Kar2, Durbadal Mandal2
1
Department of Electrical Engg.
National Institute of Technology, Durgapur, West Bengal, INDIA
2
Department of Electronics and Communication Engineering
National Institute of Technology, Durgapur, West Bengal, INDIA
rajibkarece@gmail.com
Abstract— This paper presents a novel approach for designing with a given stop band deviation, filter length and cut-off
a linear phase digital high pass FIR filter using Improved frequency, the program needs several iterations [6]. A number
Particle Swarm Optimization (IPSO) algorithm. Design of of models have been developed for the FIR filter techniques
FIR filter is a multi-modal optimization problem. The and design optimization methods. Different heuristic
conservative gradient based optimization techniques are not
optimization algorithms such as simulated annealing
efficient for digital filter design. Given the specifications for
the filters to be realized, IPSO algorithm generates a set of
algorithms [7], genetic algorithm (GA) [8], artificial bee colony
optimal filter coefficients and tries to meet the ideal frequency algorithm [9], etc. have been widely applied for the synthesis
response characteristics. This paper presents the realization of filter design methods capable of satisfying certain
of the optimal FIR high pass filter of filter order 20 as per constraints. Genetic algorithms (GA) have surfaced as
given problem statements. The simulation results have been prominent design and optimization methods of FIR digital
compared to those obtained from well accepted classical filters, particularly due to their ability to automatically find
algorithms like Park and McClellan algorithm (PM), and near-optimum solutions while maintaining the computational
evolutionary algorithms like genetic algorithm (GA) and complexity of the algorithm at moderate levels. The only
particle swarm optimization (PSO). The results rationalize
difficulty with RGA arises in terms of convergence speed
that the proposed optimal filter design approach using IPSO
outperforms PM, RGA, PSO in the accuracy of the designed
and quality of the solution obtained.
filter, as well as in the convergence speed and solution quality. The approach detailed in this paper takes advantage of
the power of the stochastic global optimization technique
Index Terms— Parks and McClellan Algorithm, RGA, PSO, called particle swarm optimization. Particle Swarm Optimization
IPSO, Evolutionary Optimization Technique, Convergence, (PSO) is an evolutionary algorithm developed by Eberhart et
High Pass Filter, FIR Filter al. [10-11]. Several attempts have been made towards the
optimization of the FIR Filter [12] using PSO algorithm. The
I. INTRODUCTION PSO is simple to implement and its convergence may be
Digital Signal Processing (DSP) presents greater flexibility, controlled via few parameters. The limitations of the
higher performance (in terms of attenuation and selectivity), conventional PSO are that it may be influenced by premature
better time and environment stability along with lower convergence and stagnation problem [13-14]. In order to
equipment production costs than traditional analog overcome these problems, the PSO algorithm has been
techniques. Additionally, more and more microprocessor modified in this paper and is employed for FIR high pass
circuits are being substituted with cost effective DSP filter design.
techniques and products. DSP has a wide range of This paper describes a novel technique for the FIR high
applications in the fields of communication, image processing, pass digital filter design using improved particle swarm
pattern recognition, etc. These new DSP applications result optimization approach (IPSO). IPSO algorithm tries to find
from advances in digital filtering. A digital filter is simply a the best coefficients that closely match the ideal frequency
discrete-time, discrete-amplitude convolver. response. Based upon the IPSO approach, this paper presents
There are two basic types of digital filters, Finite Impulse a good and comprehensive set of results, and states arguments
Response (FIR) and Infinite Impulse Response (IIR) filters. for the superiority of the algorithm. Simulation result
FIR digital filter have many advantages such as guaranteed demonstrates the effectiveness and better performance of
stability, free from phase distortion and low coefficient the proposed designed method.
sensitivity. There have been considerable amount of works The rest of the paper is arranged as follows. In section II,
on the design of computationally efficient FIR digital filters the FIR high pass filter design problem is formulated. Section
[1-2] and their corresponding hardware implementations [3- III briefly discusses on the algorithms of RGA, classical PSO
4].An optimization technique based on Remez Exchange and the IPSO algorithm. Section IV describes the simulation
algorithm proposed by Parks and McClellan is one of the results obtained for high pass FIR digital filter using PM
most prominent ones and provides a speed advantage over algorithm, RGA, PSO and the proposed IPSO approach.
the linear programming approach.In order to design FIR filters Finally, section V concludes the paper.
© 2012 ACEEE 5
DOI: 01.IJSIP.03.01. 54
2. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012
II. HIGH PASS FIR FILTER DESIGN 1/ 2
N
Digital filters are classified as finite impulse response (FIR)
Error H d e jwi H i e jwi 2
(6)
i 1
or infinite impulse response (IIR) filter depending upon
whether the response of the filter is dependent on only the
E G H d e j H i e j (7)
present input values or on the present inputs as well as An error function given by (7) is the approximate error
previous outputs, respectively. used in popular Parks–McClellan (PM) algorithm for digital
A finite-duration impulse response filter has a system filter design [5].
function of the form given in (1). where G the weighting function is used to provide
H z h0 h1z 1 ... h N z N (1) different weights for the approximate errors in different
N
frequency bands; H d e j is the frequency response of
or, H z hnz N
(2) the desired filter and in case of high pass filter
n 0
where h(n) is called impulse response. The diference
H d e j k 1 for 1 c ; 0 otherwise (8)
equation representation is where c is the cut-off frequency of the filter to be
y n h0x n h1x n 1 ... hN x x N (3)
The order of the filter is N, while the length of the filter designed and H i e is the frequency response of the
j
(which is equal to the number of coefficients) is N+1. The FIR approximate filters [20].
filter is always stable, and can be designed to have a linear The major drawback of the PM algorithm is that the ratio
phase response. The impulse response h(n) is to be of äp/äs is fixed. In order to improve the flexibility in the error
determined in the design process and the values of h(n) will function to be minimized, so that the desired level of äp and äs
determine the type of the filter e.g. low pass, high pass etc. may be individually specified, the error function given in (9)
The choice of the filters is based on three broad criteria, has been considered as fitness function in [12], [18], although
namely, the filters should: Provide zero distortion to the signal; [18] shows zero improvement compared to the PM algorithm.
Flat pass band; Exhibit highest attenuation characteristics in
J1 max E p max E s (9)
the stop band. p s
Other desirable characteristics include short filter length,
short frequency transition beyond the cut off point, and the where p and s are the ripples in the pass band and
ability to manipulate the attenuation in the stop band.
In this paper, IPSO is applied in order to obtain the actual the stop band; p and s are the pass band and stop band
filter response as close as possible to the ideal response. In normalized edge frequencies, respectively.
each iteration, these individuals are updated. Fitnesses of In this paper, a novel error fitness function has been
particles are calculated using the new coefficients. The result adopted in order to achieve higher stop band attenuation
obtained after a certain number of iterations or after the error and to have an accurate control on the transition width. The
is below a certain limit is considered to be the optimal result. fitness function used in this paper is given in (10). Using
The error for this fitness function is the difference between (10), it is found that the proposed filter deign approach results
the magnitudes of the ideal filter and the filter designed using in considerable improvement over the PM and other
the evolutionary algorithms like RGA, PSO and IPSO. The optimization techniques.
individuals that have lower error values represent the better
J 2 abs abs H 1 p abs H s
filter i.e., the filter with better frequency response. (10)
The frequency response of the FIR digital filter can be For the first term of (10), pass band including a
calculated as, portion of the transition band and for the second term of (10),
N
H e jwk hn e jwk n ;
stop band including the rest portion of the transition
(4) band. The portions of the transition band chosen depend on
n 0
pass band edge and stop band edge frequencies.
2k
where k
N
; H e jwk The error function given in (10) represents the generalized
fitness function to be minimized using the evolutionary
is the Fourier transform complex vector. This is the FIR algorithms. The algorithms try to minimize this error and thus
filter frequency response. The frequency in [0, ] is sampled improve the filter performance. Since the coefficients of the
with N points.Different kinds of fitness functions have been linear phase filter are matched, the dimension of the problem
used in different literatures as given in (5) and (6) [15-19]. is thus reduced by one-half. By only determining half of the
coefficients, the filter can be designed. This greatly reduces
N
Error max H d e jwi H i e jwi
i 1
(5) the computational burdens of the algorithms, applied to the
design of linear phase FIR filters.
© 2012 ACEEE 6
DOI: 01.IJSIP.03.01. 54
3. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012
III. EVOLUTIONARY TECHNIQUES E MPLOYED A. IMPROVED PARTICLE SWARM OPTIMIZATION (IPSO)
The global search ability of traditional PSO is very much
A. REAL CODED GENETIC ALGORITHM (RGA)
enhanced with the help of the following modifications. This
Steps of RGA as implemented for optimization of h(n) modified PSO is termed as IPSO [23].
coefficients are adopted from [21-22]. In this work,
initialization of real chromosome string vectors of n p i) The two random parameters rand1 and rand 2 of (11) are
population, each consisting of a set of h(n) coefficients is independent. If both are large, both the personal and social
made. Size of the set depends on the number of coefficients experiences are over used and the particle is driven too far
in a particular filter design. away from the local optimum. If both are small, both the
personal and social experiences are not used fully and the
B. PARTICLE SWARM OPTIMIZATION (PSO) convergence speed of the technique is reduced. So, instead
PSO is a flexible, robust population-based stochastic of taking independent rand1 and rand2, one single random
search/optimization technique with implicit parallelism, which number r1 is chosen so that when is large, is small and vice
can easily handle with non-differential objective functions,
versa. Moreover, to control the balance of global and local
unlike traditional optimization methods. PSO is less
searches, another random parameter is introduced. For birds
susceptible to getting trapped on local optima unlike GA,
flocking for food, there could be some rare cases that after
Simulated Annealing etc. Eberhart et al. [10-11] developed
the position of the particle is changed according to (11), a
PSO concept similar to the behavior of a swarm of birds. PSO
bird may not, due to inertia, fly toward a region at which it
is developed through simulation of bird flocking in
thinks is most promising for food. Instead, it may be leading
multidimensional space. Bird flocking optimizes a certain
toward a region which is in the opposite direction of what it
objective function. Each particle (bird) knows its best value
should fly in order to reach the expected promising regions.
so far (pbest). This information corresponds to personal
So, in the step that follows, the direction of the bird’s velocity
experiences of each particle. Moreover, each particle knows
should be reversed in order for it to fly back into promising
the best value so far in the group (gbest) among pbests.
region. is introduced for this purpose. Both cognitive and
Namely, each particle tries to modify its position using the
social parts are modified accordingly. Other modifications
following information:
are described below.
• The distance between the current position and the pbest.
ii) A new variation in the velocity expression (11) is made by
• The distance between the current position and the gbest.
splitting the cognitive component (second part of (11)) into
Similar to GA, in PSO techniques also, real-coded particle
two different components. The first component can be called
vectors of population np are assumed. Each particle vector
good experience component. That is, the particle has a
consists of components or sub-strings as required number
memory about its previously visited best position. This
of normalized filter coefficients, depending on the order of
component is exactly the same as the cognitive component
the filter to be designed.
of the conventional PSO. The second component is given
Mathematically, velocities of the particles are modified
the name bad experience component. The bad experience
according to the following equation:
component helps the particle to remember its previously
Vi k 1 w Vi k C1 rand1 pbestik Sik C2 rand 2 gbest k Sik (11)
visited worst position. The inclusion of the worst experience
where Vi k is the velocity of ith particle at kth iteration; w is component in the behavior of the particle gives additional
exploration capacity to the swarm. By using the bad
the weighting function; C1 and C2 are the positive weighting experience component, the bird (particle) can bypass its
factors; rand1 and rand 2 are the random numbers between previous worst position and always try to occupy a better
position.
0 and 1; Sik is the current position of ith particle at kth iteration; Finally, with all modifications, the modified velocity of
pbestik is the personal best of the ith particle at the kth iteration; the ith particle vector at the (k+1)th iteration is expressed as
(13).
gbest k is the group best of the group at the kth iteration. The Vi k 1 r2 signr3 Vi k 1 r2 C1 r1 pbestik S k
i
searching point in the solution space may be modified by the 1 r2 C2 1 r1 gbestk S ki (1 r2 ) * c1 * r1 S k pworstik
(13)
i
following equation:
where signr3 is a function defined as:
Sik 1 Sik Vi k 1 (12)
signr3 1 where r3 0.05; 1 where r3 0.05
The first term of (11) is the previous velocity of the particle. k
The second and third terms are used to change the velocity Vi is the velocity of the i particle at the kth iteration; r1 , r2
th
of the particle. Without the second and third terms, the particle and r3 are the random numbers between 0 and 1; S ik is the
will keep on ‘‘flying’’ in the same direction until it hits the
boundary. Namely, it corresponds to a kind of inertia current position of the ith particle at the kth iteration; pbestik
represented by the inertia constant, w and tries to explore
and pworst ik are the personal best and the personal worst of
new areas.
© 2012 ACEEE 7
DOI: 01.IJSIP.03.01.54
4. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012
the ith particle respectively ; gbest k is the group best among
all pbests for the group.The searching point in the solution
space is modified by the equation (12) as usual.
IV. RESULTS AND DISCUSSIONS
A. ANALYSIS OF MAGNITUDE RESPONSE OF HIGH PASS FILTERS
In order to demonstrate the effectiveness of the proposed
filter design method, FIR filter is constructed using RGA,
PSO, IPSO algorithms. The MATLAB simulation has been
performed extensively to realize the high pass FIR filter of the
order of 20. Hence, the length of the filter coefficient is 21.
The sampling frequency has been chosen as fs = 1Hz. Also,
for all the simulations the number of sampling points is taken
as 128. Algorithms are run for 40 times to get the best solutions.
The best results are reported in this work.
The parameters of the filters to be designed are: pass Figure 1. Magnitude (dB) Plot of the FIR High Pass Filter of Order
20 .
band ripple (δp) = 0.1, stop band ripple (δs) = 0.01. For high
pass filter, pass band (normalized) edge frequency (ωp) =
0.75; stop band (normalized) edge frequency (ω s) = 0.65;
transition width=0.1. Figure 1 shows the magnitude plot for
the high pass FIR filter of the order of 20. The best optimized
coefficients for the designed filters with the order of 20 have
been calculated by RGA, PSO and IPSO and given in Table II.
Table I shows the maximum stop band attenuation (dB),
maximum pass band ripple (normalized), maximum stop band Figure 2. Convergence Profile Figure 3. Convergence Profile for
for RGA in case of 20th Order PSO for 20th order HP FIR
ripple (normalized) and transition width for all the
HP FIR Filter. Filters
aforementioned optimization algorithms. From the figure and
tables, it is evident the proposed filter design approach IPSO
produces higher stop band attenuation and smaller stop band
ripple compared to that of PM, RGA and PSO.
The filter designed by the IPSO algorithm has a similar
transition band response to that of the response produced
by RGA, PSO algorithms. For the stop band region, the filters
designed by the IPSO method results in the improved
responses than the other.
B.COMPARATIVE EFFECTIVENESS AND CONVERGENCE PROFILES
In order to compare the algorithms in terms of the
convergence speed, Figures 2-4 show the plots of minimum
Figure 4. Convergence Profile for IPSO in case of 20th Order High
error values against the number of iteration cycles when RGA, Pass FIR Filters.
PSO and IPSO are employed, respectively. The convergence
profiles have been shown for the filter order of 20. V. CONCLUSIONS
From the figures drawn for this filter, it is seen that the
IPSO algorithm is significantly faster than the RGA and PSO This paper presents a novel and optimal method for
algorithms for finding the optimum filter. The IPSO converges designing linear phase digital high pass FIR filters by using
to a much lower fitness in lesser number of iterations. Further, nonlinear stochastic global optimization based on IPSO. Filter
PSO yields suboptimal higher values of error but IPSO of order 20 has been realized using RGA, PSO as well as with
yields near optimal (least) error values. With a view to the the proposed IPSO algorithm. Extensive simulation results
above fact, it may finally be inferred that the performance of justify that the proposed algorithm outperforms RGA and
IPSO technique is better as compared to RGA and PSO in classical PSO in the accuracy of the magnitude response of
designing the optimal FIR filter. All optimization programs the filter as well as in the convergence speed and is adequate
are run in MATLAB 7.5 version on core (TM) 2 duo processor, for use in other related design problems.
3.00 GHz with 2 GB RAM.
© 2012 ACEEE 8
DOI: 01.IJSIP.03.01.54
5. ACEEE Int. J. on Signal & Image Processing, Vol. 03, No. 01, Jan 2012
TABLE I. OTHER COMPARATIVE RESULTS OF PERFORMANCE PARAMETERS OF ALL 2000, pp.151–155.
ALGORITHMS FOR HIGH PASS FILTER [8] Mastorakis, N.E., Gonos, I.F., Swamy, M.N.S.: Design of Two
Dimensional Recursive Filters Using Genetic Algorithms, IEEE
Transaction on Circuits and Systems-I; Fundamental Theory and
Applications, 50 (2003) 634–639.
[9] Karaboga, N.: A new design method based on artificial bee
colony algorithm for digital IIR filters. Journal of the Franklin
Institute, 346(4), 2009, 328–348.
[10] Kennedy, J., Eberhart, R.: Particle Swarm Optimization, in
Proc. IEEE int. Conf. On Neural Network, 1995.
[11] Eberhart, R., Shi, Y.: Comparison between Genetic Algorithms
and Particle Swarm Optimization, Proc. 7 th Ann. Conf. on
Evolutionary Computation, San Diego, 2000.
[12] Ababneh, J.I., Bataineh, M. H.: Linear phase FIR filter design
using particle swarm optimization and genetic algorithms, Digital
Signal Processing, 18, 657–668, 2008.
[13] Ling, S. H., Iu, H. H. C., Leung, F. H. F., and Chan, K.Y.:
TABLE II. O PTIMIZED COEFFICIENTS OF FIR HIGH PASS FILTER OF ORDER 20 “Improved hybrid particle swarm optimized wavelet neural
network for modeling the development of fluid dispensing for
electronic packaging,” IEEE Trans. Ind. Electron., vol. 55, no. 9,
pp. 3447–3460, Sep. 2008.
[14] Biswal, B. P., Dash, K., Panigrahi, B. K.: “Power quality
disturbance classification using fuzzy C-means algorithm and
adaptive particle swarm optimization,” IEEE Trans. Ind. Electron.,
vol. 56, no. 1, pp. 212–220, Jan. 2009.
[15] Karaboga N, Cetinkaya1 B.: ‘Design of digital FIR filters using
differential Evolution algorithm,’ Circuits Systems Signal
Processing, 2006, 25, (5), pp. 649–660
[16] Liu G, Li YX, and He G.: ‘Design of Digital FIR Filters Using
Differential Evolution Algorithm Based on Reserved Gene’, IEEE
Congress on Evolutionary Computation, 2010, pp. 1-7
[17] Luitel B, Venayagamoorthy GK.: ‘Particle swarm
optimization with quantum infusion for system identification,’
Engineering Applications of Artificial Intelligence, 2010, 23, (5),
REFERENCES pp. 635-649
[18] Sarangi A, Mahapatra RK, Panigrahi SP.: DEPSO and PSO-QI
[1] T. Parks and J. McClellan, “Cheyshev approximation for in digital filter design,’ Expert Systems with Applications, 2011,
nonrecursive digital filters with linear phase.” IEEE Trans. on Circuit 38, (9), pp.10966-10973
Theory, vol. CT-19, pp. 189–194, 1972. [19] Luitel B, Venayagamoorthy GK.: ‘Differential evolution particle
[2] Y. C. Lim, “Frequency-response masking approach for the swarm optimization for digital filter design,’ IEEE World Congress
synthesis of sharp linear phase digital filters,” IEEE Trans. on on Computational Intelligence (IEEE Congress on Evolutionary
Circuits and Systems, vol. CAS-33, pp.357–364, Apr 1986. Computation), CEC 2008, pp.3954-3961
[3] H.-J. Kang and I.-C. Park, “Pairing and ordering to reduce [20] Lin, Z.: An introduction to time-frequency signal analysis,
hardware complexity in cascade form filter design,” ISCAS, vol. 4, Sensor Review, vol. 17, pp. 46–53, 1997.
pp. 265–268, 25-28 May 2003. [21] D. Mandal, S. P. Ghoshal, and A. K. Bhattacharjee, Application
[4] R. Hartley, “Sub-expression sharing in filters using canonic of Evolutionary Optimization Techniques for Finding the Optimal
signed digit multipliers,” IEEE Trans. Circuits Syst. II, vol.43-10, set of Concentric Circular Antenna Array, Expert Systems with
pp. 677–688, Oct 1996. Applications, (Elsevier), vol. 38, pp. 2942-2950, 2010.
[5] McClellan, J.H., Parks, T.W., Rabiner, L.R.: A computer program [22] D. Mandal, S. P. Ghoshal, and A. K. Bhattacharjee, Comparative
for designing optimum FIR linear phase digital filters, IEEE Trans. Optimal Designs of Non-uniformly Excited Concentric Circular
Audio Electro acoust., AU-21 (1973) 506–526. Antenna Array Using Evolutionary Optimization Techniques, IEEE
[6] Rabiner, L.R.: Approximate design relationships for low-pass Second International Conference on Emerging Trends in Engineering
FIR digital filters, IEEE Trans. Audio Electro acoust., AU-21 (1973) and Technology, ICETET’09 (2009), 619-624.
456–460. [13] D. Mandal, S. P. Ghoshal, and A. K. Bhattacharjee, ‘Swarm
[7] Chen, S.: IIR Model Identification Using Batch-Recursive Intelligence Based Optimal Design of Concentric Circular Antenna
Adaptive Simulated Annealing Algorithm, In Proceedings of 6th Array,’ Journal of Electrical Engineering, vol. 10, no. 3, pp. 30–39,
Annual Chinese Automation and Computer Science Conference, 2010.
© 2012 ACEEE 9
DOI: 01.IJSIP.03.01. 54