Final

13
Design of a linear phase FIR lter Objective: FIR, Finite Impulse Response, flters are one o the primary types o flters used in Digital Signal Processing. FIR flters are said to be fnite because they do not have any eedback. hereore, i you send an impulse through the system !a single spike" then the output #ill invariably become $ero as soon as the impulse runs through the flter. here are our types o flter as lo# pass flter !%P", high pass flter !&P", band stop flter !'S" and band pass flter !'P". &ere I have decided to design a high pass flter by using (indo# )ethod !*aiser (indo# method, &amming (indo# )ethod and 'lackman (indo#" and Reme$ +lgorithm )ethod. Filter Specication: + flter transer unction &!#" consists o the magnitude response and the phase response verses re uency unction. o design a FIR high pass flter there are some specifcation is needed. he specifcations are- sampli re uency ! S ", cuto re uency ! / ", transition #idth as !0", attenuation !+", length o FIR flter !1", ideal transer unction & i !n" and the #indo# unction #!n". &ere a lo# pass flter is given as ollo#s &ere, h i ( n)= sin( π ( n α )) π ( nα ) sin( ω C ( nα )) ω C ( nα ) 2Ideal ranser Function3

description

Signal Processing

Transcript of Final

Design of a linear phase FIR filterObjective:FIR, Finite Impulse Response, filters are one of the primary types of filters used in Digital Signal Processing. FIR filters are said to be finite because they do not have any feedback. Therefore, if you send an impulse through the system (a single spike) then the output will invariably become zero as soon as the impulse runs through the filter. There are four types of filter as low pass filter (LP), high pass filter (HP), band stop filter (BS) and band pass filter (BP). Here I have decided to design a high pass filter by using Window Method (Kaiser Window method, Hamming Window Method and Blackman Window) and Remez Algorithm Method.Filter Specification:A filter transfer function H(w) consists of the magnitude response and the phase response verses frequency function. To design a FIR high pass filter there are some specification is needed. The specifications are- sampling frequency (fS), cutoff frequency (fC), transition width as (f), attenuation (A), length of FIR filter (N), ideal transfer function Hi(n) and the window function w(n). Here a low pass filter is given as follows

Here, [Ideal Transfer Function][Transfer Function with Transfer Window]Methods:There are four types of methods are available to design a FIR filter. Those are -1. Window Method2. LS Method3. Equiripple filter design method 4. Remez algorithmThere are six types of window in Window method. Those are -1. Rectangular Window2. Triangular Window3. Hamming Window4. Hanning Window5. Kaiser Window 6. Blackman WindowHere is a brief discussion about the window of the six Window methods-Names of the WindowsEquation of the window

Rectangular

TriangularNo specified equation

Hamming

Hanning

Kaiser(n) =

Design Parameters:Kaiser Window Method (Reference - FIR Filter Design Using the Window Method, Example- 9.5.2)

To design a FIR low pass filter by using the Kaiser Window method I have used the following parameters- fS = 1000 [Sampling Frequency ] fC = 250 [Cut off Frequency ] f = 50 [ Transition width ] = 0.001

To get the attenuation (A), we know

A = -20 log10 ()

To get window function for Kaiser Window, we know

Here,

N = 1+

=

Results:

fS = 1000fC = 250f = 50 = 1.0000e-003A = 60 = 5.6533 = 36.2191N = 73.4381fC(norm) = 0.2500f(norm) = 0.0500wC = 1.5708w = 0.3142

W(n) = [Values of the Window Function for Kaiser method]

Columns 1 through 11 0.0204 0.0303 0.0420 0.0557 0.0715 0.0893 0.1094 0.1316 0.1561 0.1827 0.2114 Columns 12 through 22 0.2422 0.2749 0.3094 0.3454 0.3830 0.4217 0.4613 0.5016 0.5424 0.5832 0.6239 Columns 23 through 33 0.6640 0.7032 0.7412 0.7777 0.8124 0.8449 0.8750 0.9024 0.9268 0.9479 0.9657 Columns 34 through 44 0.9799 0.9904 0.9971 0.9999 0.9988 0.9938 0.9850 0.9724 0.9562 0.9365 0.9134 Columns 45 through 55 0.8874 0.8584 0.8269 0.7932 0.7574 0.7200 0.6813 0.6415 0.6011 0.5603 0.5195 Columns 56 through 66 0.4789 0.4389 0.3998 0.3617 0.3250 0.2898 0.2563 0.2247 0.1950 0.1675 0.1421 Columns 67 through 73 0.1189 0.0979 0.0790 0.0624 0.0478 0.0352 0.0245

Figure 1: Kaiser Window function (n)

To get window function for Kaiser Window, we know

Figure 10: All the output plots for Kaiser window method

Hamming Window Method (Reference Same parameters as Kaiser Window)

W(n) = [Values of the Window Function for Hamming method]

Columns 1 through 11 0.0800 0.0817 0.0869 0.0955 0.1074 0.1226 0.1409 0.1622 0.1864 0.2132 0.2425 Columns 12 through 22 0.2740 0.3075 0.3427 0.3795 0.4174 0.4563 0.4958 0.5356 0.5755 0.6151 0.6541 Columns 23 through 33 0.6923 0.7293 0.7649 0.7989 0.8308 0.8606 0.8880 0.9127 0.9347 0.9537 0.9695 Columns 34 through 44 0.9822 0.9915 0.9974 0.9999 0.9989 0.9945 0.9867 0.9755 0.9610 0.9434 0.9227 Columns 45 through 55 0.8992 0.8729 0.8442 0.8131 0.7800 0.7451 0.7087 0.6710 0.6323 0.5929 0.5531 Columns 56 through 66 0.5132 0.4735 0.4344 0.3960 0.3587 0.3227 0.2884 0.2560 0.2257 0.1978 0.1725 Columns 67 through 73 0.1499 0.1302 0.1137 0.1003 0.0902 0.0836 0.0803

Plots of the FIR high pass filter by using the given parameters are shown as follows-

Figure 11: Hamming Window function (n)To get window function for Hamming Window, we know

Figure 12: All the output plots for Hamming window method

Blackman Window Method (Reference Same parameters as Kaiser Window)

W(n) = [Values of the Window Function for Blackman method]

Columns 1 through 11 0.0400 0.0022 -0.0722 -0.1045 -0.0543 0.0404 0.1008 0.0852 0.0299 0.0133 0.0782 Columns 12 through 22 0.1891 0.2673 0.2683 0.2258 0.2178 0.2895 0.4081 0.4951 0.5035 0.4642 0.4548 Columns 23 through 33 0.5231 0.6388 0.7240 0.7293 0.6827 0.6618 0.7164 0.8194 0.8932 0.8864 0.8243 Columns 34 through 44 0.7839 0.8176 0.9012 0.9578 0.9339 0.8522 0.7891 0.7994 0.8619 0.9006 0.8599 Columns 45 through 55 0.7598 0.6761 0.6659 0.7110 0.7363 0.6844 0.5722 0.4751 0.4520 0.4878 0.5085 Columns 56 through 66 0.4545 0.3401 0.2395 0.2138 0.2506 0.2770 0.2316 0.1256 0.0320 0.0137 0.0614 Columns 67 through 73 0.1030 0.0752 -0.0138 -0.0922 -0.0956 -0.0305 0.0322

Figure 11: Blackman Window function (n)To get window function for Blackman Window, we know

Figure 12: All the output plots for Blackman window methodRemez algorithm Method

F = [0 0.2 0.4 0.7 0.8 1]; [ A vector of frequency band edges in pairs ]a = [0.5 0.5 1 1 0.3 0.3]; [ A real vector the same size as f ]

Figure 2: Remez Algorithm

Discussion:

This project paper is summarizes the various equation which is used to design a FIR high pass filter. Here the high pass filter is designed by using the Kaiser Window method, hamming window method, Blackman window method and Remez algorithm method. All the outputs are same for each method but for Blackman window method there is a slide difference from the others. By using the equations we can design any kinds of filter in Window method. By changing the ideal transfer function we can compute the other filters as High pass (HP) filters, Band stop (BS) filters and Band pass (BP) filters. At last all the necessary statement has been given as above and other documents have been attached with the report as follows.

Department of Electrical & Electronics EngineeringEEE-309, Section-1, Fall-2008

ProjectDesign a FIR Filter

Submitted ToKamrul Hassan

Submitted ByImran AhmedID: 2006-2-80-052

Date of Submission: 02.12.2008