Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cl2bp

Constrained L2 bandpass FIR filter design


Description

Constrained least square band-pass FIR filter design without specified transition bands.

Usage

cl2bp(m = 30, w1, w2, up, lo, L = 2048)

Arguments

m

degree of cosine polynomial, resulting in a filter of length 2 * m + 1. Must be an even number. Default: 30.

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 c(stopband1, passband, stopband2).

lo

vector of 3 lower bounds for c(stopband1, passband, stopband2).

L

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

Details

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

Value

The FIR filter coefficients, a vector of length 2 * m + 1, of class Ma.

Author(s)

Ivan Selesnick, Rice University, 1995, downloaded from https://www.ece.rice.edu/dsp/software/cl2.shtml.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

References

Selesnick, I.W., Lang, M., and Burrus, C.S. (1998) 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.
https://www.ece.rice.edu/dsp/software/cl2.shtml

See Also

Examples

w1 <- 0.3 * pi
w2 <- 0.6 * pi
up <- c(0.02, 1.02, 0.02)
lo <- c(-0.02, 0.98, -0.02)
h  <- cl2bp(30, w1, w2, up, lo, 2^11)
freqz(h)

gsignal

Signal Processing

v0.3-1
GPL-3
Authors
Geert van Boxtel [aut, cre] (Maintainer), Tom Short [aut] (Author of 'signal' package), Paul Kienzle [aut] (Majority of the original sources), Ben Abbott [ctb], Juan Aguado [ctb], Muthiah Annamalai [ctb], Leonardo Araujo [ctb], William Asquith [ctb], David Bateman [ctb], David Billinghurst [ctb], Juan Pablo Carbajal [ctb], André Carezia [ctb], Vincent Cautaerts [ctb], Eric Chassande-Mottin [ctb], Luca Citi [ctb], Dave Cogdell [ctb], Carlo de Falco [ctb], Carne Draug [ctb], Pascal Dupuis [ctb], John W. Eaton [ctb], R.G.H Eschauzier [ctb], Andrew Fitting [ctb], Alan J. Greenberger [ctb], Mike Gross [ctb], Daniel Gunyan [ctb], Kai Habel [ctb], Kurt Hornik [ctb], Jake Janovetz [ctb], Alexander Klein [ctb], Peter V. Lanspeary [ctb], Bill Lash [ctb], Friedrich Leissh [ctb], Laurent S. Mazet [ctb], Mike Miller [ctb], Petr Mikulik [ctb], Paolo Neis [ctb], Georgios Ouzounis [ctb], Sylvain Pelissier [ctb], Francesco Potortì [ctb], Charles Praplan [ctb], Lukas F. Reichlin [ctb], Tony Richardson [ctb], Asbjorn Sabo [ctb], Thomas Sailer [ctb], Rolf Schirmacher [ctb], Rolf Schirmacher [ctb], Ivan Selesnick [ctb], Julius O. Smith III [ctb], Peter L. Soendergaard [ctb], Quentin Spencer [ctb], Doug Stewart [ctb], P. Sudeepam [ctb], Stefan van der Walt [ctb], Andreas Weber [ctb], P. Sudeepam [ctb], Andreas Weingessel [ctb]
Initial release
2021-05-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.