sdr.multirate_fir(interpolation: int, decimation: int = 1, polyphase_order: int = 23, atten: float = 80) NDArray[float64]

Designs a multirate FIR filter impulse response \(h[n]\) using the Kaiser window method.

Parameters:
interpolation: int

The interpolation rate \(P\).

decimation: int = 1

The decimation rate \(Q\).

polyphase_order: int = 23

The order of each polyphase filter. Must be odd, such that the filter lengths are even.

atten: float = 80

The stopband attenuation \(A_{\text{stop}}\) in dB.

Returns:

The multirate filter impulse response \(h[n]\).

References

Examples

Design a multirate FIR filter for rational resampling by 11/3.

In [1]: h = sdr.multirate_fir(11, 3)

In [2]: plt.figure(); \
   ...: sdr.plot.impulse_response(h);
   ...: 

In [3]: plt.figure(); \
   ...: sdr.plot.magnitude_response(h);
   ...: 
../../_images/sdr_multirate_fir_1.png ../../_images/sdr_multirate_fir_2.png