2. 4.2
What is Convolution?
Convolution: Convolution is a mathematical way of combining two signals to form a
third signal.
◆ It is equivalent to finite impulse response (FIR) filtering.
◆ It is important in digital signal processing because convolving two sequences in
time domain is equivalent to multiplying the sequences in frequency domain.
◆ It relates input, output and impulse response of an LTI system as
y(t) = x(t) ∗ h(t)
Where, y(t) = output of LTI, x(t) = input of LTI, h(t) = impulse response of LTI
And * denotes the Convolution Operation.
4. 4.4
Discrete Convolution
• For a linear time invariant system, if the input sequence
x(n) and the impulse response h(n) are given, the output
sequence y(n) can be found.
• This is known as convolution sum and is represented as
• y(n) = x(n) * h(n) = h(n) *x(n)
T
Input Output
x(n) y(n)=x(n)*h(n)
5. 4.5
Example of Discrete Linear Convolution
To calculate Discrete Linear Convolution
Convolute two sequences x[n] = {a,b,c} & h[n] = [e,f,g]
Convoluted output = [ ea, eb+fa, ec+fb+ga, fc+gb, gc]
If any two sequences have m, n number of samples
respectively, then the resulting convoluted sequence will have
[m+n-1] samples.
6. 4.6
Example of Discrete Linear Convolution
Convolute two sequences x[n] = {1,2,3} & h[n] = {-1,2,2}
Convoluted output
y[n] = [ -1, -2+2, -3+4+2, 6+4, 6]
= [-1, 0, 3, 10, 6]
Here x[n] contains 3 samples and h[n] is also having 3
samples so the resulting sequence having 3+3-1 = 5
samples.
7. 4.7
Periodic Convolution
Periodic convolution is valid for discrete Fourier transform.
To calculate periodic convolution all the samples must be
real. Periodic or circular convolution is also called as fast
convolution.
If two sequences of length m, n respectively are convoluted
using circular convolution then resulting sequence having
max [m,n] samples.
8. 4.8
Example of Periodic Convolution
Convolute two sequences x[n] = {1,2,3} & h[n] = {-1,2,2} using circular convolution
Normal Convolution output y[n] = [ -1, -2+2, -3+4+2, 6+4, 6]
= [-1, 0, 3, 10, 6]
Here x[n] contains 3 samples & h[n] also has 3 samples.
Hence the resulting sequence obtained by circular
convolution must have max[3,3]= 3 samples.
Now to get periodic convolution result, 1st 3 samples [as the period is 3] of normal convolution is same
next two samples are added to 1st samples as shown below:
Circular convolution result y[n] = [9 6 3]
9. 4.9
Correlation
• It is a measure of similarity between signals and is found using a
process similar to convolution.
• Correlation is used to compare two signals.
• It is used in radar and sonar systems to find the location of a
target by comparing the transmitted and reflected signals.
• Other applications of correlation are in image processing, control
engineering etc.
• The correlation is of two types:
(i) Cross correlation (ii) Auto-correlation
10. 4.10
Cross Correlation
• Cross correlation: The cross correlation between a pair of
sequences x(n) and y(n) is given by
𝑅𝑥𝑦(n)= 𝑘=−∞
∞
𝑥 𝑘 𝑦[−(𝑛-k)]
= x(n) * y(-n)
• Observing the above equation for Rxy(n), we can conclude
that the correlation of two sequences is essentially the
convolution of two sequences in which one of the
sequence has been reversed.
11. 4.11
Example of Cross Correlation
Find the cross correlation of two finite length sequences:
x(n) = {2, 3, 1, 4} and y(n) = {1, 3, 2, 1}
Here,
y(–n) = {1, 2, 3, 1}
Rxy(n) = x(n) * y(–n)
The cross correlation is computed as given below:
R(n) = {2, 3 + 4, 1 + 6 + 6, 4 + 2 + 9 + 2, 8 + 3 + 3, 12 + 1, 4}
= {2, 7, 13, 17, 14, 13, 4}
12. 4.12
Auto Correlation
• The autocorrelation of a sequence is correlation of a
sequence with itself.
• It gives a measure of similarity between a sequence
and its shifted version.
• The autocorrelation of a sequence x(n) is defined as:
𝑅𝑥𝑥(n) = 𝑘=−∞
∞
𝑥 𝑘 𝑥(𝑘 − 𝑛)
𝑅𝑥𝑥 𝑛 = 𝑥 𝑘 ∗ 𝑥(−𝑘)
13. 4.13
Example of Auto Correlation
Find the autocorrelation of the finite length sequence x(n) = {2, 3, 1, 4}.
Here,
x(n) = {2, 3, 1, 4}
x(–n) = {4, 1, 3, 2}
R(n) = x(n) * x(–n)
The auto correlation is computed as given below:
R(n) = {8, 12 + 2, 4 + 3 + 6, 16 + 1 + 9 + 4, 4 + 3 + 6, 12 + 2, 8}
= {8, 14, 13, 30, 13, 14, 8}