The Convolution

An integral which appears in almost all forms of engineering is the convolution of two functions defined as

.

We will begin with two examples as motivation, but these are for the students who are interested in understanding why we are doing the convolution. You may skip to the class material.

Motivation: A Leaky Mug

Consider the leaky mug shown in Figure 1.

Figure 1. A leaky mug.

If the mug contains of fluid at time and the mug leaks at a rate of , then the amount of fluid in the mug may be described by the function in Figure 2.

Figure 2. The amount of liquid in a leaky mug starting with at time .

If while the mug is emptying, another is put into the mug at time , the function describing the amount of liquid becomes what is seen in Figure 3.

Figure 3. The amount of liquid in a mug when and are added at times and , respectively.

What happens, however, if the the mug is being filled from a tap, as is shown in Figure 4.

Figure 4. A leaky mug with a faucet.

Suppose that we start turning on the faucet at time and after two seconds, we reached a flow of and we start shutting off the faucet after 15 seconds until the faucet stops running after 17 seconds. The plot of the rate of flow of the faucet is shown in Figure 5.

Figure 5. The rate of flow of the faucet in units of centilitres per second.

What function describes the total amount of fluid in the mug? In this case, the problem is actually very difficult to describe because the differential equation which describes this problem is non-linear! The rate of change of volume involves the unit step function and this is without a faucet.

With significant effort, is is possible to determine that the amount of fluid in the mug is as is shown in Figure 6, the maximum begin achieved at time . The actual function is .

Figure 6. The total amount of fluid in the mug while being filled according to the function in Figure 5.

It is exceptionally fortunate that circuits made out of resistors, inductors, and capacitors is linear, and we will use this in the next example to justify the convolution integral.

Motivation: Discharging Capacitors

Consider the circuit in Figure 7. The differential equation of this circuit is where is the charge on the capacitor.

Figure 7. A circuit with a capacitor, three resistors, and a voltage source.

If the voltage source is zero (the system is homogeneous) and the capacitor has a charge of coulombs at time , the capacitor would discharge according to the function . If the charge on the capacitor is initially zero and a charge of size is only placed on the capacitor at time (we shocked the system with the charge ), the function describing the charge is defined by where is the unit step function. If we shock the system at time , the charge on the capacitor then falls according to the function .

For clarity, we will now define .

Using the Impulse Function

From your ECE 140 course, you are able to determine the response to a system when the voltage is constant. If you consider the functions we previously used to define the impulse function, , it is possible to determine the response: initially, the charge is zero; during the phase of duration , the voltage is constant and the capacitor is being charged; and when the voltage is turned off, the capacitor discharges again. Figure 8 shows the charge of the capacitor for where runs from 1 down to 0.01 in steps of 0.01.

Figure 8. The charge on the capacitor when the voltage is defined by the function for running from 1 down to 0.01 in steps of 0.01.

To emphasize the impulse, Figure 9 includes the impulse function. You will note that the area under the pulse is always 1, but as it becomes more narrow, its voltage increases.

Figure 9. The addition of the impulse to the function shown in Figure 8.

It seems plausible, therefore, to believe that the solution to the differential equation where the capacitor is initially discharged is and that if the impulse is , the response is .

Suppose now we shock the system twice: first at time with and then again at time with . After 1 second, the charge on the capacitor has already decayed to , but then we added another and so now the charge begins to decay starting from , as is shown in Figure 10.

Figure 10. The response of a capacitor shocked with 2 and 3 coulombs at times 0 and 1, respectively.

We may already represent these two shocks using the impulse function and the response is . What do we do, however, if the voltage is defined by a function as in , as opposed to shocks?

Consider, for example, the function shown in Figure 11.

Figure 11. The function .

Recall also that while electrical power is alternating, it is possible to approximate a function using a rectified and modulated current, as can be seen in Figure 12 where the rectified sinusoids are appropriately scaled so that the total area remains the same.

Figure 12. An approximation of the function in Figure 11 using appropriately scaled rectified sinusoids.

Using this idea, could we not not approximate a sub-interval by an impulse function multiplied by the area of the function on that sub-interval? In this case, we could approximate the function by a sequence of impulses. For example, if we were to divide the interval into equally spaced sub-intervals, denoted the width of each interval by and chose a representative point in each sub-interval, it follows that an approximation of the area on each interval is and therefore we may represent the function as .

For example, consider the image in Figure 13.

Figure 13. An approximation of the function in Figure 11 using appropriately impulse functions.

Note: this approximation is only valid with respect to the operation of integration.

The beauty of this method now comes from the observation that we already know the response of the system to each of these impulse functions: and therefore the total response is the sum of these responses:

This response is shown in Figure 14 where you will note that initially the charge on the capacitor is 0 and then with each impulse, the charge on the capacitor is correspondingly increased.

Figure 14. The response to a sequence of appropriately weighted impulse functions.

Now, rewrite the sum as

and you will note that it looks like the Riemann approximation of an integral, and as , it must converge to the integral.

.

But this is the convolution integral defined at the very start of this topic. Therefore, it follows that we can use this convolution to find the response of a system:

.

You will note that after time , the sinusoids cancel and the function is just a decaying exponential. The plot of this function superimposed on Figure 14 is shown in Figure 15.

Figure 15. The convolution response plotted over the approximation shown in Figure 14.

The Convolution and its Uses

The convolution function is so often used in engineering that not only does it have a special name, but it also has a special notation:

.

With a little effort, you can show that the operation of the convolution is symmetric:

.

The Convolution and Causal Systems

A system is causal if the response to an input signal at time depends only on the values of the function for (e.g., you do not expect your stereo to respond until you actually push a button). One consequence of causality of a linear system is that the response to the impulse function is 0 for .

In many cases, we are also working with signals which start at time , and consequently, the input will also be 0 for .

If both functions are zero for time , the convolution simplifies to

as for and for which is the form given in AMEM.

The Convolution and the Laplace Transform

Suppose we are working in the frequency domain by using the Laplace transform. What is the Laplace transform of the convolution?

From the definition, we have that

.

Because the function is causal, we may extend the inner integral to infinity:

.

We can now perform a change of variables: and therefore . Hence, the transform becomes

.

Switching the integrals, we have:

The conclusion is that

.

This is the Convolution Theorem. An alternate proof is given in AMEM, p.196.

The convolution theorem may be used to find the inverse Laplace transform; for example,

but and . Therefore, by the convolution theorem,

.

You may now use the convolution:

.

Another Example: Integral Equations

Integral equations are equations where the unknown function appears within an integrand. If the integral is in the form of a convolution, the Laplace transform method may be used. For example, consider

where is called the kernel and is given and is the forcing function.

Suppose, for example, that the kernel is and the forcing function is ; thus, we have:

and by taking the Laplace transform of each side, , , and ; therefore we have

.

Solving for , we have:

Using the Laplace transform, we have that

and

.