- class sdr.FIRInterpolator
Implements a polyphase finite impulse response (FIR) interpolating filter.
Notes¶
The polyphase interpolating filter is equivalent to first upsampling the input signal \(x[n]\) by \(r\) (by inserting \(r-1\) zeros between each sample) and then filtering the upsampled signal with the prototype FIR filter with feedforward coefficients \(h_{i}\).
Instead, the polyphase interpolating filter first decomposes the prototype FIR filter into \(r\) polyphase filters with feedforward coefficients \(h_{i, j}\). The polyphase filters are then applied to the input signal \(x[n]\) in parallel. The output of the polyphase filters are then commutated to produce the output signal \(y[n]\). This prevents the need to multiply with zeros in the upsampled input, as is needed in the first case.
Polyphase 2x Interpolating FIR Filter Block Diagram¶+------------------------+ +-->| h[0], h[2], h[4], h[6] |--> ..., y[2], y[0] | +------------------------+ ..., x[1], x[0] --+ | +------------------------+ +-->| h[1], h[3], h[5], 0 |--> ..., y[3], y[1] +------------------------+ Input Hold Output Commutator (top-to-bottom)
The polyphase feedforward taps \(h_{i, j}\) are related to the prototype feedforward taps \(h_i\) by
\[h_{i, j} = h_{i + j r} .\]Constructors¶
-
FIRInterpolator(taps: ArrayLike, rate: int, streaming: bool =
False
) Creates a polyphase FIR interpolating filter with feedforward coefficients \(h_i\).
Methods¶
- filter(x: ArrayLike, ...) ndarray
Filters and interpolates the input signal \(x[n]\) with the FIR filter.
- reset()
Streaming-mode only: Resets the filter state.
Properties¶
- property polyphase_taps : ndarray
The polyphase feedforward taps \(h_{i, j}\).
-
FIRInterpolator(taps: ArrayLike, rate: int, streaming: bool =