berndporr / iirj

An efficient IIR filter library written in JAVA
Apache License 2.0
134 stars 36 forks source link

Issue with Odd-Order Highpass Filters #27

Closed anleu closed 11 months ago

anleu commented 11 months ago

After introducing new tests, it was observed that highpass filters of odd order produce incorrect results. This issue has already been reported in the original library, as seen in this issue.

The proposed fix appears to be effective. Both tbrunsch and I have tested the fix, and it seems to work without introducing any other issues. Additionally, upon reviewing the code, we've verified that the changes exclusively affect the highpass filter and do so correctly.

We will be submitting a PR that includes both the unit tests and the fix for this problem.

berndporr commented 11 months ago

id-0001 thanks. Indeed. Pole and zero should end up in the same coefficient as the math is the same of both numerator and denominator.

anleu commented 11 months ago

Bug is fixed with commit 54e8e38.