Filter Bank: What is it? (DCT, Polyphase, Gabor, Mel And FBMC)

what is a filter bank
💡
Key learnings:
  • Filter Bank Definition: A filter bank is defined as an arrangement of bandpass filters that split the input signal into multiple frequency sub-bands.
  • DCT Filter Banks: DCT (Discrete Cosine Transform) filter banks use real numbers to compress data in sets of discrete blocks and are more computationally efficient.
  • Polyphase Filter Banks: Polyphase filter banks use a multi-rate structure and DFT to provide excellent suppression of out-of-band signals and overcome DFT drawbacks.
  • Gabor Filter Banks: Gabor filter banks, used for texture analysis, combine sinusoidal and Gaussian components to filter images in specific frequency bands and directions.
  • Mel Filter Banks: Mel filter banks mimic human hearing, offering better resolution at low frequencies, and are used to extract Mel-Frequency Cepstral Coefficients (MFCC) for speech processing.

What is a Filter Bank?

In image or signal processing, a filter bank is a set of bandpass filters that split one input into analysis signals, each occupying one frequency sub-band of the original.

Two-channel wavelet banks are one class of filter bank: they generate a scaling function and wavelets. The figure below is the broader case, a set of bandpass filters each centred on a different frequency.

structure of a filter bank
Structure of a Filter Bank

A digital filter bank is a group of filters that share one input (analysis) or one output (synthesis). In DSP, “filter bank” often means a channelizer: a set of receivers that split a wideband signal into narrower channels.

Filter banks are used for spectral decomposition and reconstruction, band-limited coding, mixing of sub-bands and sample-rate conversion. Many analysis-synthesis banks change the rate on each branch, so they are multirate systems.

Audio and image codecs use filter banks because they can code or discard sub-bands separately.

How does a Filter Bank work?

Splitting the input into those components is analysis. Each analysis output is a sub-band of the original signal.

A synthesis bank then weights the sub-bands and rebuilds one output. That reconstruction is synthesis. Equalizers and codecs use it to change sub-bands before they recombine.

Take an audio input x(n). The bank yields analysis signals x1(n), x2(n), x3(n) and so on. Each occupies a different region of the spectrum of x(n).

Those signals x1(n), x2(n), x3(n)… come from filters with bandwidths BW1, BW2, BW3… and centre frequencies fc1, fc2, fc3

The figure below is an ideal three-band bank whose passbands do not overlap and whose adjacent edges touch. The three bands run from fcl1 = 0 Hz to fch3 = fmax.

Analysis and Synthesis Filter Bank

The two roles are analysis and synthesis. Analysis filters Hk(n) split the input into M sub-band signals Xk(n). Synthesis filters Fk(z) combine M signals Yk(n) into a reconstructed x^(n), as in the figure below.

Analysis and Synthesis Filter Bank
Analysis and Synthesis Filter Bank

Analysis maps the input onto sub-bands with different spectra. Synthesis rebuilds one signal, which matches the original only if the filters satisfy a reconstruction condition and the sub-bands were not altered.

Types of Filter Banks

The sections below cover DCT, polyphase, Gabor, Mel, FBMC and DFT banks named in the title.

DCT Filter Banks

A DCT filter bank is a linear transform bank that processes data in DCT blocks. Unlike a DFT bank, the DCT uses only real numbers.

The figure below draws that DCT as a bank of filters. Once the block sits in sub-bands, an image coder can quantize or edit those sub-bands before the inverse DCT.

Representation of DCT as Filter Bank
Representation of DCT as Filter Bank

JPEG-style image DCT uses 8×8 pixel blocks. There is one filter per DCT basis. After each filter, a downsampler keeps every 8th sample, which is the same as one coefficient per 8-sample stride in that sub-band.

That downsampler keeps every 8th sample and drops the rest, so each filter yields one coefficient per 8-sample block.

Viewed that way, the DCT is a filter bank whose outputs are the DCT coefficients of each block.

Advantages of a DCT Filter Bank

Properties often cited for a DCT bank:

  • An orthogonal DCT is an invertible square matrix, so a matching inverse (synthesis) bank exists for perfect reconstruction when coefficients are not quantized.
  • A real DCT costs less than a complex DFT of the same length for real data.

Polyphase Filter Banks

A polyphase filter bank (PFB) combines a multirate prototype with a DFT to extract sub-bands, which costs less than running M separate bandpass filters.

