You are on page 1of 123

Scilab Textbook Companion for

Electronic Communication Systems


by R. Blake1

Created by
Aparna Bobade
B.E.
Electronics Engineering
Ramdeobaba College of Engg. & Management
College Teacher
Pradip Selokar
Cross-Checked by

July 17, 2017

1 Funded by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the ”Textbook Companion Project”
section at the website http://scilab.in
Book Description

Title: Electronic Communication Systems

Author: R. Blake

Publisher: Delmer Cengage Learning

Edition: 2

Year: 2002

ISBN: 978-81-315-0307-2

1
Scilab numbering policy used in this document and the relation to the
above book.

Exa Example (Solved example)

Eqn Equation (Particular equation of the above book)

AP Appendix to Example(Scilab Code that is an Appednix to a particular


Example of the above book)

For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

2
Contents

List of Scilab Codes 4

1 Introduction to communication system 5

2 Radio Frequency Circuits 12

3 The Amplitude Modulation 19

4 Angle Modulation 24

5 Transmitters 31

6 Receivers 37

7 Digital communication 42

8 The Telephone System 46

9 Data Transmission 48

12 Digital Modulation and Modems 50

13 Multiplexing and Multiple Access Techniques 54

14 Transmission Lines 58

3
15 Radio Wave Propogation 68

16 Antennas 74

17 Microwave Devices 79

18 Terrestrial Microwave Communication system 87

19 Television 93

20 Satellite Communication 99

21 Cellular Radio 105

22 Personal Communication Systems 108

23 Paging and Wireless Data Networking 109

24 Fiber Optics 111

25 Fiber Optic Systems 115

4
List of Scilab Codes

Exa 1.1 example 1 . . . . . . . . . . . . . . . . . . . 5


Exa 1.4 example 4 . . . . . . . . . . . . . . . . . . . 6
Exa 1.5 example 5 . . . . . . . . . . . . . . . . . . . 6
Exa 1.6 example 6 . . . . . . . . . . . . . . . . . . . 7
Exa 1.7 example 7 . . . . . . . . . . . . . . . . . . . 7
Exa 1.8 example 8 . . . . . . . . . . . . . . . . . . . 8
Exa 1.9 example 9 . . . . . . . . . . . . . . . . . . . 8
Exa 1.10 example 10 . . . . . . . . . . . . . . . . . . 9
Exa 1.11 example 11 . . . . . . . . . . . . . . . . . . 9
Exa 1.12 example 12 . . . . . . . . . . . . . . . . . . 9
Exa 1.13 example 13 . . . . . . . . . . . . . . . . . . 10
Exa 2.1 example 1 . . . . . . . . . . . . . . . . . . . 12
Exa 2.2 example 2 . . . . . . . . . . . . . . . . . . . 12
Exa 2.3 example 3 . . . . . . . . . . . . . . . . . . . 13
Exa 2.4 example 4 . . . . . . . . . . . . . . . . . . . 14
Exa 2.5 example 5 . . . . . . . . . . . . . . . . . . . 14
Exa 2.7 example 6 . . . . . . . . . . . . . . . . . . . 15
Exa 2.8 example 7 . . . . . . . . . . . . . . . . . . . 15
Exa 2.9 example 8 . . . . . . . . . . . . . . . . . . . 16
Exa 2.10 example 9 . . . . . . . . . . . . . . . . . . . 17
Exa 2.11 example 10 . . . . . . . . . . . . . . . . . . 17
Exa 3.1 example 1 . . . . . . . . . . . . . . . . . . . 19
Exa 3.2 example 2 . . . . . . . . . . . . . . . . . . . 19
Exa 3.3 example 3 . . . . . . . . . . . . . . . . . . . 20
Exa 3.4 example 4 . . . . . . . . . . . . . . . . . . . 20
Exa 3.6 example 5 . . . . . . . . . . . . . . . . . . . 21
Exa 3.7 example 6 . . . . . . . . . . . . . . . . . . . 21
Exa 3.8 example 7 . . . . . . . . . . . . . . . . . . . 21

5
Exa 3.9 example 8 . . . . . . . . . . . . . . . . . . . 22
Exa 3.10 example 9 . . . . . . . . . . . . . . . . . . . 22
Exa 3.11 example 10 . . . . . . . . . . . . . . . . . . 23
Exa 4.1 example 1 . . . . . . . . . . . . . . . . . . . 24
Exa 4.2 example 2 . . . . . . . . . . . . . . . . . . . 25
Exa 4.3 example 3 . . . . . . . . . . . . . . . . . . . 25
Exa 4.4 example 4 . . . . . . . . . . . . . . . . . . . 26
Exa 4.6 example 5 . . . . . . . . . . . . . . . . . . . 26
Exa 4.7 example 6 . . . . . . . . . . . . . . . . . . . 27
Exa 4.9 example 7 . . . . . . . . . . . . . . . . . . . 29
Exa 4.10 example 10 . . . . . . . . . . . . . . . . . . 29
Exa 5.2 example 1 . . . . . . . . . . . . . . . . . . . 31
Exa 5.3 example 2 . . . . . . . . . . . . . . . . . . . 31
Exa 5.4 example 3 . . . . . . . . . . . . . . . . . . . 32
Exa 5.5 example 4 . . . . . . . . . . . . . . . . . . . 33
Exa 5.6 example 5 . . . . . . . . . . . . . . . . . . . 33
Exa 5.7 example 6 . . . . . . . . . . . . . . . . . . . 33
Exa 5.8 example 7 . . . . . . . . . . . . . . . . . . . 34
Exa 5.9 example 8 . . . . . . . . . . . . . . . . . . . 34
Exa 5.10 example 9 . . . . . . . . . . . . . . . . . . . 35
Exa 5.11 example 10 . . . . . . . . . . . . . . . . . . 36
Exa 6.1 example 1 . . . . . . . . . . . . . . . . . . . 37
Exa 6.4 example 2 . . . . . . . . . . . . . . . . . . . 37
Exa 6.5 example 3 . . . . . . . . . . . . . . . . . . . 38
Exa 6.6 example 4 . . . . . . . . . . . . . . . . . . . 38
Exa 6.7 example 5 . . . . . . . . . . . . . . . . . . . 39
Exa 6.8 example 6 . . . . . . . . . . . . . . . . . . . 39
Exa 6.9 example 7 . . . . . . . . . . . . . . . . . . . 40
Exa 6.10 example 8 . . . . . . . . . . . . . . . . . . . 40
Exa 6.11 example 9 . . . . . . . . . . . . . . . . . . . 41
Exa 7.1 example 1 . . . . . . . . . . . . . . . . . . . 42
Exa 7.2 example 2 . . . . . . . . . . . . . . . . . . . 43
Exa 7.3 example 3 . . . . . . . . . . . . . . . . . . . 43
Exa 7.4 example 4 . . . . . . . . . . . . . . . . . . . 44
Exa 7.5 example 5 . . . . . . . . . . . . . . . . . . . 44
Exa 7.6 example 6 . . . . . . . . . . . . . . . . . . . 44
Exa 8.3 example 1 . . . . . . . . . . . . . . . . . . . 46
Exa 8.5 example 2 . . . . . . . . . . . . . . . . . . . 46

6
Exa 8.6 example 3 . . . . . . . . . . . . . . . . . . . 47
Exa 9.2 example 1 . . . . . . . . . . . . . . . . . . . 48
Exa 9.6 example 2 . . . . . . . . . . . . . . . . . . . 48
Exa 12.1 example 1 . . . . . . . . . . . . . . . . . . . 50
Exa 12.2 example 2 . . . . . . . . . . . . . . . . . . . 51
Exa 12.3 example 3 . . . . . . . . . . . . . . . . . . . 51
Exa 12.4 example 4 . . . . . . . . . . . . . . . . . . . 52
Exa 12.5 example 5 . . . . . . . . . . . . . . . . . . . 52
Exa 12.6 example 6 . . . . . . . . . . . . . . . . . . . 52
Exa 13.1 example 1 . . . . . . . . . . . . . . . . . . . 54
Exa 13.2 example 2 . . . . . . . . . . . . . . . . . . . 55
Exa 13.3 example 3 . . . . . . . . . . . . . . . . . . . 56
Exa 13.4 example 4 . . . . . . . . . . . . . . . . . . . 56
Exa 13.5 example 5 . . . . . . . . . . . . . . . . . . . 56
Exa 14.1 example 1 . . . . . . . . . . . . . . . . . . . 58
Exa 14.2 example 2 . . . . . . . . . . . . . . . . . . . 58
Exa 14.3 example 3 . . . . . . . . . . . . . . . . . . . 59
Exa 14.4 example 4 . . . . . . . . . . . . . . . . . . . 59
Exa 14.5 example 5 . . . . . . . . . . . . . . . . . . . 60
Exa 14.6 example 6 . . . . . . . . . . . . . . . . . . . 61
Exa 14.7 example 7 . . . . . . . . . . . . . . . . . . . 61
Exa 14.8 example 8 . . . . . . . . . . . . . . . . . . . 62
Exa 14.9 example 9 . . . . . . . . . . . . . . . . . . . 62
Exa 14.10 example 10 . . . . . . . . . . . . . . . . . . 63
Exa 14.11 example 11 . . . . . . . . . . . . . . . . . . 63
Exa 14.13 example 12 . . . . . . . . . . . . . . . . . . 64
Exa 14.14 example 13 . . . . . . . . . . . . . . . . . . 64
Exa 14.15 example 14 . . . . . . . . . . . . . . . . . . 65
Exa 14.16 example 15 . . . . . . . . . . . . . . . . . . 65
Exa 14.17 example 16 . . . . . . . . . . . . . . . . . . 65
Exa 14.18 example 17 . . . . . . . . . . . . . . . . . . 66
Exa 14.19 example 18 . . . . . . . . . . . . . . . . . . 66
Exa 14.20 example 19 . . . . . . . . . . . . . . . . . . 67
Exa 15.1 example 1 . . . . . . . . . . . . . . . . . . . 68
Exa 15.2 example 2 . . . . . . . . . . . . . . . . . . . 68
Exa 15.3 example 3 . . . . . . . . . . . . . . . . . . . 69
Exa 15.4 example 4 . . . . . . . . . . . . . . . . . . . 69
Exa 15.5 example 5 . . . . . . . . . . . . . . . . . . . 69

7
Exa 15.6 example 6 . . . . . . . . . . . . . . . . . . . 70
Exa 15.7 example 7 . . . . . . . . . . . . . . . . . . . 71
Exa 15.8 example 8 . . . . . . . . . . . . . . . . . . . 71
Exa 15.9 example 9 . . . . . . . . . . . . . . . . . . . 72
Exa 15.11 example 10 . . . . . . . . . . . . . . . . . . 72
Exa 15.12 example 11 . . . . . . . . . . . . . . . . . . 73
Exa 16.1 example 1 . . . . . . . . . . . . . . . . . . . 74
Exa 16.2 example 2 . . . . . . . . . . . . . . . . . . . 74
Exa 16.3 example 3 . . . . . . . . . . . . . . . . . . . 75
Exa 16.4 example 4 . . . . . . . . . . . . . . . . . . . 75
Exa 16.6 example 5 . . . . . . . . . . . . . . . . . . . 76
Exa 16.7 example 6 . . . . . . . . . . . . . . . . . . . 76
Exa 16.8 example 7 . . . . . . . . . . . . . . . . . . . 77
Exa 16.9 example 8 . . . . . . . . . . . . . . . . . . . 77
Exa 17.1 example 1 . . . . . . . . . . . . . . . . . . . 79
Exa 17.2 example 2 . . . . . . . . . . . . . . . . . . . 79
Exa 17.3 example 3 . . . . . . . . . . . . . . . . . . . 80
Exa 17.4 example 4 . . . . . . . . . . . . . . . . . . . 81
Exa 17.5 example 5 . . . . . . . . . . . . . . . . . . . 81
Exa 17.7 example 6 . . . . . . . . . . . . . . . . . . . 81
Exa 17.8 example 7 . . . . . . . . . . . . . . . . . . . 82
Exa 17.9 example 8 . . . . . . . . . . . . . . . . . . . 82
Exa 17.10 example 9 . . . . . . . . . . . . . . . . . . . 83
Exa 17.11 example 10 . . . . . . . . . . . . . . . . . . 83
Exa 17.12 example 11 . . . . . . . . . . . . . . . . . . 84
Exa 17.13.a example 12 . . . . . . . . . . . . . . . . . . 84
Exa 17.13.b example 13 . . . . . . . . . . . . . . . . . . 85
Exa 17.14 example 14 . . . . . . . . . . . . . . . . . . 85
Exa 18.1 example 1 . . . . . . . . . . . . . . . . . . . 87
Exa 18.2 example 2 . . . . . . . . . . . . . . . . . . . 87
Exa 18.3 example 3 . . . . . . . . . . . . . . . . . . . 88
Exa 18.4 example 4 . . . . . . . . . . . . . . . . . . . 88
Exa 18.5 example 5 . . . . . . . . . . . . . . . . . . . 89
Exa 18.6 example 6 . . . . . . . . . . . . . . . . . . . 89
Exa 18.7 example 7 . . . . . . . . . . . . . . . . . . . 90
Exa 18.8 example 8 . . . . . . . . . . . . . . . . . . . 90
Exa 18.9 example 9 . . . . . . . . . . . . . . . . . . . 91
Exa 18.10 example 10 . . . . . . . . . . . . . . . . . . 91

8
Exa 18.11 example 11 . . . . . . . . . . . . . . . . . . 92
Exa 19.1 example 1 . . . . . . . . . . . . . . . . . . . 93
Exa 19.2 example 2 . . . . . . . . . . . . . . . . . . . 93
Exa 19.3 example 3 . . . . . . . . . . . . . . . . . . . 94
Exa 19.4 example 4 . . . . . . . . . . . . . . . . . . . 95
Exa 19.5 example 5 . . . . . . . . . . . . . . . . . . . 95
Exa 19.6 example 6 . . . . . . . . . . . . . . . . . . . 96
Exa 19.7.a example 7 . . . . . . . . . . . . . . . . . . . 97
Exa 19.7.b example 8 . . . . . . . . . . . . . . . . . . . 98
Exa 20.1 example 1 . . . . . . . . . . . . . . . . . . . 99
Exa 20.2 example 2 . . . . . . . . . . . . . . . . . . . 100
Exa 20.3 example 3 . . . . . . . . . . . . . . . . . . . 100
Exa 20.4 example 4 . . . . . . . . . . . . . . . . . . . 100
Exa 20.5 example 5 . . . . . . . . . . . . . . . . . . . 101
Exa 20.6 example 6 . . . . . . . . . . . . . . . . . . . 102
Exa 20.7 example 7 . . . . . . . . . . . . . . . . . . . 102
Exa 20.8 example 8 . . . . . . . . . . . . . . . . . . . 103
Exa 20.9 example 9 . . . . . . . . . . . . . . . . . . . 103
Exa 21.1 example 1 . . . . . . . . . . . . . . . . . . . 105
Exa 21.2 example 2 . . . . . . . . . . . . . . . . . . . 105
Exa 21.3 example 3 . . . . . . . . . . . . . . . . . . . 106
Exa 22.1 example 1 . . . . . . . . . . . . . . . . . . . 108
Exa 23.1 example 1 . . . . . . . . . . . . . . . . . . . 109
Exa 23.2 example 2 . . . . . . . . . . . . . . . . . . . 110
Exa 23.3 example 3 . . . . . . . . . . . . . . . . . . . 110
Exa 24.3 example 1 . . . . . . . . . . . . . . . . . . . 111
Exa 24.4 example 2 . . . . . . . . . . . . . . . . . . . 111
Exa 24.5 example 3 . . . . . . . . . . . . . . . . . . . 112
Exa 24.6 example 6 . . . . . . . . . . . . . . . . . . . 112
Exa 24.7 example 5 . . . . . . . . . . . . . . . . . . . 113
Exa 24.8 example 6 . . . . . . . . . . . . . . . . . . . 113
Exa 24.9 example 9 . . . . . . . . . . . . . . . . . . . 114
Exa 25.1 example 1 . . . . . . . . . . . . . . . . . . . 115
Exa 25.2 example 2 . . . . . . . . . . . . . . . . . . . 116
Exa 25.3 example 3 . . . . . . . . . . . . . . . . . . . 116
Exa 25.4 example 4 . . . . . . . . . . . . . . . . . . . 116
Exa 25.5 example 5 . . . . . . . . . . . . . . . . . . . 117

9
Chapter 1

Introduction to communication
system

Scilab code Exa 1.1 example 1

1 clc ;
2 // p a g e no 7
3 // p r o b no 1 . 1
4 // p a r t a ) f r e q= 1MHz(AM r a d i o b r o a d c a s t band )
5 // We have t h e e q u a t i o n c=f r e q ∗ w a v e l e n g t h
6 c =3*10^8;
7 f =1*10^6;
8 wl = c / f ;
9 disp ( ’m ’ ,wl ,+ ’WAVELENGTH IN FREE SPACE I S ’ ) ;
10 // p a r t B) f r e q= 27MHz(CB r a d i o band )
11 f =27*10^6;
12 wl = c / f ;
13 disp ( ’m ’ ,wl ,+ ’WAVELENGTH IN FREE SPACE I S ’ ) ;
14 // p a r t C) f r e q= 4GHz( u s e d f o r s a t e l l i t e t e l e v i s i o n )
15 f =4*10^9;
16 wl = c / f ;
17 disp ( ’m ’ ,wl ,+ ’WAVELENGTH IN FREE SPACE I S ’ ) ;

10
Scilab code Exa 1.4 example 4

1 clc ;
2 // p a g e no 18
3 // p r o b no . 1 . 4
4 // I n g i v e n p r o b l e m n o i s e power bandwidth i s 10 kHz ;
r e s i s t o r temp T( 0 c ) =27
5 // F i r s t we have t o c o n v e r t t e m p e r a t u r e t o k e l v i n s :
6 T0c =27;
7 Tk = T0c +273;
8 // n o i s e power c o n t r i b u t e d by r e s i s t o r , Pn= k ∗T∗B
9 k =1.38*10^( -23) ;
10 B =10*10^3;
11 Pn = k * Tk * B ;
12 disp ( ’W’ ,Pn , ’ n o i s e power c o n t r i b u t e d by r e s i s t o r ’ ) ;

Scilab code Exa 1.5 example 5

1 clc ;
2 // p a g e no 20
3 // p r o b no 1 . 5
4 // I n t h e g i v e n p r o b l e m B=6MHz, Tk=293 , k
=1.38∗10ˆ −23
5 B =6*10^6; Tk =293; k =1.38*10^ -23; R =300;
6 Pn = k * Tk * B ;
7 disp ( ’W’ ,Pn , ’ The n o i s e power i s ’ ) ;
8 // Th n o i s e v o l t a g e i s g i v e n by Vn=s q r t ( 4 ∗ k ∗Tk∗B∗R)
9 Vn = sqrt (4* k * Tk * B * R ) ;
10 disp ( ’ v o l t s ’ ,Vn , ’ Th n o i s e v o l t a g e i s ’ ) ;
11 // o n l y one−h a l f o f t h i s v o l t a g e i s a p p e a r s a c r o s s
the antenna terminals , the other appears a c r o s s

11
the source r e s i s t a n c e . Therefore the actual n o i s e
v o l t a g a t t h e i n p u t i s 2 . 7 uV

Scilab code Exa 1.6 example 6

1 clc ;
2 // p a g e no 21
3 // p r o b no 1 . 6
4 // g i v e n : FM b r o a d c a s t r e c e i v e r :− Vn=10uV , R=75V, B
=200 kHz
5 Vn =10; // i n uV
6 R =75; B =200*10^3;
7 //By Ohm’ s law
8 In = Vn / R ;
9 disp ( ’ uA ’ ,In , ’ N o i s e c u r r e n t i s ’ ) ;
10 // N o i s e v o t l a g e i s a l s o g i v e n a s I n=s q r t ( 2 ∗ q ∗ I o ∗B)
11 q =1.6*10^ -19;
12 // s o l v i n g t h i s f o r I o=I n ˆ 2 / 2 ∗ q ∗B ;
13 Io =( In *10^ -6) ^2/(2* q * B ) ;
14 disp ( ’A ’ ,Io , ’ c u r r e n t t h r o u g h t h e d i o d e i s ’ ) ;

Scilab code Exa 1.7 example 7

1 clc ;
2 // p a g e no 23
3 // p r o no 1 . 7
4 // Given : r e f e r f i g . 1 . 1 2 o f p a g e no . 2 3 ; R1=100ohm , 3 0 0K ;
R2=200ohm , 4 0 0 k ; B=100kHz ; Rl =300ohm
5 R1 =100; T1 =300; R2 =200; T2 =400; B =100*10^3; Rl =300; k
=1.38*10^ -23;
6 // open−c k t n o i s e v o l t a g e i s g i v e n by
7 // Vn1 =s q r t ( Vr1 ˆ2 + Vr2 ˆ 2 )
8 // =s q r t [ s q r t ( 4 kTBR1 ) ˆ2 + s q r t ( 4 kTBR2 ) ˆ 2 ]

12
9 // by s o l v i n g t h i s we g e t Vn1=s q r t [ 4 kB ( T1R1 + T2R2 ) ]
10 Vn1 = sqrt (4* k * B *( T1 * R1 + T2 * R2 ) ) ;
11 disp ( ’ v o l t s ’ ,Vn1 , ’ Open−c k t n o i s e v o l t a g e i s ’ ) ;
12 // s i n c e i n t h i s c a s e t h e l o a d i s e q u a l i n v a l u e t o
t h e sum o f t h e r e s i s t o r s ,
13 // one−h a l f o f t h i s v o l t a g e i s a p p e a r a c r o s s t h e
load .
14 // Now t h e l o a d power i s P= Vn1 ˆ2/ Rl
15 P = ( Vn1 /2) ^2/ Rl ;
16 disp ( ’W’ ,P , ’ The l o a d power i s ’ ) ;

Scilab code Exa 1.8 example 8

1 clc ;
2 // p a g e no 24
3 // p r o b no 1 . 8
4 // Given : N=0.2W; S+N=5W; : . S =4.8W
5 N =0.2; S =4.8;
6 p =( S + N ) / N ;
7 pdB =10* log10 ( p ) ;
8 disp ( ’ dB ’ ,pdB , ’ The power r a t i o i n dB ’ ) ;

Scilab code Exa 1.9 example 9

1 clc ;
2 // p a g e no 25
3 // p r o b no 1 . 9
4 // Given : S i =100uW; Ni=1uW; So=1uW; No =0.03W
5 Si =100; Ni =1; So =1; No = 0.03 // a l l p o w e r s a r e i n uW
6 r1 = Si / Ni ; // i n p u t SNR
7 r2 = So / No ; // o u t p u t SNR
8 NF = r1 / r2 ; // A m p l i f i e r n o i s e f i g u r e
9 disp ( NF , ’ Te n o i s e f i g u r e i s ’ ) ;

13
Scilab code Exa 1.10 example 10

1 clc ;
2 // p a g e no 25
3 // p r o b no 1 . 1 0
4 // g i i v e n : SNRin=42 dB , NF=6dB
5 // NF i n dB i s g i v e n a s SNRin ( dB )−SNRop ( dB )
6 SNRin =42 ; NF =6;
7 SNRop = SNRin - NF ;
8 disp ( ’ dB ’ , SNRop , ’SNR a t t h e o u t p u t i s ’ ) ;

Scilab code Exa 1.11 example 11

1 clc ;
2 // p a g e no 27
3 // p r o b no 1 . 1 1
4 // Given NFdB=2dB , : . NF= a n t i l o g (NFdB) / 1 0 = 1 . 5 8 5
5 NF =1.585;
6 Teq =290*( NF -1) ;
7 disp ( ’K ’ ,Teq , ’ The n o i s e t e m p e r a t u r e i s ’ ) ;

Scilab code Exa 1.12 example 12

1 clc ;
2 // p a g e no 29
3 // p r o b no 1 . 1 2
4 // Given :
5 A1 =10; A2 =25; A3 =30; NF1 =2; NF2 =4; NF3 =5;
6 At = A1 * A2 * A3 ;

14
7 disp ( At , ’ The power g a i n i s ’ ) ;
8 // The n o i s e f i g u r e i s g i v e n a s
9 NFt = NF1 +(( NF2 -1) / A1 ) + (( NF3 -1) /( A1 * A2 ) ) ;
10 disp ( NFt , ’ The n o i s e f i g u r e i s ’ ) ;
11 // N o i s e temp can be f o u n d a s
12 Teq =290*( NFt -1) ;
13 disp ( ’K ’ ,Teq , ’ The n o i s e t e m p e r a t u r e i s ’ ) ;

Scilab code Exa 1.13 example 13

1 clc ;
2 // p a g e no 34
3 // p r o b no1 . 1 3 r e f e r f i g 1 . 2 0 o f p a g e no 34
4 // p a r t A) The s i g n a l f r e q u e n c y i s f 1 =110MHz .
5 f =110; // i n MHz
6 disp ( ’MHz ’ ,f , ’A) The f r e q i s ’ ) ;
7 // The s i g n a l peak i s two d i v i s i o n s b e l o w t h e
r e f e r e n c e l e v e l o f −10dBm, w i t h 10dB/ d i v i s i o n , s o
i t s −30dBm .
8 PdBm = -30;
9 disp ( ’dBm ’ , PdBm , ’ The power i n dBm ’ ) ;
10 // The e q u i v a l e n t power can be f o u n d from P(dBm) =10
l o g P /1 mW
11 //P(mW)= a n t i l o g dBm/10= a n t i l o g −30/10=1∗10ˆ −3mW=1uW
12 // t h e v o l t a g e can be f o u n d from t h e g r a p h but i t i s
more a c c u r a t e l y from P=Vˆ2/R
13 P =10^ -6; R =50;
14 disp ( ’W’ ,P , ’ The power i s ’ ) ;
15 V = sqrt ( P * R ) ;
16 disp ( ’ v o l t s ’ ,V , ’ The v o l t a g e i s ’ ) ;
17
18 // p a r t B) The s i g n a l i s 1 d i v i s i o n t o t h e l e f t o f
c e n t e r , w i t h 100 kHz / d i v . The f r e q i s 100 kHz l e s s
t h a n t h e r e f f r e q o f 7 . 5MHz
19 f =7.5 -0.1; // i n MHz

15
20 disp ( ’MHz ’ ,f , ’B) The f r e q i s ’ ) ;
21 // With r e g a r d s t o t h e a m p l i t u d e , t h e s c a l e i s 1dB/
div & the s i g n a l i s 1 div below the r e f e r e n c e
l e v e l . T h e r e f o r e t h e s i g n a l h a s a power l e v e l
given as
22 PdBm =10 -1; // i n dBm
23 // T h i s can be c o n v e r t e d t o w a t t s & v o l t s a s same i n
part A
24 //P(mW)= a n t i l o g dBm/10= a n t i l o g 9 / 1 0 = 7 . 9 4mW
25 P =7.94*10^ -3; R =50;
26 disp ( ’W’ ,P , ’ The power i s ’ ) ;
27 disp ( ’dBm ’ , PdBm , ’ The power i n dBm ’ ) ;
28 V = sqrt ( P * R ) ;
29 disp ( ’ v o l t s ’ ,V , ’ The v o l t a g e i s ’ ) ;
30
31 // p a r t C) The s i g n a l i s 3 d i v i s i o n s t o t h e r i g h t o f
t h e c e n t e r r e f f r e q o f 543MHz, w i t h 1MHz/ d i v .
Therefore the f r e q i s
32 f =543+3*1; // i n MHz
33 disp ( ’MHz ’ ,f , ’C) The f r e q i s ’ ) ;
34 // from t h e s p e c t r u m , s i g n a l l e v e l i s
35 V =22.4*6/8;
36 disp ( ’mV ’ ,V , ’ The v o l t a g e i s ’ ) ;
37 // power i s g i v e n a s
38 P = V ^2/ R ;
39 disp ( ’uW ’ ,P , ’ The power i s ’ ) ;
40 PdBm =10* log10 ( P *10^ -6/10^ -3) ;
41 disp ( ’dBm ’ , PdBm , ’ The power i n dBm ’ ) ;

16
Chapter 2

Radio Frequency Circuits

Scilab code Exa 2.1 example 1

1 clc ;
2 // p a g e no 50
3 // p r o b no 2 . 1
4 // R e f e r t h e f i g 2 . 6 o f p a g e 5 0 . L1=25uH ; C1=50pF
5 L1 =25*10^ -6; C1 =50*10^ -12; Q =15;
6 //A) The r e s o n e n t f r e q e n c y i s g i v e n a s
7 fo =(1/(2* %pi * sqrt ( L1 * C1 ) ) ) ;
8 disp ( ’ Hz ’ ,fo , ’ a ) The r e s o n e n t f r e q u e n c y i s ’ ) ;
9 //B) The bandwidth i s g i v e n a s
10 B = fo / Q ;
11 disp ( ’ Hz ’ ,B , ’ The bandwidth i s ’ ) ;

Scilab code Exa 2.2 example 2

1 clc ;
2 // p a g e no 62
3 // p r o b no . 2 . 2
4 // Given : H a r t l e y o s c i l l a t o r s L=10uH ; C=100pF

17
5 L =10*10^ -6; C =100*10^ -12; N1 =10; N2 =100
6 // A) The o p e r a t i n g f r e q u e n c y i s
7 fo =1/(2* %pi * sqrt ( L * C ) ) ;
8 disp ( ’ Hz ’ ,fo , ’ 1 ) The o p e r a t i n g f r e q u e n c y i s ’ ) ;
9 // The f e e d b a c k f r a c t i o n i s g i v e n by
10 B = - N1 / N2 ;
11 // O p e r a t i n g g a i n i s g i v e n a s
12 A =1/ B ;
13 disp (A , ’ 2 ) O p e r a t i n g g a i n ’ ) ;
14 disp ( ’ The −ve s i g n d e n o t e s a p h a s e i n v e r s i o n ’ ) ;
15 //B) The o p e r a t i n g f r e q u e n c y i s same a s i n p a r t A)
16 N1 =20; N2 =80;
17 // The f e e d b a c k f r a c t i o n i s g i v e n by
18 B =( N1 + N2 ) / N1 ;
19 // O p e r a t i n g g a i n i s g i v e n a s
20 A =1/ B ;
21 disp (A , ’ 3 ) O p e r a t i n g g a i n ’ ) ;

Scilab code Exa 2.3 example 3

1 clc ;
2 // p a g e no 66
3 // p r o b no 2 . 3
4 C1 =10*10^ -12; C2 =100*10^ -12; L =1*10^ -6;
5 // The e f f e c t i v e c a p a c i t a n c e i s
6 CT =( C1 * C2 ) /( C1 + C2 ) ;
7 disp ( CT ) ;
8 // The o p e r a t i n g f r e q u e n c y i s
9 f0 =1/(2* %pi * sqrt ( L * CT ) ) ;
10 disp ( ’ Hz ’ ,f0 , ’ 1 ) The o p e r a t i n g f r e q u e n c y i s ’ ) ;
11 // The f e e d b a c k f r a c t i o n i s g i v e n a p p r o x i m a t e l y by
12 B = - C1 / C2 ;
13 disp (B , ’ The f e e d b a c k f r a c t i o n i s ’ ) ;
14 // For t h e common−b a s e c k t , t h e op−f r e q i s same but
the feedback f r a c t i o n w i l l b e d i f f e r e n t .

18
15 C1 =100*10^ -12; C2 =10*10^ -12;
16 // I t i s g i v e n by
17 B = C2 /( C1 + C2 ) ;
18 disp (B , ’ The f e e d b a c k f r a c t i o n i s ’ );

Scilab code Exa 2.4 example 4

1 clc ;
2 // p a g e no 68
3 // p r o b no 2 . 4
4 // R e f e r f i g 2 . 2 2
5 c1 =1000; c2 =100; c3 =10; // a l l v a l u e s a r e i n p f
6 // The e f f e c t i v e t o t a l c a p a c i t a n c e
7 Ct =1/((1/ c1 ) +(1/ c2 ) +(1/ c3 ) ) ;
8 disp ( ’ pF ’ ,Ct , ’ The e f f e c t i v e t o t a l c a p a c i t a n c e i s ’ ) ;
9 CT = Ct *10^ -12; L =10^ -6;
10 // The o p e r a t i n g f r e q i s
11 f0 =1/(2* %pi * sqrt ( L * CT ) ) ;
12 disp ( ’ Hz ’ ,f0 , ’ The o p e r a t i n g f r e q i s ’ ) ;

Scilab code Exa 2.5 example 5

1 clc ;
2 // p a g e no 70
3 // p r o b no 2 . 5
4 C =80*10^ -12; L = 100*10^ -6;
5 // P a r t a ) The r e s o n e n t f r e q u e n c y i s
6 f0 =1/(2* %pi * sqrt ( L * C ) ) ;
7 disp ( ’ Hz ’ ,f0 , ’ The r e s o n e n t f r e q i s ’ ) ;
8 // P a r t b ) I n t h i s p a r t t h e c i r c u i t i s r e s o n a t e on
doubling the frequency , t h e r e f o r e
9 f1 =2* f0 ;
10 // from t h e e q u a t i o n o f r e s o n e n t f r e q u e n c y

19
11 C1 =1/(4*( %pi * f1 ) ^2* L ) ;
12 // Now f o r t u n i n g v o l t a g e we have t o u s e e q u a t i o n
C1=Co/ s q r t (1+2V)
13 Co = C ;
14 // a f t e r s o l v i n g t h e e x p r e s s i o n
15 v =(( Co / C1 ) ^2 -1) /2;
16 disp ( ’V ’ ,v , ’ The t u n i n g v o l t a g e i s ’ ) ;

Scilab code Exa 2.7 example 6

1 clc ;
2 // p a g e no 76
3 // p r o b l e m 2 . 7
4 // a l l f r e q u e n c i e s a r e i n MHz
5 f1 =11; f2 =10;
6 // o u t p u t f r e q u e n c i e s a t t h e o u t p u t o f s q u a r e −law
mixer
7 a = f1 + f2 ;
8 b = f1 - f2 ;
9 disp ( ’MHz ’ ,b , ’MHz ’ ,a , ’ The o u t p u t f r e q u e n c i e s a t t h e
o u t p u t o f s q u a r e −law m i x e r a r e : ’ ) ;

Scilab code Exa 2.8 example 7

1 clc ;
2 // p a g e no 85
3 // p r o b l e m no . 2 . 8
4 // a l l t h e f r e q u e n c i e s a r e i n MHz
5 freq_free_run =12;
6 freq_lock1 =10;
7 freq_lock2 =16;

20
8 // c a p t u r e r a n g e i s a p p r o x i m a t e l y t w i c e t h e
d i f f e r e n c e b e t w e e n t h e f r e e −r u n n i n g f r e q and t h e
f r e q a t which l o c k i s f i r s t a c h i e v e d
9 capture_range =2*( freq_free_run - freq_lock1 ) ;
10 disp ( ’MHz ’ , capture_range , ’ The c a p t u r e r a n g e i s ’ ) ;
11 // l o c k r a n g e i s a p p r o x i m a t e l y t w i c e t h e t h e
d i f f e r e n c e b e t w e e n t h e f r e q where l o c k i s l o s t
and f r e e −r u n n i n g f r e q
12 lock_range = 2*( freq_lock2 - freq_free_run ) ;
13 disp ( ’MHz ’ , lock_range , ’ The l o c k r a n g e i s ’ ) ;
14 // The PLL f r e q r e s p o n s e i d a p p r o x i m a t e s y m m e t r i c a l .
T h i s means t h e f r e e −r u n n i n g f r e q i s i n t h e c e n t e r
o f t h e l o c k r a n g e and c a p t u r e r a n g e . T h e r e f o r e
15 freq_lock_acquired = freq_free_run + ( capture_range
/2) ;
16 freq_lock_lost = freq_free_run - capture_range
17 disp ( ’MHz ’ , freq_lock_acquired , ’ The f r e q a t which t h e
l o c k i s a c q u i r e d , moving downward i n f r e q i s ’ ) ;
18 disp ( ’MHz ’ , freq_lock_lost , ’ Lock w i l l be l o s t on t h e
way down a t ’ ) ;

Scilab code Exa 2.9 example 8

1 clc ;
2 // p a g e no 86
3 // p r o b no 2 . 9
4 // r e f e r f i g 2 . 3 8
5 // Here we a r e u s i n g a 10MHz c r y s t a l , i t w i l l be
n e c e s s a r t o d e v i d e i t by a f a c t o r t o g e t 10 kHz
6 f_osc = 10*10^6; f_ref =10*10^3; f0_1 =540*10^3; f0_2
=1700*10^3;
7 Q = f_osc / f_ref ;
8 // we have t o s p e c i f y t h e r a n g e o f v a l u e s o f N . Find
N a t e a c h and o f t h e t u n i n g r a n g e
9 N1 = f0_1 / f_ref ;

21
10 N2 = f0_2 / f_ref ;
11 disp ( N2 , ’ The v a l u e s o f N a t h i g h end i s ’ ,N1 , ’ The
v a l u e s o f N a t low end i s ’ ) ;

Scilab code Exa 2.10 example 9

1 clc ;
2 // p a g e no 89
3 // p r o b no 2 . 1 0
4 // r e f e r f i g 2 . 4 0
5 P =10; f_ref =10*10^3; M =10;
6 // c o n s i d e r
7 N =1;
8 // With a f i x e d −modulus p r e s c a l a r , t h e min f r e q s t e p
is
9 step_size = M * f_ref ;
10 // With t h e two−modulus system , l e t t h e main d i v i d e r
modulus N r e m a i n c o n s t a n t & i n c r e a s e t h e modulus
m t o (m+1) t o f i n d how much t h e f r e q c h a n g e s .
11 // f o r 1 s t c a s e , o /p f r e q
12 fo =( M + N * P ) * f_ref ;
13 // f o r 2 nd c a s e where l e a v e N a l o n e but c h a n g e s M t o
M+1 , new o / p f r e q
14 fo_ =( M +1+ N * P ) * f_ref ;
15 // The d i f f e r e n c e i s
16 f = fo_ - fo ;
17 disp ( ’ Hz ’ ,f , ’ The s t e p s i z e t h a t would have b e e n
o b t a i n e d without p r e s c a l i n g ’ );

Scilab code Exa 2.11 example 10

1 clc ;
2 // p a g e no 91

22
3 // p r o b no 2 . 1 1
4 // r e f e r f i g 2 . 4 2
5 f_ref = 20*10^3;
6 f_osc = 10*10^6;
7 N1 =10; N2 =100;
8 f0 =( N1 * f_ref ) + f_osc ;
9 f1 =( N2 * f_ref ) + f_osc ;
10 disp ( ’ Hz ’ ,f1 , ’ Hz ’ ,f0 , ’ The o u t p u t f r e q u e n c i e s a r e ’ );
11 step_size =( f1 - f0 ) /( N2 - N1 ) ;
12 disp ( ’ Hz ’ , step_size , ’ The s t e p s i z e i s ’ ) ;

23
Chapter 3

The Amplitude Modulation

Scilab code Exa 3.1 example 1

1 clc ;
2 // p a g e no 105
3 // p r o b no 3 . 1
4 Erms_car =2; f_car =1.5*10^6; f_mod =500; Erms_mod =1; //
given
5 // E q u a t i o n r e q u i r e s peak v o l t a g e s & r a d i a n
frequencies
6 Ec = sqrt (2) * Erms_car ; Em = sqrt (2) * Erms_mod ;
7 wc =2* %pi * f_car ; wm =2* %pi * f_mod ; t =1;
8 // T h e r e f o r e t h e e q u a t i o n i s
9 disp ( ’ v ( t ) = ( 2 . 8 3 + 1 . 4 1 ∗ s i n ( 3 . 1 4 ∗ 1 0 ˆ 3 ∗ t ) ) ∗ s i n
( 9 . 4 2 ∗ 1 0 ˆ 6 ∗ t ) V ’ );

Scilab code Exa 3.2 example 2

1 clc ;
2 // p a g e no 106
3 // p r o b no 3 . 2

24
4 // To a v o i d t h e round− o f f e r r o r s we s h o u l d u s e t h e
original voltage values
5 Em =1; Ec =2;
6 m = Em / Ec ;
7 disp (m , ’m= ’ ) ;
8 disp ( ’ v ( t ) = 2 . 8 3 ( 1 + 0 . 5 ∗ s i n ( 3 . 1 4 ∗ 1 0 ˆ 3 ∗ t ) ) ∗ s i n
( 9 . 4 2 ∗ 1 0 ˆ 6 ∗ t ) V ’ , ’ The e q u a t i o n can be o b t a i n e d a s
’ );

Scilab code Exa 3.3 example 3

1 clc ;
2 // p a g e no 109
3 // p r o b no 3 . 3
4 E_car =10; E_m1 =1; E_m2 =2; E_m3 =3;
5 m1 = E_m1 / E_car ;
6 m2 = E_m2 / E_car ;
7 m3 = E_m3 / E_car ;
8 mT = sqrt ( m1 ^2+ m2 ^2+ m3 ^2) ;
9 disp ( mT , ’ The m o d u l a t i o n i n d e x i s ’ ) ;

Scilab code Exa 3.4 example 4

1 clc ;
2 // p a g e no 110
3 // p r o b no 3 . 4
4 // r e f e r f i g 3 . 2
5 E_max =150; E_min =70; // v o l t a g e s a r e i n mV
6 m =( E_max - E_min ) /( E_max + E_min ) ;
7 disp (m , ’ The m o d u l a t i o n i n d e x i s ’ ) ;

25
Scilab code Exa 3.6 example 5

1 clc ;
2 // p a g e no 114
3 // p r o b no 3 . 6
4 B =10*10^3;
5 // maximum m o d u l a t i o n f r e q i s g i v e n a s
6 fm = B /2;
7 disp ( ’ Hz ’ ,fm , ’ The maximum m o d u l a t i o n f r e q i s ’ );

Scilab code Exa 3.7 example 6

1 clc ;
2 // p a g e no 116
3 // p r o b no 3 . 7
4 // AM b r o a d c a s t t r a n s m i t t e r
5 Pc =50; m =0.8; // power i s i n kW
6 Pt = Pc *(1+ m ^2 /2) ;
7 disp ( ’kW ’ ,Pt , ’ The t o t a l power i s ’ ) ;

Scilab code Exa 3.8 example 7

1 clc ;
2 // p a g e no 328
3 // p r o b no 8 . 6
4 // 2 kHz t o n e i s p r e s e n t on c h a n n e l 5 o f g r o u p 3 o f
supergroup
5 // s i g n a l i s l o w e r s i d e d s o
6 fc_channel_5 =92*10^3;
7 fg = fc_channel_5 - (2*10^3) ; // 2MHz b a s e b a n d s i g n a l
8 // we know g r o u p 3 i n t h e s u p e r g r o u p i s moved t o t h e
r a n g e 408 −456 kHz w i t h a s u p p r e s s e d c a r r i e r
f r e q u e n c y o f 516 kHz

26
9 f_s_carr =516*10^3;
10 fsg = f_s_carr - fg ;
11 disp ( fsg ) ;

Scilab code Exa 3.9 example 8

1 clc ;
2 // p a g e no 122
3 // p r o b no . 3 . 9
4 // r e f e r f i g 3 . 1 4
5 // from s p e c t r u m we can s e e t h a t e a c h o f t h e two
s i d e b a n d s i s 20dB b e l o w t h e r e f l e v e l o f 10dBm .
T h e r e f o r e e a c h s i d e b a n d h a s a power o f −10dBm i . e
. 100uW.
6 power_of_each_sideband = 100;
7 Total_power = 2* power_of_each_sideband ;
8 disp ( ’uW ’ , Total_power , ’ The t o t a l power i s ’ ) ;
9 div =4; freq_per_div =1;
10 sideband_separation = div * freq_per_div ;
11 f_mod = sideband_separation /2;
12 disp ( ’ kHz ’ , f_mod , ’ The m o d u l a t i n g f r e q i s ’ ) ;
13 // Even i f t h i s s i g a n l h a s no c a r r i e r , i t s t i l l h a s
a c a r r i e r f r e q which i s midway b e t w e e n t h e two
sidebands . Therefore
14 carrier_freq = 10;
15 disp ( ’MHz ’ , carrier_freq , ’ The c a r r i e r f r e q ’ ) ;

Scilab code Exa 3.10 example 9

1 clc ;
2 // p a g e no 126
3 // p r o b no 3 . 1 0
4 f_car =8*10^6; f_mod1 =2*10^3; f_mod2 =3.5*10^3;

27
5 // S i g n a l i s LSB h e n c e o / p f r e q i s o b t a i n e d by
s u b t r a c t i n g f mod from f c a r
6 f_out1 = f_car - f_mod1 ;
7 disp ( ’MHz ’ , f_out1 /(10^6) , ’ The o /p f r e q f o u t 1 i s ’ );
8 f_out2 = f_car - f_mod2 ;
9 disp ( ’MHz ’ , f_out2 /(10^6) , ’ The o /p f r e q f o u t 1 i s ’ );

Scilab code Exa 3.11 example 10

1 clc ;
2 // p a g e no 127
3 // p r o b no 3.11
4 // R e f e r i n g the f i g . 3.17
5 // From f i g i t i s c l e a r t h a t t h e e waveform i s made
from two s i n e waves
6 Vp =12.5; // S i n c e Vp−p i s 25V from f i g h e n c e
i n d i v i d u a l Vp i s h a l f o f Vp−p
7 Rl =50; // Load r e s i s t a n c e i s 50 ohm
8 // D e t e r m i n a t i o n o f a v e r a g e power
9 Vrms = Vp / sqrt (2) ;
10 P =(( Vrms ) ^2) / Rl ;
11 disp ( ’W’ ,P , ’ The v a l u e o f a v e r a g e power o f s i g n a l i s
’ );

28
Chapter 4

Angle Modulation

Scilab code Exa 4.1 example 1

1 clc ;
2 // p a g e no 139
3 // p r o b no . 4 . 1
4 //An FM m o d u l a t o r i s g i v e n w i t h k f =30kHz /V o p e r a t e
a t c a r r i e r f r e q 175MHz
5 fc =175*10^6; kf =30*10^3;
6 // a ) D e t e r m i n a t i o n o f o / p f r e q f o r m o d u l a t i n g s i g n a l
v a l u e em1=150mV
7 em1 =150*10^ -3;
8 fsig1 = fc +( kf * em1 ) ;
9 disp ( ’MHz ’ , fsig1 /(10^6) , ’ a ) The v a l u e o f o / p f r e q i s
’ );
10 // b ) D e t e r m i n a t i o n o f o /p f r e q f o r m o d u l a t i n g s i g n a l
v a l u e em2=−2V
11 em2 = -2;
12 fsig2 = fc +( kf * em2 ) ;
13 disp ( ’MHz ’ , fsig2 /(10^6) , ’ b ) The v a l u e o f o / p f r e q i s
’ );

29
Scilab code Exa 4.2 example 2

1 clc ;
2 // p a g e no 140
3 // p r o b no . 4 . 2
4 //An FM m o d u l a t o r i s g i v e n which i s m o d u l a t e d by
s i n e wave 3V
5 v =3;
6 kf =30*10^3;
7 // D e t e r m i n a t i o n o f peak v a l u e
8 Em = v * sqrt (2) ;
9 // D e t e r m i n a t i o n o f d e v i a t i o n d e l t a
10 delta = kf * Em ;
11 disp ( ’ kHz ’ , delta /1000 , ’ The v a l u e o f deviation is ’ );

Scilab code Exa 4.3 example 3

1 clc ;
2 // p a g e no 140
3 // p r o b no . 4 . 3
4 //An FM b r o a d c a s t e r t r a n s m i t t e r o p e r a t e a t max
d e v i a t n o f 75 kHz
5 delta =75*10^3;
6 // a ) D e t e r m i n a t i o n o f m o d u l a t i o n i n d e x w i t h
m o d u l a t i n g f r e q o f s i g n a l =15kHz
7 fm1 =15*10^3;
8 mf1 = delta / fm1 ;
9 disp ( mf1 , ’ a ) The v a l u e o f m o d u l a t i o n i n d e x f o r fm=15
kHz i s ’ ) ;
10 // b ) D e t e r m i n a t i o n o f m o d u l a t i o n i n d e x w i t h
m o d u l a t i n g f r e q o f s i g n a l =50Hz
11 fm2 =50;
12 mf2 = delta / fm2 ;
13 disp ( mf2 , ’ b ) The v a l u e o f m o d u l a t i o n i n d e x f o r fm=50
Hz i s ’ ) ;

30
Scilab code Exa 4.4 example 4

1 clc ;
2 // p a g e no 141
3 // p r o b no . 4 . 4
4 //A p h a s e m o d u l a t o r i s g i v e n w i t h kp=2 r a d /V
5 kp =2;
6 // Peak p h a s e d e v i a t i o n o f 60 d e g r e e
7 // C o n v e r t i n g d e g r e e i n r a d i a n
8 phi =(2* %pi *60) /360;
9 // D e t e r m i n a t i o n o f peak v o l t a g e t h a t c a u s e t h a t
deviation
10 Vp = phi / kp ;
11 // D e t e r m i n a t i o n o f rms v o l t a g e
12 Vrms = Vp /( sqrt (2) ) ;
13 disp ( ’V ’ , Vrms , ’ The rms v o l t a g e t h a t c a u s e d e v i a t i o n
is ’ );

Scilab code Exa 4.6 example 5

1 clc ;
2 // p a g e no 145
3 // p r o b no . 4 . 6
4 // Phase m o d u l a t o r w i t hs e n s i t i v i t y kp=3 r a d /V & s i n e
wave i / p 2 V peak a t 1 kHz
5 kp =3; Vp =2; f =1*10^3;
6 // As max v a l u e o f s i n e f u n c t n i s 1 , h e n c e max v a l u e
o f p h i i s kp ∗Vp
7 phi_max = kp * Vp ;
8 // phi max i s n o t h i n g but mp
9 mp = phi_max ;

31
10 // v a l u e o f mf i s same a s mp i f s i g n a l i s c o n s i d e r e d
as f r e q modulation
11 // D e t e r m i n a t i o n o f f r e q d e v i a t i o n
12 dev = mp * f ;
13 disp ( ’ kHz ’ , dev /1000 , ’ The f r e q d e v i a t i o n p r o d u c e i s ’ )
;

Scilab code Exa 4.7 example 6

1 clc ;
2 // p a g e no 149
3 // p r o b no . 4 . 7
4 //An FM s i g n a l h a s d e v i a t i o n 3 kHz & m o d u l a t i n g f r e q
1 kHz w i t h t o t a l power Pt=5W d e v e l o p e d a c r o s s 50
ohm w i t h f c =160 MHz
5 dev =3*10^3; fm =10^3; Pt =5; Rl =50; fc =160*10^6;
6 // a ) D e t e r m i n a t i o n o f RMS s i g n a l v o l t a g e
7 Vt = sqrt ( Pt * Rl ) ;
8 disp ( ’V ’ ,Vt , ’ a ) The rms s i g n a l v o l t a g e i s ’ ) ;
9 // / / / / / / / / / / / b ) D e t e r m i n a t i o n o f rms v o l t a g e a t
carrier freq
10 // f o r t h a t m o d u l a t i o n i n d e x n e e d s t o be f o u n d o u t
11 mf = dev / fm ;
12 // From b e s s e l f u n c t i o n t a b l e , t h e c o e f f f o r t h e
c a r r i e r f i r s t 3 s i d e bands
13 J =[0.26 ,0.34 ,0.49 ,0.31];
14 disp ( ’ b ) The rms v o l t a g e o f s i d e bands a r e ’ )
15 for i =1:4 ,
16 V ( i ) = J ( i ) * Vt ;
17 end ;
18 disp ( ’V ’ ,V (4) , ’ V3= ’ , ’V ’ ,V (3) , ’ V2= ’ , ’V ’ ,V (2) , ’ V1= ’ , ’V
’ ,V (1) , ’ Vc= ’ ) ;
19 // / / / / / / / / / c ) D e t e r m i n a t i o n o f f r e q o f e a c h s i d e
bands / / / / / / / / / / / / / / / /
20 disp ( ’ c ) The 3 s i d e bands a t d i f f e r e n t f r e q . a r e ’ )

32
21 for j =1:3 ,
22 f_usb ( j ) = fc /10^6+( fm * j /10^6) ;
23 end
24 disp ( ’MHz ’ , f_usb (3) , ’ f u s b 3= ’ , ’MHz ’ , f_usb (2) , ’ f u s b 2
= ’ , ’MHz ’ , f_usb (1) , ’ f u s b 1= ’ ) ;
25
26 for j =1:3 ,
27 f_lsb ( j ) = fc /10^6 -( fm * j /10^6) ;
28 end
29 disp ( ’MHz ’ , f_lsb (3) , ’ f l s b 3 = ’ , ’MHz ’ , f_lsb (2) , ’ f l s b 2
= ’ , ’MHz ’ , f_lsb (1) , ’ f l s b 1 = ’ ) ;
30 // / / / / / / / / / / d ) D e t e r m i n a t i o n o f power o f e a c h s i d e
band / / / / / / / / / / / / / / / / /
31 for i =1:4 ,
32 P ( i ) =(( V ( i ) ) ^2) / Rl ;
33 a ( i ) =( P ( i ) ) /(10^ -3) ;
34 end ;
35 disp ( ’ d ) The power o f e a c h s i d e band i s ’ ) ;
36 disp ( ’W’ ,P (4) , ’ P3= ’ , ’W’ ,P (3) , ’ P2= ’ , ’W’ ,P (2) , ’ P1= ’ , ’W
’ ,P (1) , ’ Pc= ’ ,) ;
37 // / / / / / / / / e ) D e t e r m i n a t i o n o f power t h a t i s u n c o u n t e d
38 P = P (1) +2*( P (2) + P (3) + P (4) ) ;
39 // As t o t a l power i s 5 W
40 P_x = Pt - P ;
41 // P e r c e n t a g e o f t o t a l power u n c o u n t e d
42 Px =( P_x / P ) *100;
43 disp ( ’% ’ ,Px , ’ e ) P e r c e n t a g e t o t a l power which i s
uncounted i s ’ );
44 // / / / / / / / / f ) P l o t i n g t h e s i g n a l i n f r e q domain
/////////////////////
45 // C o n v e r t i n g power i n dBm
46 for i =1:4 ,
47 // a ( k ) =(P( k ) ) /(10ˆ −3) ;
48 P_dBm ( i ) =10* log10 ( a ( i ) ) ;
49 end ;
50 disp ( ’ f ) Power o f e a c h s i d e bands i n dBm i s ’ )
51 disp ( ’dBm ’ , P_dBm (4) , ’ P3 (dBm)= ’ , ’dBm ’ , P_dBm (3) , ’ P2 (
dBm)= ’ , ’dBm ’ , P_dBm (2) , ’ P1 (dBm)= ’ , ’dBm ’ , P_dBm (1) , ’

33
Pc (dBm) ’ ,) ;
52 x =[159.997:0.001:160.003];
53 y =[26.8 ,30.8 ,27.6 ,25.3 ,27.6 ,30.8 ,26.8];
54 plot (x , y ) ;

Scilab code Exa 4.9 example 7

1 clc ;
2 // p a g e no 157
3 // p r o b no . 4 . 9
4 //An FM s i g n a l h a s f r e q d e v i a t i o n o f 5 kHz m o d u l a t i n g
f r e q fm=1kHz w i t h SNR a t i / p i s 20 dB
5 // C o n v e r t i n g dB i n v o l t a g e r a t i o
6 fm =1*10^3; dev_s =5*10^3; snr =20;
7 Es_En =10^( snr /20) ;
8 // S i n c e Es>>En t h e n
9 phi =1/( Es_En ) ;
10 m_fn = phi ; // m o d u l a t i o n i n d e x e q u a l t o p h i n
11 dev_n =( m_fn ) * fm ; // E q u i v a l e n t f r e q d e v i a t i o n due t o
noise
12 //SNR a s a v o l t a g e r a t i o i s g i v e n a s
13 SNR =( dev_s ) /( dev_n ) ;
14 // C o n v e r t i n g t h i s v o l t a g e r a t i o n i n dB
15 SNR_dB =20*( log10 ( SNR ) ) ;
16 disp ( ’ dB ’ , SNR_dB , ’ The SNR a t d e t e c t t o r o /p i s ’ ) ;

Scilab code Exa 4.10 example 10

1 clc ;
2 // p a g e no 163
3 // p r o b no . 4 . 1 0
4 // R e f e r t h e f i g . 4.19

34
5 // We know t h i s t r a n s m i t t e r i s d e s i g n e d f o r v o i c e
f r e q u e n c i e s , s o we have t o u s e t r i a l and e r r o r
method t o p r o d u c e a c a r r i e r n u l l f o r a d e v i a t i o n
o f 5 kHz
6 mf =2.4; // s t a r t i n g w i t h t h e f i r s t n u l l f o r mf =2.4
7 dev =5; // i n kHz
8 fm = dev / mf ;
9 if (0.3 <= fm & 3 >= fm ) then
10 disp ( ’ kHz ’ ,fm , ’ The f r e q i s w i d i n t h e a c c e p t a b l e
range ’ );
11 else
12 mf =5.5;
13 fm = dev / mf ;
14 disp ( ’ kHz ’ ,fm , ’ The f r e q i s w i d i n t h e a c c e p t a b l e
range ’ );
15 end
16 // f o r t h i s c a l c u l a t e d fm , s e t t h e f u n c t i o n
g e n e r a t o r t o t h e v a l u e o f fm s o t h a t t h e
d e v i a t i o n i s 5 kHz

35
Chapter 5

Transmitters

Scilab code Exa 5.2 example 1

1 clc ;
2 // p a g e no 179
3 // p r o b no . 5 . 2
4 //A t r a n s m i t t e r w i t h c a r r i e r power o / p 10W a t
e f f i c i e n c y 70% a t 100% modulatn
5 Po =10; eta =0.7;
6 // D e t e r m i n a t i o n o f dc power o / p
7 Ps = Po / eta ;
8 disp ( ’W’ ,Ps , ’ The v a l u e o f dc power i n p u t i s ’ ) ;
9 // D e t e r m i n a t i o n o f a u d i o power
10 Pa =0.5* Ps ;
11 disp ( ’W’ ,Pa , ’ The v a l u e o f a u d i o power i s ’ ) ;

Scilab code Exa 5.3 example 2

1 clc ;
2 // p a g e no 181
3 // p r o b no . 5 . 3

36
4 //A t r a n s m i t t e r o p e r a t e s a t 12V, w i t h c o l l e c t o r
c u r r e n t 2A . Modulatn t r a n s f o r m e r h a s t u r n r a t i o
4:1
5 // D e t e r m i n a t i o n o f i m p e d a n c e a t t r a n s f o r m e r
secondary
6 Vcc =12; Ic =2; N1 =4; N2 =1;
7 Za = Vcc / Ic ;
8 disp ( ’ ohm ’ ,Za , ’ The i m p e d a n c e o f t r a n s f o r m e r
s ec on d ar y i s ’ );
9 // D e t e r m i n a t i o n o f i m p e d a n c e o f t r a n s f o r m e r p r i m a r y
10 Zp = Za *( N1 / N2 ) ^2;
11 disp ( ’ ohm ’ ,Zp , ’ The i m p e d a n c e o f t r a n s f o r m e r p r i m a r y
i s ’ );

Scilab code Exa 5.4 example 3

1 clc ;
2 // p a g e no 182
3 // p r o b no . 5 . 4
4 // C l a s s C a m p l i f i e r w i t h c a r r i e r o / p power o f 100W
w i t h e f f i c i e n c y o f 70% & w i t h 100% m o d u l a t i o n
5 Pc =100; eta =0.7;
6 // D e t e r m i n a t i o n o f o / p power
7 Po =1.5* Pc ;
8 disp ( ’W’ ,Po , ’ The o /p power w i t h 100% m o d u l a t i o n i s ’ )
;
9 // D e t e r m i n a t i o n o f s u p p l y power
10 Ps = Po / eta ;
11 disp ( ’W’ ,Ps , ’ The v a l u e o f s u p p l y power i s ’ ) ;
12 // D e t e r m i n a t i o n o f power d i s s i p a t e d Pd
13 Pd = Ps - Po ;
14 disp ( ’W’ ,Pd , ’ Power d i s s i p a t e d i s ’ ) ;

37
Scilab code Exa 5.5 example 4

1 clc ;
2 // p a g e no 184
3 // p r o b no . 5 . 5
4 //An FM t r a n s m i t t e r p r o d u c e 10W o f c a r r i e r power
o p e r a t i n g a t 15V
5 Vcc =15; Pc =10;
6 // D e t e r m i n a t i o n o f l o a d i m p e d a n c e
s e e n from
collector
7 Rl =(( Vcc ) ^2) /(2* Pc ) ;
8 disp ( ’ ohm ’ ,Rl , ’ The l o a d i m p e d a n c e i s ’ ) ;

Scilab code Exa 5.6 example 5

1 clc ;
2 // p a g e no 193
3 // p r o b no . 5 . 6
4 // R e f e r f i g . 5 . 1 3
5 // F i l t e r method SSB g e n e r a t o r
6 fc =5*10^6; // f i l t e r c e n t r e f r e q .
7 BW =3*10^3; // F i l t e r bandwidth
8 foc =4.9985*10^6; // c a r r i e r o s c i l l a t o r f r e q .
9 disp ( ’ a ) The USB w i l l be p a s s e d ’ ) ; // S i n c e c a r r i e r
f r e q i s a t low end o f p a s s b a n d
10 disp ( ’ b ) The c a r r i e r f r e q s h o u l d be moved t o t h e h i g h
end o f f i l t e r a t 5 . 0 0 1 5MHz ’ ) ; //To g e n e r a t e t h e
LSB

Scilab code Exa 5.7 example 6

1 clc ;
2 // p a g e no 196

38
3 // p r o b no . 5 . 7
4 // SSB t r a n s m i t t e r r e f e r i n g f i g . 5 . 1 7 t o t r a n s m i t USB
s i g n a l a t c a r r i e r f r e q 2 1 . 5MHz
5 fo =21.5; // c a r r i e r f r e q i n MHz
6 foc =8.9985; // c a r r i e r o s c i l l a t o r f r e q . i n MHz
7 // D e t e r m i n a t i o n o f f r e q o f l o c a l o s c i l l a t o r
8 flo = fo - foc ;
9 disp ( ’MHz ’ ,flo , ’ The f r e q o f l o c a l o s c i l l a t o r ’ ) ;

Scilab code Exa 5.8 example 7

1 clc ;
2 // p a g e no 199
3 // p r o b no . 5 . 8
4 //LSB t r a n s m i t t e r r e f e r i n g f i g . 5 . 1 4 w i t h new c a r r i e r
f r e q 9 . 0 0 1 5 MHz & l o c a l o s c i l l a t o r f r e q 1 2 . 5 0 1 5
MHz
5 fco =9.0015; // c a r r i e r o s c i l l a t o r f r e q
6 flo =12.5015; // l o c a l o s c i l l a t o r f r e q
7 // D e t e r m i n a t i o n o f new o / p f r e q
8 fo = fco + flo ;
9 disp ( ’MHz ’ ,fo , ’ The o /p c a r r i e r f r e q ’ ) ;

Scilab code Exa 5.9 example 8

1 clc ;
2 // p a g e no 204
3 // p r o b no . 5 . 9
4 //A d i r e c t FM t r a n s m i t t e r w i t h k f =2kHz /V & max
d e v i a t n o f 300 Hz .
5 kf =2*10^3; tx_dev =300;
6 disp ( ’ a ) S e e f i g . 5 . 2 3 f o r t h i s b l o c k diagram ’ );

39
7 f_mul =3*2*3; // 3 s t a g e f r e q m u l t i p l i e r w i t h t r i p l e r
d o u b l e r and t r i p l e r
8 // b ) D e t e r m i n a t i o n o f max dev a t o s c i l l a t o r
9 dev_o =5*10^3; // D e v i a t i o n a t o /p
10 dev_osc = dev_o / f_mul ;
11 if dev_osc < tx_dev then
12 disp ( ’ b ) T r a n s m i t t e r i s c a p a b l e o f 5 kHz d e v i a t i o n
’ );
13 else
14 disp ( ’ b ) T r a n s m i t t e r i s n o t c a p a b l e o f 5 kHz
deviation ’)
15 end ;
16 // c ) D e t e r m i n a t i o n o f o s c i l l a t o r f r e q
17 fo =150; // c a r r i e r f r e q i n MHz
18 fosc = fo / f_mul ;
19 disp ( ’MHz ’ , fosc , ’ c ) The o s c i l l a t o r f r e q i s ’ ) ;
20 // d ) D e t e r m i n a t i o n o f a u d i o v o l t a g e f o r f u l l
deviation
21 Vi_peak = dev_osc / kf ; // dev a t o s c i l l a t o r o f 278 Hz
c a u s e s f u l l 5 kHz d e v i a t i o n
22 // c o n v e r t i n g peak v o l t a g e t o rms v o l t a g e
23 Vi_RMS = Vi_peak / sqrt (2) ;
24 disp ( ’mV ’ , Vi_RMS *10^3 , ’ The a u d i o RMS v o l t a g e i s ’ )

Scilab code Exa 5.10 example 9

1 clc ;
2 // p a g e no 206
3 // p r o b no . 5 . 1 0
4 // R e f e r f i g . 5 . 2 4
5 // T i l l t h e a n t e n n a t h e r e a r e 2 d o u b l e r and 4 t r i p l e r
6 f_mul =18*18;
7 dev_o =75*10^3; // o / p f r e q d e v i a t i o n i s 75 kHz
8 // D e t e r m i a n t i o n o f r e q d f r e q d e v i a t i o n o f o s c i l l a t o r
9 dev_osc = dev_o / f_mul ;

40
10 disp ( ’ Hz ’ , dev_osc , ’ Freq d e v i a t i o n o f o s c i l l a t o r is ’)
;

Scilab code Exa 5.11 example 10

1 clc ;
2 // p a g e no 207
3 // p r o b no . 5 . 1 1
4 //A PLL FM g e n e r a t o r r e f e r i n g f i g . 5 . 2 5 w i t h
5 f_ref =100*10^3; N =200; kf =50*10^3; // i n Hz/V
6 // a ) D e t e r m i n a t i o n o f c a r r i e r f r e q o f o / p s i g n a l
7 fc = N * f_ref ;
8 disp ( ’MHz ’ , fc /10^6 , ’ The c a r r i e r f r e q o f o /p s i g n a l ’ )
;
9 // b ) D e t e r m i n a t i o n o f RMS m o d u l a t i n g v o l t a g e f o r 10
kHz d e v i a t i o n
10 dev =10*10^3;
11 Vp = dev / kf ;
12 // C o n v e r t i n g peak v o l t a g e t o RMS v o l t a g e
13 V_RMS = Vp / sqrt (2) ;
14 disp ( ’mV ’ , V_RMS *1000 , ’ The RMS v o l t a g e f o r n e e d e d
d e v i a t i o n i s ’ );

41
Chapter 6

Receivers

Scilab code Exa 6.1 example 1

1 clc ;
2 // p a g e no 227
3 // p r o b no . 6 . 1
4 //A t u n e d c k t w i t h b r o a d a s t band ( 5 4 0 t o 1 7 0 0 kHz ) .
Bw=10kHz a t 540 kHz
5 BW1 =10*10^3; f1 =540*10^3; f2 =1700*10^3; // a l l i n Hz
6 // D e t e r m i n a t i o n o f BW a t 1 7 0 0 kHz
7 BW2 = BW1 * sqrt ( f2 / f1 ) ;
8 disp ( ’ kHz ’ , BW2 /1000 , ’ The Bandwidth a t 1 7 0 0 kHz ’ ) ;

Scilab code Exa 6.4 example 2

1 clc ;
2 // p a g e no 236
3 // p r o b no . 6 . 4
4 //A r e c e i v e r w i t h s e n s i t i v i t y 0 . 5 uV & b l o c k i n g
dynamic r a n g e 70dB .
5 // D e t e r m i n a t i o n o f v p l t a g e s i g n a l V1

42
6 P1_P2 =70; V2 =0.5*10^ -6; // l e t
7 V1 = V2 *10^( P1_P2 /20) ;
8 disp ( ’mV ’ , V1 *1000 , ’ The v o l t a g e v a l u e o f signal is ’)
;

Scilab code Exa 6.5 example 3

1 clc ;
2 // p a g e no 238
3 // p r o b no . 6 . 5
4 // R e f e r t h e f i g 6 . 5
5 //A r e c e i v e r t u n e d t o s t a t i o n a t 590 kHz
6 f_if =455*10^3; // I n t e r m e d i a t e f r e q
7 f_sig =590*10^3;
8 // a ) D e t e r m i n t i o n o f image f r e q
9 f_image = f_sig +2* f_if ;
10 disp ( ’ kHz ’ , f_image /1000 , ’ a ) The image f r e q i s ’ ) ;
11 Q =40; // Q f a c t o r
12 // b ) D e t e r m i n a t i o n o f image r e j e c t i o n
13 x =( f_image / f_sig ) -( f_sig / f_image ) ;
14 Asig_Aimage = sqrt (1+( Q * x ) ^2) ; // image r e j e c t i o n
15 // c o n v e r t i n g i n dB
16 IR_dB =20* log10 ( Asig_Aimage ) ;
17 disp ( ’ dB ’ , IR_dB , ’ b ) The image r e j e c t i o n i s ’ ) ;

Scilab code Exa 6.6 example 4

1 clc ;
2 // p a g e no 239
3 // p r o b no . 6 . 6
4 //An AM h i g h −f r e q r e c e i v e r w i t h IF =1.8MHz t u n e d a t
f r e q 10MHz
5 f_sig =10; f_if =1.8; // A l l f r e q i n MHz

43
6 // D e t e r m i n a t i o n o f l o c a l o s c i l l a t o r f r e q f l o
7 f_lo = f_sig + f_if ;
8 // d e t e r m i n a t i o n o f f r e q . t h a t c a u s e IF r e s p o n s e
9 m =[1 1 2 2]; // v a l u e s o f m t h a t a r e i n t e g e r
10 n =[1 2 1 2]; // v a l u e s o f n t h a t a r e i n t e g e r
11 for i =1:4
12 fs1 ( i ) =(( m ( i ) / n ( i ) ) *( f_lo ) ) +(( f_if ) / n ( i ) ) ;
13 end ;
14 for i =1:4
15 fs2 ( i ) =(( m ( i ) / n ( i ) ) *( f_lo ) ) -(( f_if ) / n ( i ) ) ;
16 end ;
17 disp ( ’ A l l f r e q s a r e i n MHz ’ ,fs2 , fs1 , ’ The d i f f e r e n t
f r e q s a r e ’ );

Scilab code Exa 6.7 example 5

1 clc ;
2 // p a g e no 245
3 // p r o b no . 6 . 7
4 //An FM d e t e c t o r p r o d u c e Vpp=1.2V w i t h dev =10kHz
5 Vpp =1.2; dev =10*10^3;
6 // D e t e r m i n a t i o n o f d e t e c t o r s e n s i t i v i t y
7 Vp = Vpp /2; // Peak v o l t a g e
8 kd = Vp / dev ;
9 disp ( ’ uV/Hz ’ , kd *10^6 , ’ t h e s e n s i t i v i t y o f d e t e c t o r i s
’ );

Scilab code Exa 6.8 example 6

1 clc ;
2 // p a g e no 249
3 // p r o b no . 6 . 8
4 //A PLL FM d e t e c t o r w i t h k f =100kHz /V & dev =75kHz

44
5 kf =100*10^3; dev =75*10^3;
6 // D e t e r m i n a t i o n o f RMS v o l t a g e
7 Vp_op = dev / kf ;
8 // C o n v e r t i n g peak v o l t a g e i n RMS v o l t a g e
9 V_RMS = Vp_op / sqrt (2) ;
10 disp ( ’V ’ , V_RMS , ’ The RMS v o l t a g e i s ’ ) ;

Scilab code Exa 6.9 example 7

1 clc ;
2 // p a g e no 258
3 // p r o b no . 6 . 9
4 //An IF t r a n s f o r m e r a t 455 kHz & p r i m a r y c k t h a s Qp
=40 & s e c o n d a r y Q=30
5 fo =455*10^3; Qp =40; Qs =30;
6 // a ) D e t e r m i n a t i o n o f c r i t i c a l c o u p l i n g f a c t o r
7 kc =1/ sqrt ( Qp * Qs ) ;
8 disp ( kc , ’ a ) The c r i t i c a l c o u p l i n g f a c t o r i s ’ ) ;
9 // b ) D e t e r m i n a t i o n o f optimum c o u p l i n g f a c t o r
10 Kopt =1.5* kc ;
11 disp ( Kopt , ’ b ) The optimum c o u p l i n g f a c t o r i s ’ ) ;
12 // c ) D e t e r m i n a t i o n o f optimum c o u p l i n g f a c t o r
13 B = Kopt * fo ;
14 disp ( ’ kHz ’ ,B /1000 , ’ c ) The BW u s i n g optimum c o u p l i n g
f a c t o r i s ’ );

Scilab code Exa 6.10 example 8

1 clc ;
2 // p a g e no 261
3 // p r o b no . 6 . 1 0
4 // R e c e i v e r r e f e r i n g i n fig .6.28
5 f_sig =25*10^6; // s i g n a l i /p f r e q

45
6 f_lo1 =29.5*10^6; // I s t l o c a l o s c i l l a t o r f r e q
7 // d e t e r m i n a t i o n o f I s t IF which u s e s h i g h s i d e
injection
8 f_IF1 = f_lo1 - f_sig ; // h i g h s i d e i n j e c t i o n
9 disp ( ’MHz ’ , f_IF1 /10^6 , ’ The f i r s t IF i s ’ ) ;
10 // D e t e r m i n a t i o n o f I I n d IF which u s e s low s i d e
injection
11 f_lo2 =4*10^6; // I I n d l o c a l o s c i l l a t o r f r e q
12 f_IF2 = f_IF1 - f_lo2 ;
13 disp ( ’ kHz ’ , f_IF2 /10^3 , ’ The s e c o n d IF i s ’ ) ;

Scilab code Exa 6.11 example 9

1 clc ;
2 // p a g e no 265
3 // p r o b no . 6 . 1 1
4 //An S−m e t e r i s g i v e n
5 V1 =50*10^ -6; // s i g n a l s t r e n g t h a t t r a n s m i t t e r i n V
6 P =18; // 18 dB power
7 V2 = V1 /(10^( P /20) ) ;
8 disp ( ’ uV ’ , V2 *10^6 , ’ S i g n a l s t r e n g t h a t r e c e i v e r i /p
i s ’ );

46
Chapter 7

Digital communication

Scilab code Exa 7.1 example 1

1 clc ;
2 // p a g e no 285
3 // p r o b no 7 . 1
4 // I n t h e g i v e n p r o b l e m a s i g n a l is transmitted
using a f o u r l e v e l code
5 M =4;
6 B =3.2; // i n KKz
7 SNR =35; // i n dB
8 //By u s i n g Shannon−H a r t l e y theorem , ignoring noise
we have
9 c =2* B * log2 ( M ) ;
10 disp ( ’ kb / s ’ ,c , ’ maximum d a t a r a t e f o r four −l e v e l code
i n t h e a v a i l a b l e bandwidth ’ ) ;
11 //Now we have t o u s e Shannon l i m i t t o f i n d t h e
maximum d a t a r a t e f o r any c o d e
12 //SNR i n power r a t i o i s
13 SNR1 =10^(35/10) ;
14 C = B * log2 (1+ SNR1 ) ;
15 disp ( ’ kb / s ’ ,C , ’ maximum d a t a r a t e f o r f o u r − l e v e l c o d e
i n t h e a v a i l a b l e bandwidth ’ ) ;
16 // Both r e s u l t s a r e maxima , we have t o c h o o s e l e s s e r

47
o f t h e two .
17 // T h e r e f o r e we c h o o s e c =12.8 kp / s

Scilab code Exa 7.2 example 2

1 clc ;
2 // p a g e no . 289
3 // p r o b no . 7 . 2
4 // I n t h e g i v e n p r o b l e m
5 fm =30; // i n KHz
6 fs =44.1; // s a m p l i n g r a t e i n KHz
7 fa = fs - fm ; // a u d i b l e f r e q u e n c y
8 disp ( ’KHz ’ ,fa , ’ The a u d i b l e f r e q u e n c y i s ’ ) ;

Scilab code Exa 7.3 example 3

1 clc ;
2 // p a g e no 291
3 // p r o b no 7 . 3
4 // p a r t a : no o f s a m p l e s ,
5 m =8;
6 N =2^ m ; // t h e number o f l e v e l s
7 disp ( ’ l e v e l s ’ ,N , ’ a ) The number o f l e v e l s w i t h m=8
a r e ’ );
8 // p a r t b :
9 m =16;
10 N =2^ m ; // t h e number o f l e v e l s
11 disp ( ’ l e v e l s ’ ,N , ’ b ) The number o f l e v e l s w i t h m=16
a r e ’ );

48
Scilab code Exa 7.4 example 4

1 clc ;
2 // p a g e no 292
3 // p r o b no 7 . 4
4 // I n t h e g i v e n p r o b l e m
5 m =16;
6 DR =1.76 +6.02* m ; // Dynamic r a n g e f o r a l i n e a r PCM
i n dB
7 disp ( ’ dB ’ ,DR , ’ Dynamic r a n g e f o r a l i n e a r PCM ’ ) ;

Scilab code Exa 7.5 example 5

1 clc ;
2 // p a g e no 295
3 // p r o b no 7 . 5
4 // i n t h e g i v e n p r o b l e m
5 fs =40; m =14;
6 // t h e minimum d a t a r a t e n e e d e d t o t r a n s m i t a u d i o is
g i v e n by
7 D = fs * m ;
8 disp ( ’Kb/ s ’ ,D , ’ The minimum d a t a r a t e n e e d e d t o
transmit audio i s ’ );

Scilab code Exa 7.6 example 6

1 clc ;
2 // p a g e no 294
3 // p r o b no 7 . 6
4 // I n t h e g i v e n problem , i n p u t t o a mu−law
c o m p r e s s e r i s +ve ,
5 // w i t h i t s v o l t a g e one−h a l f t h e max v a l u e
6 u =255;

49
7 Vi =1; //maximum i n p u t v a l u e i s c ons id ere d as unity
volts
8 vi =0.5;
9 V0 =1; // c o n s i d e r maximum o u t p u t v o l t a g e a s u n i t y
volts
10 vo = V0 * log (1+ u * vi / Vi ) / log (1+ u ) ;
11 disp ( ’ v o l t s ’ ,vo , ’ The maximum o u t p u t v o l t a g e p r o d u c e d
i s ’ );

50
Chapter 8

The Telephone System

Scilab code Exa 8.3 example 1

1 clc ;
2 // p a g e no 323
3 // p r o b no 8 . 3
4 //A t e l e p h o n e s i g n a l t a k e s 3 ms t o r r e a a c h i t s
destination
5 t =2;
6 // D e t e r m i n a t i o n o f n e t
l o s s VNL r e q d f o r a c c e p t a b l e
amount o f e c h o .
7 VNL =(0.2* t ) +0.4;
8 disp ( ’ dB ’ ,VNL , ’ The n e t l o s s i s ’ ) ;

Scilab code Exa 8.5 example 2

1 clc ;
2 // p a g e no 326
3 // p r o b no 8 . 5
4 // R e f e r i n g t h e f i g . 8 . 1 5 c h a n n e l 12 h a s l o w e s t
c a r r i e r r f r e q 64 kHz

51
5 F =64;
6 c_total =12;
7 // C a r r i e r f r e q g o e s up 4 kHz p e r c h a n n e l
8 f_up =4;
9 // D e t e r m i n a t i o n o f c a r r i e r f r e q f o r c h a n n e l 5
10 c =5;
11 fc = F +( f_up *( c_total - c ) ) ;
12 disp ( ’ kHz ’ ,fc , ’ The v a l u e o f c a r r i e r f r e q f o r c h a n n e l
5 i s ’ );

Scilab code Exa 8.6 example 3

1 clc ;
2 // p a g e no 328
3 // p r o b no 8 . 6
4 // 2 kHz t o n e i s p r e s e n t on c h a n n e l 5 o f g r o u p 3 o f a
supergroup
5 // r e f e r t o e x a m p l e 8 . 5 , c a l c u l a t e d f c =92kHz
6 fc =92; // i n kHz
7 // Here s i g n a l i s l o w e r s i d e b a n d , t h e 2 kHz b a s e b a n d
s i g n a l t h e r e f o r e w i l l be
8 fg = fc -2;
9 // from f i g 1 0 . 1 5 , g r o u p 3 i n t h e s u p e r g r o u p i s moved
t o t h e r a n g e 408 −456 kHz , w i t h a s u p p r e s s e d
c a r r i e r f r e q u e n c y o f 516 kHz .
10 fsc =516; // i n kHz
11 // t h e m o d u l a t i o n i s l o w e r s i d e b a n d , s o t h e s u p e r g r o u p
o / p f r e q w i l l be 90 kHz l o w e r t h a n c a r r i e r f r e q
12 fsg = fsc - fg ;
13 disp ( ’ kHz ’ ,fsg , ’ The t o n e a p p e a r i n t h e s u p e r g r o u p
output at f r e q u e n c y o f ’ );

52
Chapter 9

Data Transmission

Scilab code Exa 9.2 example 1

1 clc ;
2 // p a g e no 349
3 // p r o b no 9 . 2
4 Nd =7; N_start =1; N_stop =1; N_parity =1;
5 Nt = Nd + N_start + N_stop + N_parity ;
6 efficiency = Nd / Nt *100;
7 disp ( ’% ’ , efficiency , ’ The e f f i c i e n c y i s ’ ) ;

Scilab code Exa 9.6 example 2

1 clc ;
2 // p a g e no 358
3 // p r o b no 9 . 6
4 m =21;
5 // The c o r r e c t number o f c h e c k b i t s i s the s m a l l e s t
number t h a t s a t i s f y t h e e q u a t i o n 2ˆ n >= m+n +1;
6 for n =1:1:10 // we c h o o s e r a n g e o f 1 t o 10
7 a = m + n +1;

53
8 b =2^ n ;
9 if (b >= a )
10 disp (n , ’ hammming b i t s are required ’)
11 break ;
12 end
13 end

54
Chapter 12

Digital Modulation and


Modems

Scilab code Exa 12.1 example 1

1 clc ;
2 // p a g e no 407
3 // p r o b no 12 1
4 //A r a d i o c h a n n e l w i t h BW=10KHz and SNR=15 dB
5 B =10*10^3;
6 snr =15;
7 // c o n v e r t i n g dB i n power r a t i o
8 SNR =10^( snr /10) ;
9 // a ) D e t e r m i n a t i o n o f t h e o r e t i c a l max d a t a r a t e
10 C1 = B * log2 (1+ SNR ) ;
11 disp ( ’ kb / s ’ , C1 /1000 , ’ a ) The t h e o r e t i c a l max d a t a r a t e
i s ’ );
12 // b ) D e t e r m i n a t i o n o f d a t a r a t e w i t h 4 s t a t e s i . e M=4
13 M =4;
14 C2 =2* B * log2 ( M ) ;
15 disp ( ’ kb / s ’ , C2 /1000 , ’ b ) The d a t a r a t e f o r 4 s t a t e s i s
’ );

55
Scilab code Exa 12.2 example 2

1 clc ;
2 // p a g e no 408
3 // p r o b no 12 2
4 //A m o d u l a t o r t r a n s m i t symbol w i t h symbol r a t e =10k /
s e c w i t h 64 s t a t e s
5 M =64;
6 S =10000;
7 // Baud r a t e i s s i m p l y symbol r a t e
8 disp ( ’ kbaud ’ ,S /1000 , ’ The baud r a t e i s ’ ) ;
9 // D e t e r m i n a t i o n o f b i t r a t e
10 C = S * log2 (64) ;
11 disp ( ’ kb / s ’ ,C /1000 , ’ The b i t r a t e i s ’ ) ;

Scilab code Exa 12.3 example 3

1 clc ;
2 // p a g e no 411
3 // p r o b no 12 3
4 f =200*10^3;
5 fb =270.833 *10^3;
6 data_rate =270.833 *10^3
7 fc =880*10^6;
8 bandwidth =200*10^3;
9 freq_shift =0.5* fb ;
10 disp ( ’ Hz ’ , freq_shift , ’ a ) The f r e q u e n c y s h i f t i s ’ ) ;
11 // The s h i f t e a c h way from t h e c a r r i e r f r e q u e n c y i s
h a l f the f r e q s h i f t
12 f_max = fc +0.25* fb ;
13 disp ( ’ Hz ’ , f_max , ’ b ) The maximum f r e q u e n c y i s ’ ) ;
14 f_min = fc -0.25* fb ;

56
15 disp ( ’ Hz ’ , f_min , ’ The minimum f r e q u e n c y i s ’ ) ;
16 bandwidth_efficiency = data_rate / bandwidth ;
17 disp ( ’ b / s /Hz ’ , bandwidth_efficiency , ’ The bandwidth
e f f i c i e n c y i n b / s /Hz i s ’ ) ;

Scilab code Exa 12.4 example 4

1 clc ;
2 // p a g e no 412
3 // p r o b no 12 4
4 baud_rate =24.3; // i n k i l o b a u d
5 // I n t h i s p r o b l e m d i b i t s y s t e m i s u s e d .
6 // T h e r e f o r e s y m b o l r a t e=b a u d r a t e =0.5∗ b i t r a t e
7 bit_rate =2* baud_rate ;
8 disp ( ’ kb / s ’ , bit_rate , ’ The c h a n n e l d a t a r a t e i s ’ ) ;

Scilab code Exa 12.5 example 5

1 clc ;
2 // p a g e no 413
3 // p r o b no 12 5
4 no_of_phase_angles =16;
5 no_of_amplitudes =4;
6 no_of_states_per_symbol = no_of_phase_angles *
no_of_amplitudes ;
7 bit_per_symbol = log2 ( no_of_states_per_symbol ) ;
8 disp ( bit_per_symbol , ’ The no . o f b i t s p e r symbol i s ’ )
;

Scilab code Exa 12.6 example 6

57
1 clc ;
2 // p a g e no 415
3 // p r o b no 12 6
4 B =3*10^3; SNR_dB =30;
5 SNR_power =10^(30/10) ;
6 C = B * log2 (1+ SNR_power ) ;
7 disp ( ’ b / s ’ ,C , ’ Shannon l i m i t ’ ) ;

58
Chapter 13

Multiplexing and Multiple


Access Techniques

Scilab code Exa 13.1 example 1

1 clc ;
2 // p a g e no 437
3 // p r o b no 13 1
4 freq_band =1*10^6;
5 // A) For SSBSC AM, t h e bandwidth i s t h e same a s t h e
maximunm m o d u l a t i n g f r e q .
6 fmax =4*10^3;
7 B = fmax ;
8 no_of_signal = freq_band / B ;
9 disp ( no_of_signal , ’ a ) The number o f s i g n a l s a r e ’ ) ;
10 // B) For DSB AM, t h e bandwidth i s t w i c e t h e maximunm
modulating f r e q .
11 B =2* fmax ;
12 no_of_signal = freq_band / B ;
13 disp ( no_of_signal , ’ b ) The number o f s i g n a l s a r e ’ ) ;
14 // C) U s i n g Carson ’ s Rule t o a p p r o x i m a t e t h e
bandwidth
15 f_max =15*10^3; deviation =75*10^3;
16 B =2*( deviation + f_max ) ;

59
17 no_of_signal = freq_band / B ;
18 disp ( no_of_signal , ’ c ) The number o f s i g n a l s a r e ’ ) ;
19 // D) Use Shannon−H a r t l e y t h e o r e m t o f i n d t h e
bandwidth
20 C =56*10^3; M =4; // f o r QPSK
21 B = C /(2* log2 ( M ) ) ;
22 no_of_signal = freq_band / B ;
23 disp ( no_of_signal , ’ d ) The number o f s i g n a l s a r e ’ ) ;

Scilab code Exa 13.2 example 2

1 clc ;
2 // p a g e no 444
3 // p r o b no 13 2
4 // V o i c e t r a n s m i s s s i o n o c c u p i e s 30 kHz . S p r e a d
s p e c t r u m i s u s e d t o i n c r e a s e BW t o 10MHz
5 B1 =30*10^3; //BW i s 30 kHz
6 B2 =10*10^6; //BW i s 10 MHz
7 T =300; // n o i s e temp a t i /p
8 PN = -110; // s i g n a l h a s t o t a l s i g n a l power o f −110 dBm
at r e c e i v e r
9 k =1.38*10^ -23; // Boltzmann ’ s c o n s t i n J /K
10 // D e t e r m i n a t i o n o f n o i s e power a t B1=30kHz
11 PN1 =10*( log10 ( k * B1 * T /10^ -3) ) ;
12 disp ( ’dBm ’ ,PN1 , ’ The n o i s e power a t BW=30 kHz i s ’ ) ;
13 // D e t e r m i n a t i o n o f n o i s e power a t B2=10MHz
14 PN2 =10*( log10 ( k * B2 * T /10^ -3) ) ;
15 disp ( ’dBm ’ ,PN2 , ’ The n o i s e power a t BW=10 MHz i s ’ ) ;
16 // D e t e r m i n a t i o n o f SNR f o r 30 kHz BW
17 SNR1 = PN - PN1 ;
18 disp ( ’ dB ’ , SNR1 , ’ The v a l u e o f SNR f o r BW=30 kHz i s ’ ) ;
19 // D e t e r m i n a t i o n o f SNR f o r 10MHz BW
20 SNR2 = PN - PN2 ;
21 disp ( ’ dB ’ , SNR2 , ’ The v a l u e o f SNR f o r BW=10 MHz i s ’ ) ;

60
Scilab code Exa 13.3 example 3

1 clc ;
2 // p a g e no 445
3 // p r o b no 13 3
4 no_of_freq_hops =100; total_time_req =10;
5 time_for_each_freq = total_time_req /
no_of_freq_hops ;
6 disp ( ’ s e c / hop ’ , time_for_each_freq , ’ Time r e q u i r e d f o r
each f r e q ’ );

Scilab code Exa 13.4 example 4

1 clc ;
2 // p a g e no 446
3 // p r o b no 13 4
4 bit_rate =16*10^3; // i n bps
5 chip_rate =10:1;
6 no_of_chip =10;
7 total_bit_rate = no_of_chip * bit_rate ;
8 m =4; n = log2 ( m ) ;
9 symbol_rate = total_bit_rate / n ;
10 disp ( ’ baud ’ , symbol_rate , ’ The no o f s i g n a l changes i .
e . symbol r a t e i s ’ );

Scilab code Exa 13.5 example 5

1 clc ;
2 // p a g e no 447

61
3 // p r o b no 13 5
4 // s i g n a l w i t h bandwidth Bbb=200 kHz & SNR=20 dB
spred at chip rate 50:1
5 Bbb =200*10^3; // Bandwidth
6 Gp =50; // c h i p r a t e
7 SNR_in =20; //SNR i s 20 dB w i t h o u t s p r e a d i n g
8 // D e t e r m i n a t i o n o f BW a f t e r s p r e a d i n g
9 Brf = Gp * Bbb ;
10 disp ( ’MHz ’ ,Brf , ’ The v a l u e o f BW a f t e r s p r e a d i n g ’ ) ;
11 // C o n v e r t i n g i n t o dB
12 Gp_dB =10* log10 ( Gp ) ;
13 disp ( ’ dB ’ , Gp_dB , ’ The v a l u e o f p r o c e s s i n g g a i n ’ ) ;
14 // D e t e r m i n a t i o n o f SNR a f t e r s p r e a d n g
15 SNR_out = SNR_in - Gp_dB ;
16 disp ( ’ dB ’ , SNR_out , ’ The v a l u e o f SNR a f t e r s p r e a d i n g
i n dB ’ ) ;

62
Chapter 14

Transmission Lines

Scilab code Exa 14.1 example 1

1 clc ;
2 // p a g e no 461
3 // p r o b no . 1 4 . 1
4 //A c o a x i a l c a b l e w i t h c a p a c i t a n c e =90pF/m &
c h a r a c t e r i s t i c i m p e d a n c e =50 ohm
5 C =90*10^ -12; Zo =50;
6 // D e t e r m i n a t i o n o f i n d u c t a n c e o f 1m l e n g t h
7 L =( Zo ^2) * C ;
8 disp ( ’ nH/m ’ ,L *10^9 , ’ The i n d u c t a n c e o f 1m l e n g t h is ’)
;

Scilab code Exa 14.2 example 2

1 clc ;
2 // p a g e no 462
3 // p r o b no . 1 4 . 2
4 // a ) D e t e r m i n a t i o n o f i m p e d a n c e o f open w i r e w i t h
d i a m e t e r 3mm & r =10mm

63
5 D =3/2; r =10; // A l l v a l u e s a r e i n mm
6 Zo1 =276* log10 ( r / D ) ;
7 disp ( ’ ohm ’ ,Zo1 , ’ a ) The c h a r a c t e r i s t i c impedance o f
conductor i s ’ );
8 // b ) D e t e r m i n a t i o n o f i m p e d a n c e o f c o a x i a l w i t h e r
= 2 . 3 , i n n e r d i a m e t e r =2mm & o u t e r d i a m e t e r =8mm
9 er =2.3; D =8; d =2; // A l l d i a m e t e r v a l u e s i n mm
10 Zo2 =(138/ sqrt ( er ) ) * log10 ( D / d ) ;
11 disp ( ’ ohm ’ ,Zo2 , ’ b ) The c h a r a c t e r i s t i c i m p e d a n c e o f
c o a x i a l c a b l e i s ’ );

Scilab code Exa 14.3 example 3

1 clc ;
2 // p a g e no 463
3 // p r o b no . 1 4 . 3
4 // C a b l e w i t h t e f l o n d i e l e c t r i c e r =2.1
5 er =2.1; c =3*10^8; // V e l o c i t y o f l i g h t
6 // D e t e r m i n a t i o n o f v e l o c i t y f a c t o r
7 Vf =1/ sqrt ( er ) ;
8 disp ( Vf , ’ The v a l u e o f v e l o c i t y f a c t o r i s ’ ) ;
9 // D e t e r m i n a t i o n o f p r o p a g a t i o n v e l o c i t y
10 Vp = Vf * c ;
11 disp ( ’m/ s ’ ,Vp , ’ The v a l u e o f p r o p a g a t i o n v e l o . i s ’ ) ;

Scilab code Exa 14.4 example 4

1 clc ;
2 // p a g e no 468
3 // p r o b no . 1 4 . 4
4 // R e f e r f i g . 1 4 . 1 3 ( a )
5 vs =1; // s o u r c e v o l t a g e
6 Rs =50; // s o u r c e r e s i s t a n c e

64
7 Zo =50; // l i n e i m p e d a n c e
8 RL =25; // l o a d r e s i s t a n c e
9 l =10; // l e n g t h o f l i n e
10 vf =0.7; // v e l o c i t y f a c t o r
11 Vi =0.5;
12 c =3*10^8; // v e l o o f l i g h t
13 // Vs w i l l d i v i d e b e t w e e n Rs and Zo o f t h e l i n e . S i n c e
two r e s i s t o r s a r e e q u a l , t h e v o l t a g e w i l l d i v i d e
equally .
14 // T h e r e f o r e a t t =0 , t h e v o l t a g e a t t h e s o u r c e end o f
t h e l i n e w i l l r i s e from z e r o t o 0 . 5V . The v o l t a g e
at the load w i l l remain z e r o u n t i l l the s u rg e
r e a c h e s i t . The t i m e f o r t h i s i s
15 T = l /( vf * c ) ;
16 // A f t e r T s e c , t h e v o l t a g e a t t h e l o a d w i l l r i s e .
The r e f l e c t i o n c o e f f i c i e n t i s g i v e n a s
17 refl_coeff =( RL - Zo ) /( RL + Zo )
18 //Now r e f l e c t i o n v o l t a g e i s
19 Vr = refl_coeff * Vi ;
20 // The t o t a l v o l t a g e a t t h e l o a d i s
21 Vt = Vr + Vi ;
22 disp ( ’V ’ ,Vt , ’ The t o t a l v o l t a g e a t t h e l o a d i s ’ ) ;
23 // The r e f l e c t e d v o l t a g e w i l l p r o p o g a t e back a l o n g
t h e l i n e , r e a c h i n g t h e s o u r c e a t t i m e 2T . A f t e r
t h i s t h e v o l t a g e w i l l be 0 . 3 3 3 5V a l l a l o n g t h e
line
24 // The v o l t a g e a c r o s s t h e l i n e , and t h e l o a d w i l l be
25 VL = vs *( RL /( RL + Zo ) ) ;
26 disp ( ’V ’ ,VL , ’ The v o l t a g e a c r o s s t h e l i n e , ’ ) ;

Scilab code Exa 14.5 example 5

1 clc ;
2 // p a g e no 472
3 // p r o b no . 1 4 . 5

65
4 // S t a n d a r d c o a x i a l c a b l e RG−8/U w i t h 45 d e g r e e p h a s e
s h i f t a t 200MHz
5 p =45; f =200*10^6; c =3*10^8; // Speed o f l i g h t i n m/ s
6 vf =0.66; // v e l o . f a c t o r f o r t h i s l i n e
7 vp = vf * c ; // D e t e r m i n a t i o n o f p r o p a g a t i o n v e l o .
8 wav = vp / f ; // D e t e r m i n a t i o n o f w a v e l e n g t h o f s i g n a l
9 // D e t e r m i n a t i o n o f r e q d l e n g t h f o r 45 d e g r e e p h a s e
shift
10 L = wav *( p /360) ;
11 disp ( ’m ’ ,L , ’ The l e n g t h r e q d f o r p h a s e s h i f t i s ’ ) ;

Scilab code Exa 14.6 example 6

1 clc ;
2 // p a g e no 476
3 // p r o b no . 1 4 . 6
4 //A 50ohm l i n e t e r m i n a t e d i n 25ohm r e s i s t a n c e
5 Zo =50; Zl =25;
6 // D e t e r m i n a t i o n o f SWR
7 SWR = Zo / Zl ; // I n t h i s c a s e Zo>Z l
8 disp ( SWR , ’ The v a l u e o f SWR i s ’ ) ;

Scilab code Exa 14.7 example 7

1 clc ;
2 // p a g e no 477
3 // p r o b no . 1 4 . 7
4 //A g e n e r a t o r s e n d s 50mW a t 50ohm l i n e & r e f l e c t i o n
c o e f f I =0.5
5 Pi =50; I =0.5;
6 // D e t e r m i n a t i o n o f amount o f power r e f l e c t e d
7 Pr =( I ^2) * Pi ;
8 disp ( ’mW’ ,Pr , ’ The amount o f power r e f l e c t e d i s ’ ) ;

66
9 // D e t e r m i n a t i o n o f r e m a i n d e r power t h a t r e a c h e s l o a d
10 Pl = Pi - Pr ;
11 disp ( ’mW’ ,Pl , ’ The power d i s s i p a t e d i n l o a d i s ’ ) ;

Scilab code Exa 14.8 example 8

1 clc ;
2 // p a g e no 478
3 // p r o b no . 1 4 . 8
4 //A t r a n s m i t t e r s u p p l i e s 50W w i t h SWR 2 : 1
5 Pi =50; SWR =2;
6 // D e t e r m i n a t i o n o f power a b s o r b e d by l o a d
7 Pl =(4* SWR * Pi ) /(1+ SWR ) ^2;
8 disp ( ’W’ ,Pl , ’ The power a b s o r b e d by l o a d i s ’ ) ;

Scilab code Exa 14.9 example 9

1 clc ;
2 // p a g e no 545
3 // p r o b no 1 4 . 9
4 Zo =50; // l i n e i m p e d e n c e i n ohm
5 ZL =100; // l o a d i m p e d a n c e i n ohm
6 vf =0.8; // v e l o c i t y f a c t o r
7 l =1; // l e n g t h o f l i n e
8 f =30*10^6; // f r e q o f o p e r a t i o n
9 c =3*10^8; // v e l o o f l i g h t
10 // we have t o f i n d t h e l e n g t h o f l i n e i n d e g r e e
11 wl = vf * c / f // w a v e l e n g t h
12 // Then t h e l e n g t h o f l i n e i n d e g r e e i s
13 ang = l / wl *360
14 // c a l c u l a t i o n o f i m p e d a n c e
15 Z = Zo *( ZL +( %i * Zo * tand ( ang ) ) ) /( Zo +( %i * ZL * tand ( ang ) ) ) ;

67
16 disp ( ’ ohm ’ ,Z , ’ The i m p e d a n c e l o o k i n g t o w a r d t h e l o a d ’
);

Scilab code Exa 14.10 example 10

1 clc ;
2 // p a g e no 481
3 // p r o b no . 1 4 . 1 0
4 //A s e r i e s t u n e d c k t t u n e d a t 1GHz
5 vf =0.95; c =3*10^8; f =10^9;
6 vp = vf * c ; // d e t e r m i n a t i o n o f p r o p a g a t i o n v e l o .
7 wav = vp / f ; // D e t e r m i n a t i o n o f w a v e l e n g t h
8 // D e t e r m i n a t i o n o f l e n g t h
9 L = wav /2; // S i n c e h a l f w a v e l e n g t h s e c t i o n w i i l be
s e r i e s resonant
10 disp ( ’m ’ ,L , ’ The l e n g t h s h o u l d be ’ ) ;

Scilab code Exa 14.11 example 11

1 clc ;
2 // p a g e no 481
3 // p r o b no . 1 4 . 1 0
4 //A Tx d e l i v e r 100W t o a n t e n n a t h r o u g h 45m c o a x i a l
cable w i t h l o s s =4dB / 1 0 0m
5 loss =4/100; L =45; Pout =100;
6 loss_dB = L * loss ; // D e t e r m i n a t i o n o f l o s s i n dB
7 Pin_Pout =10^( loss_dB /10) ;
8 // D e t e r m i n a t i o n o f Tx power
9 Pin = Pout * Pin_Pout ;
10 disp ( ’W’ ,Pin , ’ The t r a n s m i t t e r power must be ’ ) ;

68
Scilab code Exa 14.13 example 12

1 clc ;
2 // p a g e no 490
3 // p r o b no . 1 4 . 1 3
4 Zo =50; // l i n e i m p e d a n c e i n ohm
5 f =100*10^6; // o p e r a t i n g f r e q
6 vf =0.7; // v e l o c i t y f a c t o r
7 L =6; // l e n g t h i n m
8 c =3*10^8; // v e l o o f l i g h t
9 ZL =50+ %i *50; // l o a d i m p e d a n c e i n ohm
10 // we have t o c a l c u l a t e l e n g t h i n d e g r e e , s o f o r t h i s
f i r s t f i n d wl
11 wl = vf * c / f ; // wavength i n m
12 ang =360* L / wl ;
13 // now from t h e g r a p h i n p u t i m p e d a n c e i s 1 9 . 3 6 + %i5
.44;
14 Zi =19.36+ %i *5.44;
15 disp ( ’ ohm ’ ,Zi , ’ I n p u t i m p e d a n c e i s ’ ) ;

Scilab code Exa 14.14 example 13

1 clc ;
2 // p a g e no 492
3 // p r o b no . 1 4 . 1 4
4 Zo =50; // l i n e i m p e d a n c e i n ohm
5 ZL =75+ %i *25;
6 // t h e r e q u i r m e n t o f t h i s i s s i m p l y t o match t h e 50
ohm l i n e t o t h e i m p e d s n c e a t t h i s p o i n t on t h e
l i n e , which i s 8 8 . 3 8 ohm , r e s i s t i v e .
7 Z2 =88.38; // i n ohm
8 // The r e q u i r e d t u r n r a t i o i s
9 N1_N2 = sqrt ( Zo / Z2 ) ;
10 disp ( N1_N2 , ’ The r e q u i r e d t u r n r a t i o i s ’ ) ;

69
Scilab code Exa 14.15 example 14

1 clc ;
2 // p a g e no 494
3 // p r o b no . 1 4 . 1 5
4 // r e f e r p r o b no 1 4 . 1 4
5 Zo =50; // l i n e i m p e d a n c e i n ohm
6 Z2 =88.38; // i n ohm
7 Zo_ = sqrt ( Zo * Z2 ) ;
8 disp ( Zo_ ’) ;

Scilab code Exa 14.16 example 15

1 clc ;
2 // p a g e no 494
3 // p r o b no . 1 4 . 1 6
4 Zo =50; // l i n e i m p e d a n c e i n ohm
5 f =100*10^6; // o p e r a t i n g f r e q i n Hz
6 ZL1 =50+ %i *75; // l o a d i m p e d a n c e w i t h Xc=75
7 Xc =75;
8 // C a p a c i t a n c e i n f a r a d s i s g i v e n a s
9 C =1/(2* %pi * f * Xc ) ;
10 disp ( ’ F ’ ,C , ’ C a p a c i t a n c e i s ’ ) ;

Scilab code Exa 14.17 example 16

1 clc ;
2 // p a g e no 497
3 // p r o b no . 1 4 . 1 7

70
4 Zo =72; // l i n e i m p e d a n c e i n ohm
5 ZL =120 - %i *100; // l o a d i m p e d a n c e
6 // The s t u b must be i n s e r t e d a t a p o i n t on t h e line
where t h e r e a l p a r t o f t h e l o a d a d m i t t a n c e i s
c o r r e c t . This a lu e i s
7 s =1/ Zo ;
8 disp ( ’ S ’ ,s , ’ The v a l u e o f s t u d e i s ’ ) ;

Scilab code Exa 14.18 example 17

1 clc ;
2 // p a g e no 501
3 // p r o b no . 1 4 . 1 8
4 //A TDR d i s p l a y shows d s c o n t i n u i t y at 1 . 4 us & v f
=0.8
5 t =1.4*10^ -6; vf =0.8; c =3*10^8; // Speed o f l i g h t
6 // D e t e r m i n a t i o n o f d i s t a n c e o f f a u l t
7 d =( vf * c * t ) /2; // One−h a l f t i m e i s u s e d t o c a l c u l a t e
8 disp ( ’m ’ ,d , ’ The d i s t a n c e i s ’ ) ;

Scilab code Exa 14.19 example 18

1 clc ;
2 // p a g e no 503
3 // p r o b no . 1 4 . 1 9
4 // 2 a d j a c e n t minima on s l o t t e d a r e 23cm a p a r t w i t h
v e l o f a c t o r =95%
5 L =23*10^ -2; vf =0.95; c =3*10^8; // V e l o . o f l i g h t i n m/ s
6 // D e t e r m i n a t i o n o f w a v e l e n g t h
7 wav =2* L ; // Minima a r e s e p e r a t e d by one−h a l f
wavelength
8 disp ( ’ cm ’ , wav *100 , ’ The w a v e l e n g t h i s ’ ) ;
9 // D e t e r m i n a t i o n o f f r e q .

71
10 f =( vf * c ) / wav ; // vp=v f ∗ c
11 disp ( ’MHz ’ ,f /10^6 , ’ The f r e q i s ’ );

Scilab code Exa 14.20 example 19

1 clc ;
2 // p a g e no 504
3 // p r o b no . 1 4 . 2 0
4 // Frwd power i n Tx l i n e i s 150W, R e v e r s e power =20W
5 Pi =150; Pr =20; // A l l power i n w a t t
6 // D e t e r m i n a t i o n o f SWR
7 SWR =(1+ sqrt ( Pr / Pi ) ) /(1 - sqrt ( Pr / Pi ) ) ;
8 disp ( SWR , ’ The v a l u e o f SWR i s ’ ) ;

72
Chapter 15

Radio Wave Propogation

Scilab code Exa 15.1 example 1

1 clc ;
2 // p a g e no 517
3 // p r o b no . 1 5 . 1
4 // D i e l e c t r i c c o n s t t =2.3
5 er =2.3;
6 // D e t e r m i n a t i o n o f c h a r a c t e r i s t i c i m p e d a n c e
7 Z =377/ sqrt ( er ) ;
8 disp ( ’ ohm ’ ,Z , ’ The c h a r a s t e r i s t i c i m p e d a n c e o f
p o l y e t h y l e n e i s ’ );

Scilab code Exa 15.2 example 2

1 clc ;
2 // p a g e no 518
3 // p r o b no . 1 5 . 2
4 // D i e l e l e c t r i c s t r e n g t h o f a i r =3MV/m
5 e =3*10^6; // e l e c t r i c f i e l d s t r e n g t h
6 Z =377; // i m p e d a n c e o f a i r

73
7 Pd =( e ^2) / Z ; // D e t e r m i n a t i o n o f power d e n s i t y
8 disp ( ’GW/m2 ’ , Pd /10^9 , ’ The max power d e n s i t y i s ’ );

Scilab code Exa 15.3 example 3

1 clc ;
2 // p a g e no 520
3 // p r o b no . 1 5 . 3
4 //An i s o t r o p i c r a d i a t o r w i t h power 100W & d i s t given
i s 10km
5 Pt =100; r =10*10^3;
6 // D e t e r m i n a t i o n o f power d e n s i t y a t r =10km
7 Pd = Pt /(4* %pi *( r ^2) ) ;
8 disp ( ’nW/m2 ’ , Pd *10^9 , ’ Power d e n s i t y a t a p o i n t 10km ’
);

Scilab code Exa 15.4 example 4

1 clc ;
2 // p a g e no 521
3 // p r o b no . 1 5 . 4
4 //An i s o t r o p i c r a d i a t o r r a d i a t e s power =100W a t p o i n t
10km
5 Pt =100; r =10*10^3;
6 // D e t e r m i n a t i o n o f e l e c t r i c f i e l d s t r e n g t h
7 e = sqrt (30* Pt ) / r ;
8 disp ( ’mW/m ’ ,e *1000 , ’ The e l e c t r i c f i e l d s t r e n g t h is ’)
;

Scilab code Exa 15.5 example 5

74
1 clc ;
2 // p a g e no 525
3 // p r o b no . 1 5 . 5
4 //A t r a n s m i t t e r w i t h power o / p=150W a t f c =325MHz .
a n t e n n a g a i n =12 dBi r e c e i v e r a n t e n n a g a i n =5dBi a t
10km away
5 // c o n s i d e r i n g no l o s s i n t h e s y s t e m
6 d =10; Gt_dBi =12; Gr_dBi =5; fc =325; Pt =150;
7 // D e t e r m i n a t i o n o f power d e l i v e r e d
8 Lfs =32.44+(20* log10 ( d ) ) +(20* log10 ( fc ) ) -( Gt_dBi ) -(
Gr_dBi ) ;
9 Pr = Pt /(10^( Lfs /10) ) ;
10 disp ( ’nW ’ , Pr *10^9 , ’ The power d e l i v e r e d t o r e c e i v e r
i s ’ );

Scilab code Exa 15.6 example 6

1 clc ;
2 // p a g e no 525
3 // p r o b no . 1 5 . 6
4 //A t r a n s m i t t e r w i t h o / p power =10W a t f c =250MHz,
c o n n e c t e d t o Tx 10m l i n e w i t h l o s s =3dB / 1 0 0m t 0
a n t e n n a w i t h g a i n =6dBi . Rx a n t e n n a 20km away w i t h
g a i n =4dBi
5 // R e f e r f i g . 1 5 . 6 , a s s u m i n g f r e e s p a c e p r o p a g a t i o n
6 d =20; fc =250; Gt_dBi =6; Gr_dBi =4; loss =3/100; Zl =75; Zo
=50; L =10; Pt =10;
7 Lfs =32.44+(20* log10 ( d ) ) +(20* log10 ( fc ) ) - Gt_dBi - Gr_dBi
; // p a t h l o s s
8 disp ( Lfs ) ;
9 L_tx = L * loss ; // D e t e r m i n a t i o n o f l o s s
10 ref_coe =( Zl - Zo ) /( Zl + Zo ) ; // R e f l e c t i o n c o e f f i c i e n t
11 L_rx =1 -( ref_coe ^2) ; // P r o p o r t i o n o f i n c i d e n t power
that reaches load
12 L_rx_dB = -10* log10 ( L_rx ) ; // C o n v e r t i n g t h a t p r o p o r t i o n

