sdr.polyphase_decompose(branches: int, taps: ArrayLike) NDArray

Decomposes the prototype filter taps \(h[n]\) into the polyphase matrix \(h_i[n]\) with \(B\) phases.

Parameters:
branches: int

The number of polyphase branches \(B\).

taps: ArrayLike

The prototype filter feedforward coefficients \(h[n]\).

Returns:

The polyphase matrix \(h_i[n]\).

Notes

The multirate FIR filter taps \(h[n]\) are arranged down the columns of the polyphase matrix \(h_i[n]\) as follows:

Polyphase Matrix with 3 Phases
+------+------+------+------+
| 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(3, h)
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(6, h)
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]])