torchsig.utils.dsp.estimate_filter_length

torchsig.utils.dsp.estimate_filter_length(transition_bandwidth: float, attenuation_db: float, sample_rate: float) int[source]

Estimates FIR filter length

Estimate the length of an FIR filter using fred harris’ approximation, Multirate Signal Processing for Communication Systems, Second Edition, p.59.

Parameters:
  • transition_bandwidth (float) – The transition bandwidth of the filter, 0 < transition_bandwidth < sample_rate/2.

  • attenuation_db (float) – Sidelobe attenuation level in dB.

  • sample_rate (float) – The sampling rate associated with the filter design.

Returns:

The estimated filter length

Return type:

int