<< Chapter < Page Chapter >> Page >

It is a fundamental operation in signal processing, given an LTI system $H$ and input $x[n]$, to find the output $y[n]$. From our study of LTI systems, we have seen that there are several ways to find the output of the system. --One is to find the output $y[n]$ at each time $n$ using the input-output relationship (which defines the out $y[n]$ in terms of the input and output at other various times).--Another option is to take the system matrix $H$ and the input vector $x[n]$ and perform a matrix multiplication $y=Hx$--A final option is to find the output at a given time in terms of a summation involving only the input and the system's impulse response:$y[n] ~=~ \sum_{m=-\infty}^\infty h[n-m]\, x[m]$That final option has a special name: it is the convolution of $x[n]$ and the system impulse response $h[n]$. It also has a special operator symbol, $\ast$, so that the convolution of $x[n]$ and $h[n]$ is expressed as $x[n]\ast h[n]$.

Computing convolution

Given an LTI system's impulse response $h[n]$ and an input $x[n]$, the process of computing the output $y[n]$ via the convolution sum formula ($\sum_{m=-\infty}^\infty h[n-m]\, x[m]$) is straightforward, according to the following steps:--Step 1: decide which of $x$ or $h$ you will flip and shift; you have a choice since $x \ast h = h \ast x$. We will suppose you choose to flip $h$. --Step 2: plot $x[m]$ --Step 3: plot $h[-m]$, the time reversed version of the impulse response --Step 4:~ To compute $y$ at the time point $n$, plot the time-reversed impulse response after it has been shifted to the right (delayed) by $n$ time units: $h[-(m-n)]=h[n-m]$--Step 5: $y[n]=$ the inner product between the signals $x[m]$ and $h[n-m]$(Note: for complex signals, do not complex conjugate the second signal in the inner product) -- Step 6: Repeat for all $n$ of interest (potentially all $n\in Z$)--Step 7: Plot $y[n]$ and perform a reality check to make sure your answer seems reasonable

Here we will illustrate convolution by convolving two signals together, $x[n]$ and $h[n]$, plotted below. We will call the result of the convolution $y[n]$, so $y[n]=x[n]\ast h[n]$.

Image
CAPTION.
Image
CAPTION.
CAPTION.
Recall that the first step of the convolution process is to decide which of the signals we will "flip and shift." The final result will be the same in either case, the only difference is in working the problem out. But here it truly does not matter, because the signals are identical. But we will say that we are flipping and shifting $h[n]$.

The second and third steps are to plot $x[m]$ and $h[-m]$:

Image
CAPTION.
Image
CAPTION.
CAPTION.

Now step 4 and 5 are to shift $h[n-m]$ by varying $n$ and then computing the inner product between $h[n-m]$ and $x[m]$. For each shift, that inner product will be the value of the output $y[n]$ for that value of $n$. In the figures below, we will see how $h[n-m]$ and $x[m]$ look for each $n$ ($x[m]$ of course will not change), and will progressively build up $y[n]$ as $n$ increases. We'll start with $n=-1$:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.
Notice how for this value of $n$, and for all $n$ less than that as well (for which $h[n-m]$ will be even farther to the left), $x[m]$ and $h[n-m]$ have no overlapping nonzero values. Therefore the dot product in these cases is zero.

So for $n\lt 0$, the dot products of $x[m]$ and $h[n-m]$ are zero, and hence $y[n]$ is zero for these $n$. Now let's consider $n=0$:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.
So now, for $n=0$, $x[m]$ and $h[n-m]$ overlap just a bit (at $m=0$), and the value of the dot product of the two signals is $1$. So $y[0]=1$.

The next shift to the right makes $n=1$:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.
There are two nonzero locations where $x[m]$ and $h[n-m]$ line up, $m=0$ and $m=1$. The dot product of the signals for this $n=1$ is $1\cdot 1+1\cdot 1=2$, so $y[2]=2$.

Continuing to shift $h[n-m]$ to the right, we have for $n=2$:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.
For $n=2$, the two signals are now maximally aligned, with a dot product of $1\cdot 1+1\cdot 1+1\cdot 1=3$. So $y[2]=3.$

At $n=3$, $h[n-m]$ has moved past the point of maximum alignment; as with $n=1$, the dot product between it and $x[m]$ is $2$:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.

We're approaching the end of our work on this convolution problem. At $n=4$, $h[n-m]$ has just about moved on past the point of overlapping nonzero values with $x[m]$:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.
The got product between the two signals is only 1.

Finally, for $n=5$, there is no nonzero overlap between $x[m]$ and $h[n-m]$, so the dot product is zero. For all $n\gt 5$ (for which $h[n-m]$ moves even farther to the right) this is the case as well:

Image
CAPTION.
Image
CAPTION.
Image
CAPTION.
CAPTION.

We have found the dot product between $x[m]$ and $h[n-m]$, and therefore $y[n]$, for all integer values of $n$, so our convolution computation is finished. The final step of the convolution is to examine the plot of $y[n]$ and do a quick "reality check" to make sure the answer is reasonable. At this introductory point, you might not know what to expect a convolution looks like, so it may not be clear if it is reasonable or not. But in time, especially as you understand the "flip and shift" nature of convolution, you will gain a feel for how convolutions should generally look.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Discrete-time signals and systems. OpenStax CNX. Oct 07, 2015 Download for free at https://legacy.cnx.org/content/col11868/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Discrete-time signals and systems' conversation and receive update notifications?

Ask