How this calculation works
Design an odd-length symmetric FIR filter by bounded weighted minimax exchange and inspect the alternating band error.
A(f)=h_m+2 sum_(k=1)^m h_(m-k) cos(2pi k f); minimize max_f |W(f)(A(f)-D(f))| on specified bands.A worked example
For five taps and equally weighted bands [0,0.15] at gain 1 and [0.35,0.5] at gain 0, the optimum is approximately [0,0.314904046,0.5,0.314904046,0], with ripple 0.129808092.
Good to know
Odd tap counts5–41, 2–4 nonoverlapping normalized bands and piecewise constant desired gains/positive weights. Bounded Parks–McClellan exchange, dense independent extremum refinement, linear-phase/alternation checks and honest nonconvergence. No transition-band guarantee, IIR design or formal arbitrary-frequency error certificate without support.
Reference: Primary method or official documentation (opens in a new tab) ↗
A weighted minimax FIR design
A finite impulse response filter is specified by a finite list of tap coefficients. This page designs an odd-length symmetric filter whose zero-phase amplitude best approximates piecewise constant desired gains on selected frequency bands. The objective is the smallest possible maximum weighted band error, rather than the smallest average squared error.
The term equiripple describes the alternating extreme error pattern at the minimax solution. A design can have very small average error while still missing this worst-case objective. The page therefore checks band extrema and alternation after its exchange calculation instead of substituting a least-squares filter and labeling it as an equiripple result.
Compare this with the Minimax polynomial approximation calculator on a closed interval. Design a symmetric finite impulse-response filter against weighted band specifications, rather than approximate an arbitrary real function by an ordinary monomial polynomial.
Specifying bands and normalized frequencies
Enter an odd tap count from five through forty-one. Each band row contains a start frequency, stop frequency, desired amplitude and positive error weight. Frequencies use cycles per sample, so zero is DC and one half is the Nyquist frequency. Ordered nonoverlapping bands define where the approximation is constrained; gaps are transition regions.
No gain or ripple guarantee is imposed inside those gaps. A plotted transition may look smooth, but its behavior is not part of the minimax constraints. Desired gains are real amplitudes, not decibels or power ratios. A larger weight penalizes the same amplitude error more strongly in that band, trading its unweighted ripple against the other bands.
Symmetry reduces the unknown coefficients
For N equal to two m plus one taps, symmetry leaves m plus one independent amplitude coefficients. After removing the linear phase delay, the response is a cosine polynomial. The center tap supplies the constant term, while twice each symmetric off-center tap multiplies a cosine at its corresponding integer frequency. This keeps the design real and linear phase.
The actual causal frequency response includes a phase factor corresponding to delay m samples. The zero-phase amplitude may become negative in a band, so it should not always be interpreted as a magnitude response. Symmetric taps establish the linear-phase structure, while the minimax objective applies to the stated real amplitude approximation over the specified bands.
Exchange iteration and independent extrema
A Parks-McClellan style exchange chooses a set of candidate extremal frequencies, solves for amplitude coefficients and a common alternating weighted error, then replaces those frequencies using extrema of the current error. The process is bounded by iteration and conditioning limits. A singular exchange system or a cycling extremal set must be reported as nonconvergence rather than concealed.
A dense frequency grid is useful for locating candidate extrema, but it is not a formal arbitrary-frequency proof. Refining extrema with derivative information and checking the required alternation makes the result substantially stronger. The output should state the observed ripple and verification resolution honestly, without presenting a finite grid maximum alone as an exact continuous-frequency certificate.
A five-tap design with a closed check
The default asks for gain one on frequencies zero through 0.15 and gain zero on 0.35 through one half, with equal weights. Symmetry of those bands makes the optimal cosine amplitude one half plus a times cosine of two pi f. Here a equals one divided by one plus cosine of 0.3 pi.
The taps are approximately [0,0.314904046,0.5,0.314904046,0]. The zero-phase amplitude alternates around its desired gains at the four band endpoints, with ripple approximately 0.129808092. Although five tap positions were requested, the outside pair is zero in this symmetric example. That is a valid optimum within the five-tap space, not a missing-coefficient error.
Checking the returned filter
Verify that mirrored taps agree and that evaluating their frequency response matches the cosine representation after removing the expected delay. Inspect the weighted error extrema in every constrained band, including band endpoints. The significant extrema should alternate in sign with nearly equal absolute heights, subject to supported degeneracies and the stated numerical tolerance.
An independent comparison with a trusted Remez implementation provides a useful numerical fixture, but taps need not be compared only by their rounded decimal strings. Compare the actual response and worst-case weighted error as well. Increasing the verification grid and refining extrema should leave the reported ripple stable; a material increase reveals that a previous grid missed a larger peak.
Using coefficients in an application
The taps describe a mathematical digital filter. Applying them requires a sample rate if frequencies must be interpreted in hertz. The filter delay is m samples, and startup transients depend on how an application handles unavailable past samples. This page does not choose padding, streaming state or a real-time processing architecture for the returned coefficients.
Quantizing coefficients for fixed-point hardware can change ripple and should be checked after quantization. The design also does not cover IIR filters, even-length symmetry classes, differentiators or Hilbert transformers under the current inputs. A successful bounded exchange result is accompanied by its convergence and extrema checks; an unresolved design should not be deployed as if those checks passed.
A few questions, answered
Are the frequencies in hertz?
They are cycles per sample. Multiply by the sample rate to obtain hertz.
Is the transition region constrained?
No. Only the supplied closed bands enter the stated minimax objective.
Why are the outer default taps zero?
The symmetric five-tap optimum for those bands has a vanishing second cosine term; zero outer taps are legitimate.
Does a finite grid prove the exact continuous optimum?
Not by itself. The page also refines extrema and checks alternation, and reports its numerical verification limits.