This procedure is motivated by an analog-based method: one
conceptually simple method to change the sampling rate is to
simply convert a digital signal to an analog signal and
resample it! (Figure 1)
H
aa
Ω={1 if |Ω|<π
T
1
0 otherwise
H
aa
Ω
1
Ω
T
1
0
h
aa
t=sinπ
T
1
tπ
T
1
t
h
aa
t
T
1
t
T
1
t
Recall the ideal D/A:
x
a
′
t=∑n=−∞∞
x
0
nsinπ(t−n
T
0
)
T
0
π(t−n
T
0
)
T
0
x
a
′
t
n
x
0
n
t
n
T
0
T
0
t
n
T
0
T
0
(1)
The problems with this scheme are:
- A/D, D/A, filters cost money
- imperfections in these devices introduce errors
Digital implementation of rate-changing according to this
formula has three problems:
-
Infinite sum: The solution is to truncate. Consider
sinct≃0
sinc
t
0
for
t<
t
1
t
t
1
,
t>
t
2
t
t
2
: Then
m
T
1
−n
T
0
<
t
1
m
T
1
n
T
0
t
1
and
m
T
1
−n
T
0
>
t
2
m
T
1
n
T
0
t
2
which implies
N
1
=⌈m
T
1
−
t
2
T
0
⌉
N
1
m
T
1
t
2
T
0
N
2
=⌊m
T
1
−
t
1
T
0
⌋
N
2
m
T
1
t
1
T
0
x
1
m=∑n=
N
1
N
2
x
0
n
sinc
T
′
m
T
1
−n
T
0
x
1
m
n
N
1
N
2
x
0
n
sinc
T
′
m
T
1
n
T
0
This is essentially lowpass filter design using a boxcar
window: other finite-length filter design methods could be
used for this.
-
Lack of causality: The solution is to delay by
max|N|
N
samples. The mathematics of the analog portions
of this system can be implemented digitally.
x
1
m=
h
aa
t*
x
a
′
t|t=m
T
1
=∫−∞∞∑n=−∞∞
x
0
nsinπ(m
T
1
−τ−n
T
0
)
T
0
π(m
T
1
−τ−n
T
0
)
T
0
sinπτ
T
1
πτ
T
1
dτ
x
1
m
t
m
T
1
h
aa
t
x
a
′
t
τ
n
x
0
n
m
T
1
τ
n
T
0
T
0
m
T
1
τ
n
T
0
T
0
τ
T
1
τ
T
1
(2)
x
1
m=∑n=−∞∞
x
0
nsinπ
T
′
(m
T
1
−n
T
0
)π
T
′
(m
T
1
−n
T
0
)|
T
′
=max
T
0
T
1
=∑n=−∞∞
x
0
n
sinc
T
′
m
T
1
−n
T
0
x
1
m
T
′
T
0
T
1
n
x
0
n
T
′
m
T
1
n
T
0
T
′
m
T
1
n
T
0
n
x
0
n
sinc
T
′
m
T
1
n
T
0
(3)
So we have an all-digital formula for
exact digital-to-digital rate changing!
-
Cost of computing
sinc
T
′
m
T
1
−n
T
0
sinc
T
′
m
T
1
n
T
0
: The solution is to precompute the table of
sinct
sinc
t
values. However, if
T
1
T
0
T
1
T
0
is not a rational fraction, an infinite number of
samples will be needed, so some approximation will have to
be tolerated.
Rate transformation of any rate to any other rate can be
accomplished digitally with arbitrary precision (if some
delay is acceptable). This method is used in practice in
many cases. We will examine a number of special cases and
computational improvements, but in some sense everything
that follows are details; the above idea is the central
idea in multirate signal processing.