AVS › AVS Forum › Audio › DIY Speakers and Subs › Bi-Quad filter programming
New Posts  All Forums:Forum Nav:

Bi-Quad filter programming

post #1 of 26
Thread Starter 
This powerful tool allows for some very powerful filter techniques and any insight into would help. Anyone have opinion or experience doing it?

http://www.minidsp.com/applications/...ad-programming
post #2 of 26
Good info here:
http://www.diyaudio.com/forums/digit...metric-eq.html

I can't really add anything else, as I don't have a unit yet.
post #3 of 26
Thread Starter 
Thanks for the link, good discussion.
post #4 of 26
The way I understand it, most DSPs use biquad math for all of their filters. They just present a simpler frontend with common analog filter equivalents that the user sees (LR's, PEQ Q and center).

Directly programming biquads allow for you to break free from this. You aren't stuck with a traditional slopes or arbitrary frequency centers. I think it is a nice advantage for the MiniDSP.

As far as modeling biquads, it typically requires a tool like MathCAD. There is a little "secret" though. LspCAD will model and even auto-optimize biquads for you. Even better, the demo version of LspCAD is free. If anyone is interested I can post up details on how to setup a biquad in LspCAD.
post #5 of 26
Quote:
Originally Posted by coctostan View Post

If anyone is interested I can post up details on how to setup a biquad in LspCAD.

Spit it out.

It could come in handy, when the DIY Synergy/Unity horns mature a little more. A cheap LspCAD optimized MiniDSP would make a nice EQ/crossover addition. Too many projects.
post #6 of 26
Quote:
Originally Posted by coctostan View Post

The way I understand it, most DSPs use biquad math for all of their filters. They just present a simpler frontend with common analog filter equivalents that the user sees (LR's, PEQ Q and center).

Directly programming biquads allow for you to break free from this. You aren't stuck with a traditional slopes or arbitrary frequency centers. I think it is a nice advantage for the MiniDSP.

As far as modeling biquads, it typically requires a tool like MathCAD. There is a little "secret" though. LspCAD will model and even auto-optimize biquads for you. Even better, the demo version of LspCAD is free. If anyone is interested I can post up details on how to setup a biquad in LspCAD.

That would be great. Thanks!
post #7 of 26
Thread Starter 
Quote:
Originally Posted by coctostan View Post

The way I understand it, most DSPs use biquad math for all of their filters. They just present a simpler frontend with common analog filter equivalents that the user sees (LR's, PEQ Q and center).

Directly programming biquads allow for you to break free from this. You aren't stuck with a traditional slopes or arbitrary frequency centers. I think it is a nice advantage for the MiniDSP.

As far as modeling biquads, it typically requires a tool like MathCAD. There is a little "secret" though. LspCAD will model and even auto-optimize biquads for you. Even better, the demo version of LspCAD is free. If anyone is interested I can post up details on how to setup a biquad in LspCAD.

I wonder if SoundEasy has something similar. It take measurment/XO creation to a new level for me.

Someone create a spreadsheet with the formulas so we just have to plug in some values, The spreadsheet can be found here, scroll down to the last post and save teh All_digital_coefs_v1.zip

http://www.minidsp.com/support/forum...mit=6&start=24
post #8 of 26
I don't know about Soundeasy, but it is pretty simple in LspCAD and the demo version is free. You just can't save your projects. You can take a screenshot though and write down values.

I'll put together a quick writeup soon. It is pretty simple but you have to know where to look in LspCAD.
post #9 of 26
First, download the LspCAD demo:http://www.ijdata.com/LspCAD_demo.html

Unzip and startup either Pro or Standard (I've never used standard but it should work).

You have to follow a few common LspCAD steps to start your project:
  1. Start a new project
  2. Insert a "generator"
  3. Attach a "Analog/Digital Transfer Function" to the generator
  4. Attach a "Gain (output buffer)" to the A/D Transfer Function
  5. Attach a "Driver unit (measured data)" to the Gain
  6. Attach a ground to the driver
  7. Click on the "Simulate" tab towards the top

(the first picture shows the result of steps 1-7)

This creates the minimum structure needed to simulate a Biquad.

To implement the Biquad follow these steps:
  1. Double-click on TF1 (the A/D transfer function you created)
  2. In the dialog that appears, select "Digital Bi-quad" from the dropdown on the right
  3. Below that you will need to set the "fs"...it is the sampling rate of your DSP. THe minidsp uses 48khz.
  4. There is a drop-down on the left where you can select the type of Bi-quad such as LP, HP, shelv, etc.

(the second picture shows the Transfer Function dialog box)

Depending on the type of filter you are designing, a different set of parameters will appear in the upper lefthand corner.

When you alter these parameters a new set of biquad variables will be shown in the lower left hand corner.

I left out the more general LspCAD steps. There are tutorials to explain that. The demo also includes some example projects.
LL
LL
post #10 of 26
Thread Starter 
Quote:
Originally Posted by coctostan View Post

I don't know about Soundeasy, but it is pretty simple in LspCAD and the demo version is free. You just can't save your projects. You can take a screenshot though and write down values.

I'll put together a quick writeup soon. It is pretty simple but you have to know where to look in LspCAD.

If I can figure out the formulas, I can write a program that will do them all for me. I have the spreadsheet from a member on minidsp.com\\forums so I can start with his formulas.

I would love to figure out how to create a 96dB XO slope, just to hear it.
post #11 of 26
Thread Starter 
Quote:
Originally Posted by coctostan View Post

First, download the LspCAD demo:http://www.ijdata.com/LspCAD_demo.html

Unzip and startup either Pro or Standard (I've never used standard but it should work).

You have to follow a few common LspCAD steps to start your project:
  1. Start a new project
  2. Insert a "generator"
  3. Attach a "Analog/Digital Transfer Function" to the generator
  4. Attach a "Gain (output buffer)" to the A/D Transfer Function
  5. Attach a "Driver unit (measured data)" to the Gain
  6. Attach a ground to the driver
  7. Click on the "Simulate" tab towards the top

(the first picture shows the result of steps 1-7)

This creates the minimum structure needed to simulate a Biquad.

To implement the Biquad follow these steps:
  1. Double-click on TF1 (the A/D transfer function you created)
  2. In the dialog that appears, select "Digital Bi-quad" from the dropdown on the right
  3. Below that you will need to set the "fs"...it is the sampling rate of your DSP. THe minidsp uses 48khz.
  4. There is a drop-down on the left where you can select the type of Bi-quad such as LP, HP, shelv, etc.

(the second picture shows the Transfer Function dialog box)

Depending on the type of filter you are designing, a different set of parameters will appear in the upper lefthand corner.

When you alter these parameters a new set of biquad variables will be shown in the lower left hand corner.

I left out the more general LspCAD steps. There are tutorials to explain that. The demo also includes some example projects.

That is awesome!!

I wonder if 1000Hz on that all pass example is just a sample value or is it a very meaningful value?
post #12 of 26
Nice, coctostan! I had never played with the digital bi-quads in LspCAD. It whipped out a 5 Hz rumble filter as pretty as you please.



Edit: copy/paste works fine so it's easy to save the numbers outside LspCAD.

g = 0.99953722
b1 = -2.0000000000
b2 = 1.0000000000
a1 = -1.9990742113
a2 = 0.9990746880

Edit again: I took a look at the MiniDSP page and they express the biquad formula a little differently from LspCAD; LspCAD multiplies the formula by the gain g and the MiniDSP doesn't. So you'd have to convert the LspCAD numbers to use them with the MiniDSP.

Code:
        LspCAD  MiniDSP
g       g       N/A
b0      1       g
b1      b1      g*b1
b2      b2      g*b2
a0      1       1
a1      a1      a1
a2      a2      a2

LL
post #13 of 26
I'm glad it was helpful. Feel free to add info on using biquads or LspCAD with biquads. I like LspCAD. It is very easy to use and I can mock things up very quickly. I've never used it for measurements though.

Using biquads allows us to cut out the middleman. I don't care if it is a Bessel or LR slope or something in between. I'm shooting for a specific response and textbook slopes are meaningless. This ability has pushed me to the minidsp.

As an aside, I'm in the process of spec'ing a amp/dsp that will handle 2-way L/C/R setups. It will utilize 2 minidsp's. The 4th input in the minidsp will handle the LFE channel and output to separate amp(s). The other 6 outputs of the minidsp will handle the 2-ways. Each L/C/R will get its own 2-channel chip amp and individual SMPS. It is also easily expandable as I could make the L/R 3-ways with the addition of 1 minidsp and 2 amp channels.

I like passive for finalized designs but I like to swap drivers and waveguides in my baffle wall. This will allow me to do this to my hearts content. I could also go 3-way with a passive between the high and mid. Fun stuff.
post #14 of 26
Thread Starter 
Wow, thanks guys.

This whole transfer function, bi-quad is a different world and I think I finally understand it a little bit. Its funny because for 2+ years I have read threads with posts talking all about transfer functions and I just didnt get it but your point about removing the middle man and not bother with "Text book" filters is a great one.
post #15 of 26
FWIW Jeff Bagby's excellent PCD also supports active filters including arbitrary arbitrary coefficient biquads. I haven't sat down and used it yet, but the ability to model the biquads and see the effect on your measured speaker response is great.
post #16 of 26
Quote:
Originally Posted by catapult View Post

Nice, coctostan! I had never played with the digital bi-quads in LspCAD. It whipped out a 5 Hz rumble filter as pretty as you please.



Edit: copy/paste works fine so it's easy to save the numbers outside LspCAD.

g = 0.99953722
b1 = -2.0000000000
b2 = 1.0000000000
a1 = -1.9990742113
a2 = 0.9990746880

Edit again: I took a look at the MiniDSP page and they express the biquad formula a little differently from LspCAD; LspCAD multiplies the formula by the gain g and the MiniDSP doesn't. So you'd have to convert the LspCAD numbers to use them with the MiniDSP.

Code:
        LspCAD  MiniDSP
g       g       N/A
b0      1       g
b1      b1      g*b1
b2      b2      g*b2
a0      1       1
a1      a1      a1
a2      a2      a2


Hi catapult,

Have you or anyone else tested to see if the software allows you to input the values that will define such a low frequency filter? I know they don't support it in the general filter software, but some measuring and testing of predicted vs. modeled would prove very interesting. I would expect some potential limitation in how accurate the filters are to the target, but so long as the user measures to confirm the resulting output response, it should be quite useful and still the same general intent within some tolerance.
post #17 of 26
Mr. Seaton, are you considering using the MiniDSP instead of the QSC DSP30?

Penn, have you had a chance to measure a sub 20hz filter?
post #18 of 26
Thread Starter 
No, I have not measured it. Im just getting my LMS5400 wired up so maybe I can do that this weekend.
post #19 of 26
Quote:
Originally Posted by coctostan View Post

Mr. Seaton, are you considering using the MiniDSP instead of the QSC DSP30?

Penn, have you had a chance to measure a sub 20hz filter?

Coctostan,

I use many DSP and related products for many different applications. I haven't directly played with a MiniDSP yet, but intend to after I churn through a bit more of my to-do pile. A few friends who's input I value have played with them and have been impressed with what it offers for the price, package and flexibility. The recent integration with REW was a very nice addition for REW users, and I see many applications. There are a few features I would like to see added, and I believe some are already under consideration.

I do see the MiniDSP and some other pieces making it much more practical to execute some system setup ideas than in the past.
post #20 of 26
"There are a few features I would like to see added..."

such as?
post #21 of 26
Please note that the MiniDSP software requires the signs of a1 and a2 to be inverted (the values in the MiniDSP plug-in are actually the coefficients of the implemented filter structure rather than the biquad coefficients directly).
post #22 of 26
Any news about other useful programs that can calculate biquads for weighting curves in miniDSP?
post #23 of 26
Thread Starter 
I have not read about anything being offered.
post #24 of 26
What you mean?
There is another same theme here - http://www.minidsp.com/forum/8-softw...ves-in-minidsp
but I can find some easy program that can calculate such biquads and miniDSP not implement it yet.
post #25 of 26
Thread Starter 
Im saying I have not found any 3rd party programs that help with biquad formulas.
post #26 of 26
I use matlab but there are tons of free programs to do this...

For example: Coefficient Calculator For Digital Biquad Filters
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: DIY Speakers and Subs
AVS › AVS Forum › Audio › DIY Speakers and Subs › Bi-Quad filter programming