Skip to content

Circular Convolution

For two NN-point sequences x[n]x[n] and h[n]h[n], their NN-point circular convolution is

where (n−m)N(n-m)_N denotes the residue of n−mn-m modulo NN. For example, with N=4N=4, an index of −1-1 is read as 33 and an index of 55 is read as 11.

Modulo indexing makes every sample that would lie beyond n=N−1n=N-1 wrap around and add at the beginning of the result. Circular convolution is therefore ordinary convolution of the periodic extensions of the two finite NN-sample sequences, observed over one period.

Four-point circular convolution. One sequence is fixed on a circle; the other is folded and rotated modulo four. Multiplying aligned samples and summing gives one output sample y_(c)(n).

Four-point circular convolution. One sequence is fixed on a circle; the other is folded and rotated modulo four. Multiplying aligned samples and summing gives one output sample yc(n)y_c(n).

The graphical procedure mirrors linear convolution: hold x[m]x[m] fixed, fold h[m]h[m] to obtain h[(−m)N]h[(-m)_N], rotate it circularly by nn, multiply aligned samples, and sum. The essential difference is that all indices remain on an NN-point circle.

For hand calculation, construct the folded row

[h[0],h[N−1],h[N−2],…,h[1]]\bigl[h[0],h[N-1],h[N-2],\ldots,h[1]\bigr]

for n=0n=0, take its dot product with [x[0],x[1],…,x[N−1]][x[0],x[1],\ldots,x[N-1]], and circularly shift the row one place to the right for each new output index. This is the tabular fold–rotate method in algebraic form.

Equivalently, let x=[x[0],…,x[N−1]]T\mathbf{x}=[x[0],\ldots,x[N-1]]^{\mathsf T}. Circular convolution is multiplication by a circulant matrix:

The entry in row nn, column mm is h[(n−m)N]h[(n-m)_N]. Every row is a one-place circular shift of the preceding row, which makes the modulo indexing visible and provides a reliable check on a hand-built table.

If

x[n]⟷X[k],h[n]⟷H[k],x[n]\longleftrightarrow X[k], \qquad h[n]\longleftrightarrow H[k],

are NN-point DFT pairs, then

Thus pointwise multiplication of two NN-point DFTs followed by an NN-point IDFT produces an NN-point circular convolution.

To prove the theorem, insert the circular-convolution sum into the DFT and put r=(n−m)Nr=(n-m)_N:

Y[k]=∑n=0N−1∑m=0N−1x[m]h[(n−m)N]WNkn=∑m=0N−1x[m]WNkm∑r=0N−1h[r]WNkr=X[k]H[k].\begin{aligned} Y[k] &=\sum_{n=0}^{N-1}\sum_{m=0}^{N-1} x[m]h[(n-m)_N]W_N^{kn}\\ &=\sum_{m=0}^{N-1}x[m]W_N^{km} \sum_{r=0}^{N-1}h[r]W_N^{kr}\\ &=X[k]H[k]. \end{aligned}

The substitution is valid because, for fixed mm, modulo-NN addition merely permutes the NN values of rr. The dual property is

x[n]h[n]⟷1N(X[k]⊛NH[k]).x[n]h[n]\longleftrightarrow \frac{1}{N}\bigl(X[k]\circledast_N H[k]\bigr).

Let yℓ[n]=x[n]∗h[n]y_\ell[n]=x[n]*h[n] be ordinary linear convolution and let yc[n]y_c[n] be their NN-point circular convolution after both inputs have been represented with length NN. Their exact wrap relation is

Shifted copies of the linear-convolution result overlap and add every NN samples. This wraparound is called time-domain aliasing.

Suppose the nonzero input lengths are LL and MM. The linear convolution has length at most L+M−1L+M-1. Choosing

N≥L+M−1N\geq L+M-1

prevents overlap because the complete result fits within one NN-sample period. Linear convolution can therefore be computed using a DFT as follows:

  1. Choose a DFT length N≥L+M−1N\geq L+M-1.

  2. Zero-pad both sequences to length NN.

  3. Compute the NN-point DFTs X[k]X[k] and H[k]H[k].

  4. Multiply bin by bin: Y[k]=X[k]H[k]Y[k]=X[k]H[k].

  5. Take the NN-point IDFT of Y[k]Y[k] to obtain the linear convolution.

Without sufficient zero-padding, the IDFT instead returns aliased circular convolution.

Transforming an indefinitely long input in one FFT is impractical. For an FIR impulse response of length MM, choose an FFT length N≥MN\geq M and let

L=N−M+1L=N-M+1

be the usual number of new input samples processed per block. Two standard block methods use NN-point circular convolutions while reproducing the exact linear convolution.

  1. Divide the input into nonoverlapping blocks of LL samples.

  2. Zero-pad each block and the MM-sample impulse response to length N≥L+M−1N\geq L+M-1.

  3. Compute an NN-point FFT, multiply by the precomputed H[k]H[k], and take the IFFT. Each block result is a length-(L+M−1)(L+M-1) linear convolution.

  4. Place successive results LL samples apart and add their overlapping M−1M-1 output samples.

Zeros prevent aliasing within each block; the final addition reconstructs the tails that neighbouring input blocks contribute to the same output samples.

  1. Form each NN-sample input block from the previous M−1M-1 samples and L=N−M+1L=N-M+1 new samples. Adjacent input blocks overlap by M−1M-1.

  2. Compute the NN-point circular convolution by FFT multiplication.

  3. Discard the first M−1M-1 output samples, which contain wraparound aliasing, and save the remaining LL valid samples.

Overlap-save uses no output addition and normally needs no input-block zero padding after the initial boundary block. Overlap-add pads blocks and adds output tails; overlap-save overlaps inputs and discards corrupted output heads. Both are exact when the stated lengths are respected.