COMPARATIVE ANALYSIS OF EXPONENTIAL WINDOW FUNCTION FOR DESIGNING OF FIR FILTERS Susheel Kumar ECE Deptt.

Filters are very commonly found in everyday life and include examples such as water filters for water purification, mosquito nets that filter out bugs, bouncers at bars filtering the incoming guests according to age (and other criteria), and air filters found in air conditioners that we are sometimes a bit too lazy to change/clean periodically. Filters have two uses: signal separation and signal restoration. Signal separation is needed when a signal has been contaminated with interference, noise, or other signals. For example, imagine a device for measuring the electrical activity of a baby's heart (EKG) while still in the womb. The raw signal will likely be corrupted by the breathing and heartbeat of the mother. A filter might be used to separate these signals so that they can be individually analyzed. Signal restoration is used when a signal has been distorted in some way. For example, an audio recording made with poor equipment may be filtered to better represent the sound as it actually occurred [1, 2]. The main goal of this work is to study the exponential  window function and analyze a digital low pass FIR filter using the same in MATLAB. Properties of window functions is studied and frequeny domain responses of  window functions is obtained. Then FIR filter is designed using widow design method and its characteristics have also been studied in frequency domain. The performace comparison between LPFs designed using other well known windows like Kaiser, Exponential, Cosh and modified kaiser window is done and it has been intuitively shown that for a given order and transition width, the filter designed using Exponential window provides the worse minimum stop band attenuation but better far end attenuation than filter designed by well known Kaiser Window.


INTRODUCTION
Digital filters are the most important and frequently used elements in digital signal processing applications. The input signal is sampled and an analog-to-digital converter turns the signal into a stream of numbers. A computer program running on a CPU or a specialized DSP (or less often running on a hardware implementation of the algorithm) calculates an output number stream. This number stream is then filtered by convolving it with the impulse response of the Filter. The resulting number stream output can be converted into an analog signal by passing it through a digital-to-analog converter.
A digital filter is having several advantages: It is programmable, i.e. its operation is determined by a program stored in the processor's memory. This means the digital filter can easily be changed without affecting the circuitry (hardware). An analog filter can only be changed by redesigning the filter circuit. Digital filters are easily designed, tested and implemented on a general-purpose computer or workstation. The characteristics of analog filter circuits are subject to drift and are dependent on temperature. Digital filters do not suffer from these problems, and so are extremely stable with respect both to time and temperature. Unlike their analog counterparts, digital filters can handle low frequency signals accurately. As the speed of DSP technology continues to increase, digital filters are being applied to high frequency signals in the RF (radio frequency) domain, which in the past was the exclusive preserve of analog technology. Digital filters are very much more versatile in their ability to process signals in a variety of ways; this includes the ability of some types of digital filter to adapt to changes in the characteristics of the signal [3].
Digital filters are classified as finite impulse response (FIR) and infinite impulse response (IIR) filters based on the duration of their impulse response. IIR filters have infinite duration impulse responses; hence they can be matched to analog filters, all of which generally have infinitely long impulse responses. They have the feedback (a recursive part of a filter) as shown in figure 1 and are known as recursive digital filters. [4] The IIR filter transfer can be expressed as: (1) where b i are the coefficients of transfer function numerator (non-recursive part) and are the coefficients of transfer function denominator (recursive part)

Fig 1: Basic block of IIR filter
FIR filters are digital filters with finite impulse response. They are also known as non-recursive digital filters as they do not have the feedback (a recursive part of a filter is shown in figure 2), even though recursive algorithms can be used for FIR filter realization. [4] FIR filter transfer function can be given as: (2) where; N is the order of the FIR filter and the length of the filter equal to N+1.  FIR filters offer several advantages over IIR filters. We can easily design the FIR filter to meet the required magnitude response in such a way that it achieves a constant group delay. The phase response of a filter with a constant group delay is a linear function of frequency. It transmits all frequencies with the same amount of delay, which means that there will not be any phase distortion and the input signal will be delayed by a constant when it is transmitted to the output. A filter with a constant group delay is highly desirable in the transmission of digital signals. The samples of its unit impulse response are the same as the coefficients of the transfer function. There is no need to calculate h (n) from H (z −1 ), such as during every stage of the iterative optimization procedure or for designing the structures (circuits) from H (z −1 ).The FIR filters are always stable and are free from limit cycles that arise as a result of finite word length representation of multiplier constants and signal values. The effect of finite word length on the specified frequency response or the time-domain response or the output noise is smaller than that for IIR filters.
Although the unit impulse response h (n) of an IIR filter is an infinitely long sequence, it is reasonable to assume in most practical cases that the value of the samples becomes almost negligible after a finite number; thus, choosing a sequence of finite length for the discrete-time signal allows us to use powerful numerical methods for processing signals of finite length. [5]

