Você está na página 1de 11

Extra Credit Assignment for EECE 314 By Brian Mileshosky The purpose of this assignment is to use Matlab to demonstrate

the cross correlation of a radar signal with has two parts the signal emitted by the radar, and the signal collected by the radar after bouncing off of the target, which corrupts it with noise and adds a time delay that is proportional to the distance from the target. I will use Matlab to show the signal after being cross-correlated with the ideal case (time delay on the return, but no noise corruption) and realistically (time delay, scaling and noise corruption). Before beginning this assignment, I looked at the help menus for Cross correlation and normally distributed random numbers by entering the following into Matlab: help xcorr help randn To begin, I assigned a value to the variable x, after which I views it using the Stem command: x=[1 1 1 0 0 0] stem(x)

The variable x represents the radar signal initially emitted. I then assigned another value to variable y: y=[0 0 1 1 1 0]; stem(y)

The variable y represents the radar signal received after bouncing off of the target after some time delay. I then cross correlated the two signals, and used the stem commands to view the result: xcorr(x,y); stem(xcorr(x,y))

I then used the max command to find the maximum values of the correlated signal. >> [v,I]=max(xcorr(x,y)) v= 3 I= 4 >> This shows that the maximum amplitude of the signal, which is 3, occurred at t=4, if the x-axis represents time and the y-axis represents the signal amplitude values.

I then added random values to signal x, as if it was being corrupted with noise by entering: >> yn=y+.5*randn(size(y)); >> yn yn = -0.6906 0.1578 1.7766 1.3539 1.9787 0.2523

>> stem(xcorr(x,yn)) The actual value of the noise (variable yo) added was found by: >> yo = [-0.6906 yo = -0.6906 0.1578 0.7766 0.3539 0.9787 0.2523 0.1578 1.7766 1.3539 1.9787 0.2523]-[y]

>> [v,I]=max(xcorr(x,yn)) v= 5.1093 I= 4 >> Next, I multiplied the added noise by 2 and added it to signal y and the cross correlation looks like:

By 3:

By 10:

As can be seen, only the amplitudes of the signals change with increasing noise added to signal y (the return). Clearly the signals peak amplitude is found at the value of t=4, and this remains unchanged when I multiply the noise by a positive value and add t to the already existing signal y. I then decided to corrupt the signal y with another random bit of noise: >> yn=y+randn(size(y)); >> yn yn = 1.8645 -0.3398 -0.1398 Then cross-correlated it: >> stem(xcorr(x,yn)) 0.7889 2.1902 -1.1162

And this was the result:

I corrupted y with yet another new amount of random noise and cross-correlated it: >> yn=y+randn(size(y)); >> yn yn = 0.6353 -0.6014 >> stem(xcorr(x,yn)) 1.5512 -0.0998 1.0860 -2.0046

It seems as though the peak amplitude of the cross-correlated signal remains at t=4 (t being the horizontal axis). I now am going to scale the returned signal, already corrupted by noise, down, as though it is weaker than signal x which is emitted by the radar. This is non-ideal, but is what happens with a radar: After scaling the signal yn=[0.6353 -0.6014 1.5512 -0.0998 1.0860 -2.0046] (used above) down to 20% its original amount, the cross-correlation looks like: >> yo=yn*.2 yo = 0.1271 -0.1203 >> stem(xcorr(x,yo)) 0.3102 -0.0200 0.2172 -0.4009

What I have seen through doing all of this within Matlab is that though the signal is corrupted with noise, and even scaled, the maximum amplitude remains in the same place when the emitted and returned signals are cross correlated, similar to what occurs with a radar system.

Você também pode gostar