Is it possible to design linear-phase filters that sum to a flat frequency response? If so is it practical to use them in real-time audio processing for as many as 10 bands?

My experience has only been with Linkwitz-Riley IIR filters, but I would like to explore the possibilities of linear phase or minimum phase filters.

From my initial research it looks like the frequency sampling method would result in ripples and wouldn't sum to a flat response (especially across several bands).

  • 1
    $\begingroup$ How much latency can your application tolerate from the linear-phase crossover filters? $\endgroup$ Oct 18 '20 at 6:48
  • $\begingroup$ are you band-splitting for the purpose of loudspeaker crossovers? or are you band-splitting for some other purpose, like multiband signal processing? is this like wavelet/filterbank processing? $\endgroup$ Oct 19 '20 at 2:50
  • $\begingroup$ @OlliNiemitalo I havent put much thought into that, but I would want to keep it fairly low since it is for use in audio mixing. $\endgroup$
    – abaga129
    Oct 19 '20 at 3:33
  • $\begingroup$ @robertbristow-johnson This is for the purpose of multiband signal processing. The reason I'm interested in this is because I would like to maintain the integrity of the original phase response as closely as possible. $\endgroup$
    – abaga129
    Oct 19 '20 at 3:35
  • $\begingroup$ do you want your bands to be logarithmically spaced? how many bands? how much overlap? $\endgroup$ Oct 19 '20 at 12:54

Well, by definition of linear phase filter follows that $A(f)$ of the filter response $H(f) = A(f)e^{-j2\pi \frac{N}{2} fT}$ is a linear combination of cosines of different frequencies therefore is quite impossible to obtain a flat band (basically you need infinite coefficients of the impulse response). But you can always approximate it quite well because there is the so called direct optimization method or Parks-McClellan method that allows you to obtain a linear phase filter from the specifications of error in the passband and the error in the stop band.

The only drawback of this filter is that you have to do lots of calculous. In audio applications for example, if you try to design a filter that attenuate $40$dB and has a transition bandwidth of $100$Hz you will find that you need $100$ coefficient. This is not too much for a CPU and the filter will be really powerful.

I will also want you to focus on an underrated problem that lot of people don't notice. If you try to increase the sampling frequency (because you want more resolution) also the filter coefficients must increase to approximate the same filter impulse response.

  • $\begingroup$ Thanks for answering this! I'm glad to know that this is at least possible. I'm afraid that doing it may be too CPU heavy for 10 bands which also have additional processing going on and also oversampling. This is for an audio application which currently supports up to 8x oversampling. The oversampling alone causes a huge increase in CPU usage. $\endgroup$
    – abaga129
    Oct 19 '20 at 3:31
  • $\begingroup$ Any references to material on implementing something like this would be appreciated. I've found it surprisingly diffult to find info on discrete FIR crossovers. $\endgroup$
    – abaga129
    Oct 19 '20 at 3:32
  • $\begingroup$ Do you mean 10 times the bandwidth of your signal? Then as I already anticipated, if you oversample a signal then your filter should operate at that frequency which is higher (obviously) and therefore is more task intensive. There are 2 solution to this, the so called polyphase realization which seems to be magic but in reality is really easy, and the multi stage realization but I don't know if those are feasible in your case. $\endgroup$ Oct 19 '20 at 12:56
  • $\begingroup$ Unfortunately I do not have specific references to this and therefore even in the "discrete time signal processing by A. V. Oppenheim" or the "digital signal processing by Proakis and Manolakis" there isn't the implementation of the algorithms. Fortunately is really simple and I can give you my commented code. There is also a book of Manolakis which is called "applied digital signal processing" that I'm pretty sure gives you at least one algorithm. Try also to see the " the art of Virtual Analog filter by Vadim Zavalishin" to look at some filters realization. $\endgroup$ Oct 19 '20 at 12:56

Is it possible to design linear-phase filters that sum to a flat frequency response?

Yes, of course.

If so is it practical to use them in real-time audio processing for as many as 10 bands?

That depends on your definition of practical. The problem at audio is that FIR filters at low frequencies get really long. It depends on the lowest frequency, desired steepness and amount cross band rejection. but a few thousand taps is typical. These can be fairly efficiently implemented using an FFT based scheme like Overlap Add, but that introduces a lot of latency: typically it's twice the filter length. That's prohibitive for many real time applications.

If you want to build a standard 10-band audio equalizer: this can be done very efficiently with cascaded biquads where each biquad is a "peakingEQ" filter and simply recalculate the filter coefficients whenever a band changes gain.

Parallel IIR bandpass filters are difficult to phase manage but it's possible. Odd Butterworth and Linkwitz Riley filter sum to a flat magnitude response but NOT a flat phase response, so you need to put compensation allpass filters in the parallel paths

  • $\begingroup$ Thanks this is the answer I was looking for. I'm going to look more into the overlap-add algorithm since it seems fairly straight forward, however, I think my current implementation (using biquads) may be my best bet for now. At least now I know this is possible. Thanks! $\endgroup$
    – abaga129
    Oct 19 '20 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.