Zhilin Zhang, Bhaskar D. Rao University of California, San Diego March 28, 2012
Bhaskar Rao fred harris - University of California, San...
-
Upload
vuongxuyen -
Category
Documents
-
view
224 -
download
1
Transcript of Bhaskar Rao fred harris - University of California, San...
Bhaskar Rao
fred harris
ECE-251D Filter banks and Wavelets
28-October 2014
˃ Sample Rate
+ By embedding Sample Rate Changes in the filter we can form
Linear Time Varying (LTV) or Periodically Time Varying (PTV) filters.
+ In an LTV or PTV filter, we can apply an input signal at one frequency and the response can occur at another frequency.
+ In the sampled data world we call this Aliasing (traveling under a different name).
+ Aliasing is your friend!
˃ As an Aside
+ Most of us have limited experience
with LTV systems.
+ Actually we all share one common
LTV system experience, a swing!
+ Every child on the playground masters
the two modes of swing excitation.
2
.
Rotate Body Mass in
Negative Direction
when
Angular Velocity
is Zero and
Angular
Acceleration
is Negative
Additive
Growth Per Cycle
“How to Pump a Swing”, Stephen Wirkus, Richard Rand, and Andy Ruina,
The College Mathematics Journal, Vol. 29, No. 4, September 1998
Rotate Body Mass in
Positive Direction
when
Angular Velocity
is Zero and
Angular
Acceleration
is Positive
3 3
3
4
M-to-1
fsfs fs/M
M-to-1Filter
H(Z)
x(n) y(n) y(nM)N
Filter Length N Proportional to
1/f
Resample Ratio M Controlled by f
4
fs
fsfs/M
0
0
2BWf
2BW f
f/2f/2
fS> 2BW
Nyquist
fS= 2BW+f
harris
( )
22
2 ; (Protect from Aliasing When Down Sampling)
S
S
f A dBN
f
fBW
M
Filter Length at Input Sample Rate :
2 -Sided Alias Free BW as Fraction of Output Sample Rate :
Aliased Transition BW, Δf as Fraction of Ou
(1 ) ; (Allowable Aliasing When Down Sampling)
( ) 1 ( )
(1 ) / 22 (1 ) / 22
1 ( ) (Op;
(1 ) 22
S
S
S
ff
M
f A dB A dBN
f M M
N A dB N
M
tput Sample Rate :
Substitute in Filter Length at Input Sample Rate :
Dividing both sides by M
s/Output) (Ops)
(Input/Output) (Input)N
M M
N-TapLowpass Filter
M-to-1
f f fs s s
M
x(n) y(n) y(nM)
f /Ms -f /Ms 0
f=(1-f /Ms
2BW = f /M s
f
........
5
N and M are Coupled and Their Ratio has Interesting Units
Reduce BW, Reduce Sample
Rate
Fraction of Spectrum allocated to Aliased Transition BW
5
f
-80 dB
2-Sided BW40 kHz
Transition BW40 kHz
-2 MHz 2 MHz20kHz
60kHz
0
-6dB/Oct
0.1 dB Ripple
-90 dB
6 Nyquist Rate for Filter is 40 kHz+40 kHz = 80 kHz or fs/50
Can Perform 50-to-1 Down Sample and Still Satisfy Nyquist
400 TapFIR Filter
4-MHZ InputSample Rate
4-MHZ Output Sample Rate
400 TapFIR Filter
4-MHZ InputSample Rate
80-kHZ Output Sample Rate
50-to-1 Ratio
6
0 20-20-40 40kHz kHzkHz kHz
f
Transition Band
Aliased in Transition
BW
fS=2f0+f
2-Sided BW + Transition BW Folding Frequency
Folding Frequency
8
Low Pass Filter
Low PassDerivative Filter
Derivative Operator
x(n)
x(n)
y(n) y(n).
y(t).
h(n)
h(n)
ddn
ddn
9
Low Pass Filter
Re-sampled Low Pass Filter
x(n)
x(n)
y(n) y(nM)
y(nM)
h(n)
h(nM)
M:1
M:1
Extract Delays To First
Non-Zero Coefficient
For M-to-1 resample start at Index r and Increment by M
For 3-to-1 resample start at index r and increment by 3
C0
C0
C0
C3
C3
C3
C4
C4
C4
C5
C5
C5
C6
C6
C6
C7
C7
C7
C8
C8
C8
C9
C9
C9
C10
C10
C10
C11
C11
C11
C1
C1
C1
C2
C2
C2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
This mapping from 1-D to 2-D is used by Cooley-Tukey FFT.
Polyphase Filters and CT-FFT are kissing cousins! 10
H( Z )
x(n) y(n) y(nM)M:1
Z
Z
Z
Z
-1
-2
-(M-2)
-(M-1)
H ( Z )0
M
H ( Z )1
M
H ( Z )2
M
H ( Z )M-2
M
H ( Z )M-1
M
....
.... ....
x(n) y(n) y(nM)M:1
H( Z )
x(n) y(n) y(nM)M:11
0
( ) ( )N
n
n
H Z h n Z
1 1( )
0 0
( ) ( )M N
r nM
r n
H Z h r nM Z
1 1
0 0
( ) ( )M N
r nM
r n
H Z Z h r nM Z
M-Path Partition Supports M-to-1 Down Sample
11
21 1
0 0
( ) ( )M Nj k
r nMM
r n
G Z e Z h r nM Z
1 1
0 0
( ) ( ) ( ) ( ) ( )k k k
N Nj n j jn n
n n
G Z h n e Z h n e Z H e Z
1 1( ) ( )
0 0
( ) ( ) k
M Nj r nM r nM
r n
G Z h r nM e Z
1 1
0 0
( ) ( )k k
M Nj j nMr nM
r n
G Z e Z h r nM e Z
k
k
M θ = k 2π
2πor θ = k
M
Modulation Theorem of Z-Transform
12
Z
Z
Z
Z
-1
-2
-(M-2)
-(M-1)
H ( Z )0
M
H ( Z )1
M
H ( Z )2
M
H ( Z )M-2
M
H ( Z )M-1
M
....
.... ....
x(n) y(n) y(nM)M:1e
e
e
e
e
j k0
j k1
j k2
j k(M-2)
j k(M-1)
2
2
2
2
2
M
M
M
M
M
13
M Delays
1 Delay
M Delays
1 Delay
Input Clock, T
Output Clock, MT
Z Z-M -1
M:1 M:1
M-Units of Delay at Input Rate Same as 1-Unit of Delay at Output Rate
H(Z ) H(Z )-M -1
M:1 M:1
14
Z
Z
Z
Z
-1
-2
-(M-2)
-(M-1)
H ( Z )0
H ( Z )1
H ( Z )2
H ( Z )M-2
H ( Z )M-1
....
.... ....
x(n) y(nM,k)
M:1
M:1
M:1
M:1
M:1
e
e
e
e
e
j k0
j k1
j k2
j k(M-2)
j k(M-1)
2
2
2
2
2
M
M
M
M
M
We Reduce Sample Rate
M-to-1 Prior to Reducing Bandwidth
(Nyquist is Raising His Eyebrows!)
We Intentionally Alias the Spectrum.
(Were you Paying Attention when
they discussed the importance of
anti-aliasing filters?)
M-fold Aliasing!
M-Unknowns!
M-Paths Supply M-Equations
We can the Separate Aliases!
15
Z
Z
Z
Z
-1
-2
-(M-2)
-(M-1)
H ( Z )0
H ( Z )1
H ( Z )2
H ( Z )M-2
H ( Z )M-1
....
.... ....
x(n) y(nM,k)
M:1
M:1
M:1
M:1
M:1
e
e
e
e
e
j k0
j k1
j k2
j k(M-2)
j k(M-1)
2
2
2
2
2
M
M
M
M
M
Want Phase Spinners as far away from Resampler as Possible
16
H ( Z )0
H ( Z )1
H ( Z )2
H ( Z )M-2
H ( Z )M-1
.... ....
x(n) y(nM,k)e
e
e
e
e
j k0
j k1
j k2
j k(M-2)
j k(M-1)
2
2
2
2
2
M
M
M
M
M
Note: By moving the Phase Spinner
To the Filter Output We don’t
Select Desired Center Frequency
Till after Down Sampling
And Path Processing
This Means that
The Processing for every Channel
is the same till the Phase Spinner
No longer LTI, Filter now has
M-Different Impulse Responses!
Now LTV or PTV Filter.
17
18
....
4-MHz 80-kHz
50 PathPolyphase Filter
4-MHZ InputSample Rate
80-kHZ Output Sample Rate
50-to-1
8 taps
400 Weights
4-MHz 80-kHz8-Tap
Filter
50-PathCoefficient Bank
Select Path Weights
400 Weights
N/M = 400/50 = 8-ops/Input
18
19
....
....
4-MHz
4-MHz80-kHZ
8 taps 8 taps
50 PathPolyphase Filter
50 PathPolyphase Filter
4-MHZ InputSample Rate
4-MHZ InputSample Rate
80-kHZ Internal Sample Rate
50-to-1 1-to-50
400 Weights 400 Weights
400-Tap Filter Implemented with
8 Ops/Input
400-Tap Interpolator Implemented with
8 Ops/Output
19
400-Tap Filter Implemented
with 16 Ops/In-Out
f
Transition BW, 40 kHz
Transition BW, 4 kHz
-2 MHz 2 MHz 20 kHz 60 kHz
400 Tap Filter
4000 Tap Filter
....
....
4-MHz
4-MHz
50 PathPolyphase Filter
50 PathPolyphase Filter
4-MHZ InputSample Rate
4-MHZ InputSample Rate
4-MHZ OutputSample Rate
4-MHZ OutputSample Rate
80-kHZ Internal Rate
80-kHZ 80-kHZ
50-to-1 1-to-50
8 taps
80 taps
8 taps
400 Weights 400 Weights
H2 Filter
H2
H1 Filter
f = 4 kHz, f = 4000 kHzS
N = 80 Taps2
f = 4 kHz, f = 80 kHzS
N = 4000 Taps1
1
50Clock Rate
4000 tap Filter Implemented with
18 Ops/Input
20
H (Z)0H (Z)0
H (Z)1 H (Z)1
H (Z)2H (Z)2
H (Z)(M-1)H (Z)(M-1)
....
....
x(n,k )1
y(n,0)
y(nM,0)
f ff
0 0 0
21
f ff
k1 k1
H (Z)0H (Z)0
H (Z)1 H (Z)1
H (Z)2H (Z)2
H (Z)(M-1)H (Z)(M-1)
e e
e e
e e
e e
j j
j j
j j
j j
0k1 0k1
1k1 1k1
2k1 2k1
(M-1)2k1 (M-1)2k1
2 2
2 2
2 2
2 2
M M
M M
M M
M M....
....
x(n,k )1
y(n,k )1
y(nM,k )1
22
H (Z)0H (Z)0
H (Z)1 H (Z)1
H (Z)2H (Z)2
H (Z)(M-1)H (Z)(M-1)
e e
e e
e e
e e
j j
j j
j j
j j
0k1 0k2
1k1 1k2
2k1 2k2
(M-1)k1 (M-1)k2
2 2
2 2
2 2
2 2
M M
M M
M M
M M....
....
x(n,k )1
y(n,k )2
y(nM,k )1
f ff
k1 k2
2
3
f ff
f
k1 k1k2 k2
H (Z)0 H (Z)0
H (Z)1 H (Z)1
H (Z)2 H (Z)2
H (Z)(M-1) H (Z)(M-1)
ej0k2
2M
ej0k1
2M e
j0k12M
ej0k2
2M
....
....
x(n,k )1
y(n,k )+y(n,k )1 2
y(nM,k )1
y(nM,k )2
24
We have a method to reduce workload when the bandwidth is a small fraction of the sample rate. That won’t help us when we have a bandwidth that is large fraction of the sample rate. Possibly worse, the sample rate is extremely high. Hmm??? The solution: We simply change the problem that we can’t solve to one we can and solve that one instead. (The Star Trek Kobayashi Scenario, Thinking Out of the Box)). We partition the bandwidth into multiple, parallel, reduced bandwidth segments so that each derives benefit from the down-sampling, up-sampling process.
f
f
f
f
f
f
Input Bandwidth
Output Filter51 Multiplies
Traditional 600 Taps I 600 Multipliesnput Filter
Channelizer Filter 600 Taps
Channelized Bandwidth
Enabled ChannelsDisabled Channels Disabled Channels
8.5% of Workload91.5% Reduction
Sum Over
Row Output
Time Samples
nM-th Output
Time Sample
From r-th Row
Phase Rotator
On r-th Row,
Selecting Alias
From k-th
Nyquist Zone nM-th
Time Sample
From K-th
Nyquist Zone
Recognize Sum as Scaled
IFFT of Row Vector of Time Samples at Time nM
2
7
21
0
( , ) ( )M j rk
Mr
r
y nM k y nM e
M-Channel Analysis Channelizer: M-Narrowband Filter Spans
Centered on Multiples of Output Sample Rate
Aliased to Baseband with Unique Phase Profiles
Separated by Phase Rotators in M-Point IFFT
Hmm... this is verygood stuff....
28
M-Pnt IFFT
Alias Multiple Narrow Band Signals
from Different Center Frequencies
to Baseband By Down Sampling
Alias Multiple Narrow Band
Baseband Signals to Different
Center Frequencies By Up Sampling
29
H ( Z )0
H ( Z )1
H ( Z )2
H ( Z )M-2
H ( Z )M-1
....
....
....
x(n)
x(nM+0)
x(nM+1)
x(nM+2)
x(nM+M-2)
x(nM+M-1)
y(n,0)
y(n,k)
y(n,1)
y(n,2)
y(n,M-1)
y(n,M-2)
M-Point IFFT
H ( Z )0
H ( Z )1
H ( Z )2
H ( Z )M-2
H ( Z )M-1
....
....
....
x(n)
y(nM,0)
y(nM,k)
y(nM,1)
y(nM,2)
y(nM,M-1)
y(nM,M-2)
M-Point IFFT
Center frequencies, hence channel spacing, and the number of paths in filter partition defined by length M of IFFT. Channel bandwidth and spectral characteristics, in-band ripple, out-of band attenuation, and transition BW defined by prototype low-pass filter in polyphase partition. Channelizer output sample rate determined by input commutator span of P inputs per M- point IFFT output. Three parameters are independent and adjustable.
30
f
f
Crossover BW
Channel BWTransition BW
Transition BW
Channel Spacing
Channel Spacing
Channelizer for High Quality Spectrum Analyzer
Channelizer for High Quality FDM Receiver
31
32
The Winner!
f =fs/MBW
f =fs/MBW
f =fsSMPL
f =fs/MSMPL
f =fs/MBW
f =2(fs/M)SMPL
Band Edge Alias
f
f
f
Filter Spectral Shapeat Input Sample rate
Filter Spectral Shapeat Output Sample RateMaximally Decimated
Filter Spectral Shape at Output Sample RateNon-Maximally Decimated
f f
BW BW
Sample Rate=2 Channel Spacing Sample Rate =Channel SpacingChannel Spacing
Channel Spacing
AliasedTransition
Bandwidth
Filter Sampled at Rate to Avoid Band Edge Aliasing
34
Prototype Low-Pass Filter for 120 Channel Channelizer
35
0.5T T 1.5T 2T
1.5T
T
T
0.5T
0.5T
0mT
(m+1)T
fs
2 fs/M M Path PolyPhaseFilter in Z
M-PNT IFFT
...
..
flg=0
flg=0
flg=
1
flg=
1
Circular Buffer
Phase Continuity
2
Perform M/2-to-1 Resampling in M-Path Filter
Insert Circular Buffer Between Polyphase Filter and IFFT
to Align Input Data Shifting Origin with IFFT’s Origin
3
6
0 0
1 1
2 2
3
M/2-1
M-1
M/2
M/2+1
M-2
M-1
M MM
....
......
..
….
M-P
ath
Po
lyp
ha
se F
ilte
r
M-P
oin
t IF
FT
FDM
TDM
M-P
ath
Input D
ata
Buffer
Circ
ula
r Outp
ut B
uffer
State Engine
M-Path Analysis Filter Bank with M/2 to 1 Down Sampling
Non Maximally Decimated Perfect Reconstruction Filter Bank
3
7
00
11
22
3
M/2-1
M-1
M/2
M/2+1
M-2
M-1
MM M
....
......
..
….
M
-Pa
th P
oly
pha
se F
ilte
r
M-P
oin
t IF
FT
FDM
TDM
M-P
ath
Inp
ut D
ata
Buffer
Circ
ula
r O
utp
ut Buffer
State Engine
M-Path Synthesis Filter Bank with 1 to M/2 Up Sampling Non Maximally Decimated Perfect Reconstruction Filter Bank
3
8
....
.... .... .... ....
....
....
MPoint IFFT
MPoint IFFT
MPathFilter
MPathFilter
nM/2 Point Shift M-PointCircular Buffer
nM/2 Point Shift M-PointCircular Buffer
xx
xx
Filtering in the Cascade Channelizer Domain
Looks Like Fast Convolution. It Isn’t!
Fast Convolution Occurs in Frequency Domain,
Alters Spectrum and Returns to Time Domain.
Channelizer Never Leaves Time Domain! 3
9
Impulse Response and Frequency Response
25-Enabled Ports: 5.0 MHz Bandwidth
Sample Rate 24 MHz.
IFFT Size
120 Points.
FFT Bin Width 200 kHz.
Bandwidth Resolution
Multiples of 200 kHz.
4
0
Impulse Response and Frequency Response
39-Enabled Ports: 7.8 MHz Bandwidth
vary_bw_channelizer_120_3
Sample Rate 24 MHz.
IFFT Size
120 Points.
FFT Bin Width 200 kHz.
Bandwidth Resolution Multiples of 200 kHz.
4
1
0 5 10 15 20 25 30-100
-80
-60
-40
-20
0
Spectrum: 600-Tap, 60 Channel Analysis and Synthesis Filter, 29-Enabled Bins, 51 Real Multiplies per Input Sample and 600 Tap Filter With Same Spectrum
Frequency (in Channel Number)
Lo
g M
ag
nitu
de
(d
B)
Red 600 Tap filter ResponseBlue Cascade 600 Tap 60-Path Filter Response
14 14.1 14.2 14.3 14.4 14.5 14.6 14.7 14.8 14.9 15-100
-80
-60
-40
-20
0
Spectrum: Detail of Transition Bandwidth
Frequency (in Channel Number)
Lo
g M
ag
nitu
de
(d
B)
13 13.5 14 14.5 15-2
-1
0
1
2x 10
-3 Spectrum: Detail of In Band Ripple and Band Edge
Frequency (in Channel Number)
Lo
g M
ag
nitu
de
(d
B)
Implement 600 Tap Filter with 60 Path, 600 Tap Cascade Analysis and Synthesis Filter
42
0
0
51.2
51.2
-51.2
-51.2
102.4
47.5-47.548.0-48.0
-102.4
f (MHz)
f (MHz)
Channel-BChannel-A
0.1 dB In-Band Ripple
80.0 dB Out-of-Band Attenuation
1401 Tap Filter
Filter Specifications
Signal Specifications; Complex Input Samples, Independent Upper and Lower 95 MHZ Channels
43
Filters for Next Generation *DOCSIS Standard
*Data Over Cable Service Interface Specification
0 10 20 30 40 50 60 70 80 90 100-100
-80
-60
-40
-20
0
Spectrum: 1401-Tap Filter
Frequency (MHz
Lo
g M
ag
(d
B)
47 47.5 48 48.5-100
-80
-60
-40
-20
0
Spectrum: Detail of Transition Bandwidth
Frequency (MHz)
Lo
g M
ag
(d
B)
45 45.5 46 46.5 47 47.5 48-0.1
-0.05
0
0.05
0.1Spectrum: Detail of In Band Ripple and Band Edge
Frequency (MHz)
Lo
g M
ag
(d
B)
Complex Input Signal Require 2-Filters for Upper Band
2800 ops/Input
44
35 40 45 50 55 60-100
-80
-60
-40
-20
0
Spectrum Direct Implementation (Red), Synthesized Implementation (Blue), Outer Tier Channel (Dashed Black), Inner Tier Channel (Black)
Frequency (MHz)
Lo
g M
ag
(d
B)
Outer Tier Filter 30
Inner TierFilter
35 40 45 50-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
Spectrum, Zoom to Pass Band Ripple
Frequency (MHz)
Lo
g M
ag
(d
B)
1401 Tap Direct Filter Response, (5600 Mults for Complex Input)
60-Path Ripple 10-Path Ripple
ChannelResponse
104 Mult
44 45 46 47 48 49 50 51-100
-80
-60
-40
-20
0
Spectrum, Zoom to Transition BW
Frequency (MHz)
Lo
g M
ag
(d
B)
Outer Tier Filter 30 Inner
TierFilter
60-Path Outer 10-Path Inner
45
....
.... .... .... ....
....
.... MPoint IFFT
MPoint IFFT
MPathFilter
MPathFilter
nM/2 Point Shift M-PointCircular Buffer
nM/2 Point Shift M-PointCircular Buffer
xx
xx
Frequency Domain Filtering With Cascade
M/2-to-1 Analysis and 1-to-M/2 Synthesis Channelizers
600 Tap Prototype Filter
60 Path Polyphase Partition
10 Coefficients per Path
Input Filter:
20 Operations Per Input Sample
60 Point Good-Thomas Nested Winograd FFT
165 Real Multiples
Amortized over 30 Input Samples:
5.5 Operations per Input Sample
For Input and Output Polyphase Filter and IFFT:
51 Operations per Input-Output Sample Pair
Workload: 8.5% of 600 Coefficient Tapped Delay Line Filter
With same Frequency Response! 46
520 530 540 550 560 570 580 590 600 610 620
-0.1
0
0.1
0.2
0.3
0.4
0.5
Impulse Response, 60 Path, 600 Tap, Cascade Analysis and Synthesis Filter Bank Filter
Time Index
Am
plitu
de
250 260 270 280 290 300 310 320 330 340 350
-0.1
0
0.1
0.2
0.3
0.4
0.5
Impulse Response, 600 Tap Direct Implementation Filter
Time Index
Am
plitu
de
51 Multiplies per Input Sample
600 Multiplies per Input Sample
4
7
......
......
......
..
..
....
......
......
MPoint FFT
PPoint FFT
MPoint IFFT
MPoint IFFT
MPathFilter
PPathFilter
MPathFilter
MPathFilter
M-PointCircular Buffer
M-PointCircular Buffer
M-PointCircular Buffer
P-PointCircular Buffer
x
x
x
x
x
x
Change Bandwidth with Binary Mask, Change Sample Rate with Transform Size
4
8
49
..
........
..
P1Point IFFT
P2Point IFFT
MPoint IFFT
P1PathFilter
P2PathFilter
MPathFilter
M-PointCircular Buffer
P1-PointCircular Buffer
P2-PointCircular Buffer
Reassembled Wide Band Channels from Short Synthesis Channelizers
....
.... .... ....
....
....
MPoint IFFT
MPoint IFFT
MPathFilter
MPathFilter
nM/2 Point Shift M-PointCircular Buffer
nM/2 Point Shift M-PointCircular Buffer
Cascade M/2-to-1 Analysis and 1-to-M/2 Synthesis Channelizers
Frequency Domain Filtering and Spectral Shuffle
52
53
Professor harris, may I be excused?
My brain is full.54
Is Open For Questions
55