Biquad calculations for custom filter design

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
MiniDSP has now offered an "advanced" version of their crossover software that allows direct biquad coefficient filter design. I was a little disappointed to see that they didn't offer some method, in the program, to calculate these coefficients based on some given parameters.

I still want to use this ability for my room. I have one of these devices setup to be used in place of a Behringer DCX2496 for bass management/eq functions in my room. What I would really like the ability to do is take my measurements, target certain area's in the bass response, and create custom filters to target those problems. I know of some computer based filter software that can do that with FIR filters, but I don't want nor have the ability to run everything through a computer. I know that Matlab has Freqz as a method I can use to calculate the filter coefficients to put into the DSP device. Do any of you know other ways of accomplishing this?

I use Holmimpulse for measurements, and what I would love to be able to do is save out the results, input them into another piece of software, then be able to basically grab sections of the response, and have the software construct the filter from that.

As it stands what I can do is input a file from Holmimpulse into Matlab. Calculate the mean response level to use as my reference point. Then calculate deviations from the mean across the bass range of interest (I normally restrict this as 30hz to 100hz). Then basically hand pick the worst of them, and construct filters to match the inverse of those.

Can a biquad filter only be symmetrical? As it stands, I can only create symmetrical (about the center frequency) equalization filters to adjust for anomalies in the response, but my room deviations I'm correcting are typically not symmetrical. The only work around I can think of for this is to series cascade the filters in such a way to approximate the best correction filter I can come up with.

I have zilch for filter theory training and minimal knowledge, with even less DSP knowledge, so this is all pretty new to me. If any of my comments made zero sense in filter design, its probably because I have it wrong. My goal here is to construct more accurate room correction filters in the bass. I've looked into off the shelf options, but nothing can handle my needs and offer the flexibility I want. Those devices which can cost more than I can afford, or in this case, are beyond me to use.
 
Biquad refers to biquadractic. It has no transfer function in and of itself. It refers to a 2nd order recursive filter, and is essentially the building blocks of digital IIR filters. You want a 4th order lowpass, just string two biquads together in series. The biquad has 2 poles and 2 zero's, by setting these through the coefficients, you get your transfer function of interest.

all digital IIR crossovers you've ever used has biquad filters creating those slopes as long as it's more than first order.

My interest isn't so much in their use to create high or low pass filters, I"m interested in creating notch filters and shelf filters. I will likely use these to create the crossovers for the subs as well, but at such low frequencies, the precise shape becomes a lot less important. In fact a lot of overlap becomes a good thing for my purposes, so I'm largely using 2nd and 3rd order filters.

The advantage as I see it, once I become a bit more savvy at creating these notch filters and such, is far more precise notch shapes which better match the room modes themselves. However, as I mentioned, the only way I know of to handle this right now is to cascade multiple filters together.
 
Matt

I have a lot of experience doing this, but depending on the implimentation you could be up against a major problem. LF filters can be a real problem with Bi-quads. They are fine for higher frequencies, but round off problems and bit depth make LF a real problem. Can the board sample/resample to a much lower rate?

Bi-quads do not have to be symmetrical, but they are by definition always even orders. But then a first order augmentation is trivial, so an arbitrary order should always be possible.

Basically fnding the coefficiencts is never a big problem, but implimenting this in DSP on the board can be. The borad is fixed point DSP, right?
 
Yeah I believe its fixed point at 56 bits. They refer to them as double precision 56 bit devices, I assume that is what they are referring to. I suspect that the ability to control the sampling is fixed even though I'm sure the board itself has hardware that can sample and resample at a variety of rates.

Well now you have me a bit confused. I thought from my reading that even devices like the behringer you like uses biquads in its programming to form the filters, it just calculates the filters to match analogue filters through biliniar transformation (I imagine this is actually predone and simply placed as a set of presets in the firmware). I assumed the first order filters were created through a direct form I method.

So are you suggesting that in most DSP devices the higher order filters, even the low frequency notch filters and shelving filters are achieved through another method other than Biquad's, such as through a direct form realization method? I have honestly only seen biquads in these more advanced dsp devices, so I just assumed that was how it was done.

I know the Behringer is a more usable device, my main reason for switching to the DSP device (besides the fact that I can tinker endlessly) was that I could cheaply cascade them to offer complete bass management in my room to best realize your suggested methods. I also felt that with fixed PEQ's I often would only get a best approximation of what I was looking for. I would move the center frequency a single hz at a time up or down, change the Q, etc. but often I found that when a big peak was followed by a suckout, non-symmetrical notch filters were needed. I know you don't love the excessive use of EQ, and I feel the same way, but I do think its a cheap and relatively simple way to get very good improvements in the bass response of a room, when used in conjunction of the multisub methods and working bass traps.

You have now seen the measurements of my room, its got a lot of issues. Many are not in the bass, but many are. I've got your two bandpass subs setup and one ULF sub in a corner. I have the Behringer in place with every PEQ it has being used, and you saw what I got. The bass response at each side seat is actually nearly flat, a little bit of eq went a long way. The middle seat, the "money seat" if you will, has a horrible response. The best I could even get was an average taken from 6 measurements within a box somewhat larger than my actual listening window, and is probably flatter than I hear. When you run the measurements you can just hear the differences in level as it goes up the decades.
 
The issues arround the use of DSP filters at very low frequencies is not somethingbthat a manufacturer would want to tell you about. How Behringer does it I don;t know, but in general one has to have very high precision floating point calculation or very carefully designed filters to do LFs. It has to do with precision. A very small error at LFs equates to a very large discrepancy in the filters. This is not unlike the difficulty in getting good measurements at LFs with a finite length sample - its basically the same problem. The best solution would be to down sample to 2 Khz sample rate for the subs.
 
Caculating biquad coefficients for the various typical filter shapes is strightforward, a nice explanation can be found here. It is very unlikely that you will find the answers you seek by rolling your own biquads though, a single biquad has a rather limited scope and the asymmetries you see in the responses you are trying to correct are the result of multiple overlapping effects and need multiple overlapping filters to address them - if they are amenable to being addressed, which is by no means certain, and even less likely that a solution is possible for the multiple listening positions you appear to be aiming for. REW V5 has some filter tuning features that may help with filter settings, and can also show you the effects of your filter tweaks on frequency, impulse and waterfall responses as you make the adjustments, but the scope for addressing problems with EQ is fairly narrow.
 
How Behringer does it I don't know
The Behringer implementations (at least for DSP1124P, FBQ2496 and DCX2496) are all biquads at a fixed sampling rate. 56-bit precision from a fixed-point DSP (which would usually mean 24-bit data, 48 bit multipliers and a 56-bit accumulator to handle intermediate multiply-accumulate overflows) is sufficient down to at least 20Hz if implemented correctly.
 
This seems to conflict with the earlier post claiming that the Behringer is a fixed point DSP. I'd be interested to know if the Behringer is a fixed or floating point DSP. Or are you saying that the math is done in floating point and then compiled to fixed point? That's a technology that I am not familiar with. But it makes sense. I haven't followed DSP hardware from the early days of TI TMS320 series and Motorola 56000. Back then the compilers were junk. You couldn't rely on them for critical code.
 
I think that the only way to know what's happening inside it to get it from someone who "knows" for sure. But I can see that the Analog Devices processor has a lot of capability. Maybe the LF problem isn't what it used to be. Back in "the days", LF filters were simply "not possible". The TMS 320 series had 24 bit accumulators. Can't do much with that!
 
The TMS 320 series had 24 bit accumulators. Can't do much with that!

When I first encountered TI DSPs I think they ran at 25MHz, couldn't do much with that in audio. Probably that was later than your experience though - around 1993 if I recall. A design I inherited used two of them, so I redesigned it to use one 50MHz part. That was fairly capable, just not in floating point. We solved the low frequency filter resolution problem with that by filtering and effectively reducing the sample rate to 1kHz or thereabouts.
 
Floating point or fixed point is not the issue, the problem is resolution during the intermediate calcs of the biquad chain as the LF biquads involve subtraction of large numbers that differ by very small amounts. If you do all the calcs in single precision floating point (24 bit mantissas) you will end up with limit cycles and general garbage at low frequencies, the fact that it is floating point does not help at all. A fixed point approach generally offers higher resolution as the whole wordlength is allocated, including the part that would be taken for the exponent in a float. Key is using double precision for the intermediate calcs throughout the whole biquad chain calculation (i.e. maintaining the full precision of the multipliers, which is twice the input word length) and using the overflow provision of the MACs in the DSPs to accommodate intermediates that exceed 0dB FS.
 
John

Its not my expertise, but my understanding was that for a fixed number of bits, floating point offered better resolution, which is contrary to the way I read your post. But I agree that its resolution that matters not fixed versus float, it can be done either way as long as its done correctly.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.