Professional Documents
Culture Documents
Experiment No: 5 Name of The Experiment: Perform Convolution and Cross-Correlation Between Two Signals Objectives
Experiment No: 5 Name of The Experiment: Perform Convolution and Cross-Correlation Between Two Signals Objectives
Name of the Experiment: Perform convolution and cross-correlation between two signals
Objectives:
Theory:
If the input and impulse response of a system are x[n] and h[n] respectively, the convolution
is given by the expression,
The above equation can be extended to waveforms of infinite duration by written them as-
If, x(n) is an M- point sequence, h(n) is an N – point sequence, then, y(n) is a (M+N-1) – point
sequence.
In this equation, x(k), h(n-k) and y(n) represent the input to and output from the system at
time n. Here we could see that one of the inputs is shifted in time by a value every time it is
multiplied with the other input signal. Linear Convolution is quite often used as a method of
implementing filters of various types.
In mathematics and, in particular, functional analysis, convolution is a mathematical
operation on two functions f and g, producing a third function that is typically viewed as a
modified version of one of the original functions, giving the area overlap between the two
functions as a function of the amount that one of the original functions is translated.
Convolution is similar to cross-correlation. It has applications that include probability,
statistics, computer vision, natural language processing, image and signal processing,
engineering, and differential equations.
See, an example
This calculation can be obtained by fast convolution. Using discrete Fourier transform, the
fast Convolution theorem is given by
Correlation: The cross-correlation coefficient with lag j for two dataset x1(n) and x2(n) is
given by
r12 ( j )
12 ( j ) ,
sx s y
N 1 N 1
x ( n) x ( n j )
1 2 (x i x) 2
Where the correlation is given by r12 ( j ) n 0
and S x2 i 0
, and
N N
N 1
(y i y) 2
S y2 i 0
N
However, the correlation computation may be speeded up by exploiting the correlation
theorem, which is written as
1
r12 ( j ) FD1[ X 1* (k ) X 2 (k )] , where,
N
x1 (n) X 1 (k )
DFT
x2 (n) X 2 (k )
DFT
Implement: