DAPSO and PSO-VAF in Linear Phase Digital Low Pass FIR Filter Design

Digital filters play a key role in the field of digital signal processing. This paper presents a linear phase digital low pass finite impulse response (FIR) filter design using particle swarm optimization and its two new variants, dynamic and adjustable particle swarm optimization (DAPSO) and particle swarm optimization with variable acceleration factor (PSO-VAF) and illustrates the superiority of the PSO-VAF method over PSO based methods. Two fitness functions are considered. The fitness1 is used to find the possible minimum ripples in pass band and stop band in case of PSO, DAPSO and PSO-VAF. Fitness2 is able to control the ripples in both bands separately. A comparison of simulation results demonstrates the performance of PSO and its methods in designing digital low pass FIR filters.


Introduction
In the modern age, digital signal processing (DSP) is the indispensable part of the human life, due to its numerous applications such as telecommunication, speech processing, consumer electronics systems, biomedical systems, image processing, military and defense electronics systems, aerospace and automotive electronics systems and industrial applications [1].DSP has two major classes of systems.The first system is used to perform signal filtering in time domain and known as digital filter.The second system gives signal representation in frequency domain and known as spectrum analyzer.Digital filters are the most essential element of the DSP and classified into two types, finite impulse response (FIR) and infinite impulse response (IIR).FIR filters or non-recursive filters are those for which the output of the filter depends only on the present input.FIR filters are widely used due to its advantages like it is inherently stable since the poles lie within the unit circle and can be designed as linear phase filters, making them a better choice in phase sensitive application [2].
There are many different techniques available for the design of digital filters, such as window methods, frequency sampling methods and Parks-McClellan equiripple algorithm.The simplest and most popular way to design FIR filter is by windowing.In this method, ideal impulse response is multiplied with different window functions, such as Butterworth, Chebyshev, Kaiser and Hamming etc., depending on the requirements of ripples on the pass and stop band, stop band attenuation and transition width.But this method does not allow controlling the approximation errors in different bands.In frequency sampling method, any kind of frequency response can be approximated.But in this method, there is no direct formula to calculate the filter order [3].Parks-McClellan (PM) method based on Remez Exchange algorithm provides an optimum equiripple approximation to the desired frequency response.But in this method, the relative values of the amplitude error in the frequency bands are specified by weighting function and not by deviations themselves [4].In these methods, designer always has to compromise on one or more of the design specifications.
The intelligent optimization techniques have been successfully implemented in the design of digital filters and provide better parameter control as well as better approximate the ideal filter.Simulated annealing, Tabu search, Differential evolution and artificial bee colony algorithm are some intelligent optimization techniques, which have proved their capability of designing digital filters.Simulated annealing (SA) was used to design linear phase digital filter, Nyquist filter and cascade form FIR filter.However, in this approach computation time is quite long (especially for higher order filter) and does not guarantee finding the global optimum [5].The tabu search was applied to design approximation problem of FIR digital filter with quantized coefficients using a flexible realization of the filter taps, which allows getting higher accuracy [6].Another population based algorithm, differential evolution (DE), was applied to design with different order FIR filter.However, this approach is computationally less expensive than Genetic algorithm [7].A new design method based on artificial bee colony algorithm (ABC) was used to design IIR filters [8].
The particle swarm optimization (PSO) is population based intelligent optimization technique that has proven to be effective in multidimensional nonlinear environment; all of the constraints of filter design can be effectively taken care of by the use of PSO.PSO and its several modifications have been successfully implemented in digital filter designing problems [9]- [14].In this paper, we propose two new variants of PSO for designing linear phase low pass FIR (LP FIR) filter.

FIR Filter Design Issues
The transfer function of FIR digital filter is given by ( ) ( ) And the frequency response of FIR digital filter is given by ( ) In this paper we design an even order, odd length and even symmetry low pass FIR filter.For this the symmetry condition is given as where N is the order of the filter and from (3) it is clear that the number of coefficients is to be optimized (N/2 + 1).The main objective of FIR filter design is to find the filter coefficients in optimized way that results in optimum filter.The filter is optimum, when maximum weighted error is minimized.In the PM algorithm [15], an approximate error function is defined by where ( ) ( ) are the frequency responses of the designed approximate filter and ideal filter respectively.The weighting function,

( )
G ω , is used to provide the approximation error differently in different frequency bands.For an ideal LP filter, ( ) where c ω is the cutoff frequency.In this paper we consider two fitness functions for designing LP FIR Filter ( ) where F p and F s are the closed subsets 0 ≤ ≤ , respectively.The other fitness function is used to control the ripples in pass band and stop band separately, and is given as where p ω and s ω are the pass band and stop band normalized cutoff frequencies.

Particle Swarm Optimization (PSO)
PSO is inspired by the observation of social behavior of bird flocking and fish schooling.This powerful global optimization technique was first found by Kennedy (a social psychologist) and Eberhart (an electrical engineer) in 1995 [17].PSO is simple, fast, requires less storage and can be coded in few lines.In PSO every particle remembers its best solution ( ) best i X as well as the group's best solution ( ) best X .It means that PSO have good memory.The PSO is worked on the concept of "constructive cooperation" between particles, so that it is easily able to solve multidimensional optimization problems.In PSO global optimum is achieved by an iterative procedure.The PSO technique is based on the five basic principles of the swarm intelligence [18].These are, Proximity, i.e., the swarm must be able to perform simple space and time computations.Quality, i.e., the swarm should be able to respond to quality factors in the environment.Diverse response, i.e., the swarm should not commit its activities along excessively narrow channels.Stability, i.e., the swarm should not change its behavior every time the environment changes.Adaptability, i.e., the swarm must be able to change its behavior, when the computation cost is affordable.PSO starts with a population of random particles (potential solution) in a D-dimension space.A position 'X' and velocity 'V' are associated with each particle.The position and velocity of the th i particle are given as ( ) , , , The velocity and position are updated according to the formula given as ( ) ( ) where best i X and best X is the individual best and global best positions respectively, i X is the current position of the th i particle, n+1 and n denote the current and the previous iterations, rand 1 and rand 2 are random numbers in the range [0,1].These random numbers are update every time they occur.C 1 and C 2 are the two positive constants, called cognitive and social acceleration factors respectively and n ω is the inertia weight in the th n iteration.A linearly damped inertia weight is preferred for better convergence [19].
The PSO algorithm for filter designing is as follows: 1) Define the filter specifications, fitness function, and population size and set the boundaries, i.e. maximum and minimum value of coefficient.
2) Initialize a population array of particles with random positions and velocities in the problem space.
3) For each particle, Compare particle's fitness evaluation with its 4) Update the velocity according to (10) and Move each particle to new position according to (11).5) Loop from 2 -4 until stopping criterion is satisfied.6) Output is the coefficient of the desired filter (N/2 + 1).

Dynamic and Adjustable Particle Swarm Optimization (DAPSO)
In order to improve the performance of PSO and maintain the diversities of the particles, a novel algorithm called Dynamic and Adjustable Particle Swarm Optimization (DAPSO) is proposed [20].The distance from each particle to the best X position is calculated in order to adjust the velocity suitably of each particle by using following function ( ) where di X is the position of th i particle, and d FD is the furthest distance from the particle to best X .This algorithm follows the same steps as PSO but a little change at step 4. In this algorithm velocity is updated according to the formula given as 0.5 Then this new velocity value put into (11) and updates the position.Finally it gives the desired filter coefficients.

Particle Swarm Optimization with Variable Acceleration Factor (PSO-VAF)
A novel PSO with variable acceleration factor (PSO-VAF) has been proposed [21].In this algorithm a modification has been made with C 1 and C 2 , acceleration factors appears in (10).C 1 has been allowed to decrease from its initial value of C 1i to C 1f while C 2 has been increased from C 2i to C 2f using the following equation ( ) Then in this case velocity update formula is given by ( ) ( ) The rest of the algorithm follows the same steps as given in PSO.

Design Examples and Discussion
In this section, we demonstrate the use of the PSO, DAPSO and PSO-VAF to design a 20 order low pass FIR fitter.All the simulation results shown in this paper, has been made on MATLAB 7.10.The specifications of the filter to be designed using these algorithms are: .Table 1 shows the parameters and its corresponding value consider during this work.
Figure 1 shows the frequency response in dB of the LP FIR filter designed using PSO, DAPSO, and PSO-VAF in the case of fitness1.On the same plot, the same filter designed using the PM is also shown.The main purpose behind using the fitness1 is to find the possible minimum ripples in pass band and stop band in case of PSO, DAPSO and PSO-VAF.Figure 2 shows the frequency response in dB of the LP FIR filter in the case of fitness2.Fitness2 is able to control the ripples in both bands separately.Table 2 and Table 3 show the optimized coefficients of LP FIR using fitness1 and fitness2, respectively.Figure 3 shows the normalized plot of LP FIR using fitness2.Figure 4 and Figure 5 shows the normalized plot of pass band and stop band ripples, respectively in case of fitness2.The simulation results for fitness2 shows that PSO gives 30.90dB stop band attenuation and DAPSO gives 32.32dB stop band attenuation.PSO-VAF results in 33.07dB stop band attenuation.Hence result quality is improved as indicated in Table 4.

Conclusion
In this paper, the application of PSO and its two new variants, DAPSO and PSO-VAF, to design linear phase low pass FIR filter, have been carried out.Comparison of results of PM, PSO, DAPSO and PSO-VAF has been made.It is analyzed that the performance of DAPSO is better than PSO in context of stop band attenuation.On the other hand, PSO-VAF provides better stop band attenuation as compared to both, PSO and DAPSO.The convergence behavior of the algorithms is also compared and it is examined that PSO-VAF quickly converge with very low error fitness value.Two fitness functions are considered.The obtained results show that fitness2 is the better choice for designing optimal digital low pass FIR filter.

[ 16 ]
. The first fitness function is used to design optimum filter, means finding the possible minimum ripples in both, pass band ( ) p δ and stop band ( ) s δ .This fitness function is given as ( )

Figures 6 - 8
Figures 6-8shows the convergence behavior of PSO, DAPSO and PSO-VAF respectively.These plots provide the error fitness value of the algorithms with number of iterations.PSO converges to the minimum error fitness value of 0.9392 in 55.39 sec.DAPSO converges to the minimum error fitness value of 1.129 in 35.92 sec.PSO-VAF converges to very low error fitness value of 0.0581 in 17.38 sec.PSO-VAF converges very fast as compare to the PSO and DAPSO in finding the desired filter coefficients.

Figure 1 .
Figure 1.Frequency Response of LP FIR using Fitness 1.

Figure 2 .
Figure 2. Frequency Response of LP FIR using Fitness 2.

Figure
Figure Normalized Plot of LP FIR using fitness 2.

Table 2 .
Optimized Coefficient of LP FIR using Fitness1.

Table 3 .
Optimized Coefficient of LP FIR using Fitness 2.