In ULA monopulse, i can't find sum beam and difference beam
조회 수: 2 (최근 30일)
이전 댓글 표시
clc; clear all; close all;
% Transmitted signal
f = 3e8; %[Hz]
c = 3e8;
lambda = c/f;
N = 10; %number of element
theta = -89:0.05:89;
theta_0 = 0;
d = lambda / 2;
Nx = 10;
theta_steering = 5; % steering 각도 +-5
at = exp(1j*2*(0:N-1)'*pi*d/lambda*sind((theta)/2));
w_left = exp(-1j*2*(0:N-1)'*pi*d/lambda*sind((theta_0)-(theta_steering)));
w_right = exp(-1j*2*(0:N-1)'*pi*d/lambda*sind((theta_0)+(theta_steering)));
Beam_left = w_left.*exp(1j*2*(0:N-1)'*pi*d/lambda*sind((theta)));
Beam_right = w_right.*exp(1j*2*(0:N-1)'*pi*d/lambda*sind((theta)));
Beam_left2 = sum(Beam_left,1);
Beam_left3 = abs(Beam_left2/max(Beam_left2));
Beam_right2 = sum(Beam_right,1);
Beam_right3 = abs(Beam_right2/max(Beam_right2));
figure(2)
plot(theta,20*log10((Beam_left3)))
hold on
plot(theta,20*log10((Beam_right3)))
xlim([-90 90])
ylim([-50 0])
xlabel("\theta")
grid on
xlabel("\theta")
ylabel("Normalized Pattern [dB]")
title("left beam and right beam of amplitude comparison monopulse")
legend('left beam','right beam')
%% sum & difference
w_sum = w_left + w_right;
w_diff = w_left - w_right;
Beam_sum = Beam_left + Beam_right;
Beam_sum2 = sum(Beam_sum, 1);
Beam_sum3 = abs(Beam_sum2/max(Beam_sum2));
Beam_diff = Beam_left - Beam_right;
Beam_diff2 = sum(Beam_diff,1);
Beam_diff3 = abs(Beam_diff2/max(Beam_diff2));
figure(3)
plot(theta,20*log10((Beam_sum3)))
hold on
plot(theta,20*log10((Beam_diff3)))
xlim([-90 90])
ylim([-30 0])
xlabel("\theta")
grid on
xlabel("\theta")
ylabel("Normalized Pattern [dB]")
title("sum and difference beam pattern in dB")
legend('sum beam','difference beam')
%% error voltage
% err_vol = real((w_diff.'*p_th2)./(w_sum.'*p_th2));
% err_vol = sum(err_vol,1);
in this code , left beam and right beam is correct?
this case i think sum beam and diffence beam figure is needed to exchange but i can't find error in this code
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!