Vous êtes sur la page 1sur 3

Laboratory Manual

ENGR 4420 U: DSP Theory and Design


Prepared by

Dr. Shahram Shahbazpanahi


Fall 2008

Experiment 5: FIR Filtering in Time and Frequency


domain
November 19, 2008

Objectives

In this experiment, you will learn about different methods for FIR filtering in time and
frequency domain.

Pre-Lab Activities
1. Write a function called my overlap and add time filtering in Matlab which takes
as its inputs two vectors, x and h as the input signal and the impulse response of
an LTI system and calculates the convolution in time domain using overlap-and-add
method. Note that the length of the input is much larger the length of the impulse
response.
2. Write a function called my overlap and save time filtering in Matlab which takes
as its inputs two vectors, x and h as the input signal and the impulse response of
an LTI system and calculates the convolution in time domain using overlap-and-save
method. Note that the length of the input is much larger the length of the impulse
response.
3. Using the randn function, generate a random impulse response vector h with length 16
and random vector x with length 1024. Use the two functions you wrote to calculate
the convolution of these two signals and plot the results in one figure showing that
they are the same. Show your work to TA/Lab Instructor.
4. Write a function called my overlap and save freq filtering in Matlab which takes
as its inputs two vectors, x and h as the input signal and the impulse response of an
LTI system and calculates the convolution in frequency domain using overlap-and-save
method. Note that the length of the input is much larger the length of the impulse
2

response. In this file, you are requested to use DFT to calculate each smaller-length
convolution you had in my overlap and save time filtering function.
5. Write a function called my overlap and add freq filtering in Matlab which takes
as its inputs two vectors, x and h as the input signal and the impulse response of an
LTI system and calculates the convolution in frequency domain using overlap-and-save
method. Note that the length of the input is much larger the length of the impulse
response. In this file, you are requested to use DFT to calculate each smaller-length
convolution you had in my overlap and add time filtering function.
6. Using the randn function, generate a random impulse response vector h with length
16 and random vector x with length 1024. Use the two new functions you wrote to
calculate the convolution of these two signals and plot the results in one figure showing
that they are the same. Show your work to TA/Lab Instructor. Also compare your
results against the the result of the first two functions you wrote.
7. Considering h a typical FIR filter of length 16, design the Simulink model of each of
these functions and test them in Simulink. You are asked to design an experiment in
Simulink to show that all four systems are working. You may use FDAtool to design a
lowpass FIR filter as h.

Lab Activities

Build and download all your models in the hardware and design an experiments that shows
your models are working in the hardware.

Design Activity

If you successfully designed the previous part, you have already done the design component.

Vous aimerez peut-être aussi