Reading
Stories Mode

Interpolation (Upsampling)

~12 min read Lesson 2 of Module 11

Increasing the Data Rate

The previous lesson covered decimation — reducing the sample rate by keeping every M-th sample. Interpolation is the dual operation: it increases the sample rate by a factor of L, producing L output samples for every input sample. Where decimation discards samples, interpolation creates new ones.

The need to increase a sample rate arises constantly in practice. A digital-to-analog converter (DAC) operates most accurately when fed at a high rate; oversampling the audio stream by 128× before conversion dramatically reduces the requirements on the analog reconstruction filter. An OFDM transmitter must insert pilot tones and guard intervals, which implicitly changes the effective sample rate. In all of these cases, interpolation by integer factor L provides the foundation.

Core Idea

Interpolation by L = inserting L−1 zeros between each sample, followed by a anti-imaging lowpass filter with cutoff π/L. The zeros create spectral images; the filter erases them, leaving only the desired upsampled signal.

Step 1 — Zero Insertion

The first stage of an interpolator is deceptively simple: insert L−1 zeros between every pair of consecutive input samples. If the input sequence is x[n], the zero-inserted sequence v[m] is defined as:

Zero-Insertion (Upsampling)
v[m] = \begin{cases} x[m/L] & \text{if } m = 0, \pm L, \pm 2L, \ldots \\ 0 & \text{otherwise} \end{cases}
v[m] is the zero-inserted sequence running at the higher rate Lfs. For every L output indices, exactly one carries a true input sample; the rest are zero.

Why zeros and not repeated samples? Repeating the same sample L times is equivalent to multiplying by a rectangular pulse, which introduces severe distortion. Inserting zeros is mathematically cleaner: the z-transform of v[m] is simply V(z) = X(zL), a frequency-compressed version of the original spectrum with no distortion — only extra spectral copies (images) that the subsequent filter will remove.

The Imaging Problem

Zero insertion compresses the spectrum by a factor of L along the frequency axis, and simultaneously creates L−1 spectral replicas of the original signal — called images — evenly spaced at multiples of 2π/L. These images are mathematical artifacts, not real signal content, but they would appear as tones or distortion in the output if left unfiltered.

Spectrum After Zero Insertion
V\!\left(e^{j\omega}\right) = X\!\left(e^{j L\omega}\right)
V(ejω) = X(ejLω): the spectrum of x[n] compressed by L in frequency, with L−1 images appearing at 2πk/L for k = 1, 2, …, L−1.

Consider upsampling by L = 4 a signal with bandwidth B. After zero insertion at the new rate 4fs, the spectrum contains the original band plus three images at shifts of π/2, π, and 3π/2 radians. The anti-imaging filter erases these three copies, leaving only the band near DC — the desired upsampled signal.

L×
Output sample rate relative to input
π/L
Anti-imaging filter cutoff (radians/sample at output rate)
L−1
Spectral images to remove

Step 2 — The Anti-imaging Filter

The second stage is a lowpass filter with cutoff frequency ωc = π/L (evaluated at the higher output sample rate). This filter passes the main spectral copy centered at DC and suppresses all L−1 images. The gain of the filter in the passband is set to L to compensate for the factor-of-L amplitude reduction caused by inserting zeros.

Anti-Imaging Filter Specification
H\!\left(e^{j\omega}\right) = \begin{cases} L & |\omega| \le \pi/L \\ 0 & \text{otherwise} \end{cases}
The ideal anti-imaging filter H(ejω) = L for |ω| ≤ π/L and zero elsewhere. This passes the desired band with unity gain (after compensating for the 1/L amplitude drop from zero insertion) and removes all images.

As with decimation, FIR filters are the standard choice for interpolation. They are linear-phase, stable, and easily designed using the windowed-sinc or Parks-McClellan methods. The filter order required for a given stopband attenuation depends on the transition bandwidth — a small transition band (i.e., a signal occupying most of π/L) demands more taps.

Filter Design Rule

Design a lowpass FIR filter with passband gain L, cutoff ωc = π/L (radians/sample at the output rate), and sufficient stopband attenuation to suppress spectral images. The filter operates at the higher rate Lfs, so its tap count directly multiplies the computational burden.

