Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Matched Lowpass Filter

DSP related issues, mathematics, processing and techniques

Matched Lowpass Filter

Postby martinvicanek » Fri Sep 11, 2015 11:07 pm

Biquads are simple filters with 5 coefficients a1, a2, b0, b1, b2. These five coefficients determine the filter's transfer function, which can be a lowpass, bandpass, bandstop etc. Filter design methods exist to determine the coefficients for a specified filter characteristic, the most simple being the so-called bilinear transform (BLT). The famous RBJ Cookbook provides closed form expressions based on the BLT for the coefficients for some standard filter types.

One problem with the BLT is frequency warping towards the Nyquist frequency. For a lowpass filter with a resonant peak the effect is a steeper than nominal (12 dB/octave) fallof for high cutoff frequencies, and a narrowing of the resonant peak. Note that analog filters do not have this problem.
MatchedLowpass.png
MatchedLowpass.png (32.98 KiB) Viewed 60340 times

Oversampling provides remedy but at a high CPU cost. It turns out that that a very good analog-like constant-Q approximation can be obtained by choosing appropriate coefficients. There is some literature on that, however I have come up with my own solution that I am quite happy with.

I took the poles from impulse nvariant mapping of the analog filter prototype, whereas the zeros are fitted by least squares and then approximated by a suitable function. It turned out that it is sufficient to account for one zero only.

Here is the result. Besides the direct form I also implemented a complex resonator topology which is superior at low frequencies and allows fast modulation.

Have fun!
Attachments
MatchedLowpass.fsm
(57.56 KiB) Downloaded 2652 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Matched Lowpass Filter

Postby BobF » Sat Sep 12, 2015 7:10 pm

BobsMV_matchedLP2HP&BP.fsm
(90.85 KiB) Downloaded 2627 times

Hi Martin,

Again, very much appreciated! Wow, I like these filters.
Just playing around, since I can NOT program, I created these from your low pass. A high pass and band pass, what do you think? Are they ok and usable?

Later then, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: Matched Lowpass Filter

Postby KG_is_back » Sun Sep 13, 2015 9:40 pm

I was looking for this type of thing for ages... I understand the phylosophy behind it, by my math skills hit wall when I see the "H(z)=sflgjsdfogaspovmfbpnfb"-type of thing... Thanks Martin for sharing this!
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Matched Lowpass Filter

Postby tulamide » Mon Sep 14, 2015 9:21 am

He never disappoints me. Each new post is like a new magician's trick and I mostly look at it like so: :o
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Matched Lowpass Filter

Postby tester » Sun Nov 08, 2015 10:43 pm

Nice!
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Matched Biquad Filters

Postby martinvicanek » Sun Feb 14, 2016 10:48 am

Hi gang, in an effort to elaborate on this subject I have finally found a simpler scheme to calculate the coefficients for a recursive filter matched to its analog counterpart. What's more, it generalizes nicely to other than lowpass filter types. :D Here is a collection of matched lowpass, highpass, bandpass, and peaking EQ filters. I have prepared a little writeup with the details, mainly for myself, and maybe for a few other inclined readers. :mrgreen:
Attachments
MatchedBiquads.fsm
(187.17 KiB) Downloaded 2612 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Matched Lowpass Filter

Postby Spogg » Sun Feb 14, 2016 12:06 pm

Martin, if I were in a position to, I would award you a PhD for that. Or do you have one of those already? Wouldn't surprise me if you did.

I love the fact that here in this forum I kinda rub shoulders with so much talent, expertise, intelligence and, amazingly, such a willingness to share and help.

I look forward to auditioning these filters and dropping them into a so-called state variable (selectable) module.

In the meantime many thanks and much respect!

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Matched Lowpass Filter

Postby stw » Sun Feb 14, 2016 1:26 pm

Spogg wrote:I look forward to auditioning these filters and dropping them into a so-called state variable (selectable) module.

In the meantime many thanks and much respect!


+1 !

A new masterpiece! Thanks for sharing your knowledge...
stw
 
Posts: 111
Joined: Tue Jul 13, 2010 11:09 am

Re: Matched Lowpass Filter

Postby Tronic » Sun Feb 14, 2016 2:34 pm

Super :geek:
this need an Patent Application 8-)
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Matched Lowpass Filter

Postby tulamide » Sun Feb 14, 2016 8:08 pm

Tronic wrote:Super :geek:
this need an Patent Application 8-)

+1

Martin, I think you are not aware of how fantastic your work is. Be it the ultra-optimized standard oscillators, the shared mem osc, the realtime zero-delay convolution engine or these highly-scientific filters. You might think something in the lines of "Oh these all existed before, I just improved them", but the truth is that people may get a nobel prize for discovering DNA, but they also get one for finding a faster way of sequencing DNA. I hope you understand this image ;)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Next

Return to DSP

Who is online

Users browsing this forum: No registered users and 65 guests