A plain DFT (or FFT channelizer with a rectangular window) leaks energy between bins and has scalloping loss when a tone sits between bin centres.

A well-designed PFB prototype flattens the response across each channel and raises stopband attenuation so out-of-band tones are rejected more than in a raw DFT.

The usual implementation splits a prototype lowpass filter into polyphase branches, then a DFT (FFT) modulates those branches into uniformly spaced channels.

The prototype window on the polyphase taps can be written as

    \begin{align*} y(n) = \sum_{p=0}^{P-1} x(n+pN)h(n+pN) \end{align*}

Here h(n+pN) are the coefficients of the P-tap polyphase sub-filters. Those N sub-filters plus the DFT stage are the PFB. The figure uses P=3 taps and N sub-filters, and it shows a typical PFB frequency response.

Polyphase Filter Bank Structure
Polyphase Filter Bank Structure
Frequency Response of a Polyphase Filter Bank
Frequency Response of a Polyphase Filter Bank

Gabor Filter Banks

A Gabor filter bank is a set of Gabor kernels used to analyse an image at chosen frequencies and orientations.

Each Gabor filter is linear. Texture analysis uses it to test whether a local patch contains energy in a chosen frequency band and direction.

A Gabor kernel is a sinusoidal carrier under a Gaussian envelope. The sinusoid sets orientation and spatial frequency. The Gaussian localises the kernel. Real and imaginary parts form a quadrature pair (cosine and sine), not two spatial axes.

