# sp first l13

Post on 06-Aug-2015

151 views

Category:

## Engineering

Tags:

• #### h e jw d

Embed Size (px)

TRANSCRIPT

1. 1. Signal Processing FirstLecture 13Digital Filteringof Analog Signals12/07/14 2003, JH McClellan & RW Schafer 1
2. 2. READING ASSIGNMENTS This Lecture: Chapter 6, Sections 6-6, 6-7 & 6-8 Other Reading: Recitation: Chapter 6 FREQUENCY RESPONSE EXAMPLES Next Lecture: Chapter 712/07/14 2003, JH McClellan & RW3 Schafer
3. 3. LECTURE OBJECTIVES Two Domains: Time & Frequency Track the spectrum of x[n] thru an FIRFilter: Sinusoid-IN gives Sinusoid-OUT UNIFICATION: How does FrequencyResponse affect x(t) to produce y(t) ?x(t) x[n] H(e jw ) y[n] y(t)A-to-D D-to-AFIRw w12/07/14 2003, JH McClellan & RW4 Schafer
4. 4. TIME & FREQUENCYMM = =y n = bk x n - k = h k x n -k[ ] [ ] [ ] [ ]kk0 0FIR DIFFERENCE EQUATION is the TIME-DOMAINM=( w ) [ ] wH e j = h k e -j kk0H(e jw ) = h[0] + h[1]e- jw + h[2]e- j2w + h[3]e- j3w +12/07/14 2003, JH McClellan & RW5 Schafer
5. 5. Ex: DELAY by 2 SYSTEMFind h[n] and H(e jw ) for y[n] = x[n - 2]x[n] h[n] y[n]x[n] H(e jw ) y[n]bk = { 0, 0, 1}h[n] =d [n - 2]w w12/07/14 2003, JH McClellan & RW6 Schafer
6. 6. DELAY by 2 SYSTEMFind h[n] and H(e jw ) for y[n] = x[n - 2]M( w ) d [ 2] wH e j = k - e -j kk = 2 ONLYx[n] d [n - 2] y[n]=k0H(e jw )x[n] e- j2w y[n]w w12/07/14 2003, JH McClellan & RW7 Schafer
7. 7. GENERAL DELAY PROPERTYFind h [ n ] and H ( e jw ) for y [ n ] = x [ n - n]= - - =H ( e jw ) d [ k n ] e j w ke -wd0ONLY ONEnon-ZERO TERMfor k at k = ndj ndMk=12/07/14 2003, JH McClellan & RW8 Schaferdh[n] =d [n - nd ]
8. 8. FREQ DOMAIN --> TIME ??H(e jw ) and find h[n] or b START with kx[n] h[n] y[n] h[n] = ?H(e jw ) = 7e- j2w cos(w )x[n] y[n] H(e jw )w w12/07/14 2003, JH McClellan & RW9 Schafer
9. 9. FREQ DOMAIN --> TIME( ) 7 cos( ) EULERs Formula H e jw = e- j2w w= 7e- j2w (0.5e jw + 0.5e- jw )= (3.5e- jw + 3.5e- j3w )h[n] = 3.5d [n -1] + 3.5d [n - 3]bk = { 0, 3.5, 0,3.5}12/07/14 2003, JH McClellan & RW1 S0chafer
10. 10. PREVIOUS LECTURE REVIEW SINUSOIDAL INPUT SIGNAL OUTPUT has SAME FREQUENCY DIFFERENT Amplitude and Phase FREQUENCY RESPONSE of FIR MAGNITUDE vs. Frequency PHASE vs. Freq PLOTTINGMAGPHASE ( ) ( ) ( ) H e jw = H e jw e jH e jw12/07/14 2003, JH McClellan & RW1 S1chafer
11. 11. FREQ. RESPONSE PLOTS DENSE GRID (ww) from -p to +p ww = -pi:(pi/100):pi; HH = freqz(bb,1,ww) VECTOR bb contains Filter Coefficients DSP-First: HH = freekz(bb,1,ww)M=( w ) wH e j b e= -kj kk012/07/14 2003, JH McClellan & RW1 S2chafer
12. 12. PLOT of FREQ RESPONSE{bk} = {1,2,1}H(e jw ) = (2 + 2cosw )e- jw RESPONSE at p/3-p p12/07/14 2003, JH McClellan & RW1 S3chaferw (radians)w
13. 13. EXAMPLE 6.2jy n H ewFind [ ] when ( ) is knownj p / 4 j ( p/3)nx n =e eand [ ] 2x[n] y[n] H(e jw )w wH(e jw ) = (2 + 2cosw )e- jw12/07/14 2003, JH McClellan & RW1 S4chafer
14. 14. EXAMPLE 6.2 (answer)Find y[n] when x[n] = 2e jp / 4e j(p /3)nOne Step - evaluate H(e jw ) at w =p / 3H(e jw ) = (2 + 2cosw )e- jwH(e jw ) = 3e- jp /3 @w =p / 3y[n] = (3e- jp / 3 ) 2e jp / 4e j(p / 3)n = 6e- jp /12e j(p /3)n12/07/14 2003, JH McClellan & RW1 S5chafer
15. 15. EXAMPLE: COSINE INPUTy n H e jwFind [ ] when ( ) is knownx n = n +p pand [ ] 2cos( )3 4x[n] y[n] H(e jw )w wH(e jw ) = (2 + 2cosw )e- jw12/07/14 2003, JH McClellan & RW1 S6chafer
16. 16. EX: COSINE INPUT (ans-1)Find y [ n ] when x [ n ] = 2cos( p n + p) 3 4n e j n e j np + p = p +p + - p +p2cos( )( /3 / 4) ( /3 / 4)3 4x n x n x n = +[ ] [ ] [ ]1 2j j np p +p/3 ( /3 / 4)y [ n ] =H ( e )ej j n- - +p p p/3 ( /3 / 4)y [ n ] =H ( e )ey n y n y n = +[ ] [ ] [ ]1 21212/07/14 2003, JH McClellan & RW1 S7chafer
17. 17. EX: COSINE INPUT (ans-2)Find y [ n ] when x [ n ] = 2cos( p n + p) 3 4H(e jw ) = (2 + 2cosw )e- jwj j n j j np p + p - p p +p- - + - +/3 ( /3 / 4) ( /3) ( /3 / 4)y [ n ] = H ( e ) e =3e e1[ ] ( ) 3j j n j j np p p p p p/3 ( /3 / 4) ( /3) ( /3 / 4)y n H e e e e2= =y n e j n e j n= - + - -y n np p p p( /3 /12) ( /3 /12)[ ] 3 3p p = -[ ] 6cos( )3 1212/07/14 2003, JH McClellan & RW1 S8chafer
18. 18. SINUSOID thru FIRH*(e jw ) = H(e- jw ) IF Multiply the Magnitudes Add the Phases[ ] cos( )x n = A w n+f = + +1 1 1y n AH e j n H e jw w f w[ ] ( ) cos( ( ))112/07/14 2003, JH McClellan & RW1 S9chafer
19. 19. LTI Demo with SinusoidsFILTERx[n]12/07/14 2003, JH McClellan & RW2 S0chafery[n]
20. 20. DIGITAL FILTERINGx(t) x[n] H(e jw ) y[n] y(t)A-to-D D-to-Aw w w w SPECTRUM of x(t) (SUM of SINUSOIDS) SPECTRUM of x[n] Is ALIASING a PROBLEM ? SPECTRUM y[n] (FIR Gain or Nulls) Then, OUTPUT y(t) = SUM of SINUSOIDSwww12/07/14 2003, JH McClellan & RW2 S1chafer
21. 21. FREQUENCY SCALINGx(t) x[n] H(e jw ) y[n] y(t)A-to-D D-to-Aw w ww TIME SAMPLING:t = nTs IF NO ALIASING: FREQUENCY SCALINGs fs w =wT = w12/07/14 2003, JH McClellan & RW2 S2chafer
22. 22. 11-pt AVERAGER Examplex(t) x[n] H(e jw ) y[n] y(t)A-to-D D-to-A10w w ww=y n = x n -k[ ] 1 [ ]011k250 Hz11j w sin( w )25 Hz H(e ) = 2e- j5 w?11sin( 1w )2x 12/( t ) 107/= 14 cos(2 p (25) t 2003, ) + cos(JH McClellan 2 p (250) & t RW2 - p) 2S3chafer
23. 23. D-A FREQUENCY SCALINGx(t) x[n] H(e jw ) y[n] y(t)A-to-D D-to-Aw w ww TIME SAMPLING:t = nTs nt fs RECONSTRUCT up to 0.5fs FREQUENCY SCALINGw =w fs12/07/14 2003, JH McClellan & RW2 S4chafer
24. 24. TRACK the FREQUENCIESx(t) x[n] H(e jw ) y[n] y(t)A-to-D D-to-Aw w ww 0.5p .05p 250 Hzp0.5jH e( )p0.05jH e 25 Hz ( )Fs = 1000 Hz 0.5p .05p 250 Hz 25 HzNO new freqs12/07/14 2003, JH McClellan & RW2 S5chafer
25. 25. 11-pt AVERAGERNULLS or ZEROSw = 0.05p w = 0.5p12/07/14 2003, JH McClellan & RW2 S6chafer
26. 26. EVALUATE Freq. Responsesin( )w 5 211H(e j ) = e- jw w11sin( 1w )2At w = 0.5pj p j H e = e-( w ) p5(0.5 )sin( 11(0.5 ))p11sin( 1(0.5 ))22p 2.5p= sin(2.75 ) e- j11sin(0.25 p)= 0.0909e- j0.5p12/07/14 2003, JH McClellan & RW2 S7chafer
27. 27. EVALUATE Freq. ResponseH(e j2p (25) /1000 )fs = 1000MAG SCALEPHASE CHANGEH(e j2p (250) /1000 )12/07/14 2003, JH McClellan & RW2 S8chafer
28. 28. DIGITAL FILTERH(e jw )EFFECTIVE RESPONSELOW-PASS FILTER12/07/14 2003, JH McClellan & RW2 S9chafer
29. 29. FILTER TYPES LOW-PASS FILTER (LPF) BLURRING ATTENUATES HIGH FREQUENCIES HIGH-PASS FILTER (HPF) SHARPENING for IMAGES BOOSTS THE HIGHS REMOVES DC BAND-PASS FILTER(BPF)12/07/14 2003, JH McClellan & RW3 S0chafer
30. 30. B & W IMAGE12/07/14 2003, JH McClellan & RW3 S1chafer
31. 31. B&W IMAGE with COSINEFILTERED: 11-pt AVG12/07/14 2003, JH McClellan & RW3 S2chafer
32. 32. FILTERED B&W IMAGELPF:BLUR12/07/14 2003, JH McClellan & RW3 S3chafer
33. 33. ROW of B&W IMAGEBLACK = 255WHITE = 012/07/14 2003, JH McClellan & RW3 S4chafer
34. 34. FILTERED ROW of IMAGEADJUSTED DELAY by 5 samples12/07/14 2003, JH McClellan & RW3 S5chafer

Recommended