EE 341

Homework Assignment 14
Due Dec. 8, 2004

  1. Problem 7.15 (a) (b). Do these by hand.
  2. Problem 7.15 (a) (b) (c) (d). Do these by ifft(fft(x).*fft(v)). Show that (a) and (b) agree with the hand calculations.
  3. Problem 7.21. Do signals (i), (ii), (iii), (vi)
  4. Problem 7.29 (a) (b) (c)
  5. Download the sound file falling.wav. Read the file into MATLAB with the command
    x = wavread('falling.wav');
    The data is recorded at an 8 kHz rate. Make a time vector t with the command
    t = (0:length(x)-1)/8000;
    1. Plot the sound signal x vs the time vector t.
    2. As in problem 7.21 (a) of the text, find the unit pulse response hlp[n] of an ideal lowpass filter which has a cutoff frequency of 400 Hz. (First find the discrete-time frequency which corresponds to 400 Hz. Note the the discrete time frequency 2 π corresponds to the continuous time sampling frequency 8 kHz.)
    3. Let hdlp be the sequence hlp[n] for n = -100 to 100. Use a stem plot to plot hdlp.
    4. Let N = length(x) + length(hd). Plot the magnitude of the N-point DFT of hdlp vs. continuous-time frequency. Verify that this filter will pass low frequencies and block high frequencies.
    5. To find the output of the filter, let xlp be the linear convolution of x and hdlp. (To do the linear convolution in MATLAB, take the inverse DFT of the N-point DFT of x times the N-point DFT of hdlp.)
    6. Take the N-point DFT of x using the MATLAB FFT command. Plot the magnitude of the DFT vs. the continuous time frequency.
    7. Plot the magnitude of the N-point DFT of xlp. Verify that the low frequencies are gone.
    8. Repeat (b), (c), (d), (e) and (g) to find xhp using a high-pass filter with a cutoff frequency of 400 Hz. Note: Once you have hlp[n], it is very easy to find hhp[n]. Just use the fact that Hhp(Ω) = 1 - Hlp(Ω).
    9. Save your output sounds using the MATLAB wavewrite command:
      wavwrite(xlp,'falling_low.wav');
      wavwrite(xhp,'falling_high.wav');
      Listen to the three sound files. Did the filters separate the low-frequency sounds from the high-frequency sounds?
    10. If you want to, listen to the effects of the above filters on some of your favorite music.


Bill Rison, <rison@nmt.edu >