EECS 451______________________PROBLEM SET #6______________________Fall 2009
ASSIGNED: Oct. 22, 2009. 1996 Text: Sections 4.5-4.7; Chapter 5.
DUE DATE: Oct. 29, 2009. 2007 Text: Sections 5.4-5.6; Chapter 7.
Drill on basics of frequency response and filtering of discrete-time systems
- [15] (3@5) [1996 Text: #4.43]. If x(n)=5+3cos(πn/2+π/3)+4sin(πn+π/4),
[2007 Text #5.19]. compute y(n)=½[x(n)-x(n-2)] in sinusoidal steady-state.
- [25] (5@5) A filter: (i) Is high-pass; (ii) Has 1 zero and 1 pole p with |p|=0.9;
(iii) Rejects DC.
(a) Plot pole-zero diagram & compute H(z); (b) Compute magnitude and phase responses;
(c) Scale H(z) and |H(ω)| so |H(π)|=1; (d) Determine the difference equation of the filter;
(e) Compute the steady-state response y(n) of the filter to the input x(n)=2cos(πn/6+π/4).
[1996 Text: #4.51]. SKIP (b). Simple problem ties many ideas and implementations together.
[2007 Text: #5.27]. (a,b) determined to a constant (scale factor); scale factor determined in (c).
- [15] Design a 2nd-order MA (FIR) filter y(n)=b0x(n)+b1x(n-1)+b2x(n-2)
to satisfy specs:
(i) Frequency ω=2π/3 is rejected; (ii) the DC gain=1; and (iii) the filter has linear phase.
[1996 Text: #4.56ab]. Elementary filter design problem--we'll do more. "Linear phase"
[2007 Text: #5.32ab]. means h(n) is a delayed even or odd function; this means b2=± b0.
- [15] Find the 2 minimum phase systems having squared gain functions (assume |a| < 1):
(a) |H(ω)|²=[(5/4)-cos(ω)] ⁄ [(10/9)-(2/3)cos(ω)];
(b) |H(ω)|²=[2(1-a²)] ⁄ [(1+a²)-2a cos(ω)].
[1996 Text: #4.102a]. cos(ω)=½(ejω+e-jω). Let ejω=z.
Then |H(ω)|²=H(z)H(1/z) at z=ejω.
[Text #5.77a]. Note 5/4=1+(1/2)² and 10/9=1+(1/3)² ; the numbers come out "nice" here.
- [10] (2@5) Simple notch filtering to remove sinusoidal interference:
- Run the 1st line of Matlab below. This adds a huge interfering 2000 Hz sinusoid.
Listen to Y using sound. Describe what you hear in words. Is this annoying?
- Run the 2nd line of Matlab below. Determine "?" so that the 2000 Hz is eliminated.
Listen to Z using sound. Describe what you hear in words. Is this better?
- [20] (4@5) Simple preemphasis and deemphasis to reduce tape "hiss":
The first version of Dolby noise reduction did something like this to reduce tape "hiss."
- Run the 3rd and 4th lines of code below. This adds simulated "tape hiss" N to Handel.
Listen to W using sound. Is this annoying? (it sure was when I was growing up!)
- Run the 5th line of code. This filters Handel before the tape hiss is added.
Listen to X1 using sound. What does it sound like we've done to Handel?
Check your answer by running freqz([1 -0.99],[1 0.99]) (discrete-time Bode plots).
- How does Z compare to the original signal X? Note X has been filtered twice.
How does Z1 compare to the noisy signal W? Listen to Z1 using sound and decide.
- The first filter is preemphasis; the second filter is deemphasis. Explain how this works.
clear;load handel;X=y(27001:35192)';Y=X+10*cos(2*pi*2000*[1:8192]/8192);
B=[1 ? 1];Z=filter(B,[1],Y); %YOU have to fill in the constant "?"
N=fft(rand(1,8192)-0.5);N(1:3194)=zeros(1,3194);N(5000:8192)=zeros(1,3193);
N=2000*real(ifft(N));W=X+N;B1=[1 -0.99];A1=[1 0.99]; %N="tape hiss"
X1=filter(B1,A1,X);W1=X1(1:8192)+N;Z=filter(A1,B1,X1);Z1=filter(A1,B1,W1);