Lab 6 (EASY) - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Lab 6 (EASY)

Description:

Implement a bandpass filter in the frequency domain, using a ... to attenuate the 1000 Hz. sinusoid while passing the 1500 Hz. sinusoid. Fast Convolution ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 10
Provided by: PeteGo2
Category:
Tags: easy | attenuate | lab

less

Transcript and Presenter's Notes

Title: Lab 6 (EASY)


1
Lab 6 (EASY)
  • Fast Convolution

2
Fast Convolution
  • Lab objectives
  • Implement a bandpass filter in the frequency
    domain, using a Hamming window function.
  • Filter the noisy signal generated in Lab 3, and
    plot the result.
  • Write the result to a .wav file for playback

3
Fast Convolution
In lab 3, we generated a 5 second long, 40000
sample, wave file continaining noise, a 1000 Hz.
sinusoid, and a 1500 Hz. sinusoid. In this lab,
well process the first 8192 samples of this
complex signal. Well create a frequency domain
Hamming window, centered at 1500 Hz., to
attenuate the 1000 Hz. sinusoid while passing the
1500 Hz. sinusoid
4
Fast Convolution
When we take the 8192 point FFT of this signal,
which was sampled at fs 8000 Hz, the first 4096
samples in the FFT output represent frequencies
from 0 Hz. to 4000 Hz. Samples 4097 through 8192
represent -4000 Hz to 0 Hz. Therefore, we need a
gaussian window centered at
5
Fast Convolution
The Hamming window function is given by
In this case, well make the window 200 points
wide, so N 200.
6
Fast Convolution
In Matlab, index linspace(0, 199,
200) Hamming 0.54-0.46cos(2 pi index /
(199))
Now, well create a vector containing the
frequency response of our filter H zeros(8192,
1)
7
Fast Convolution
and well place the filter window so that its
centered at sample number 1536, with a negative
frequency replica at sample 8191 1536
6655 H(14361635) Hamming H(6755-16556)
Hamming(200-11)
8
Fast Convolution
Next, either read your wav file from Lab 3, or
generate the same noisy signal. Store the signal
in a vector called x. Take the FFT of the first
8192 points in that vector, and store it in a
vector xf xf fft(x(18192)
Multiply xf by H, point by point yf xf . H
9
Fast Convolution
Take the Inverse FFT of yf, and write its real
part to a wav file using wavwrite or auwrite. y
ifft(yf)
Turn in an m-file implementing the above
procedure, and a wav file containing the output.
MAKE SURE IT WORKS BEFORE YOU SEND IT TO ME!
Write a Comment
User Comments (0)
About PowerShow.com