- sdr.polyphase_decompose(taps: ArrayLike, phases: int) NDArray
Decomposes the FIR filter taps \(h_i\) into the polyphase matrix \(H_{i, j}\) with \(B\) phases.
Notes¶
The multirate FIR filter taps \(h_i\) are arranged down the columns of the polyphase matrix \(H_{i, j}\) as follows:
+------+------+------+------+ | h[0] | h[3] | h[6] | h[9] | +------+------+------+------+ | h[1] | h[4] | h[7] | 0 | +------+------+------+------+ | h[2] | h[5] | h[8] | 0 | +------+------+------+------+
References¶
fred harris, Multirate Signal Processing for Communication Systems, Chapter 7: Resampling Filters
Examples¶
Decompose the multirate FIR filter (notional taps for demonstration) into polyphase matrices with 3 and 6 phases.
In [1]: h = np.arange(0, 20) In [2]: sdr.polyphase_decompose(h, 3) Out[2]: array([[ 0, 3, 6, 9, 12, 15, 18], [ 1, 4, 7, 10, 13, 16, 19], [ 2, 5, 8, 11, 14, 17, 0]]) In [3]: sdr.polyphase_decompose(h, 6) Out[3]: array([[ 0, 6, 12, 18], [ 1, 7, 13, 19], [ 2, 8, 14, 0], [ 3, 9, 15, 0], [ 4, 10, 16, 0], [ 5, 11, 17, 0]])