8
1 Correlation, Energy Spectral Density and Power Spectral Density Chapter 8 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 2 Introduction Relationships between signals can be just as important as characteristics of individual signals The relationships between excitation and/or response signals in a system can indicate the nature of the system 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 3 Flow Velocity Measurement The relative timing of the two signals, p(t) and T(t), and the distance, d, between the heater and thermometer together determine the flow velocity. Heater Thermometer 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 4 Correlograms Two Highly Negatively Correlated DT Signals Correlogram Signals 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 5 Correlograms Two Uncorrelated CT Signals Correlogram Signals 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 6 Correlograms Two Partially Correlated DT Signals Correlogram Signals

Correlation to Psd

  • Upload
    mh1999

  • View
    20

  • Download
    0

Embed Size (px)

DESCRIPTION

Correlation to PSD

Citation preview

Page 1: Correlation to Psd

1

Correlation, Energy SpectralDensity and Power

Spectral DensityChapter 8

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 2

Introduction

• Relationships between signals can be just asimportant as characteristics of individualsignals

• The relationships between excitation and/orresponse signals in a system can indicate thenature of the system

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 3

Flow Velocity Measurement

The relative timing of the two signals, p(t) and T(t),and the distance, d, between the heater and thermometer together determine the flow velocity.

Heater

Thermometer

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 4

Correlograms

Two HighlyNegativelyCorrelatedDT Signals

Correlogram

Signals

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 5

Correlograms

TwoUncorrelatedCT Signals

Correlogram

Signals

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 6

Correlograms

Two PartiallyCorrelatedDT Signals

Correlogram

Signals

Page 2: Correlation to Psd

2

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 7

Correlograms

These two CTsignals are not

stronglycorrelated but

would be if onewere shifted intime the right

amount

Correlogram

Signals

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 8

CorrelogramsDT Sinusoids With

a Time DelayCT Sinusoids With

a Time Delay

Correlogram Correlogram

Signals Signals

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 9

Correlograms

Two Non-Linearly Related

DT Signals

CorrelogramSignals

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 10

The Correlation FunctionPositively

Correlated DTSinusoids with Zero

Mean

Uncorrelated DTSinusoids with

Zero Mean

NegativelyCorrelated DT

Sinusoids with ZeroMean

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 11

The Correlation FunctionPositively

Correlated RandomCT Signals with

Zero Mean

Uncorrelated RandomCT Signals with

Zero Mean

NegativelyCorrelated Random

CT Signalswith Zero Mean

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 12

The Correlation FunctionPositively

Correlated CTSinusoids with Non-

zero Mean

Uncorrelated CTSinusoids withNon-zero Mean

NegativelyCorrelated CT

Sinusoids with Non-zero Mean

Page 3: Correlation to Psd

3

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 13

The Correlation FunctionPositively

Correlated RandomDT Signals withNon-zero Mean

Uncorrelated RandomDT Signals withNon-zero Mean

NegativelyCorrelated Random

DT Signalswith Non-zero Mean

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 14

Correlation of Energy SignalsThe correlation between two energy signals, x and y, isthe area under (for CT signals) or the sum of (for DTsignals) the product of x and y.

The correlation function between two energy signals, xand y, is the area under (CT) or the sum of (DT) theirproduct as a function of how much y is shifted relative tox.

x t( )y* t( )dt!"

"

#

x n[ ]y* n[ ]n=!"

"

#or

Rxy !( ) = x t( )y* t +!( )dt"#

#

$

Rxy m[ ] = x n[ ]y* n + m[ ]n=!"

"

#or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 15

Correlation of Energy SignalsThe correlation function for two energy signals is very similarto the convolution of two energy signals.

Therefore it is possible to use convolution to find the correlation function.

It also follows that

x t( )!y t( ) = x t " #( )y #( )d#"$

$

%

x n[ ]!y n[ ] = x n "m[ ]y m[ ]m="#

#

$or

Rxy !( ) = x "!( )#y !( )

Rxy m[ ] = x !m[ ]"y m[ ]or

Rxy !( ) F

" # $ X*f( )Y f( )

Rxy m[ ]F

! " # X*F( )Y F( )or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 16

Correlation of Power SignalsThe correlation function between two power signals, xand y, is the average value of their product as a functionof how much y is shifted relative to x.

If the two signals are both periodic and their fundamentalperiods have a finite least common period,

where T or N is any integer multiple of that least commonperiod.

or

Rxy !( ) = limT"#

1

Tx t( )y* t +!( )dt

T$

Rxy m[ ] = limN!"

1

Nx n[ ]y* n + m[ ]

n= N

#

Rxy !( ) =1

Tx t( )y t +!( )dt

T"

Rxy m[ ] =1

Nx n[ ]y n + m[ ]

n= N

!or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 17

Correlation of Power Signals

Correlation of periodic signals is very similar to periodicconvolution

where it is understood that the period of the periodicconvolution is any integer multiple of the least commonperiod of the two fundamental periods of x and y.

Rxy !( ) =x "!( ) y !( )

T

Rxy m[ ] =x !m[ ] y m[ ]

Nor

Rxy !( ) =x "!( ) y !( )

T

Rxy !( ) =x "!( ) y !( )

T

Rxy !( ) FS" # $ X

*k[ ]Y k[ ]

Rxy m[ ]FS

! " # X*k[ ]Y k[ ]or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 18

Correlation of Power Signals

Page 4: Correlation to Psd

4

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 19

Correlation of Sinusoids

• The correlation function for two sinusoids ofdifferent frequencies is always zero. (pp.588-589)

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 20

AutocorrelationA very important special case of correlation isautocorrelation. Autocorrelation is the correlation of afunction with a shifted version of itself. For energy signals,

At a shift, τ or m, of zero,

which is the signal energy of the signal. For power signals,

which is the average signal power of the signal.

Rxx!( ) = x t( )x t +!( )dt

"#

#

$

Rxxm[ ] = x n[ ]x n + m[ ]

n=!"

"

#or

Rxx0( ) = x

2t( )dt

!"

"

#

Rxx0[ ] = x

2n[ ]

n=!"

"

#or

Rxx0( ) = lim

T!"

1

Tx2t( )dt

T# or

Rxx0[ ] = lim

N!"

1

Nx2n[ ]

n= N

#

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 21

Properties of AutocorrelationAutocorrelation is an even function.

Autocorrelation magnitude can never be larger than it is atzero shift.

If a signal is time shifted its autocorrelation does not change.

The autocorrelation of a sum of sinusoids of differentfrequencies is the sum of the autocorrelations of theindividual sinusoids.

Rxx!( ) = R

xx"!( )

Rxxm[ ] = R

xx!m[ ]or

Rxx0( ) ! R

xx"( )

Rxx0[ ] ! R

xxm[ ]or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 22

Autocorrelation ExamplesThree differentrandom DTsignals and theirautocorrelations.Notice that, eventhough thesignals aredifferent, theirautocorrelationsare quite similar,all peakingsharply at a shiftof zero.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 23

Autocorrelation ExamplesAutocorrelations for a cosine “burst” and a sine “burst”.Notice that they are almost (but not quite) identical.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 24

Autocorrelation Examples

Page 5: Correlation to Psd

5

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 25

Matched Filters

• A very useful technique for detecting thepresence of a signal of a certain shape in thepresence of noise is the matched filter.

• The matched filter uses correlation to detectthe signal so this filter is sometimes called acorrelation filter

• It is often used to detect 1’s and 0’s in abinary data stream

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 26

Matched FiltersIt has been shownthat the optimalfilter to detect anoisy signal is onewhose impulseresponse isproportional to thetime inverse of thesignal. Here aresome examples ofwaveshapesencoding 1’s and0’s and the impulseresponses ofmatched filters.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 27

Matched FiltersNoiseless Bits Noisy Bits

Even in the presence ofa large additive noisesignal the matched filterindicates with a highresponse level thepresence of a 1 and witha low response level thepresence of a 0. Sincethe 1 and 0 are encodedas the negatives of eachother, one matched filteroptimally detects both.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 28

Autocorrelation Examples

Two familiar DTsignal shapes andtheir autocorrelations.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 29

Autocorrelation Examples

Three random power signals with different frequency contentand their autocorrelations.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 30

