Introduction to the convolution
Amongst the concepts that cause the most confusion to electrical engineering students, the Convolution Integral stands as a repeat offender. As such, the point of this article is to explain what a convolution integral is, why engineers need it, and the math behind it.
In essence, the “convolution” of two functions (over the same variable, e.g. and ) is an operation that produces a separate third function that describes how the first function “modifies” the second one. Conversely, the resulting function can be seen as how the second function “modifies” the first function. Sometimes the result is used to describe how much the first two functions “have in common.” In all honesty, the concept of the convolution of two functions is quite abstract, but the frequency at which it appears in nature grants its importance to scientists and engineers. Ultimately the aim here is to identify its use to electrical engineers – so for now do not dwell solely on its mathematical significance.
A convolution of two functions is denoted with the operator “”, and is written as:
Where is used as a “dummy variable.” To aid in understanding this equation, observe the following graphic:
Before diving any further into the math, let us first discuss the relevance of this equation to the realm of electrical engineering.
Why is the convolution integral relevant?
Most electrical circuits are designed to be linear, time-invariant (LTI) systems. Being “linear” implies that the magnitude of a circuit’s output signal is a scaled version of the input signal’s magnitude. Further, an LTI system that is excited by two independent signal sources will output the sum of the scaled versions of each signal. This is extended for an infinite number of independent signal sources, and gives rise to the concept of superposition. Put in another way, if a function causes an LTI system to output , then:
Where is a multiplicative constant. In addition to this, superposition allows us to say:
Being a “time-invariant” system means it does not matter when the input signal is applied – a specific input signal will always result in the same output signal for a given LTI system. Put mathematically, time-invariance can be expressed as:
where can be viewed as a time delay when dealing with signals through time (i.e. “time-domain signals”). Though not directly, this concept also signifies that an output signal cannot contain frequency components not inherent in the input signal (causality).
The vast majority of circuits are LTI systems, each with a specific impulse response. The “impulse response” of a system is a system’s output when its input is fed with an impulse signal – a signal of infinitesimally short duration. A real-world “impulse signal” would be something like a lightning bolt – or any form of ESD (electro-static dischage). Basically, any voltage or current that spikes in magnitude for a relatively short period of time may be viewed as an impulse signal. The impulse response of a circuit will always be a time-domain signal, and exists because no signal can propagate through a circuit in zero time; each individual electron involved can only move so quickly through each component. Typically, real-world electronic LTI systems exhibit an impulse response that consists of an initial spike in magnitude, followed by an everlasting and ever-decreasing exponential relationship in signal magnitude. The following image describes this graphically.
So, here’s the big deal: the fact that each LTI circuit has a specific impulse response function (here, referred to as ) is very useful in predicting its behavior given a particular input signal (here, referred to as ). This is because the input signal itself may be viewed as an impulse train – a stream of continuous impulse functions, with infinitesimally short durations of time between each impulse. This fact, along with superposition, allows one to find the output of an LTI system given an arbitrary input signal by summing the LTI system’s impulse response to each impulse function that make up the input signal. By allowing the time between each “impulse” of the input signal to go to zero, this approach can be used to determine the output time-domain signal of an LTI system for any time-domain input signal. For example, the following graphic shows the output of an RC circuit when fed with a square pulse:
What is seen here is the integral of the impulse response and the input square wave as the square wave is stepped through time. In the above convolution equation, it is seen that the operation is done with respect to , a dummy variable. In reality, we are taking an input signal, flipping it vertically through the origin (not evident with a square wave), and determining what the integral is at each value of , which here is delay through time. Since the output of any LTI system is non-causal (meaning it cannot exist until the signal that excites the output has been applied), we must mathematically step through time to see how each impulse signal of the input affects the LTI system’s impulse response – again, achieved by stepping through – the “time-delay” dummy variable.
A Convolution Example
To see how the convolution integral can be used to predict the output of an LTI circuit, observe the following example:
For an LTI system with an impulse response of , calculate the output, , given the input of:
The output of this system is found by solving:
We only integrate between 0 and + because, if we define as the time that the input signal is applied, then both and have zero magnitude at any time .
From there, we calculate:
Next, we can simplify and compute the integral:
Since for all , we can write the output as:
This result describes the output function for an LTI system with an impulse response when fed the input signal .
5 Steps to perform mathematical convolution
Often, one may wish to compute the convolution of two signals that can’t be described with one function of time alone. For arbitrary signals, such as pulse trains or PCM signals, the convolution at any time t can be computed graphically. For signals whose individual “sections” can be described mathematically, follow these steps to perform a convolution:
1.) Choose one of the two funtions ( or ), and leave it fixed in -space.
2.) Flip the other function vertically across the origin, so that it is time-inverted.
3.) Shift the inverted signal through the axis by seconds. Choose to shift the signal to the first “section” of the fixed function that is described by the same equation. The inverted signal (say, ), now shifted, represents , which is basically a “freeze frame” of the output after the input signal has been fed to the LTI system for seconds.
4.) The integral of the two functions, after shifting the inverted function by seconds, is the value of the convolution integral (i.e. output signal) at .
5.) Repeat this procedure through all “sections” of the function fixed in -space. By doing this, you can compute the value of the output at any time !
The following is a list of useful properties of the convolution integral that can help in developing an intuitive approach to solving problems:
1.) Commutative Property:
2.) Distributive Property:
3.) Associative Property:
4.) Shift Property:
5.) Convolution with an Impulse results in the original function:
where is the unit impulse function
6.) Width Property:
The convolution of a signal of duration and a signal of duration will result in a signal of duration
Finally, here is a Convolution Table that can greatly reduce the difficulty in solving convolution integrals.