Correlation & Convolution
Correlation & Convolution
Correlation & Convolution
Correlation Function
f12 f1( ) f 2 (t )d
to correlate a f1(t )
signal
with another f 2 (t )
signal
first, shift the f 2 (t )
second signal
then multiply f1( ) f 2 (t )
both signals
then integrate
under the curve
f1( ) f 2 (t )d
Autocorrelation
if the signal f1 and f2 are the same
provides information about the time – domain
structure of a noisy signal
often used to discover periodic components in noisy
signals
Cross Correlation
if the signal f1 and f2 are different
used to detect and locate known reference signal
buried in noise of known reference signals
used to identify a signal by comparison with a
library
signal processing
pattern recognition
single particle analysis
electron tomographic averaging
cryptanalysis
neurophysiology
N=1024; % Number of subplot(3,1,2);
samples to generate plot(y);
f=1; % Frequency of the title('y(n), Pure Sinewave +
sinewave Noise');
FS=200; % Sampling grid;
frequency
Rxy=xcorr(x,y); % Estimate
n=0:N-1; % Sampling index the cross correlation
x=sin(2*pi*f1*n/FS); % subplot(3,1,3);
Generate x(n)
plot(Rxy);
y=x+10*randn(1,N); %
Generate y(n) title('Cross correlation Rxy');
subplot(3,1,1); grid;
plot(x);
title('Pure Sinewave');
grid;
-1
0 200 400 600 800 1000 1200
y(n), Pure Sinewave + Noise
50
-50
0 200 400 600 800 1000 1200
Cross correlation Rxy
1000
-1000
0 500 1000 1500 2000 2500
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
used in communications similar to
cross – correlation except that the
second signal is flipped back to
front
f12 (t ) f1( ) f 2 (t )d
v(t ) * w(t ) V ( s ) W ( s )
v(t ) w(t ) V ( f ) *W ( f )
to convolve a f1(t )
signal
with another f 2 ( )
signal
first, flip the
f 2 ( )
second signal
f 2 (t )
then, shift it
then multiply
both signals f1( ) f 2 (t )
then integrate
under the curve
f1( ) f 2 (t )d
applications
probability
statistics
computer vision
image and signal processing (e.g. design
and implementation of finite impulse
response filters)
electrical engineering
differential equations
telescope
microscope
vt wt
v(t ) t 0t T
w(t ) sin( t ) 0 t
vt wt
v(t ) t 0t T
w(t ) 2e t
0t
autocorrelation
w(t ) 2e 2t
0t
autocorrelation
w(t ) sin t 0t
vt wt
v(t ) t 0t T
w(t ) 2 cost 0t