What the Filter Does in the Frequency Domain

From a frequency-domain perspective, interpolation is elegant. The zero-insertion stage compresses the spectrum and tiles it L times across [0, 2π]. The lowpass filter then selects only the central tile — the one centered at DC — and scales it up by L. The result is a signal whose spectrum is an amplitude-scaled version of the original, now occupying [−π/L, +π/L] within the wider [−π, +π] band of the output.

In the time domain, the filter effectively computes a weighted interpolation between the known input samples. The impulse response h[n] = L · sinc(n/L) is the ideal interpolating kernel — a windowed version of which is used in practice. Each output sample is a linear combination of nearby input samples, with sinc-shaped weights that peak at the true sample locations and taper smoothly between them.

Output of Ideal Interpolator
y[m] = \sum_{k} x[k]\, h[m - kL]
The interpolated output y[m] is the convolution of the zero-inserted sequence with the anti-imaging filter. At sample positions m = nL, the output equals x[n] exactly; between input samples, the filter computes a smooth sinc-weighted interpolation.

Efficient Implementation: Polyphase Decomposition

A naive interpolator computes the full anti-imaging filter at the high output rate Lfs, even though L−1 out of every L input samples are zero — wasted multiplications. The polyphase decomposition reorganizes the filter to operate at the lower input rate.

The anti-imaging FIR filter h[n] of length N is split into L polyphase branches Ek[n] = h[nL + k] for k = 0, 1, …, L−1. Each branch has approximately N/L taps and processes the input sequence x[n] at the original rate fs. The L branch outputs are commutated (interleaved) to form the output stream at the higher rate Lfs.

Polyphase Decomposition for Interpolation
E_k[n] = h[nL + k], \quad k = 0, 1, \ldots, L-1
The interpolating filter is split into L polyphase branches Ek. Branch k produces the m = nL + k output samples. All branches operate at the input rate fs, reducing total computation by L compared to the high-rate implementation.

The polyphase interpolator is the standard structure in audio sample-rate converters, DAC oversampling chains, and software-defined radio transmitters. It avoids all multiplications with zero-valued input samples and scales the filter cost proportional to N/L rather than N.

Practical Applications

DAC oversampling: Audio DACs routinely upsample by 128× or 256× before digital-to-analog conversion. Operating the DAC at a very high rate pushes the analog anti-aliasing filter requirements out of the audible band, where a gentle rolloff suffices — greatly simplifying the analog circuitry and reducing distortion.

Pulse shaping in digital communications: In systems such as 4G LTE or DVB, the baseband symbol stream is upsampled and filtered with a root-raised cosine (RRC) filter. The upsampling step inserts the necessary samples between symbols so the RRC filter can shape each pulse to minimize inter-symbol interference.

Image and video processing: Zooming and super-resolution both require interpolation: new pixel values must be synthesized between the sampled grid points of the original image. The anti-imaging filter is the spatial equivalent of the temporal anti-imaging filter in audio — it prevents ringing and aliasing in the upscaled image.

Next lesson: Sample Rate Conversion — combining upsampling by L and downsampling by M to convert between arbitrary rational ratios, such as 44.1 kHz ↔ 48 kHz.

Key Takeaways
  • Interpolation by L increases the sample rate by inserting L−1 zeros between each input sample, then applying an anti-imaging lowpass filter with cutoff π/L and gain L.
  • Zero insertion compresses the spectrum and creates L−1 spectral images at multiples of 2π/L; these are mathematical artifacts that the anti-imaging filter must suppress.
  • The ideal anti-imaging filter is a brick-wall lowpass with gain L; in practice a windowed-sinc or Parks-McClellan FIR is used, trading transition width for computational cost.
  • Polyphase decomposition splits the filter into L branches operating at the input rate, eliminating all multiplications with zero-valued samples and reducing cost by L.
  • Interpolation underpins DAC oversampling, digital communications pulse shaping, and image super-resolution — wherever more output samples must be synthesized from fewer input samples.
  • Combining interpolation by L with decimation by M enables rational sample-rate conversion (L/M), the topic of the next lesson.
Previous Decimation (Downsampling) Module Overview Next Lesson Sample Rate Conversion