BLT - prewarping Fc, Q or both (solved)

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

RBJ's EQ cookbooktakes into account only frequency prewarping when filter is build using

Code: Select all

case Q
for bandwidth.
Would Q prewarping bring any improvements if taken into cookbook implementations ?
Last edited by juha_p on Mon Jul 25, 2016 10:45 am, edited 2 times in total.

Post

I was thinking about that the other day as well, but haven't checked it out entirely. But I think that if you prewarp both cutoff and Q, that's equivalent to an impulse-invariant transform. At least with respect to the poles. In this case, you'd lose the nice properties of BLT.

Post

I'd prewarp the bacon first.

Post

hugoderwolf wrote:I was thinking about that the other day as well, but haven't checked it out entirely. But I think that if you prewarp both cutoff and Q, that's equivalent to an impulse-invariant transform. At least with respect to the poles. In this case, you'd lose the nice properties of BLT.
Having looked this up, indeed the impulse invariant method doesn't warp, but is a precise aliased version of the analogue filter.
https://ccrma.stanford.edu/~jos/pasp/Im ... ethod.html

Post

Ninja_Edit wrote: Having looked this up, indeed the impulse invariant method doesn't warp, but is a precise aliased version of the analogue filter.
https://ccrma.stanford.edu/~jos/pasp/Im ... ethod.html
Yep, in the end it's all about how positions of poles and zeros are mapped. There's BLT and II where both get mapped in the same way. Most other methods out there (matched-z and friends) are in the end some kind of hybrid.

If you do pre-warping of cutoff AND q, you'll likely end up with one such hybrid (poles mapped BLT-style, zeros mapped II-style or something). Or with something completely different.

Unfortunately, there is no perfect method, and will never be. You either get an accurate response in magnitude AND phase at the cost of frequency warping, or you get a nice frequency response with messed-up phase. The latter might be the better solution in many cases, but you'll lose some nice properties of the analog equivalents when it comes to combining or parametrizing them. No free lunch in DSP. :cry:

Post

Ninja_Edit wrote:I'd prewarp the bacon first.
Nonono, lettuce & tomato go first! Otherwise the bacon gets cold, and that's a pity.
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Just don't end up with a warped sandwich.

Post

You might want to look at this paper: www.ece.rutgers.edu/~orfanidi/ece348/peq.pdf

Post

hugoderwolf wrote:I was thinking about that the other day as well, but haven't checked it out entirely. But I think that if you prewarp both cutoff and Q, that's equivalent to an impulse-invariant transform. At least with respect to the poles. In this case, you'd lose the nice properties of BLT.
Thanks for this info.
keithwood wrote:You might want to look at this paper: http://www.ece.rutgers.edu/~orfanidi/ece348/peq.pdf
Been trying to find open source implementation based on this code with no success.

Post

That paper has a matlab code implantation at the end. Probably wouldn't be too tricky for you to figure out a translation to C++ or whatever.

Post

matt42 wrote:That paper has a matlab code implantation at the end. Probably wouldn't be too tricky for you to figure out a translation to C++ or whatever.
Thanks!
Actually, long time ago I found that matlab code implemented in C++ but, there were no documentation included in code so I didn't get it working. After reading the paper now, I think I can get it working but, does this method work for all filter types or is it for peaking filter only?

Post

It works for peaking, notch and bandpass.

Post


Post

So, by information given by RBJ, to get the best out of cookbook's peak filter, 'case BW' should be used so the 1st order 'bw cramping' done there is present.

'Prewarping' Q improved the magnitude response when filter is build through cookbook's "case Q":

Image

Case closed.

Post Reply

Return to “DSP and Plugin Development”