Design of FIR Filter Based on Adaptive Window

There are several windows used for truncated the impulse response in order to fixed the filter size. Kaiser window is the most important type and from it is possible to generate other types of windows depending on the value of α. The proposed adaptive Finite Impulse Response (FIR) Filter is designed and implemented to merge many filter parameters. The results are obtained in different window sizes and different attenuations. These results indicate good performances during the implementation of the filter. This filter is stable and linear phase when implement in non-recursive form, and the ample hardware support that exists for them among other reasons. The Kaiser window provides a simple to calculate set of window coefficients, whose parameters can be adjusted to produce the desired maximum side lobe levels for the near minimal filter length.


Introduction
The basic idea behind the Window method of filter design is that the ideal frequency response of the desired filter is equal to 1 for all the pass band frequencies, and equal to 0 for all the stop band frequencies, and then the filter impulse response is obtained by taking the Discrete Fourier Transform (DFT) of the ideal frequency response.
Many researches focus on this field like; Hime A. et al. are presented an adopted numerical optimization algorithm that based upon the well-known simulated annealing paradigm and its implementation, also this work considered the factors to FIR filters to frequency domain specifications (Hime A. Et al., 2009).A. A. Lanne et al. are illustrated the interpolated finite impulse response filters that make it possible to create a narrowband low pass filters with reducing computational load.The filter introduced a significant filter gain (A. A. Lanne et al., 2009).A. A. Lanne et al. are realized a specific hardware implementation of a digital filters assuming minimization of computational expenses via decreasing the number of multiplier as possible (A. A. Lanne et al., 2009).Hadi Sadoghi et al. are introduced an adaptive analog filter design with application in adaptive echo cancellation.This system proved that analog LMS filter coverage faster than digital LMS adaptive filter (Hadi Sadoghi et al., 2009).Anton Blad et al. are considered the FIR filter structures that implemented on the efficient pipelined high speed reduction of the moderate number of partial product.The algorithm was used to optimize filter realization using many architectures (Anton Blad et al., 2010).Raija Lehto et al. are implemented a method to synthesize wide band linear phase FIR filters with a piecewise polynomial sinusoidal impulse response.This approach is more efficient for Hilbert transforms than for frequency selective filters (Raija Lehto et al., 2010).Y. C. Lim et al. are proposed a very low complexity frequency-domain analog speech scrambler having high-quality speech reconstruction.The implemented filter has low computational complexity and narrow transition width (Y.C. Lim et al., 2010).Ying Wei et al. are focused on computational efficient filter structures based on frequency response masking technique for the synthesis of arbitrary bandwidth sharp finite impulse response filters (Ying Wei et al., 2010).Ya Jun Yu et al. are implemented a technique that is capable of designing long filters optimizes filter coefficients in prespecified sub expression spaces.This technique achieved the filter with fewer adders (Ya Jun Yu et al., 2010).Linnea Rosenbaum et al. are introduced two classes of cosine modulated causal and stable filter banks with near perfect reconstruction (NPR) and low implementation complexity.These classes are preferable for different type of specifications (Linnea Rosenbaum et al., 2010).
Unfortunately, the filter response would be infinitely long since it has to reproduce the infinitely steep discontinuities in the ideal frequency response at the band edges.To create a Finite Impulse Response (FIR) filter, the time domain filter coefficients must be restricted in number by multiplying by a window function of a finite width.Many windows are used for truncation the signal and the simplest window function is the rectangular window which corresponds to truncating the sequence after a certain number of terms.

FIR Filter Design
FIR filters are widely used due to the powerful design algorithms that exist for them.The main aspect of FIR filter design is to generate an adequate number of filter coefficients that reach an optimal design.The most papers and researches are concentrated on analog Low Pass Filter (LPF) then generate the digital LPF and then generate the other types of digital filters; High Pass Filter (HPF), Band Pass Filter (BPF), and Band Stop Filter (BSF).
A complete procedure for the design of FIR filters are as follows:  Specifications of the filter.
 Choosing an appropriate linear phase filter type.
 Choosing the method of design such as window.
 Calculation the filter coefficients (impulse response).
 Finding suitable structure  Analysis of the finite word length effects.
 Implementation of the filter in hardware and/or software.
The design of a FIR filter starts with its specifications in either discrete-time domain or DTFT frequency domain, or both.In the time domain, the design objective is the impulse response.In the frequency domain, the requirement is on various parameters of the magnitude response, shown in Figure ( 1) for a low pass filter.

