Hi, I am trying to implement the Bartlett's algorithm (conventional beamforming) to find the DOA for a planar array geometry which has a 2x2 array structure. I generate a input signal and then find the steering vector for the antenna array as A = [1 exp(- j*k*d*sin(theta)*cos(phi) exp(-j*k*d*sin(theta)*sin(phi) exp(-j*k*d*(sin(theta)*cos(phi) +sin(theta)*sin(phi) ] I then found the power at each value of theta and phi (the elevation and azimuth angles being sweeped from 0 to 30 degrees) and then the value of theta and phi which has the maximum power was to have been the desired DOA.I generated a test input signal in the same form as the steering vector (transposed) to test the algorithm and put in some value of theta and phi. The problem was that I could get the correct value of theta when I ran the program, but not for phi. I have no idea what is wrong with the program. Could someone guide me as to where I am going wrong in the formulas or in the code? Thanks, Farah. Here is my MATLAB code: c = 3e8; % speed of light in m/s f = 3.432e9; % carrier signal frequency lambda = c/f; % lambda = c/f d = lambda/2; %distance between array elements k = (2*pi)/lambda; % delay between each element signal theta_range=30; phi_range=30; %% Generate Input Signal angle_t=10; angle_p=20; input = [1; exp( -( j*k*d*sin(pi*angle_t/180)*sin(pi*angle_p/ 180)) ); ... exp( -( j*k*d*sin(pi*angle_t/180)*cos(pi*angle_p/180)) );... exp( -( j*k*d*( sin(pi*angle_t/180)*cos(pi*angle_p/180)+ sin(pi*angle_t/180)*sin(pi*angle_p/180)) ))]; R=input*ctranspose(input)/length(input); %% Compute steering vector by sweeping theta and phi angles index_row=1; % calculate 'a' for each value of theta and phi for theta=1:theta_range % sweep elevation angle from 0 to 180 degrees for phi = 1:phi_range % sweep azimuth angle from 0 to 180 degrees A(index_row,:)= [1,exp( -( j*k*d*sin(pi*theta/180)*cos(pi*phi/ 180)) ),exp( -( j*k*d*sin(pi*theta/180)*sin(pi*phi/180)) ),exp( - ( j*k*d*( sin(pi*theta/180)*cos(pi*phi/180)+ sin(pi*theta/ 180)*sin(pi*phi/180)) ))]; index_row=index_row+1; steering_vector(:,:)=[A(theta*phi,1);A(theta*phi, 3);A(theta*phi,2);A(theta*phi,4)]; temp1=(ctranspose(steering_vector)*R*steering_vector); temp2=(ctranspose(steering_vector)*steering_vector); temp=temp1/temp2; power(theta,phi)=temp; end end
Planar Array DOA Beamforming
Started by ●May 12, 2008