# How can I calculate the cyclic (periodic) convolution?

I'd like to understand how to calculate the cyclic convolution as well as understand what that means exactly. How should I go about finding the output for various periods for a system?

I have an example:

$$x(n) = \begin{cases} n & \textrm{for} \quad 1 \leq n \leq 3\\ 0 &\textrm{otherwise}\end{cases}$$

$$h(n) = \begin{cases} n & \textrm{for} \quad 1 \leq n \leq 2\\ 0 & \textrm{otherwise} \end{cases}$$

If I perform the convolution, then I get the following values for $y(n)$:

$$y(2) = 1;\quad y(3) = 4;\quad y(4) = 7;\quad y(5) = 6$$

Now, if I want a period = 3, then:

$$x(n) = x(n+3k) \quad\textrm{and}\quad h(n) = h(n+3k)$$

At this point, I'm unsure of what to do to get values that correspond to a period.

## 1 Answer

People generally define the cyclic convolution of periodic sequences $x$ and $h$ of period $N$ as $$y[n] = \sum_{m=0}^{N-1}x[m]h[n-m], n = 0, 1, \ldots, N-1.\tag{1}$$ Note that the above expression consists of $N$ different sums that you have to compute, and if while computing any particular sum, the value of $n-m$ is not in the range of numbers for which you are given $h[\cdot]$, then you use the periodicity ($h[n-m] = h[n-m+N]$ or $h[n-m] = h[n-m-N]$) to get the argument into the range for which you know the value of $h[\cdot]$. Also, note that $(1)$ holds for all integers $n$, but we don't need to calculate more than $N$ sums like $(1)$ because $y[n]$ is also a periodic sequence of period $N$ and so we have for any integer $M$ that $y[M] = y[M \bmod N]$ where, of course, $0 \leq M \bmod N \leq N-1$.

Exercise: write out the above formula explicitly, meaning no summations, for $n = 0, 1, 2$ and proceed from there. Go on; you can do it. There are only three sums of three terms each.

• Alright, I'll try it out. – Ci3 Feb 25 '13 at 16:48