Академический Документы
Профессиональный Документы
Культура Документы
OF
Prepared By :
Prof. Alpesh H. Dafda
Asst. Prof. (E.C.)
1
CERTIFICATE
This is to certify that
__________________________________ Enrollement
number ____________________ has successfully
completed his/her term work and practical work in the
subject Antenna and Wave Propagation(161003) for
the term ending in __________________ at
Government Engineering College, Dahod, for partial
fulfillment of B.E. degree to be awarded by Gujarat
Technological University. This work has been carried
out under my supervision and is to my satisfaction.
Date:
Place:
2
INDEX
NO SUBJECT DATE PAGE SIGN REMARKS
1 To write a program to plot the
radiation pattern of Dipole
Antenna.
3
12 To write a program to plot 3-D
pattern of Rectangular Apertures as
a function of the independent
variables vx, vy, for aperture
dimensions a = 8λ and b = 4λ.
4
Practical -1
THEORY :
5
MATLAB PROGRAM :
%This program print pattern (AF) for Short and any Dipole
%Antenna by giving the length of your Dipole and the
%wavelength you work with
clc;
lamda=input('enter the value of wave length= ');
l=input('enter your dipole length l in terms of lamda(for ex:
0.5 for 0.5lamda)= ');
ratio=l/lamda;
B=(2*pi/lamda);
theta= pi/100:pi/100:2*pi;
if ratio<= 0.1 %check if Short Dipole
E=sin(theta);
En=abs(E);
polar(theta,En) %This plot polar pattern in plane
which dipole appear as line
else %check if not short dipole
f1=cos(B*l/2.*cos(theta));
f2=cos(B*l/2);
f3=sin(theta);
E=(f1-f2)./f3;
En=abs(E);
polar(theta,En) %This plot polar pattern in plane
which dipole appear as line
end
OUTPUT :
6
90
1
120 60
0.8
0.6
150 30
0.4
0.2
180 0
210 330
240 300
270
CONCLUSIONS :
7
Practical - 2
THEORY :
8
MATLAB PROGRAM :
OUTPUT :
9
90
1
120 60
0.8
0.6
150 30
0.4
0.2
180 0
210 330
240 300
270
CONCLUSIONS :
10
Practical -3
11
MATLAB PROGRAM :
OUTPUT :
90 0.6
120 60
0.4
150 30
0.2
180 0
210 330
240 300
270
CONCLUSIONS :
12
Practical - 4
THEORY :
13
MATLAB PROGRAM :
clc;
lamda=input('enter the value of wave length= ');
N=input('enter the no. of elements(3,4,5...)= ');
alfa=input('enter your progressive phase(alpha=0,45...)= ');
d=input('enter the seperation distance between elements(in
terms of lamda for ex: 0.3 for 0.3lamda)= ');
B=(2*pi/lamda);
theta= pi/100:pi/100:2*pi;
w=alfa+B*d.*cos(theta);
AF=sinc(N*(w./2))./sinc(w./2);
polar(theta,AF)
OUTPUT :
14
90
1
120 60
0.8
0.6
150 30
0.4
0.2
180 0
210 330
240 300
270
CONCLUSIONS :
15
Practical - 5
THEORY :
16
MATLAB PROGRAM :
OUTPUT :
17
90
1
120 60
0.8
0.6
150 30
0.4
0.2
180 0
210 330
240 300
270
CONCLUSIONS :
18
Practical - 6
THEORY :
19
MATLAB PROGRAM :
20
f1=B*a;
f=f1.*(sin(theta));
E=(besselj(1,f))./f; %E-plane or H-plane
subplot(3,3,7)
polar(theta,E)
end
OUTPUT :
CONCLUSIONS :
21
Practical - 7
THEORY :
22
MATLAB PROGRAM :
%This program print pattern for TWA(Travelling Wave Antenna)
%by giving the length of your Line
%and the wavelength you work with
clc;
lamda=input('enter the value of wave length= ');
l=input('enter your Line length l= ');
B=(2*pi/lamda);
theta= pi/100:pi/100:2*pi;
f1=sin(theta);
f2=1-cos(theta);
f3=sin(B*l/2.*(f2));
E=(f1./f2).*f3;
En=abs(E);
polar(theta,En);
OUTPUT:
enter the value of wave length= 1
enter your Line length l= 1
90 2
120 60
1.5
150 1 30
0.5
180 0
210 330
240 300
270
CONCLUSIONS :
23
Practical - 8
THEORY :
24
MATLAB PROGRAM :
% clc;
lamda=input('enter the value of wave length(in
meter)= ');
N=input('enter the no. of elements= ');
alpha=input('enter your progressive phase= ');
d=input('enter the separation distance between
elements(in meter)= ');
beta=(2*pi/lamda);
theta= pi/100:pi/100:2*pi;
psi=alpha+beta*d.*cos(theta);
e=sin(N*(psi./2))./sin(psi./2);
polar(theta,e/N);
N=2 N=4
90 90
1 1
120 60 120 60
0.8 0.8
0.6 0.6
150 30 150 30
0.4 0.4
0.2 0.2
180 0 180 0
25
N=8 N=16
90 90
1 1
120 60 120 60
0.8 0.8
0.6 0.6
150 30 150 30
0.4 0.4
0.2 0.2
180 0 180 0
d=λ/4 d=λ/2
90 90
1 1
120 60 120 60
0.8 0.8
0.6 0.6
150 30 150 30
0.4 0.4
0.2 0.2
180 0 180 0
26
d=3/4λ d=λ
90 90
1 1
120 60 120 60
0.8 0.8
0.6 0.6
150 30 150 30
0.4 0.4
0.2 0.2
180 0 180 0
d=5/2λ d=3/2λ
90
90 1
1 120 60
120 60 0.8
0.8
0.6
0.6 150 30
150 30 0.4
0.4
0.2
0.2
180 0
180 0
27
Case 3: When N=2, d=λ/2
α=0° α=45°
90 90
1 1
120 60 120 60
0.8 0.8
0.6 0.6
150 30 150 30
0.4 0.4
0.2 0.2
180 0 180 0
α=90° α=135°
90 90
1 1
120 60 120 60
0.8 0.8
0.6 0.6
150 30 150 30
0.4 0.4
0.2 0.2
180 0 180 0
CONCLUSIONS :
28
Practical - 9
THEORY :
29
MATLAB PROGRAM :
% sum=0.0;
N=input(’Enter the number of segments in the theta
direction\n’);
for i=1:N
thetai=(pi/N)*(i-0.5);
sum=sum+(cos((pi/2)*cos(thetai)))^2/sin(thetai);
end
D=(2*N)/(pi*sum)
OUTPUT :
D =
1.6428
D =
1.6410
D =
1.6409
D =
1.6409
CONCLUSIONS:
30
Practical - 10
THEORY :
31
32
MATLAB PROGRAM :
% for i=1:100
theta(i)=pi*(i-1)/99;
d(i)=7.5*((cos(theta(i)))^2)*((sin(theta(i)))^2);
end
polar(theta,d)
OUTPUT :
90 2
120 60
1.5
150 1 30
0.5
180 0
210 330
240 300
270
CONCLUSIONS :
33
Practical - 11
THEORY :
34
MATLAB PROGRAM :
% clc
clear all
format long
% er=2.2;
% f=10e9;
% h=0.1588*10;
er=input('Enter the di-electric constant:');
h=input('Enter the substrate thickness (in mil)');
f=input('Enter the frequency (GHz):');
% er=3.5;
f=f*1e9;
h=h*0.0254; % in mm
wid=(3e8/(sqrt((er+1)/2)*2*f))*1000; %in mm
e_eff=((er+1)/2)+ (((er-1)/2)* (1+((12*h)/wid))^-0.5);
l_eff=(3e8/(2*f*sqrt(e_eff)))*1000;
del_l=(((e_eff+0.3)*((wid/h)+0.264))/((e_eff-
0.258)*((wid/h)+0.8)))*(0.412*h); %in mm
L=l_eff-(2*del_l);
la=(3e8/f)*1000;
k=(2*pi)/la;
x=k*(wid);
i1=-2+cos(x)+(x*sinint(x))+(sin(x)/x);
g1=i1/(120*pi*pi);
%Conductance % jb=besselj(0,(k.*L.*sin(th)));
a=@(th)(((sin((x./2).*cos(th))./cos(th)).^2).*(besselj(0,(k.*L
.*sin(th)))).*(sin(th)).^3); a1=quad(a,0,pi);
g12=a1/(120*pi*pi); %in siemens
r_in=1/(2*(g1+g12)); %in ohms
inset=(L/pi)*(acos(sqrt(50/r_in))); %in mm
disp(['The width is:',num2str(wid),' mm'])
disp(['The length is:',num2str(L),' mm'])
disp(['The inset feed point is:',num2str(inset),' mm'])
OUTPUT :
Enter the di-electric constant:12
Enter the substrate thickness (in mil)15
Enter the frequency (GHz):7
The width is:8.405 mm
The length is:6.1601 mm
The inset feed point is:2.5294 mm
CONCLUSIONS :
35
Practical - 12
THEORY :
36
MATLAB PROGRAM :
% a = 8; b = 4;
[theta,phi] = meshgrid(0:1:90, 0:9:360);
theta = theta*pi/180; phi = phi*pi/180;
vx = a*sin(theta).*cos(phi);
vy = b*sin(theta).*sin(phi);
E = abs((1 + cos(theta))/2 .* sinc(vx) .* sinc(vy));
surfl(vx,vy,E);
shading interp; colormap(gray(16));
OUTPUT :
0.8
0.6
0.4
0.2
0
4
2 10
0 5
0
-2 -5
-4 -10
CONCLUSIONS :
37
Practical - 13
THEORY :
38
MATLAB PROGRAM :
% a = 3;
[theta,phi] = meshgrid(0:1:90, 0:9:360);
theta = theta*pi/180; phi = phi*pi/180;
vx = a*sin(theta).*cos(phi);
vy = a*sin(theta).*sin(phi);
u = a*sin(theta);
E = ones(size(u));
i = find(u);
E(i) = abs(2*besselj(1,2*pi*u(i))./(2*pi*u(i)));
surfl(vx,vy,E);
shading interp; colormap(gray(16));
OUTPUT :
0.8
0.6
0.4
0.2
0
4
2 4
0 2
0
-2 -2
-4 -4
CONCLUSIONS :
39
Practical - 14
THEORY :
40
MATLAB PROGRAM :
% function []=horn;
disp('E-Plane and H-Plane Horn Specifications');
%R1=[]; R2=[];
%R1 = input('rho1(in wavelengths) = ');
%R2 = input('rho2(in wavelengths) = ');
R1=6; R2=6;a=0.5; b=0.25; a1=5.5; b1=2.75;
%a=[]; b=[];
%a = input('a(in wavelengths) = ');
%b = input('b(in wavelengths) = ');
%a1=[]; b1=[];
%a1 = input('a1(in wavelengths) = ');
%b1 = input('b1(in wavelengths) = ');
u = (1/sqrt(2))*((sqrt(R2)/a1)+(a1/sqrt(R2)));
v = (1/sqrt(2))*((sqrt(R2)/a1)-(a1/sqrt(R2)));
u = Fresnel(u);
v = Fresnel(v);
w = Fresnel(b1/sqrt(2*R1));
DH = 4*pi*b*R2/a1*((real(u)-real(v))^2 + (imag(u)-imag(v))^2);
DE = 64*a*R1/(pi*b1)*((real(w))^2 + (imag(w))^2);
DP = pi/(32*a*b)*DE*DH;
k = 2*pi;
Emax = 0;
Hmax = 0;
% E and H plane Outputs
% E-Plane Amplitude
for(theta = 0:0.5:360);
I = theta*2 + 1;
theta = theta*pi/180;
phi = pi/2;
ky = k*sin(theta);
kxp = pi/a1;
kxdp = -pi/a1;
t1 = sqrt(1/(pi*k*R1))*(-k*b1/2-ky*R1);
t2 = sqrt(1/(pi*k*R1))*(k*b1/2-ky*R1);
t1p = sqrt(1/(pi*k*R2))*(-k*a1/2-pi/a1*R2);
t2p = sqrt(1/(pi*k*R2))*(k*a1/2-pi/a1*R2);
t1dp = -t2p;
t2dp = -t1p;
I1 =.5*sqrt(pi*R2/k)*(exp(j*R2/(2*k)*kxp^2)*(Fresnel(t2p)-
Fresnel(t1p)) + exp(j*R2/(2*k)*kxdp^2)*(Fresnel(t2dp) -
Fresnel(t1dp)));
I2 = sqrt(pi*R1/k) * exp(j*R1/(2*k)*ky^2) * (Fresnel(t2) -
Fresnel(t1));
y(I) = (1 + cos(theta))*I1*I2;
y(I) = abs(y(I));
end
for(I = 1:721)
if(y(I) > Emax)
Emax = y(I);
41
end
end
for(I = 1:721)
if(y(I) <= 0)
Edb = -100;
else
Edb = 20*log10(abs(y(I))/Emax);
end
theta = (I-1)/2;
x(I)=theta;
q1(I)=Edb;
end
% H-Plane Amplitude
for(theta = 0:0.5:360);
I = theta*2 + 1;
theta = theta*pi/180;
phi = 0;
kxp = k*sin(theta) + pi/a1;
kxdp = k*sin(theta) - pi/a1;
t1 = sqrt(1/(pi*k*R1))*(-k*b1/2);
t2 = sqrt(1/(pi*k*R1))*(k*b1/2);
t1p = sqrt(1/(pi*k*R2))*(-k*a1/2-kxp*R2);
t2p = sqrt(1/(pi*k*R2))*(k*a1/2-kxp*R2);
t1dp = sqrt(1/(pi*k*R2))*(-k*a1/2-kxdp*R2);
t2dp = sqrt(1/(pi*k*R2))*(k*a1/2-kxdp*R2);
I1 = .5*sqrt(pi*R2/k)*(exp(j*R2/(2*k)*kxp^2)*(Fresnel(t2p)-
Fresnel(t1p)) + exp(j*R2/(2*k)*kxdp^2)*(Fresnel(t2dp) -
Fresnel(t1dp)));
I2 = sqrt(pi*R1/k) * exp(j*R1/(2*k)*ky^2) * (Fresnel(t2) -
Fresnel(t1));
y(I) = (1 + cos(theta))*I1*I2;
y(I) = abs(y(I));
end
for(I = 1:721)
if(y(I) > Hmax)
Hmax = y(I);
end
end
for(I = 1:721)
if(y(I) <= 0)
Hdb = -100;
else
Hdb = 20*log10(abs(y(I))/Hmax);
end
theta = (I-1)/2;
x(I)=theta;
q2(I)=Hdb;
end
% Figure 1
ha=plot(x,q1); set(ha,'linestyle','-','linewidth',2);
hold on; hb=plot(x,q2,'r--'); set(hb,'linewidth',2);
42
xlabel('Theta (degrees)');
ylabel('Field Pattern (dB)');
title('Horn Analysis');
legend('E-Plane','H-Plane');
grid on;
axis([0 360 -60 0]);
% Figure 2
figure(2)
ht1=polar(x*pi/180,q1,'b-');
hold on;
ht2=polar(x*pi/180,q2,'r--');
set([ht1 ht2],'linewidth',2);
legend([ht1 ht2],{'E-plane','H-plane'});
title('Field patterns');
% Directivity Output
directivity = 10*log10(DP)
% Fresnel Subfunction
function[y] = Fresnel(x);
A(1) = 1.595769140;
A(2) = -0.000001702;
A(3) = -6.808508854;
A(4) = -0.000576361;
A(5) = 6.920691902;
A(6) = -0.016898657;
A(7) = -3.050485660;
A(8) = -0.075752419;
A(9) = 0.850663781;
A(10) = -0.025639041;
A(11) = -0.150230960;
A(12) = 0.034404779;
B(1) = -0.000000033;
B(2) = 4.255387524;
B(3) = -0.000092810;
B(4) = -7.780020400;
B(5) = -0.009520895;
B(6) = 5.075161298;
B(7) = -0.138341947;
B(8) = -1.363729124;
B(9) = -0.403349276;
B(10) = 0.702222016;
B(11) = -0.216195929;
B(12) = 0.019547031;
CC(1) = 0;
CC(2) = -0.024933975;
CC(3) = 0.000003936;
CC(4) = 0.005770956;
CC(5) = 0.000689892;
CC(6) = -0.009497136;
CC(7) = 0.011948809;
CC(8) = -0.006748873;
CC(9) = 0.000246420;
43
CC(10) = 0.002102967;
CC(11) = -0.001217930;
CC(12) = 0.000233939;
D(1) = 0.199471140;
D(2) = 0.000000023;
D(3) = -0.009351341;
D(4) = 0.000023006;
D(5) = 0.004851466;
D(6) = 0.001903218;
D(7) = -0.017122914;
D(8) = 0.029064067;
D(9) = -0.027928955;
D(10) = 0.016497308;
D(11) = -0.005598515;
D(12) = 0.000838386;
if(x==0)
y=0;
return
elseif(x<0)
x=abs(x);
x=(pi/2)*x^2;
F=0;
if(x<4)
for(k=1:12)
F=F+(A(k)+j*B(k))*(x/4)^(k-1);
end
y = F*sqrt(x/4)*exp(-j*x);
y = -y;
return
else
for(k=1:12)
F=F+(CC(k)+j*D(k))*(4/x)^(k-1);
end
y = F*sqrt(4/x)*exp(-j*x)+(1-j)/2;
y =-y;
return
end
else
x=(pi/2)*x^2;
F=0;
if(x<4)
for(k=1:12)
F=F+(A(k)+j*B(k))*(x/4)^(k-1);
end
y = F*sqrt(x/4)*exp(-j*x);
return
else
for(k=1:12)
F=F+(CC(k)+j*D(k))*(4/x)^(k-1);
end
y = F*sqrt(4/x)*exp(-j*x)+(1-j)/2;
44
return
end
end
OUTPUT :
directivity =
18.827820259174445
Horn Analysis
0
E-Plane
H-Plane
-10
-20
Field Pattern (dB)
-30
-40
-50
-60
0 50 100 150 200 250 300 350
Theta (degrees)
45
Field patterns
90
100 E-plane
120 60
80 H-plane
60
150 30
40
20
180 0
210 330
240 300
270
CONCLUSIONS :
46
Practical - 15
THEORY :
47
Chen and Cheng, applied King’s three-term current approximation and
devised procedures for optimizing the choices of the antenna lengths and
separations of Yagi-Uda arrays. The gains before and after optimization of
a six-element Yagi-Uda array were calculated with the functions yagi and
gain2s. The antenna radii were a = 0.003369λ. For the unoptimized case,
the antenna lengths and x-locations were in units of λ: L = [L1, L2, L3,
L4, L5, L6]= [0.510, 0.490, 0.430, 0.430, 0.430, 0.430] d = [x1, x2, x3,
x4, x5, x6]= [−0.25, 0, 0.310, 0.620, 0.930, 1.240]. The directors were
identical and equally spaced at spacing of 0.31λ. The computed directivity
and front/back ratio were 11 dB and 9.84 dB, respectively. The optimized
case has slightly different lengths and x-locations: L = [L1, L2, L3, L4, L5,
L6]= [0.476, 0.452, 0.436, 0.430, 0.434, 0.430] d = [x1, x2, x3, x4, x5,
x6]= [−0.25, 0, 0.289, 0.695, 1.018, 1.440]. The optimized directivity
was 12.54 dB and the forward/backward ratio 17.6 dB.
MATLAB PROGRAM :
% clear all;
clc;
L = [0.476, 0.452, 0.436, 0.430, 0.434, 0.430];
a = 0.003369 * [1,1,1,1,1,1];
d = [-0.25, 0, 0.289, 0.695, 1.018, 1.440];
[I,D,Rfb] = yagi(L,a,d);
[ge,gh,th] = gain2(L,d,I,360);
figure; dbz2(th,gh,30,40);
figure; dbp2(th,ge,30,40);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% yagi.m - simplified Yagi-Uda array design
%
% Usage: [I,D,Rfb] = yagi(L,a,d)
%
% L = dipole lengths (in wavelengths) = [L1,L2,..,LK]
% a = dipole diameters = [a1,a2,...,aK]
% d = dipole locations along x-axis = [d1,d2,...,dK]
%
% I = input currents on dipoles = [I1,I2,...,IK]
% D = directivity in absolute units
% Rfb = forward-backward ratio in absolute units
%
% notes: dipole 1 is the reflector,
% dipole 2 is the driving element,
% dipoles 3:K are the directors (K>=3)
%
% current on p-th dipole is assumed to be sinusoidal:
I(p)*sin(2*pi(L(p)/2 - z)),
% this assumption is approximately correct if all the
lengths are near lambda/2,
% none of the lengths should be a multiple of lambda.
%
48
% imput impedance of driven element is 1/I(2)
%
% the currents I can be passed to ARRAY2D to compute the
array gain
I = Z \ V; % solve Z*I = V
h = L/2;
for p=1:K,
A = A + I(p) * F(h(p),d(p),th,ph);
Af = Af + I(p) * F(h(p),d(p),pi/2,0); % forward
endfire
Ab = Ab + I(p) * F(h(p),d(p),pi/2,pi); % backward
endfire
end
A = A / Af;
for m=1:Nint,
49
g(:,m) = g(:,m).*sin(th); % sin(th) comes from
dOmega = sin(th)*dth*dph
end
% --------------------------------------------------------------
-------------------
k = 2*pi;
for m=1:length(ph),
A(:,m) = A(:,m) .* G;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50
% ge,gh = E-plane/H-plane gains at (N+1) polar or azimuthal
angles over [0,2*pi]
% th = (N+1) equally-spaced polar or azimuthal angles over
[0,2*pi] in radians
%
% notes: I = [I1,I2,...,IK] are the input currents on the K
antennas,
% the current distributions on the antennas are assumed
to sinusoidal,
% for example, on the p-th antenna, Ip(z) = Ip *
sin(k*(Lp/2-abs(z))).
%
% d is the matrix of the [x,y] locations of the antennas
and is Kx2, that is,
% d = [x1,y1; x2,y2; ...; xK,yK]. If the antennas are
along the x-axis then
% d is the vector of x-coordinates only and can be
entered either as a column
% or row vector, d=[x1,x2,...,xK].
%
% E-plane gain is evaluated at phi = ph0 for 0 <= theta
<= 2*pi. The range
% [0,pi] corresponds to the forward ph0-direction and the
range [pi,2*pi] to the
% backward (ph0+pi)-direction. The E-plane gain must be
plotted with DBP2 or ABP2.
%
% H-plane gain is evaluated at theta = pi/2 for 0 <= phi
<= 2*pi and must be
% plotted with DBZ2 or ABZ2.
%
% The input currents I can be obtained from the input
driving voltages
% V = [V1,V2,...,VK]' by I = Z\V, where Z is the mutual
impedance matrix
% obtained from IMPEDMAT, Z = impedmat(L,a,d), (a=antenna
diameters).
%
% for an isotropic array, use L=[0,0,...,0]
I = I(:); % U(th,phi)
expects I,L to be columns
L = L(:);
K = length(L);
51
if max(size(d))~=K,
error('d must have size Kx2 or Kx1 or 1xK');
end
if min(size(d))==1,
d = [d(:),zeros(K,1)]; % make d
into [x,y] pairs
end
ph0 = ph0*pi/180;
th = 0 : 2*pi/N : 2*pi;
for i=1:N+1,
ge(i) = U(L,d,I,th(i),ph0);
gh(i) = U(L,d,I,pi/2,th(i)); % here th is
the azimuthal angle
end
ge = ge/max(ge);
gh = gh/max(gh);
% --------------------------------------------------------------
--------------
k = 2*pi;
kx = k*sin(th)*cos(phi);
ky = k*sin(th)*sin(phi);
kz = k*cos(th);
x = d(:,1);
y = d(:,2);
A = (I./sin(pi*L)) .* (exp(j*kx*x).*exp(j*ky*y)); % K-
dimensional array factor
if sin(th)==0, % gains of
antenna elements
F = zeros(length(L),1); % F is K-
dimensional column
else
F = (cos(k*L*cos(th)/2) - cos(k*L/2)) / sin(th);
end
if max(L)==0, % isotropic
array case
F = ones(K,1);
52
end
G = abs(F'*A)^2;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53
gdb = g .* (g > eps) + eps * (g <= eps); % make g=0
into g=eps, avoids -Inf's
gdb = 10 * log10(gdb);
gdb = gdb .* (gdb > -Rm) + (-Rm) * (gdb <= -Rm); % lowest
is Rm dB
gdb = (gdb + Rm)/Rm; % scale to
unity max.
x = gdb .* cos(phi);
y = gdb .* sin(phi);
N0 = 400;
phi0 = (0:N0) * 2*pi / N0;
x0 = sin(phi0); % gain
circles
y0 = cos(phi0);
axis square;
R = 1.1;
axis([-R, R, -R, R]);
axis off;
line([0,0],[-1,1]);
line([-1,1],[0,0]);
if rays == 45,
x1 = 1/sqrt(2); y1 = 1/sqrt(2);
line([-x1,x1], [-y1,y1], 'linestyle', sty);
line([-x1,x1], [y1,-y1], 'linestyle', sty);
54
text(1.04*x1, y1, '45^o', 'fontsize', Nf, 'horiz',
'left', 'vert', 'bottom');
text(0.97*x1, -0.97*y1, '-45^o', 'fontsize', Nf, 'horiz',
'left', 'vert', 'top');
text(-0.97*x1, 1.02*y1, '135^o', 'fontsize', Nf, 'horiz',
'right', 'vert', 'bottom');
text(-1.01*x1, -1.01*y1, '-135^o', 'fontsize', Nf, 'horiz',
'right', 'vert', 'top');
else
x1 = cos(pi/3); y1 = sin(pi/3);
x2 = cos(pi/6); y2 = sin(pi/6);
line([-x1,x1], [-y1,y1], 'linestyle', sty);
line([-x2,x2], [-y2,y2], 'linestyle', sty);
line([-x2,x2], [y2,-y2], 'linestyle', sty);
line([-x1,x1], [y1,-y1], 'linestyle', sty);
s1 = sprintf('-%d', 0.25*Rm);
s2 = sprintf('-%d', 0.50*Rm);
s3 = sprintf('-%d', 0.75*Rm);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55
% dbp2.m - polar gain plot in dB - 2*pi angle range
%
% Usage: h = dbp2(th, g, rays, Rm, width)
% h = dbp2(th, g) (equivalent to rays=30,
Rm=40, width=1)
% h = dbp2(th, g, rays) (equivalent to Rm=40,
width=1)
% h = dbp2(th, g, rays, Rm) (equivalent to width=1)
%
% th = polar angles over [0,pi]
% g = gain at th (g is in absolute units)
% rays = ray grid at 30 degree (default) or at 45 degree angles
% Rm = minimum dB level (Rm = 40 dB by default)
% width = linewidth of gain curve (width=1 by default)
%
% h = handle to use for adding more gains and legends (see
DBADD)
%
% examples: dbp2(th, g); default (30-degree lines
and 40-dB scale)
% dbp2(th, g, 45); use 45-degree grid lines
% dbp2(th, g, 30, 60); 30-degree rays and 60-dB
scale
% dbp2(th, g, 30, 60, 1.5); use thicker line for
gain
%
% notes: makes polar plot of gdb=10*log10(g) versus th,
%
%
% max-g is assumed to be unity (e.g., as in the output of
ARRAY),
% grid circles at Rm/4, 2Rm/4, 3Rm/4 are added and
labeled,
% for EPS output, use width=1.50 for thicker gain line
(thinnest width=0.75)
%
56
gdb = gdb .* (gdb > -Rm) + (-Rm) * (gdb <= -Rm); % lowest is
-Rm dB
gdb = (gdb + Rm)/Rm; % scale to
unity max.
N0 = 400;
phi0 = (0:N0) * 2*pi / N0;
x0 = sin(phi0); % gain
circles
y0 = cos(phi0);
axis square;
R = 1.1;
axis([-R, R, -R, R]);
axis off;
line([0,0],[-1,1]);
line([-1,1],[0,0]);
if rays == 45,
x1 = 1/sqrt(2); y1 = 1/sqrt(2);
line([-x1,x1], [-y1,y1], 'linestyle', sty);
line([-x1,x1], [y1,-y1], 'linestyle', sty);
57
text(1.04*x1, y1, '45^o', 'fontsize', Nf, 'horiz',
'left', 'vert', 'bottom');
text(0.98*x1, -0.98*y1, '135^o', 'fontsize', Nf, 'horiz',
'left', 'vert', 'top');
text(-0.97*x1, 1.02*y1, '45^o', 'fontsize', Nf, 'horiz',
'right', 'vert', 'bottom');
text(-1.01*x1, -1.01*y1, '135^o', 'fontsize', Nf, 'horiz',
'right', 'vert', 'top');
else
x1 = cos(pi/3); y1 = sin(pi/3);
x2 = cos(pi/6); y2 = sin(pi/6);
line([-x1,x1], [-y1,y1], 'linestyle', sty);
line([-x2,x2], [-y2,y2], 'linestyle', sty);
line([-x2,x2], [y2,-y2], 'linestyle', sty);
line([-x1,x1], [y1,-y1], 'linestyle', sty);
s1 = sprintf('-%d', 0.25*Rm);
s2 = sprintf('-%d', 0.50*Rm);
s3 = sprintf('-%d', 0.75*Rm);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58
OUTPUT :
90o 0o
120o 60o 30o 30o
o -30 -20 -10 0o 90o -30 -20 -10 90o
180 dB dB
CONCLUSIONS :
59
Practical - 16
AIM :To write a program to plot the radiation pattern for Binomial
antenna array.
THEORY :
60
MATLAB PROGRAM :
% tic;
clear;
clc;
%%Intialisation
% AF = zeros(1,360);
% AE = zeros(1,360);
%%ACCEPTING INPUTS..
AF=abs(AF);
%%PLOTTING...
theta= linspace(0,2*pi,360);
subplot(221);
polar(theta,AE)
subplot(222);
polar(theta,AF)
subplot(2,2,[3,4]);
polar(theta,AE.*AF)
legend('Binomial array','Location','SouthEastOutside')
toc;
61
OUTPUT :
90 1 90 100
120 60 120 60
150 0.5 30 150 50 30
180 0 180 0
90 100
120 60
150 50 30
180 0
210 330
240 300 Binomial array
270
CONCLUSIONS :
62
Practical - 17
THEORY :
63
MATLAB PROGRAM :
clear;
clc;
tic;
%%Initialising
AF = zeros(1,360);
AE = zeros(1,360);
theta=1:360;
%%ACCEPTING INPUTS..
num= ((1./N).*sind(N.*c.*cosd(theta)));
den= sind(c.*cosd(theta));
AF = num./den;
AE = (cosd(90.*cosd(theta)))./sind(theta);
AF=abs(AF);
%%PLOTTING...
theta= linspace(0,2*pi,360);
subplot(221);
polar(theta,AE)
subplot(222);
polar(theta,AF)
subplot(2,2,[3,4]);
polar(theta,AE.*AF)
legend('Broadside array','Location','SouthEastOutside')
toc;
64
OUTPUT :
90 1 90 1
120 60 120 60
150 0.5 30 150 0.5 30
180 0 180 0
90 1
120 60
150 0.5 30
180 0
210 330
240 300 Broadside array
270
CONCLUSIONS :
65
Practical - 18
AIM : To write a program to plot radiation pattern for Endfire antenna
array.
THEORY :
66
MATLAB PROGRAM :
% clear;
clc;
tic;
%%Initialisation
%AF = zeros(1,360);
%AE = zeros(1,360);
theta=1:360;
%%ACCEPTING INPUTS..
num= ((1./N).*sind(N.*c.*(cosd(theta)+1)));
den= sind(c.*(cosd(theta)+1));
AF= num./den;
AE= (cosd(90.*cosd(theta-90)))./sind(theta-90);
AF=abs(AF);
%%PLOTTING...
theta= linspace(0,2*pi,360);
subplot(221);
polar(theta,AE)
subplot(222);
polar(theta,AF)
subplot(2,2,[3,4]);
polar(theta,AE.*AF)
legend('Endfire array','Location','SouthEastOutside')
toc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
OUTPUT :
90 1 90 1
120 60 120 60
150 0.5 30 150 0.5 30
180 0 180 0
90 1
120 60
150 0.5 30
180 0
210 330
240 300 Endfire array
270
CONCLUSIONS :
68
Practical - 19
THEORY :
69
MATLAB PROGRAM :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MATLAB code for Binomial Array in 3D
%% Pre-initialisation
clear;
clc;
close all;
%% Accepting inputs
tic;
k = 2*pi;
beta = 0;
[theta phi]=meshgrid(linspace(0,2*pi,180));
AF = (1+exp(1j.*(psi))).^(N-1);
AF = AF - min(min(AF));
AE = sqrt(1- ((sin(theta).^2).*(cos(phi).^2)));
AP = AF .* AE;
toc;
%% Plotting results
[x1,y1,z1] = sph2cart(phi,theta,abs(AE));
surf(x1,y1,z1,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
70
legend('Array Element','Location','SouthEastOutside')
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
axis image
figure
[x2,y2,z2] = sph2cart(phi,theta,abs(AF));
surf(x2,y2,z2,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
legend('Array Factor','Location','SouthEastOutside')
axis image
figure
[x3,y3,z3] = sph2cart(phi,theta,abs(AP));
surf(x3,y3,z3,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
legend('Array Pattern','Location','SouthEastOutside')
axis image
OUTPUT :
71
CONCLUSIONS :
72
Practical - 20
THEORY :
73
MATLAB PROGRAM :
%% Accepting inputs
tic;
num = ((1./N).*sin(N.*c.*cos(theta)));
den = sin(c.*cos(theta));
AF = num./den;
AF = AF - min(min(AF));
AE = sqrt(1- ((sin(theta).^2).*(cos(phi).^2)));
AP = AF .* AE;
toc;
%% Plotting results
[x1,y1,z1] = sph2cart(phi,theta,AE);
surf(x1,y1,z1,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
legend('Array Element','Location','SouthEastOutside')
axis image
74
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
figure
[x2,y2,z2] = sph2cart(phi,theta,AF);
surf(x2,y2,z2,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
legend('Array Factor','Location','SouthEastOutside')
axis image
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
figure
[x3,y3,z3] = sph2cart(phi,theta,AP);
surf(x3,y3,z3,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
axis image
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
75
OUTPUT :
CONCLUSIONS :
76
Practical - 21
THEORY :
77
MATLAB PROGRAM :
%% Pre-initialisation
clear;
clc;
close all;
%% Accepting inputs
tic;
num = ((1./N).*sin(N.*c.*(cos(theta)+1)));
den = sin(c.*(cos(theta)+1));
AF = num./den;
AF = AF - min(min(AF));
AE = sqrt(1- ((sin(theta).^2).*(cos(phi).^2)));
AP = AF .* AE;
toc;
%% Plotting results
[x1,y1,z1] = sph2cart(phi,theta,AE);
surf(x1,y1,z1,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
legend('Array Element','Location','SouthEastOutside')
78
axis image
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
figure
[x2,y2,z2] = sph2cart(phi,theta,AF);
surf(x2,y2,z2,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
legend('Array Factor','Location','SouthEastOutside')
axis image
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
figure
[x3,y3,z3] = sph2cart(phi,theta,AP);
surf(x3,y3,z3,'FaceLighting','phong',...
'LineStyle','none',...
'FaceColor',[1 0 0]);
axis image
light('Style','local',...
'Position',[-10.162701816704 -0.924193626363743
14.9951905283833]);
OUTPUT :
79
CONCLUSIONS :
80
Practical - 22
THEORY :
81
MATLAB PROGRAM :
% Name: RadPattern3D
% Description: 3-D Radiation Pattern of Dipole Antenna
% Reference Constantine A.Balanis, Antenna Theory
% Analysis And Design , 3rd Edition, page 173, eq. 4-64
%*************************************************************
*************
%Usage:
%This program plots 3-D radiation Pattern of a Dipole Antenna
%All the parameters are entered in the M-File
clear all
%converting to dB scale
U1_1=10*log10(U1);
82
% converting to spherical coordinates
[x,y,z]=sph2cart(phi,theta,U);
%plotting routine
surf(x,y,z)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OUTPUT :
30
20
10
-10
-20
-30
40
20 40
0 20
0
-20 -20
-40 -40
CONCLUSIONS :
83