0% found this document useful (0 votes)
106 views

Final

This document is a project-based lab report submitted by three students - K. Pranavi, A. Sriram, and K.Sri Sai Manish - to fulfill the requirements for a Bachelor of Technology degree in Computer Science and Engineering from KL University. The report describes a project on time delay estimation using correlation in radar. It includes certificates signed by the lecturer in charge and head of the department to verify the authenticity and completion of the project. It also includes acknowledgements, a project description outlining the objectives and tasks, source code and output graphs for the tasks, and declarations signed by the students.

Uploaded by

klu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

Final

This document is a project-based lab report submitted by three students - K. Pranavi, A. Sriram, and K.Sri Sai Manish - to fulfill the requirements for a Bachelor of Technology degree in Computer Science and Engineering from KL University. The report describes a project on time delay estimation using correlation in radar. It includes certificates signed by the lecturer in charge and head of the department to verify the authenticity and completion of the project. It also includes acknowledgements, a project description outlining the objectives and tasks, source code and output graphs for the tasks, and declarations signed by the students.

Uploaded by

klu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 19

A

PROJECTBASED LAB REPORT


On
TIME DELAY ESTIMATION USING CORRELATION IN RADAR
Submitted in partial fulfilment of the
Requirements for the award of the Degree of

Bachelor of Technology
In
Computer Science & Engineering
By
K. Pranavi
(13003055)

A. Sriram
(13003066)

K.Sri Sai Manish


(13003067)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

K L University
Green Fields, Vaddeswaram, Guntur District-522 502
2014-2015

K L University
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICA
TE
This is to certify that this project based lab report entitled TIME DELAY ESTIMATION
USING CORRELATION IN RADAR is a bonafide work done by ANNE SRIRAM
(13003066) in partial fulfilment of the requirement for the award of degree in BACHELOR
OF TECHNOLOGY in Computer Science and Engineering during the academic year
2014-2015.

Lecturer In Charge

Head of the Department

K L University
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DECLARATI
ON
We hereby declare that this project based lab report entitled TIME DELAY ESTIMATION
USING CORRELATION IN RADAR has been prepared by us in partial fulfilment of the
requirement for the award of degree BACHELOR OF TECHNOLOGY in COMPUTER
SCIENCE AND ENGINEERING during the academic year 2014-2015.
I also declare that this project based lab report is of our own effort and it has not been
submitted to any other university for the award of any degree.

BATCH 4

Date: -11-2014

K.PRANAVI

13003055

Place: Vaddeshwaram

A.SRIRAM

13003066

K.SRI SAI MANISH

13003067

ACKNOWLEDGEMENTS

Our sincere thanks to Mr. Ravi Kumar Mokkapati in the Lab for their outstanding support
throughout the project for the successful completion of the work
We express our gratitude to Dr.K.Thirupathi Rao , Head of the Department for Computer
Science and Engineering for providing us with adequate facilities, ways and means by which
we are able to complete this term paper work.
We would like to place on record the deep sense of gratitude to the honourable Vice
Chancellor, K L University for providing the necessary facilities to carry the concluded term
paper work.
Last but not the least, we thank all Teaching and Non-Teaching Staff of our department and
especially my classmates and my friends for their support in the completion of our term paper
work.

K.PRANAVI

13003055

A.SRIRAM

13003066

K.SRI SAI MANISH

13003067

PROJECT DESCRIPTION

Objectives:
(a) Understanding the basic theory of RADAR system.
(a) Implement the auto-correlation and cross-correlation for Radar system in the noisy
environment.
(b) Measuring the time delay by computing cross-correlation.
(c) Calculating the distance of the target.

FIG 1

Cross-correlation is a measure of similarity of two waveforms as a function of time delay applied to


one of them. Auto-correlation is a cross-correlation between the signal and itself. The correlation
functions are of used in many applications in communication systems. For example, in Radar and
Sonar systems, it can be used to detect the delay between the transmitted and received signals. Hence
the distance between the target and Sonar / Radar can be detected.
Let xa( t) be the transmitted signal and ya( t) be the received signal in a RADAR system, where

