Anda di halaman 1dari 11

MIT OpenCourseWare

http://ocw.mit.edu

2.161 Signal Processing: Continuous and Discrete


Fall 2008

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Massachusetts Institute of Technology

Department of Mechanical Engineering

2.161 Signal Processing - Continuous and Discrete


Fall Term 2008

Lecture 221
Reading:

Proakis and Manolakis: Secs. 12,1 12.2

Oppenheim, Schafer, and Buck:

Stearns and Hush: Ch. 13

1 The Correlation Functions (continued)


In Lecture 21 we introduced the auto-correlation and cross-correlation functions as measures
of self- and cross-similarity as a function of delay . We continue the discussion here.

1.1

The Autocorrelation Function

There are three basic denitions


(a) For an innite duration waveform:
1
f f ( ) = lim
T T

T /2

f (t)f (t + ) dt
T /2

which may be considered as a power based denition.


(b) For an nite duration waveform: If the waveform exists only in the interval t1
t t2
t2
f f ( ) =
f (t)f (t + ) dt
t1

which may be considered as a energy based denition.


(c) For a periodic waveform:

If f (t) is periodic with period T

1 t0 +T
f f ( ) =
f (t)f (t + ) dt
T t0

for an arbitrary t0 , which again may be considered as a power based denition.

c D.Rowell 2008
copyright

221

Example 1
Find the autocorrelation function of the square pulse of amplitude a and duration
T as shown below.
f(t)
a

t
T

The wave form has a nite duration, and the autocorrelation function is
T
f f ( ) =
f (t)f (t + ) dt
0

The autocorrelation function is developed graphically below


f(t)
a

t
T

f(t+ t )
a

-t
0

r
a

T -t

ff

(t )

r
0

-T

(t ) = a

f f ( ) =

ff

(T -t )

a2 dt

= a2 (T | |)
= 0
222

T T
otherwise.

Example 2
Find the autocorrelation function of the sinusoid f (t) = sin(t + ).
Since f (t) is periodic, the autocorrelation function is dened by the average over
one period

1 t0 +T
f f ( ) =
f (t)f (t + ) dt.
T t0
and with t0 = 0

2/
f f ( ) =
sin(t + ) sin((t + ) + ) dt
2 0
1
=
cos(t)
2
and we see that f f ( ) is periodic with period 2/ and is independent of the
phase .

1.1.1

Properties of the Auto-correlation Function

(1) The autocorrelation functions f f ( ) and f f ( ) are even functions, that is


f f ( ) = f f ( ),

and f f ( ) = f f ( ).

(2) A maximum value of f f ( ) (or f f ( ) occurs at delay = 0,


|f f ( )| f f (0),
and we note that

and

|f f ( )| f f (0)

f f (0) =

f 2 (d) dt

is the energy of the waveform. Similarly

1
f f (0) = lim
T T

f 2 (t) dt

is the mean power of f (t).

(3) f f ( ) contains no phase information, and is independent of the time origin.


(4) If f (t) is periodic with period T , f f ( ) is also periodic with period T .
(5) If (1) f (t) has zero mean ( = 0), and (2) f (t) is non-periodic,
lim f f ( ) = 0.

223

1.1.2

The Fourier Transform of the Auto-Correlation Function

Consider the transient case

f f ( ) ej d


=
f (t)f (t + ) dt ej d

j t
=
f (t) e dt.
f () ej d

Rf f (j ) =

= F (j )F (j )
= |F (j )|2
or

f f ( ) Rf f (j ) = |F (j )|2
where Rf f () is known as the energy density spectrum of the transient waveform f (t).
Similarly, the Fourier transform of the power-based autocorrelation function, f f ( )

f f (j ) = F {f f ( )} =
f f ( ) ej d


T /2
1
=
lim
f (t)f (t + ) dt ej d
T

T /2
is known as the power density spectrum of an innite duration waveform.

From the properties of the Fourier transform, because the auto-correlation function
is a real, even function of , the energy/power density spectrum is a real, even
function of , and contains no phase information.
1.1.3

Parsevals Theorem

From the inverse Fourier transform




1
2
f f (0) =
f (t) dt =
Rf f (j ) d
2

or


1
f (t) dt =
|F (j )|2 d,
2

which equates the total waveform energy in the time and frequency domains, and which is
known as Parsevals theorem. Similarly, for innite duration waveforms
T /2

1
2
lim
f (t) dt =
(j ) d
T T /2
2

equates the signal power in the two domains.


224

1.1.4 Note on the relative widths of the Autocorrelation and Power/Energy


Spectra
As in the case of Fourier analysis of waveforms, there is a general reciprocal relationship
between the width of a signals spectrum and the width of its autocorrelation function.
A narrow autocorrelation function generally implies a broad spectrum
f

ff

(t )
F

ff ( jW

b r o a d a u to c o r r e la tio n

n a rro w s p e c tru m

t
W

and a broad autocorrelation function generally implies a narrow-band waveform.


f

ff

(t )
F

ff ( jW

b ro a d s p e c tru m

n a r r o w a u to c o r r e la tio n

t
W

In the limit, if f f ( ) = ( ), then f f (j ) = 1, and the spectrum is dened to be white.


f

ff

(t )
F

im p u ls e a u to c o r r e la tio n
1

1.2

ff ( jW

" w h ite " s p e c tr u m

The Cross-correlation Function

The cross-correlation function is a measure of self-similarity between two waveforms f (t)


and g(t). As in the case of the auto-correlation functions we need two denitions:

1 T /2
f g ( ) = lim
f (t)g(t + ) d
T T T /2
in the case of innite duration waveforms, and

f g ( ) =
f (t)g(t + ) d

for nite duration waveforms.


225

Example 3
Find the cross-correlation function between the following two functions
f(t)
T

0
T

g (t)
T

t
1

0
T

t
2

In this case g(t) is a delayed version of f (t). The cross-correlation is

r
a

fg

(t )

0
T

- T
1

where the peak occurs at = T2 T1 (the delay between the two signals).

1.2.1

Properties of the Cross-Correlation Function

(1) f g ( ) = gf ( ), and the cross-correlation function is not necessarily an even function.


(2) If f g ( ) = 0 for all , then f (t) and g(t) are said to be uncorrelated.
(3) If g(t) = af (t T ), where a is a constant, that is g(t) is a scaled and delayed version of
f (t), then f f ( ) will have its maximum value at = T .
Cross-correlation is often used in optimal estimation of delay, such as in echolocation (radar,
sonar), and in GPS receivers.

226

Example 4
In an echolocation system, a transmitted waveform s(t) is reected o an object
at a distance R and is received a time T = 2R/c sec. later. The received signal
r(t) = s(tT )+n(t) is attenuated by a factor and is contaminated by additive
noise n(t).
R

tr a n s m itte d
w a v e fo rm

s (t)

r e c e iv e d
w a v e fo rm

r(t)
+

r e fle c tin g o b je c t
v e lo c ity o f p r o p a g a tio n : c

a s (t-T )

d e la y

n (t)

T = 2cR

sr ( ) =

s(t)r(t + ) dt

s(t)(n(t + ) + s(t T + )) dt

= sn ( ) + ss ( T )
and if the transmitted waveform s(t) and the noise n(t) are uncorrelated, that is
sn ( ) 0, then
sr ( ) = ss ( T )
that is, a scaled and shifted version of the auto-correlation function of the trans
mitted waveform which will have its peak value at = T , which may be used
to form an estimator of the range R.

1.2.2

The Cross-Power/Energy Spectrum

We dene the cross-power/energy density spectra as the Fourier transforms of the crosscorrelation functions:

Rf g (j ) =
f g ( ) ej d

f g (j ) =
f g ( ) ej d.

Then

f g ( ) ej d


=
f (t)g(t + ) ej dt d

j t
=
f (t) e dt
g() ej d

Rf g (j ) =

227

or

Rf g (j ) = F (j )G(j )
Note that although Rf f (j ) is real and even (because f f ( ) is real and even, this is
not the case with the cross-power/energy spectra, f g (j ) and Rf g (j ), and they are
in general complex.

2 Linear System Input/Output Relationships with Random In


puts:
Consider a linear system H(j ) with a random input f (t). The output will also be random
f(t)

y (t)

H ( jW )

f ff ( t)

y y

(t)

Then
Y (j ) = F (j )H(j ),
Y (j )Y (j ) = F (j )H(j )F (j )H(j )
or

yy (j ) = f f (j ) |H(j )|2 .

Also
F (j )Y (j ) = F (j )F (j )H(j ),
or
f y (j ) = f f (j )H(j ).
Taking the inverse Fourier transforms

yy ( ) = f f ( ) F 1 |H(j )|2
f y ( ) = f f ( ) h( ).

3 Discrete-Time Correlation
Dene the correlation functions in terms of summations, for example for an innite length
sequence
f g (n) = E {fm gm+n }
=

1
fm gm+n ,
N 2N + 1
m=N

lim

and for a nite length sequence


f g (n) =

m=N

228

fm gm+n .

The following properties are analogous to the properties of the continuous correlation func
tions:
(1) The auto-correlation functions ( f f (n) and f f (n) are real, even functions.
(2) The cross-correlation functions are not necessarily even functions, and
f g (n) = gf (n)
(2) f f (n) has its maximum value at n = 0,
|f f (n)| f f (0)

for all n.

(3) If {fk } has no periodic component


lim f f (n) = 2f .

(4) f f (0) is the average power in an innite sequence, and f f (n) is the total energy in a
nite sequence.
The discrete power/energy spectra are dened through the z-transform
f f (z) = Z {f f (n)} =

f f (n)z n

n=

and
f f (n) = Z 1 {f f (z)}

1
=
f f (z)z n1 dz
2j
/T
T
=
f f ( ej T ) ej nT d.
2 /T
Note on the MATLAB function xcorr(): In MATLAB the function call phi =
xcorr(f,g) computes the cross-correlation function, but reverses the denition of
the subscript order from that presented here, that is it computes
f g (n) =

N
N
1
1
fn+m gm =
fn gnm
M N
M N

where M is a normalization constant specied by an optional argument. Care must


therefore be taken in interpreting results computed through xcorr().

229

3.1

Summary of z-Domain Correlation Relationships

(The following table is based on Table 13.2 from Stearns and Hush)
Property

Formula

Power spectrum of {fn }

f f (z) =

Cross-power Spectrum
Autocorrelation
Cross-correlation
Waveform power
Linear system properties

n=

f f (n)z n

f g (n)z n = gf (z 1 )
n=
1
f f (n) =
f f (z)z n1 dz
2j
1
f g (n) =
f g (z)z n1 dz
2 j

2
1
E fn = f f (0) =
f g (z)z 1 dz
2j
Y (z) = H(z)F (z)
yy (z) = H(z)H(z 1 )f f (z)
f y (z) = H(z)f f (z)

f g (z) =

2210