next up previous
Next: About this document

EE 547 Project #4 Fall 1999


Assigned: 11/5/99     Due: 11/12/99

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 direct summation formula. Note that you can eliminate one loop by using an inner product of a vector to implement the summation.
  2. Take the DFT of a random sequence 503 points long using your function. Use cputime to time this operation. Compare this to the time required for a 503-point FFT using fft. The FFT defaults to a DFT implementation because 503 points is a prime number and incapable of being decomposed into smaller FFT's. The difference between the FFT time and the DFT time then is simply the difference in the efficiency of the implementation rather than a difference in the algorithm. (In Matlab, fft is a built-in function.)
  3. Find the next largest power of two above 503. Record the time it takes to run your DFT and the Matlab FFT. Explain the behavior in the FFT time as compared to the previous step. (You will need to run each FFT in a loop 1000 times and then divide by 1000. Otherwise, the DFT is too short to be measured accurately.)
  4. Assuming the FFT computation time increases proportionally to as a function of the length N, predict the time required for a length 4096 FFT. Compare this to the actual time. (Again, use a loop.) What might explain the discrepancy?
  5. Create a sequence and another , both of length 16. Plot the magnitude of the 16-point DFT of both sequences. (Which type of plot is most appropriate for the DFT?) Zero-pad the sequences to length 64, and replot the DFT magnitude. Explain what happens. Create two new sequences as defined above but of length 64. Plot their DFT magnitudes. Explain what happens.
  6. Write a matlab function that implements a linear convolution using power-of-two FFT's. Generate two sequences of length 100 and 40. (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.

Write a short report describing your findings. The report should contain a concise description of your results. Include listings of your function. Be sure to answer all questions. You are not expected to include in the report all plots which you were required to do; instead, you should summarize in your report the salient features of the unincluded plots.

For further help:





next up previous
Next: About this document



Stan Reeves
Fri Oct 29 16:44:54 CDT 1999