ya( t) = axa(t -td )+va( t)


and, va( t) is additive random noise. The signals xa( t) and ya( t) are sampled in the receiver,
according to the sampling theorem, and are processed digitally to determine the time delay and hence
the distance of the object. The resulting discrete-time signals are

x [n ] = xa(nT)
t

y [n ] = ya(nT) = axa(nT - d )+va(nT)


= ax [ n-D]+v [n ]
Understanding Correlation

Cross-correlation is a measure of similarity of two waveforms as a function of time delay


applied to one of them. Auto-correlation is a cross-correlation between the signal and itself.
The correlation functions are of used in many applications in communication systems. For
example, in Radar and Sonar systems, it can be used to detect the delay between the
transmitted and received signals. Hence the distance between the target and Sonar / Radar can
be detected.

Understanding Time Delay

If we calculate the cross correlation between both signals, the max(or min) of the cross
correlation function indicates the in time where the signals are best aligned ie. The time delay
between the signals is determined by the argument of the max or arg max of cross-correlation

Barker Sequences

A barker sequence is a finite sequence of N values from -1 to +1


In wireless communication sequences are usually chosen for their spectral properties and for
low cross correlation with other sequences likely to interfere. The value of auto-correlation
function for barker sequence is either 0 or -1 at all offsets except 0 (where it is +11).

DESCRIPTION OF TASKS

1. Task1: Explain how we can measure the delay D by computing the auto-correlation

rxy (l) .

2. Task2: Let x[n] be the 13-point Barker sequence:


x[n] =[1,1,1,1,1,1,1,1,1,1,1,1,1]
and v[n] can be Gaussian random sequence with zero mean and variance 2 =0.1.
Write a program that generates the sequence the sequence y[n] , 0 <= n <=199 for
a =0.9 and D =20. Plot the signals x[n] , y[n] , 0 <= n <= 199.

3. Task3:Compute and plot the cross-correlation rxy (l) , for the range (i) 0 <= l <= 59 and (ii)
-30 <= l <= 30 . Use the plot to estimate the value of the delay D in both cases and
compare and comment.

4. Task4: Repeat parts (b) and (c) for 2 = 0.01 and 2 = 1.

5. Task5: If x[n] is 32 pseudo random noise m-sequence and given by

x[n] =[1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1]
and the received y[n] is given by
y[n] =[ 0.4923 0.6947 0.9727 0.3278 0.8378 0.7391 0.9542 0.0319 0.3569 0.6627
1.2815 -0.7696 -0.2889 1.6246 -0.4094 1.6604 1.0476 -0.6512 -0.5487 1.2409
1.7150 1.8562 1.2815 1.7311 -0.8622 -0.1633 -0.8614 1.5882 1.3662 -0.1932
1.5038 1.4896 1.8770 -0.6469 1.4494 -0.0365 1.0423 -0.0270 -0.8108 -0.3329
-0.4136 -0.3249 0.3610 0.6203 0.8112 0.0193 0.0839 0.9748 0.6513 0.2312
0.4035 0.1220 0.2684 0.2578 0.3317 0.1522 0.3480 0.1217 0.8842 0.0943]
Plot the cross-correlation function rxy (l) and from the plot find the time delay. If the
sampling frequency is 1 MHz, Find the distance between the object and the radar.

SOURCE CODE AND OUTPUT GRAPHS

TASK 1:-

In case of auto correlation


Let x[n] be the 13-point Barker sequence:

x[n] [1,1,1,1,1,1,1,1,1,1,1,1,1]

n=0:12;
x=[1,1,1,1,1,-1,-1,1,1,-1,1,-1,1];
y=xcorr(x,x)
figure();
subplot(2,1,1);
stem(n,x,'r','fill','linewidth',1.5);
axis([0 25 -2 14]);
title('x[n]');
xlabel('time');
ylabel('amplitude');
subplot(2,1,2);
stem(0:24,y,'k','fill');
axis([0 25 -2 14]);
title('Autocorrelation function of x[n]');
xlabel('lags');
ylabel('Autocorrelation');

output:
y=

Columns 1 through 9
1.0000 -0.0000
1.0000

1.0000

0.0000

1.0000

0.0000

1.0000

0.0000

Columns 10 through 18
0.0000
0.0000

1.0000 -0.0000 13.0000 -0.0000

1.0000 -0.0000

Columns 19 through 25
1.0000

0.0000

1.0000

0.0000

1.0000

0.0000

1.0000

1.0000

amplitude

x[n]
10
5

Autocorrelation

0
0

10

15
time
Autocorrelation function of x[n]

20

25

20

25

10
5
0
10

lags

15

FIG 2

The maximum value in the auto correlation graph gives us the delay D i.e. 12

In case of cross correlation

n=0:12;
x=[1,1,1,1,1,-1,-1,1,1,-1,1,-1,1];
y=randn(1,13);
Rxx=xcorr(x,x)
Rxy=xcorr(x,y)
figure();
subplot(2,1,1);
stem(n,x,'r','fill','linewidth',1.5);
axis([0 13 -2 5]);
title('x[n]');
xlabel('time');
ylabel('amplitude');
subplot(2,1,2);
stem(0:24,Rxy,'k','fill');
axis([0 25 -6 10]);
title('crosscorrelation function of x[n]');
xlabel('lags');
ylabel('crosscorrelation');

output:

Rxx =

Columns 1 through 9
1.0000 -0.0000
1.0000

1.0000

0.0000

1.0000

0.0000

1.0000

0.0000

Columns 10 through 18
0.0000
0.0000

1.0000 -0.0000 13.0000 -0.0000

1.0000 -0.0000

1.0000

Columns 19 through 25
1.0000

0.0000

1.0000

0.0000

1.0000

0.0000

1.0000

3.2299

2.1408

0.1698 -2.2570

Rxy =
Columns 1 through 9
1.5442
1.4642

2.6448

3.1973

0.0977

Columns 10 through 18
3.1915
6.3374

1.9023 -2.9304 -0.7254

2.1579 -4.6381 -1.7871 -2.1342

Columns 19 through 25
-2.8055

0.3529 -2.4098

1.6401 -0.1075

0.1006 -1.2141

x[n]

amplitude

4
2
0
-2
0

6
8
time
crosscorrelation function of x[n]

crosscorrelation

10

10

12

5
0
-5
0

FIG 3

10

lags

15

20

25

The difference between vector index of the maximum, of the autocorrelation function (rxx)
and cross-correlation function (rxy), gives us time delay in this case it is
17-13=4.

TASK 2:-

n=0:199;
a=0.9;
d=20;
v=randn(1,200)*0.1;
x=[zeros(1,94),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94))];
x1=[zeros(1,114),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94+20))];
y=a*(x1)+v;
figure();
subplot(2,1,1);
stem(n,x,'r','fill');
title('BARKER SEQUENCE');
xlabel('time');
ylabel('amplitude');
subplot(2,1,2);
stem(n,y,'k','fill','linewidth',1.5);
title('y(n)');
xlabel('time');
ylabel('amplitude');

BARKER SEQUENCE

amplitude

1
0.5
0
-0.5
-1

20

40

60

80

100
time
y(n)

120

140

160

180

200

20

40

60

80

100
time

120

140

160

180

200

amplitude

2
1
0
-1
-2
FIG 4

TASK 3:-

n=0:199;
a=0.9;
d=20;
v=randn(1,200)*0.1;
x=[zeros(1,94),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94))];
x1=[zeros(1,114),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94+20))];
y=a*(x1)+v;
Rxy=xcorr(x,y,60)
Rxy1=xcorr(x,y,30)
figure();
subplot(2,1,1);
stem(0:120,Rxy,'r','fill');
title('time lag between 0 to 59');
xlabel('time');
ylabel('amplitude');
subplot(2,1,2);
stem(0:59,Rxy1,'k','fill','linewidth',1.5);
title('time lag b/w -30 to 30');
xlabel('time');
ylabel('amplitude');