75
i n dB
13 // D e t e r m i n a t i o n o f t o t a l l o s s Lt
14 Lt =( Lfs ) +( L_tx ) +( L_rx_dB ) ;
15 // D e t e r m i n a t i o n o f power d e l i v e r e d t o r e c e i v e r
16 Pt_Pr =10^( Lt /10) ; // Power r a t i o
17 Pr = Pt / Pt_Pr ;
18 disp ( ’W’ ,Pr , ’ The power d e l i v e r e d t o r e c e i v e r i s ’ ) ;

Scilab code Exa 15.7 example 7

1 clc ;
2 // p a g e no 530
3 // p r o b no . 1 5 . 7
4 //A r a d i o wave moves from a i r ( e r =1) t o g l a s s ( er =7.8)
. a n g l e o f i n c i d e n c e =30 deg
5 theta_i =30; er1 =1; er2 =7.8;
6 // d e t e r m i n a t i o n o f a n g l e o f r e f r a c t i o n
7 theta_r = asind (( sind ( theta_i ) ) /( sqrt ( er2 / er1 ) ) ) ;
8 disp ( ’ d e g r e e ’ , theta_r , ’ The a n g l e o f r e f r a c t i o n i s ’ ) ;

Scilab code Exa 15.8 example 8

1 clc ;
2 // p a g e no 537
3 // p r o b no . 1 5 . 8
4 //A Tx s t a t n w i t h f c =11.6MHz & a n g l e o f i n c i d e n c e =70
degree
5 theta_i =70; fc =11.6; // i n MHz
6 // d e t e r m i n a t i o n o f max u s a b l e f r e q (MUF)
7 MUF = fc /( cosd ( theta_i ) ) ;
8 disp ( ’MHz ’ ,MUF , ’ The max u s a b l e f r e q MUF i s ’ ) ;

76
Scilab code Exa 15.9 example 9

1 clc ;
2 // p a g e no 539
3 // p r o b no . 1 5 . 9
4 //A t a x i compony u s i n g c e n t r a l d i s p a t c h e r with
a n t e n n a h e i g h t =15m &amp ; t a x i a n t e n n a h e i g h t =1.5m
5 ht =15; hr =1.5;
6 // a ) D e t e r m i n a t i o n o f max commn d i s t b e t n d i s p a t c h e r
and t a x i
7 d1 = sqrt (17* ht ) + sqrt (17* hr ) ;
8 disp ( ’km ’ ,d1 , ’ a ) The max commn d i s t b e t n d i s p a t c h e r &
amp ; t a x i ’ ) ;
9 // b ) D e t e r m i n a t i o n o f max ommn d i s t b e t n 2 t a x i s
10 d2 = sqrt (17* hr ) + sqrt (17* hr ) ; // h t=h r=h e i g h t o f a n t e n n a
o f t a x i cab
11 disp ( ’km ’ ,d2 , ’ The max commn d i s t b e t n two t a x i i s ’ ) ;

Scilab code Exa 15.11 example 10

1 clc ;
2 // p a g e no 545
3 // p r o b no 1 5 . 1 1
4 // An a u t o m o b i l e t r a v e l s a t 60km/ h r
5 v =60*10^3/(60*60) ; // c o n v e r s i o n o f c a r ’ s s p e e d t o m/ s
6 c =3*10^8; // s p e e d o f l i g h t
7 // p a r t a ) c a l c u l a t i o n o f t i m e b e t w e e n f a d e s i f c a r
u s e s a c e l l phone a t 8 0 0 ∗ 1 0 ˆ 6 Hz
8 f =800*10^6;
9 T = c /(2* f * v ) ;
10 disp ( ’ s e c ’ ,T , ’ The f a d i n g p e r i o d i s ’ ) ;

77
11 // p a r t b ) c a l c u l a t i o n o f t i m e b e t w e e n f a d e s i f c a r
u s e s a PCS phone a t 1 9 0 0 ∗ 1 0 ˆ 6 Hz
12 f =1900*10^6;
13 T = c /(2* f * v ) ;
14 disp ( ’ s e c ’ ,T , ’ The f a d i n g p e r i o d i s ’ ) ;
15 // Note t h a t t h e r a p i d i t y o f t h e f a d i n g i n c r e a s e s
w i t h b o t h t h e f r e q u e n c y o f t h e t r a n s m i s s i o n s and
the speed of the v e h i c l e

Scilab code Exa 15.12 example 11

1 clc ;
2 // p a g e no 550
3 // p r o b l e m no 1 5 . 1 2
4 A =1000; // m e t r o p o l i t i a n a r e a e x p r e s s e d i n s q . km
5 r =2; // r a d i u s o f c e l l i n km
6 // Number o f c e l l s i t e s g i v e n a s
7 N = A /(3.464* r ^2) ;
8 disp (N , ’ Number o f c e l l s i t e s a r e ’ ) ;

78
Chapter 16

Antennas

Scilab code Exa 16.1 example 1

1 clc ;
2 // p a g e no 564
3 // p r o b no . 1 6 . 1
4 // D e t e r m i n a t i o n o f l e n g t h o f h a l f −wave d i p o l e
5 f =20; // O p e r a t i n g f r e q i n MHz
6 L =142.5/ f ;
7 disp ( ’m ’ ,L , ’ The l e n g t h o f h a l f −wave d i p o l e i s ’ ) ;

Scilab code Exa 16.2 example 2

1 clc ;
2 // p a g e no 566
3 // p r o b no . 1 6 . 2
4 //A d i p o l e a n t e n n a w i t h r a d i a t n r e s i s t a n c e =67ohm &
l o s s r e s i s t a n c e 5ohm
5 Rr =67; Rl =5;
6 // D e t e r m i n a t i o n o f e f f i c i e n c y
7 eta = Rr /( Rr + Rl ) ;
8 disp ( ’% ’ ,eta , ’ The e f f i c i e n c y o f d i p o l e a n t e n n a i s ’ ) ;

79
Scilab code Exa 16.3 example 3

1 clc ;
2 // p a g e no 569
3 // p r o b no . 1 6 . 3
4 //Two a n t e n n a s w i t h g a i n 5 . 3 dBi & 4 . 5 dBd
5 // C o n v e r t i n g u n i t dBd i n dBi f o r c o m p a r i s o n
6 G1_dBi =5.3; G2_dBd =4.5;
7 G2_dBi =2.14+ G2_dBd ;
8 if G2_dBi > G1_dBi then
9 disp ( ’ S e c o n d a n t e n n a w i t h g a i n =4.5 dBd h a s h i g h e r
g a i n ’ );
10 else
11 disp ( ’ F i r s t a n t e n n a w i t h g a i n =5.3 dBi h a s h i g h e r
g a i n ’ );
12 end ;

Scilab code Exa 16.4 example 4

1 clc ;
2 // p a g e no 571
3 // p r o b no . 1 6 . 4
4 //A d i p o l e a n t e n n a w i t h e f f i c e n c y =85% g i v e n
5 n =0.85; D_dBi =2.14; // D i r e c t i v i t y i n dBi
6 // D e t e r m i n a t i o n o f g a i n i n dB
7 D =10^( D_dBi /10) ;
8 G = D * n ; // D e t e r m i n a t i o n o f g a i n
9 G_dBi =10* log10 ( G ) ; // C o n v e r t i n g t o dBi
10 disp ( ’ dBi ’ , G_dBi , ’ The g a i n i s ’ ) ;

80
Scilab code Exa 16.6 example 5

1 clc ;
2 // p a g e no 573
3 // p r o b no . 1 6 . 6
4 //ERP o f Tx s t a t n =17W
5 ERP =17;
6 // D e t e r m n a t i o n o f EIRP
7 ERP_dBm =10* log10 ( ERP /10^ -3) ; // C o n v e r t i n g ERP i n dBm
8 EIRP_dBm = ERP_dBm +2.14; // C o n v e r t i n g ERP i n EIRP
9 disp ( ’dBm ’ , EIRP_dBm , ’ EIRP i n dBm i s e x p r e s s e d a s ’ ) ;

Scilab code Exa 16.7 example 6

1 clc ;
2 // p a g e no 582
3 // p r o b no . 1 6 . 7
4 // a h e l i a l a n t e n n a w i t h 8 t u r n s w i t h f r e q =1.2GHz
given
5 N =8; f =1.2*10^9; c =3*10^8; // Speed o f l i g h t i n m/ s
6 // a ) D e t e r m i n a t i o n o f optimum d i a m e t e r o f a n t e n n a
7 wav = c / f ;
8 D = wav / %pi ;
9 disp ( ’m ’ ,D , ’ a ) 1 . The optimum d i a m e t e r f o r a n t e n n a is ’
);
10 S = wav /4; // D e t e r m i n a t i o n o f s p a c i n g f o r t h e a n t e n n a
11 disp ( ’m ’ ,S , ’ a ) 2 . The s p a c i n g f o r t h e a n t e n n a ’ ) ;
12 L = N * S ; // D e t e r m i n a t i o n o f t o t a l l e n g t h o f an a n t e n n a \
13 disp ( ’m ’ ,L , ’ a ) 3 . The t o t a l l e n g t h o f an a n t e n n a i s ’ ) ;
14 // b ) D e t e r m i n a t i o n o f a n t e n n a g a i n i n dBi
15 G =(15* N * S *( %pi * D ) ^2) /( wav ^3) ;
16 G_dBi =10* log10 ( G ) ; // C o n v e r t i n g i n dBi
17 disp ( ’ dBi ’ , G_dBi , ’ b ) The a n t e n n a g a i n i s ’ ) ;
18 // c ) d e t e r m i n a t i o n o f beamwidth
19 theta =((52* wav ) /( %pi * D ) ) * sqrt ( wav /( N * S ) ) ;

81
20 disp ( ’ d e g r e e ’ , theta , ’ The beamwidth i s ’ ) ;

Scilab code Exa 16.8 example 7

1 clc ;
2 // p a g e no 590
3 // p r o b no . 1 6 . 8
4 // D e s i g n o f l o g p e r i o d i c antenna to cover f r e q
100 −300MHz & t = 0 . 7 , a=30 d e g r e e
5 t =0.7; a =30;
6 // For good p e r f o r m a n c e c o n v e r t i n g r a n g e t o 90MHz t o
320MHz
7 f2 =90; f1 =320;
8 // D e t e r m i n a t i o n o f l e n g t h s o f e l e m e n t s
9 L1 =142.5/ f1 ; // For f r e q o f 320MHz
10 L2 = L1 / t ; L3 = L2 / t ; L4 = L3 / t ; L5 = L4 / t ;
11 disp ( ’ The l e n g t h o f e l e m e n t s a r e ’ ) ;
12 disp ( ’m ’ ,L5 , ’ L5= ’ , ’m ’ ,L4 , ’ L4= ’ , ’m ’ ,L3 , ’ L3= ’ , ’m ’ ,L2 , ’
L2= ’ , ’m ’ ,L1 , ’ L1= ’ ,) ;
13 // D e t e r m i n a t i o n o f s p a c i n g b e t n e l e m e n t s
14 D1 = L1 /(2* tand ( a /2) ) ;
15 D2 = D1 / t ; D3 = D2 / t ; D4 = D3 / t ; D5 = D4 / t ;
16 disp ( ’ The s p a c i n g b e t n e l e m e n t s a r e ’ ) ;
17 disp ( ’m ’ ,D5 , ’ D5= ’ , ’m ’ ,D4 , ’ D4= ’ , ’m ’ ,D3 , ’ D3= ’ , ’m ’ ,D2 , ’
D2= ’ , ’m ’ ,D1 , ’ D1= ’ ,) ;

Scilab code Exa 16.9 example 8

1 clc ;
2 // p a g e no 598
3 // p r o b no . 1 6 . 9
4 //A p a r a b o l i c a n t e n n a w i t h d i a m e t e r =3m & e f f i c i e n c y
=60% o p e r a t e a t 4GHz

82
5 D =3; n =0.6; f =4*10^9; c =3*10^8; // Spped o f l i g h t
6 // D e t e r m i n a t i o n o f g a i n & beamwidth
7 wav = c / f ; // D e t e r m i n a t i o n o f f r e e s p a c e w a v e l e n g t h
8 theta =(70* wav ) / D ; // C a l c u l a i n g beamwidth
9 disp ( ’ d e g r e e ’ , theta , ’ The beamwidth i s ’ ) ;
10 G =( n *( %pi ^2) *( D ^2) ) / wav ^2; // C a l c u l a t i n g g a i n
11 // C o n v e r t i n g g a i n i n dBi
12 G_dBi =10* log10 ( G ) ;
13 disp ( ’ dBi ’ , G_dBi , ’ The g a i n i s ’ ) ;

83
Chapter 17

Microwave Devices

Scilab code Exa 17.1 example 1

1 clc ;
2 // p a g e no 621
3 // p r o b no . 1 7 . 1
4 // TE10 mode i n a i r d i e l e c t r i c mode w i t h i n s i d e c r o s s
s e c t n =2cm∗4cm
5 // D e t e r m i n a t i o n o f cut − o f f f r e q
6 a =4*10^ -2; // l a r g e s t dimn i s u s e d f o r c a l c u l a t i o n
7 c =3*10^8; // Speed o f l i g h t i n m/ s
8 fc = c /(2* a ) ;
9 // D e t e r m i n a t i o n o f dominant mode o f p r o p a g a t i o n o v e r
2:1
10 MUF =2* fc ;
11 disp ( ’ Hz ’ ,MUF , ’ The max u s a b l e f r e q i s ’ ) ;

Scilab code Exa 17.2 example 2

1 clc ;
2 // p a g e no 624

84
3 // p r o b no . 1 7 . 2
4 // D e t e r m i n a t i o n o f g r o u p v e l o f o r w a v e g u i d e i n
example 7 . 1
5 f =5*10^9; // f r e q . i n Hz
6 fc =3.75*10^9; // cut − o f f f r e q from e g . 7 . 1
7 c =3*10^8; // s p e e d o f l i g h t i n m/ s
8 vg = c * sqrt (1 -( fc / f ) ^2) ;
9 disp ( ’m/ s ’ ,vg , ’ The g r o u p v e l o . i s ’ ) ;

Scilab code Exa 17.3 example 3

1 clc ;
2 // p a g e no 624
3 // p r o b no . 1 7 . 3
4 //A w a v e g u i d e w i t h f c =10GHz . 2 s i g n a l w i t h f r e q 12 &
17GHz p r o p o g a t e down=50m
5 fc =10*10^9; c =3*10^8; f1 =12*10^9; f2 =17*10^9; d =50;
6 // D e t e r m i n a t i o n o f g r o u p v e l o f o r 12GHz
7 vg1 = c * sqrt (1 -( fc / f1 ) ^2) ;
8 disp ( ’m/ s ’ ,vg1 , ’ The g r o u p v e l o . f o r 12GHz s i g n a l is ’
);
9 // D e t e r m i n a t i o n o f g r o u p v e l o f o r 17GHz
10 vg2 = c * sqrt (1 -( fc / f2 ) ^2) ;
11 disp ( ’m/ s ’ ,vg2 , ’ The g r o u p v e l o . f o r 17GHz s i g n a l is ’
);
12 // D e t e r m i n a t i o n o f t i m e t a k e n f o r 50m d i s t by f 1
13 t1 = d / vg1 ;
14 // D e t e r m i n a t i o n o f t i m e t a k e n f o r 50m d i s t by f 2
15 t2 = d / vg2 ;
16 // D e t e r m i n a t i o n o f d i f f n i n t h e t r a v e l t i m e s f o r 2
signals
17 del = t1 - t2 ;
18 disp ( ’ s e c ’ ,del , ’ The d i f f n i n t h e t r a v e l t i m e s f o r 2
s i g n a l s i s ’ );

85
Scilab code Exa 17.4 example 4

1 clc ;
2 // p a g e no 627
3 // p r o b no . 1 7 . 4
4 // D e t e r m i n a t i o n o f p h a s e v e l o . w i t h g i v e n 5GHz f r e q
5 f =5*10^9; c =3*10^8; fc =3.75*10^9; // Cut− o f f f r e q
r e f e r i n g eg . 1 7 . 1
6 vp = c / sqrt (1 -( fc / f ) ^2) ; // C a l c u l a t i o n o f p h a s e v e l o .
7 disp ( ’m/ s ’ ,vp , ’ The p h a s e v e l o i s ’ ) ;

Scilab code Exa 17.5 example 5

1 clc ;
2 // p a g e no 628
3 // p r o b no . 1 7 . 5
4 // d e t e r m i n a t i o n o f c h a r a c t e r i s t i c impedance o f
w a v e g u i d e w i t h g i v e n 5GHz f r e q
5 f =5*10^9; fc =3.75*10^9; // R e f e r i n g i n e g . 1 7 . 4
6 Zo =377/ sqrt (1 -( fc / f ) ^2) ;
7 disp ( ’ ohm ’ ,Zo , ’ The c h a r a c t e r i s t i c i m p e d a n c e o f
waveguide i s ’ );

Scilab code Exa 17.7 example 6

1 clc ;
2 // p a g e no 631
3 // p r o b no . 1 7 . 7
4 //A s i g n a l w i t h
l e v e l o f 20dBm &amp ; i n s e r t i o n l o s s
=1dB &amp ; c o u p l i n g =20dB , d i r e c t i v i t y =40dB

86
5 sig_in =20; loss =1; couple =20; direct =40;
6 // D e t e r m i n a t i o n o f s i g n a l l e v e l i n main g u i d e
7 sig_level_main = sig_in - loss ;
8 disp ( ’dBm ’ , sig_level_main , ’ The s i g n a l l e v e l i n main
g u id e i s ’ );
9 // D e t e r m i n a t i o n o f s i g n a l l e v e l i n s e c o n d a r y g u i d e
10 sig_level_sec = sig_in - couple ;
11 disp ( ’dBm ’ , sig_level_sec , ’ The s i g n a l l e v e l i n
s ec on d ar y g ui d e i s ’ );
12 // I f s i g n a l d i r n i n main g u i d e w e r e r e v e r e s e d , t h e
s i g n a l l e v e l i n s e c g i d e would r e d u c e d by 40dB t o
13 sig_sec_rev =( sig_level_sec ) -( direct ) ;
14 disp ( ’dBm ’ , sig_sec_rev , ’ The s i g n a l l e v e l from s e c
g u i d e when r e v e r s e d g u i d e i s ’ ) ;

Scilab code Exa 17.8 example 7

1 clc ;
2 // p a g e no 642
3 // p r o b no . 1 7 . 8
4 //A Gunn d e v i c e w i t h t h i c k n e s s =7um
5 d =7*10^ -6; v =10^5; // B a s i c v e l o c i t y o f e
6 t = d / v ; // B a s i c v e l o c i t y r e l a t i o n
7 // D e t e r m i n a t i o n o f f r e q o f o s c i l l a t i o n
8 f =1/ t ; // I n v e r s e o f p e r i o d i s f r e q
9 disp ( ’ Hz ’ ,f , ’ The f r e q o f o s c i l l a t i o n i s ’ ) ;

Scilab code Exa 17.9 example 8

1 clc ;
2 // p a g e no 648
3 // p r o b no . 1 7 . 9

87
4 //A p u l s e magnetron w i t h avg power =1.2kW & peak
power =18.5kW & 1 p u l s e i s g e n e r a t e d e v e r y 10ms
5 Pavg =1.2*10^3; Pp =18.5*10^3; Tt =10*10^ -3;
6 // D e t e r m i n a t i o n o f duty c y c l e
7 D = Pavg / Pp ;
8 disp (D , ’ The duty c y c l e i s ’ ) ;
9 // D e t e r m i n a t i o n o f l e n g t h o f p u l s e
10 Ton = D * Tt ;
11 disp ( ’ s e c ’ ,Ton , ’ The l e n g t h o f p u l s e i s ’ ) ;

Scilab code Exa 17.10 example 9

1 clc ;
2 // p a g e no 652
3 // p r o b no . 1 7 . 1 0
4 //A p y r a m i d a l h o r n h a s a p e r t u r e =58mm i n E−p l a n e & 78
mm i n H−p l a n e & o p e r a t e s a t 10GHz
5 f =10*10^9; c =3*10^8; dH =78*10^ -3; dE =58*10^ -3;
6 // a ) D e t e r m i n a t i o n o f g a i n i n dB
7 wl = c / f ; // c a l c u l a t i o n o f w a v e l e n g t h
8 G =(7.5* dE * dH ) /( wl ^2) ;
9 G_dBi =10* log10 ( G ) ; // C o n v e r t i n g t o dBi
10 disp ( ’ dBi ’ , G_dBi , ’ a ) The g a i n i s ’ ) ;
11 // b ) D e t e r m i n a t i o n o f beamwidth i n H−p a l n e
12 theta_H =(70* wl ) / dH ;
13 disp ( ’ d e g r e e ’ , theta_H , ’ b ) The beamwidth i n H−p l a n e is
’ );
14 // c ) D e t e r m i n a t i o n o f beamwidth i n E−p l a n e
15 theta_E =(56* wl ) / dE ;
16 disp ( ’ d e g r e e ’ , theta_E , ’ c ) The beamwidth i n H−p l a n e i s
’ );

Scilab code Exa 17.11 example 10

88
1 clc ;
2 // p a g e no 654
3 // p r o b l e m no 1 7 . 1 1
4 // f o r a s q u a r e p a t c h a n t e n n a
5 f =2*10^6; // f r e q o f o p e r a t i o n i n Hz
6 Er =2; // r e l a t i v e p e r m i t t i v i t y
7 c =3*10^8; // v e l o o f l i g h t
8 // w a v e l e n g t h i s g i v e n a s
9 wl = c /( f * sqrt ( Er ) ) ;
10 // The a n t e n n a w i d t h and l e n g t h a r e e a c h
approximately half of t h i s .
11 w = wl /2;
12 l = wl /2;
13 disp ( ’m ’ ,w , ’ The a n t e n n a w i d t h ’ , ’ and ’ , ’m ’ ,l , ’ The
antenna l e n g t h ’ );

Scilab code Exa 17.12 example 11

1 clc ;
2 // p a g e no 657
3 // p r o b no . 1 7 . 1 2
4 //A r a d a r Tx h a s power =10kW a t f r e q =9.5GHz & t a r g e t
a t 15km w i t h c r o s s s e c t n =10.2 m2 w i t h g a i n o f
a n t e n n a i s 20 dBi
5 f =9.5*10^9; Pt =10*10^3; c =3*10^8; G_dBi =20; a =10.2; r
=15*10^3;
6 // D e t e r m i n a t i o n o f r e c e i v e d power
7 wl = c / f ; // c a l c u l a t i n g w a v e l e n g t h
8 G =10^( G_dBi /10) ; // C o n v e r t i n g t o power r a t i o
9 Pr =(( wl ^2) * Pt *( G ^2) * a ) /(((4* %pi ) ^3) *( r ^4) ) ;
10 disp ( ’W’ ,Pr , ’ The r e c e i v e d power i s ’ ) ;

Scilab code Exa 17.13.a example 12

89
1 clc ;
2 // p a g e no 659
3 // p r o b no . 1 7 . 1 3 a
4 // a p u l s e s e n t , r e t u r n s a f t e r 15 u s
5 t =15*10^ -6; c =3*10^8;
6 // D e t e r m i n a t i o n o f d i s t a n c e o f t a r g e t
7 R =( c * t ) /2;
8 disp ( ’m ’ ,R , ’ The d i s t a n c e o f t a r g e t i s ’ ) ;

Scilab code Exa 17.13.b example 13

1 clc ;
2 // p a g e no 660
3 // p r o b no . 1 7 . 1 3 . b
4 c = 3*10^8;
5 tp =10^ -6; // p u l s e d u r a t i o n o f p u l s e r a d a r
6 f =10^3; // o p e r a t i n g f r e q i n Hz
7 // The maximum unambiguous r a n g e i s
8 Rmax = c /(2* f ) ;
9 disp ( ’m ’ , Rmax , ’ The maximum r a n g e i s ’ ) ;
10 // The minimum unambiguous r a n g e i s
11 Rmin = c * tp /2;
12 disp ( ’m ’ , Rmin , ’ The minimum r a n g e i s ’ ) ;

Scilab code Exa 17.14 example 14

1 clc ;
2 // p a g e no 662
3 // p r o b no . 1 7 . 1 4
4 v =60; // s p e e d o f v e h i c l e moving t o w a r d s r a d a r i n mph
5 c =3*10^8; // v e l o o f l i g h t i n m/ s
6 f =10^10; // o p e r a t i n g f r e q u e n c y i n Hz
7 // c o n v e r s i o n o f s p e e d from mph t o km/ h r

90
8 v1 =60*1.6;
9 // c o n v e r s i o n o f s p e e d from km/ h r t o m/ s
10 v2 = v1 *10^3/3600;
11 // Now t h e D o p p l e r s h i f t i s f o u n d a s
12 fd =2* v2 * f / c ;
13 disp ( ’ Hz ’ ,fd , ’ The D o p p l e r s h i f t i s ’ ) ;

91
Chapter 18

Terrestrial Microwave
Communication system

Scilab code Exa 18.1 example 1

1 clc ;
2 // p a g e no 676
3 // p r o b no 18 1
4 // T r a n s m i t t e r and r e c e i v e r have same h e i g h t a t dist
40km
5 d =40; // d i s t i s 40 km
6 h =( d ^2) /68; // As d=s q r t ( 1 7 h )+s q r t ( 1 7 h )
7 disp ( ’m ’ ,h , ’ The h e i g h t o f e a c h t o w e r must be a t
l e a s t ’ );

Scilab code Exa 18.2 example 2

1 clc ;
2 // p a g e no 678
3 // p r o b no 18 2
4 //A l i n e o f s i g h t r a d i o l i n k a t f r e q 6GHz w i t h
s e p e r a t i o n 40 km b e t n a n t e n n a s

92
5 f =6; d1 =10; d2 =30; // o b s t a c l e l o c a t e d a t 10 km
6 // D e t e r m i n a t i o n o f d i s t R t o c l e a r o b s t a c l e
7 R =10.4* sqrt (( d1 * d2 ) /( f *( d1 + d2 ) ) ) ;
8 disp ( ’m ’ ,R , ’ The d i s t by which beam must c l e a r the
obstacle is ’)

Scilab code Exa 18.3 example 3

1 clc ;
2 // p a g e no 679
3 // p r o b no 18 3
4 //A t r a n s m i t t e r and r e c e i v e r a t 6GHz s e p e r a t e d by 40
km w i t h o /p power 2 W
5 f =6*10^9; d =40; Pt =2; // power i n w a t t
6 // t r a n s m i t t i n g a n t e n n a g a i n Gt=20dBi , r e c e i v i n g
a n t e n n a Gr=25 dBi
7 Gt =20; Gr =25;
8 f_mhz =6000; // f =6000 MHz
9 Pr_Pt_dB =( Gt + Gr ) -(32.44+(20* log10 ( d ) ) +(20* log10 (
f_mhz ) ) ) ;
10 Pt_dBm =10* log10 ( Pt /10^ -3) ;
11 Pr_dBm = Pt_dBm + Pr_Pt_dB ;
12 disp ( ’dBm ’ , Pr_dBm , ’ The power d e l i v e r e d t o t h e Rx i s ’
);

Scilab code Exa 18.4 example 4

1 clc ;
2 // p a g e no 680
3 // p r o b no 18 4
4 T_sky =120; // Sky temp e x p r e s s e d i n K
5 L_dB =2; // a n t e n n a f e e d l i n e l o s s
6 L =10^( L_dB /10) ;

93
7 // t h e n o i s e temp i s g i v e n a s
8 Ta =(( L -1) *290 + T_sky ) / L ;
9 disp ( ’K ’ ,Ta , ’ N o i s e t e m p e r a t u r e i s ’ );

Scilab code Exa 18.5 example 5

1 clc ;
2 // p a g e no 681
3 // p r o b no 1 8 . 5
4 NF_dB =2;
5 NF_power = 10^( NF_dB /10) ;
6 T_eq =290*( NF_power -1) ;
7 disp ( ’K ’ , T_eq , ’ The e q u i v a l e n t n o i s e temperature ’ );

Scilab code Exa 18.6 example 6

1 clc ;
2 // p a g e no 681
3 // p r o b no 1 8 . 6
4 // r e f e r e x a m p l e no 1 8 . 4 and 1 8 . 5
5 // The a n t e n n a and f e e d l i n e c o m b i n a t i o n from ex 1 8 . 4
i s u s e d w i t h t h e Rx from ex 1 8 . 5
6 Ta =182; // n o i s e temp o f t h e a n t e n n a and f e e d l i n e
combination expressed in K
7 Teq =169; // n o i s e t e m p e r a t u r e o f t h e Rx
8 B =20*10^6; // BW o f t h e r e c e i v e r
9 Tn_sys = Ta + Teq ; // N o i s e temp f o r t h e s y s t e m
10 k =1.38*10^ -23; // Boltzmann c o n s t a n t
11 // N o i s e power o f t h e s y s t e m i s g i v e n a s
12 Pn = k * Tn_sys * B ; // where k i s Boltzmann c o n s t a n t
13 disp ( ’W’ ,Pn , ’ The n o i s e power i s ’ ) ;
14 Pn_dBm =10* log10 ( Pn /10^ -3) ;
15 disp ( ’dBm ’ , Pn_dBm , ’ The t h e r m a l n o i s e power i s ’ ) ;

94
Scilab code Exa 18.7 example 7

1 clc ;
2 // p a g e no 682
3 // p r o b no 1 8 . 7
4 // r e f e r ex no 1 8 . 3 and 1 8 . 6
5 Pr_dBm = -62; // power a t t h e r e c e i v e r i n dBm
6 Pn_dBm = -100; // t h e r m a l n o i s e power i n dBm
7 // c a r r i e r t o n o i s e r a t i o i n dB i s g i v e n a s
8 C_N = Pr_dBm - Pn_dBm ;
9 disp ( ’ dB ’ ,C_N , ’ C a r r i e r t o n o i s e r a t i o i s ’ ) ;

Scilab code Exa 18.8 example 8

1 clc ;
2 // p a g e no 683
3 // p r o b no 1 8 . 8
4 // r e f e r ex 1 8 . 7
5 fb =40*10^6; // b i t r a t e i n bps
6 Pr_dBm = -62; // power a t t h e r e c e i v e r i n dBm
7 Pr =10^( Pr_dBm /10) *10^ -3; // power a t t h e r e c e i v e r in
W
8 Eb = Pr / fb ; // t h e e n e r g y p e r b i t i n J
9 k =1.38*10^ -23; // Boltzmann c o n s t a n t
10 T =350;
11 // t h e n o i s e power d e n s i t y i s
12 No = k * T ;
13 // Energy p e r b i t t o n o i s e d e n s i t y r a t i o i n dB i s
14 Eb_No =10* log10 ( Eb / No ) ;
15 disp ( ’ dB ’ , Eb_No , ’ Energy p e r b i t t o n o i s e d e n s i t y
r a t i o i s ’ );

95
Scilab code Exa 18.9 example 9

1 clc ;
2 // p a g e no 686
3 // p r o b no 1 8 . 9
4 // r e f e r f i g 1 8 . 7 ( b )
5 // T h i s i s t h e s t a n d a r d s u p e r h e t e r o d y n e r e c e i v e r
6 fc =6870; // t h e r e c e i v e d c a r r i e r f r e q i n MHz
7 IF =70; // IF i n MHz
8 // The l o c a l o s c i l l a t o r f r e q i s g i v e n a s
9 f_lo = fc - IF ;
10 disp ( ’MHz ’ , f_lo , ’ The l o c a l o s c i l l a t o r f r e q i s ’ ) ;

Scilab code Exa 18.10 example 10

1 clc ;
2 // p a g e no 688
3 // p r o b no 1 8 . 1 0
4 // r e f e r f i g 1 8 . 9 a )
5 fc_r =6870; // c a r r i e r f r e q o f r e c e i v e d s i g n a l i n MHz
6 fc_t =6710; // c a r r i e r f r e q o f t r a n s m i t t e d s i g n a l i n
MHz
7 IF =70; // i n MHz
8 // t h e f r e q o f s h i f t o s c i l l a t o r i s
9 fso = fc_r - fc_t ;
10 disp ( ’MHz ’ ,fso , ’ The f r e q o f s h i f t o s c i l l a t o r is ’ );
11 // t h e l o c a l o s c i l l a t o r f r e q i s g i v e n a s
12 flo = fc_t - IF ;
13 disp ( ’MHz ’ ,flo , ’ The l o c a l o s c i l l a t o r f r e q i s ’ );
14 // from f i g , m i x e r 3 w i l l p r o d u c e an o / p a s
15 op_mix3 = flo + fso ;
16 disp ( ’MHz ’ , op_mix3 , ’O/P o f Mixer 3 i s ’ ) ;

96
Scilab code Exa 18.11 example 11

1 clc ;
2 // p a g e no 690
3 // p r o b no 1 8 . 1 1
4 // A t y p i c a l m i c r o w a v e d i g i t a l r a d i o s y s t e m u s e s 16−
QAM.
5 fb =90.524; // b i t r a t e e x p r e s s e s d i n Mbps
6 n =16; // f o r 16−QAM s y s t e m
7 // p a r t a ) c a l c u l a t i o n o f no o f b i t s p e r symbol
8 m = log2 ( n ) ;
9 disp ( ’ b i t s ’ ,m , ’ The number o f b i t s p e r symbol a r e ’ ) ;
10 // p a r t b ) c a l c l a t i o n o f baud r a t e
11 // baud r a t e i s 1/4 t h o f t h e b i t r a t e
12 baud = fb /4;
13 disp ( ’ Mbaud ’ , baud , ’ The baud r a t e i s ’ ) ;

97
Chapter 19

Television

Scilab code Exa 19.1 example 1

1 clc ;
2 // p a g e no 703
3 // p r o b no 1 9 . 1
4 // I n t h e g i v e n problem , a v i d e o s i g n a l h a s 50% o f
t h e maximum l u m i n a n c e l e v e l
5 //A b l a c k s e t u p l e v e l o f 7 . 5 IRE r e p r e s e n t s z e r o
l u m i n a n c e , and 100 IRE i s max b r i g h t n e s s . T h e r e f o r e
t h e r a n g e from min t o max l u m i n n a n c e h a s
1 00 − 7 .5 = 92 . 5 u n i t s .
6 // T h e r e f o r e t h e l e v e l i s
7 IRE =7.5 + (0.5*92.5) ;
8 disp ( ’ IRE u n i t s ’ ,IRE , ’ L e v e l o f v i d e o s i g n a l s i n IRE
u n i t s ’ );

Scilab code Exa 19.2 example 2

1 clc ;
2 // p a g e no 704

98
3 // p r o b no 1 9 . 2
4 // p a r t a ) h o r i z o n t a l b l a n k i n g
5 // H o r i z o n t a l b l a n k i n g o c c u p i e s a p p r o x i m a t e l y 10 u s
o f the 6 3 . 5 us d u r a t i o n o f each l i n e ,
6 Hztl_blnk =10/63.5 *100;
7 disp ( ’ o f t h e s i g n a l ’ , ’% ’ , Hztl_blnk , ’ H o r i z o n t a l
b l a n k i n g o c c u p i e s ’ );
8 // p a r t b ) v e r t i c a l b l a n k i n g
9 // V e r t i c a l b l a n k i n g o c c u p i e s a p p r o x i m a t e l y 21 l i n e s
p e r f i e l d o r 42 l i n e s p e r f r a m e . A f r a m e h a s 525
l i n e s a l t o g e t h e r , so
10 Vert_blnk =42/525 *100;
11 disp ( ’ o f t h e s i g n a l ’ , ’% ’ , Vert_blnk , ’ v e r t i c a l
b l a n k i n g o c c u p i e s ’ );
12 // p a r t c ) a c t i v e s i g n a l
13 // s i n c e 8% o f t h e t i m e i s l o s t i n v e r t i c a l b l a n k i n g
, 92% o f t h e t i m e i s i n v o l v e d i n t h e t a n s m i s s i o n
of the a c t i v e l i n e s .
14 act_vid = (100 - Hztl_blnk ) *(100 - Vert_blnk ) /100;
15 disp ( ’% ’ , act_vid , ’ The a c i v e v i d e o i s ’ ) ;

Scilab code Exa 19.3 example 3

1 clc ;
2 // p a g e no 707
3 // p r o b no 1 9 . 3
4 // A t y p i c a l low−c o s t monochrome r e c e i v e r h a s a
v i d e o bandwidth o f 3MHz
5 B =3; // bandwidth i n MHz
6 // The h o r i z o n t a l r e s o l u t i o n i n l i n e s i s g i v e n a s
7 L_h = B *80;
8 disp ( ’ l i n e s ’ ,L_h , ’ The h o r i z o n t a l r e s o l u t i o n i n l i n e s
i s ’ );

99
Scilab code Exa 19.4 example 4

1 clc ;
2 // p a g e no 709
3 // p r o b no 1 9 . 4
4 // A RGB v i d e o s i g n a l h a s n o r m a l i z e d v a l u e s a s
5 R =0.2; G =0.4; B =0.8;
6 // The l u m i n a n c e s i g n a l i s g i v e n a s
7 Y =0.30* R +0.59* G +0.11* B ;
8 disp (Y , ’ The l u m i n a n c e s i g n a l i s ’ ) ;
9 // The i n −p h a s e component o f t h e c o l o r s i g n a l i s
given as
10 I =0.60* R -0.28* G -0.32* B ;
11 disp (I , ’ The i n −p h a s e component o f t h e c o l o r signal
i s ’ );
12 // The q u a d r a t u r e component o f t h e c o l o r s i g n a l i s
given as
13 Q =0.21* R -0.52* G +0.31* B ;
14 disp (Q , ’ The q u a d r a t u r e component o f t h e c o l o r s i g n a l
i s ’ );

Scilab code Exa 19.5 example 5

1 clc ;
2 // p a g e no 712
3 // p r o b no 1 9 . 5
4 // /// r e f e r t a b l e 1 9 . 1 / / / / / / / . . . . . . .
5 // The p r o p o r t i o n i n t h e t a b l e a r e v o l t a g e levels
and have t o be s q u a r e d t o g e t power .
6 // f o r b l a c k s e t u p t h e v o l t a g e
l e v e l i s given as
7 v =0.675;

100
8 // T h e r e f o r e t h e power l e v e l a s a f r a c t i o n o f t h e
maximum t r a n s m i t t e r power i s
9 P_black_setup = v ^2 *100;
10 disp ( ’ o f t h e maximum t r a n s m i t t e r power i s used to
t r a n s m i t a b l a c k s e t u p ’ , ’% ’ , P_black_setup ,)

Scilab code Exa 19.6 example 6

1 clc ;
2 // p a g e no 728
3 // p r o b no 1 9 . 6
4 // r e f e r f i g 1 9 . 2 7 o f t h e p a g e no 729
5 // from f i g , we can w r i t e down t h e v a l u e s directly
as given
6 In1 =100*10^ -3; // e x p r e s s e d i n mV
7 In1_dBmV =20* log10 ( In1 /1) ;
8 disp ( ’dBmV ’ , In1_dBmV , ’ The i n p u t o f Amp 1 i s ’ ) ;
9 // t h i s a b o v e c a l c u l a t e d s i g n a l i s a p p l i e d t o t h e
i n p u t o f t h e f i r s t a m p l i f i e r , i . e . head−end s i g n a l
processing
10 G1 =40; // g a i n o f Amp 1 e x p r e s s e d i n dB
11 // o / p l e v e l o f Amp 1 i s
12 Out1 = In1_dBmV + G1 ;
13 disp ( ’dBmV ’ , Out1 , ’ The o u t p u t o f Amp 1 i s ’ ) ;
14 L =15; // e x p r e s s e d i n dB
15 // The i n p u t l e v e l o f Amp 2 i s
16 In2_dBmV = Out1 - L ;
17 disp ( ’dBmV ’ , In2_dBmV , ’ The i n p u t o f Amp 2 i s ’ ) ;
18 G2 =25; // g a i n o f Amp2 e x p r e s s e d i n dB
19 // o / p l e v e l o f Amp 2 i s
20 Out2 = In2_dBmV + G2 ;
21 disp ( ’dBmV ’ , Out2 , ’ The o u t p u t o f Amp 2 i s ’ ) ;
22 L1 =10; // l o s s i n c a b l e
23 L2 =12; // l o s s i n d i r e c t i o n a l c o u p l e r
24 // The i n p u t l e v e l o f Amp 3 i s

101
25 In3_dBmV = Out2 - L1 - L2 ;
26 disp ( ’dBmV ’ , In3_dBmV , ’ The i n p u t o f Amp 3 i s ’ ) ;
27 G3 =20; // g a i n o f Amp3 e x p r e s s e d i n dB
28 Out3 = In3_dBmV + G3 ;
29 disp ( ’dBmV ’ , Out3 , ’ The o u t p u t o f Amp 3 i s ’ ) ;
30 // There i s f u r t h e r 3dB c a b l e l o s s and 20dB l o s s in
the tap
31 L3 =3; // l o s s i n c a b l e
32 L4 =20; // l o s s i n t a p
33 // s i g n a l s t r e n g t h a t t h e t a p i s
34 Vdrop_dBmV = Out3 - L3 - L4 ;
35 V_drop =10^( Vdrop_dBmV /20) ; // e x p r e s s e d i n mV
36 disp ( ’mV ’ , V_drop , ’ S i g n a l s t r e n g t h a t s u b s c r i b e r t a p
i s ’ );
37 // C a l c u l a t i o n o f power i n t o 75 ohm
38 R =75; // e x p r e s s e d i n ohm
39 Pdrop = ( V_drop *10^ -3) ^2/ R ;
40 Pdrop_dBm =10* log10 ( Pdrop /10^ -3) ;
41 disp ( ’dBm ’ , Pdrop_dBm , ’ The power a t t h e end i s ’ ) ;

Scilab code Exa 19.7.a example 7

1 clc ;
2 // p a g e no 731
3 // p r o b no 1 9 . 7
4 // I n g i v e n p r o b l e m a TV r e c e i v e r is tuned to
channel 6.
5 // A l l modern Rx u s e s a p i c t u r e IF o f 4 5 . 7 5 MHz w i t h
h i g h −s i d e i n j e c t i o n o f t h e s i g n a l into the cable .
6 // The p i c t u r e c a r r i e r o f c h a n n e l 6 i s at a
f r e q u e n c y o f 8 3 . 2 5MHz, s o
7 ch =6;
8 Fc =83.25; // e x p r e s s e d i n MHz
9 IF =45.75; // e x p r e s s e d i n MHz
10 f_lo = Fc + IF ;

102
11 a = f_lo + ch /2; b = f_lo - ch /2;
12 disp ( ’ band ’ , ’MHz ’ ,a , ’ t o ’ , ’MHz ’ ,b , ’ The i n t e r f e r e n c e
would i n ’ ) ;

Scilab code Exa 19.7.b example 8

1 clc ;
2 // p a g e no 740
3 // p r o b no 1 9 . 8
4 Nh =640; Nv =480; // r e s o l u t i o n of d i g i t a l video signal
as 640∗480 p i x e l s
5 Rf =30; // f r a m e r a t e e x p r e s s e d i n Hz
6 m =8; // b i t s p e r s a m p l e
7 // By u s i n g t h e p r o d u c t o f H o r i z o n t a l & v e r t i c a l
r e s o l u t i o n , no o f l u m i n a n c e p i x e l s p e r f r a m e a r e
8 Npl = Nh * Nv ;
9 // s i n c e e a c h o f t h e c o l o r s i g n a l s h a s one−f o u r t h
t h e t o t a l no o f luma p i x e l s
10 Npt =1.5* Npl ;
11 // t h e r e f o r e b i t r a t e i s g i v e n a s
12 fb = Npt * m * Rf ;
13 disp ( ’ bps ’ ,fb , ’ The b i t r a t e f o r t h e s i g n a l i s ’ ) ;

103
Chapter 20

Satellite Communication

Scilab code Exa 20.1 example 1

1 clc ;
2 // p a g e no 754
3 // p r o b no 2 0 . 1
4 // p a r t A)
5 d =500;
6 //By u s i n g t h e e q u a t i o n f o r v e l o c i t y o f a s a t e l l i t e
7 v = sqrt (4*10^11/( d +6400) ) ;
8 disp ( ’m/ s ’ ,v , ’A) The v e l o c i t y o f a s a t e l l i t e i s ’ ) ;
9 // The r a d i u s o f o r b i t i s
10 r =(6400+ d ) *10^3 // i n m
11 // The o r b i t a l p e r i o d o f s a t e l l i t e i s
12 T =(2* %pi * r ) / v ;
13 disp ( ’ s e c ’ ,T , ’ The o r b i t a l p e r i o d o f s a t e l l i t e i s ’ ) ;
14 // p a r t B)
15 d =36000;
16 //By u s i n g t h e e q u a t i o n f o r v e l o c i t y o f a s a t e l l i t e
17 v = sqrt (4*10^11/( d +6400) ) ;
18 disp ( ’m/ s ’ ,v , ’B) The v e l o c i t y o f a s a t e l l i t e i s ’ ) ;
19 // The r a d i u s o f o r b i t i s
20 r =(6400+ d ) *10^3 // i n m
21 // The o r b i t a l p e r i o d o f s a t e l l i t e i s

104
22 T =(2* %pi * r ) / v ;
23 disp ( ’ s e c ’ ,T , ’ The o r b i t a l period of s a t e l l i t e i s ’ );

Scilab code Exa 20.2 example 2

1 clc ;
2 // p a g e no 757
3 // p r o b no 2 0 . 2
4 R =6400; // R a d i u s o f e a r t h
5 L =45; // e a r t h s t a t i o n l a t t i t u d e
6 H =36000 // H e i g h t o f s a t e l l i t e a b o v e t h e earth ;
7 ang = atand ((6400* sind (45) ) /(36000+(6400*(1 - cosd (45) ) )
));
8 disp ( ang ) ;

Scilab code Exa 20.3 example 3

1 clc ;
2 // p a g e no 758
3 // p r o b no 2 0 . 3
4 // D e t e r m i n a t i o n o f lenght of geostationary s a t e l l i t e
w i t h a n g l e o f e l a v a t i o n =30 d e g r e e
5 r =64*10^5; // R a d i u s o f e a r t h
6 h =36*10^6; // h e i g h t o f s a t e l l i t e
7 theta =30; // a n g l e o f e l e v a t i o n
8 d = sqrt ((( r + h ) ^2) -(( r * cosd ( theta ) ) ^2) ) -( r * sind ( theta )
);
9 disp ( ’km ’ ,d /1000 , ’ The l e n g t h o f t h e p a t h i s ’ ) ;

Scilab code Exa 20.4 example 4

105
1 clc ;
2 // p a g e no 759
3 // p r o b no 2 0 . 4
4 //A s a t e l l i t e t r a n s m i t t e r o p e r a t e s a t 4GHz w i t h 7W &
a n t e n n a g a i n 40 dBi
5 // R e c e i v e r a n t e n n a g a i n 30 dBi & p a t h l e n g t h i s
4∗10ˆ7
6 Gt_dBi =40; Gr_dBi =30; Pt =7; d =40000; // i n km
7 f =4000; // i n MHz
8 Pr_Pt_dB = Gt_dBi + Gr_dBi -(32.44+(20* log10 ( d ) ) +(20*
log10 ( f ) ) ) ;
9 // S i g n a l s t r e n g t h a t t r a n s m i t t e r
10 Pt_dBm =10* log10 ( Pt /10^ -3) ;
11 Pr_dBm =( Pt_dBm ) +( Pr_Pt_dB ) ;
12 disp ( ’dBm ’ , Pr_dBm , ’ The v a l u e o f s i g n a l s t r e n g t h a t
r e c e i v e r ’ );

Scilab code Exa 20.5 example 5

1 clc ;
2 // p a g e no 760
3 // p r o b no 2 0 . 5
4 // I n t h e g i v e n p r o b l e m
5 G =40; // r e c e i v i n g a n t e n n a g a i n
6 T_sky =15; // n o i s e temp
7 L =0.4; // l o s s b e t w e e n a n t e n n a and LNA i n p u t
8 T_eq =40; // n o i s e t e m p e r a t u r e f LNA
9 // F i r −s t we have t o f i n d G i n dB
10 G_dB = G - L ;
11 // For t h e c a l c u l a t i o n o f T , we have t o c o n v e r t t h e
feedhorn l o s s i n t o a r a t i o as f o l l o w s
12 L =10^(0.4/10) ;
13 Ta = (( L -1) *290 + T_sky ) / L ;
14 // The r e c e i v e r n o i s e t e m p e r a t u r e i s g i v e n wrt t h e
chosen r e f e r e n c e point , t h e e f o r e

106
15 Ratio = G -10* log10 ( Ta + T_eq ) ;
16 disp ( ’ dB ’ , Ratio , ’ The r e c e i v e r n o i s e t e m p e r a t u r e i s ’ )
;

Scilab code Exa 20.6 example 6

1 clc ;
2 // p a g e no 761
3 // p r o b no 2 0 . 6
4 NF_dB =1.5; // n o i s e f i g o f a r e c e i v e r
5 NF =10^( NF_dB /10) ;
6 // E q u i v a l e n t n o i s e t e m p e r a t u r e i s g i v e b a s
7 T_eq =290*( NF -1) ;
8 disp ( ’K ’ , T_eq , ’ E q u i v a l e n t n o i s e t e m p e r a t u r e i s ’ );

Scilab code Exa 20.7 example 7

1 clc ;
2 // p a g e no 761
3 // p r o b no 2 0 . 7
4 // r e f e r p r o b no 2 0 . 5
5 d =38000; // d i s t a n c e o f s a t e l l i t e from t h e E a r t h
surface
6 P =50; // t r a n s m i t t e r power
7 G =30; // a n t e n n a g a i n
8 f =12000; // f r e q u e n c y i n MHz
9 B =10^6; // Bandwidth i n MHz
10 // from p r o b l e m no 2 . 5
11 G_T =21;
12 L_misc =0;
13 k_dBW = -228.6; // Boltzmann ’ s c o n s t a n t i n dBW
14 // There a r e no m i s c e l l a n e o u s l o s s
15 // The s t e l l i t e t r a n s m i t t i n g power i n dBW i s

107
16 Pt_dBW = 10* log10 ( P ) ;
17 // The EIPR i n dBW
18 EIRP_dBW = Pt_dBW + G ;
19 // FSL i n dB
20 FSL_dB = 32.44 + (20* log10 ( d ) ) + (20* log10 ( f ) ) ;
21 // The c a r r i e r t o n o i s e r a t i o i s
22 ratio = EIRP_dBW - FSL_dB - L_misc + G_T - k_dBW - 10*
log10 ( B ) ;
23 disp ( ’ dB ’ , ratio , ’ The c a r r i e r t o n o i s e r a t i o a t t h e
r e c e i v e r i s ’ );

Scilab code Exa 20.8 example 8

1 clc ;
2 // p a g e no 762
3 // p r o b no 2 0 . 8
4 D =40000; // d i s t a n c e o f s a t e l l i t e from t h e e a r t h
station
5 v =3*10^8; // v e l o o f l i g h t
6 d =80000; // d i s t a n c e b e t w e e n two e a r t h s t a t i o n s
7 // t i m e d e l a y i s g i v e n a s
8 t=d/v;
9 // t o t a l t i m e d e l a y w i l l be t w i c e t h a t o f c a l c u l a t e d
above
10 T =2* t ;
11 disp ( ’ s e c ’ ,T , ’ The t o t a l t i m e d e l a y i s ’ ) ;

Scilab code Exa 20.9 example 9

1 clc ;
2 // p a g e no 769
3 // p r o b no 2 0 . 9
4 f_down = 4*10^9; // d o w n l i n k f r e q

108
5 D =3; // d i a m e t e r
6 n =0.55; // e f f i c i e n c y
7 c =3*10^8; // v e l o o f l i g h t
8 // The g a i n o f a p a r a b o l i c a n t e n n a i s g i v e n a s G=(n∗
%pi ˆ2∗Dˆ 2 ) / wl ˆ 2 . T h e r e f o r e w a v e l e n g t h i s g i v e n a s
9 wl = c / f_down
10 G =( n * %pi ^2* D ^2) / wl ^2;
11 G_dB = 10* log10 ( G ) ;
12 disp ( ’ dB ’ , G_dB , ’ The g a i n o f TVRO i s ’ ) ;
13 // The beamwidth i s g i v e n a s
14 bw = (70* wl ) / D ;
15 disp ( ’ d e g r e e ’ ,bw , ’ The beamwidth i s ’ ) ;

109
Chapter 21

Cellular Radio

Scilab code Exa 21.1 example 1

1 clc ;
2 // p a g e no 795
3 // p r o b no 2 1 . 1
4 v =100; // i n km/ h r
5 // f i r s t c o n v e r t s p e e d i n t o m/ s e c
6 v1 =(100*10^3) /3600; // i n km/ s e c
7 // p a r t a )
8 r =10^4; // i n m
9 t =(2* r ) / v1 ;
10 disp ( ’ s e c ’ ,t , ’ H a n d o f f t i m e i s ’ ) ;
11 // p a r t b )
12 r =500; // i n m
13 t =(2* r ) / v1 ;
14 disp ( ’ s e c ’ ,t , ’ H a n d o f f t i m e i s ’ ) ;

Scilab code Exa 21.2 example 2

1 clc ;

110
2 // p a g e no 807
3 // p r o b no 2 1 . 2
4 N =12; m =120;
5 a =20000;
6 th =30; // i n min / day t h i s means
7 H =0.5;
8 tp =10;
9 // p a r t a ) C a l c u l a t i o n o f t h e a v e r a g e and peak t r a f f i c
i n e r l a n g s f o r the whole system
10 // The a v e r a g e t r a f f i c i s
11 T = a * H /24;
12 disp ( ’E ’ ,T , ’ a ) The a v e r a g e t r a f f i c i s ’ ) ;
13 // The peak t r a f f i c i s
14 T1 =( a * tp ) /60;
15 disp ( ’E ’ ,T1 , ’ The peak t r a f f i c i s ’ ) ;
16 // p a r t b ) C a l c u l a t i o n o f t h e a v e r a g e and peak t r a f f i c
i n e r l a n g s f o r one c e l l
17 // The a v e r a g e t r a f f i c p e r c e l l i s
18 t=T/m;
19 disp ( ’E ’ ,T , ’ b ) The a v e r a g e t r a f f i c p e r c e l l i s ’ ) ;
20 // The peak t r a f f i c p e r c e l l i s
21 t = T1 / m ;
22 disp ( ’E ’ ,T1 , ’ The peak t r a f f i c p e r c e l l i s ’ ) ;
23 // p a r t c )
24 // For a v e r a g e t r a f f i c a t 3 . 4 7 E , t h e b l o c k i n g
p r o b a b i l i t y i s much l e s s t h a n 1%, s i n c e t h e
a v e r a g e no o f c a l l i s much l e s s t h a n t h e no o f
c h a n n e l s . However , t h e b l o c k i n g p r o b a b i l i t y
i n c r e a s e s t o j u s t o v e r 5%

Scilab code Exa 21.3 example 3

1 clc ;
2 // p a g e no 816
3 // p r o b no 2 1 . 3

111
4 tg =123*10^ -6;
5 c =3*10^8;
6 // The maximum d i s t a n c e b e t w e e n b a s e and m o b i l e i s
7 d = c * tg ;
8 disp ( ’m ’ ,d , ’ The maximum d i s t a n c e b e t w e e n b a s e and
mobile i s ’ );

112
Chapter 22

Personal Communication
Systems

Scilab code Exa 22.1 example 1

1 clc ;
2 // p a g e no 842
3 // p r o b no 2 2 . 1
4 PR = -100; // I n dBm
5 // The m o b i l e t r a n s m i t t e d power i s
6 PT_dBm = -76 - PR ; // t h i s i s i n dBm
7 disp ( ’ o r ’ , ’dBm ’ , PT_dBm , ’ The m o b i l e t r a n s m i t t e d power
i n dBm i s ’ ) ;
8 PT_mW =10^( PT_dBm /10) ;
9 disp ( ’mW’ , PT_mW , ’ The m o b i l e t r a n s m i t t e d power i s ’ ) ;

113
Chapter 23

Paging and Wireless Data


Networking

Scilab code Exa 23.1 example 1

1 clc ;
2 // p a g e no 863
3 // p r o b no 2 3 . 1
4 bit_rate = 512; // i b bps
5 t =60; // i n s e c
6 // p r e a m b l e u s e s 576 b i t s
7 preamble =576;
8 bits_total = bit_rate * t ;;
9 usable_bits = bits_total - preamble ;
10 // e a c h b a t c h h a s one 32− b i t s s y n c h r o n i z i n g c o d e w o r d
and s i x t e e n 32− b i t a d d r e s s c o d e w o r d s f o r a t o t a l
o f 17∗32=544 b i t s . T h e r e f o r e
11 bits_per_batch = 17*32;
12 batches_per_min = usable_bits / bits_per_batch ;
13 addr =16;
14 addr_per_min = batches_per_min * addr ;
15 disp ( addr_per_min , ’ The no o f p a g e s t r a n s m i t t e d i n
one min a r e ’ ) ;

114
Scilab code Exa 23.2 example 2

1 clc ;
2 // p a g e no 864
3 // p r o b no 2 3 . 2
4 // For t h e g i v e n FLEX s y s t e m
5 Wc =25*10^3;
6 bit_rate = 6400; // i n bps
7 efficiency = bit_rate / Wc ;
8 disp ( ’ b / s /Hz ’ , efficiency , ’ The e f f i c i e n c y i s ’ );

Scilab code Exa 23.3 example 3

1 clc ;
2 // p a g e no 871
3 // p r o b no 2 3 . 3
4 // f o r t h e B l u e t o o t h s y s t e m
5 fh_max =1/(625*10^ -6) ;
6 fh_min =1/(5*625*10^ -6) ;
7 disp ( ’ Hz ’ , fh_min , ’ The minimum h o p p i n g r a t e i s ’ , ’ Hz ’ ,
fh_max , ’ The maximum h o p p i n g r a t e i s ’ );

115
Chapter 24

Fiber Optics

Scilab code Exa 24.3 example 1

1 clc ;
2 // p a g e no 888
3 // p r o b no 2 4 . 3
4 NA =0.15;
5 wl =820*10^ -9; // i n m
6 d_core =2*(0.383* wl / NA ) ;
7 disp ( ’m ’ , d_core , ’ The c o r e d i a m e t e r i s ’ );

Scilab code Exa 24.4 example 2

1 clc ;
2 // p a g e no 890
3 // p r o b no 2 4 . 4
4 Bl =500; // i n MHz−km
5 B =85; // i n MHz
6 // By u s i n g Bandwidth−d i s t a n c e p r o d u c t f o r m u l a
7 l = Bl / B ;
8 disp ( ’km ’ ,l , ’ The maximun d i s t a n c e t h a t can be u s e
between r e p e a t e r s i s ’ );

116
Scilab code Exa 24.5 example 3

1 clc ;
2 // p a g e no 891
3 // p r o b no 2 4 . 5
4 wl0 =1310; // i n n s
5 So =0.05; // i n p s / (nmˆ2∗km)
6 l =50; // i n km
7 wl =1550; // i n n s
8 d =2; // i n nm
9 // C h r o m a t i c d i s p e r s i o n i s g i v e n a s
10 Dc =( So /4) *[ wl -( wl0 ^4/ wl ^3) ];
11 // D i s p e r s i o n i s
12 D = Dc * d ;
13 // T h e r e f o r e t o t a l d i s p e r s i o n i s
14 dt = D * l ;
15 disp ( ’ p s ’ ,dt , ’ The t o t a l d i s p e r s i o n i s ’ ) ;

Scilab code Exa 24.6 example 6

1 clc ;
2 // p a g e no 893
3 // p r o b no 2 4 . 6
4 // R e f e r p r o b l e m 2 4 . 5
5 dt =949*10^ -12; // i n s e d
6 l =50; // i n km
7 B =1/(2* dt ) ;
8 //By u s i n g Bandwidth−d i s t a n c e p r o d u c t f o r m u l a
9 Bl = B * l ;
10 disp ( ’ Hz−km ’ ,Bl , ’ The bandwidth d i s t a n c e p r o d u c t i s ’ )
;

117
Scilab code Exa 24.7 example 5

1 clc ;
2 // p a g e no 899
3 // p r o b no 2 4 . 7
4 // r e f e r t a b l e from t h e p r o b l e m p a g e no 899
5 P_coupling1 = -3; P_coupling2 = -6; P_coupling3 = -40;
// i n dB
6 // P a r t a ) The p r o p o r t i o n o f i n p u t power e m e r g i n g a t
port 2
7 P2_Pin =10^( P_coupling1 /10) ;
8 disp ( ’% ’ , P2_Pin *100 , ’ a ) The p r o p o r t i o n o f i n p u t
power e m e r g i n g a t p o r t 2 ’ ) ;
9 P3_Pin =10^( P_coupling2 /10) ;
10 disp ( ’% ’ , P3_Pin *100 , ’ The p r o p o r t i o n o f i n p u t power
emerging at p o r t 3 ’ );
11 // P a r t b ) I n t h e r e v e r s e d i r e c t i o n , t h e s i g n a l i s 40
dB down f o r a l l c o m b i n a t i o n s , s o
12 directivity = 40;
13 disp ( ’ dB ’ , directivity , ’ D i r e c t i v i t y i s ’ ) ;
14 Pin_total = P2_Pin + P3_Pin ;
15 // e x c e s s l o s s i n dB
16 loss = -10* log10 ( Pin_total ) ;
17 disp ( ’ dB ’ , loss , ’ t h e e x c e s s l o s s i s ’ ) ;

Scilab code Exa 24.8 example 6

1 clc ;
2 // p a g e no 901
3 // p r o b no 2 4 . 8
4 wl =1*10^ -6;
5 c = 3*10^8;

118
6 h =6.626*10^ -34
7 f = c / wl ;
8 E = h * f ; // i n J o u l e
9 // t h i s e n e r g y can be c o n v e r t e di n t o e l e c t r o n −v o l t .
we know 1eV =1.6∗10ˆ −19 J
10 eV =1.6*10^ -19 ;
11 E_ev = E / eV ;
12 disp ( ’ eV ’ , E_ev , ’ The e n e r g y o f p h o t o n i n eV i s ’ ) ;

Scilab code Exa 24.9 example 9

1 clc ;
2 // p a g e no 909
3 // p r o b no 24 9
4 // r e f e r f i g 2 4 . 2 5
5 P_in =500; Responsivity =0.33;
6 I_d = P_in * Responsivity ;
7 disp ( ’ nA ’ ,I_d , ’ The d i o d e c u r r e n t i s ’ );

119
Chapter 25

Fiber Optic Systems

Scilab code Exa 25.1 example 1

1 clc ;
2 // p a g e no 919
3 // p r o b no 25 1
4 span_length =40; // i n km
5 Pin_mW = 1.5;
6 signal_strength_dBm = -25; fiber_length = 2.5; // i n
km
7 loss_per_slice_dB =0.25; f_loss_dB_per_km =0.3;
8 loss_connector_dB =4;
9 Pin_dBm =10* log10 ( Pin_mW ) ;
10 splices = span_length / fiber_length -1;
11 fiber_loss = span_length * f_loss_dB_per_km ;
12 splice_loss = splices * loss_per_slice_dB ;
13 T_loss = fiber_loss + splice_loss +
loss_connector_dB ;
14 P_out = Pin_dBm - T_loss ;
15 sys_margin = P_out - signal_strength_dBm ;
16 disp ( ’ dB ’ , sys_margin , ’ The s y s t e m m a r g i n i s ’ ) ;

120
Scilab code Exa 25.2 example 2

1 clc ;
2 // p a g e no 921
3 // p r o b no 25 2
4 L =45; // i n km
5 dt =100; // i n n s
6 // The maximum p e r m i s s i b l e value f o r the pulse −
spreading constant i s
7 D = dt / L ;
8 disp ( ’ n s /km ’ ,D , ’ The maximum p e r m i s s i b l e value for
t h e p u l s e −s p r e a d i n g c o n s t a n t i s ’ ) ;

Scilab code Exa 25.3 example 3

1 clc ;
2 // p a g e no 922
3 // p r o b no 25 3
4 L =45;
5 T_Rtx =50; T_Rrx =75; T_Rf =100;
6 T_RT = sqrt ( T_Rtx ^2 + T_Rrx ^2 + T_Rf ^2) ;
7 // a ) f o r NRZ
8 fb =1/ T_RT ;
9 disp ( ’GHz ’ ,fb , ’ a ) The maximum b i t r a t e f o r NRZ ’ ) ;
10 // b ) f o r RZ
11 fb =1/(2* T_RT ) ;
12 disp ( ’GHz ’ ,fb , ’ b ) The maximum b i t r a t e f o r NRZ ’ ) ;

Scilab code Exa 25.4 example 4

1 clc ;
2 // p a g e no 924
3 // p r o b no 25 4

121
4 Bl =500; // i n MHz−km
5 L =5; // i n km
6 // u s i n g t h e bandwidth−d i s t a n c e p r o d u c t f o r m u l a
d i s p e r s i o n i s given as
7 D =500/ Bl ;
8 disp ( ’ n s /km ’ ,D , ’ D i s p e r s i o n i s ’ ) ;
9 // T o t a l r i s e t i m e i s g i v e n a s
10 T_rt = D * L ;
11 disp ( ’ n s ’ , T_rt , ’ T o t a l r i s e t i m e i s ’ ) ;

Scilab code Exa 25.5 example 5

1 clc ;
2 // p a g e no 924
3 // p r o b no 25 5
4 T_Rrx =3*10^ -9;
5 T_Rtx =2*10^ -9;
6 fb =100*10^6; // i n bps
7 L =25; // i n km
8 T_RT = 1/(2* fb )
9 // we have t o compute r i s e t i m e t h e r e f o r e
10 T_rf = sqrt ( T_RT ^2 - T_Rtx ^2 - T_Rrx ^2)
11 // d i s p e r s i o n p e r km i s
12 D = T_rf / L ;
13 disp ( ’ n s /km ’ ,D /10^ -9 , ’ The maximum a c c e p t a b l e
d i s p e r s i o n i s ’ );
14 // u s i n g t h e bandwidth−d i s t a n c e p r o d u c t
15 Bl =500/ D ;
16 disp ( ’MHz−km ’ , Bl *10^ -9 , ’ The bandwidth−d i s t a n c e
product i s ’ );

122

You might also like