sec4solns

sec4solns - ECE 2200 Signals and Information Section 4(Week...

This preview shows pages 1–4. Sign up to view the full content.

ECE 2200 Signals and Information – Section 4 (Week 5 Feb 22-25) Page 1 1. The impulse response h [ n ] of an FIR filter is h [ n ] = δ [ n - 1] - 3 δ [ n - 3] + 0 . 1 δ [ n - 4] + 0 . 04 δ [ n - 7] Write the difference equation for the FIR filter. ————————————— ————————————— Solution (read “5-3 The General FIR Filter” and see “exam5 1.pdf” on the included disc): y [ n ] = M X k =0 b k x [ n - k ] = x [ n - 1] - 3 x [ n - 3] + 0 . 1 x [ n - 4] + 0 . 04 x [ n - 7] . with b 0 = 0, b 1 = 1, b 2 = 0, b 3 = - 3, b 4 = 0 . 1, b 5 = 0, b 6 = 0 and b 7 = 0 . 04. 2. Consider the unit step signal u [ n ] = 0 for n < 0 1 for n 0 (i) With u [ n ] as the input, compute and sketch the output y [ n ] for n = - 10 to n = 10 of the four-term running average filter with difference equation y [ n ] = 1 4 3 X k =0 x [ n - k ] (ii) Confirm your answer to part (i) using MATLAB. (iii) Derive a general formula for y [ n ] as the output of an L -term averager with difference equation y [ n ] = 1 L L - 1 X k =0 x [ n - k ] with a unit step signal u [ n ] as the input. ————————————— ————————————— Solution: (i) Substituting x [ n ] = u [ n ], the running average filter is then y [ n ] = 1 4 3 X k =0 u [ n - k ] = 1 4 u [ n ] + 1 4 u [ n - 1] + 1 4 u [ n - 2] + 1 4 u [ n - 3] which is a summation of individual step signals.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
ECE 2200 Signals and Information – Section 4 (Week 5 Feb 22-25) Page 2 1 4 0 1 2 3 4 1 1 2 3 10 - 10 n y [ n ] Figure 1: Sketch of y [ n ]. (ii) MATLAB code and plot: 1 n = - 10:10; 2 % unit step signal: 3 % ----------------- 4 for i = 1:length(n) 5 if n(i) < 0 6 u(i) = 0; 7 else 8 u(i) = 1; 9 end 10 end 11 12 % FIR filter: 13 % ----------- 14 for k = 1:length(n) 15 try 16 y(k) = 1/4 * u(k) + 1/4 * u(k - 1) + 1/4 * u(k - 2) + 1/4 * u(k - 3); 17 catch 18 y(k) = 0; 19 end 20 end 21 stem(n,y, 'fill' , 'color' , 'k' ) n y [ n ] 10 8 6 4 2 0 2 4 6 8 10 0 0.2 0.4 0.6 0.8 1 Figure 2: Plot of y [ n ].
ECE 2200 Signals and Information – Section 4 (Week 5 Feb 22-25) Page 3 (iii) By inspection of y [ n ] = 1 L L - 1 X k =0 u [ n - k ] for various L , a general formula for y [ n ] is y [ n ] = 0 for n < 0 n + 1 L for 0 n L - 1 1 for n L which defines y [ n ] as a piece-wise discrete function. 3. A linear time-invariant system with input x [ n ] and output y [ n ] is described by the difference equation y [ n ] = 3 . 4 x [ n ] - 5 . 2 x [ n - 1] + 3 . 4 x [ n - 2] (i) Determine the unit impulse response of this system.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern