Octave-band and fractional octave-band filter
Audio Toolbox / Filters
The Octave Filter block performs octave-band or fractional octave-band filtering independently across each input channel. 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. Octave filters are best understood when viewed on a logarithmic scale, which models how the human ear weights the spectrum.
x— Input signal
Matrix input –– Each column of the input is treated as an independent channel.
1-D vector input –– The input is treated as a single channel.
This port is unnamed unless you specify additional input ports.
CF— Center frequency (Hz)
To enable this port, select Specify from input port for the Center frequency (Hz) parameter.
Port_1— Output signal
The Octave Filter block outputs a signal with the same data type as the input signal. The size of the output depends on the size of the input:
Matrix input –– The block outputs a matrix the same size and data type as the input signal.
1-D vector input –– The block outputs an N-by-1 matrix (column vector), where N is the number of elements in the 1-D vector.
If a parameter is listed as tunable, then you can change its value during simulation.
Filter order— Order of octave filter
6(default) | even integer
Center frequency (Hz)— Center frequency of octave filter
1000(default) | scalar in the range
The maximum center frequency is the value that causes the upper band edge to be equal to the Nyquist frequency, Fs/2. Frequencies above this value are saturated.
The minimum center frequency is the value that causes the lower band edge to be equal to 1 Hz. Frequencies below this value are quantized to 1 Hz.
To specify Center frequency (Hz) from an input port, select Specify from input port for the parameter.
Bandwidth— Filter bandwidth in octaves
1 octave(default) |
Oversample the input by 2 for this filter— Oversample toggle
off –– The Octave Filter block runs at the input sample rate.
on –– The Octave Filter block runs at two times the input sample rate. Oversampling minimizes the frequency warping effects introduced by the bilinear transformation. An FIR halfband interpolator implements oversampling before octave filtering. A halfband decimator reduces the sample rate back the input sampling rate after octave filtering.
Inherit sample rate from input— Specify source of input sample rate
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 Input sample rate (Hz).
Input sample rate (Hz)— Sample rate of input
44100(default) | scalar
To enable this parameter, clear the Inherit sample rate from input parameter.
Simulate using— Specify type of simulation to run
Code generation(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, but the speed of the
subsequent simulations is comparable to
Interpreted execution –– Simulate the
model using the MATLAB® interpreter. This option shortens startup time but has
a slower simulation speed than
generation. In this mode, you can debug the source
code of the block.
Mask for attenuation limits— Create a mask for filter response visualization
No mask(default) |
The mask attenuation limits are defined in the ANSI S1.11-2004 standard.
If the mask is green, the design is compliant.
If the mask is red, the design breaks compliance.
Visualize filter response— Open plot to visualize magnitude response and compliance mask
A 2048-point FFT is used to calculate the magnitude response.
A band edge frequency refers to the lower or upper edge of the passband of a bandpass filter.
The center frequency of an octave filter is the geometric mean of the lower- and upper-band edge frequencies.
The Octave Filter block uses the specified center frequency and filter bandwidth in 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 Center frequency (Hz) parameter.
b is the octave bandwidth specified by the
Bandwidth parameter. For example, if
Bandwidth is specified as
octave, the value of b is 3.
G is a conversion constant:
The Octave Filter 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.