Professional Documents
Culture Documents
Lecture17 MultiRate Print
Lecture17 MultiRate Print
Lecture 17
Lab III
Polyphase Filters
M. Lustig, EECS UC Berkeley
Topics
• Last time
– Changing Sampling Rate via DSP
– Upsampling
– Rational resampling
• Today
– Lab III
– Interchanging Compressors/Expanders and
filtering
– Polyphase decomposition
– Multi-rate processing
L-R
pilot (stereo)
L+R signal RBDS Subcarriers
(mono)
✓ Z t ◆
yc (t) = A cos 2⇡fc t + 2⇡ f x(⌧ )d⌧
0
KPFA 94.1MHz
• h = signal.firwin(513,100000.0,nyq=2400000.0/2,window='hanning')
fs = 2.4MHz
fs = 240KHz
don’t care
don’t care
L-R
pilot (stereo)
L+R signal RBDS Subcarriers
(mono)
24KHz
24KHz
24KHz
↑L ↓M not LTI!
“expander” “compressor”
Note:
↑L ↓M not LTI!
“expander” “compressor”
Note:
↑L H(z) ≣?
1
H(z L ) ↑L
v[n]
Proof:
1
M
X1 ⇣ ⌘ ⇣ ! 2⇡i
⌘
= H ej(! 2⇡i) X e j( M M )
M i=0 | {z }
H(ej! )
1
M
X1 ⇣ ! 2⇡i
⌘ ⇣ ! 2⇡i
⌘
jM ( M M ) j( M M )
= H e X e
M i=0
M
X1 ⇣ ⌘
! v[n]
1 ! 2⇡i
Y (ei! ) = H(ej! ) X ej( M M )
Proof: M i=0
1 X ⇣ j(! 2⇡i) ⌘ ⇣ j( ! ⌘
M 1
2⇡i
= H e X e M M )
M i=0 | {z }
H(ej! )
1 X ⇣ jM ( ! ⌘ ⇣ ⌘
M 1
2⇡i ! 2⇡i
= H e M M ) X e j( M M )
M i=0 after compressor
h[n]
n
= + h1 [n 1]
n
h0 [n] h1 [n]
n n
n
M. Lustig, EECS UC Berkeley
Polyphase Decomposition
• Define:
hk [n] ↓M ek [n]
ek [n] = hk [nM ]
h0 [n]
e0 [n]
n n
h1 [n] e1 [n]
n n
M. Lustig, EECS UC Berkeley
Polyphase Decomposition
ek [n] ↑M hk [n]
recall upsampling scaling
M
Hk (z) = Ek (z )
Also, recall: M
X1
h[n] = hk [n k]
k=0
So, M
X1
H(z) = Ek (z M )z k
k=0
k=0
x[n] E0 (z M )
1
z
E1 (z M ) + y[n]
1
z ..
1
.
z
M
EM 1 (z )
• Problem:
–Compute all y[n] and then throw away --
wasted computation!
• For FIR length N N mults/unit time
H(z)
x[n] E0 (z M )
1
z
E1 (z M ) + y[n] ↓M w[n]
1
z ..
1
.
z
M
EM 1 (z )
x[n] E0 (z M ) ↓M
1
z
E1 (z M ) ↓M + w[n]
1
z ..
1
.
z
EM 1 (z
M
) ↓M
x[n] ↓M E0 (z)
1
z
↓M E1 (z) + w[n]
1
z ..
1
.
z what about
↓M EM 1 (z)
interpolation?
Computation: (great midterm Q)
Each Filter: N/M *(1/M) mult/unit time
Total: N/M mult/unit time
M. Lustig, EECS UC Berkeley