Multirate processing
DiperkenalkanDalam pelajaran ini
| English | Makna |
|---|---|
| decimation/ˌdesɪˈmeɪʃn/ | desimalisasi |
| interpolation/ɪnˌtɜːpəˈleɪʃn/ | interpolasi |
| polyphase/ˌpɒlɪˈfeɪz/ | dekomposisi polifase |
Sample rate is compute budget
- A filter running at 48 kHz does six times the work of the same filter at 8 kHz.
- Multirate processing does each job at the lowest rate that works.
Decimation: filter first
- Decimation 抽取 by $M$ keeps every $M$th sample. The new Nyquist frequency is $f_{s}/(2M)$.
- Low-pass below $f_{s}/(2M)$ first. Anything above it would fold back into the band, and could never be removed.
48 kHz audio is decimated by 4. Below what frequency must it be low-passed first, in kHz?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
The new rate is 12 kHz, so its Nyquist frequency is $48/(2 \times 4) = 6$ kHz.
Aliasing caused by decimating without a filter can be removed afterwards with a better filter.
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
The folded energy now sits inside the band, mixed with the real signal. Nothing can separate them.
Interpolation: filter after
- Interpolation 插值 by $L$ puts $L - 1$ zeros between samples. That creates copies of the spectrum, called images.
- Low-pass below the old Nyquist frequency afterwards to remove them, with a gain of $L$ to restore the level.

Put the steps of interpolation by L in order.
Kesulitan 3/5 · 200 koin + bonus kecil pada penyelesaian pertama hari ini
In practice the gain of L is built into the low-pass filter.
A signal is interpolated by 6. What gain must the image filter have?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
The stuffed zeros dilute the level by 6, so the filter multiplies by 6.
Polyphase
- In the interpolation filter, most inputs are the stuffed zeros, so most multiplies are wasted.
- Polyphase 多相分解 splits the filter into $L$ subfilters that each run at the low rate. It is the same arithmetic, exactly, with $1/L$ of the multiplies.
Worked example: both directions by hand
- Decimate by 2: $x = [1, 2, 3, 4, 5, 6]$ keeps every 2nd sample: $[1, 3, 5]$. (Here $x$ is smooth, so nothing above the new Nyquist needs removing first.)
- Interpolate by 2: zero-stuff $[1, 3, 5]$ to $[1, 0, 3, 0, 5, 0]$. Filter with $h = [0.5,\ 1,\ 0.5]$, which has the needed gain of $L = 2$ at DC: after a one-sample delay the output is $1, 2, 3, 4, 5, \dots$ The zeros are filled with the averages of their neighbours, and the original samples come back untouched.
- The polyphase view: split $h$ into its two phases, $[1]$ and $[0.5,\ 0.5]$. Output samples alternate between them: even outputs copy an input ($1 \times x$), odd outputs average two inputs. No multiply ever touches a stuffed zero.
- Decimation saves the same way: a 60-tap filter before ↓6 from 48 kHz would do $60 \times 48\,000 = 2.88$ million multiplies a second. Only every 6th output is kept, so compute only those: $60 \times 8000 = 480\,000$.
$[2, 6, 4]$ is interpolated by 2 (zero-stuffed, then filtered with $h = [0.5, 1, 0.5]$). What value fills the gap between 6 and 4?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
The odd phase $[0.5, 0.5]$ averages the neighbours: $0.5 \times 6 + 0.5 \times 4 = 5$. After the one-sample delay the full output is $2, 4, 6, 5, 4$.
A 100-tap anti-alias filter before ↓4 runs on a 96 kHz input. Multiplies per second if only the kept outputs are computed, in millions?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
Outputs kept: $96\,000/4 = 24\,000$ per second, each 100 multiplies: 2.4 million, against 9.6 million for every output.
Worked example: 8 kHz to 48 kHz
- Interpolate by 6, then low-pass at 4 kHz to remove the images at 8, 16, 24, 32 and 40 kHz.
- Run naively, the filter works at 48 kHz. As 6 polyphase subfilters at 8 kHz, it needs one sixth of the multiplies for the same output.
An interpolate-by-4 filter is rewritten in polyphase form. What changes?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
Polyphase skips the multiplies by stuffed zeros. Nothing else changes.
Worked example: 48 kHz to 72 kHz
- $72/48 = 3/2$: upsample by 3 to 144 kHz, filter once, keep every 2nd sample.
- One low-pass at 24 kHz removes both the images from ↑3 and the aliases from ↓2.
Three common slips
- Decimating before filtering. The aliases become permanent.
- Forgetting the gain. Zero-stuffing divides the level by $L$; the filter must multiply by $L$.
- "Polyphase is an approximation." It is the exact same computation, scheduled better.
Which L/M converts 44.1 kHz to 48 kHz?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
48 000/44 100 = 160/147 in lowest terms, so up by 160 and down by 147.
Recap
| Decimate ↓$M$ | Interpolate ↑$L$ | |
|---|---|---|
| Rate | divided by $M$ | multiplied by $L$ |
| Low-pass | before, at $f_{s}/(2M)$ | after, at the old Nyquist |
| Filter gain | 1 | $L$ |
| Stops | aliasing | images |
- Polyphase: the same result for $1/L$ of the multiplies; a decimator computes only the outputs it keeps. $[1, 3, 5]$ ↑2 with $[0.5, 1, 0.5]$ gives back $1, 2, 3, 4, 5$.
Match each operation to the filter it needs.
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
Every rate change needs its low-pass; only the place and cutoff differ.
Apa yang salah? Hanya tim situs yang dapat melihatnya.