Autocorrelation ExamplesAutocorrelation functions for a cosine and a sine. Notice that the autocorrelation functions are identical even thoughthe signals are different.

Page 6: Correlation to Psd

6

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 31

Autocorrelation Examples• One way to simulate a random signal is with

a summation of sinusoids of differentfrequencies and random phases

• Since all the sinusoids have differentfrequencies the autocorrelation of the sum issimply the sum of the autocorrelations

• Also, since a time shift (phase shift) does notaffect the autocorrelation, when the phasesare randomized the signals change, but nottheir autocorrelations

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 32

Autocorrelation Examples

Let a random signal be described by

Since all the sinusoids are at different frequencies,

where is the autocorrelation of .

x t( ) = Ak cos 2!f0kt +"k( )k=1

N

#

Rx!( ) = R

k!( )

k=1

N

"

Rk!( )

Ak cos 2!f0 kt +"k( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 33

Autocorrelation Examples

Four DifferentRandom Signals

with IdenticalAutocorrelations

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 34

Autocorrelation Examples

Four DifferentRandom Signals

with IdenticalAutocorrelations

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 35

Autocorrelation Examples

Four DifferentRandom Signals

with IdenticalAutocorrelations

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 36

Autocorrelation Examples

Four DifferentRandom Signals

with IdenticalAutocorrelations

Page 7: Correlation to Psd

7

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 37

Cross CorrelationCross correlation is really just “correlation” in the cases inwhich the two signals being compared are different. Thename is commonly used to distinguish it from autocorrelation.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 38

Cross Correlation

A comparison of x and y with y shifted for maximumcorrelation.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 39

Cross CorrelationBelow, x and z are highly positively correlated and x and y areuncorrelated. All three signals have the same average signalpower. The signal power of x+z is greater than the signal powerof x+y.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 40

Correlation and the Fourier Series

Calculating Fourier series harmonic functions can be thoughtof as a process of correlation. Let

Then the trigonometric CTFS harmonic functions are

Also, let

then the complex CTFS harmonic function is

c t( ) = cos 2! kf0

( )t( ) and s t( ) = sin 2! kf0

( )t( )

Xck[ ] = 2R

xc0( ) , X

sk[ ] = 2R

xs0( )

z t( ) = e+ j 2! kf

0( )t

X k[ ] = Rxz0( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 41

Energy Spectral DensityThe total signal energy in an energy signal is

The quantity, , or , is called the energy spectraldensity (ESD) of the signal, x and is conventionally given thesymbol, Ψ. That is,

It can be shown that if x is a real-valued signal that the ESD iseven, non-negative and real.

Ex

= x t( )2

dt!"

"

# = X f( )2

df!"

"

#

Ex

= x n[ ]2

n=!"

"

# = X F( )2

dF1$or

X f( )2

X F( )2

!xf( ) = X f( )

2

!xF( ) = X F( )

2or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 42

Energy Spectral DensityProbably the most important fact about ESD is therelationship between the ESD of the excitation of an LTIsystem and the ESD of the response of the system. It can beshown (pp. 606-607) that they are related by

!y f( ) = H f( )2!x f( ) = H f( )H*

f( )!x f( )

!y F( ) = H F( )2!x F( ) = H F( )H*

F( )!x F( )

or

Page 8: Correlation to Psd

8

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 43

Energy Spectral Density

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 44

Energy Spectral Density

It can be shown (pp. 607-608) that, for an energy signal,ESD and autocorrelation form a Fourier transform pair.

Rxt( ) F

! " # $xf( )

Rxn[ ]

F

! " # $xF( )or

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 45

Power Spectral DensityPower spectral density (PSD) applies to power signals inthe same way that energy spectral density applies toenergy signals. The PSD of a signal x is conventionallyindicated by the notation, or . In an LTIsystem,

Also, for a power signal, PSD and autocorrelation form aFourier transform pair.

Gxf( )

GxF( )

Gy f( ) = H f( )2Gx f( ) = H f( )H*

f( )Gx f( )

Gy F( ) = H F( )2Gx F( ) = H F( )H*

F( )Gx F( )

or

R t( ) F

! " # G f( )[ ] or

R n[ ]F

! " # G F( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 46

PSD Concept

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 47

TypicalSignals in

PSDConcept