Though we have derived a computationally efficient polyphase
resampler for rational factors
Q=LM
Q
LM, the structure will not be practical to implement for
large LL, such as might occur when
the desired resampling factor QQ is
not well approximated by a ratio of two small
integers. Furthermore, we may encounter applications in which
QQ is chosen on-the-fly, so that
the number LL of polyphase branches
cannot be chosen a priori. Fortunately, a
slight modification of our exisiting structure will allow us to
handle both of these cases.
Say that our goal is to produce the
QT
Q
T
-rate samples
x
c
mQT
x
c
m
Q
T
given
the
1T
1
T
-rate samples
x
c
nT
x
c
n
T
, where we assume that
x
c
t
x
c
t
is bandlimited to
12T
1
2
T
and QQ can be any
positive real number. Consider, for a moment, the outputs of
polyphase filters in an ideal zero-delay
LL-branch polyphase interpolation
bank (as in Figure 1).
We know that, at time index nn, the
pth
pth
and
(p
+1)th
(p
+1)th
filter outputs equal
x
c
(n+pL)T&
x
c
(n+p+1L)T
x
c
n
p
L
T
x
c
n
p
1
L
T
respectively. Because the highest frequency in
x
c
t
x
c
t
is limited to
12T
1
2
T
, the waveform cannot not change abruptly, and
therefore cannot change significantly over a very small time
interval. In fact, when LL is
large, the waveform is nearly linear in the time interval
between
t=(n+pL)T
t
n
p
L
T
and
t=(n+p+1L)T
t
n
p
1
L
T
, so that, for any
α∈
0
1
α
0
1
,
x
c
(n+p+αL)T=
x
c
1(n+pL)T+α(n+p+1L)T
x
c
n
p
α
L
T
x
c
1
α
n
p
L
T
α
n
p
1
L
T
x
c
(n+p+αL)T≃1
x
c
(n+pL)T+α
x
c
(n+p+1L)T
x
c
n
p
α
L
T
1
α
x
c
n
p
L
T
α
x
c
n
p
1
L
T
This suggests that we can closely approximate
x
c
t
x
c
t
at any
t∈R
t
by
linearly interpolating adjacent-branch outputs of a polyphase
filterbank with a large enough LL.
The details are worked out below.
Assume an ideal LL-branch
polyphase filterbank with dd-delay
master filter and TT-sampled input,
giving access to
x
c
(n+p−dL)T
x
c
n
p
d
L
T
for
n∈Z
n
and
p∈0…L−1
p
0
…
L
1
. By linearly interpolating branch outputs p
p
and
p+1
p
1
at time nn, we are able to
closely approximate
x
c
(n+p−d+αL)T
x
c
n
p
d
α
L
T
for any
α∈
0
1
α
0
1
. We would like to
approximate
ym=
x
c
mTQ−dTL
y
m
x
c
m
T
Q
d
T
L
in this manner - note the inclusion of the master
filter delay. So, for a particular
mm,
QQ,
dd, and
LL, we would like to find
n∈Z
n
,
p∈0…L−1
p
0
…
L
1
, and
α∈
0
1
α
0
1
such that
(n+p−d+αL)T=mTQ−dTL
n
p
d
α
L
T
m
T
Q
d
T
L
(1)
nL+p+α=mLQ=mQL=(⌊mQ⌋+〈mQ〉1)L=⌊mQ⌋L+⌊〈mQ〉1L⌋+〈〈mQ〉1L〉1=⌊mQ⌋L+⌊〈mQ〉1L⌋+〈mLQ〉1
n
L
p
α
m
L
Q
m
Q
L
m
Q
m
Q
1
L
m
Q
L
m
Q
1
L
m
Q
1
L
1
m
Q
L
m
Q
1
L
m
L
Q
1
(2)
where
⌊mQ⌋L∈Z
m
Q
L
,
⌊〈mQ〉1L⌋∈0…L−1
m
Q
1
L
0
…
L
1
,
〈mLQ〉1∈
0
1
m
L
Q
1
0
1
.
Thus, we have found suitable nn,
pp, and
αα. Making clear the
dependence on output time index mm,
we write
n
m
=⌊mQ⌋
n
m
m
Q
p
m
=〈mQ〉1L
p
m
m
Q
1
L
α
m
=〈mLQ〉1
α
m
m
L
Q
1
and generate output
ym≃
x
c
mTQ−dTL
y
m
x
c
m
T
Q
d
T
L
via
ym=1∑kk
h
p
m
kx
n
m
−k+αm∑kk
h
p
m
+
1
kx
n
m
−k
y
m
1
αm
k
k
h
p
m
k
x
n
m
k
αm
k
k
h
p
m
+
1
k
x
n
m
k
The arbitrary rate polyphase resampling structure is summarized
in Figure 2.
Note that our structure refers to polyphase filters
H
p
m
z
H
p
m
z
and
H
p
m
+
1
z
H
p
m
+
1
z
for
p
m
∈0…L−1
p
m
0
…
L
1
.
This specifies the standard polyphase bank
H
0
z…
H
L
-
1
z
H
0
z
…
H
L
-
1
z
plus the additional filter
H
L
z
H
L
z
.
Ideally the
pth
pth
filter has group delay
d−pL
d
p
L
,
so that
H
L
z
H
L
z
should advance the input one full sample relative to
H
0
z
H
0
z
, i.e.,
H
L
z=z
H
0
z
H
L
z
z
H
0
z
.
There are a number of ways to design/implement the additional filter.
-
Design a master filter of length
L
N
p
+1
L
N
p
1
(where
N
p
N
p
is the polyphase filter length), and then construct
h
p
k=hkL+p ,
p∈0…L
p
h
p
k
h
k
L
p
p
0
…
L
Note that
h
L
k=
h
0
k+1
h
L
k
h
0
k
1
for
0≤k≤
N
p
−2
0
k
N
p
2
.
-
Set
H
L
z=
H
0
z
H
L
z
H
0
z
and advance the input stream
to the last filter by one sample (relative to the other filters).
In certain applications the rate of resampling needs to be
adjusted on-the-fly. The arbitrary rate resampler easily
facilitates this requirement by replacing
QQ with
QmQm
in the definitions for
nmnm,
pmpm,
and
αmαm.
Finally, it should be mentioned that a more sophisticated
interpolation could be used, e.g., Lagrange
interpolation involving more than two branch outputs. By making
the interpolation more accurate, fewer polyphase filters would
be necessary for the same overall performance, reducing the
storage requirements for polyphase filter taps. On the other
hand, combining the outputs of more branches requires more
computations per output point. Essentially, the different
schemes tradeoff between storage and computation.