Signals & Systems

Continuous-Time Convolution Example #2

The impulse response h(t) and input signal x(t) for a linear time-invariant system are shown below. Both are causal signals since they are zero for all negative time. Plots of h(t) and x(t) are shown in the first figure.

Input x(t) and Impulse Response h(t)

The output y(t) is generated through the convolution integral of the input signal and the impulse response. The value of the output y(t) at a single instant of time is equal to the area under the curve of the product of the one of the signals (input or impulse response) with a time-reversed and time-shifted version of the other signal. The amount of time shift of that signal is equal to the value of time at which the output signal is being evaluated. The convolution integral is shown below. The two figures after that show a graphical representation of convolution. The first figure showns the input and impulse response signals, with the impulse response reversed in time and shifted by t = 2.5 seconds. The second figure shows the non-zero portion of the product of those two curves. The area under that product is the value of y(t) at t = 2.5 seconds.

Input x(tau) and Impulse Response h(t-tau)
Product of x(tau) and h(t-tau)

The convolution integral can be evaluated analytically. The resulting expression for the output y(t) is given below, along with the plots of x(t), h(t), and y(t). The red star on the curve representing y(t) at t = 2.5 seconds corresponds to evaluating the area under the curve in the previous figure. The equation for y(t) shows that the output signal contains each of the terms appearing in x(t) and h(t).

Output signal y(t)

Since the output signal is generated using the convolution integral, it might be asked if the MATLAB function "conv" can be used to generate the output numerically, given data arrays for the input signal and the impulse response. The answer is "yes", with two words of caution. The first concerns a scale factor which is needed when using the "conv" function in this way. This function is approximating the convolution integral by a summation. Assuming that the data in the arrays for x(t) and y(t) are samples of the continuous-time signals, with the samples separated by dt seconds, the result of using the "conv" function must be multiplied by dt. In this example, dt = 0.01 seconds. The syntax is for using the "conv" function to generate y(t) is given after the second word of caution.

Assume that the input signal x(t) and the impulse response h(t) are each represented by a data array with a total of N elements. The data spacing in each array is dt seconds. When the "conv" function is used with the x and h arrays, the result is an array with 2N-1 elements, with a data spacing of dt seconds. The interpretation of this is the following:

In our example, both x(t) and h(t) exist for all positive time, but the data are only stored and plotted for 10 seconds. Since x(t) and h(t) do not equal 0 for time after 10 seconds, only the first N elements from using the "conv" function represent correct values of y(t). For this case, the syntax for using the "conv" function is

The next figure shows the ouput signal computed by using the MATLAB "lsim" function and by using the MATLAB "conv" function. The two curves are virtually identical, with round-off noise being the only difference in the curves.
Comparison of Output Signals

In the time domain, the output signal y(t) is given by the convolution integral of x(t) and h(t). In the complex frequency domain, the output transform Y(s) is given by the product of X(s) and H(s). The transforms are shown below, along with Bode plots of the magnitudes and phases of the three signals as functions of frequency. You should note how the curves for Y(w) depend on the curves for X(w) and H(w).

Bode Plots for H(s)

MATLAB Code

Click the icon to return to Dr. Beale's home page

Latest revision on Thursday, May 18, 2006 10:51 PM