Given a discrete-time LTI system with an impulse response $h[n]$, it is a common operation to find the system's output $y[n]$ for some input $x[n]$. There are several ways this can be done, including finding the system matrix $H$ and then using it to find the output via matrix multiplication: $y=Hx$. Recalling the circulant structure of that matrix, the output can be expressed in formula form: $y[n]~=~ x[n] \circledast h[n]~=~ \sum_{m=0}^{N-1} \: h[(n-m)_N] \, x[m]$. This operation is known as circular convolution (or finite-length convolution ).
Computing circular convolution
The circular convolution $x[n]\circledast h[n]$ can be computed using the following seven step procedure: --First, decide which of $x$ or $h$ you will flip and shift. Since circular convolution is commutative, either choice will result in the same output.--Second, plot the values of $x[m]$ on a circular "clock," beginning at "midnight" (for $m=0$), and continuing clockwise for a total number of "hours" that is equal to the length of the signal.--Third, plot $h[(-m)_N]$ on another clock. This simply amounts to plotting the values, starting at midnight, in a counter-clockwise direction.For a given value of $n$, $y[n]$ will be the dot product of the two "clocks." Your original plots of $x$ and $h$ correspond to $n=0$. For $n=1$, first rotate the values of $h$ in a clockwise manner, i.e., delay them one "hour" time unit. Rotating $h$ in this way is what creates $h[(n-m)_N]$. So: --Fourth, rotate the $h$ clock accordingly and,--Fifth, perform the inner product. --Sixth, repeat this for $n$ ranging from $0$ to $N-1$.--Seventh, plot your final answer and do a "reality check" to see if it seems reasonable.Let's see the circular convolution process in action. Consider the two finite-length ($N=8$) signals below:
The second step is to plot $x[m]$ and $h[(-m)_8]$. For $x$, this means starting at the zero our and then writing the values clockwise. For $h$, this means starting at zero and then writing the values counter-clockwise:
Having plotted $x[m]$ and $h[(-m)_8]$, we can now begin to find our output values corresponding to each $n$. We'll start with $n=0$, which for $h[(n-m)_8]$ is of course what we have originally plotted:
Now, for each successive value of $n$, starting with $n=1$ and going up to $n=7$, we will rotate the $h$ plot clockwise an "hour," and then find the inner product with the (unchanged) $x$.
Below are the plots for $n=2$. $x$ remains unchanged, and $h$ is shifted one hour clockwise from where it was at $n=1$:
Now for $n=3$:
Next, $n=4:
$n=5$:
$n=6$:
And finally, $n=7$: