PDF of Lab Solutions

Scilab Manual for
Antenna Wave Propagation
by Mrs Nandini Ammanagi
Electronics Engineering
VESIT1
Solutions provided by
Mrs. Nandini Ammanagi
Electronics Engineering
V.E.S.I.T.
June 17, 2017
1 Funded
by a grant from the National Mission on Education through ICT,
http://spoken-tutorial.org/NMEICT-Intro. This Scilab Manual and Scilab codes
written in it can be downloaded from the ”Migrated Labs” section at the website
http://scilab.in
1
Contents
List of Scilab Solutions
3
1 SCILAB CODE FOR PATTERN MULTIPLICATION OF
TWO INFINITESIMAL DIPOLES (given d=/2,=- /2)
5
2 SCILAB CODE FOR ARRAY FACTOR PATTERN OF N
ELEMENT UNIFORM AMPLITUD EENDFIRE ARRAY 12
3 SCILAB CODE FOR ARRAY FACTOR PATTERN OF N
ELEMENT UNIFORM AMPLITUDE BROADSIDE ARRAY
15
4 SCILAB CODE FOR ARRAY FACTOR PATTERN OF N
ELEMENT DOLPH TSCHEBYSCHEFF ARRAY
18
5 SCILAB CODE FOR ARRAY FACTOR PATTERN OF N
ELEMENT BIONOMIAL ARRAY
21
2
List of Experiments
Solution 1.01
patternmult . .
Solution 1.02
patternmult . .
Solution 1.03
patternmult . .
Solution 2.01
endfirearray . .
Solution 3.01
broadsidearray
Solution 4.01
dolpharray . .
Solution 5.01
binomialarray .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
6
9
12
15
18
21
List of Figures
1.1
1.2
1.3
patternmult . . . . . . . . . . . . . . . . . . . . . . . . . . .
patternmult . . . . . . . . . . . . . . . . . . . . . . . . . . .
patternmult . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
9
11
2.1
endfirearray . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.1
broadsidearray
. . . . . . . . . . . . . . . . . . . . . . . . .
17
4.1
dolpharray . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
5.1
binomialarray . . . . . . . . . . . . . . . . . . . . . . . . . .
22
4
Experiment: 1
SCILAB CODE FOR
PATTERN
MULTIPLICATION OF TWO
INFINITESIMAL DIPOLES
(given d=/2,=- /2)
Scilab code Solution 1.01 patternmult
1
// d e f i n i n g
lambda =1;
2
3 d = lambda /4;
between the d i p o l e s=
// d i s t a n c e
/4
4
5 k =(2* %pi ) / lambda ;
k=2
6
7
// d e f i n i n g c o n s t a n t
/
beta = - ( %pi /2) ;
//
d e f i n i n g beta as phase d i f f e r e n c e between the
dipoles
5
8
9
10
11
12
13
// t h e t a
theta =0:0.01:2* %pi ;
v a r i e s from 0
t o 360
subplot (2 ,2 ,1) ;
//
polarplot ( theta , abs ( cos ( theta ) ) ) ;
to plot s i n g l e element pattern
14
15 title ( ’ELEMENT PATTERN ’ ) ;
16
17 AF = cos (0.5*( d * k * cos ( theta ) + beta ) )
//
E x p r e s s i o n f o r Array f a c t o r
18
19
20
21
22
23
24
25
26
27
28
29
subplot (2 ,2 ,2) ;
polarplot ( theta , abs ( AF ) ) ;
// t o p l o t a r r a y f a c t o r p a t t e r n
title ( ’ARRAY FACTOR PATTERN ’ ) ;
subplot (2 ,2 ,3.5) ;
polarplot ( theta , abs ( cos ( theta ) ) .* abs ( AF ) ) ;
plot t o t a l f i e l d of the array
// t o
title ( ’TOTAL ARRAY PATTERN ’ ) ;
Scilab code Solution 1.02 patternmult
1
// d e f i n i n g
lambda =1;
2
6
Figure 1.1: patternmult
7
// d i s t a n c e
3 d = lambda /4;
between the d i p o l e s=
/4
4
5 k =(2* %pi ) / lambda ;
k=2
6
7
8
9
10
11
12
13
// d e f i n i n g c o n s t a n t
/
beta = 0;
// d e f i n i n g b e t a
as phase d i f f e r e n c e between the d i p o l e s
// t h e t a
theta =0:0.01:2* %pi ;
v a r i e s from 0
t o 360
subplot (2 ,2 ,1) ;
//
polarplot ( theta , abs ( cos ( theta ) ) ) ;
to plot s i n g l e element pattern
14
15 title ( ’ELEMENT PATTERN ’ ) ;
16
17 AF = cos (0.5*( d * k * cos ( theta ) + beta ) )
//
E x p r e s s i o n f o r Array f a c t o r
18
19
20
21
22
23
24
25
26
27
28
29
subplot (2 ,2 ,2) ;
polarplot ( theta , abs ( AF ) ) ;
// t o p l o t a r r a y f a c t o r p a t t e r n
title ( ’ARRAY FACTOR PATTERN ’ ) ;
subplot (2 ,2 ,3.5) ;
polarplot ( theta , abs ( cos ( theta ) ) .* abs ( AF ) ) ;
plot t o t a l f i e l d of the array
title ( ’TOTAL ARRAY PATTERN ’ ) ;
8
// t o
Figure 1.2: patternmult
Scilab code Solution 1.03 patternmult
1
// d e f i n i n g
lambda =1;
2
3 d = lambda /4;
between the d i p o l e s=
// d i s t a n c e
/4
4
5 k =(2* %pi ) / lambda ;
// d e f i n i n g c o n s t a n t
9
k=2
6
7
8
9
10
11
12
13
/
beta = 0;
// d e f i n i n g b e t a
as phase d i f f e r e n c e between the d i p o l e s
theta =0:0.01:2* %pi ;
v a r i e s from 0
t o 360
// t h e t a
subplot (2 ,2 ,1) ;
//
polarplot ( theta , abs ( cos ( theta ) ) ) ;
to plot s i n g l e element pattern
14
15 title ( ’ELEMENT PATTERN ’ ) ;
16
17 AF = cos (0.5*( d * k * cos ( theta ) + beta ) )
//
E x p r e s s i o n f o r Array f a c t o r
18
19
20
21
22
23
24
25
26
27
28
29
subplot (2 ,2 ,2) ;
polarplot ( theta , abs ( AF ) ) ;
// t o p l o t a r r a y f a c t o r p a t t e r n
title ( ’ARRAY FACTOR PATTERN ’ ) ;
subplot (2 ,2 ,3.5) ;
polarplot ( theta , abs ( cos ( theta ) ) .* abs ( AF ) ) ;
plot t o t a l f i e l d of the array
title ( ’TOTAL ARRAY PATTERN ’ ) ;
10
// t o
Figure 1.3: patternmult
11
Experiment: 2
SCILAB CODE FOR ARRAY
FACTOR PATTERN OF N
ELEMENT UNIFORM
AMPLITUD EENDFIRE
ARRAY
Scilab code Solution 2.01 endfirearray
// Number o f
1 n =10;
Elements
2
3
// d e f i n i n g
lambda =1;
4
5 d = lambda /4;
between the d i p o l e s=
// d i s t a n c e
/4
6
7 k =(2* %pi ) / lambda ;
k=2
8
9
// d e f i n i n g c o n s t a n t
/
//
theta =0.0001:0.01:2* %pi ;
12
t h e t a v a r i e s from 0
10
11
t o 360
//
beta1 = -( k * d ) ;
kd
12
13 psi = k * d .* cos ( theta ) + beta1 ;
1 =−
//
P r o g r e s s i v e Phase
14
15 AF = sin ( n .* psi /2) ./( n * sin ( psi /2) ) ;
//
E x p r e s s i o n f o r Array F a c t o r
16
17
18
19
// p l o t f o r
polarplot ( theta , AF ) ;
=−kd
//
beta2 = k * d ;
kd
20
21 psi = k * d .* cos ( theta ) + beta2 ;
2=
//
P r o g r e s s i v e Phase
22
23 AF = sin ( n .* psi /2) ./( n * sin ( psi /2) ) ;
//
E x p r e s s i o n f o r Array F a c t o r
24
25
26
27
28
29
xset ( ’ l i n e s t y l e ’ ,3)
// p l o t
polarplot ( theta , AF ) ;
for
=kd
title ( ”POLAR PLOT FOR ARRAY FACTOR PATTERN FOR N
ELEMENT UNIFORM AMPLITUDE END FIRE ARRAY CASE : N
=10 , d=
/4 ,
=+−(Kd) ” )
30
31 h1 = legend ( ’
=Kd ’ , ’
=−Kd ’ )
13
Figure 2.1: endfirearray
14
Experiment: 3
SCILAB CODE FOR ARRAY
FACTOR PATTERN OF N
ELEMENT UNIFORM
AMPLITUDE BROADSIDE
ARRAY
Scilab code Solution 3.01 broadsidearray
// Number o f
1 n =10;
Elements
2
3
// d e f i n i n g
lambda =1;
4
5 d1 = lambda /4;
// d i s t a n c e
b e t w e e n t h e d i p o l e s d1=
6
7 k =(2* %pi ) / lambda ;
k=2
8
9
/4
// d e f i n i n g c o n s t a n t
/
//
theta =0.0001:0.01:2* %pi ;
15
t h e t a v a r i e s from 0
t o 360
10
11 beta =0;
12
13 psi = k * d1 * cos ( theta ) + beta ;
//
=0
//
P r o g r e s s i v e Phase
14
15 AF = sin ( n .* psi /2) ./( n * sin ( psi /2) ) ;
//
E x p r e s s i o n f o r Array F a c t o r
16
17
// p l o t f o r
polarplot ( theta , AF ) ;
d1=
/4
18
19 d2 = lambda ;
// d i s t a n c e
b e t w e e n t h e d i p o l e s d2=
20
21 psi = k * d2 * cos ( theta ) + beta ;
//
P r o g r e s s i v e Phase
22
23 AF = sin ( n .* psi /2) ./( n * sin ( psi /2) ) ;
//
E x p r e s s i o n f o r Array F a c t o r
24
25
26
27
28
29
xset ( ’ l i n e s t y l e ’ ,3)
// p l o t
polarplot ( theta , AF ) ;
f o r d2=
title ( ”POLAR PLOT FOR ARRAY FACTOR PATTERN FOR N
ELEMENT UNIFORM AMPLITUDE BROADSIDE ARRAY CASE : N
=10 , d=
/4 and d=
,
=0” )
30
31 h1 = legend ( ’ d=
/4 ’ , ’ d=
16
’)
Figure 3.1: broadsidearray
17
Experiment: 4
SCILAB CODE FOR ARRAY
FACTOR PATTERN OF N
ELEMENT DOLPH
TSCHEBYSCHEFF ARRAY
Scilab code Solution 4.01 dolpharray
1
// d e f i n i n g
lambda =1;
2
3 d1 = lambda /4;
// d i s t a n c e
b e t w e e n t h e d i p o l e s d1=
4
5
/4
// Theta v a r i e s from 0
theta =0:0.01:2* %pi ;
t o 360
6
7 u1 =( %pi * d1 / lambda ) .* cos ( theta ) ;
d1/
// u1 =
∗cos
8
9 AF1 =2.798.* cos ( u1 ) +2.496.* cos (3.* u1 ) +1.974.* cos (5.*
10
u1 ) +1.357.* cos (7.* u1 ) + cos (9.* u1 ) ;
// e x p r e s s i o n f o r a r r a y f a c t o r
18
p a t t e r n f o r N=10 , 2M=10
11
12 p = get ( ” h d l ” ) ;
// g e t h a n d l e
on c u r r e n t e n t i t y ( h e r e t h e p o l y l i n e e n t i t y )
13
14 p . line_style =1;
15
16 polarplot ( theta , AF1 )
17
18 d2 = lambda /2;
// p l o t p o l a r p l o t
// d i s t a n c e
b e t w e e n t h e d i p o l e s d2=
/2
19
20 u2 =( %pi * d2 / lambda ) .* cos ( theta ) ;
d2/
// u2 =
∗cos
21
22 AF2 =2.798.* cos ( u2 ) +2.496.* cos (3.* u2 ) +1.974.* cos (5.*
23
u2 ) +1.357.* cos (7.* u2 ) + cos (9.* u2 ) ;
// e x p r e s s i o n f o r a r r a y f a c t o r
p a t t e r n f o r N=10 , 2M=10
24
25 p . line_style =8;
26
27 title ( ’POLAR PLOT OF ARRAY FACTOR PATTERN OF N
ELEMENT DOLPH TSCHEBYSCHEFF ARRAY CASE : N=10 and
d =
/4 ,
/2 ’ ) ;
28
29
30 polarplot ( theta , AF2 )
31
32 hl = legend ( ’ d =
/4 ’ , ’ d =
// p l o t p o l a r p l o t
/2 ’ ) ;
19
Figure 4.1: dolpharray
20
Experiment: 5
SCILAB CODE FOR ARRAY
FACTOR PATTERN OF N
ELEMENT BIONOMIAL
ARRAY
Scilab code Solution 5.01 binomialarray
1
2
3
// t h e t a
theta =0:0.001:2* %pi ;
v a r i e s from 0
t o 360
// d e f i n i n g
lambda =1;
4
5 d1 = lambda /4;
// d i s t a n c e
b e t w e e n t h e d i p o l e s d1=
/4
6
7 u1 =( %pi * d1 / lambda ) .* cos ( theta ) ;
d1/
// u1 =
∗cos
8
9 AF1 =126.* cos ( u1 ) +84.* cos (3* u1 ) +36.* cos (5* u1 ) +9.* cos
21
Figure 5.1: binomialarray
22
(7* u1 ) + cos (9* u1 ) ; // e x p r e s s i o n f o r
// a r r a y f a c t o r N=10 , N=2M, AF= a n c o s ( 2 n −1)u
f o r n=1 t o M
10 p = get ( ” h d l ” ) ;
// g e t h a n d l e on
current e n t i t y ( here the p o l y l i n e e n t i t y )
11
12 p . line_style =1;
13
14 polarplot ( theta , AF1 )
15
16 d2 = lambda /2
d i p o l e s d2=
// p o l a r p l o t o f AF
// d i s t a n c e b e t w e e n t h e
/2
17
18 u2 =( %pi * d2 / lambda ) .* cos ( theta ) ;
d2/
// u2 =
∗cos
19
20 AF2 =126.* cos ( u2 ) +84.* cos (3* u2 ) +36.* cos (5* u2 ) +9.* cos
(7* u2 ) + cos (9* u2 ) ;
// e x p r e s s i o n f o r
//
21
array
factor
22
23 p . line_style =8;
24
25 polarplot ( theta , AF2 )
26
27
28 d3 =3* lambda /4
d i p o l e s d3= 3
// p o l a r p l o t o f AF
// d i s t a n c e b e t w e e n t h e
/4
29
30 u3 =( %pi * d3 / lambda ) .* cos ( theta ) ;
u3 =
d3/
//
∗cos
31
32 AF3 =126.* cos ( u3 ) +84.* cos (3* u3 ) +36.* cos (5* u3 ) +9.* cos
(7* u3 ) + cos (9* u3 ) ;
// e x p r e s s i o n f o r
23
//
33
array
factor
34
35 p . line_style =2;
36
37 polarplot ( theta , AF3 )
// p o l a r p l o t o f AF
38
39 d4 = lambda
// d i s t a n c e
b e t w e e n t h e d i p o l e s d4=
40
41 u4 =( %pi * d4 / lambda ) .* cos ( theta ) ;
=
d4/
// u4
∗cos
42
43 AF4 =126.* cos ( u4 ) +84.* cos (3* u4 ) +36.* cos (5* u4 ) +9.* cos
// e x p r e s s i o n f o r
// a r r a y
factor
(7* u4 ) + cos (9* u4 ) ;
44
45
46 p . line_style =6;
47
48 polarplot ( theta , AF4 )
// p o l a r p l o t o f
AF
49
50
title ( ’POLAR PLOT OF ARRAY FACTOR PATTERN OF N
ELEMENT BINOMIAL ARRAY CASE : N=10 and d =
/2 , 3
/4 ,
’ );
51
52 hl = legend ( ’ d =
/4 ’ ; ’ d =
’ );
24
/2 ’ ; ’ d = 3
/4 ,
/4 ’ ; ’ d =