dsp.ParametricEQFilter
(Removed) Tunable secondorder parametric equalizer filter
The dsp.ParametricEQFilter
object has been removed. Use the
designParamEQ
function or the
MultibandParametricEQ
object from Audio Toolbox™ instead. For more information, see Compatibility Considerations.
Description
The dsp.ParametricEQFilter
object is a tunable, secondorder parametric
equalizer filter.
To apply the filter to each channel of the input:
Define and set up your equalizer filter. See Construction.
Call
step
to filter each channel according to the properties ofdsp.ParametricEQFilter
. The behavior ofstep
is specific to each object in the toolbox.
Note
Starting in R2016b, instead of using the step
method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For
example, y = step(obj,x)
and y = obj(x)
perform
equivalent operations.
Construction
H = dsp.ParametricEQFilter
returns a secondorder parametric
equalizer filter that independently filters each channel of the input over time, using the
default values for Bandwidth
, CenterFrequency
, and
PeakGaindB
. The center frequency
and
bandwidth
are specified in Hz and are tunable. The peak
gain
(dip) is specified in dB and is also tunable. The
bandwidth
is measured at the arithmetic mean between the
peak gain
in absolute power units and one.
H = dsp.ParametricEQFilter('Specification', 'Quality
factor and center frequency')
specifies the quality factor (Q factor) of the filter. The Q factor
is
defined as the center frequency/bandwidth. A higher Q factor
corresponds
to a narrower peak/dip. The Q factor should be a scalar value greater than 0. The Q factor
is tunable.
H = dsp.ParametricEQFilter('Specification', 'Coefficients')
specifies the gain values for the bandwidth and center frequency. This removes the
trigonometry calculations involved when the properties are tuned. The
CenterFrequencyCoefficient
should be a scalar between 1 and 1, with
1 corresponding to 0 Hz, and 1 corresponding to the Nyquist frequency. The
BandwidthCoefficient
should be a scalar between 1 and 1, with 1
corresponding to the largest bandwidth, and 1 corresponding to the smallest bandwidth. In
this mode, the peak gain is specified in linear units rather than dB.
H = dsp.ParametricEQFilter('Name', Value, ...)
returns a parametric
equalizer filter with each specified property name set to the specified value. You can
specify several namevalue pair arguments in any order as
('Name1',Value1,...,'NameN',ValueN)
.
Properties

Design parameters or coefficients that specify the filter Choose one of the following
The default value is Using 

bandwidth of filter Specify the bandwidth of the filter as a finite positive numeric scalar that is
less than half the sample rate of the input signal, in Hz. This property is
applicable if 

Coefficient for bandwidth of filter Specify the value that determines the filter's bandwidth as a finite numeric
scalar in the range
This property is only applicable if


Center frequency of the filter Specify the filter's center frequency as a finite positive numeric scalar that
is less than half the sample rate of the input signal, in Hz. This property is
only applicable if 

Coefficient for center frequency of filter Specify the value that determines the filter's center frequency as a finite numeric scalar between 1 and 1:
This property is only applicable if
This property is tunable. 

Peak or dip gain of the filter in linear units Specify the filter’s peak or dip gain in linear units. A value greater than one boosts the signal. A value less than one attenuates the signal. The default is 2 (6.0206 dB). This property is tunable. 

Peak or dip gain of the filter in dB Specify the filter’s peak or dip gain in dB. A positive value boosts the
signal. A negative value attenuates the signal. The default is


Quality factor of the parametric EQ filter Specify the Quality factor (Q factor) of the filter. The Q factor is defined as
the center frequency divided by the bandwidth. A higher Q factor corresponds to a
narrower peak or dip. This property is only applicable if


Input sample rate Specify the sample rate of the input as a finite numeric scalar, in Hz. The
default is 
Methods
getBandwidth  Convert quality factor or bandwidth coefficient to bandwidth in Hz 
getCenterFrequency  Convert center frequency coefficient to frequency in Hz 
getOctaveBandwidth  Measure bandwidth of parametric equalizer filter in octaves 
getPeakGain  Convert peak or notch gain from dB to absolute units 
getPeakGaindB  Convert peak or notch gain from absolute units to dB 
getQualityFactor  Convert bandwidth to quality factor 
reset  Reset states of ParametricEQFilter object 
step  Filter input with ParametricEQFilter object 
tf  Compute transfer function 
Common to All System Objects  

release  Allow System object property value changes 
Examples
Algorithm
The parametric equalizer is formed by a linear combination of a peak and a notch filter.
See the Algorithm section of dsp.NotchPeakFilter
for details.
$$H(z)={H}_{notch}(z)+G{H}_{peak}(z)$$
Here is a graph of the two cases (boost and cut) of the magnitude squared of the transfer functions:
The transfer function can be written as:
$$\begin{array}{l}H(z)=\frac{(\frac{1+G\gamma}{1+\gamma})2(\frac{\mathrm{cos}{\omega}_{0}}{1+\gamma}){z}^{1}+(\frac{1G\gamma}{1+\gamma}){z}^{2}}{12(\frac{\mathrm{cos}{\omega}_{0}}{1+\gamma}){z}^{1}+(\frac{1\gamma}{1+\gamma}){z}^{2}}\\ where\\ \gamma =\mathrm{tan}(\frac{\Delta \omega}{2})\\ and\\ {G}_{B}{}^{2}=\frac{1+{G}^{2}}{2}\end{array}$$
G is the parametric equalizer gain, and G_{B} is the bandwidth gain, that is, the gain level at which the bandwidth Δω is measured.
The dsp.NotchPeakFilter
that does most of the work is
implemented in a decoupled way so that the center frequency can be tuned independently from
the bandwidth. Note that the Q factor is defined as center frequency/bandwidth.
References
[1] Orfanidis, Sophocles J. Introduction to Signal Processing Upper Saddle River, NJ: PrenticeHall, 1996