Skip to main content

Circular convolution of two sequences

Short answer

Pad y to N=4: {2,0,2,0}. Circular convolution of {1,0,0,1} and {2,0,2,0} yields z[n] = {2, 2, 2, 2}.

Find circular convolution of the signal x[n] = {1, 0, 0, 1} (x[0] = 1, first sample) and y[n] = {2, 0, 2} (y[0] = 2, first sample).

x[n]x[n] has 4 samples and y[n]y[n] has 3, so use N=4N = 4 and pad y[n]y[n] with one zero:

x[n]={1,0,0,1},y[n]={2,0,2,0}x[n] = \{1, 0, 0, 1\}, \qquad y[n] = \{2, 0, 2, 0\}

Formula:

z[n]=x[n]⊛y[n]=∑m=03x[m] y[(n−m)4],n=0,1,2,3z[n] = x[n] \circledast y[n] = \sum_{m=0}^{3}x[m]\,y[(n-m)_4], \quad n = 0,1,2,3

Matrix (circulant) method: columns of the matrix are circular shifts of y[n]y[n]:

[z[0]z[1]z[2]z[3]]=[2020020220200202][1001]\begin{bmatrix} z[0] \\ z[1] \\ z[2] \\ z[3] \end{bmatrix} = \begin{bmatrix} 2 & 0 & 2 & 0 \\ 0 & 2 & 0 & 2 \\ 2 & 0 & 2 & 0 \\ 0 & 2 & 0 & 2 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix}

Each sample:

z[0]=x[0]y[0]+x[1]y[3]+x[2]y[2]+x[3]y[1]=2+0+0+0=2z[1]=x[0]y[1]+x[1]y[0]+x[2]y[3]+x[3]y[2]=0+0+0+2=2z[2]=x[0]y[2]+x[1]y[1]+x[2]y[0]+x[3]y[3]=2+0+0+0=2z[3]=x[0]y[3]+x[1]y[2]+x[2]y[1]+x[3]y[0]=0+0+0+2=2\begin{aligned} z[0] &= x[0]y[0] + x[1]y[3] + x[2]y[2] + x[3]y[1] = 2 + 0 + 0 + 0 = 2 \\ z[1] &= x[0]y[1] + x[1]y[0] + x[2]y[3] + x[3]y[2] = 0 + 0 + 0 + 2 = 2 \\ z[2] &= x[0]y[2] + x[1]y[1] + x[2]y[0] + x[3]y[3] = 2 + 0 + 0 + 0 = 2 \\ z[3] &= x[0]y[3] + x[1]y[2] + x[2]y[1] + x[3]y[0] = 0 + 0 + 0 + 2 = 2 \end{aligned}

Answer: z[n]=x[n]⊛y[n]={2,2,2,2}z[n] = x[n] \circledast y[n] = \{2, 2, 2, 2\}

Check with linear convolution: x∗y={2,0,2,2,0,2}x * y = \{2, 0, 2, 2, 0, 2\} (length 6). Wrapping samples n=4,5n = 4, 5 onto n=0,1n = 0, 1 (time aliasing for N=4N = 4): {2+0,  0+2,  2,  2}={2,2,2,2}\{2+0,\; 0+2,\; 2,\; 2\} = \{2,2,2,2\}. Also, the sum of zz (8) equals sum of xx (2) times sum of yy (4).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Signals and Systems chapter 3 questions →