DOC PREVIEW
UK EE 422G - Lab 3 FIR Filters

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE 422G - Signals and Systems LaboratoryLab 3 FIR FiltersWritten byKevin D. DonohueDepartment of Electrical and Computer EngineeringUniversity of KentuckyLexington, KY 40506September 26, 2010EE 422G - Signals and Systems LaboratoryLab 3 FIR FiltersWritten byKevin D. DonohueDepartment of Electrical and Computer EngineeringUniversity of KentuckyLexington, KY 40506September 26, 2010Objectives:- Use filter design and analysis tools to create FIR filters based on general filterspecifications.- Create a simulation with Simulink.1. Background Digital filters are used in a wide variety of signal processing applications, such asspectrum analysis, digital image processing, and pattern recognition. Digital filters eliminate anumber of problems associated with their classical analog counterparts and thus are often used inplace of analog filters. The most common digital filters belong to the class of discrete-time LTI(linear time invariant) systems, which are characterized by the properties of causality,recursibility, and stability. They can be characterized in the time domain by the unit-impulseresponse and in the transform domain by the transfer function. A unit-impulse response sequenceof a causal LTI system can be either finite or infinite in duration. This property determines theirclassification as either a finite impulse response (FIR) or an infinite impulse response (IIR)systems. To illustrate this, consider the most general case of a discrete time LTI system with theinput sequence denoted by x(kT) and the resulting output sequence y(kT) given by: 1011))(())(()(MmNnnmTnkyaTmkxbkTy(1)The corresponding transfer function in the Z-domain is given by:11101)(ˆ)(ˆ)(ˆNnnnMmmmzazbzXzYzH(2)If at least one denominator coefficient an is not zero, then system is recursive (its current outputdepends on previous output values), and as a result its impulse response is of infinite duration(IIR system). If all denominator coefficients are zero (polynomial of order 0), the correspondingsystem is non-recursive (FIR system), and its impulse response is of finite duration. The transferfunction of Eq. (2) in this case becomes a polynomial of finite order M-1:10)(ˆ)(ˆ)(ˆMmmmzbzXzYzH(2)The corresponding FIR difference equation in time domain is:10))(()(MmmTmkxbkTy(3)As with analog filter design, the general shape of the frequency response is the main criteria indiscrete filter design. Recall the frequency response for continuous-time systems was obtainedby substituting evaluating the transfer function on the j axis, similarly for the discrete case thetransfer function in z is evaluated over the unit circle. In this case z is substituted with z =exp(j/s) where s is the sampling frequency in radians per second. Therefore, the frequencyresponse of an FIR filter is given by: 10expexpˆMmsmjzmjbzHs(4)Note that even though the time domain is discrete, the frequency response is continuous (definedfor all ); however, it is periodic with period s due to the periodic behavior of the complexexponential and consistent with the concept of aliasing.The design of digital filters involves determining the filter order (M) and computing the values ofthe coefficients (bi’s in the above equations) to achieve the desired filter response. The desiredresponse can be specified in the frequency domain in terms of the magnitude response and/or thephase response. It can also be specified in terms the impulse response. Once filter coefficientsare computed, the filter performance must be analyzed to determine the filter meets specification.In this lab you will design FIR filters using 2 popular methods – impulse response windowingand the Parks-McClellan algorithm. See help files in Matlab for fir1() and firpm() for a moredetailed explanation of the 2 methods and algorithms used in each of these approaches. For theanalysis of the filter, see help on transfer function evaluations tools like fft() (this takes the DFTof the signal) and freqz() (this implements the frequency response computation of Eq. (4)).There are 2 useful scripts posted on the class web site as well, which are winlook and firlook thatshow examples of using these functions. 2. Pre-Laboratory Assignment1. Sketch a rectangular function with height 1 and width A seconds that is symmetricallydistributed about 0. Sketch its Fourier transform (sinc function) and label the axis toidentify the width of its mainlobe (distance between the first null points closest to 0 onthe frequency axis), height of the mainlobe, and height of the first sidelobe (absolutevalue of the peak between first and second null points on either the positive or negativefrequency axis).2. For the tapering window functions listed below, write a script to plot each windowfunction on the same graph (use different line styles for each window function). Createanother graph and plot its DFT magnitude on a linear scale, and finally create anothergraph and plot its DFT magnitude on a dB scale. Comment on how the general windowshape (steepness of taper) affects the spectral magnitude (impact on width of mainlobeand height of sidelobes) a) Boxcarb) Triangularc) Hamming3. The Kiaser window is also very popular because the degree of the taper can be adjustedparametrically with parameter. Repeat number 2 for a Kaiser window of length 128 andwith  values of 2, 4, and 8. (see help kaiser in Matlab).4. Become familiar with the template scripts winlook.m and firlook.m, posted on the courseweb site. Read through the comments so you know how they relate to the laboratoryexercises. There is nothing the hand in on the prelab for this exercise.3. Laboratory Assignment (Assume sampling frequency of 44.1kHz, unless otherwise specified)1. Design a 127th order linear-phase FIR low-pass filter with a cut-off at 6kHz using thewindowing method (fir1). Design a filter using each of the following windows: a. rectangular (boxcar) b. triangular (triang) c. Hamming (hamming) On a single graph, plot the all the impulse responses together, and on another graph plotall the (frequency) magnitude responses together. In individual graphs plot the pole-zerolocations of the 3 filters. In the discussion


View Full Document

UK EE 422G - Lab 3 FIR Filters

Documents in this Course
Load more
Download Lab 3 FIR Filters
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 3 FIR Filters and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 3 FIR Filters 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?