Skip to content Skip to navigation

Connexions

You are here: Home » Content » Convolution - Complete example

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Convolution - Complete example

Module by: Anders Gjendemsjø, Richard Baraniuk. E-mail the authors

Summary: Shows a full example of convolution including math and figures.

Basic Example

Let us look at a basic continuous-time convolution example to help express some of the important ideas. We will convolve together two square pulses, xtxt and htht, as shown in Figure 1

Figure 1: Two basic signals that we will convolve together.
(a)
Figure 1(a) (x_t.png)
(b)
Figure 1(b) (h_t.png)

Reflect and Shift

Now we will take one of the functions and reflect it around the y-axis. Then we must shift the function, such that the origin, the point of the function that was originally on the origin, is labeled as point tt. This step is shown in Figure 2, htτ h t τ .

Figure 2: hτ h τ and htτ h t τ .
(a) Reflected square pulse.(b) Reflected and shifted square pulse.
Figure 2(a) (h_-tau.png)Figure 2(b) (h_t-tau.png)
Note that in Figure 2 ττ is the 1st axis variable while tt is a constant (in this figure). Since convolution is commutative it will never matter which function is reflected and shifted; however, as the functions become more complicated reflecting and shifting the "right one" will often make the problem much easier.

Regions of Integration

We start out with the convolution integral, yt=xτhtτdτ y t τ x τ h t τ . The value of the function yy at time tt is given by the amount of overlap(to be precise the integral of the overlapping region) between htτ h t τ and xτ x τ .

Next, we want to look at the functions and divide the span of the functions into different limits of integration. These different regions can be understood by thinking about how we slide htτ h t τ over xτ x τ , see Figure 3.

Figure 3: Figures to help understand the regions of intergration
(a) No overlap.
Figure 3(a) (convolve1.png)
(b) htτ h t τ on its way "into" xτ x τ
Figure 3(b) (convolve2.png)
(c) htτ h t τ on its way "out of" xτ x τ
Figure 3(c) (convolve3.png)
(d) No overlap.
Figure 3(d) (convolve4.png)
In this case we will have the following four regions. Compare these limits of integration to the four illustrations of htτ h t τ and xτ x τ in Figure 3.

Four Limits of Integration

  1. t<0 t 0
  2. 0t<1 0 t 1
  3. 1t<2 1 t 2
  4. t2 t 2

Using the Convolution Integral

Finally we are ready for a little math. Using the convolution integral, let us integrate the product of xτhtτ x τ h t τ . For our first and fourth region this will be trivial as it will always be 00. The second region, 0t<1 0 t 1 , will require the following math:

yt=0t1d τ =t y t τ 0 t 1 t
(1)
The third region, 1t<2 1 t 2 , is solved in much the same manner. Take note of the changes in our integration though. As we move htτ h t τ across our other function, the left-hand edge of the function, t1 t 1 , becomes our lowlimit for the integral. This is shown through our convolution integral as
yt=t111d τ =1(t1)=2t y t τ t 1 1 1 1 t 1 2 t
(2)
The above formulas show the method for calculating convolution; however, do not let the simplicity of this example confuse you when you work on other problems. The method will be the same, you will just have to deal with more math in more complicated integrals.

Note that the value of ytyt at all time is given by the integral of the overlapping functions. In this example yy for a given tt equals the gray area in the plots in Figure 3.

Convolution Results

Thus, we have the following results for our four regions:

yt={0  if  t<0t  if  0t<12t  if  1t<20  if  t2 y t 0 t 0 t 0 t 1 2 t 1 t 2 0 t 2
(3)
Now that we have found the resulting function for each of the four regions, we can combine them together and graph the convolution of xt*ht x t h t .

Figure 4: Shows the system's output in response to the input, xt x t .
Figure 4 (y_t.png)

Common sense approach

By looking at Figure 3 we can obtain the system output, ytyt, by "common" sense. For t<0t0 there is no overlap, so ytyt is 0. As tt goes from 0 to 1 the overlap will linearly increase with a maximum for t=1t1, the maximum corresponds to the peak value in the triangular pulse. As tt goes from 1 to 2 the overlap will linearly decrease. For t>2t2 there will be no overlap and hence no output.

We see readily from the "common" sense approach that the output function ytyt is the same as obtained above with calculations. When convolving to square pulses the result will always be a triangular pulse. Its origin, peak value and strech will, of course, vary.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks