next up previous
Next: About this document ...

ELEC 6410 Project #4 Fall 2009

Assigned: 10/09/09 Due: 10/16/09

The DFT and the FFT

This project will emphasize the practical aspects of the use of the DFT and the FFT in digital signal processing.

Exercises

  1. Write a MATLAB function that implements a DFT using the DFT summation formula. Include a listing of your function.
  2. The overhead associated with the loops and the calculation of the multipliers in a DFT is considerable in MATLAB. To eliminate this from the process, create a matrix F that can be used to multiply a column vector to perform a DFT:
    F = dftmtx(2^11);
    Create a random sequence N=2^11 points long. Perform a DFT by multiplying the sequence (as a column vector) by the DFT matrix. Report the time required for the DFT matrix multiply. Do not include the time required to create the DFT matrix. Use tic and tic or cputime to time this operation. (To get accurate timing, before you begin, create the output variable by doing something like
    Xf = zeros(2^11,1);
    Compare to the time required for calculating the DFT of the same sequence using the function you wrote.
  3. Use fft to compute the DFT of the same sequence, and report the time. (Do the FFT in a loop 10,000 times and average the resulting time.)
  4. Determine the time required to compute an FFT in MATLAB of a sequence with length 2^11-9. Explain why this takes longer than a length-2^11 FFT.
  5. Write a MATLAB function that implements a linear convolution using power-of-two FFT's. (You can call the MATLAB fft function with an optional argument that specificies the sequence length; specify a length that is equal to a power of two.) Include a listing of your function. Generate two sequences of length 2^12. (It doesn't matter what they are.) Convolve the two sequences with your function and with conv. Compare the result to make sure they're the same, and compare the time required to run them. (You may need to accumulate the time required for 1000 runs and then average.)
  6. 6410 or extra credit for 5410: Write a MATLAB function that implements a non-power-of-two FFT using power-of-two FFT's, as discussed in class. Compare the timing on a random sequence of length 999,983 to the MATLAB FFT. Include a listing of your function.

Write a short report describing your findings following my format instructions. The text should be no more than two pages of 12-point type with 1.5 line spacing, not including plots. The report should contain a concise description of your results. Include all plots you were required to generate. Include the plots as small as possible within the text of the report, not at the end. Be sure to answer all questions.

NOTE: All out-of-class work is to be done independently. Sharing of programming tips and discussing general concepts is ok. Collaborating on experiments or code-writing is not. Any such collaboration on these assignments will be considered an act of dishonesty and will be treated accordingly.

For further help:




next up previous
Next: About this document ...
Stan Reeves 2009-10-07