Types of Windows
There are different types of windows starting from simple type (rectangular window) to more complex type (Kaiser window).The main goal of these windows is to truncate the impulse response of the filter in order to generate fixed length filter.These windows are illustrated as below and are shown in figure (2):  Modified Bartlett-Hann window, this window is a linear combination of weighted Bartlett and Hann windows with near side lobes lower than both Bartlett and Hann and with far side lobes lower than both Bartlett and Hamming windows. Bartlett window, The Bartlett window is very similar to a triangular window as returned by the triangular function.The Bartlett window always ends with zeros at samples 1 and n, however. Blackman window, Blackman windows have slightly wider central lobes and less sideband leakage than equivalent length Hamming and Hann windows. Blackman-Harris window, the window is minimum in the sense that its maximum side lobes are minimized.
 Bohman window, a Bohman window is the convolution of two half-duration cosine lobes.In the time domain, it is the product of a triangular window and a single cycle of a cosine with a term added to set the first derivative to zero at the boundary. Chebyshev window, Chebyshev window whose Fourier transform side lobe magnitude is r dB below the main lobe magnitude.The default value for r is 100dB. Flat Top weighted window, Flat Top windows have very low passband ripple (< 0.01 dB) and are used primarily for calibration purposes.Their bandwidth is approximately 2.5 times wider than a Hann window. Gaussian window, the shape of this window is similar in the frequency domain because the Fourier transform of a Gaussian is also a Gaussian. Hamming window, hamming window is optimized to minimize the maximum (nearest) side lobe, giving it a height of about one-fifth that of the Hann window, a raised cosine with simpler coefficients. Hann (Hanning) window, hanning window has the shape of one cycle of a cosine wave with 1 added to it so it is always positive. Nuttall-defined minimum 4-term Blackman-Harris window, the coefficients for this window differ from the Blackman-Harris window coefficients are computed with slightly lower side lobes. Parzen (de la Valle-Poussin) window, Parzen windows are piecewise cubic approximations of Gaussian windows. Rectangular window, this function is provided for completeness; a rectangular window is equivalent to no window at all.
 Taylor window, Taylor windows are similar to Chebyshev windows.While a Chebyshev window has the narrowest possible main lobe for a specified side lobe level, a Taylor window allows you to make tradeoffs between the main lobe width and side lobe level. Triangular window, the triangular window is very similar to a Bartlett window.The Bartlett window always ends with zeros at samples 1 and L, while the triangular window is nonzero at those points. Tukey window, Tukey windows are cosine-tapered windows.

Kaiser Window
The Kaiser window has an additional ripple parameter α, enabling the designer to tradeoff the transition and ripple.It is defined in the interval -M≤n≤M, and otherwise it is zero.The Kaiser Window equations are mentioned as below: Measure the ripple (δ) and then calculate the attenuation as below:

Proposed FIR Filter Algorithm
It is important to distinguish between the meanings of filter length and filter order.The filter length is the number of impulse response samples in the FIR filter.
Generally, the impulse response is indexed from n = 0 to n = M-1, where M is the filter length.The filter order is the highest power in a z-transform representation of the filter.For an FIR transfer function, this representation is a polynomial in z, where the highest power is z M-1 and the lowest power is z 0 .The filter order is one less than the length (M-1) and is also equal to the number of zeros of the z polynomial.
The steps of the proposed filter algorithm are shown in figure (3) and implemented as below: Step1: calculate the ripple (δ), considering pass band ripple equal to stop band ripple.
Step2: calculate the attenuation according to the measured ripple.
Step3: calculate the transition width (TW) according to the number of coefficients.
Step4: calculate the filter length according to the transition width.
Step5: calculate the zero order Bessel function I 0 (x) according to its value.
Step6: calculate the Kaiser Window elements.
Step7: calculate the filter coefficients according to the cutoff frequency.
Step8: truncate the filter coefficients with the Kaiser Window.

Results and Analysis
The implemented proposed FIR filter algorithm are tested for different values attenuation to generate different values transition width, in which the filter length is calculated, then the filter coefficients are designed and implemented.First of all the filter parameters must be selected to start the design FIR low pass filter, these parameters are maximum frequency is 600Hz, sampling frequency 4096Hz, and the window length is 11. Figure (4) shows the impulse response of the generated filter with 11 elements and its frequency response of big main lobe with minimum value of side lobes of about -50dB magnitude.The selected attenuation is 21dB, so the generated transition band width is 371Hz.In this case the window length is fixed, and in the other hand the attenuation value is increased gradually.Figures (5,6,7,8 & 9) show the impulse response and their spectrums of implemented filters with respect of the attenuation values of 30dB, 40dB, 50dB, 60dB, and 70dB respectively.These filters are designed to generate transition bandwidth of values 628Hz, 913Hz, 1198Hz, 1483Hz, and 1768Hz respectively.
Figure (10) shows the impulse response of the generated filter with 11 elements and the attenuation value is 21dB, so the generated transition band width is 371Hz and it is similar to the filter shown in figure (4).In this case the attenuation value is fixed, and in other hand the window length is increased gradually.Figures (11, 12, 13, 14, & 15) show the impulse response and their spectrums of implemented filters with respect of the window length values of 21, 31, 41, 51, and 61 respectively, so the generated transition band widths are 185Hz, 124Hz, 93Hz, 74, and 62Hz.

Conclusion
The proposed adaptive Finite Impulse Response (FIR) Filter is designed and implemented to merge many filter parameters.The implemented filter is concentrated on the Kaiser Window parameters.Kaiser window is a flexible on in which it possible to obtain some other type of windows.The obtained results indicate that the implemented filter has good performances and stable, and during the implementation of various cases it is possible to reach an optimal design used for final design.

Figure 1 .Figure 6 .
Figure 1.Typical normalized magnitude response specifications of a low pass filter