WINDOW DESIGN METHOD
The desired frequency response of any digital filter is periodic in frequency and can be expanded in Fourier series, i.e.
In this method the desired frequency response specification , corresponding unit sample response is determined using the following relation: In general, unit sample response obtained from the above relation is infinite in duration, so it must be truncated at some point say n= N-1 to yield an FIR filter of length N (i.e. 0 to N-1). This truncation of to length N-1 is same as multiplying by the e.g. rectangular window, defined as: Thus the unit sample response of the FIR filter becomes Now, the multiplication of the window function with is equivalent to convolution of with , where is the frequency domain representation of the window function (7) Thus the convolution of with W (w) yields the frequency response of the truncated FIR filter (8) The frequency response can also be obtained using the following relation (9) But direct truncation of to N terms to obtain h (n) leads to the Gibbs phenomenon effect which manifests itself as a fixed percentage overshoot and ripple before and after an approximated discontinuity in the frequency response due to the non-uniform convergence of the fourier series at a discontinuity. Thus the frequency response obtained by using eq. (8) contains ripples in the frequency domain. In order to reduce the ripples, instead of multiplying with a rectangular window w (n), is multiplied with a window function that contains a taper and decays toward zero gradually, instead of abruptly as it occurs in a rectangular window. As multiplication of sequences and w (n) in time domain is equivalent to convolution of and W (w) in the frequency domain, it has the effect of smoothing .
The several effects of windowing the Fourier coefficients of the filter on the result of the frequency response of the filter are as follows: (1) The width of the transition bands depends on the width of the main lobe of the frequency response of the window function, w (n) i.e. W (w).
(2) Since the filter frequency response is obtained via a convolution relation, it is clear that the resulting filters are never optimal in any sense.
(3) As N (the length of the window function) increases, the main lobe width of W (w) is reduced which reduces the width of the transition band, but this also introduces more ripple in the frequency response.
(4) The window function eliminates the ringing effects at the band edge and does result in lower side lobes at the expense of an increase in the width of the transition band of the filter [8].

EXPONENTIAL WINDOW FUNCTION
Comparing Hann and Bartlett-Hanning windows, it is obvious that both of them have the same transition region, but the Bartlett-Hanning window has higher attenuation. There is one more thing of concern which says that the minimum stop band attenuation depends on the specified window, whereas an increase in filter order affects the transition region. All this leads us to the conclusion that the window functions are not optimal. An optimal window is a function that has maximum attenuation according to the given width of the main lobe. The optimal window is also known as Kaiser Window. Its coefficients are expressed as: - where and Where the minimum stop band attenuation and is the width of (normalized) transition region. The order of bandpass and band-stop filters, obtained from the expression above, should be multiplied by 2.The value of parameter β can be obtained from the table In order to design an optimal Kaiser filter it is necessary to know normalized width of transition region as well as minimum desirable stop band attenuation [4]. Also Bessel and exponential function have same shape characteristics. Hence at the place of Bessel function we can use exponential function in Kaiser Window and we got exponential window. Exponential window function can be expressed as: = 0 otherwise

RESULTS & DISCUSSIONS
As we have analyzed the performace of an FIR filter using Exponential Window, so first of all the plots regarding window function are being shown.

COMPARISON OF EXPONENTIAL & BESSEL FUNCTION
From the figure 3, it is clear that zero order Bessel function of first kind (Io(x)) have the same characteristics (used in the Kaiser Window for impulse response calculations) as that of exponential function. So we can use exponential function at place of zero order Bessel function of first kind, which provides exponential window. Exponential window function can be expressed as:

Fig 3: Similar shape characteristics of exponential function {exp(x)} and Bessel function {Io(x)}
Bessel function can be calculated as: From the eq. (14), we can observe that Bessel function is calculated up to twenty terms. In the figure 3, blue line represents shape characteristics of Bessel function and black line represents shape characteristics of Exponential function. From the figure it is clear that both the functions have characteristics curves, hence we can use exponential function at the place of Bessel function (used in Kaiser Window). But exponential function provides better results because it converges fast.

ANALYSIS OF SPECTRAL PROPERTIES OF EXPONENTIAL WINDOW Fig 4: Exponential window spectrum for alpha=0, 2, 4 and N=51
The normalized spectrum of exponential window (in dB) can be obtained by: where is amplitude spectrum Figure 4 shows the frequency spectrum of exponential window for a fixed value of filter length N=51. On the x axis normalized frequency (radian per second) is taken and y axis shows gain (db). The parameter alpha =0 corresponds to the rectangular window. From figure, it can be easily seen that, when alpha increases then the main lobe width increases and ripple ratio decreases. Also with the increase in the alpha parameter far end attenuation (value of the attenuation in the last ripple) also increases. In the table 2 we listed the various values of attenuation obtained from the spectrum of the exponential window. MSA is the attenuation of the first ripple of the window and FSA is the far end attenuation. Figure 5 shows the spectral characteristics for the ideal low pass filter. In this case we fix the value on N = 127. For the graph it can be easily observed that ideal filter provides constant gain in the pass band and then has a sharp transition from pass band to stop band at cut off frequency. For the nonrecursive filter design, we multiply this ideal filter with the corresponding window function in the frequency domain and obtain the desire filter with the given specifications.

