Skip to content

Multirate processing

Changing the sample rate

Multirate processing changes a signal's sample rate. This topic covers downsampling and decimation, where frequencies fold and a filter must come first; upsampling and interpolation, which bring spectral images; resampling by a rational factor; and polyphase structures that run every branch at the low rate.

Lessons on this topic

Three stacked panels. Samples 0 to 47 of x[n] = cos(0.10πn) + 0.5cos(0.35πn): every 4th sample kept (stems with dots), the others dropped (open rings). Spectrum of x[n]: a line at 0.10π rad/sample of amplitude 1 and a line at 0.35π of amplitude 0.5. Spectrum after keeping every M-th, M = 4: the line of amplitude 1 at 0.40π, and the line of amplitude 0.5 at 0.60π, folded back from 1.40π.Three stacked panels. Samples 0 to 47 of x[n] = cos(0.10πn) + 0.5cos(0.35πn): every 4th sample kept (stems with dots), the others dropped (open rings). Spectrum of x[n]: a line at 0.10π rad/sample of amplitude 1 and a line at 0.35π of amplitude 0.5. Spectrum after keeping every M-th, M = 4: the line of amplitude 1 at 0.40π, and the line of amplitude 0.5 at 0.60π, folded back from 1.40π.

Intermediate · 20 minYou are hereRead

Downsampling and decimation

Keep every M-th sample and every frequency is multiplied by M and folded; filter first, compute only the kept outputs, and decimate in stages.

Two stacked panels: x_u[n] for samples 0 to 47, and its spectrum from 0 to π rad/sample, amplitude 0 to 1.1. L = 4. 12 original samples of cos(0.40πn), stems with dot heads, each followed by three zeros, open rings on the axis. Four lines, each 0.250 high: the tone at 0.10π with a dot, and images at 0.40π, 0.60π and 0.90π with open rings.Two stacked panels: x_u[n] for samples 0 to 47, and its spectrum from 0 to π rad/sample, amplitude 0 to 1.1. L = 4. 12 original samples of cos(0.40πn), stems with dot heads, each followed by three zeros, open rings on the axis. Four lines, each 0.250 high: the tone at 0.10π with a dot, and images at 0.40π, 0.60π and 0.90π with open rings.

Intermediate · 15 minYou are hereRead

Upsampling and interpolation

Raise the sample rate by putting zeros between samples, see the images they bring, and remove them with a low-pass of gain L.

Three line spectra in dB re the input tone. At 32 kHz: the tone at 10 kHz, 0 dB. At 96 kHz, after the filter: its gain divided by 3, dashed, falls between the dotted lines at 16 and 24 kHz; the tone at 0.0 dB, the images at 22 kHz at −74.1 dB and at 42 kHz at −91.0 dB. At 48 kHz: the tone at 10 kHz, 0.0 dB; the image at 22 kHz, −74.1 dB; the alias at 6 kHz, −91.0 dB.Three line spectra in dB re the input tone. At 32 kHz: the tone at 10 kHz, 0 dB. At 96 kHz, after the filter: its gain divided by 3, dashed, falls between the dotted lines at 16 and 24 kHz; the tone at 0.0 dB, the images at 22 kHz at −74.1 dB and at 42 kHz at −91.0 dB. At 48 kHz: the tone at 10 kHz, 0.0 dB; the image at 22 kHz, −74.1 dB; the alias at 6 kHz, −91.0 dB.

Intermediate · 20 minYou are hereRead

Resampling by any factor

Change the sample rate by L/M with one low-pass, see why the filter sets the quality, and interpolate between samples with Lagrange weights.

Taps panel: the 12 taps sorted into four rows by phase n mod 4, on tap within the branch, 0 to 2: E₀ taps 0, 4, 8; E₁ taps 1, 5, 9; E₂ taps 2, 6, 10; E₃ taps 3, 7, 11. Work per kept output: filter then discard, 48 multiplies, 36 of them thrown away; polyphase, 12 multiplies, none thrown away.Taps panel: the 12 taps sorted into four rows by phase n mod 4, on tap within the branch, 0 to 2: E₀ taps 0, 4, 8; E₁ taps 1, 5, 9; E₂ taps 2, 6, 10; E₃ taps 3, 7, 11. Work per kept output: filter then discard, 48 multiplies, 36 of them thrown away; polyphase, 12 multiplies, none thrown away.

Advanced · 15 minYou are hereRead

Polyphase structures

Split a filter’s taps by phase so every branch runs at the low rate, and decimate with integrators and combs, with no multipliers at all.

Phasorium

Account

Sign inWith Google, GitHub or your email

Subjects

Site

Look