+ All Categories
Home > Documents > FIR Filter

FIR Filter

Date post: 18-Feb-2016
Category:
Upload: wan-ting
View: 227 times
Download: 0 times
Share this document with a friend
Description:
signal processing
32
Finite Impulse Response Filters Main advantages of the FIR filter over IIR filter. FIR filters are always stable FIR filters with exactly linear phase can easily be designed FIR filters can be realized in both recursive and non-recursive structures FIR filters are free of limit cycle oscillations, when implemented on a finite-word length digital system Excellent design methods are available for various kinds of FIR filters The disadvantages of FIR filters are: The implementation of narrow transition band FIR filters are very costly, as it requires considerably more arithmetic operations and hardware components such as multipliers, adder and delay elements. Memory requirement and execution time are very high.
Transcript
Page 1: FIR Filter

Finite Impulse Response Filters

Main advantages of the FIR filter over IIR filter.FIR filters are always stable

FIR filters with exactly linear phase can easily be designed

FIR filters can be realized in both recursive and non-recursive structures

FIR filters are free of limit cycle oscillations, when implemented on a finite-word length digital system

Excellent design methods are available for various kinds of FIR filters

The disadvantages of FIR filters are:The implementation of narrow transition band FIR filters are very costly, as it requires considerably more arithmetic operations and hardware components such as multipliers, adder and delay elements.

Memory requirement and execution time are very high.

Page 2: FIR Filter

Fourier Series Method of Designing FIR filters• The frequency response H( ) of a system is periodic in 2л.

From Fourier series analysis we know that any periodic functions can be expressed as a linear combination of complex exponentials. Therefore, the desired frequency response of an FIR filter can be represented by the Fourier Series (1)

• Where the Fourier coefficients are the desired impulse response sequence of the filter

(2)

• The z-transform of the sequence is given by :(3)

• Whereby equation 3 represents a non-causal digital filter of infinite duration. To get an FIR filter transfer function, the series can be truncated by assigning

= 0 otherwise.

Page 3: FIR Filter

Then,

(4)

= (5)

For a symmetrical impulse response having symmetry at n=0

(6)

Therefore, equation 4 can be written as

(7)

The above transfer function is not physically realizable. Realizability can be brought by multiplying Eq.7 by

where is delay in samples.

(8)

Page 4: FIR Filter

Design an ideal highpass filter with a frequency response

for

for

Find the values of h(n) for N=11. Find H(z). Plot the magnitude response.

Solution

The desired frequency response is shown in Fig.1

We know

Page 5: FIR Filter

Figure1: the ideal frequency response of highpass filter of example 1

-

Truncating to 11 samples, we have

for

= 0 otherwise

For n=0

=

Page 6: FIR Filter

From the given frequency response we can find that α =0. Therefore, the filter coefficients are symmetrical about n = 0 satisfying the condition

For n=1

= - 0.225

the transfer function of the filter is given by

=

= 0.75 +

The transfer function of the realizable filter is

= 0.0045 – 0.075 - 0.159 -0.225 + 0. 75 -0.225 -0.159 -0.075 -0.045 (9)

=h(5) = 0.75 , ….

Page 7: FIR Filter

Design of FIR filters using windows

The desired frequency response of a filter is periodic infrequency and can be expanded in a Fourier series. The resultant seriesis given by

Where

and known as Fourier coefficients having infinite length. One possibleway of obtaining FIR filter is to truncate the infinite Fourier series at

, where N is the length of the desired sequence. But abrupt

truncation of the Fourier series results in oscillation in the passband andstopband. These oscillations are due to slow convergence of the Fourierseries and this effect is known as the Gibbs phenomenon. To reducethese oscillations, the Fourier coefficients of the filter are modified bymultiplying the infinite impulse with a finite weighing sequence called a window where

for

= 0 for

Page 8: FIR Filter

After multiplying window sequence with , we get a finiteduration sequence that satisfies the desired magnitude response

for

= 0 for

The frequency response of the filter can be obtained by

convolution of and

=

Page 9: FIR Filter

 

Figure 2: Windowing technique

Page 10: FIR Filter

Rectangular window The rectangular window sequence is given by

= 0 otherwise An example is shown in Fig 3 for N = 25.

Figure 3: Rectangular window

The spectrum of the rectangular window is given by

=

Page 11: FIR Filter

The frequency spectrum for N = 25 is shown in Fig 4.

Figure 4: (a) Frequency response of rectangular window N=25 (b) Logmagnitude response of rectangular window for N=25.

Page 12: FIR Filter

Hanning window

The Hanning window sequence can be obtained as follow:

= 0 otherwise

The frequency response of Hanning window is

The window sequence and its frequency response are shown inFig.5 and Fig.6 respectively. The main lobe width of Hanning window istwice that of the rectangular window, which results in a doubling of thetransition region of the filter. The magnitude of the side lobe level is -31dB,which is 18dB lower than that of rectangular window. This results is smallerripples in both passband and stopband of the lowpass filter designed usingHanning window. The minimum stopband attenuation of the filter is 44 dBwhich is 23dB lower than the filter designed using rectangular window. Athigher frequencies, the stopband attenuation is even greater.

Page 13: FIR Filter

Figure 5: Hanning window sequence

