Wednesday, 19 October 2011

Generation of Surface by Radar Data: 1 D Example

This Example shows how you can generate a surface from radar data in 1D plane.

Setup
In the setup, we take a 1D example where we rotate the radar direction in a plane from theta=0 to 180 and record the time t taken by signal to come back. Lets assume the velocity is v, then the distance r is
 \[r=v \times t/2\]

So in the setup if we take steps of deltatheta in rotation , we have thetamat matrix denoting different rotation
position and correspondingly we have tmat matrix from which calculate the rmat matrix.
Fig 1 Surface generation from Radar

Now calculating the surface(line here) is pretty easy.
x=rcos(theta)
y=-rsin(theta)
assuming radar is at (0,0)

Generation of Radar Data
Since we are not doing experiment here we need to generate radar data by simulation. we will generate random data using rand function.
thetamat=0:0.01:2*pi;
%generation of Radar Data(use the real recorded data here
tmat=rand(size(thetamat));
%for more smooth surface remove the comments below
%windowSize = 5;
%tmat=filter(ones(1,windowSize)/windowSize,1,1+tmat*0.3);
Generation of Surface
Here is the code:
v=1000;
rmat=v*tmat/2;

xmat=rmat.*cos(thetamat);
ymat=-rmat*.sin(thetamat);

plot(xmat,ymat);

No comments:

Post a Comment