<< Chapter < Page | Chapter >> Page > |
Generate 1000 independent samples of a Gaussian random variable with mean 0 and variance 1. Filter the samples using [link] . We will denote the filtered signal , .
Draw 4 scatter plots using the form
subplot(2,2,n)
,
.
The first scatter plot should consist of points,
,
. Notice that this correlates samples that are
separated by a lag of “1”.The other 3 scatter plots should consist of the points
,
,
,
, respectively.
What can you deduce about the random process from these scatter plots?
For real applications, the theoretical autocorrelation may be unknown. Therefore, may be estimated by the sample autocorrelation , defined by
where is the number of samples of .
Use Matlab to calculate
the sample autocorrelation of
using
[link] .
Plot both the theoretical autocorrelation
, and the
sample autocorrelation
versus
for
. Use
subplot
to place them in the
same figure. Does
[link] produce a reasonable
approximation of the true autocorrelation?
The cross-correlation is a function used to describe the correlation between two separate random processes.If and are jointly WSS random processes, the cross-correlation is defined by
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 and is defined as
where is the number of samples in each sequence. Notice that the cross-correlation is not an even function of . 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 is transmitted, which then reflects off a target after traveling for seconds. The reflected signal is received, amplified, and then digitized to form . If we summarize the attenuation and amplification of the received signal by the constant , then
where is additive noise from the environment and receiver electronics.
In order to compute the distance to the target, we must estimate the delay . We can do this using the cross-correlation.The cross-correlation can be calculated by substituting [link] into [link] .
Here we have used the assumptions that and are uncorrelated and zero-mean. By applying the definition of autocorrelation,we see that
Because reaches its maximum when , we can find the delay by searching for a peak in the cross correlation . Usually the transmitted signal is designed so that has a large peak at .
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,
and
, for a single
lag value
.
To test your function, generate two length 1000 sequences of zero-mean
Gaussian random variables, denoted as
and
.
Then compute the new sequence
.
Use
CorR
to calculate the sample cross-correlation
between
and
for lags
.
Plot your cross-correlation 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
.
(Hint: Use your
CorR
function.)
Next, compute the sample cross-correlation between the signal trans and received for the range of lag values , using your function. Determine the delay .
subplot
.
Can you estimate the delay
by a visual inspection of the
received signal?Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?