EEE324 Digital Signal Processing
Digital Signal Processing (EEE324)
Lab 02
Lab Instructor Engr. Muhammad Ayaz
Student Name
Class
NO./Section
University of Engineering & Technology Abbottabad Campus Page 1
EEE324 Digital Signal Processing
Lab 02
Convolution and correlation of discrete time signals
Objective:
1. Convolution of DTS and its types
2. Correlation of DTS and its types
What is Convolution ?
Convolution is a mathematical way of combining two signals to form a third signal. It is the
single most important technique in Digital Signal Processing. Using the strategy of impulse
decomposition, systems are described by a signal called the impulse response.
Four steps in convolution:
1. Folding
2. Shifting
3. Multiplying
4. Adding
What are the applications of Convolution ?
Convolution has applications that include probability, statistics, computer vision, natural
language processing, image and signal processing, engineering, and differential equations.
Convolution is important because it relates the three signals of interest: the input signal, the
output signal, and the impulse response. It is a formal mathematical operation, just as
multiplication, addition, and integration.
What are the types of Convolution ?
Two types linear and circular. Linear convolution is the basic operation to calculate the output
for any linear time invariant system given its input and its impulse response. Circular
convolution is the same thing but considering that the support of the signal is periodic (as in
a circle, hence the name).
Symbol for convolution:
Conv(x,h)
Linear convolution:
Flowchart:
Using MATLAB
Task 01
Find linear convolution of input sequence x=[1 2 3 4 5] and system response h=[5 8 3 5 4 6] ?
Task 02
Find convolution of input sequence x=[1 2 3 4 5] and system response h=[5 8 3 5 4 6] ?
Task 03
Find convolution of input sequence x=[1 2 -1 1] and system response h=[5 8 3 5 4 6] ?
Circular Convolution:
Circular convolution, also known as cyclic convolution, is a special case of periodic convolution,
which is the convolution of two periodic functions that have the same period In particular, the
DTFT of the product of two discrete sequences is the periodic convolution of the DTFTs of the
individual sequences.
Task 04
Find circular convolution of input sequence x=[2 3 4 5 6] and system response
h=[2 3 1 4 5] ?
Task 05
Find circular convolution of input sequence x=[5 4 3 2 8] and system response
h=[10 90 3 2 3] ?
Task 06
Find linear & circular convolution and difference of input sequence x=[1 2 -1 1] and system
response h=[1 1 2 1 2 2 1 1] ?
Correlation
Correlation is a measure of similarity between two signals. The general formula for correlation
is
∫∞−∞x1(t)x2(t−τ)dt
There are two types of correlation:
Auto correlation
Cross correlation
Cross correlation and autocorrelation are very similar, but they involve different types
of correlation. Cross correlation happens when two different sequences
are correlated. Autocorrelation is the correlation between two of the same sequences.
Typical applications of signal autocorrelation are in radar, sonar, satellite, and wireless
communications systems. Devices that measure signal power using signal correlation are known
as signal correlators. There are also many applications of signal cross correlation in signal
processing systems, especially when the signal is corrupted by another undesirable signal (noise)
so that the signal estimation (detection) from a noisy signal has to be performed. Signal cross
correlation can be also considered as a measure of similarity of two signals.
EEE324 Digital Signal Processing
University of Engineering & Technology Abbottabad Campus Page 7
Using MATLAB
Task 07
Find correlation of sending sequence x=[1 2 3 4 5] with reflected signals X1 to X5 below? using
saved sequence in system [5 14 26 40 55 40 26 14 5].
Reflected signals are
X1=[1 2 3 4 4];
X2=[1 2 5 4 5];
X3=[1 2 3 4 5];
X4=[1 2 1 4 5];
X5=[1 2 3 4 5];
Task 08
Find correlation of sending sequence x=[1 2 3 4 5] with reflected signals X1 to X5 below? using
saved sequence in system [5 14 26 40 55 40 26 14 5].
University of Engineering & Technology Abbottabad Campus Page 8
Reflected signals are
X1=[10 -20 3 4 4];
X2=[20 25 5 4 5];
X3=[11 2 37 4 5];
X4=[21 20 1 4 5];
X5=[1 2 30 40 5];
Task 09
Cross-Correlation with Multichannel Input
Generate below three 20-sample exponential sequences given by 0.5n, 0.6n, and 0.8n, with n≥0.
Use stem3 to plot the sequences side by side.
Task 10
Generate below three 30-sample exponential sequences given by 0.3n, 0.1n, and 0.2n, with n≥0.
Use stem3 to plot the sequences side by side
Post Lab Tasks
Task 01
Find linear convolution of input sequence x=[-4 5 -5 -6] and system response h=[5 -9 3 -10 4 6] ?
Task 02
Find convolution of input sequence x=[10 2 3 -20 5] and system response h=[4 5 -5 -6] ?
Task 03
Find convolution of input sequence x=[-10 20 -10 30] and system response h=[5 80 3 5 -40 6] ?
Task 04
Find circular convolution of input sequence x=[10 20 30 40 50] and system response
h=[2 -3 10 4 5] ?
Task 05
Find circular convolution of input sequence x=[-50 4 -30 2 8] and system response
h=[10 -8 30 2 -4] ?
Task 06
Find linear & circular convolution and difference of input sequence x=[1 2 -1 1 50] and system
response h=[10 10 20 10 20 20 60 60] ?
Task 7
Generate below three 30-sample exponential sequences given by 0.3n, 0.1n, and 0.2n, with n≥0.
Use stem3 to plot the sequences side by side
Task 8
Generate below three 60-sample exponential sequences given by 0.4n, 0.6n, and 0.8n, with n≥0.
Use stem3 to plot the sequences side by side
Find convolution and correlation of all sequences with each other and find difference between
them.
Conclusion of Lab 02