Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandpass filter frequency settings #13

Closed
tontush opened this issue Apr 29, 2019 · 6 comments
Closed

Bandpass filter frequency settings #13

tontush opened this issue Apr 29, 2019 · 6 comments

Comments

@tontush
Copy link

tontush commented Apr 29, 2019

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

@berndporr
Copy link
Owner

berndporr commented Apr 29, 2019

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.

@tontush
Copy link
Author

tontush commented Apr 30, 2019 via email

@berndporr
Copy link
Owner

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

@tontush
Copy link
Author

tontush commented May 1, 2019

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

@berndporr
Copy link
Owner

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.

@tontush
Copy link
Author

tontush commented May 1, 2019

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants