<< Chapter < Page Chapter >> Page >

Generate 1000 independent samples of a Gaussian random variable X with mean 0 and variance 1. Filter the samples using [link] . We will denote the filtered signal Y i , i = 1 , 2 , , 1000 .

Draw 4 scatter plots using the form subplot(2,2,n) , ( n = 1 , 2 , 3 , 4 ) . The first scatter plot should consist of points, ( Y i , Y i + 1 ) , ( i = 1 , 2 , , 900 ) . Notice that this correlates samples that are separated by a lag of “1”.The other 3 scatter plots should consist of the points ( Y i , Y i + 2 ) , ( Y i , Y i + 3 ) , ( Y i , Y i + 4 ) , ( i = 1 , 2 , , 900 ) , respectively. What can you deduce about the random process from these scatter plots?

For real applications, the theoretical autocorrelation may be unknown. Therefore, r Y Y ( m ) may be estimated by the sample autocorrelation , r Y Y ' ( m ) defined by

r Y Y ' ( m ) = 1 N - | m | n = 0 N - | m | - 1 Y ( n ) Y ( n + | m | ) - ( N - 1 ) m N - 1

where N is the number of samples of Y .

Use Matlab to calculate the sample autocorrelation of Y n using [link] . Plot both the theoretical autocorrelation r Y Y ( m ) , and the sample autocorrelation r Y Y ' ( m ) versus m for - 20 m 20 . Use subplot to place them in the same figure. Does [link] produce a reasonable approximation of the true autocorrelation?

Inlab report

For the filter in [link] ,
  1. Show your derivation of the theoretical output autocorrelation, r Y Y ( m ) .
  2. Hand in the four scatter plots. Label each plot with the corresponding theoretical correlation, from r Y Y ( m ) . What can you conclude about theoutput random process from these plots?
  3. Hand in your plots of r Y Y ( m ) and r Y Y ' ( m ) versus m . Does [link] produce a reasonable approximation of the true autocorrelation? For what value of m does r Y Y ( m ) reach its maximum? For what value of m does r Y Y ' ( m ) reach its maximum?
  4. Hand in your Matlab code.

Correlation of two random processes

Background

The cross-correlation is a function used to describe the correlation between two separate random processes.If X and Y are jointly WSS random processes, the cross-correlation is defined by

c X Y ( m ) = E [ X n Y n + m ] m = , - 1 , 0 , 1 , .

Similar to the definition of the sample autocorrelation introduced in the previous section,we can define the sample cross-correlation for a pair of data sets. The sample cross-correlation between two finite random sequences X n and Y n is defined as

c X Y ' ( m ) = 1 N - m n = 0 N - m - 1 X ( n ) Y ( n + m ) 0 m N - 1
c X Y ' ( m ) = 1 N - | m | n = | m | N - 1 X ( n ) Y ( n + m ) 1 - N m < 0

where N is the number of samples in each sequence. Notice that the cross-correlation is not an even function of m . Hence a two-sided definition is required.

Cross-correlation of signals is often used in applications of sonar and radar, for exampleto estimate the distance to a target. In a basic radar set-up,a zero-mean signal X ( n ) is transmitted, which then reflects off a target after traveling for D / 2 seconds. The reflected signal is received, amplified, and then digitized to form Y ( n ) . If we summarize the attenuation and amplification of the received signal by the constant α , then

Y ( n ) = α X ( n - D ) + W ( n )

where W ( n ) is additive noise from the environment and receiver electronics.

In order to compute the distance to the target, we must estimate the delay D . We can do this using the cross-correlation.The cross-correlation c X Y can be calculated by substituting [link] into [link] .

c X Y ( m ) = E [ X ( n ) Y ( n + m ) ] = E [ X ( n ) ( α X ( n - D + m ) + W ( n + m ) ) ] = α E [ X ( n ) X ( n - D + m ) ] + E [ X ( n ) ] E [ W ( n + m ) ] = α E [ X ( n ) X ( n - D + m ) ]

Here we have used the assumptions that X ( n ) and W ( n + m ) are uncorrelated and zero-mean. By applying the definition of autocorrelation,we see that

c X Y ( m ) = α r X X ( m - D )

Because r X X ( m - D ) reaches its maximum when m = D , we can find the delay D by searching for a peak in the cross correlation c X Y ( m ) . Usually the transmitted signal X ( n ) is designed so that r X X ( m ) has a large peak at m = 0 .

Experiment

Download the file radar.mat for the following section.

Using [link] and [link] , write a Matlab function C=CorR(X,Y,m) to compute the sample cross-correlation between two discrete-time random processes, X and Y , for a single lag value m .

To test your function, generate two length 1000 sequences of zero-mean Gaussian random variables, denoted as X n and Z n . Then compute the new sequence Y n = X n + Z n . Use CorR to calculate the sample cross-correlation between X and Y for lags - 10 m 10 . Plot your cross-correlation function.

Inlab report

  1. Submit your plot for the cross-correlation between X and Y . Label the m -axis with the corresponding lag values.
  2. Which value of m produces the largest cross-correlation? Why?
  3. Is the cross-correlation function an even function of m ? Why or why not?
  4. Hand in the code for your CorR function.

Next we will do an experiment to illustrate how cross-correlation can be used to measure time delay in radar applications.Down load the MAT file radar.mat and load it using the command load radar . The vectors trans and received contain two signals corresponding to the transmitted and received signalsfor a radar system. First compute the autocorrelation of the signal trans for the lags - 100 m 100 . (Hint: Use your CorR function.)

Next, compute the sample cross-correlation between the signal trans and received for the range of lag values - 100 m 100 , using your C o r R function. Determine the delay D .

Inlab report

  1. Plot the transmitted signal and the received signal on a single figure using subplot . Can you estimate the delay D by a visual inspection of the received signal?
  2. Plot the sample autocorrelation of the transmitted signal, r X X ' ( m ) vs. m for - 100 m 100 .
  3. Plot the sample cross-correlation of the transmitted signal and the received signal, c X Y ' ( m ) vs. m for - 100 m 100 .
  4. Determine the delay D from the sample correlation. How did you determine this?

Questions & Answers

What is an atom
Mabel Reply
what are the connective tissue
Faith Reply
which part of the brain that controls human body
Mozanto Reply
describe the stage of eghopoisis
alupe Reply
what is a blood vessels
Sani Reply
what is plasma and is component
Fad Reply
what is the anterior
Tito Reply
Means front part of the body
Ibrahim
what is anatomy
Ruth Reply
describe the stage of ehopoisis
alupe
study of structure
Sakinat
To better understand how the different part of the body works. To understand the physiology of the various structures in the body. To differentiate the systems of the human body .
Roseann Reply
what is hypogelersomia
aliyu Reply
what are the parts of the female reproductive system?
Orji Reply
what is anatomy
Divinefavour Reply
what are the six types of synovial joints and their ligaments
Darlington Reply
draw the six types of synovial joint and their ligaments
Darlington
System of human beings
Katumi Reply
System in humans body
Katumi
Diagram of animals and plants cell
Favour Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask