I'm quite new to DSP and I'm trying to implement high pass biquad cascade in transposed direct form II. Currently my implementation has very poor accuracy at cutoff frequencies that are less than 5kHz or rather frequencies that are less than 5kHz are still present but diminished in output signal. In the DSP textbook I have in possession I have read that biquads generally can have this kind of problem at lower frequencies but it is not mentioned up to which frequencies this problem can occur.

For the purposes of testing my implementation I'm using white noise generated from Audacity with sample frequency of 44100Hz as input signal and have a reliable application (which I cannot disclose here) from which I generate referent output with the same mentioned input. I know for sure that the referent implementation of high pass filter is also in transposed direct form II.

Output signal of my implementation can be seen below:

and the referent output signal can be seen here:

as you can see the difference is in the lower frequency range.

My question would be what could possibly be wrong in my implementation, are there any common mistakes one could make (that I'm not aware of) when implementing this kind of filter? (as obviously there is solution for this problem based on the referent output) I have also read (online) that this can be due to poles being to close to the unit circle. If so are there any trick one could apply to get as close to the referent output?

I have already implemented low pass biquad cascade in the same transposed direct form II and as opposed to high pass implementation I have not encountered problems of this kind.

  • $\begingroup$ Without knowing any details of your implementation we really can't tell. For starters: what you are your data types: fixed or float? how many bits ? Your analysis method is also VERY questionable. You are much better off comparing this against known reference in Python, Matlab or Octave. $\endgroup$
    – Hilmar
    Mar 24, 2021 at 19:03
  • $\begingroup$ @Hilmar my data types are float point, 64 bits. As for the analysis method I've done comparing referent output against matlab's output and they are pretty much the same or at least within acceptable error margin. I'm also aware that my question is rather abstract, please feel free to ask any other details that you need. Any help is welcome. $\endgroup$ Mar 24, 2021 at 19:22
  • $\begingroup$ How do you define "acceptable" error. Can you quantify? For 64-bit floating point, the relative error should be well below -200dB. If you see anything larger than this, something is wrong. $\endgroup$
    – Hilmar
    Mar 25, 2021 at 16:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.