Lecture Outline ESE 531: Digital Signal Processing Lec 10: February 14th, 2017 Practical and Non-integer Sampling, Multirate Sampling! Downsampling/! Practical Interpolation! Non-integer Resampling! Multi-Rate Processing " Interchanging Operations! Polyphase Decomposition! 2 Downsampling Downsampling! Definition: Reducing the sampling rate by an integer number 3 4 2π 4π 2π 4π 6π 5 6 1
7 8! Definition: Increasing the sampling rate by an integer number x[n] x c (nt ) x i [n] x c (nt ') x i [n] 9 10 Frequency Domain Interpretation Frequency Domain Interpretation 11 12 2
13 14 15 16 17 18 3
Practical Interpolation Practical Interpolation! Interpolate with simple, practical filters! Interpolate with simple, practical filters " Linear interpolation samples between original samples fall on a straight line connecting the samples " Linear interpolation samples between original samples fall on a straight line connecting the samples " Convolve with triangle instead of sinc " Convolve with triangle instead of sinc 19 20 Frequency Domain Interpretation Linear Interpolation -- Frequency Domain x i [n] x e [n] h lin [n] LPF approx 21 22 Linear Interpolation -- Frequency Domain Linear Interpolation -- Frequency Domain x i [n] x e [n] h lin [n] x i [n] x e [n] h lin [n] LPF approx LPF approx 23 24 4
Non-integer Sampling! T TM/L " Upsample by L, then downsample by M Non-integer Sampling! T TM/L " Upsample by L, then downsample by M interpolator decimator interpolator decimator 25 26! T 3/2T # L2, M3! T 3/2T # L2, M3 27 28 Non-integer Sampling Multi-Rate Signal Processing! T TM/L! What if we want to resample by 1.01T? " Downsample by M, then upsample by L? " Expand by L100 interpolator decimator " Filter π/101 ($$$$$) " Downsample by M101! Fortunately there are ways around it! " Called multi-rate " Uses compressors, expanders and filtering 29 30 5
Interchanging Operations Interchanging Operations - Expander -expanding in time -compressing in frequency Downsampling -compressing in time -expanding in frequency -expanding in time -compressing in frequency? 31 32 Interchanging Operations - Expander Interchanging Operations - Expander -expanding in time -compressing in frequency -expanding in time -compressing in frequency? 33 34 Interchanging Operations - Expander Interchanging Operations - Compressor -expanding in time -compressing in frequency Downsampling -compressing in time -expanding in frequency 35 36 6
Interchanging Operations - Compressor Interchanging Operations - Compressor 37 38 Interchanging Operations - Compressor Interchanging Operations - Compressor After compressing 39 40 Interchanging Operations - Summary Multi-Rate Signal Processing Filter and expander Expander and expanded filter*! What if we want to resample by 1.01T? " Expand by L100 " Filter π/101 ($$$$$) " Downsample by M101 Compressor and filter Expanded filter* and compressor! Fortunately there are ways around it! " Called multi-rate " Uses compressors, expanders and filtering *Expanded filter expanded impulse response, compressed freq response 41 42 7
Polyphase Decomposition Polyphase Decomposition! We can decompose an impulse response (of our filter) to:! We can decompose an impulse response (of our filter) to: 43 44 Polyphase Decomposition Polyphase Decomposition 45 46 Polyphase Decomposition Polyphase Decomposition 47 48 8
Polyphase Decomposition Polyphase Implementation of Decimation! Problem: " Compute all y[n] and then throw away -- wasted computation! " For FIR length N # N mults/unit time 49 50 Polyphase Implementation of Decimation Polyphase Implementation of Decimation 51 52 Interchanging Operations - Summary Polyphase Implementation of Decimation Filter and expander Expander and expanded filter Compressor and filter Expanded filter and compressor 53 54 9
Polyphase Implementation of Decimation Each filter computation: -N/M multiplications -1/M rate per sample #N/M*(1/M) mults/unit time Multi-Rate Signal Processing! What if we want to resample by 1.01T? " Expand by L100 " Filter π/101 ($$$$$) " Downsample by M101! Fortunately there are ways around it! " Called multi-rate " Uses compressors, expanders and filtering Total computation: -M filters #N/M mults/unit time 55 56 Polyphase Implementation of Decimator Polyphase Implementation of Interpolation interpolator decimator interpolator decimator E 0 (z) E 0 (z) E 0 (z) 57 58! Use filter banks to operate on a signal differently in different frequency bands! Use filter banks to operate on a signal differently in different frequency bands " To save computation, reduce the rate after filtering " To save computation, reduce the rate after filtering! h 0 [n] is low-pass, h 1 [n] is high-pass " Often h 1 [n]e jπn h 0 [n] $ shift freq resp by π 59 60 10
! Assume h 0, h 1 are ideal low/high pass! Assume h 0, h 1 are ideal low/high pass 61 62! Assume h 0, h 1 are ideal low/high pass! Assume h 0, h 1 are ideal low/high pass Have to be careful with order! 63 64! Assume h 0, h 1 are ideal low/high pass! Assume h 0, h 1 are ideal low/high pass 65 66 11
Non Ideal Filters! h 0, h 1 are NOT ideal low/high pass! h 0, h 1 are NOT ideal low/high pass 67 68 Non Ideal Filters Perfect Reconstruction non-ideal Filters 69 70 Quadrature Mirror Filters Big Ideas! Downsampling/! Practical Interpolation! Non-integer Resampling! Multi-Rate Processing Quadrature mirror filters " Interchanging Operations! Polyphase Decomposition! 71 72 12
Admin! HW 4 due Friday " Typo in code in MATLAB problem, corrected handout " See Piazza for more information 73 13