Octave Filter Bank
Octave-band and fractional octave-band filter bank
Audio Toolbox / Filters
The Octave Filter Bank block decomposes a signal into octave or fractional-octave subbands. An octave-band is a frequency band where the highest frequency is twice the lowest frequency. Octave-band and fractional octave-band filters are commonly used to mimic how humans perceive loudness.
Port_1 — Input signal
vector | matrix
Vector input –– The block treats the input as a single channel.
Matrix input –– The block treats each column of the input as an independent channel.
Port_1 — Output signal
matrix | 3-D array
The Octave Filter Bank block outputs a signal with the same data type as the input signal. The shape of the output depends on the shape of the input, the number of filters in the bank, and whether or not you enable the Bands as separate output ports parameter.
If F is the number of filters in the bank, and the input signal is an L-by-C matrix, then the block returns an L-by-F-by-C array. If C is 1, then the block outputs a matrix.
Vector input –– When you provide a vector input, the block outputs an L-by-F matrix, where L is the number of elements in the vector and F is the number of filters in the bank.
Matrix input –– When you provide a matrix input, the block outputs a 3-D array with size L-by-F-by-C, where C is the number of channels in the matrix input.
When you enable the Bands as separate output ports parameter, each output is the same size as the input.
Bandwidth (octaves) — Bandwidth of filters specified in octaves
1 octave (default) |
2/3 octave |
1/2 octave |
1/3 octave |
1/6 octave |
1/12 octave |
1/24 octave |
Filter bandwidth in octaves, specified as
Frequency range (Hz) — Frequency range of filter bank (Hz)
[22 22050] (default) | two-element row vector of positive monotonically increasing values
Frequency range of the filter bank in Hz, specified as a two-element row vector of positive monotonically increasing values. The block places filter bank center frequencies according to the Bandwidth (octaves), Reference frequency (Hz), and Octave ratio base parameters. Filters that have a center frequency outside of Frequency range (Hz) are ignored.
Reference frequency (Hz) — Reference frequency of filter bank (Hz)
1000 (default) | positive integer scalar
Reference frequency of the filter bank in Hz, specified as a positive integer scalar. The reference frequency defines one of the center frequencies. All other center frequencies are set relative to the reference frequency.
Filter order — Order of octave filters
12 (default) | positive even integer
Order of the octave filters, specified as a positive even integer. The filter order applies to each individual filter in the bank.
The default filter order for the
octaveFilterBank object is
Octave ratio — Distance between filters
Base ten (ANSI S1.11 preferred) (default) |
Base two (musical scale)
Octave ratio base, specified as
Base ten (ANSI S1.11
Base two (musical scale). The
octave ratio base determines the distribution of the center frequencies of the octave
filters. The ANSI S1.11 standard recommends base 10. Base 2 is popular for music
applications. Base two (musical scale) defines an octave as a
factor of 2, and Base ten (ANSI S1.11 preferred) defines an octave
as a factor of 10 0.3.
Inherit sample rate from input — Allow sample rate to be set by input signal
off (default) |
When you select this parameter, the block inherits its sample rate from the input signal. When you clear this parameter, you specify the sample rate in the Input sample rate (Hz) parameter.
Input sample rate (Hz) — Sample rate of input
44100 (default) | positive scalar
When you select this parameter, the block accepts the sample rate from the user.
To enable this parameter, clear the Inherit sample rate from input parameter.
Bands as separate output ports — One output port per filter band
off (default) |
When you select this parameter, the block provides an output port for each filter in the bank. Each output port is labeled with the center frequency of the filter and has a size identical to the input signal.
Simulate using — Specify type of simulation to run
Interpreted execution (default) |
Code generation–– Simulate the model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations as long as the model does not change. This option requires additional startup time.
Interpreted execution–– Simulate the model using the MATLAB® interpreter. In this mode, you can debug the source code of the block.
View filter response — Open plot to visualize magnitude response
Octave filters are best understood when viewed on a logarithmic scale, which models how the human ear weights the spectrum. The block uses a 2048-point FFT to calculate the magnitude response. The filter bank's response is displayed on a log-frequency scale with a legend to indicate the center frequency of each filter.
A band edge frequency refers to the lower or upper edge of the passband of a bandpass filter.
Center Frequency of Octave Filter
The center frequency of an octave filter is the geometric mean of the lower- and upper-band edge frequencies.
The Octave Filter Bank block is implemented as a parallel structure of
octave filters. Individual octave filters are designed as described by
octaveFilter. By default, the octave filter bank center frequencies are placed as
specified by the
ANSI S1.11-2004 standard. You can modify the filter
placements using the Bandwidth (octaves), Frequency range
(Hz), Reference frequency (Hz), and Octave
Octave Bandwidth to Band Edge Conversion
The Octave Filter Bank block uses the specified Frequency range (Hz) and Bandwidth (octaves) to determine the normalized band edges .
First the block computes the upper and lower band edge frequencies:
fc is the normalized center frequency specified by the Bandwidth (octaves) and Frequency range (Hz) parameters.
b is the octave bandwidth specified by the Bandwidth (octaves) parameter. For example, if Bandwidth (octaves) is specified as
1/3 octave, the value of b is 3.
G is a conversion constant:
Digital Filter Design
The Octave Filter Bank block implements a higher-order digital bandpass filter design method as specified in .
In this design method, a desired digital bandpass filter maps to a Butterworth lowpass analog prototype, which is then mapped back to a digital bandpass filter:
The analog Butterworth filter is expressed as a cascade of second-order sections:
N is the filter order specified by the Filter order parameter.
The analog Butterworth filter is mapped to a digital filter using a bandpass version of the bilinear transformation:
This mapping results in the following substitution:
The analog prototype is evaluated:
Because s is second-order in z, the bandpass version of the bilinear transformation is fourth-order in z.
, Sophocles J. Introduction to Signal Processing. Englewood Cliffs, NJ: Prentice Hall, 2010.
 Acoustical Society of America. American National Standard Specification for Octave-Band and Fractional-Octave-Band Analog and Digital Filters: ANSI S1.11-2004. Melville, NY: Acoustical Society of America, 2009.