Converting from samplerate/cutoff frequency to pi-radians/sample in a discrete time sampled IIR filter system.
- by Fake Name
I am working on doing some digital filter work using Python and Numpy/Scipy.
I'm using scipy.signal.iirdesign to generate my filter coefficents, but it requires the filter passband coefficents in a format I am not familiar with
wp, ws : float
Passband and stopband edge frequencies, normalized from 0 to 1 (1 corresponds
to pi radians / sample).
For example:
Lowpass: wp = 0.2, ws = 0.3
Highpass: wp = 0.3, ws = 0.2
(from here)
I'm not familiar with digital filters (I'm coming from a hardware design background). In an analog context, I would determine the desired slope and the 3db down point, and calculate component values from that.
In this context, how do I take a known sample rate, a desired corner frequency, and a desired rolloff, and calculate the wp, ws values from that?
(This might be more appropriate for math.stackexchange. I'm not sure)