Loadable Function: h = cl2bp (m, w1, w2, up, lo)
Loadable Function: h = cl2bp (m, w1, w2, up, lo, gridsize)

Constrained L2 bandpass FIR filter design. This is a fast implementation of the algorithm cited below. Compared to remez, it offers implicit specification of transition bands, a higher likelihood of convergence, and an error criterion combining features of both L2 and Chebyshev approaches.

Inputs:

m

degree of cosine polynomial, i.e. the number of output coefficients will be m*2+1

w1
w2

bandpass filter cutoffs in the range 0 <= w1 < w2 <= pi, where pi is the Nyquist frequency

up

vector of 3 upper bounds for [stopband1, passband, stopband2]

lo

vector of 3 lower bounds for [stopband1, passband, stopband2]

gridsize

search grid size; larger values may improve accuracy, but greatly increase calculation time. Default value is 2048, max value is 1e6.

Output:

A vector of m*2+1 FIR coefficients, or an empty value if the solver failed to converge.

Example:

h = cl2bp(30, 0.3*pi, 0.6*pi, [0.02, 1.02, 0.02], [-0.02, 0.98, -0.02], 2^11);

Original Paper: I. W. Selesnick, M. Lang, and C. S. Burrus. A modified algorithm for constrained least square design of multiband FIR filters without specified transition bands. IEEE Trans. on Signal Processing, 46(2):497-501, February 1998.

See also: remez.

Package: signal