






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Convolution is the term given to the mathematical technique for determining a system output given an input signal and the system impulse response. It is written as
When you start the convolution tool you will find that you can select signals, run animations, and control the display properties. The current input signal and system impulse response are displayed - you can change the data in these graphs by clicking and dragging with the mouse or you can select pre-defined signals using the menus. It is helpful if you ensure that the signal and system response are coloured differently.
The other graphs show the time-reversed input signal and the system response, the product of the time-reversed input signal (due to the in equation (1)) and the system response, and their convolution. The product and convolution data will change as the time-reversed input signal is moved relative to the system impulse response.
When the system impulse response is a unit pulse and the input is a ramp function, you can test out the convolution process by clicking on the symbol in the combined time-reversed system impulse response and signal graph and dragging the time reversed input signal backwards and forwards through the system impulse response. You can also let the tool do this for you by clicking on the double arrow button.
As the ramp signal is shifted through the unit pulse, the product graph clearly shows that the convolution is calculating the area under a selected portion of the ramp signal. The convolution graph plots the increasing, and then decreasing area of this product. The system with this impulse response is known as a finite time integrator as it performs integration over a finite length of the input signal. Experiment with other input signals such as sine waves, other unit pulses, impulses, etc.
Change the system response to a single impulse at 2ms. As you perform the convolution, as before, you will find that the output is a copy of the input signal, except that it is delayed by 2ms. In this instance, the impulse is performing a sampling function of the input signal as described by
Examination of the product will reveal that the integrand, , is also an impulse. In fact,
the impulse is a scaled unit impulse, the scaling resulting in an impulse of area , hence the final
convolution result of Thus, analytically we find that the system response of a unit impulse
results in the output of the system being a copy of the input signal, with the only difference being a time shift.
As a heuristic argument as to why this should be the case, think of the system response as the system
output when the input signal is an impulse function at time When the system response is also an impulse, then the input signal shape doesn’t alter. If that impulse is at a non-zero time value, then there is a time shift between the input and the output of the system. (For real systems any time shift must represent a delay, otherwise the system would predict its own input signal)!
A system that sums two delayed versions of the input signal is represented by two impulses in the system response. Experiment with the effects that you can obtain by examining system responses consisting of impulses.
Discrete Convolution
Convolution, as just described using integrals, has a discrete time parallel which is more appropriate to digital signal processing systems.
For the mathematics, the integration is replaced by a summation, hence convolution may be re-expressed as
The same experiments carried out for the continuous system may be repeated for the discrete case, with similar results. Select a system of 16 sample length unit pulse, and a signal of a sampled ramp. Sliding the signal over the system response, the discrete time integrator can be seen to operate. The product of the two waveforms is displayed on the middle graph, and the sum of the product samples displayed on the lower graph.
Set the system response to be a unit sample at sample number 8, and select any signal that you desire. As you slide the signal through the system response you will observe that the discrete convolution result is a copy of the signal, delayed by 8 samples. This illustrates the discrete time equivalent system response to the impulse in the system response for the continuous time system. Thus the system response is described as the unit pulse response in a discrete time system, while it is described as the impulse response in a continuous time system.
Again, experiment with different system responses, and signals, designing your own on the signal window if you wish to try out signals that are not pre-defined.
The Application of Discrete Time Convolution
Discrete time convolution can be used to determine the output of a sampled data system from its input and pulse response. A commonly used discrete system is a finite impulse response (FIR) filter.
Fourier Transforms
The Fourier transform defines a relationship between a signal in the time domain and its representation in the frequency domain. Being a transform, no information is created or lost in the process, so the original signal can be recovered from knowing the Fourier transform, and vice versa.
The Fourier transform of a signal is a continuous complex valued signal capable of representing real valued or complex valued continuous time signals.
The tool allows you to view these complex valued signals as either their real and quadrature (also known as imaginary) components separately, or by a magnitude and phase representation. You may switch between these two representations at any point. Mathematically switching between the two representations for a given complex value can be expressed as
and
or equivalently,
and
where and are the magnitude and phase of the complex number, and and are the real and quadrature components of the complex number. In this tool, the magnitude is plotted on a dB scale. Select a few signals, such as unit pulses and sine waves, and view them using the two methods to see how they are related.
The Fourier transform itself is defined by the equation
where is the Fourier transform of Frequency is measured in Hertz, with as the frequency variable.
Using the tool, display the Fourier transform of a 4ms unit pulse. You will observe that the frequency response is a continuous signal with a maximum at 0 Hz, and some periodicity. The frequency response is zero at every multiple of 250Hz. Compare this with the frequency response of a unit pulse of 8ms in duration. Here the general shape of the signal is the same, but the zero crossings are at a spacing of 125Hz. These figures are the reciprocals of the pulse duration, indicating that there are inverse relationships between time and frequency. Generally, longer time periods relate to smaller frequency spans.
The formula for the frequency response of a unit pulse may be calculated directly from the Fourier transform equation as
where is the duration of the pulse. You can observe the changes in magnitude caused by the different values of , as well as the changes in the spacing of the zero crossings, a function of the sin component.
Sinusoids and cosinusoids are signals that by definition contain only one frequency of signal. The tool has two examples of these with frequencies 333Hz and 500Hz. The time domain and frequency transform of a 500Hz cosine wave is given by the following equations
Delaying a 500Hz cosine wave by 0.5ms results in a sine wave signal, and its transform can be seen to be
As this change is made, by adding the delay, you will observe that the phase of the frequency transform changes, but the magnitude remains the same. Alternatively, using the real and quadrature representation, components that were purely real before becoming imaginary after the delay.
Any of the signals can be advanced or delayed by a number of predefined delays of up to 4ms. Alternatively, you can delay a signal by an arbitrary amount by clicking and dragging the graph whilst holding down a key on the keyboard. In the frequency domain this relates to alteration of the phase of the signal, thus no difference will be observed when viewing the Fourier transform magnitude plot, but will be evident when viewing the phase of the transform or the real and imaginary parts together.
Try this out for various types of signal.
Take particular note of the scaled unit impulse as without any delay it results in a purely real transform of height 0.004 (the scaling factor). When this signal is delayed, the transform becomes a cosinusoid in the real component and a sinusoid in the imaginary. The formula for this is
Signal duration is related to the width of the frequency transform Sinusoidal signals contain single frequency components A time delay is equivalent to a linear phase change in frequency Multiplication in time is equivalent to convolution in frequency Convolution in time is equivalent to multiplication in frequency
Fourier Series to Transform
Using this tool you can select a variety of periodic signals. The signal is shown in the lower graph, and its Fourier series shown in the upper graph as a magnitude and phase representation.
The Fourier series is given by
where is the period of the signal.
The animation buttons take the basic signal shape, and increase the period of the signal by spacing out the repetitions of the basic shape in time. For each click of the single step button, the period of the waveform is doubled. You can then observe that in the frequency representation, increasing the period introduces more spectral lines. Each doubling of the period introduces a spectral line between two currently existing lines. Repeatedly increasing the period results in a very dense frequency domain representation.
Note also that the scale of the frequency domain representation decreases as the period is increased. This is due to a reduction in power as the period is increased. (The basic signal shape has a fixed energy associated with it. As the period is increased, the energy in one period remains the same, but as the length has increased, the power decreases).
Taking this to its extreme, if the period is increased to infinity, making the signal aperiodic, then the spacing of the specral lines becomes infinitely small, and a continuous frequency response results. The magnitude of the response will be zero, but from this derivation, the Fourier transform can be obtained by removing the normalization factor at the front of the Fourier series equation, and
Discrete Fourier Transform
Starting with the 500Hz sine wave, you should observe that in the frequency domain there are two pulses, one at 500Hz, and one at the aliased frequency of 7500Hz. With the Fourier transform, a sine wave produced two impulses, i.e.
s(t) = (1)
S(f) = (2)
Since the signal is sampled in the time domain, it includes periodic repetitions of (14) spaced by the sampling rate of 8kHz. Thus, pulses are seen at 500Hz and at 8000Hz-500Hz=7500Hz from the first of these periodic repetitions.
The reason that the DFT has only discrete pulses in the frequency domain, and not impulses of infinite height, is that it is assumed that the signal being transformed is periodic with a period equal to the length of the DFT ( where is the sampling interval, and N is the number of samples). For this case and N = 64 when the DFt tool is first started, thus a period of 8ms is
assumed.
Now try changing the input signal to a unit pulse of length 4ms. You can now clearly see that the frequency domain consists of a number of discrete components. If you use your mouse to click on the frequency graph to magnify a section and move it along the scale you should see that most of the components are spaced by 250Hz, except for the very first two with a spacing of 125Hz. In reality, all of the frequency components are spaced by 125Hz, it is just that every second component has a value of 0, hence the apparent 250Hz spacing.
This spacing, is defined by the reciprocal of the period just calculated above, i.e.
You may wish to compare these transform with the 8ms segments of a 500Hz cosine wave and the pulse of 4ms duration in the Fourier transform tool to see how the waveform has been sampled in the DFT. If you examine the Fourier transform at multiples of 125Hz, you will find a correspondance between what is seen in the DFT frequency domain and the Fourier transform frequency domain. For the example of the 500Hz sinusoid/cosinusoid you can observe that all of the discrete frequencies that are multiples of 125Hz are zero, save for those at 500Hz and -500Hz. For the case of the unit pulse the non-zero values occur at 0Hz, and odd multiples of 125Hz only. Thus the DFT may be considered to be a sampled version of a Fourier transform that has been made periodic with a period of 8kHz in this example.
The spacing of the samples in the frequency domain has been shown to be related to the sampling rate and number of samples in equation (3). If we wished to reduce the frequency spacing, then there are
two options for doing so. The first is to increase the sample spacing by decreasing the sampling rate f (^) s. However this would move the periodic repetitions in frequency closer together. Alternatively the
number of samples, N , can be increased to reduce the frequency domain sample spacing. However, if
To explain what is happening, switch the source signal to an 8ms duration unit pulse, making sure that zero padding is switched on. Switch between no windowing and the Hamming window and you will see how the frequency domain changes. Remembering that multiplication in time is equivalent to convolution in frequency, it should become apparent that the frequency transform of the window shape is being convolved with the impulses of the two sine wave signals. The first of these is the 333Hz signal, and the second can be seen to be at 1kHz once a Hamming window is applied.
In reality, any sampled signal that is transformed is implicitly being windowed by a rectangular window since only a limited number of samples are used. This is why leakage is such a problem. However by application of other window shapes, the frequency domain representation of the sampled signal can be modified to highlight certain features. Try other window shapes on the 8ms unit pulse and the mixture of sine waves to see what each window does to the frequency domain transform.
After using the DFT tool you should understand the following points:
The DFT is sampled in both time and frequency domains The DFT is therefore periodic in both time and frequency domains Zero padding in the time domain can be used to reduce sample spacing in the frequency domain Application of the DFT to real world signals results in leakage in the frequency domain as only a limited number of samples is used The effects of leakage in the frequency domain can be altered by multiplying the time domain signal by a window shape