Design of Linear Phase High Pass FIR Filter using Weight Improved Particle Swarm Optimization

The design of Finite Impulse Response (FIR) digital filter involves multi-parameter optimization, while the traditional gradient-based methods are not effective enough for precise design. The aim of this paper is to present a method of designing 24th order high pass FIR filter using an evolutionary heuristic search technique called Weight Improved Particle Swarm Optimization (WIPSO). A new function of the weight parameters is constructed for obtaining a better optimal solution with faster computation. The performance of the proposed algorithm is compared with two other search optimization algorithms namely standard Genetic Algorithm (GA) and conventional Particle Swarm Optimization (PSO). The simulation results show that the proposed WIPSO algorithm is better than GA and PSO in terms of the magnitude response accuracy and the convergence speed for the design of 24th order high pass FIR filter. Keywords—Finite impulse response filter; evolutionary optimization; particle swarm optimization; fitness function; genetic algorithm; high pass filter; impulse response


I. INTRODUCTION
Digital filtering is one of the main fundamental aspect of digital signal processing, so digital filters are used in many applications such as seismic signal processing systems, biomedical applications systems, audio and video processing systems, and communication systems.In general, filters serve two purposes: the first is signal separation, which is applied when the desired signal is corrupted with another unwanted signal such as noise, and the second purpose is signal restoration, which is applied when the desired signal is distorted for some reason.A digital filter can be described as a mathematical algorithm which is implemented in hardware or software for achieving the objectives of the filtering process [1].
Digital filters can be utilized to process very low-frequency signals, such as those happen in seismic and biomedical applications in an effective manner.Moreover, the digital filters characteristics can be easily modified or altered through a control software that handles the content of the registers to meet the new specifications.Hence, a single programmable digital filter can be employed to implement multiple filtering functions without the need to add additional hardware components [2].
Based on the type of impulse response, the digital filters can be classified as Finite Impulse Response (FIR) filters and Infinite Impulse Response (IIR) filters.In case of an FIR digital filter, the impulse response is decay and settle to zero within a finite length of time.But, the impulse response for an IIR digital filter never dies out [3,4].FIR filter has a number of good features that make it an attractive choice for many researchers in various fields.FIR filters are inherently stable, and usually guarantee a linear phase response.This is due to the fact that FIR filter requires no feedback and all the poles are located within the unit circle [5,6] Hence, digital FIR filters are easily designed and simply implemented.FIR filters are also referred to as feed-forward or non-recursive filters.
The recent approaches used in the design of FIR filters utilize evolutionary techniques that have been proven to be efficient in multidimensional nonlinear environment [7] such as Genetic Algorithm (GA) [8], Differential Evolution (DE) [8], Simulated Annealing (SA) [9], Particle Swarm Optimization (PSO) [10,11] and so on.In this work, the conventional PSO algorithm has been improved to overcome the constraints encountered in the filter design problem.This paper presents a new method for designing the HP FIR digital filter using Weight Improved Particle Swarm Optimization (WIPSO) approach.
The rest of the paper is organized as follows.The HP FIR filter design problem is described in section 2. In section 3, Different optimization algorithms namely, GA, PSO, and WIPSO are briefly discussed.Simulation results and comparative analysis of HP FIR filter design problem using GA, PSO, and WIPSO are presented in section 4. Finally, section 5 contains the conclusions drawn from the results evaluation..

II. FIR FILTER DESIGN PROBLEM
The design of digital FIR filter of length N with an inputoutput relationship can be described by the following difference equation [12]: Where (b k ) represents the filter coefficients set.The output y(n) is a function only of the input signal x(n).FIR filter can also be characterized by its transfer function as follows:.

( ) ∑ ( )  n= 
Where the coefficients h(n) represent the impulse response of finite length and N represents the filter order.Thus, the www.ijacsa.thesai.orgnumber of coefficients will be (N +1).The type of the filter for a pass or attenuate e.g.high pass, low pass, band pass, etc. is determined by the filter coefficients h(n) that are to be specified in the design steps.When the coefficients of FIR filter are symmetrical around the center coefficient, the FIR filter is linear-phase In another word, the coefficients number that is actually optimized is (N/2+1), which is equal to 13 in this work.In (2), the coefficient vector {h 0 ,h 1 ,...,h N } is represented by the particles positions in (N+1) dimensional search space of PSO algorithm.Hence, in each cycle of the evolutionary algorithm, these particles find new positions to be the new coefficient vector of the transfer function.The following equation describes the FIR filter frequency response [13,14]: Where , .
For ideal HP filter, the following equation defines the filter response: Where ω c is the cut-off frequency as shown in figure 1.By sampling the frequency in the range [0, π] with L points, we get the following equations: Where ( ) and ( ) are the frequency response of the designed and ideal filter respectively.So, the error function ( ) is defined by the following equation: Then, the error function above has been utilized for obtaining the fitness function as follows:

