Lecture Outline ESE 531: Digital Signal Processingese531/spring2017/handouts/...Multi-Rate Signal...
Transcript of Lecture Outline ESE 531: Digital Signal Processingese531/spring2017/handouts/...Multi-Rate Signal...
1
ESE 531: Digital Signal Processing
Lec 10: February 14th, 2017 Practical and Non-integer Sampling, Multi-
rate Sampling
Penn ESE 531 Spring 2017 - Khanna
Lecture Outline
! Downsampling/Upsampling ! Practical Interpolation ! Non-integer Resampling ! Multi-Rate Processing
" Interchanging Operations
! Polyphase Decomposition ! Multi-Rate Filter Banks
2 Penn ESE 531 Spring 2017 - Khanna
Downsampling
! Definition: Reducing the sampling rate by an integer number
3 Penn ESE 531 Spring 2017 - Khanna
Downsampling
4 Penn ESE 531 Spring 2017 - Khanna
Example
5 Penn ESE 531 Spring 2017 - Khanna
4π 2π
Example
6 Penn ESE 531 Spring 2017 - Khanna
6π 4π 2π
2
Example
7 Penn ESE 531 Spring 2017 - Khanna
Example
8 Penn ESE 531 Spring 2017 - Khanna
Upsampling
! Definition: Increasing the sampling rate by an integer number
9 Penn ESE 531 Spring 2017 - Khanna
x[n]= xc (nT )xi[n]= xc (nT ')
Upsampling
10 Penn ESE 531 Spring 2017 - Khanna
xi[n]
Frequency Domain Interpretation
11 Penn ESE 531 Spring 2017 - Khanna
Frequency Domain Interpretation
12 Penn ESE 531 Spring 2017 - Khanna
3
Example
13 Penn ESE 531 Spring 2017 - Khanna
Example
14 Penn ESE 531 Spring 2017 - Khanna
Example
15 Penn ESE 531 Spring 2017 - Khanna
Example
16 Penn ESE 531 Spring 2017 - Khanna
Example
17 Penn ESE 531 Spring 2017 - Khanna
Example
18 Penn ESE 531 Spring 2017 - Khanna
4
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 Penn ESE 531 Spring 2017 - Khanna
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 Penn ESE 531 Spring 2017 - Khanna
Frequency Domain Interpretation
21 Penn ESE 531 Spring 2017 - Khanna
Linear Interpolation -- Frequency Domain
22 Penn ESE 531 Spring 2017 - Khanna
xi[n]= xe[n]∗hlin[n]
LPF approx
Linear Interpolation -- Frequency Domain
23 Penn ESE 531 Spring 2017 - Khanna
xi[n]= xe[n]∗hlin[n]
LPF approx
Linear Interpolation -- Frequency Domain
24 Penn ESE 531 Spring 2017 - Khanna
xi[n]= xe[n]∗hlin[n]
LPF approx
5
Non-integer Sampling
! T’=TM/L " Upsample by L, then downsample by M
25 Penn ESE 531 Spring 2017 - Khanna
interpolator decimator
Non-integer Sampling
! T’=TM/L " Upsample by L, then downsample by M
26 Penn ESE 531 Spring 2017 - Khanna
interpolator decimator
Example
27 Penn ESE 531 Spring 2017 - Khanna
! T’=3/2T # L=2, M=3
Example
28 Penn ESE 531 Spring 2017 - Khanna
! T’=3/2T # L=2, M=3
Non-integer Sampling
! T’=TM/L " Downsample by M, then upsample by L?
29 Penn ESE 531 Spring 2017 - Khanna
interpolator decimator
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 Penn ESE 531 Spring 2017 - Khanna
6
Interchanging Operations
31 Penn ESE 531 Spring 2017 - Khanna
Upsampling -expanding in time -compressing in frequency
Downsampling -compressing in time -expanding in frequency
Interchanging Operations - Expander
32 Penn ESE 531 Spring 2017 - Khanna
Upsampling -expanding in time -compressing in frequency
?
Interchanging Operations - Expander
33 Penn ESE 531 Spring 2017 - Khanna
Upsampling -expanding in time -compressing in frequency
?
Interchanging Operations - Expander
34 Penn ESE 531 Spring 2017 - Khanna
Upsampling -expanding in time -compressing in frequency
≠
Interchanging Operations - Expander
35 Penn ESE 531 Spring 2017 - Khanna
Upsampling -expanding in time -compressing in frequency
=
Interchanging Operations - Compressor
36 Penn ESE 531 Spring 2017 - Khanna
Downsampling -compressing in time -expanding in frequency
=
7
37 Penn ESE 531 Spring 2017 - Khanna
=
Interchanging Operations - Compressor
38 Penn ESE 531 Spring 2017 - Khanna
=
Interchanging Operations - Compressor
=
39 Penn ESE 531 Spring 2017 - Khanna
=
Interchanging Operations - Compressor
=
40 Penn ESE 531 Spring 2017 - Khanna
= After
compressing
Interchanging Operations - Compressor
=
Interchanging Operations - Summary
41 Penn ESE 531 Spring 2017 - Khanna
Filter and expander Expander and expanded filter*
Compressor and filter Expanded filter* and compressor
*Expanded filter = expanded impulse response, compressed freq response
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 Penn ESE 531 Spring 2017 - Khanna
8
Polyphase Decomposition
43 Penn ESE 531 Spring 2017 - Khanna
! We can decompose an impulse response (of our filter) to:
Polyphase Decomposition
44 Penn ESE 531 Spring 2017 - Khanna
! We can decompose an impulse response (of our filter) to:
Polyphase Decomposition
45 Penn ESE 531 Spring 2017 - Khanna
Polyphase Decomposition
46 Penn ESE 531 Spring 2017 - Khanna
Polyphase Decomposition
47 Penn ESE 531 Spring 2017 - Khanna
Polyphase Decomposition
48 Penn ESE 531 Spring 2017 - Khanna
9
Polyphase Decomposition
49 Penn ESE 531 Spring 2017 - Khanna
Polyphase Implementation of Decimation
50 Penn ESE 531 Spring 2017 - Khanna
! Problem: " Compute all y[n] and then throw away -- wasted
computation! " For FIR length N # N mults/unit time
Polyphase Implementation of Decimation
51 Penn ESE 531 Spring 2017 - Khanna
Polyphase Implementation of Decimation
52 Penn ESE 531 Spring 2017 - Khanna
Interchanging Operations - Summary
53 Penn ESE 531 Spring 2017 - Khanna
Filter and expander Expander and expanded filter
Compressor and filter Expanded filter and compressor
Polyphase Implementation of Decimation
54 Penn ESE 531 Spring 2017 - Khanna
10
Polyphase Implementation of Decimation
55 Penn ESE 531 Spring 2017 - Khanna
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
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 Penn ESE 531 Spring 2017 - Khanna
Polyphase Implementation of Decimator
57 Penn ESE 531 Spring 2017 - Khanna
interpolator decimator
Polyphase Implementation of Interpolation
58 Penn ESE 531 Spring 2017 - Khanna
interpolator decimator
E0(z)
E0(z)
E0(z)
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 Penn ESE 531 Spring 2017 - Khanna
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
! h0[n] is low-pass, h1[n] is high-pass " Often h1[n]=ejπnh0[n] $ shift freq resp by π
60 Penn ESE 531 Spring 2017 - Khanna
11
Multi-Rate Filter Banks
! Assume h0, h1 are ideal low/high pass
61 Penn ESE 531 Spring 2017 - Khanna
Multi-Rate Filter Banks
! Assume h0, h1 are ideal low/high pass
62 Penn ESE 531 Spring 2017 - Khanna
Multi-Rate Filter Banks
! Assume h0, h1 are ideal low/high pass
63 Penn ESE 531 Spring 2017 - Khanna
Multi-Rate Filter Banks
! Assume h0, h1 are ideal low/high pass
64 Penn ESE 531 Spring 2017 - Khanna
Have to be careful with
order!
Multi-Rate Filter Banks
! Assume h0, h1 are ideal low/high pass
65 Penn ESE 531 Spring 2017 - Khanna
Multi-Rate Filter Banks
! Assume h0, h1 are ideal low/high pass
66 Penn ESE 531 Spring 2017 - Khanna
12
Multi-Rate Filter Banks
! h0, h1 are NOT ideal low/high pass
67 Penn ESE 531 Spring 2017 - Khanna
Non Ideal Filters
! h0, h1 are NOT ideal low/high pass
68 Penn ESE 531 Spring 2017 - Khanna
Non Ideal Filters
69 Penn ESE 531 Spring 2017 - Khanna
Perfect Reconstruction non-Ideal Filters
70 Penn ESE 531 Spring 2017 - Khanna
Quadrature Mirror Filters
71 Penn ESE 531 Spring 2017 - Khanna
Quadrature mirror filters
Big Ideas
! Downsampling/Upsampling ! Practical Interpolation ! Non-integer Resampling ! Multi-Rate Processing
" Interchanging Operations
! Polyphase Decomposition ! Multi-Rate Filter Banks
72 Penn ESE 531 Spring 2017 - Khanna
13
Admin
! HW 4 due Friday " Typo in code in MATLAB problem, corrected handout " See Piazza for more information
73 Penn ESE 531 Spring 2017 - Khanna