time lag between 0 to 59

amplitude

15
10
5
0
-5

20

40

10

20

amplitude

15

100

120

50

60

10
5
0
-5

FIG 5

60
80
time
time lag b/w -30 to 30

30
time

40

TASK 4:For variance = 0.01


n=0:199;
a=0.9;
d=20;
v=randn(1,200)*0.01;
x=[zeros(1,94),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94))];
x1=[zeros(1,114),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94+20))];
y=a*(x1)+v;
Rxy=xcorr(x,y,60)
Rxy1=xcorr(x,y,30)
figure();
subplot(2,1,1);
stem(0:120,Rxy,'r','fill');
title('time lag between 0 to 59');
xlabel('time');
ylabel('amplitude');
subplot(2,1,2);
stem(0:60,Rxy1,'k','fill','linewidth',1.5);
title('time lag b/w -30 to 30');
xlabel('time');
ylabel('amplitude');

time lag between 0 to 59

amplitude

15
10
5
0
-5

20

40

10

20

amplitude

15

60
80
time
time lag b/w -30 to 30

100

120

50

60

10
5
0
-5

FIG 6

For variance = 1

30
time

40

n=0:199;
a=0.9;
d=20;
v=randn(1,200)*1;
x=[zeros(1,94),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94))];
x1=[zeros(1,114),1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,zeros(1,200-(13+94+20))];
y=a*(x1)+v;
Rxy=xcorr(x,y,60)
Rxy1=xcorr(x,y,30)
figure();
subplot(2,1,1);
stem(0:120,Rxy,'r','fill');
title('time lag between 0 to 59');
xlabel('time');
ylabel('amplitude');
subplot(2,1,2);
stem(0:60,Rxy1,'k','fill','linewidth',1.5);
title('time lag b/w -30 to 30');
xlabel('time');
ylabel('amplitude');

time lag between 0 to 59

amplitude

20
10
0
-10

20

40

10

20

amplitude

20

60
80
time
time lag b/w -30 to 30

100

120

50

60

10
0
-10

FIG 7

TASK 5:-

30
time

40

x =[1 1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1]; %#ok<*NOPTS>


y=[0.4923 0.6947 0.9727 0.3278 0.8378 0.7391 0.9542 0.0319 0.3569 0.6627
1.2815 -0.7696 -0.2889 1.6246 -0.4094 1.6604 1.0476 -0.6512 -0.5487 1.2409
1.7150 1.8562 1.2815 1.7311 -0.8622 -0.1633 -0.8614 1.5882 1.3662 -0.1932
1.5038 1.4896 1.8770 -0.6469 1.4494 -0.0365 1.0423 -0.0270 -0.8108 -0.3329
-0.4136 -0.3249 0.3610 0.6203 0.8112 0.0193 0.0839 0.9748 0.6513 0.2312
0.4035 0.1220 0.2684 0.2578 0.3317 0.1522 0.3480 0.1217 0.8842 0.0943];
z=xcorr(x,y);
stem(z,'r','fill','linewidth',1.5);
title('cross correlation of x[n],y[n]');
xlabel('lag');
ylabel('amplitude');
legend('Rxy(l)');

cross correlation of x[n],y[n]

30

Rxy(l)
25
20

amplitude

15
10
5
0
-5
-10
FIG 8

20

40

60
lag

80

100

120

The delay obtained is 50-32=18units.


The distance between the object and radar =velocity*time delay
=frequency*wavelength*time delay
=1MHz*1mm*18sec
=18km.

CONCLUSION

By this project, we have observed that the delay in time of a particular sequence can be
calculate using correlation or more specifically auto-correlation. We can also understand the
syntax of correlation in MATLAB.

We also explore some different topics such as Barker Sequences, and the effect of variance on
the time delay.

REFERENCE
1. Page 116 and 144, John G. Proakis and Dimitris G. Manolakis. Digital Signal
Processing,
2. Principles, Algorithms and Applibations, Fourth edition, Pearson Prentice Hall, 2007.

You might also like