SPECTRAL ANALYSIS OF IDEAL LOW PASS FILTER
332 | P a g e w w w . c i r w o r l d . c o m

AMPLITUDE SPECTRUMS OF THE FILTERS DESIGNED BY THE EXPONENTIAL WINDOW
Now we analyzed a low pass filter by using exponential window function and studied its spectral properties. For a low pass filter, we perform convolution between the ideal low pass filter function and the exponential window function. Figure 6 shows the spectrum of the filter designed by using the exponential window. In this case we fix the length of the filter as N= 127, by taking the fix value of length we vary the value of the alpha parameter (0, 2, 4) and obtained the different spectral curves. We can observe from the figure that as the value of alpha increase minimum stop band attenuation provides better results (means stop band attenuation increases). But transition width of the filter increases.

Fig 6: Amplitude spectrum of the filter designed by Exponential window
For a filter we need maximum value of the minimum stop band attenuation and minimum value of the transition width. So to design a best filter we should choose an optimum value for the two tradesoff parameters.  Table 3 shows the values of transition width ( ) and minimum stop band attenuation (As). Transition width is calculated with the help of eq. (16) and (17). Here D is the normalized transitions width and Ws is the sampling frequency.

FILTER DESIGN EQUATIONS
To find the suitable window which satisfies the given prescribed filter specification, we obtain the relation between the window parameters and filter parameters. Figure 7 shows the relation between Exponential window parameter, and the minimum stop band attenuation, for N=127. From figure, it is clear that as the window parameter increases, the minimum stop band attenuation also increases.

Fig 7: Relation between alpha and minimum stop band attenuation
By using the quadratic polynomial curve fitting method, the first design equation is obtained as - The second filter design equation is the relation between minimum stop band attenuation and normalized width, D,which is required to find the minimum length of the filter. The normalized width parameter can be calculated by the following equation (19) Where is transition bandwidth The relation between D and is shown in figure 8, which shows that the filters designed by Kaiser Window have better minimum stop band attenuation characteristic than the filters designed by exponential window. w w w . c i r w o r l d . c o m By using (19) and (20), the minimum odd integer filter length required for satisfying a given and can be determined from (21) As a result, using the filter design equations given in (18), (19), (20) and (21) an exponential window can be designed to satisfy the prescribed filter characteristic given in terms of and .

COMPARISON OF FAR END ATTENUATION FOR FILTER DESIGN BY VARIOUS WINDOWS
For designing of low pass non recursive filter we need to define following specifications: 1. pass band edge: (radian/sample) or (hertz)) 2. Stop band edge: (radian/sample) or (hertz) 3. Pass band ripple: 4. Stop band ripple: 5. Sampling frequency: (radian/sample) or Here an example is being analyzed, which shows that the FIR Filter designed by Exponential window provides the better far end stop band attenuation (maximum stop band attenuation) than the filter designed by the well known Kaiser window which is the figure of merit.
For a low pass FIR filter designed by exponential window; following were the specifications: Sampling Frequency Fs = 5 KHz, Pass band Edge Frequency =100 Hz, Stop band Edge Frequency = 150 Hz, Pass band attenuation = 10 dB, Stop band attenuation = 60 dB.
And the results of FIR filter designed by exponential window with the FIR filter designed by Kaiser and cosine hyperbolic windows were compared.
For the above example, we find the various spectral parameters as listed in the TABLE 4. Most of the parameters are already described; here is the cut off frequency which is kept fix for all the three methods. Then we find the value of the normalized transition width, alpha and filter length for each case.  figure 9, 10 and 11 respectively.

CONCLUSIONS
The present work is based on FSA measurement of the filter analyzed by the exponential window. Spectral properties of exponential window function have been observed. Spectral properties of the ideal low pass filter have been studied. Variation in the normalized transition width with the parameter alpha has been analyzed. Also variation in the normalized transition width with the minimum stop band attenuation has been analyzed. It is observed that FIR filter designed by proposed window provides the worse minimum stop band attenuation but better far end attenuation than filter designed by well known Kaiser Window. The better far end stop band attenuation in case of Exponential window shows the figure of merit and it is used for some applications such as sub band coding and speech processing. The comparison example compares this proposed window with Kaiser and previously proposed window on the basis of Normalized Transition width D, Filter Length N Design Parameter , far end stop band attenuation and minimum stop band attenuation and shows that the far end stop band attenuation is maximum in FIR filters designed by Exponential window than Kaiser and windows.