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

iirlp2mb

IIR lowpass filter to IIR multiband


Description

Transform an IIR lowpass filter prototype to an IIR multiband filter.

Usage

iirlp2mb(b, ...)

## S3 method for class 'Arma'
iirlp2mb(b, Wo, Wt, type, ...)

## S3 method for class 'Zpg'
iirlp2mb(b, Wo, Wt, type, ...)

## S3 method for class 'Sos'
iirlp2mb(b, Wo, Wt, type, ...)

## Default S3 method:
iirlp2mb(b, a, Wo, Wt, type = c("pass", "stop"), ...)

Arguments

b

numerator polynomial of prototype low pass filter

...

additional arguments (not used)

Wo

(normalized angular frequency)/pi to be transformed

Wt

vector of (norm. angular frequency)/pi transform targets

type

one of "pass" or "stop". Specifies to filter to produce: bandpass (default) or bandstop.

a

denominator polynomial of prototype low pass filter

Details

The utility of a prototype filter comes from the property that all other filters can be derived from it by applying a scaling factor to the components of the prototype. The filter design need thus only be carried out once in full, with other filters being obtained by simply applying a scaling factor. Especially useful is the ability to transform from one bandform to another. In this case, the transform is more than a simple scale factor. Bandform here is meant to indicate the category of passband that the filter possesses. The usual bandforms are lowpass, highpass, bandpass and bandstop, but others are possible. In particular, it is possible for a filter to have multiple passbands. In fact, in some treatments, the bandstop filter is considered to be a type of multiple passband filter having two passbands. Most commonly, the prototype filter is expressed as a lowpass filter, but other techniques are possible[1].

Filters with multiple passbands may be obtained by applying the general transformation described in [2].

Because iirlp2mb is generic, it can be extended to accept other inputs.

Value

List of class Arma numerator and denominator polynomials of the resulting filter.

Author(s)

Alan J. Greenberger, alanjg@ptd.net.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

References

Examples

## Design a prototype real IIR lowpass elliptic filter with a gain of about
## –3 dB at 0.5pi rad/sample.
el <- ellip(3, 0.1, 30, 0.409)
## Create a real multiband filter with two passbands.
mb1 <- iirlp2mb(el, 0.5, c(.2, .4, .6, .8), 'pass')
## Create a real multiband filter with two stopbands.
mb2 <- iirlp2mb(el, 0.5, c(.2, .4, .6, .8), 'stop')
## Compare the magnitude responses of the filters.
hfl <- freqz(el)
hf1 <- freqz(mb1)
hf2 <- freqz(mb2)
plot(hfl$w, 20 * log10(abs(hfl$h)), type = "l",
    xlab = "Normalized frequency (* pi rad/sample)",
    ylab = "Magnitude (dB)")
lines(hf1$w, 20 * log10(abs(hf1$h)), col="red")
lines(hf2$w, 20 * log10(abs(hf2$h)), col="blue")
legend('bottomleft',
       legend = c('Prototype', 'Two passbands', 'Two Stopbands'),
       col=c("black", "red", "blue"), lty = 1)

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.