next up previous
Next: About this document ...

ELEC 6410 Project #2 Fall 2009

Assigned: 9/02/09 Due: 9/09/09

Difference Equations and Impulse Responses

This project will help you to become more familiar with difference equations by exploring their characteristics in both the time and frequency domains.

  1. Let $y[n] - 0.54y[n-1] + 0.33y[n-2] = 0.3x[n] + 0.24x[n-1] + 0.23x[n-2]$. This difference equation can be implemented using the filter command. Find the vectors a and b that represent the difference equation above for the filter command.
  2. Calculate $h[n]$ analytically for the difference equation above. Your answer should be a functional expression. Hint: You may find the residuez function useful. (I've posted some further discussion that might help you here.)
  3. Create an impulse (not a pulse!) of length 100. Recall that systems described by linear constant-coefficient difference equations are LSI systems (assuming initial rest conditions). Characterize the LSI system above by finding the first 100 points of the impulse response using filter, and plot the result with stem.
  4. Examine two ways of implementing an LSI system:
    1. Create a pulse of width 8 and zeropadded to a total length of 100.
    2. Find the response of the system to this input pulse using conv by convolving with the impulse response.
    3. Find the response of the system to this input pulse using filter by filtering with the difference equation.
    4. Explain any differences you observe between these two results.
  5. Examine the frequency response:
    1. Find an expression for the frequency response of the system described by the difference equation given.
    2. Use the command freqz to plot the magnitude and phase response of the system.
    3. Is this system a highpass, a lowpass, or a bandpass filter?
  6. Examine the response to two sine waves:
    1. Create two signals $x_1[n] = \cos(0.3\pi n)$ and $x_2[n] = \cos(0.7\pi n)$, both of length 100.
    2. Filter each signal separately with the filter defined in Step 1, and plot them.
    3. Explain the outputs you observe in terms of the frequency magnitude response of the system.
Write a concise report describing your findings following my format instructions. The report should contain a concise description of your results. Please include all plots generated, but make them as small as you can without sacrificing clarity. 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-09-02