EE 451
Lab 3: Frequency Response of Difference Equations

A linear constant-coefficient difference equation is of the form

                   M              N 
                   --             --
            y[n] = \  b  x[n-k] - \  a  y[n-k]
                   /   k          /   k
                   --             --
                  k=0            k=1

The frequency response of such a system can be determined by finding its impulse response h(n), and taking the Fourier transform of h(n). In this week's lab, you will implement a second-order difference equation in real time, measure its frequency response, and compare it to the theoretical response.

Consider the difference equation

             y(n) = x(n) - x(n-4)

  1. Find the impulse response h(n) of the system.

  2. Find the Fourier transform H(w) of the impulse response.

  3. Plot the magnitude of H(w) vs. w and the phase of H(w) vs. w.

  4. Plot the magnitude of H(f) vs. f and the phase of H(f) vs. f, where f is the continous-time frequency of the sampled signal.

  5. Implement the difference equation on the 56002 using the attached code . Use the program from Lab 2 which reads data from the A/D and writes it to the D/A at 48 kHz. Between reading and writing the data, process it with the difference equation. On one channel of the D/A put out the processed data. On the other channel put out the unprocessed data.

  6. Use a 0.5 V P-P sine wave from your function generator. Measure and plot the amplitude and phase of the output from 100 Hz to 20 kHz. Compare to the plots of Part 3.

Bill Rison, < >
Thu Sep 12 1996
Copyright © 1996, New Mexico Tech