Convolution is used in a variety of signal-processing applications, including time-domain-waveform filtering.
In a recent series on the inverse fast Fourier transform (FFT), we concluded with a mention of convolution and its application to filtering.
Convolution
Q: What is convolution?
A: Convolution, denoted by * symbol, combines two functions to form a third function in accordance with this integral:
As with the Fourier transform, there is a discrete version:
What’s an application for convolution?
A: If you have an arbitrary function of time f(t) and you know a filter’s impulse response h(t), you can substitute h(t) for g(t) in either of the above equations and calculate the filter’s output, as shown in Figure 1.

What role does t play?
A: t is a dummy variable over which we perform integration (Eq. 1) or summation (Eq. 2). An example using simple geometric shapes helps illustrate how convolution works. In Figure 2a, f(t) is a rectangular pulse, or boxcar function, that equals 1 for time units 0 to 10 and 0 everywhere else. In contrast, g(t) is a single sawtooth cycle that rises from 0 to 1 in 10 time units and is 0 everywhere else. Because g(t) is zero outside a well-defined time window, a filter with such an impulse response is called a finite-impulse-response (FIR) filter.
To convolve these two functions, we convert both to functions of t and plot them on the same t-axis (Figure 2b). Then, we mirror g(t ) around the y-axis, forming g(-t), as shown in Figure 2c, keeping in mind that g(-t) does not equal –g(t). Finally, we bring t back into the picture by adding a time delay t to g(-t), forming g(t–t). For t=0, g(t–t) remains the same as g(-t) in Figure 2c, as indicated in Figure 2d, which also shows g(t–t) for t = -20. Now, we can use Eq. 2 to calculate the products and sums necessary to determine output y(t).

It looks as though the products and sums will all be zero for values of t less than 0; is that right?
A: Right, so there’s no need to go back to minus infinity or as close as we can come within the limits of our oscilloscope’s acquisition memory. We’ll start our calculation at t=0, as shown in Figure 2c and repeated in Figure 3a. We note that the product of f(t)g(t–t ) is zero, so we record that value for future use in plotting y(t). Next, in Figure 3b, we increment t by one, shifting g(t–t) one-time unit to the right. We notice that g(t–t) overlaps f(t) in the form of a triangle whose height hT is 0.1 and width wT is 1, and we see that y(1)=0.1×1/2=0.05.

So, next, we can increment t again to t=2, as in Figure 3c, where we have a triangle of height 0.2 and width 2 for a total area of 0.02, correct?
A: That’s the correct answer for this example, but we are in danger of a major mistake. Let’s look at t=7 in Figure 3d to get a closer look. Here, the product is represented by a triangle of height 0.7 and width 7 for an area of 2.45. But we don’t know in advance that g(t) will be a straight line from t=0 to t=7, so we have to evaluate the seven products for each integer value of t individually and sum them, as shown by the seven alternatively shaded yellow and blue segments and associated equations in Figure 3d. Note that if g(t) actually followed the trajectory of the red dashed line from t =1 to t =6, our triangle approximation would miss an area of 1.25.
Can we plot y(t) now?
A: Yes. The blue curve in Figure 4 shows y(t), along with snapshots of the convolution diagrams for y = 0, 5, 10, 15, and 20.

Could you provide a more useful example of convolution?
A: Next time, we will look at a practical example of convolution for a signal-filtering application.
Related EE World content
Measuring active and passive filters
Making best use of acquisition memory in digital storage oscilloscopes
Fast Fourier Transforms
Filters, Part 1: Analog, switched, and digital filters
An overview of filters and their parameters, Part 1: Context
Why does the Fourier Transform provide apparently inaccurate results, and what can I do about it? Part 1
Leave a Reply
You must be logged in to post a comment.