Correlation & Convolution

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

( CONTINUOUS – TIME SIGNAL)

an operation used to measure the


similarity between two signals or
functions and the time relation of
the similarity

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;

Source: Digital Signal Processing Case Study Copyright-S.R.Taghizadeh


Pure Sinewave
1

-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


•the convolution formula can be described as


a weighted sum of the function ƒ1() at the
moment t where the weighting is given by
f2(−) simply shifted by amount t
• as t changes, the weighting function
emphasizes different parts of the input
function
x(t )  h(t )  h(t )  x(t )
x(t )  [h(t )  z (t )]  [ x(t )  h(t )]  z (t )
x(t )  [h(t )  z (t )]  x(t )  h(t )  x(t )  z (t )
x(t )  [ch(t )]  c[ x(t ) * h(t )]
d  dh(t ) 
[ x(t ) * h(t )]  x(t ) *  
dt  dt 
v(t ) * w(t )  V ( f ) W ( f )

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
vt  wt 
v(t )  t 0t T
w(t )  sin( t ) 0  t  

vt  wt 
v(t )  t 0t T
w(t )  2e t
0t 
autocorrelation
w(t )  2e 2t
0t 
autocorrelation
w(t )  sin t  0t 

vt  wt 
v(t )  t 0t T
w(t )  2 cost  0t 

You might also like