Main Content

Parametric Equalizer Design

Design tunable parametric equalizer coefficients

Since R2024a

  • Parametric Equalizer Design block icon

Libraries:
Audio Toolbox / Filters

Description

The Parametric Equalizer Design block designs a parametric equalizer with the specified filter order, gain, and either of these parameter combinations:

  • Center frequency and bandwidth

  • Center frequency and quality factor

  • Center frequency and octave bandwidth

  • Band edge frequencies

The block outputs filter coefficients of cascaded second-order section (SOS) or fourth-order section (FOS) filters, which you can use with the Second-Order Section Filter or Fourth-Order Section Filter blocks to filter audio signals. You can tune the filter parameters during simulation.

Examples

expand all

Use the Parametric Equalizer Design block to design a parametric equalizer and pass the coefficients to a Second-Order Section Filter block to filter a signal of random noise. Tune the filter parameters using the dashboard controls and see how the spectrum of the filtered signal changes.

Ports

Input

expand all

Use this port to specify the value of the Filter order parameter.

Dependencies

To enable this port, select the Specify filter order from input port parameter.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Use this port to specify the value of the Gain (dB) parameter.

Dependencies

To enable this port, select the Specify gain from input port parameter.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Use this port to specify the value of the Normalized center frequency parameter.

Dependencies

To enable this port, select the Specify normalized center frequency from input port parameter. This port does not apply (since R2026a) when you set the Specification parameter to Band edge frequencies.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Use this port to specify the value of the Normalized bandwidth parameter.

Dependencies

To enable this port, set the Specification parameter to Center frequency and bandwidth and select the Specify normalized bandwidth from input port parameter.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Since R2026a

Use this port to specify the value of the Quality factor parameter.

Dependencies

To enable this port, set the Specification parameter to Center frequency and quality factor and select the Specify quality factor from input port parameter.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Since R2026a

Use this port to specify the value of the Octave bandwidth parameter.

Dependencies

To enable this port, set the Specification parameter to Center frequency and octave bandwidth and select the Specify octave bandwidth from input port parameter.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Since R2026a

Use this port to specify the value of the Band edge frequencies parameter.

Dependencies

To enable this port, set the Specification parameter to Band edge frequencies and select the Specify band edge frequencies from input port parameter.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output

expand all

Numerator filter coefficients, returned as a matrix.

  • For SOS filters, the block returns the coefficients as an N-by-3 matrix.

  • For FOS filters, the block returns the coefficients as an N-by-5 matrix.

N is the number of filter sections and depends on the Maximum filter order parameter. If Filter order is less than the Maximum filter order, then the block sets the unused sections to pass-through sections.

Dependencies

Data Types: single | double

Denominator filter coefficients, returned as a matrix.

  • For SOS filters, the block returns the coefficients as an N-by-3 matrix.

  • For FOS filters, the block returns the coefficients as an N-by-5 matrix.

N is the number of filter sections and depends on the Maximum filter order parameter. If Filter order is less than Maximum filter order, then the block sets the unused sections to pass-through sections.

Dependencies

Data Types: single | double

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Select this parameter to gradually change a filter parameter to the new value when tuning it. If you clear this parameter, the tuned parameter immediately switches to the new value. Specify the level of smoothing with the Smoothing factor parameter.

Smoothing factor for tuned parameters, specified as a scalar in the range [0,1). As the smoothing factor approaches 1, a tuned parameter changes more gradually to the new value. A smoothing factor of 0 is equivalent to no smoothing.

For more information about smoothing, see Smoothing.

Tunable: Yes

Dependencies

To enable this parameter, select the Smooth tuned filter parameters parameter.

Maximum filter order of the designed coefficients, specified as a positive even integer. The Filter order parameter cannot exceed this value.

When you select this parameter, an additional input port, N, is added to the block.

Filter order of designed coefficients, specified as a positive even integer.

Tunable: Yes

Dependencies

  • To enable this parameter, clear the Specify filter order from input port parameter.

  • The value of this parameter cannot exceed Maximum filter order.

When you select this parameter, an additional input port, G, is added to the block. Use this port to specify the gain of the filter.

Gain of the filter in dB, specified as a real scalar.

Tunable: Yes

Dependencies

To enable this parameter, clear the Specify gain from input port parameter.

Since R2026a

When you select this parameter, an additional input port, Fc, is added to the block.

Dependencies

This parameter does not apply when you set the Specification parameter to Band edge frequencies. (since R2026a)

Normalized center frequency of the filter, specified as a scalar in the range [0,1] where 1 corresponds to the Nyquist frequency.

Tunable: Yes

Dependencies

To enable this parameter, clear the Specify normalized center frequency from input port parameter. This parameter does not apply (since R2026a) when you set the Specification parameter to Band edge frequencies.

When you select this parameter, an additional input port, BW, is added to the block.

Dependencies

To enable this parameter, set the Specification parameter to Center frequency and bandwidth.

Normalized bandwidth of the filter, specified as a scalar in the range [0,1], where 1 corresponds to the Nyquist frequency.

Normalized bandwidth is measured at gain/2 dB. If gain is set to -Inf (notch filter), normalized bandwidth is measured at the 3 dB attenuation point: 10 × log100.5.

Tunable: Yes

Dependencies

To enable this parameter, set the Specification parameter to Center frequency and bandwidth and clear the Specify normalized bandwidth from input port parameter.

Since R2026a

Select this parameter to specify the quality factor through the input port Q.

Dependencies

To enable this parameter, set the Specification parameter to Center frequency and quality factor.

Since R2026a

Quality factor of the filter, specified as a scalar.

Tunable: Yes

Dependencies

To enable this parameter, set the Specification parameter to Center frequency and quality factor and clear the Specify quality factor from input port parameter.

Since R2026a

Select this parameter to specify the octave bandwidth through the input port O.

Dependencies

To enable this parameter, set the Specification parameter to Center frequency and octave bandwidth.

Since R2026a

Octave bandwidth of the filter, specified as a scalar.

Tunable: Yes

Dependencies

To enable this parameter, set the Specification parameter to Center frequency and octave bandwidth and clear the Specify octave bandwidth from input port parameter.

Since R2026a

Select this parameter to specify the band edge frequencies through the input port Fedge.

Dependencies

To enable this parameter, set the Specification parameter to Band edge frequencies.

Since R2026a

Band edge frequencies of the filter, specified as a two-element vector.

Tunable: Yes

Dependencies

To enable this parameter, set the Specification parameter to Band edge frequencies and clear the Specify band edge frequencies from input port parameter.

Form of cascaded filter sections, specified as Second-order sections for SOS filters or Fourth-order sections for FOS filters.

Data type of output coefficients, specified as double or single.

Sample time of the block, in seconds, specified as -1 or a positive scalar. Setting this parameter to -1 means Simulink determines the sample time automatically for you. You can set this parameter to enable the design block to run at a slower rate than the filtering block.

  • Interpreted execution –– Simulate model using the MATLAB® interpreter. This option shortens startup time but has a slower simulation speed than Code generation. In this mode, you can debug the source code of the block.

  • Code generation –– Simulate 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.

Block Characteristics

Data Types

double | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Algorithms

expand all

References

[1] Orfanidis, Sophocles J. "High-Order Digital Parametric Equalizer Design." Journal of the Audio Engineering Society. Vol. 53, November 2005, pp. 1026–1046.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2024a

expand all