sdr.Interpolator(interpolation: int, taps: 'kaiser' | 'linear' | 'linear-matlab' | 'zoh' | ArrayLike = 'kaiser', polyphase_order: int = 23, atten: float = 80, streaming: bool = False)

Creates a polyphase FIR interpolating filter.

Parameters:
interpolation: int

The interpolation rate \(P\).

taps: 'kaiser' | 'linear' | 'linear-matlab' | 'zoh' | ArrayLike = 'kaiser'

The prototype filter design specification.

  • "kaiser": The prototype filter is designed using sdr.multirate_fir() with arguments interpolation and 1.

  • "linear": The prototype filter is designed to linearly interpolate between samples. The filter coefficients are a length-\(2P\) linear ramp \(\frac{1}{P} [0, ..., P-1, P, P-1, ..., 1]\). The first output sample aligns with the first input sample.

  • "linear-matlab": The prototype filter is designed to linearly interpolate between samples. The filter coefficients are a length-\(2P\) linear ramp \(\frac{1}{P} [1, ..., P-1, P, P-1, ..., 0]\). This is method MATLAB uses. The first output sample is advanced from the first input sample.

  • "zoh": The prototype filter is designed to be a zero-order hold. The filter coefficients are a length-\(P\) array of ones.

  • npt.ArrayLike: The prototype filter feedforward coefficients \(h[n]\).

polyphase_order: int = 23

The order of each polyphase filter. Must be odd, such that the filter lengths are even. Only used when taps="kaiser".

atten: float = 80

The stopband attenuation \(A_{\text{stop}}\) in dB. Only used when taps="kaiser".

streaming: bool = False

Indicates whether to use streaming mode. In streaming mode, previous inputs are preserved between calls to __call__().