Convolution and Correlation - Tutorialspoint
Convolution and Correlation - Tutorialspoint
Convolution
Convolution is a mathematical operation used to express the relation between input and output of an LTI
system. It relates input, output and impulse response of an LTI system as
y
y((t
t)) =
= x
x((t
t))∗
∗hh(
(tt)
)
Discrete convolution
Continuous Convolution
y
y((t
t)) =
= x
x((t
t))∗
∗hh(
(tt)
)
∞
∞
=
= ∫
∫ x
x((τ
τ))h
h((t
t−−τ
τ))d
dττ
−
−∞∞
(or)
∞
∞
=
= ∫
∫ x
x((t
t−−τ
τ))h
h((τ
τ))d
dττ
−
−∞∞
Discrete Convolution
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 1/12
2/7/2020 Convolution and Correlation - Tutorialspoint
y
y((n
n)) =
= x
x((n
n))∗
∗hh(
(nn)
)
∞
∞
=
= Σ
Σ x
x((k
k))h
h((n
n−−k
k))
k
k==−
−∞∞
(or)
∞
∞
=
= Σ
Σ x
x((n
n−−k
k))h
h((k
k))
k
k==−
−∞∞
Deconvolution
Deconvolution is reverse process to convolution widely used in signal and image processing.
Properties of Convolution
Commutative Property
x
x1 (t) ∗ x 2 (
1 (t) ∗ x2 (tt)
) =
= x
x2 (t) ∗ x 1 (
2 (t) ∗ x1 (tt)
)
Distributive Property
x
x1 (t) ∗ [ x2
1 (t) ∗ [x
(t) + x3
2 (t) + x
(t)] = [ x1
3 (t)] = [x
(t) ∗ x2
1 (t) ∗ x
(t)] + [ x1
2 (t)] + [x
(t) ∗ x3
1 (t) ∗ x
(t)]
3 (t)]
Associative Property
x
x1 (
(tt)
)∗∗ [[x
x2 (
(tt)
)∗∗x
x3 (
(tt)
)]] =
= [[x
x1 (
(tt)
)∗∗x
x2 (
(tt)
)]] ∗
∗xx3 (
(tt)
)
1 2 3 1 2 3
Shifting Property
x
x1 (
(tt)
)∗∗x
x2 (
(tt)
) =
= y
y((t
t))
1 2
x
x1 (t) ∗ x 2 (
1 (t) ∗ x2 (tt−
−tt0 ) = y(t − t 0 )
0 ) = y(t − t0 )
x
x1 (t − t 0 )
1 (t − t0 )∗∗x
x2 (t) = y(t − t 0 )
2 (t) = y(t − t0 )
x
x1 (t − t 0 )
1 (t − t0 )∗∗x
x2 (t − t 1 )
2 (t − t1 ) =
= y
y((t
t−−t
t0 − t1)
0 − t1 )
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 2/12
2/7/2020 Convolution and Correlation - Tutorialspoint
x
x1 (t) ∗ δ(t) = x(t)
1 (t) ∗ δ(t) = x(t)
x
x1 (t) ∗ δ(t − t 0 )
1 (t) ∗ δ(t − t0 ) =
= x
x((t
t−−t
t0 )
0)
u
u((t
t))∗
∗uu(
(tt)
) =
= r
r((t
t))
u
u((t
t−−T
T1 ) ∗ u(t − T 2)
1 ) ∗ u(t − T2 ) =
= r
r((t
t−−T
T1 − T 2)
1 − T2 )
u
u((n
n))∗
∗uu(
(nn)
) =
= [[n
n++1
1]]u
u((n
n))
Scaling Property
If x
x((t
t))∗
∗hh(
(tt)
) =
= y
y((t
t))
then x
x((a
att)
)∗∗h
h((a
att)
) =
=
1
1
y
y((a
att)
)
||a
a||
Differentiation of Output
if y
y((t
t)) =
= x
x((t
t))∗
∗hh(
(tt)
)
d
dyy(
(tt)
) d
dxx(
(tt)
)
then =
= ∗
∗hh(
(tt)
)
d
dtt d
dtt
or
d
dyy(
(tt)
) d
dhh(
(tt)
)
=
= x
x((t
t))∗
∗
d
dtt d
dtt
Note:
Convolution of two causal sequences is causal.
If two signals are convoluted then the resulting convoluted signal has following range:
Sum of lower limits < t < sum of upper limits
Here, we have two rectangles of unequal length to convolute, which results a trapezium.
−
−11+
+−−2
2 <
< t
t <
< 2
2++2
2
−
−33 <
< t
t <
< 4
4
∞
∞
∫
∫ y
y((t
t))d
dtt =
= ∫
∫ ∫
∫ x
x((τ
τ))h
h((t
t−−τ
τ))d
dττd
dtt
−
−∞∞
∞
∞
=
= ∫
∫ x
x((τ
τ))d
dττ∫
∫ h
h((t
t−−τ
τ))d
dtt
−
−∞∞
We know that area of any signal is the integration of that signal itself.
∴
∴ A
Ay = Ax A
y = Ax Ahh
DC Component
area
area of
of the
the signal
signal
DC
DC component
component =
=
period
period of
of the
the signal
signal
Ex: what is the dc component of the resultant convoluted signal given below?
= 3 × 4 = 12
Duration of the convoluted signal = sum of lower limits < t < sum of upper limits
= -3 < t < 4
Period=7
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 5/12
2/7/2020 Convolution and Correlation - Tutorialspoint
area
area of
of the
the signal
signal
∴
∴ Dc component of the convoluted signal = period
period of
of the
the signal
signal
Dc component = 12
12
7
7
Discrete Convolution
Note: if any two sequences have m, n number of samples respectively, then the resulting convoluted
sequence will have [m+n-1] samples.
= [-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.
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.
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 6/12
2/7/2020 Convolution and Correlation - Tutorialspoint
If two sequences of length m, n respectively are convoluted using circular convolution then resulting
sequence having max [m,n] samples.
Ex: convolute two sequences x[n] = {1,2,3} & h[n] = {-1,2,2} using circular convolution
= [-1, 0, 3, 10, 6]
Here x[n] contains 3 samples and 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
y[[n
n]] =
= [[9
9 6
6 3
3]]
Correlation
Correlation is a measure of similarity between two signals. The general formula for correlation is
∞
∞
∫
∫ x
x1 (t)x 2 (
1 (t)x2 (tt−
−ττ)
)ddt
t
−
−∞∞
Auto correlation
Cros correlation
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 7/12
2/7/2020 Convolution and Correlation - Tutorialspoint
It is defined as correlation of a signal with itself. Auto correlation function is a measure of similarity
between a signal & its time delayed version. It is represented with R( τ
τ ).
Consider a signals x(t). The auto correlation function of x(t) with its time delayed version is given by
∞
∞
R
R11 (τ ) = R(τ ) = ∫
11 (τ ) = R(τ ) = ∫
x
x((t
t))x
x((t
t−−τ
τ))d
dtt [+ve
[+ve shift]
shift]
−
−∞∞
∞
∞
=
= ∫
∫ x
x((t
t))x
x((t
t++τ
τ))d
dtt [-ve
[-ve shift]
shift]
−
−∞∞
Where τ
τ = searching or scanning or delay parameter.
∞
∞
R
R11 (τ ) = R(τ ) = ∫
11 (τ ) = R(τ ) = ∫
x
x((t
t))x
x∗∗(
(tt−
−ττ)
)ddt
t [+ve
[+ve shift]
shift]
−
−∞∞
∞
∞
=
= ∫
∫ x
x((t
t++τ
τ))x
x∗∗(
(tt)
)ddt
t [-ve
[-ve shift]
shift]
−
−∞∞
∞
∞ 2
R (0) = E = ∫
∫
−
|| x
x((t
t)
2
) || d
dtt
−∞∞
Auto correlation function and energy spectral densities are Fourier transform pairs. i.e.
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 8/12
2/7/2020 Convolution and Correlation - Tutorialspoint
F
F .. T
T [[R
R((τ
τ))]] =
= Ψ
Ψ((ω
ω))
∞
∞ −
−jjω
ωττ
Ψ
Ψ((ω
ω)) =
= ∫
∫ R
R((τ
τ))e
e d
dττ
−
−∞∞
R
R((τ
τ)) =
= x
x((τ
τ))∗
∗xx(
(−−τ
τ))
The auto correlation function of periodic power signal with period T is given by
T
T
1
1 2
2
R
R((τ
τ)) =
= lim
lim ∫
∫ x
x((t
t))x
x∗∗(
(tt−
−ττ)
)ddt
t
T
T→→∞
∞ T
T −
−TT
2
2
Properties
signal. i.e.
R
R((0
0)) =
= ρ
ρ
||R
R((τ
τ))|| ≤
≤ R
R((0
0))∀
∀ττ
Auto correlation function and power spectral densities are Fourier transform pairs. i.e.,
F
F .. T
T [[R
R((τ
τ))]] =
= s
s((ω
ω))
∞
∞ −
−jjω
ωττ
s
s((ω
ω)) =
= ∫
∫ R
R((τ
τ))e
e d
dττ
−
−∞∞
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 9/12
2/7/2020 Convolution and Correlation - Tutorialspoint
R
R((τ
τ)) =
= x
x((τ
τ))∗
∗xx(
(−−τ
τ))
Density Spectrum
Let us see density spectrums:
∞
∞
2
2
E
E =
= ∫
∫ || x
x((f
f)) || d
dff
−
−∞∞
∞ 2
2
∞
P
P =
= Σ
Σn || C
Cn |
n|
n=
=−−∞
∞
Consider two signals x1(t) and x2(t). The cross correlation of these two signals R
R12 (τ )
12 (τ )
is given by
∞
∞
R
R12 (τ ) = ∫
12 (τ ) = ∫
x
x1 (t)x 2 (
1 (t)x2 (tt−
−ττ)
)ddt
t [+ve
[+ve shift]
shift]
−
−∞∞
∞
∞
=
= ∫
∫ x
x1 (
(tt+
+ττ)
)xx2 (
(tt)
)ddt
t [-ve
[-ve shift]
shift]
1 2
−
−∞∞
∞
∞
∗∗
R
R12 (
(ττ)
) =
= ∫
∫ x
x1 (
(tt)
)xx ((t
t−−τ
τ))d
dtt [+ve
[+ve shift]
shift]
12 1 2
2
−
−∞∞
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 10/12
2/7/2020 Convolution and Correlation - Tutorialspoint
∞
∞
∗
∗
=
= ∫
∫ x
x1 (t + τ )x (t) dt
1 (t + τ )x (t) dt
[-ve
[-ve shift]
shift]
2
2
−
−∞∞
∞
∞
∗
∗
R
R21 (τ ) = ∫
21 (τ ) = ∫
x
x2 (t)x (t − τ ) dt
2 (t)x (t − τ ) dt
[+ve
[+ve shift]
shift]
1
1
−
−∞∞
∞
∞
∗
∗
=
= ∫
∫ x
x2 (t + τ )x (t) dt
2 (t + τ )x (t) dt
[-ve
[-ve shift]
shift]
1
1
−
−∞∞
R
R12 (τ ) ≠ R 21(
12 (τ ) ≠ R21 (−
−ττ)
)
∞
∞
If R12(0) = 0 means, if ∫
∫
−
x
x11
(
(tt)
)x
∗∗
x ((t
t))d
dtt =
= 0
0 , then the two signals are said to be
−∞∞ 2
2
orthogonal.
T
T
Cross correlation function corresponds to the multiplication of spectrums of one signal to the
complex conjugate of spectrum of another signal. i.e.
∗ ∗
R
R12 (
(ττ)
) ←
←→→ X
X1 (
(ωω)
)XX ((ω
ω))
12 1 2
2
Parseval's Theorem
Parseval's theorem for energy signals states that the total energy in a signal can be obtained by the
spectrum of the signal as
1 ∞
∞ 2
2
1
E
E =
= ∫
∫ ||X
X((ω
ω))|| d
dωω
2
2ππ −
−∞∞
Note: If a signal has energy E then time scaled version of that signal x(at) has energy E/a.
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 11/12
2/7/2020 Convolution and Correlation - Tutorialspoint
https://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.htm 12/12