Bandpass filter frequency settings
tontush opened this issue · 6 comments
It looks as if the Bandpass Filter sets upper and lower frequencies symmetrically (arithmetic mean) around the centre frequency, width defined by the widthFrequency - is that correct?
For an Octave Band Filter I need a Geometric Mean centre frequency - the upper frequency cut-off to be further away from the centre frequency than the lower frequency cut-off
Does the IIRS filter library allow for this type of bandpass filter? Thank you, Michael
At the end you can always convert it to f1 = f0 - 1/2 bw and f2 = f0 + 1/2 bw and then work out the new centre frequency. Internally the BP is generated by transforming a lowpass response into a BP response:
https://dsp.stackexchange.com/questions/22016/how-is-the-lowpass-to-bandpass-transformation-derived
The bandwidth is defined by the lowpass cutoff and the centre frequency by the shift variable f0. In fact a lowpass is actually a bandpass if you take into account the negative frequencies with centre frequency at f0=0! So the bandpass transform just won't need to do much. This also means that if you use a 4th order bandpass or a chain of two 2nd order high/lowpass filters won't make a difference.
Check this out: It's basically shifting a lowpass in the frequency domain:
http://slideplayer.com/slide/4468758/14/images/21/Low+Pass+to+Band+Pass:+The+tranformation+maps.jpg
Sorry that's too abstract for me! I just want to find out if i can specify the lower and upper frequencies, rather than centre freq +bandwidth approach - anyway thanks for your time
Short answer: no. The whole internal calc works with center/bandwidth. It never has f1/f2 at any point so just use your formulas above to map from f1/f2 to f0/bw.
Thank you