One common 2-D form is

    \begin{align*} g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = exp(\frac{{-x^'^2}{ +\gamma^2 y^'^2}}{2\sigma^2}) exp(i(\frac{2 \pi x^'}{\lambda}+{\psi})) \end{align*}

Gabor Function

You choose wavelength, orientation, phase offset and aspect ratio to build as many kernels as the task needs.

Many pipelines convolve with the real part of several kernels. From the complex response you can also take amplitude and phase. The figures below show image responses at different frequencies and a Gabor-bank frequency response.

Image Response of Different Gabor Filter Kernels
Image Response of a Different Filter Kernels
Frequency Response of a Gabor Filter Banks
Frequency Response of a Gabor Filter Bank

Some Gabor implementations subtract a DC term so a constant patch gives a near-zero response. Frequency and orientation tuning resembles simple cells in the visual cortex, only as an analogy.

Mel Filter Banks

A Mel filter bank is a set of overlapping triangular filters spaced on a Mel scale. That scale follows the ear more closely than linear Hertz: finer spacing at low frequency, coarser at high frequency.

Each triangle integrates power in one Mel band and so traces a coarse spectral envelope. The block diagram below is a common path from a speech frame to Mel-frequency cepstral coefficients (MFCCs).

Diagram of a Mel Filter Bank
Block Diagram of How Mel Filter Bank Works

A typical front end applies a pre-emphasis filter, then cuts the waveform into overlapping frames and windows each frame. Pre-emphasis boosts high frequencies, which often have smaller magnitude than low frequencies, and can raise SNR for that part of the spectrum.

A DFT of each windowed frame (a short-time Fourier transform) yields a magnitude or power spectrum. Stacking adjacent frames gives a spectrogram of the utterance.

MFCCs are usually the first few DCT coefficients of the log Mel-filterbank energies (a DCT is the usual choice; some texts write it as a real IDFT). Higher coefficients are often discarded.

The Mel bank itself is those triangular filters, applied to the power spectrum before the log and DCT. One common Hertz-Mel pair (HTK / O’Shaughnessy) is stored below. Other toolkits use a piecewise Slaney scale instead.

    \begin{align*} Mel(m) = 2595 log_1_0(1+\frac{f}{700}) \end{align*}

    \begin{align*} Frequency(f) = 700 (10^\frac{m}{2595} - 1) \end{align*}

Each Mel filter is a triangle that peaks at 1 at its centre frequency and falls linearly to 0 at the centres of the two neighbouring filters.

The Mel spectrum after those triangles can be written as

    \begin{align*} {S^~}(l) = \sum_{k=0}^\frac{N}{2} S(k)M_l(k) \end{align*}

Mel Spectrum

Each Mel band m1, m2, m3,……,mM therefore has its own triangle. The figure below shows a full Mel filter-bank response.

Mel-scaled Filter Bank
Mel-scaled Filter Bank

Filter Bank Multicarrier (FBMC)

FBMC (filter-bank multicarrier) is a multicarrier scheme that splits data onto many well-filtered subcarriers. Each subcarrier is shaped by a prototype filter, so the spectrum is divided into narrow subchannels with less leakage than a rectangular OFDM symbol.

In OFDM the subcarrier frequency response is a sinc, so sidelobes leak and unsynchronized neighbours can interfere.

FBMC uses longer prototype filters so each subcarrier is better localized. That reduces egress into adjacent channels and ingress from them. It usually omits OFDM’s cyclic prefix, at the cost of more filter delay and more complex offset-QAM or similar mapping.

The graph below compares the two. OFDM sidelobes spread on both sides of each carrier. An FBMC prototype can suppress those sidelobes. They are reduced, not removed to zero in a real radio.

Comparison of a Frequency Response Between OFDM and FBMC
OFDM Vs FBMC

FBMC prototypes are usually FIR so linear phase is easy to keep. IIR designs can be made approximately linear-phase but are less common here. Spectral containment can let you pack carriers closer or drop the cyclic prefix. That can raise useful throughput in a given band. It is not an automatic higher bit rate than a well-designed OFDM system with the same overhead.

DFT Filter Banks

A sliding DFT bank can be built from length-M FIR bandpass filters. Each branch is a complex demodulator followed by a running-sum (or other) lowpass filter.

A DFT bank is the complex-valued counterpart of the DCT bank.

The diagram below is an N-channel DFT bank that uses length-M FIR running-sum lowpass filters.

DFT Filter Bank
DFT Filter Bank

The kth channel of that diagram computes

(1)   \begin{equation*} H_k(z) = \sum_{m=n-(M-1)}^{M} x(m) e^-^j^{\omega_k}^m \end{equation*}

The length-M DFT is

(2)   \begin{equation*} X(k) = \sum_{n=0}^{M-1} x(n) e^\frac{^-^2^\pi^n^k}{M} \end{equation*}

X(k) is the frequency-domain bin.

x(n) is the time-domain sample.

Compare (1) and (2): the filter-bank output H_k(z) (k=0,1, 2…, M-1) equals the DFT of the input at time n=M-1, so

(3)   \begin{equation*} X(k) = Z_k (M-1) \end{equation*}

At n=M-1 the bank output is the DFT of the first M samples of x(n) (n=0,1, 2…, M-1). All channels at that instant are that length-M DFT.

So a sliding DFT is a filter bank whose analysis filters are H_k(z). The figure below shows a typical DFT-bank frequency response.

Frequency Response of a DFT Filter Bank
Frequency Response of a DFT Filter Bank

Uniform DFT Filter Bank

An M-channel bank (M>1) is a uniform DFT filter bank when every branch comes from H_0(z) by H_k(z) = H_0(zw^k), 0<=k<=M-1. H_0(z) is the prototype filter.

Then H_k(e^j^\omega) = H_0 e^j^(^\omega^-^\frac{2\pi k}{M}^) so H_k(z) is a uniform shift of H_0(e^j^\omega). The figure below is a typical uniform DFT bank with low-pass H_k(z) as the prototype shape.

Frequency Response of a Uniform DFT Filter Bank
Frequency Response of a Uniform DFT Filter Bank

Advantages of Filter Bank

Uses that follow from the structure:

  • A long prototype can give narrow channels with low spectral leakage.
  • Flatter channel passbands make tone peaks less sensitive to bin-centre offset than a raw DFT.
  • Better stopbands give a more consistent out-of-band noise floor in each channel.
  • Non-uniform banks can give different resolution in different bands, which audio analysers use.

Applications of Filter Banks

Common applications:

  • Banks compress a signal when some bands matter more than others. Uses include speech coding, image compression, communications, antenna arrays, analog voice-privacy systems and digital audio.
  • A graphic equalizer is an analysis-synthesis bank that gains each band before reconstruction.
  • Other uses include transmultiplexers, sub-band adaptive filters and vocoders. A channel vocoder measures and then controls the amplitude of each sub-band of the carrier.
  • JPEG applies an 8×8 DCT (a block transform that can be viewed as a filter bank) and then quantizes those coefficients.
  • MDCT banks (a related cosine transform) appear in many audio codecs. A plain DCT also appears in speech and radio processing.
  • FBMC channelizers are also used for spectrum sensing because each subcarrier already has a narrow, well-filtered response.
  • Document analysis has used Gabor banks to help identify the script of a word on a multilingual page.
  • Gabor banks decompose an image into oriented sub-bands for texture analysis, edge detection, feature extraction and related vision tasks.
Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.