MIT OpenCourseWare http://ocw.mit.edu MAS.160 / MAS.510 / MAS.511 Signals, Systems and Information for Media Technology Fall 2007 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.Causal FIR filter xnCausal FIR filter yn[] [] Q:What is the definition of an FIR filter?Causal FIR filter xnCausal FIR filter yn[] [] Q:What is the definition of an FIR filter? A: The output y at each sample n is a weighted sum of the present input, x[n], and past inputs, x[n-1], x[n-2],…, x[n-M].Causal FIR filter xnCausal FIR filter yn[] [] Q:What is the formula for an FIR filter?Causal FIR filter xnCausal FIR filter yn[] [] Q:What is the formula for an FIR filter? yn = b0 xn+ b1xn1 +K + bMxn M[] [] [ ] [ ] M yn =� kxn k][]b[ k= 0 � n x n [] ? 2 0 Causal FIR filter b0 =1, b1 = 3, b2 =1 xn[]=� n[] yn[] = 1 0 0 1 ? yn [] 1 0 hn [] ? 2 0 y 1 [] ? 3 0 1 0.9 0.8 0.7 0.6 0.5TextEnd 0.4 0.3 0.2 0.1 0 -2 -1 0 1 2 3 4 5 n === x[n] � � � � � � � 0 Causal FIR filter b0 =1, b1 = 3, b2 =1 �y[n]� � n x n[] hn [] 2 0 = xn =[] []� n yn [] x[n ]=�[ n]� 0 � 1 0 �b01 0 1 �b1 3 � yn =1xn+ 3xn1 +1xn 2 b21 2 0 � � 1 0 [] [] [ ] [ ] � � h[n] =[]=1� n + 3� n 1]+1� n 2]��0 � �yn[] [ [ 3 0 hn = b[]n h[]1 =[]+ 3�[11 +[1� 1]1� 1 2] 3 TextEnd h[0]=b0 h[1]=b1 h[2]=b2 1 0.5TextEnd h 1 =1� 1 + 3� 0 +1�10.9 [] [] [] []2.5 0.8 0.7 0.6 h 1 =10 + 31 +102 []() () () 1.5y[n]x[n]0.4 []1 0.3 h 1 = 3 0.2 0.5 0.1 0 0 -2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5 nnCausal FIR filter b0 ,b1,b2 xn[] yn[] h[n] M yn[]= bkxn k[ ]� weighted sum of delayed inputs k= 0 hn[]= b n yn[]= h[k]xn k[ ] k=0 M � Convolution of impulse response and input yn[]= h[n]* x[n] � x[n] = n x n [] [n] )u0 0 Causal FIR filter b0 =1, b1 = 3, b2 =1 h[n] = 1, 3,[ ] sin 2�� 0.33n( 0.81yn [] ? 1 0.88 2 0.84 3 0.06 4 0.90 y 3 [] ? 5 1 0.8 0.6 0.4 0.2 x[n]= = -0.2 -0.4 -0.6 -0.8 -1 0TextEnd 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 n 1 � � � � x[n]sin 2�� 0.33n( n x n [] n y n [] = [n] )u0 0 0 0 Causal FIR filter b0 =1, b1 = 3, b2 =1 h[n] = 1, 3,[ ] 0.81 1 0.88 1 0.88 2 1.78 2 0.84 M M h[k]xn k [ bk xn k + 3xn] [ [ yn [] ] = = 3 0.06 3 1.72 k = 0 0 k1 ] = 1xn []1 2xn] 1x 3 2 [[ 4 0.90 4 0.13 yn [] ] + = 5 5 1.84 y 3 [] 1x 3 []+ 3x 3[][1 3 3 2[]+x x 1 1x 1[] ] + = y 3 [] + = 2 1.5 1 0.5 0TextEnd ( 1 0.88 0TextEnd -0.5 0.2 y 3 [] 1(0.06 + 3(0.84 ) ) ) + = 1 0.8 y 3 =1.72 [] 0.6 0.4 y[n]x[n]-1-0.2 -0.4 -0.6 -1.5 -0.8 -1 -2 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 n n 1-2 -1 0 1 2 3 4 5-1-0.500.51y[n]TextEndx[n]Graphical Convolution yn[]= h[n]* x[n] = x[n]* h[n] sum M � yn[]= [k]xn k]= [k]hn� k]�h[� x[ k=0 k=�� multiply shift flip 1 0TextEnd 1 0.5 0.5 0TextEndx[n]-0.5 -0.5 -1 -2 -1 0 1 2 3 4 5 n -1 -2 -1 0 1 2 3 4 5 n 0 1 2 3 h[-n]TextEnd -2 -1 0 1 2 3 4 5 0 0.5 1 1.5 2 2.5 3 n h[-n]TextEnd h[0]=b0 h[1]=b1 h[2]= b2 flip b1=3 b2=1 b0=1 -2 -1 0 1 2 3 4 5 n yn = xn 2 h[n (n 2)]+ xn1 h[n (n 1)] + x[n]hn n [] [] [ ] [ ] [] [ ] [ ] [ ] yn = h[0]xn+ h[1]xn1 + h[2]xn 2 n-1 0TextEnd-2 1 2 3 4 5 -1 -0.5 0 0.5 1 n TextEnd 0 1 2 3 yn[]= x[k]hn k[ ] k= M 0 � flipshiftmultiply sum Graphical Convolution multiply n=0 000 b1=3 b2=1 b0=1 x[n]flip/ shift by n h[-n] -1 -0.5 0 0.5 1 y[n]TextEnd 0 -2 -1 0 1 2 3 4 sum n -2 -1 0 1 2 3 4 5 n y 0 = x 2 h[2]+ x 1 h[1] + x[0]h 0= 0 1+ 0 3+ 0 1 = 0[] [] [] []() () ()5-1 0 1Graphical Convolution sum yn =� x[k]hn k[] [ ] k= M multiply n=1 0 flipshift 1 0.5 -2 2 3 4 5 0 n TextEnd -2 -1 0 1 2 3 4 5 n TextEnd multiply sum 0.88 00 b1=3 b2=1 b0=1 x[n]-0.5 -1 3 flip/ shift by n h[-n]2 1 0 y[n]2 1 0.88 0 TextEnd -1 -2 -2 -1 0 1 2 3 4 5 n y 1 = x 1 h[2]+ x 0 h[1] + x[1]h 0= 0 1+ 0 3+ 0.88 1 = 0.88[] [] [] []() () ( )0 1 2nGraphical Convolution sum yn =� x[k]hn k[] [ ] k= M multiply n=2 0 flipshift 1 0.5 -2 -1 3 4 5 0TextEnd -2 -1 0 1 2 3 4 5 n TextEnd b1=3 b2=1 b0=1 multiply sum 0.88 -0.84 0x[n]-0.5 -1 3 flip/ shift by n h[-n]2 1 0 y[n]2 1.78 1 0 TextEnd -1 -2 -2 -1 0 1 2 3 4 5 n y 2 =][2]+ x 1 [1] + x= 0 1+ 0.88 (0.84 1 =h h [2]h 03+ 1.78[]x[0()[] []() ( ) )1 2 3nGraphical Convolution sum yn =� x[k]hn k[] [ ] k= M multiply n=3 0 flipshift 1 0.5 -2 -1 0 4 5 0TextEnd -2 -1 0 1 2 3 4 5 n TextEnd b1=3 b2=1 b0=1 multiply 0.88 -0.84 -0.06 x[n]-0.5 -1 3 flip/ shift by n h[-n]2 1 0 y[n]2 sum 1 0 TextEnd -1 -1.71 -2 -2 -1 0 1 2 3 4 5 n y 3 = x 1 h[2]+ x 2 h[1] + x= 0.88 1+(0.84 3+ 1 =1.72[3]h 0(0.06[] [] [] []( ) ) )Graphical Convolution x[n]0 yn =� [k]hn k][]x[ k= M yn = x[k]* h[k][]1 0.5 -0.5 -1 -2 -1 0 1 2 3 4 5 n 0TextEnd 0 1 2 3 h[n]TextEnd b1 b0 b2 -2 …
View Full Document