Hello! Welcome back to our module on Advanced Digital Signal Processing.
In our last lesson, we explored the historical origins of multirate processing, discovering that concepts like decimation and interpolation were born from a practical need for computational efficiency in telecommunications and audio systems. We learned why these techniques were invented. Today, we shift our focus to how they work.
This lesson directly addresses the learning outcome: to analyze the processes of decimation (downsampling) and interpolation (upsampling) in both the time and frequency domains. We will dissect these two fundamental operations, building the mathematical foundation you'll need to understand the efficient implementations, like polyphase structures, that we'll cover next. Given your background, you'll see strong parallels between the aliasing in decimation and the concepts from continuous-time sampling theory, but with some unique discrete-time characteristics.
1. Decimation: Reducing the Sampling Rate
Decimation is the process of decreasing the sampling rate of a discrete-time signal. In the previous lesson, we saw this was crucial for converting oversampled signals back to a standard rate. The process consists of two key steps, as shown in the block diagram below.
Figure 1: Block diagram of decimation by a factor of M. Adapted from "Chapter 9 – Multirate Digital Signal Processing".
- Anti-Aliasing Filtering: The input signal is first passed through a digital low-pass filter.
- Compression: The filtered signal, , is then downsampled by keeping every -th sample and discarding the samples in between. This operation is defined as:
Time-Domain Perspective
In the time domain, the compression step is straightforward. For a decimation factor of , we keep samples at indices 0, 3, 6, ... and discard samples at 1, 2, 4, 5, 7, 8, ... The new sequence is formed by re-indexing the kept samples: , , , and so on.
The critical question is: why is the filter necessary? To answer that, we must turn to the frequency domain.
Frequency-Domain Analysis
Changing the sampling rate of a signal has a profound effect on its spectrum. The following video provides a clear and detailed mathematical derivation of what happens when a signal is downsampled.
The video 'Downsampling' by Barry Van Veen explains the frequency domain consequences of decimation. It derives the relationship between the spectrum of the original signal and the downsampled signal.
Please watch from the beginning to 06:41. The video first compares the spectra of signals sampled at different rates to build intuition. Then, it introduces the full decimation system and derives the crucial mathematical property that governs the process.
As the video explains, if a signal is created by downsampling a signal by a factor of , i.e., , their Discrete-Time Fourier Transforms (DTFTs) are related by:
Let's break down this important formula:
- Frequency Scaling (Stretching): The term (when ) shows that the original spectrum is stretched along the frequency axis by a factor of . A frequency in moves to in .
- Spectral Copies (Aliasing): The summation from to creates additional copies of the stretched spectrum, shifted by multiples of , which are then summed together.
This is where the anti-aliasing filter becomes essential. If the original signal has frequency components above , the "stretching" effect will cause these high frequencies to fold back into the interval of the new spectrum, overlapping with the desired baseband spectrum. This is aliasing.
The job of the digital anti-aliasing filter is to ensure that the signal entering the downsampler has no energy above the cutoff frequency . By removing these frequencies beforehand, we guarantee that when the spectrum is stretched, no aliasing occurs.
Figure 2: The effect of decimation on the frequency spectrum. The anti-aliasing filter (b) is crucial for preventing the spectral overlap (aliasing) seen in (c). Adapted from "Chapter 9 – Multirate Digital Signal Processing".
Test your understanding!
Suppose you have a discrete-time signal whose DTFT, , is non-zero only in the frequency range . What is the maximum integer decimation factor you can apply to this signal without needing an anti-aliasing filter, such that no aliasing occurs in the output?
Show answer
The condition to avoid aliasing is that the filtered signal's bandwidth must be less than or equal to . In this case, we have no filter, so we use the bandwidth of itself, which is .
We need .
This simplifies to .
Therefore, the maximum integer decimation factor is . With , the stretched spectrum will extend from to , perfectly filling the available bandwidth without aliasing from spectral copies.
2. Interpolation: Increasing the Sampling Rate
Interpolation is the process of increasing the sampling rate. It's essentially the inverse of decimation and is used, for example, in oversampling digital-to-analog converters to simplify the analog reconstruction filter.
The process involves two steps:
- Expansion (Upsampling): First, we create a new signal by inserting zeros between every sample of the original signal . This operation is sometimes called a "stretcher" or "expander."
- Interpolation Filtering: The zero-stuffed signal is then passed through a digital low-pass filter. This filter "fills in" the zero values with properly interpolated samples and is often called an anti-imaging filter.
Figure 3: Block diagram of interpolation by a factor of L. Adapted from "Chapter 9 – Multirate Digital Signal Processing".
Frequency-Domain Analysis
Let's see how these two steps affect the signal's spectrum. The following video derives the frequency-domain relationships for the interpolation process.
The video 'Upsampling' by Barry Van Veen details the full interpolation process. It first analyzes the effect of zero-insertion and then explains the role of the subsequent low-pass filter.
Please watch from the beginning to 07:57. Pay close attention to the derivation showing how zero-insertion in the time domain leads to spectral compression and replication in the frequency domain.
As derived in the video, the two steps have distinct effects on the spectrum:
-
Expansion (Zero-Insertion): The DTFT of the zero-stuffed signal, , is related to the original signal's DTFT, , by:
This means the frequency axis is compressed by a factor of . The original spectrum from is squeezed into the range . Because the DTFT is always -periodic, this compression results in additional copies of the spectrum appearing within the interval. These unwanted copies are called spectral images. -
Anti-Imaging Filtering: The purpose of the low-pass filter is to remove these unwanted images. The filter needs to have a cutoff frequency of , preserving the original baseband spectrum and eliminating everything else. Furthermore, the act of inserting zeros reduces the total energy of the signal. To compensate for this, the filter must have a gain of in its passband to restore the signal's original amplitude.
The combined result is a signal with a higher sampling rate, whose spectrum is a correctly scaled version of the original spectrum, but now occupying a smaller fraction of the available bandwidth.
Figure 4: The effect of interpolation on the frequency spectrum. The anti-imaging filter removes the spectral images created by the expansion process. Adapted from "Chapter 9 – Multirate Digital Signal Processing".
For a more condensed, mathematically rigorous summary of both decimation and interpolation using z-transform notation, the "Upsampling and Downsampling" lecture notes from Stanford are an excellent resource.
These notes from Stanford's CCRMA provide a very concise mathematical summary of multirate operations.
Quickly review the sections titled 'Upsampling (Stretch)' and 'Downsampling (Decimation)'. Notice how the time-domain operation (e.g., y[n] = x[Nn]) corresponds to the frequency-domain relationship (e.g., Y(z) = 1/N * Σ X(W^m z^(1/N))). This reinforces the duality between the time and frequency domains.
Conclusion
Today, we have established the fundamental mathematical principles of decimation and interpolation. By analyzing these processes in both the time and frequency domains, we've uncovered the precise mechanisms of spectral stretching, aliasing, compression, and imaging.
Key Takeaways:
- Decimation by a factor involves low-pass filtering with a cutoff of and then discarding out of every samples. In the frequency domain, this corresponds to stretching the spectrum by . The filter is essential to prevent aliasing.
- Interpolation by a factor involves inserting zeros between samples and then low-pass filtering. In the frequency domain, zero-insertion compresses the spectrum by and creates spectral images.
- The anti-imaging filter in an interpolator has two jobs: remove the unwanted spectral images (with a cutoff of ) and restore the signal's amplitude (with a passband gain of ).
Preview of the Next Lesson:
We now understand what decimation and interpolation do to a signal. However, we also know from our first lesson that performing these operations naively (e.g., filtering at the high rate before decimating) is computationally wasteful. In our next lesson, we will finally bridge this gap by deriving the polyphase representation of FIR filters. This elegant mathematical structure allows us to rearrange the order of operations, leading to massive gains in computational efficiency and revealing the true power of multirate signal processing.