Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Zero-phase filtfilt distortion of weighting filter frequency response? #240

@mlotinga

Description

@mlotinga

Great library!

In signal.weigh there is the zero-phase option that uses scipy.signal.filtfilt.

To inspect the frequency response of the zero-phase (forwards-backwards operation) filter Hzp, it is necessary to calculate the frequency response of the forwards filter H (using scipy.signal.freqz), and then multiply it by the complex conjugate H*. Doing this shows that the forwards-backwards operation (ie applying the filter two times to the signal) distorts the overall frequency response Hzp, which in many cases will not give the desired response. In this case, zero-phase operation pushes the filter response outside the relevant IEC acceptance limits.

To avoid this distortion it would be necessary to pre-warp the filter frequencies (in a similar way to compensating for bilinear transform distortion), although I'm unaware of any way to determine the appropriate pre-warping analytically for arbitrary filter responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions