iirlp2mb {gsignal}R Documentation

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

[1] https://en.wikipedia.org/wiki/Prototype_filter
[2] https://en.wikipedia.org/wiki/Prototype_filter#Lowpass_to_multi-band

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)


[Package gsignal version 0.3-5 Index]