Additional tests for filters
csteinmetz1 opened this issue · 1 comments
csteinmetz1 commented
In addition to including test for all of the ITU compliance material test signals, we should include tests for the filter class that checks the coefficients against known values.
csteinmetz1 commented
To properly test that filter coefficients are generated correctly we need to check our results against know good values. Here are some sources for the included filter designs:
Filter | Source |
---|---|
K-weighting | See page 4-5 |
Dash et al. | See page 15 |
Fenton/Lee 1 and 2 | See page 4 |
We are looking to match these given values out to n number of decimal places. Something like 7 decimal places (based on limit of 32 bit IEEE 754 float) will certainly be acceptable. If something smaller is needed that is acceptable.
ITU-R BS.1770-4 provides filter coefficients for 48 kHz:
HPF | Value |
---|---|
b0 | 1.0 |
b1 | -2.0 |
b2 | 1.0 |
a0 | 1 |
a1 | −1.99004745483398 |
a2 | 0.99007225036621 |
Shelf | Value |
---|---|
b0 | 1.53512485958697 |
b1 | −2.69169618940638 |
b2 | 1.19839281085285 |
a0 | 1.0 |
a1 | −1.69065929318241 |
a2 | 0.73248077421585 |
Dash et. al provides filter coefficients for 48 kHz:
HPF | Value |
---|---|
b0 | 0.97456340 |
b1 | -1.94912680 |
b2 | 0.97456340 |
a0 | 1.0 |
a1 | -1.94894143 |
a2 | 0.94931217 |
Dip | Value |
---|---|
b0 | 0.98745685 |
b1 | -1.89627528 |
b2 | 0.92513441 |
a0 | 1.0 |
a1 | -1.89627528 |
a2 | 0.91259126 |