Guest

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

IIR Filters quality
March 5, 2015
7:02 am
disketto
Member
Members
Forum Posts: 10
Member Since:
January 29, 2015
Offline

Hi,
i am just approaching to IIR *Low Pass* filters and i am completely new(bie) to these arguments.
So i have some doubt about how things work.

1) Using the BiQuad with the Second order bi-linear and Massberg algorithms, i can't get the difference how this affects the overall sound of the filter.
Do they just tune the coefficients in a different way ?

2) For lowest frequency (100 Hz) and highest Q (20), i get clipping. I actually don't understand if it is just clipping due to the gain that Q peak adds, or it's that the algorithm as it is, can't compute precisely at such frequency/Q.
There is a way to smooth the output of the filter without losing the emphasis at cutoff frequency ?
Can this be achieved tuning the coefficients or with different algorithms ?

3) Hearing the behavior of some hardware low pass filter, i can hear that at lowest frequencies and high Q, it is like the output of the emphasized frequencies at cutoff have a bit more release time. I can kinda hear that also with these IIR low pass filters algorithms, but as i mentioned i obtain clipping as well. There are methods or algorithm optimizations to avoid the clipping ?

4) What would happen calling recursively the BiQuad for N times ? in a First order IIR filter would that be like feeding back N more past samples ?

Sorry for the lots of questions, i just want to understand more from a general point of view the relation cause-effect of the designs.
Thanks,
- Vito

March 6, 2015
11:35 pm
W Pirkle
Forum Posts: 247
Member Since:
January 29, 2017
Offline

Hi Vito

1) the Massberg filter has finite gain at Nyquist, so for high cutoff frequencies, there is more "air" in the output (more HFs). Whether this is audible might be the subject of debate/listening tests, but for sure it is closer to how the analog filter's output looks.

2) increasing the Q on "classical" filters as in the FX book is going to increase gain.

http://i.stack.imgur.com/FRJc4.jpg

With a Q = 20, the peak gain is about +24dB which is a huge amount; in my Synth book, I do over several other filters that mitigate this issue: the Moog Ladder and Diode Ladder both reduce overall gain as the Q is increased so they do not suffer from the clipping. The Korg35 filter uses a diode-clipper circuit to limit the overall gain as Q is increased. Doing this with the classical bilinear biquad filters is not difficult - as the Q increases, lower the overall gain by adding a gain coefficient in front of the whole H(z). You would need to experiment to get the kind of reduction you desire. Another option is to alter the a0 term (which controls gain) but you will need to alter a1 and a1 to become alpha1, alpha2 as per the book, chapter 5.

3) release time does not play a role in filters vs Q. Clipping can be avoided with 2) above.

4). You don't want to recursively call the biquad doFilter(). It should only be called once per sample period. If you want higher order filters, you cascade multiple filters together. This is a ton of information about that all over the internet and in nearly every DSP or Analog Filtering textbook.

- Will

March 7, 2015
3:23 pm
disketto
Member
Members
Forum Posts: 10
Member Since:
January 29, 2015
Offline

Hi Will,
Only one more thing.
i am afraid i am misunderstanding the concept of cascading the filters.

I mean, let's say that i want to put in cascade a Second order bilinear and a Massberg filter:
what it looks to me how it is done is: i will calculate the coefficients for Second order bilinear and then call the doBiQuad for that, get the result in a variable "A", then calculate the coefficients again for the Massberg filter, and call the doBiQuad(A) (feeding previous result from the doBiQuad).

But something looks kinda wrong in this way, because it looks like i am recursively calling the Biquad, just with different calculated coefficient.

Can you show me a quick example of the call flow ?

Thanks a milion,
Vito

March 8, 2015
12:01 am
W Pirkle
Forum Posts: 247
Member Since:
January 29, 2017
Offline

Hi Vito

You need one separate biquad object for each filter.

then set filter1's coefficients to bilinaer/biquad and filter2's coefficients to Massberg.

or nest them

- Wil

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: TheSmile
4 Guest(s)

1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 27

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 522

Moderators: 1

Forum Stats:

Groups: 11

Forums: 31

Topics: 545

Posts: 2134