10.3. COMBINING DECIMATION AND
INTERPOLATION
Although changing sampling rates, through
decimation or interpolation, by integer factors can be useful, what
can we do if we need a sample rate change that is not an integer?
The good news is we can implement sample rate conversion by any
rational fraction M/D with interpolation by an integer
factor of M followed by decimation
by an integer factor of D. Because
the ratio M/D can be obtained as accurately as we
want, with the correct choice of integers M and D, we can change sample rates by almost
any factor in practice. For example, a sample rate increase by a
factor of 7.125 can be performed by an interpolation of M = 57 followed by a decimation of D = 8, because 7.125 = 57/8.
This M/D sample rate change is illustrated as
the processes shown in Figure
107(a). The upsampling operation M means insert M – 1 zerovalued samples between
each x_{old}(n) sample. The neat part here is that
the computational burden of changing the sample rate by the ratio
of M/D is less than the sum of an individual
interpolation followed by an individual decimation. That's because
we can combine the interpolation filter LPF_{M} and the decimation filter
LPF_{D} into a single
filter, shown as LPF_{M}_{/}_{D} in Figure 107(b). The process in Figure 107(b) is normally
called a sample rate converter because if M > D, we have interpolation, and when D > M, we have decimation. (The filter
LPF_{M}_{/}_{D} is often called a multirate filter.) Filter LPF_{M}_{/}_{D} must sufficiently attenuate
the interpolation spectral images so they don't contaminate our
desired signal beyond acceptable limits after decimation.
Figure 107. Sample rate conversion by a
rational factor: (a) combination of interpolation and decimation;
(b) sample rate conversion with a single lowpass filter.
Notice that the frequency response of LPF_{M}_{/}_{D} must be designed so the
beginning of its stopband frequency is less than f_{new}/2 in order to avoid
aliasing after the decimation. The stopband attenuation of LPF_{M}_{/}_{D} must be great enough so the
attenuated images do not induce intolerable levels of noise when
they're aliased by decimation into the final band of 0 to f_{new}/2 Hz.
Again, our interpolator/decimator problem is an
exercise in lowpass filter design. All the knowledge and tools we
have to design lowpass filters can be applied to this task. In
software interpolator/decimator design, we want our lowpass filter
algorithm to prevent aliasing images and be fast in execution time.
For hardware interpolator/decimators, we strive to implement
designs optimizing the conflicting goals of high performance
(minimum aliasing), simple architecture, high data throughput
speed, and low power.
The filtering in sample rate conversion, as
we've presented it, is sadly inefficient. Think about interpolating
a signal sequence by a factor of 4/3; we'd stuff three zerovalued
samples into the original time sequence and apply it to a lowpass
filter. Three fourths of the filter multiplication products would
be zero. Next we'd discard two thirds of our filter output values.
Very inefficient! Fortunately, there are special sample rate
conversion filters, called digital
polyphase filters, that avoid these inefficiencies. So,
let's introduce polyphase filters, and then discuss a special
filter, known as a cascaded
integratorcomb filter, that's beneficial in hardware
sample rate conversion applications.