A. Genetic Algorithm (GA)
Genetic algorithm is basically a heuristic search method that can be employed to find an optimum solution for optimization problems depending on evolution and natural selection principles.Genetic algorithm manipulates a population of individuals at each iteration (cycle) where each individual, which is known as a chromosome, is a coded string of a probable solution of the optimization problem.Chromosomes are usually of a fixed length and constructed over some particular alphabet.Each chromosome of the population represents one candidate solution to the evolution function of the optimization problem according to its fitness value, which is calculated by a function called fitness function.A standard GA can be summarized by the following steps [15]: Particle swarm optimization (PSO) is an evolutionary computation optimization algorithm inspired by social behavior of a swarm of bird in searching of food.The PSO technique was originally introduced by Kennedy and Eberhart in 1995 [16].The key features of PSO are the ease of implementation, robustness to control parameters and effectiveness of computation compared with other existing probabilistic search algorithms.Additionally, PSO has the ability to handle problems with vast search space and nonlinear objective function and giving better results within a reasonable amount of time.
PSO algorithm operates with a random population of individuals called a swarm, where each individual in the swarm is called a particle.The fitness value of each particle in the swarm is calculated iteratively through the search space at different locations by using a pre-defined fitness function.Hence, each particle in the search space has the experience to know its best value so far (pbest) or local best.Moreover, each particle vector, which is represent the coefficient vector {h 0 ,h 1 ,...,h N } in FIR filter design problem, knows the best value so far in the group (gbest) among pbests.As a result, the best solution is improved by particle's movement in the search space through the generations.Each particle tries to adjust their velocity and position based on the best encountered positions through the search space by using these two equations [17,18]: Where and are the velocity and position of the ith particle at the kth iteration respectively; w is the inertia weight; www.ijacsa.thesai.orgrand 1 and rand 2 are random numbers in the interval [0,1]; c1 and c2 are constants usually having the same value, known as cognitive and social acceleration factors respectively.The factors and help the particles to reach the gbest, while the inertia weight determines the exploration size through the search space so that a large inertia weight causes large exploration and vice versa [19][20][21].

C. Weight-Improved Particle Swarm Optimization (WIPSO)
The capability of the global search of conventional PSO has been improved by modifying the weight parameter, cognitive factor, and social factor.This improved PSO is called as Weight-Improved Particle Swarm Optimization (WIPSO).Hence, the velocity equation that is described in (9) has been rewritten as [22,23]: ) Where:  Here, w min and w max are the initial and final values of inertia weight respectively, iter represents the current number of iterations, iter max represents the maximum number of iterations.

IV. RESULTS AND COMPARISON
For evaluating the performance of the proposed method for FIR filter design, two optimization algorithms namely GA and PSO in addition to the proposed WIPSO have been carried out using MATLAB simulation.The proposed WIPSO algorithm has been applied to the design of 24th order (25-tap) high pass FIR filter with cut-off frequency = .Hence, the coefficient vector length will be 25.The control parameters values are chosen for GA, PSO, and WIPSO algorithms are shown in table I.
The main objective of the proposed modification of the conventional PSO is to minimize the fitness function in (8).A wide range of control parameters values of the PSO algorithm have been chosen to show the effect of changing these parameters on the optimization process, and to choose the best parameters values for WIPSO algorithm.Figure 4 shows the effect of inertia weight (w) changing on the fitness function value.Figure 5 displays the relation between the fitness function value and the (cognitive (c1) & social (c2)) learning parameters.Based on Fig. 4 and Fig. 5, it can be seen that the range (from 0.6 to 0.9) is a good choice for w and the range (from 0.1 to 1.3) is a good choice for c1 and c2 for the linear www.ijacsa.thesai.orgphase HP FIR filter design.With these above ranges of w,c1 and c2, the PSO will have higher chance to find the optimal filter coefficients within a reasonable time.Depending on Fig. 4 and Fig. 5, the control parameters values (w,c1,and c2) of the conventional PSO algorithm have been chosen to be (0.7, 0.4, and 0.4) respectively and the control parameters values ( , , , , , and ) of the proposed WIPSO algorithm have been chosen to be (0.6, 0.9, 0.1, 1.3, 0.1, and 1.3) respectively.Figure 10 represents the magnitude response comparison for the conventional PSO, the standard GA and the proposed WIPSO drawn from the optimized coefficients for the designed 24th order high pass FIR filters.Depending on Fig. 10, the magnitude response is much better achieved by WIPSO in terms of transition width, pass-band ripple and stop-band attenuation than by GA and PSO.Table II shows the bestoptimized HP FIR filter coefficients of order 24 obtained by GA, PSO, and WIPSO.

V. CONCLUSIONS
In this work, the proposed weight improved particle swarm optimization (WIPSO) algorithm is applied to solve the design problem of the high pass FIR filter.The WIPSO performance is compared with two other algorithms namely standard GA and conventional PSO.The experiments clarify that the proposed WIPSO method outperforms the GA and the PSO in terms of the magnitude response accuracy and the convergence speed.Additionally, simulations have been performed to demonstrate the influence of changing the PSO design parameters to determine the best parameters values for the proposed WIPSO method.It is concluded that the proposed WIPSO method with the inertia weight (w) in the range from 0.6 to 0,9 and the (cognitive (c1) & social (c2)) in the range from 0.1 to 1.3 will have a better performance in HP FIR filter design problem.
Randomly create an initial population of chromosome strings  Evaluating fitness values of population strings  Selection of elite strings  Copying process of the elite strings is applied to the non-chosen chromosome strings  Producing the off-springs by applying crossover and mutation operators  Updating of the genetic cycle starting with the second step  Stopping the iteration when the termination condition is met B. Particle Swarm Optimization (PSO)
max , c1 min represent the initial and final values of cognitive factors respectively.
c2 max , c2 min represent the initial and final values of social factors respectively.The flow chart of the proposed WIPSO-based HP FIR filter design is depicted in figure 2.

Figure 3
Figure 3 shows characteristics of three weight parameters, where, line a represents a constant weight, line b represents the weight parameter of (13) and line c describes our proposed weight parameter expressed by(12).

Figures 6 ,
Figures 6, 7, 8 and 9 represent the convergence behavior, amplitude response, filter coefficients & Impulse Response, and magnitude & phase response of the Weight Improved Particle Swarm Optimization (WIPSO) based 25-tap linear phase HP FIR filter.

TABLE I .
CONTROL PARAMETERS FOR GA, PSO AND WIPSO

TABLE II .
24TIMIZED HP FIR FILTER COEFFICIENTS OF ORDER24