This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECE 2200 Signals and Information – Section 4 (Week 5 Feb 2225) 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 “53 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, 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 < 1 for n ≥ (i) With u [ n ] as the input, compute and sketch the output y [ n ] for n = 10 to n = 10 of the fourterm 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 Lterm 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. ECE 2200 Signals and Information – Section 4 (Week 5 Feb 2225) Page 2 1 4 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) < 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 2 4 6 8 10 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 2225) 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 ] = for n < n + 1 L for 0 ≤ n ≤ L 1 1 for n ≥ L which defines y [ n ] as a piecewise discrete function....
View
Full
Document
This note was uploaded on 03/11/2010 for the course ECE 2200 taught by Professor Johnson during the Spring '05 term at Cornell.
 Spring '05
 JOHNSON

Click to edit the document details