2
$\begingroup$

I have two C implementations of 4th order high-pass filter (fs = 16 kHz, cut-off=100 Hz, designed using Matlab butter() function):

  • 1st. Done as standard difference equation implementation.

  • 2nd. Done as product of two Biquad sections.

The final implementation will be a fixed-point DSP code.

Why is biquad implementation recommended?

$\endgroup$
  • 1
    $\begingroup$ Define "better". Better is the improved version of good. You need to say what you consider a measure for Goodness first before we can discuss better, or else, we'd have to write half a bookshelf on theoretical and practical filter design. $\endgroup$ – Marcus Müller Feb 24 '17 at 10:04
  • $\begingroup$ This depends largely on where the cutoff frequency of the high pass is $\endgroup$ – Hilmar Feb 24 '17 at 16:47
  • $\begingroup$ It probably also depends on what "this task" is. $\endgroup$ – MBaz Feb 24 '17 at 17:45
  • $\begingroup$ Updated question with some more info. $\endgroup$ – Danijel Feb 27 '17 at 7:30
8
$\begingroup$

The two solutions in a floating point implementation are assumed to be identical, with the two BiQuads being a factored version of the standard difference equation. The BiQuad is the better way to go for fixed point as you isolate two 2nd order systems and in doing so will be easier to keep stable under variations due to the quantization involved.

For more details on this, see the responses to this post:

How does cascading biquad sections for higher order filters work?

and

https://en.wikipedia.org/wiki/Digital_biquad_filter

Note too for those less familiar: cascading two filters is the same mathematically as convolving their coefficients; multiplying two polynomials is done by convolving their coefficients. The transfer function for filters is described by polynomials so it is all the same thing; a 4th order filter can be factored into two 2nd order filters.

$\endgroup$
  • $\begingroup$ So it's mainly a matter of stability due to quantization. Great, thanks. $\endgroup$ – Danijel Feb 27 '17 at 13:33
  • $\begingroup$ That an in actual implementation delay can also be a significant factor since you would be cascading multiple stages with large feedback paths. The biquad implementation isolates these feedback paths to shorter regions as well. $\endgroup$ – Dan Boschen Feb 27 '17 at 13:35

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.