The FIR Filter Design based on Genetic Algorithm

Especially, in the signal and image processing fields of electronics, filters are most often used parts. Also, rapid advances in digital systems have expanded the use of digital filters. Therefore, it is very important to understand and learn the filters and calculation of their coefficients. Thus, in this work, interactive graphical user interface software which can be used for educational purposes and also accessible via the Internet is designed in the MATLAB environment. In the software, genetic algorithm, which is one of the popular methods in recent years, is used for designing the Finite Impulse Response (FIR) filters. In this program, when the parameters of filter, which will be designed, are entered by the user, the coefficients are obtained from genetic algorithms, and many features of the filter are presented numerically and graphically. Thus, the FIR filter design can easily be carried out for practical or educational purposes using the software. Further, the superiority of the genetic algorithm over the classical design in this field has been shown by comparing the obtained filter coefficients for both methods.


I. INTRODUCTION
ILTERING is a fundamental process in the field of electrical and electronics including signal and image processing.Analog and digital filters are used in this field for selecting the desired frequencies, suppressing the undesired noises etc. Rapid advances in the digital electronics have increased the use of digital filters as well as advantages of them.Amongst the advantages of the use of digital filters, low costing, adjusting or changing the filter parameters or structures using only software etc. can be counted.Thus, Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters have established themselves in very general application areas.
Today, there are many methods available for obtaining the FIR or IIR filter coefficients [1][2][3][4].It is required to design higher degree filters for obtaining almost ideal frequency responses.On the other hand, increasing the degree of the filters brings many difficulties in the design processes.
Genetic Algorithms (GA) are one of the heuristic calculation methods and they have reached the solutions by producing the values from different search points.Also they have used for the situations where the classical calculation methods are insufficient or different solutions ways are required [5][6][7][8].Similarly, using genetic algorithms to obtain filter coefficients is located in [9][10][11][12].In the proposed work, both the classical methods and genetic algorithms have been used for calculation of the FIR filter coefficients.
In this context, the simulator program, which can also be used for educational purposes, has been designed to operate offline.Some parts of the program have been designed using the MATLAB GUI [13] that works offline.In the developed software, FIR filter coefficients can be calculated using both the classical methods and the genetic algorithms in accordance with the criteria set by the user.Many features of the resulting filters such as the list of coefficients, the amplitude response, phase response, unit impulse response, unit step response, root locus, group and phase delays and so on can be displayed both numerically and graphically.This program is also very easily be used for educational purposes.In the program, animation aided filter design theory is presented and students can easily see the effects of the parameters to the filters by simply changing the coefficients.So, the FIR filter design can easily be carried out by using genetic algorithms for whether theoretical or practical purposes, whether offline or online on the web environment.
While the FIR filter designs are summarized in the second part of the paper, the third section provides information on genetic algorithms.The Fourth section gives information about the developed simulator together with the comparative simulation examples.Finally, the results are summarized in the fifth section.

II. FIR FILTER DESIGN
Finite impulse response and linear phase characteristic is given as in the Fig. 1.Its output can be obtained by using; ( Filter coefficients can be symmetric or asymmetric according to the center value.Four different types of designs may be carried out (

Filter
Center coefficient Other coefficients Genetic algorithms, which is a heuristic method based on the nature of evolutionary / biological process, is developed and used for the first time in 1975.The genetic algorithms, which are a part of evolutionary computation, are an iterative and probabilistic solution method that emerges by modeling the relevant process.They use random search techniques for the solution and they are based on the parameter encoding.The genetic algorithms are used in the solution of optimization problems from different fields, such as in the information systems, in the machine learning and so on [5], [14].Stages of the solution with genetic algorithms can be summarized as in the Figure 2.

IV. DESIGNED SIMULATOR AND SIMULATIONS
In this study, an offline and online working FIR filter design simulator has been developed.The main screen capture of the simulator software that works offline is given in Fig. 4. In this module, the filter (LPF, HPF, BPF and BSF) and the coefficient type (symmetrical, asymmetrical) are selected and their parameters (filter order, sampling frequency, the lower / upper cut-off frequency) are entered.By arranging the genetic algorithm settings using main menu options of the simulator(population size, the fitness scaling function {linear, proportional, top, rank}, selection function {remainder, uniform, roulette, tournament, stochastic uniform}, mutation function {uniform, Gaussian, adaptive}, crossover function {heuristic, intermediate, single point, two point, arithmetic, scattered} and crossover fraction), desired FIR filter design using both the classical methods and genetic algorithms can be obtained in the simulator.In this work, a simulator program has been developed for designing the FIR filters.Developed software allows user to design the FIR filter using the classical and genetic algorithm methods.It offers many features of the filter both graphically and numerically.Filters with the desired characteristics can be designed and compared quickly, effectively, and easily by using this software and thus it can also be used for educational purposes.As a future work, it is considered to include IIR filter design module.

Fig. 4 .
Fig. 4. Main screen capture of the offline working simulatorFirst of all, fitness functions are prepared for obtaining the selected filter coefficients using the genetic algorithms.Optimization procedure can be implemented after the genetic algorithm settings/options are organized.For example, the MATLAB codes are given in Fig 5accordingto LPF equations, which are given in Table2, and the optimization result is given in Fig 6.

TABLE 2 .
IDEAL FIR FILTER COEFFICIENTS