Figure 6: (a) Frequency response of Hanning window for N = 25 (b) Log magnitude response of Hanning window for N = 25.

Page 14: FIR Filter

Hamming window

The equation for Hamming window can be obtained as follows:

= 0 otherwise

The frequency of the Hamming window is

Figure 7: (a) Frequency response of Hanning window for N = 51 (b) Log magnitude response of Hanning window for N = 51.

Page 15: FIR Filter

Figure 8: Frequency response of LPF using Hanning window for N = 25

Figure 9: Log magnitude response of LPF using Hanning window for N = 25

The window sequence and its magnitude response are shown in Fig.10 and

Fig.11 respectively. The peak side lobe level is down about 41dB from the main lobepeak, an improvement of 10dB relative to the Hanning window. The magnitude andlog magnitude response of lowpass filter designed using Hamming window areshown in Fig.13 and Fig.14 respectively. The first side lobe peak is -53dB; animprovement of 9dB with respect to Hanning window filter. However, at higherfrequencies the stopband attenuation is low when compared to that of Hanningwindow.

Page 16: FIR Filter

Because the Hamming window generates lesser oscillation in the side of the lobes than the Hanning window for the same main lobe width, the Hamming window is generally preferred.

Figure 10: Hamming window sequence

Figure 11: (a) Frequency response of Hamming window for N = 25 (b) Log magnitude response of Hamming window for N = 25.

Page 17: FIR Filter

Figure 12: (a) Frequency response of Hamming window for N = 51 (b) Log magnitude response of Hamming window for N = 51.

Figure 13: Frequency response of LPF using Hamming window for N = 25

Figure 14: Log magnitude response of LPF using Hamming window for N = 25

Page 18: FIR Filter

Blackman window The Blackman window sequence is given by

= 0, otherwise

Figure 15: Blackman window sequence

Figure 16: (a) Frequency response of Blackman window for N = 25 (b) Log magnitude

response of Blackman window for N = 25.

Page 19: FIR Filter

The additional cosine terms (compared with the Hamming and the Hanning windows)

reduces the sidelobes, but increases the main lobe width to . The frequency

sponse of the Blackman window is shown in Fig.17. the peak side lobe level is downabout 57dB from the main lobe peak, an improvement of 16 dB relative to theHamming window. From Fig.19 we can observe that the side lobe attenuation of alowpass filter using Blackman window is -74dB.

Figure 17: (a) Frequency response of Blackman window for N = 51 (b) Log magnitude response of Blackman window for N = 51.

Page 20: FIR Filter

Figure 18: Frequency response of LPF using Blackman window for N = 25

Figure 19: Log magnitude response of LPF using Blackman window for N = 25

Page 21: FIR Filter

Example 2: Repeat the example 1 using (a) Hanning window (b) Hamming window

Solution

(a) Hanning window

= 0 otherwise

For N = 11

= 0 otherwise

The filter coefficients can be obtained as below

Page 22: FIR Filter

The filter coefficients using Hanning window are

= 0 otherwise

The transfer function of the filter is given by

The transfer function of the realizable filter is

Page 23: FIR Filter

The causal filter coefficients are

Figure 20: Log magnitude response of example 2 using Hanning window

Page 24: FIR Filter

(a) Hamming window The Hamming window sequence is given by

The window sequence for N = 11 is given by

The filter coefficients using Hamming window sequence are

Page 25: FIR Filter

The transfer function of the filter is given by

The transfer function of the realizable filter is

The filter coefficients of causal filter are

Page 26: FIR Filter

 

Figure 21: Log magnitude response of example 2 using Hamming window

Page 27: FIR Filter

Realization of FIR Filters

Transversal Structure

The system function of an FIR filter can be written as

(1)

The equation can be realized as shown in figure 22.

Figure 22: Direct realization of Eq.Y(z)

This structure is known as transversal structure or direct form realization. The transversal structure requires N multipliers, N-1 adders, and N-1 delay elements.

Page 28: FIR Filter

Cascade realization

The equation 1 can be realized in cascade form from the factored form of H(z). For N odd

(2)

For N odd, N-1 will be even and H(z) will have (N-1)/2 second order factors. Each second order factored form of H(Z) is realized in direct form and is cascaded to realize H(z) as shown in figure 23.

Figure 23: Cascade realization of Eq.2

Page 29: FIR Filter

For N even

(3)

For N even, N-1 will be odd and H(z) will have one first order factor (N-2)/2 second order factors.

Each factored form of H(Z) is realized in direct form and is cascaded to realize H(z) as shown in figure 24.

Figure 24: Cascade realization of Eq.3

Page 30: FIR Filter

Example 3

Determine the direct form realization of system function

Solution

Given

The above equation can be realized as shown in Fig.25

Figure 25: Realization structure of example 3

Page 31: FIR Filter

Example 4

Obtain the cascade realization of system function

Solution

Where and

(1)

(2)

The Eq.1 and Eq.2 can be realized in direct form and can be cascaded as shwn in Fig.26.

Figure 26: Cascade realization of example 4

Page 32: FIR Filter

Example 5

Obtain the cascade realization of system function

Solution

Given

The above equation can be realized in cascade form as shown in Fig.27

Figure 27: Cascade realization of example 5


Recommended