ellipord | R Documentation |
Compute discrete elliptic filter order and cutoff for the desired response characteristics.
ellipord(Wp, Ws, Rp, Rs)
Wp , Ws |
pass-band and stop-band edges. For a low-pass or
high-pass filter, |
Rp |
allowable decibels of ripple in the pass band. |
Rs |
minimum attenuation in the stop band in dB. |
An object of class FilterOfOrder
with the following list elements:
n |
filter order |
Wc |
cutoff frequency |
type |
filter type, one of |
Rp |
dB of pass band ripple |
Rs |
dB of stop band ripple |
This object can be passed directly to ellip
to compute discrete filter coefficients.
Original Octave version by Paulo Neis p_neis@yahoo.com.br. Modified by Doug Stewart. Conversion to R by Tom Short.
Lamar, Marcus Vinicius, Notas de aula da disciplina TE 456 - Circuitos Analogicos II, UFPR, 2001/2002.
Octave Forge https://octave.sourceforge.io/
Arma
, filter
, butter
,
cheby1
, and ellipord
Fs <- 10000
elord <- ellipord(1000/(Fs/2), 1200/(Fs/2), 0.5, 29)
plot(c(0, 1000, 1000, 0, 0), c(0, 0, -0.5, -0.5, 0),
type = "l", xlab = "Frequency (Hz)", ylab = "Attenuation (dB)")
el1 <- ellip(elord)
plot(c(0, 1000, 1000, 0, 0), c(0, 0, -0.5, -0.5, 0),
type = "l", xlab = "Frequency (Hz)", ylab = "Attenuation (dB)",
col = "red", ylim = c(-35,0), xlim = c(0,2000))
lines(c(5000, 1200, 1200, 5000, 5000), c(-1000, -1000, -29, -29, -1000),
col = "red")
hf <- freqz(el1, Fs = Fs)
lines(hf$f, 20*log10(abs(hf$h)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.