sdr.design_multirate_fir(up: int, down: int = 1, half_length: int = 12, A_stop: float = 80) NDArray[float_]

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

Parameters:
up: int

The interpolation rate \(P\).

down: int = 1

The decimation rate \(Q\).

half_length: int = 12

The half-length of the polyphase filters.

A_stop: 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.design_multirate_fir(11, 3)

In [2]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.impulse_response(h);
   ...: 

In [3]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.magnitude_response(h);
   ...: 
../../_images/sdr_design_multirate_fir_1.png ../../_images/sdr_design_multirate_fir_2.png