EECS 451______________________PROBLEM SET #8______________________Fall 2009

ASSIGNED: Nov. 12, 2009. 1996 Text: Sections 5.4; 8.1-2. Directly applicable
DUE DATE: Nov. 19, 2009. 2007 Text: Sections 7.4; 10.1-2. to problems below

    Now we will start to use all of the analysis techniques we have developed.
    Warning: The final three problem sets will involve extensive use of Matlab.
    Use subplot to put the 6 plots for each problem in a 3 × 2 array on a single page.
    Confused about what the 6 plots are for each problem? Click here for details.
  1. [30] We observe sum of two sinusoids x(n)=sin(0.3πn)+sin(0.4πn) over interval n=1...L.
    1. [10] Use Matlab's plot(abs(fft(X,N))) to compute and plot |DFT| of x(n) for:
      1. the smallest value of L that resolves the two sinusoids (also plot x(n));
      2. the largest value of L that doesn't resolve the two sinusoids (single peak).
        These values of L are consecutive integers<20. Use DFT length N=128.
      3. Compare with the minimum resolution formula given in lecture and on p. 491.
    2. [5] Confirm that doubling the DFT order N to 256 does not help the resolution,
      by plotting |DFT| for N=256 for the largest L that doesn't resolve the sinusoids.
    3. [10] Multiply the data point-by-point by a Hamming window (hamming(L)').
      Repeat (a). Now what is the smallest value of L that resolves the sinusoids?
    4. [5] Discuss briefly advantages and disadvantages of using data windows here.

  2. [30] Now try a different approach, given we know there are two sinusoids in the signal:
    1. [10] Filter x(n) with a notch filter ("Frequency Response" handout) that rejects 0.3π.
      Plot the output (which should be an obvious sinusoid) and its |DFT|. Use L=32.
      Discard the first two and last two values of the output, so that it has length 30.
      Length[x(n)]=32. Length[x(n)*h(n)]=32+3-1=34. Discard 4 values so no end effects.
    2. [10] Design a resonator that emphasizes 0.3π over 0.4π. Use |pole|=0.9.
      Use Matlab's filter([1],H,X) to implement an AR filter on input signal X.
      Plot the output (which should be a less-obvious sinusoid) and its |DFT|. Use L=32.
      Discard the first two and last two values of the output, so that it has length 30.
      Discuss how the resonator has emphasized one of the sinusoids over the other.
    3. [10] Remember how aliasing works? Now multiply the 0.4π sinusoid by (-1)n.
      Plot both x(n) and its |DFT|. Interpret the frequencies of all components.
      Multiply x(n) by 32-point Hamming window before plotting its |DFT|; note effect.

  3. [40] We have a sinusoid+sawtooth x(n)=sin(0.3*pi*n)+sawtooth(n*2/pi);n=[0:29].
    Despite the strange-looking Matlab formula, this signal is indeed periodic (try plotting it).
    We want to eliminate the interfering sawtooth (lab noise) and keep the sinusoidal signal.
    Use a Hamming window on the data for each plot below (lengths: #3a: 30; #3b,c: 21).
    1. [10] Plot x(n) and its |DFT|. Could you figure out what x(n) is just by inspecting either plot?
    2. [10] Design a comb filter that eliminates the fundamental and harmonics of the sawtooth.
      Discard the first 9 and last 9 values of the output (end effects), so that it has length 21.
      Length{x(n)]=29-0+1=30. Length[x(n)*h(n)]=30+10-1=39. Then discard: 39-9-9=21.
      Plot the output (should be an obvious sinusoid) and its |DFT|. Use plot here, not stem.
    3. [10] Replace sawtooth with square. Show that the same comb filter still rejects square.
      Plot the output (which should be an obvious sinusoid) and its |DFT|, same way as in (a).
    4. [10] Explain why any periodic interference with this period is eliminated by this filter.