?? radar.txt
字號:
%Radar Absorbing Material Design
%-----------------------------------------
clear;
clc;
f=input('Input Frequency in Ghz= ');
t=input('Enter thickness in inches= ');
f=f*1e9;t=t*0.0254;
lambda=(3*1e8)/f;
Bo=2*pi/lambda;
Er=4;
Mr=1;Mrr=0;
v=1;
Mo=4*pi*1e-7;
E0=8.85e-12;
Zo=377;
for Err=0:0.5:20
gamma(v)=j.*Bo.*(((Mr-j.*Mrr).*(Er-j*Err)).^0.5);
zd(v)=((Mo.*(Mr-j.*Mrr))./(E0.*(Er-j.*Err))).^0.5;
v=v+1;
end
zin=zd.*tanh(gamma*t);
ref=((zin-Zo)./(zin+Zo));
refdb=20.*log10(abs(ref));
Err=0:0.5:20;
plot(Err,refdb);
title('Material Thickness= 2.24 inches');
ylabel('Reflection Coefficient');
xlabel('Permeability-Epsilon double prime');
grid on;
78
% Antenna pattern file generation for Urbana
%----------------------------------------------------
clc;
clear;
c=3*10^8;
lamda =c/(2.0*10^9);
HPBW = 15;
a = 58.4 * lamda / (2*HPBW);
beta = 2*pi/lamda;
E0 = 1;
E = j*beta*E0*pi*a^2/(2*pi);
Directivity = (4*pi*pi*a^2)/lamda^2
Directivity_dB = 10*log10(Directivity)
step1 = 90; %Vertical Steps
step2 = 180; %Horizontal Steps
d_theta = 180/(step1);
d_phi = 360/(step2);
k = 0;
ip = 0;
iq = 0;
for phi = 0:d_phi:360
for theta = 0.01:d_theta:180.01
k = k+1;
f = 2*besselj(1,beta*a*sin(theta*pi/180))/(beta*a*sin(theta*pi/180));
e_theta = cos(phi*pi/180)*E*f;
e_phi = -sin(phi*pi/180)*cos(theta*pi/180)*E*f;
if theta > 90
e_theta = 0;
e_phi = 0;
end
if phi == 0
ip = ip + 1;
et0(ip) = 20*log10(abs(e_theta));
ep0(ip) = 20*log10(abs(e_phi));
eth(ip) = theta;
end
if phi == 90
iq = iq + 1;
et90(iq) = 20*log10(abs(e_theta));
ep90(iq) = 20*log10(abs(e_phi));
eth90(iq) = theta;
end
79
A(k,1:4) = [real(e_theta), imag(e_theta), real(e_phi), imag(e_phi)];
end
end
save newpat15 A -ASCII;
%Observation Points generation
%------------------------------------
clc;
clear;
x=-80:2:80;
y=-260:2:140;
z=5;
v=1;
for i=1:201;
for k=1:81;
pts(v,1)=x(k);
pts(v,2)=y(i);
pts(v,3)=z;
v=v+1;
end
end
save observe pts -ASCII;
%Amplitude Error
%---------------------
clear;
clc;
lambda=0.15;
k=4*log(2);
R=242*0.0254;
Pt=1;
Pr0=Pt*1/(4*pi*R^2);
for tetab=5:5:20; % half power angle (HPBW/2)
disp(['HPBW =',num2str(2*tetab)])
i=0;
tetac=tetab*(pi/180);
for L=0.02:0.02:1.5;
i=i+1;
teta=atan(L/(2*R));
T(i)=teta*180/pi;
Pt=1;
g(i)=exp(-k*teta^2/(tetac/2)^2);
80
Pr=Pt*g(i)/(4*pi*R^2*Pr0);
Prdb(i)=10*log10(Pr);
%pherr(i)=pi.*L.^2/(4*R*lambda);
LL(i)=L;
end
plot(LL,Prdb);
xlabel('Length of L in meters');
ylabel('Amplitude error in dB');
grid on;
%clear g,Prdb,pherr;
hold on
end
axis([0,max(LL),-5,0])
gtext('5 degree HPBW');
gtext('10 degree HPBW');
gtext('15 degree HPBW');
gtext('20 degree HPBW');
hold off
%Phase Errror
%----------------
clc;
clear;
lambda=0.15;
k=4*log(2);
R=242*0.0254;
i=0;
for L=0.01:0.01:1.5;
i=i+1;
D=sqrt(R^2+(L/2)^2);
del=D-R;
pherr(i)=2*pi*del/lambda;
phdeg(i)=pherr(i)*180/pi;
LL(i)=L;
end
plot(LL,phdeg);
xlabel('Length of L in meters');
ylabel('Phase error in degrees');
grid;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -