in DOA, ifft weighting vector
2 views (last 30 days)
Show older comments
clc; clear all; close all
%% array parameters
c = 3e8;
f = 3e8; % nominal frequency for array antenna interval setting
lambda = c/f;
d = lambda/2; % array spacing
Na = 10; % number of array elements
Ns = 2^10;
theta = -90:0.05:90; % turn table scan angle
theta_w = linspace(-pi,pi,Ns)*180/pi;
beta = 2*pi/lambda;
ste = 0;
u_delta = 2*pi/Na;
z = exp(1j*pi*(0:Na-1)'*sind(theta))';
for i =1:Na
z_re(:,i) = resample(z(:,i),Ns,length(theta));
end
z1 = sum(z_re,2);
z2 = abs(z1/max(z1));
figure(1)
plot(theta_w,20*log10(z2))
xlim([-180 180])
ylim([-50 0])
grid on
%% Desired Beam
R_dB=20;
R=10^(R_dB/20);
m=Na-1;
x0=cosh((1/m)*acosh(R));
u=sind(-90:0.05:90);
psi=pi*u;
x=x0*cos((psi-ste*pi/180*pi)/2);
T_real(1,:)=ones(1,length(x));
T_real(2,:)=x;
if m>1
for i=3:m+1
T_real(i,:)=2*x.*T_real(i-1,:)-T_real(i-2,:);
end
else
end
B=(1/R)*T_real(m+1,:); % 1/R 은 normalize
Chebyshev_real = B;
Th_start = 0; % degree unit
B2 = resample(B,Ns,length(theta))';
% plot(pi*sind(theta),10*log10((abs(B1)).^2),'LineWidth',1.5)
figure(2)
plot(theta_w,10*log10((abs(B2)).^2),'LineWidth',1.5)
xlim([-180 180])
ylim([-50 0])
xlabel("\theta")
ylabel("Normalized Pattern [dB]")
title("Dolph-Chebyshev Beam Pattern")
grid on
% Xd = exp(1j*beta*d*(0:N-1)'*sind(theta));
% Xd1 = sum(Xd,1);
% Xd2 = abs(Xd1/max(Xd1));
%% weighting LSM
w_lsm = z_re \ B2;
%% ifft weighting
w_ifft = ifft(B2);
w_ifft1 = ifftshift(w_ifft);
[wn_s,idx] = maxk(w_ifft1,Na);
idx1 = sort(idx);
w_ifft3 = w_ifft1(idx1,:);
Beam_ifft = (w_ifft3').*z_re;
Beam_ifft1 = sum(Beam_ifft,2);
Beam_ifft2 = abs(Beam_ifft1/max(Beam_ifft1));
figure(4)
plot(theta_w,20*log10(Beam_ifft2))
xlim([-180 180])
ylim([-50 0])
grid on
in this case, the last figure is needed to come out like desired beam, i can't find problem
plz~~~ help me
0 Comments
Accepted Answer
Paul
on 7 Apr 2024
Hi 종영,
Based on the very limited information provided I took an educated guess.
%% array parameters
c = 3e8;
f = 3e8; % nominal frequency for array antenna interval setting
lambda = c/f;
d = lambda/2; % array spacing
Na = 10; % number of array elements
Ns = 2^10;
theta = -90:0.05:90; % turn table scan angle
theta_w = linspace(-pi,pi,Ns)*180/pi;
beta = 2*pi/lambda;
ste = 0;
u_delta = 2*pi/Na;
z = exp(1j*pi*(0:Na-1)'*sind(theta))';
for i =1:Na
z_re(:,i) = resample(z(:,i),Ns,length(theta));
end
z1 = sum(z_re,2);
z2 = abs(z1/max(z1));
figure(1)
plot(theta_w,20*log10(z2))
xlim([-180 180])
ylim([-50 0])
grid on
%% Desired Beam
R_dB=20;
R=10^(R_dB/20);
m=Na-1;
x0=cosh((1/m)*acosh(R));
u=sind(-90:0.05:90);
psi=pi*u;
x=x0*cos((psi-ste*pi/180*pi)/2);
T_real(1,:)=ones(1,length(x));
T_real(2,:)=x;
if m>1
for i=3:m+1
T_real(i,:)=2*x.*T_real(i-1,:)-T_real(i-2,:);
end
else
end
B=(1/R)*T_real(m+1,:); % 1/R 은 normalize
Chebyshev_real = B;
Th_start = 0; % degree unit
B2 = resample(B,Ns,length(theta))';
% plot(pi*sind(theta),10*log10((abs(B1)).^2),'LineWidth',1.5)
figure(2)
plot(theta_w,10*log10((abs(B2)).^2),'LineWidth',1.5)
xlim([-180 180])
ylim([-50 0])
xlabel("\theta")
ylabel("Normalized Pattern [dB]")
title("Dolph-Chebyshev Beam Pattern")
grid on
% Xd = exp(1j*beta*d*(0:N-1)'*sind(theta));
% Xd1 = sum(Xd,1);
% Xd2 = abs(Xd1/max(Xd1));
%% weighting LSM
w_lsm = z_re \ B2;
This plot of B2 suggests that it needs to be shifted before taking the ifft.
figure(20);
plot(abs(B2))
But B2 has an even number of points, and I didn't go back to to review how B2 is constructed to determine which of ifftshift or fftshift is the correct function to use.
numel(B2)
I used ifftshift, but maybe fftshift would be correct (though the difference between using either of them should be small)
%% ifft weighting
%w_ifft = ifft(B2);
w_ifft = ifft(ifftshift(B2));
w_ifft1 = ifftshift(w_ifft);
[wn_s,idx] = maxk(w_ifft1,Na);
idx1 = sort(idx);
w_ifft3 = w_ifft1(idx1,:);
Beam_ifft = (w_ifft3').*z_re;
Beam_ifft1 = sum(Beam_ifft,2);
Beam_ifft2 = abs(Beam_ifft1/max(Beam_ifft1));
figure(4)
plot(theta_w,20*log10(Beam_ifft2))
xlim([-180 180])
ylim([-50 0])
grid on
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!