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