EquirippleFilterKernel[{{{ωL1,ωR1},{ωL2,ωR2},…},{a1,a2,…}},n]
creates a finite impulse response (FIR) filter kernel of length n with an equiripple amplitude response, given the specified left and right band edge frequencies {ωLi,ωRi} and amplitudes ai.
EquirippleFilterKernel[{{{ωL1,ωR1},{ωL2,ωR2},…},{a1,a2,…},{w1,…}},n]
uses relative weights wi for each frequency band.
EquirippleFilterKernel[{"type",{{{ωL1,ωR1},…},…}},n]
creates a filter of the specified "type".
EquirippleFilterKernel
EquirippleFilterKernel[{{{ωL1,ωR1},{ωL2,ωR2},…},{a1,a2,…}},n]
creates a finite impulse response (FIR) filter kernel of length n with an equiripple amplitude response, given the specified left and right band edge frequencies {ωLi,ωRi} and amplitudes ai.
EquirippleFilterKernel[{{{ωL1,ωR1},{ωL2,ωR2},…},{a1,a2,…},{w1,…}},n]
uses relative weights wi for each frequency band.
EquirippleFilterKernel[{"type",{{{ωL1,ωR1},…},…}},n]
creates a filter of the specified "type".
Details and Options
- EquirippleFilterKernel returns a numeric list of length n of the impulse response coefficients of an FIR filter that has the minimum Chebyshev (minimax) error.
- Possible filter specification types are:
-
"Multiband" multiple passband and stopband filter specification (default) "Differentiator" differentiator filter "Hilbert" Hilbert filter - Frequencies should be given in an ascending order such that 0≤ωL1<ωR1<ωL2<ωR2<…<ωRk≤π.
- The lengths of the lists of frequency bands, amplitudes, and weights should be the same.
- Amplitude values should be non-negative. Typically, values ai=0 specify a stopband, and values ai=1 specify a passband.
- The kernel ker returned by EquirippleFilterKernel can be used in ListConvolve[ker,data] to apply the filter to data.
- The following options can be given:
-
"GridDensity" 8 frequency domain sampling density factor WorkingPrecision MachinePrecision precision to use in internal computations
Examples
open all close allBasic Examples (1)
Length-15 equiripple lowpass kernel:
h = EquirippleFilterKernel[{{{0, 1}, {1.4, Pi}}, {1, 0}}, 15]Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, Pi}]A Bode plot of the filter's frequency spectrum:
BodePlot[ListZTransform[h, z], {0, π}, SamplingPeriod -> 1, PlotLayout -> "Magnitude", ScalingFunctions -> {"Linear", Automatic}, GridLines -> Automatic, ImageSize -> Small]Scope (6)
An equiripple highpass FIR filter:
h = EquirippleFilterKernel[{{{0, (π/2) - 0.5}, {(π/2) + 0.5, π}}, {0, 1}}, 15]Bode plot of the frequency response of the filter:
BodePlot[ListZTransform[h, z], {0, π}, SamplingPeriod -> 1, PlotLayout -> "Magnitude", ScalingFunctions -> {"Linear", Automatic}, GridLines -> Automatic]Create an equiripple bandpass kernel:
h = EquirippleFilterKernel[{{{0, 1}, {1.2, 2.2}, {2.4, Pi}}, {0, 1, 0}}, 35];
BodePlot[ListZTransform[h, z], {0, π}, SamplingPeriod -> 1, PlotLayout -> "Magnitude", ScalingFunctions -> {"Linear", Automatic}, GridLines -> Automatic]Specify different band weights:
h = EquirippleFilterKernel[{{{0, 0.05}, {0.1, 0.15}, {0.18, 0.25}, {0.3, 0.36}, {0.41, 0.5}} 2 π, {0., 1., 0., 1., 0.}, {10., 1., 3., 1., 20.}}, 55];BodePlot[ListZTransform[h, z], {0, π}, SamplingPeriod -> 1, PlotLayout -> "Magnitude", ScalingFunctions -> {"Linear", Automatic}, GridLines -> Automatic]Create an even-length, full-band differentiator:
h = EquirippleFilterKernel[{"Differentiator", {{0, π}}, {1}}, 22];Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}, PlotRange -> {0, All}]h = EquirippleFilterKernel[{"Hilbert", {{0.1, 0.9 }π}, {1}}, 21];
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}, PlotRange -> {0, All}]Phase plot of a Hilbert transformer:
Plot[Arg[ListFourierSequenceTransform[h, ω, -10]], {ω, -π, π}, PlotRange -> All]Create an equiripple half-band lowpass filter:
h = EquirippleFilterKernel[{{{0, (π/2) - 0.5}, {(π/2) + 0.5, π}}, {1, 0}}, 15]Magnitude plot of the filter and the half-band frequency
:
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}, PlotRange -> All, Epilog -> {Red, Dashed, Line[{{π / 2, 0}, {π / 2, 1}}]}]Convert the half-band lowpass filter to highpass:
g = Table[(-1)^ih[[i]], {i, 15}]Magnitude plots of the two half-band filters:
Plot[Evaluate[Abs[ListFourierSequenceTransform[#, ω]]& /@ {h, g}], {ω, 0, π}, PlotRange -> All, Epilog -> {Red, Dashed, Line[{{π / 2, 0}, {π / 2, 1}}]}]Options (2)
GridDensity (1)
Use a less dense grid to increase the speed of computation:
AbsoluteTiming[EquirippleFilterKernel[{{{0, .2}, {.25, .5}}2π, {1, 0}}, 100, "GridDensity" -> #];]& /@ {2, 16}Coarse grids may not return the optimum solution:
filters = EquirippleFilterKernel[{{{0, .2}, {.25, .5}}2π, {1, 0}}, 100, "GridDensity" -> #]& /@ {2, 16};
Plot[Evaluate[20Log10[Abs[ListFourierSequenceTransform[#, x]]]], {x, 0, Pi}, PlotRange -> {-60, -120}, Exclusions -> False]& /@ filtersWorkingPrecision (1)
By default, MachinePrecision is used:
h = EquirippleFilterKernel[{{{0, 1 / 3}, {2 / 3, 1}}Pi, {1, 0}}, 4]g = EquirippleFilterKernel[{{{0, 1 / 3}, {2 / 3, 1}}Pi, {1, 0}}, 4, WorkingPrecision -> 1]Plot[Evaluate[Abs[ListFourierSequenceTransform[#, ω]]& /@ {h, g}], {ω, 0, π}]EquirippleFilterKernel[{{{0, 1 / 3}, {2 / 3, 1}}Pi, {1, 0}}, 4, WorkingPrecision -> ∞]//SimplifyApplications (4)
Create a differentiating filter and apply to a sinusoidal sequence:
x = N@Table[Sin[(2π/256) 6 n], {n, 0, 255}];h = EquirippleFilterKernel[{"Differentiator", {{0, 0.9π}}, {1}}, 21];
y = 2Rescale[ListConvolve[h, x, 11]] - 1;ListLinePlot[{x, y}]Create a differentiating filter and calculate the gradient of an image:
h = EquirippleFilterKernel[{"Differentiator", {{0, 0.9π}}, {1}}, 7]r = 5ImageConvolve[[image], {h}]//AbsColumn derivatives (enhanced):
c = 5ImageConvolve[[image], List /@ h]//AbsSqrt[r^2 + c^2]Create an orthogonal sequence to x using a Hilbert transformer:
x = N@Table[Sin[(2π/256) 6 n], {n, 0, 255}];h = EquirippleFilterKernel[{"Hilbert", {{0.1, 0.9}} π, {1}}, 21];
y = ListConvolve[h, x, 11];Show that the two sequences are orthogonal:
x.y//ChopCreate a list of Nyquist filters:
filters = EquirippleFilterKernel[{{{0, π / # - 0.1}, {π / # + 0.1, Pi}}, {1, 0}}, 31]& /@ {2, 3, 5};Plot[Evaluate[Abs[ListFourierSequenceTransform[#, x]]& /@ filters], {x, 0, π}, PlotLegends -> {2, 3, 5}]Properties & Relations (2)
Compare the stopband frequency response behavior of an equiripple (blue) and least-squares (red) realization of a filter:
f1 = EquirippleFilterKernel[{{{0, 1}, {1.4, Pi}}, {1, 0}}, 35];f2 = LeastSquaresFilterKernel[{{1.2}, {1, 0}}, 35];BodePlot[Evaluate[{ListZTransform[f1, z], ListZTransform[f2, z]}], {1.4, π}, SamplingPeriod -> 1, PlotRange -> {-60, 0}, PlotLayout -> "Magnitude", ScalingFunctions -> {"Linear", Automatic}, GridLines -> Automatic]In a half-band filter of length
, coefficients at positions
for positive integer values of
have zero values:
a = Chop[EquirippleFilterKernel[{{{0, (π/2) - 0.5}, {(π/2) + 0.5, π}}, {1, 0}}, 15], 0.0001]ListPlot[a, Axes -> {True, False}, Ticks -> False, PlotRange -> All, Filling -> 0]In a
-band filter, coefficients at positions
have zero values:
a = Chop[EquirippleFilterKernel[{{{0, (π/3) - 0.5}, {(π/3) + 0.5, π}}, {1, 0}}, 15], 0.0001]ListPlot[a, Axes -> {True, False}, Ticks -> False, PlotRange -> All, Filling -> 0]Possible Issues (4)
Neighboring bands cannot have the same amplitudes:
EquirippleFilterKernel[{{{0, 1}, {2, Pi}}, {1, 1}}, 21]Edge frequencies of neighboring bands should be distinct:
EquirippleFilterKernel[{{{0, 1}, {1, Pi}}, {1, 0}}, 21]Filter design using the equiripple method does not always converge:
EquirippleFilterKernel[{{{0, 0.5}, {1., 2.0}, {2.5, π}}, {0, 1, 0}, {1, 1, 1}}, 15]Substantially uneven transition bands in the Hilbert transformer will lead to an excessive ripple:
h = EquirippleFilterKernel[{"Hilbert", {{0.05, 0.4}}2Pi, {1}}, 31];
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, Pi}, PlotRange -> {0, All}, Exclusions -> False]Substantially uneven transition bands in multiband filters will lead to undesirable ripples:
h = EquirippleFilterKernel[{{{0., 0.5}, {1., 1.5}, {2.5, π}}, {0, 1, 0}}, 31];
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, Pi}, PlotRange -> {0, All}, Exclusions -> False]Related Guides
History
Text
Wolfram Research (2012), EquirippleFilterKernel, Wolfram Language function, https://reference.wolfram.com/language/ref/EquirippleFilterKernel.html.
CMS
Wolfram Language. 2012. "EquirippleFilterKernel." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/EquirippleFilterKernel.html.
APA
Wolfram Language. (2012). EquirippleFilterKernel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EquirippleFilterKernel.html
BibTeX
@misc{reference.wolfram_2026_equiripplefilterkernel, author="Wolfram Research", title="{EquirippleFilterKernel}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/EquirippleFilterKernel.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_equiripplefilterkernel, organization={Wolfram Research}, title={EquirippleFilterKernel}, year={2012}, url={https://reference.wolfram.com/language/ref/EquirippleFilterKernel.html}, note=[Accessed: 13-June-2026]}