Skip to main content

Circular convolution of h and x, 5 and 4 points

Short answer

Pad x[n] to length N=5: {1,2,3,1,0}. Compute the 5-point circular convolution: y[0]=1, y[1]=6, y[2]=9, y[3]=8, y[4]=4. Result: {1,6,9,8,4}.

Compute circular convolution of h(n) = {1, 2, 1, −1, 1} and x[n] = {1, 2, 3, 1}.

h(n) has 5 points and x(n) has 4 points, so take N = 5 (the longer length) and pad x(n) with one zero. The 5-point circular convolution y[n] = h[n] ⊛ x[n] is the sequence whose DFT is Y(k) = H(k)·X(k):

  • h[n] = {1, 2, 1, −1, 1}
  • x[n] = {1, 2, 3, 1, 0}

y[n] = Σ (m = 0 to 4) h[m] · x[(n − m) mod 5]

Written as a matrix product (the first column of the circulant is h, and each later column is the previous one shifted down circularly):

|    1    1   -1    1    2 |   | 1 |
|    2    1    1   -1    1 |   | 2 |
|    1    2    1    1   -1 |   | 3 |
|   -1    1    2    1    1 |   | 1 |
|    1   -1    1    2    1 |   | 0 |

Row by row:

  • y[0] = (1)(1) + (1)(2) + (−1)(3) + (1)(1) + (2)(0) = 1
  • y[1] = (2)(1) + (1)(2) + (1)(3) + (−1)(1) + (1)(0) = 6
  • y[2] = (1)(1) + (2)(2) + (1)(3) + (1)(1) + (−1)(0) = 9
  • y[3] = (−1)(1) + (1)(2) + (2)(3) + (1)(1) + (1)(0) = 8
  • y[4] = (1)(1) + (−1)(2) + (1)(3) + (2)(1) + (1)(0) = 4

Check using DFTs: the inverse DFT of H(k)·X(k), k = 0 … 4, is {1, 6, 9, 8, 4} (Σy = 28 = H(0)·X(0) = 4 × 7).

Answer: y[n] = {1, 6, 9, 8, 4}, n = 0 … 4.

(For comparison, the linear convolution has 5 + 4 − 1 = 8 points: {1, 4, 8, 8, 4, 0, 2, 1}; the 5-point circular result is obtained by adding the last 3 points back onto the first 3: {1, 6, 9, 8, 4}.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Signal Analysis and Processing chapter 7 questions →