ELEC 320, Fall 2004
Prof. Rich Kozick

Laboratory 7: Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)


The development of the FFT algorithm for computing the DFT is one of the primary reasons that digital signal processing (DSP) is so common today. This lab provides a brief introduction to the DFT and FFT. The DFT and FFT are discussed in Chapter 5 of the Lathi text.

What are the DFT and FFT?

The DFT provides the Fourier transform of sampled (discrete-time) data. Similar to the continuous-time Fourier transform that we studied in class, the DFT describes the frequency content of discrete-time signals. The FFT is a fast way to compute the DFT: the FFT and DFT produce identical results, but the FFT requires less computation. Further details about the DFT and FFT are available in notes at the following link:
Notes on the DFT and FFT

Exercises:

  1. Please download the sound file hw1data.au to your directory from the Web page for this lab assignment. Read the file into Matlab, listen to it, and take the FFT with the commands:

    x = auread('hw1data.au');
    sound(x)
    X = fft(x);

    The sampling rate for this signal is 8192 samples per second. You can plot the FFT magnitude versus Hertz with the MATLAB commands given below. Make sure that you understand what these commands are doing - you will have some homework exercises next week that will use MATLAB and the FFT.

    Fs = 8192;
    N = length(X);
    f = (0:N-1)'/N*Fs;
    plot(f, abs(X))

    Which frequency (in hertz) appears to be dominant? Do harmonics appear to be present? Can you guess what produced this sound?

  2. Generate a periodic signal of sinc pulses using the function generator.

    1. Observe the time signal on the oscilloscope. What do you think are the dominant frequency components in the signal?
    2. Use the FFT on the oscilloscope to observe the frequency spectrum of the signal. Does it agree with your prediction?
    3. Use the Keithley A/D board to record digital samples of the signal. Be sure to choose the sampling rate larger than twice the highest frequency component in the signal! Use the FFT in Matlab to plot the spectrum of the signal. Print your FFT plot, and discuss how the signal bandwidth is related to the shape of the sinc function in the time domain. It would be best to sketch one period of the sinc function, with the locations of the zero crossings labeled.

  3. Please submit answers to these questions before you leave lab on November 16, and then continue to work on your design project.

Thank you.