0% found this document useful (0 votes)
9 views

Electronic Communication Systemsr Blake

This document is a Scilab textbook companion created by Aparna Bobade for the textbook "Electronics Communication Systems" by R. Blake. It contains Scilab codes that correspond to examples, equations, and sections from each chapter of the textbook. There are over 200 codes listed by chapter and example number to demonstrate concepts from introduction to communication systems through fiber optic systems. The codes were created to help explain and solve problems from the textbook.

Uploaded by

Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Electronic Communication Systemsr Blake

This document is a Scilab textbook companion created by Aparna Bobade for the textbook "Electronics Communication Systems" by R. Blake. It contains Scilab codes that correspond to examples, equations, and sections from each chapter of the textbook. There are over 200 codes listed by chapter and example number to demonstrate concepts from introduction to communication systems through fiber optic systems. The codes were created to help explain and solve problems from the textbook.

Uploaded by

Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 123

 

Scilab Textbook Companion for


Electronics Communication Systems
by R. Blake1

Created by
Aparna Bobade
B.E.
Electronics Engineering
RAMDEOBABA COLLEGE OF ENGG. & MANAGEMENT,NAGPUR
College Teacher
Pradip Selokar
Cross-Checked by

August 17, 2013

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:  Electronics 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 5

1 Introduction to communication system   10

2 Radio Frequency Circuits   17

3 The Amplitude Modulation   24

4 Angle Modulation   29

5 Transmitters   36

6 Receivers   42

7 Digital communication   47

8 The Telephone System   51

9 Data Transmission   53

12 Digital Modulation and Modems   55

13 Multiplexing and Multiple Access Techniques   59

14 Transmission Lines   63

15 Radio Wave Propogation   73

16 Antennas   79

3
 

17 Microwave Devices   84

18 Terrestrial Microwave Communication system   92

19 Television   98

20 Satellite Communication   104

21 Cellular Radio   110

22 Personal Communication Systems   113

23 Paging and Wireless Data Networking   114

24 Fiber Optics   116

25 Fiber Optic Systems   120

4
 

List of Scilab Codes

Exa 1.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 10


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

5
 

Exa 3.9 example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 27


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

6
 

Exa 8.6 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 52


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

7
 

Exa 15.6 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 75


Exa 15.7 example 7 . . . . . . . . . . . . . . . . . . . . . . . . . 76
Exa 15.8 example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 76
Exa 15.9 example 9 . . . . . . . . . . . . . . . . . . . . . . . . . 77
Exa 15.11 example 10 . . . . . . . . . . . . . . . . . . . . . . . . 77
Exa 15.12 example 11   . . . . . . . . . . . . . . . . . . . . . . . . 78
Exa 16.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 79
Exa 16.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 79
Exa 16.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 80
Exa 16.4 example 4 . . . . . . . . . . . . . . . . . . . . . . . . . 80
Exa 16.6 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 81
Exa 16.7 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 81
Exa 16.8 example 7 . . . . . . . . . . . . . . . . . . . . . . . . . 82
Exa 16.9 example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 82
Exa 17.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 84
Exa 17.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 84
Exa 17.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 85
Exa 17.4 example 4 . . . . . . . . . . . . . . . . . . . . . . . . . 86
Exa 17.5 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 86
Exa 17.7 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 86
Exa 17.8 example 7 . . . . . . . . . . . . . . . . . . . . . . . . . 87
Exa 17.9 example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 87
Exa 17.10 example 9 . . . . . . . . . . . . . . . . . . . . . . . . . 88
Exa 17.11 example 10   . . . . . . . . . . . . . . . . . . . . . . . . 88
Exa 17.12 example 11   . . . . . . . . . . . . . . . . . . . . . . . . 89
Exa 17.13.aexample 12   . . . . . . . . . . . . . . . . . . . . . . . . 89
Exa 17.13.bexample 13   . . . . . . . . . . . . . . . . . . . . . . . . 90
Exa 17.14 example 14   . . . . . . . . . . . . . . . . . . . . . . . . 90
Exa 18.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 92
Exa 18.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 92
Exa 18.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 93
Exa 18.4 example 4 . . . . . . . . . . . . . . . . . . . . . . . . . 93
Exa 18.5 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 94
Exa 18.6 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 94
Exa 18.7 example 7 . . . . . . . . . . . . . . . . . . . . . . . . . 95
Exa 18.8 example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 95
Exa 18.9 example 9 . . . . . . . . . . . . . . . . . . . . . . . . . 96
Exa 18.10 example 10   . . . . . . . . . . . . . . . . . . . . . . . . 96

8
 

Exa 18.11 example 11   . . . . . . . . . . . . . . . . . . . . . . . . 97


Exa 19.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 98
Exa 19.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 98
Exa 19.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 99
Exa 19.4 example 4 . . . . . . . . . . . . . . . . . . . . . . . . . 100
Exa 19.5 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 100
Exa 19.6 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 101
Exa 19.7.a example 7 . . . . . . . . . . . . . . . . . . . . . . . . . 102
Exa 19.7.b example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 103
Exa 20.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 104
Exa 20.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 105
Exa 20.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 105
Exa 20.4 example 4 . . . . . . . . . . . . . . . . . . . . . . . . . 105
Exa 20.5 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 106
Exa 20.6 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 107
Exa 20.7 example 7 . . . . . . . . . . . . . . . . . . . . . . . . . 107
Exa 20.8 example 8 . . . . . . . . . . . . . . . . . . . . . . . . . 108
Exa 20.9 example 9 . . . . . . . . . . . . . . . . . . . . . . . . . 108
Exa 21.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 110
Exa 21.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 110
Exa 21.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 111
Exa 22.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 113
Exa 23.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 114
Exa 23.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 115
Exa 23.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 115
Exa 24.3 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 116
Exa 24.4 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 116
Exa 24.5 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 117
Exa 24.6 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 117
Exa 24.7 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 118
Exa 24.8 example 6 . . . . . . . . . . . . . . . . . . . . . . . . . 118
Exa 24.9 example 9 . . . . . . . . . . . . . . . . . . . . . . . . . 119
Exa 25.1 example 1 . . . . . . . . . . . . . . . . . . . . . . . . . 120
Exa 25.2 example 2 . . . . . . . . . . . . . . . . . . . . . . . . . 121
Exa 25.3 example 3 . . . . . . . . . . . . . . . . . . . . . . . . . 121
Exa 25.4 example 4 . . . . . . . . . . . . . . . . . . . . . . . . . 121
Exa 25.5 example 5 . . . . . . . . . . . . . . . . . . . . . . . . . 122

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 ro 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 b an d )
5   / / We h av e t h e e q u a t i on 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 ’ , w l , + ’WAVELENGTH IN FREE SPACE I S ’ );
10   / / p a r t B ) f r e q = 2 7MHz(CB r a d i o b an d )
11   f=27*10^6;
12   wl=c/f;
13   disp (  ’m ’ , w l , + ’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 television )
15   f=4*10^9;
16   wl=c/f;
17   disp (  ’m ’ , w l , + ’WAVELENGTH IN FREE SPACE I S ’ );

10
 

Scilab code Exa 1.4  example 4

1   clc ;
2   / / p ag e no 18
3   // p ro b no . 1 . 4
4   / / I n g i v e n p ro bl em n o i s e po we r b an dw id th i s 1 0kHz ;
r e s i s t o r temp T( 0 c ) =27
5   // F i r s t we ha ve t o c o nv e r t t em pe ra tu re 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 tr 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   P n = k * Tk * B ;
12   disp (  ’W’ , P n , ’ n o i s e power c o n tr 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 ag e no 20
3   / / p ro b no 1 . 5
4   / / I n t h e g i v e n p r ob l e m B=6MHz , Tk =2 93 , k
=1.38∗10ˆ −23
5   B = 6 * 10 ^ 6 ; T k = 2 93 ; k = 1 . 3 8* 1 0 ^ - 2 3 ; R = 3 00 ;
6   Pn=k*Tk*B;
7   disp (  ’W’ , P n , ’ 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 ve n by Vn=s q r t ( 4∗ k ∗Tk∗B∗R)
9   Vn = sqrt ( 4 * k * T k * B * R ) ;
10   disp (  ’ v o l t s ’ , V n , ’ Th n o i s e v o l t a g e
i s ’ );
11   / / o n ly one−h a l f o f t h i s v o l t a g e i s a pp e a rs a c ro s s
t he a nt en na t e rm i n a ls , t he o t h er a p pe a rs a c r o s s

11
 

t h e s o u r c e r e s i s t a n c e . T h e re f o r e t he a c tu a l n o i s e
v o l t a g a t t h e i np u t i s 2 . 7 uV

Scilab code Exa 1.6  example 6

1   clc ;
2   / / p ag e no 21
3   / / p ro b no 1 . 6
4   // g i ve n : FM b r o ad c a st r e c e i v e r : −   Vn=10uV , R=75V, B
=200 kHz
5   V n = 1 0 ; / / i n uV
6   R = 7 5 ; B = 2 0 0 * 1 0^ 3 ;
7   //By Ohm’ s law
8   In=Vn/R;
9   disp (  ’ uA ’ , I n , ’ N o is e c u r r e nt
i s ’ );
10   / / N oi se v o tl a g e i s a l s o g iv en 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 ’ , I o , ’ c u r r e nt t hr ou gh t he d i od e i s ’ ) ;

Scilab code Exa 1.7  example 7

1   clc ;
2   / / p a ge no 2 3
3   / / p r o no 1 . 7
4   / / G iv en : r e f e r f i g . 1 . 1 2 o f p ag e no . 2 3 ; R1=100ohm , 3 0 0 K ;
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 iv en by
7   / / Vn1 = s q r t ( V r1 ˆ 2 + V r2 ˆ 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   V n 1 = sqrt ( 4* k * B *( T 1 * R1 + T 2 * R2 ) ) ;
11   disp (  ’ v o l t s ’ , V n 1 , ’ 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 se 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   / / o ne−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
loa d .
14   / / Now t h e l o a d po we r i s P= Vn1 ˆ2 / Rl
15   P = ( Vn 1 /2 ) ^2 / Rl ;
16   disp (  ’W’ ,P ,  ’ The l o a d po we r i s ’ ) ;

Scilab code Exa 1.8  example 8

1   clc ;
2   / / p ag e no 24
3   / / p ro b no 1 . 8
4   // Give n : N=0.2W; S+N=5W; : . S =4.8W
5   N = 0 . 2 ; S = 4 . 8;
6   p=(S+N)/N;
7   p d B = 1 0 * log10 ( p ) ;
8   disp (  ’ dB ’ , p d B , ’ The p ow er r a t i o i n dB ’ ) ;

Scilab code Exa 1.9  example 9

1   clc ;
2   / / p a ge no 2 5
3   / / p ro b n o 1 . 9
4   // Giv en : S i =100uW; Ni=1uW; So=1uW; No=0 .0 3W
5   S i = 1 00 ; N i =1 ; S o =1 ; N o = 0 .0 3// a l l p ow e r s a r e i n uW
6   r 1 = S i / N i ; / / i n p u t SNR
7   r 2 = S o / N o ; / / o u t p u t SNR
8   N F = r 1 / r 2 ; // A m p l i f i e r n o i s e f i g u r e
9   disp ( N F ,  ’ 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 ge no 2 5
3   / / p ro 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   S N R in = 4 2 ; N F =6 ;
7   SNRop=SNRin-NF;
8   disp (  ’ dB ’ , S N R o p , ’SNR a t t he o ut pu t i s ’ );

Scilab code Exa 1.11  example 11

1   clc ;
2   / / p a ge no 2 7
3   / / p ro b n o 1 . 1 1
4   // Giv en NFdB=2dB , : . NF=a n t i l o g (NFdB) /1 0= 1. 58 5
5   NF=1.585;
6   Teq=290*(NF-1);
7   disp (  ’K ’ , T e q , ’ The n o i s e t em pe ra tu re i s ’ );

Scilab code Exa 1.12  example 12

1   clc ;
2   / / p a ge no 2 9
3   / / p ro 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 ( A t ,  ’ The p ower g a i n i s ’ ) ;


8   / / The n o i s e f i g u r e i s g iv en a s
9   N F t = N F 1 + (( N F2 - 1 ) / A1 ) + ( ( NF 3 - 1 ) / ( A 1 * A2 ) ) ;
10   disp ( N F t ,  ’ The n o i s e f i g u r e i s ’ ) ;
11   / / N oi s e temp ca n be f ou nd a s
12   Teq=290*(NFt-1);
13   disp (  ’K ’ , T e q , ’ The n o i s e t em pe ra t ur e i s ’ ) ;

Scilab code Exa 1.13  example 13

1   clc ;
2   / / p ag e no 34
3   / / p ro 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 = 1 1 0 ; / / i n MHz
6   disp (  ’MHz ’ ,f ,  ’A) The f r e q i s ’ ) ;
7   // The s i g n a l p eak 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 1 0dB/ d i v i s i o n , so
i t s   −30dBm.
8   PdBm=-30;
9   disp (  ’dBm ’ , P d B m ,  ’ T he p o we r i n dBm ’ ) ;
10   / / The e q u i v a l e n t p ow er c an b e f o un d f ro m P (dBm) =10
lo gP /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 he v o l t a g e ca n be f o un d from t he g ra p h bu t i t i s
m or e a c c u r a t e l y f r o m P=Vˆ 2 /R
13   P = 1 0 ^ - 6 ; R = 5 0;
14   disp (  ’W’ ,P ,  ’ The p ow er 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 nt e r , w it h 1 00 kHz / d iv . The f r e q i s 10 0kHz l e s s
t h a n t he 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   / / W ith r e g a r d s t o t he a mp li tu de , t he s c a l e i s 1dB/
div & the s i g n al i s 1 div below the r e f er e nc e
l e v e l . T h e re fo r e t h e s i g n a l h a s a power l e v e l
g i ve n a s
22   P d B m = 1 0 - 1 ; / / i n dBm
23   / / T hi s can be c o n v e rt e d t o w at ts & v o l t s a s same i n
part A
24   //P(mW)=an t i l o g dBm/10= a n t i l o g 9/10 =7.9 4mW
25   P = 7 .9 4 *1 0 ^ - 3 ; R = 5 0;
26   disp (  ’W’ ,P ,  ’ The p ow er i s ’ ) ;
27   disp (  ’dBm ’ , P d B m ,  ’ T he p o we r 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 ar 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 5 43MHz, w it h 1MHz/ d i v .
T h e re f o r e t he f r e q i s
32   f = 5 4 3 + 3 * 1 ; / / i n MHz
33   disp (  ’MHz ’ ,f ,  ’C) The f r e q i s ’ ) ;
34   / / fro m t he s p ec tr 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   / / p ower i s g i v en a s
38   P=V^2/R;
39   disp (  ’uW’ ,P ,  ’ The p ow er i s ’ ) ;
40   P d B m = 1 0 * log10 ( P * 1 0 ^ - 6 / 1 0 ^ - 3 ) ;
41   disp (  ’dBm ’ , P d B m ,  ’ T he p o we r i n dBm ’ ) ;

16
 

Chapter 2

Radio Frequency Circuits

Scilab code Exa 2.1  example 1

1   clc ;
2   / / p a ge no 5 0
3   / / p ro b n o 2 . 1
4   / / R e f e r t h e f i g 2 . 6 o f p ag 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 en t f r e q e n c y i s g i v en a s
7   f o = ( 1 / ( 2 * % p i *sqrt ( L 1 * C 1 ) ) ) ;
8   disp (  ’ Hz ’ , f o , ’ a ) The r e so n e n t f r e q ue n cy is ’ );
9   / /B) The b an dw id th i s g i v e n a s
10   B=fo/Q;
11   disp (  ’ Hz ’ ,B ,  ’ The b an dw id th i s ’ );

Scilab code Exa 2.2  example 2

1   clc ;
2   / / p a ge no 6 2
3   // p ro b no . 2 . 2
4   // Given : Ha rt le y o s c i l l a t o r s L=10uH ; C=100pF

17
 

5   L = 1 0 *1 0 ^ - 6 ; C = 1 0 0 *1 0 ^ - 1 2 ; N 1 = 1 0; N 2 = 1 0 0
6   / / A) The o p e r a t i ng f r eq u e nc y i s
7   f o = 1 / ( 2 * % p i *sqrt ( L * C ) ) ;
8   disp (  ’ Hz ’ , f o , ’ 1 ) The o p e r a t i ng f r e qu e n cy i s ’ );
9   / / The f ee db ac k f r a c t i o n i s g iv en by
10   B=-N1/N2;
11   / / O pe ra ti n g g a in i s g i ve 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 ha se 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 ue n cy i s same a s i n p a r t A)
16   N1=20;N2=80;
17   / / The f ee db ac k f r a c t i o n i s g iv en by
18   B=(N1+N2)/N1;
19   / / O pe ra ti n g g a in i s g i ve 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 ag e no 66
3   / / p ro b n o 2 . 3
4   C 1 = 1 0 * 1 0^ - 1 2; C 2 = 1 0 0* 1 0^ - 1 2 ; L = 1 * 10 ^ - 6 ;
5   // The e f f e c t i v e c a p a ci t an c e i s
6   CT=(C1*C2)/(C1+C2);
7   disp ( C T ) ;
8   / / The o p e ra t i ng f r e q ue n c y i s
9   f 0 = 1 / ( 2 * % p i *sqrt ( L * C T ) ) ;
10   disp (  ’ Hz ’ , f 0 , ’ 1 ) The o p e r a t i ng f r e qu e n cy
i s ’ );
11   / / The f ee d b a c k f r a c t i o n i s g i v e n a p p ro xi m a te ly by
12   B=-C1/C2;
13   disp (B ,  ’ The f ee d b a c k f r a c t i o n i s ’ );
14   / / F o r t h e common−b as e ck t , t he op−f r e q i s same b ut
t h e f ee d ba ck 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   C 1 = 1 0 0* 1 0 ^ - 1 2 ; C 2 = 1 0 *1 0 ^ - 1 2 ;
16   / / I t i s g iv e n by
17   B=C2/(C1+C2);
18   disp (B ,  ’ The f ee 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 ag e no 68
3   / / p ro b n o 2 . 4
4   // R ef er f i g 2 . 2 2
5   c 1 = 1 0 0 0 ; c 2 = 1 0 0 ; c 3 = 1 0 ; // a l l
v a l u e s a re i n p f  
6   / / The e f f e c t i v e t o t a l c a p a ci t a n c e
7   Ct=1/((1/c1)+(1/c2)+(1/c3));
8   disp (  ’ pF ’ , C t , ’ 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 ra t i n g f r e q i s
11   f 0 = 1 / ( 2 * % p i *sqrt ( L * C T ) ) ;
12   disp (  ’ Hz ’ , f 0 , ’ The o p e ra t i n g f r e q i s ’ );

Scilab code Exa 2.5  example 5

1   clc ;
2   / / p ag e no 70
3   / / p ro b n o 2 . 5
4   C = 8 0 * 10 ^ - 1 2 ; L = 1 0 0* 1 0^ - 6 ;
5   / / P a rt a ) The r e s o n en t f r eq u en c y i s
6   f 0 = 1 / ( 2 * % p i *sqrt ( L * C ) ) ;
7   disp (  ’ Hz ’ , f 0 , ’ The r e so 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 es o n a t e o n
d o u bl i ng t he f re qu e nc y , t h e r e f o r e
9   f1=2*f0;
10   / / f ro m t he e qu a ti o n o f r e s o n e n t f r eq u en c y

19
 

11   C 1 = 1 / ( 4 * ( % p i * f 1 ) ^ 2 * L ) ;
12   / / Now f o r t un in g v o l t ag e we h ave t o u se e qu a ti o n
C1=Co/ s q r t (1+ 2V)
13   Co=C;
14   // a f t e r s o lv i ng the e xp re ss io n
15   v = ( ( C o / C 1 ) ^ 2 - 1) / 2 ;
16   disp (  ’V ’ ,v ,  ’ The t un in g v o l t a g e is ’ );

Scilab code Exa 2.7  example 6

1   clc ;
2   / / p a ge no 7 6
3   / / p ro b le m 2 . 7
4   / / a l l f r e q u e n c i e s a re i n MHz
5   f1=11;f2=10;
6   / / o ut pu t f r e q u e n c i e s a t t he o ut pu t o f s qu ar e −l aw
mixer
7   a=f1+f2;
8   b=f1-f2;
9   disp (  ’MHz ’ ,b ,  ’MHz ’ ,a ,  ’ The o ut pu t f r e q u e n c i e s a t t he
o ut p ut o f s qu a re −la w m ix e r a r e : ’ ) ;

Scilab code Exa 2.8  example 7

1   clc ;
2   / / p a ge no 8 5
3   / / p ro b le m no . 2 . 8
4   / / a l l t he f r e q u e n c i e s a re i n MHz
5   f r e q _f r e e _r u n = 1 2;
6   f r e q _ l o ck 1 = 1 0;
7   f r e q _ l o ck 2 = 1 6;

20
 

8   / / c a p t u r e r an ge i s a p p ro x i ma te ly t w i c e t he
d i f f e r e n c e b e t we en t he f r e e −r un ni ng f r e q and t he
f r e q a t wh ich l o c k i s f i r s t a c h i ev ed
9   c a p t u re _ r a ng e = 2 *( f r e q _f r e e _r u n - f r e q _l o c k 1 ) ;
10   disp (  ’MHz ’ ,capture_ra nge , ’ The c a p t u r e r an ge i s ’ ) ;
11   // l o c k r an ge i s a p p ro xi m a te ly t wi c e t he t he
d i f f e r e n c e b e t we en t h e f r e q wh er e l o ck i s l o s t
and f r e e −r un ni ng f r e q
12   l o ck _ ra n ge = 2 *( f r e q_ l oc k 2 - f r eq _ fr e e_ r un ) ;
13   disp (  ’MHz ’ ,lock_range , ’ The l o c k r an ge i s ’ ) ;
14   / / T he PLL f r e q r e s p o n s e i d a p pr o xi m at e s y m me t r ic a l .
T hi 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 he l o c k r an ge and c a p t u r e r an ge . T h er e fo r e
15   f r e q _ l o ck _ a c q ui r e d = f r e q _f r e e _r u n + ( c a p t u r e_ r a n ge
/2);
16   f r e q _ l oc k _ l os t = f r e q _f r e e _r u n - c a p t ur e _ r an g e
17   disp (  ’MHz ’ ,freq_lock_acquired , ’ The f r e q a t wh ich t he
l o c k i s a cq ui re d , moving downward i n f r e q i s ’ ) ;
18   disp (  ’MHz ’ ,freq_lo ck_lost , ’ Lock w i l l be l o s t on t h e
way do wn a t ’ ) ;

Scilab code Exa 2.9  example 8

1   clc ;
2   / / p a ge no 8 6
3   / / p ro b no 2 . 9
4   // r e f e r f i g 2 . 3 8
5   / / Here we a re u s in 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 ev id e i t by a f a c t o r t o g et 10 kHz
6   f _ o s c = 1 0 * 10 ^ 6 ; f _ re f = 1 0 * 1 0 ^3 ; f 0 _ 1 = 5 4 0 * 10 ^ 3 ; f 0 _ 2
=1700*10^3;
7   Q=f_osc/f_ref;
8   / / we h ave t o s p e c i f y t he r a ng e o f v a l u es o f N. Find
N a t e a ch and o f t he t un in g r an ge
9   N1=f0_1/f_ref;

21
 

10   N 2 = f 0 _ 2 / f _ r e f ;
11   disp ( N 2 ,  ’ The v a l ue s o f N a t h ig h end i s ’ , N 1 , ’ The
v a l u es o f N a t lo w end i s ’ ) ;

Scilab code Exa 2.10  example 9

1   clc ;
2   / / p a ge no 8 9
3   / / p ro b n o 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   // con sid er
7   N=1;
8   / / With a f i x e d −modulus p r e s c a l a r , t he min f r e q s t e p
is
9   step_size=M*f_ref;
10   / / With t h e two−m od ul us s ys te m , l e t t h e main d i v i d e r
m od ulu s N r em ai n c o n s t a n t & i n c r e a s e t h e m od ul us
m t o (m+1) t o f i n d how much t h e f r e q c h an g es .
11   // f o r 1 s t c a se , o /p f r e q
12   f o = ( M + N * P ) * f _ r e f ;
13   // f o r 2 nd c a se wh ere l e a v e N a l on e b ut c ha ng es 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 = f o_ - f o ;
17   disp (  ’ Hz ’ ,f ,  ’ The s t e p s i z e t h at would h ave b een
o b ta i n ed w it ho ut p r e s c a l i n g ’ ) ;

Scilab code Exa 2.11  example 10

1   clc ;
2   / / p a ge no 9 1

22
 

3   / / p ro b no 2 . 1 1
4   // r e f e r f i g 2 . 4 2
5   f _ r e f = 2 0 * 10 ^ 3 ;
6   f _ o s c = 1 0 * 10 ^ 6 ;
7   N1=10;N2=100;
8   f 0 =( N 1 * f _r ef ) + f _o sc ;
9   f 1 =( N 2 * f _r ef ) + f _o sc ;
10   disp (  ’ Hz ’ , f 1 , ’ Hz ’ , f 0 , ’ The o ut pu 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 ag e no 1 05
3   / / p ro b no 3 . 1
4   E r m s_ c a r = 2 ; f _ ca r = 1 . 5 * 1 0 ^6 ; f _ m o d = 5 0 0; E r m s_ m o d = 1 ;//
given
5   / / E qu at i on r e q u i r e s p eak v o l t a g e s & r a d i an
frequencies
6   Ec = sqrt ( 2) * E r m s _ c ar ; E m =sqrt ( 2 ) * E r m s _ m o d ;
7   w c = 2* % p i * f _ c ar ; w m = 2* % p i * f _ m od ; t = 1 ;
8   // T h er e fo r e t he e qu a ti 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   / / pa ge no 1 06
3   / / p ro b n o 3 . 2

24
 

4   / / To a v o id t h e ro und−o f f e r r o r s we s h ou ld u s e t he
o r i g i n a l v ol ta ge v al ue s
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 ua t io n ca n be o b ta i ne d a s
’ );

Scilab code Exa 3.3  example 3

1   clc ;
2   / / pa ge no 1 09
3   / / p ro b n o 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 ( m 1 ^ 2 + m 2 ^ 2 + m 3 ^ 2 ) ;
9   disp ( m T ,  ’ The m o du l at i on i n d ex i s ’ ) ;

Scilab code Exa 3.4  example 4

1   clc ;
2   / / pa ge no 1 10
3   / / p ro b n o 3 . 4
4   / / r e f e r f i g 3 .2
5   E _ ma x = 1 5 0 ; E _ mi n = 7 0 ; // 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 du l at i on i n d ex i s ’ ) ;

25
 

Scilab code Exa 3.6  example 5

1   clc ;
2   / / pa ge no 1 14
3   / / p ro b n o 3 . 6
4   B=10*10^3;
5   / / maximum m o du l at io n f r e q i s g i v e n a s
6   fm=B/2;
7   disp (  ’ Hz ’ , f m , ’ T he 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   / / pa ge no 1 16
3   / / p ro b n o 3 . 7
4   / / AM b r o a d c a st t r a n s m i t t e r
5   P c = 5 0 ; m = 0 . 8 ; // p ower i s i n kW
6   P t = P c * ( 1+ m ^ 2 / 2 ) ;
7   disp (  ’kW’ , P t , ’ The t o t a l power i s ’ ) ;

Scilab code Exa 3.8  example 7

1   clc ;
2   / / p ag e no 3 28
3   / / p ro b no 8 . 6
4   / / 2 kHz t o ne i s p r e s en t on c ha nn el 5 o f g r o u p 3 o f  
supergroup
5   / / s i g n a l i s l ow er s i de d s o
6   fc_channel_5=92*10^3;
7   f g = f c _ c h an n e l _5 - ( 2 * 10 ^ 3 ) ;/ / 2MHz b a se ba n d s i g n a l
8   / / we know g ro up 3 i n t he s u pe rg ro u p i s moved t o t he
r a n g e 408 −456 kHz w i th a s u p p r e s se d c a r r i e r
f r e q u e n c y o f 5 16 kHz

26
 

9   f_s_carr=516*10^3;
10   f s g = f _ s_ c ar r - f g ;
11   disp ( f s g ) ;

Scilab code Exa 3.9  example 8

1   clc ;
2   / / pa ge no 1 22
3   / / pr ob no . 3 . 9
4   // r e f e r f i g 3 . 1 4
5   / / fro m s pe ct ru m we c an s e e t h at e ac h o f t he two
s i de b a n ds i s 20dB b el o w t he r e f l e v e l o f 10dBm .
T h e re f o re e ac h s i de b an d h as a power o f    −10dBm i . e
. 100uW.
6   p o w e r _ o f _ ea c h _ s id e b a n d = 1 0 0;
7   T o t a l _ po w e r = 2 * p o w e r _o f _ e a ch _ s i d eb a n d ;
8   disp (  ’uW’ ,Total_power , ’ The t o t a l power i s ’ ) ;
9   d i v = 4 ; f r e q_ p e r _d i v = 1 ;
10   s i de b an d _s e pa r at i on = d iv * f r eq _ pe r _d i v ;
11   f _ mo d = s i d e b an d _ s ep a r a t io n / 2 ;
12   disp (  ’ kHz ’ , f _ m o d , ’ The m od ul at in 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 whi ch i s midway b et we en t he two
s i d e b a n ds . T h e r e f o r e
14   c a rr i er _ fr e q = 1 0;
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 ag e no 1 26
3   / / p ro b n o 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 en ce o /p f r e q i s o b ta i ne d by
s u b t r a c t i n g f m o d fro m f c a r
6   f_out1=f_car-f_mod1;
7   disp (  ’MHz ’ , f _ o u t 1 / ( 1 0 ^ 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 _ o u t 2 / ( 1 0 ^ 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 ag e no 1 27
3  
/ / p ro b n o 3 . 1 1
4  
// R e fe r i n g t he f i g . 3 . 1 7
5  
// From f i g i t i s c l e a r t ha t t he e waveform i s made
f ro m two s i n e wa ve s
6   V p = 1 2 . 5 ; / / S i n c e Vp−p i s 25V fro m f i g h en c e
i n d i v i d u a l Vp i s h a l f o f Vp−p
7   R l = 5 0 ; // Load r e s i s t a n c e i s 50 ohm
8   / / D e t e r m in a t i o n o f a v e r a g e p ow er
9   V r m s = V p / sqrt ( 2 ) ;
10   P = ( ( V r m s ) ^ 2 ) / R l ;
11   disp (  ’W’ ,P ,  ’ The v al ue o f a ve ra ge power o f s i g n a l is
’ );

28
 

Chapter 4

Angle Modulation

Scilab code Exa 4.1  example 1

1   clc ;
2   / / pa ge no 1 39
3   / / pr ob no . 4 . 1
4   / / An FM m o d ul a t o r i s g i v e n w i t h k f =30 kHz /V o p e r a t e
a t c a r r i e r f r e q 1 75MHz
5   fc=175*10^6;kf=30*10^3;
6   / / a ) D et er m in a ti o n o f o /p f r e q f o r m od ul at in 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 ’ , f s i g 1 / ( 1 0 ^ 6 ) ,  ’ a ) The v al ue o f o /p f r e q i s
’ );
10   / /b ) D et er m in a ti o n o f o /p f r e q f o r m od ul at in g s i g n a l
v a l u e em2=−2V
11   e m 2 = - 2 ;
12   f s i g 2 = f c + ( k f * e m 2 ) ;
13   disp (  ’MHz ’ , f s i g 2 / ( 1 0 ^ 6 ) ,  ’ b ) The v al ue o f o /p f r e q is
’ );

29
 

Scilab code Exa 4.2  example 2

1   clc ;
2   / / pa ge no 1 40
3 / / pr ob no . 4 . 2
4   / /An FM mo d ul a to r i s g i v e n w hi ch i s m od u la te d by
s i n e wave 3V
5   v=3;
6   kf=30*10^3;
7   / / D e te r m in a t io n o f p ea k v a l u e
8   E m = v * sqrt ( 2 ) ;
9   // D et er m in a ti 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 ’ , d e l t a / 1 0 0 0 , ’ The v al ue o f d e v i a t i o n is ’ );

Scilab code Exa 4.3  example 3

1   clc ;
2   / / pa ge no 1 40
3   / / pr ob 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 7 5kHz
5   delta=75*10^3;
6   / / a ) D e te r m in a t io n o f m o du l at io n i n d ex w it h
m od ul at in 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 ( m f 1 ,  ’ a ) The v a l u e o f m o du l at i on i n d ex f o r fm=15
kHz i s ’ ) ;
10   / /b ) D e te r m in a t io n o f m o du l at i on i n d ex w it h
m od ul at in g f r e q o f s i g n a l =50Hz
11   f m 2 = 5 0 ;
12   m f 2 = d e l t a / f m 2 ;
13   disp ( m f 2 ,  ’ b ) The v a l u e o f m o du l at i on i n d ex f o r fm=50
Hz i s ’ ) ;

30
 

Scilab code Exa 4.4  example 4

1   clc ;
2   / / pa ge no 1 41
3   / / pr ob no . 4 . 4
4   / /A p h as e m o du l at o r i s g i v e n w i th kp=2 r ad /V
5   kp=2;
6   // Peak p ha se d e v i a t i o n o f 60 d e g re e
7   / / C o nv e rt 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 et er m in a ti o n o f pea k v o l t a g e t h at c a us e t h at
deviation
10   Vp=phi/kp;
11   / / D e te r m in a t io n o f rms v o l t a g e
12   V r m s = V p / ( sqrt ( 2 ) ) ;
13   disp (  ’V ’ , V r m s , ’ The rms v o l t a g e t ha t c au s e d e v i a ti o n
i s ’ );

Scilab code Exa 4.6  example 5

1   clc ;
2   / / pa ge no 1 45
3   / / pr ob no . 4 . 6
4   / / P ha se m od ul a to r w it h s e n s i t i v i t y kp=3 ra d /V & s i n e
wave i / p 2 V p ea k a t 1 kHz
5   kp=3;Vp=2;f=1*10^3;
6   / / As max v a lu e o f s i n e f u nc t n i s 1 , h en ce max v a lu e
o f p h i i s kp ∗Vp
7   phi_max=kp*Vp;
8   // p hi m ax i s n o th i ng b ut mp
9   mp=phi_max;

31
 

10   // v al 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 re d
a s f r e q m od ul at io n
11   // D et er m in a ti o n o f f r e q d e v i a t i o n
12   d e v = m p * f ;
13   disp (  ’ kHz ’ , d e v / 1 0 0 0 , ’ The f r e q d e v i a ti o n p ro du ce i s ’ )
;

Scilab code Exa 4.7  example 6

1   clc ;
2   / / pa ge no 1 49
3   / / pr ob no . 4 . 7
4   / /An FM s i g n a l h as d e v i a t i o n 3 kHz & m o du l at i ng f r e q
1 kHz w i th t o t a l p ow er Pt=5W d e v e l o p e d a c r o s s 5 0
ohm with f c =160 MHz
5   dev=3*10^3;fm=10^3;Pt=5;Rl=50;fc=160*10^6;
6   / / a ) D e te r m in a t io n o f RMS s i g n a l v o l t a g e
7   Vt = sqrt ( P t * R l ) ;
8   disp (  ’V ’ , V t , ’ a ) The rms s i g n a l v o l ta g e i s ’ );
9   / / / // / // / // / / b ) D e t er m i na t i on o f rms v o l t a g e a t
c a r r ie r f re q
10   / / f o r t h at m od ul at io n i nd ex n ee ds t o be f ou nd o ut
11   m f = d e v / f m ;
12   / /From b e s s e l f u n c t i o n t ab le , t he c o e f f f o r th e
car rier f i r s t 3 s i d e b an ds
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 ba nd s 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 te rm i na t io n o f f r e qo f e ac h s i d e
b a n ds / / / / / / / / / / / / / / / /
20   disp (  ’ c ) The 3 s i d e ba nd s a t d i f f e r e n t f r e q . a re ’ )

32
 

21   for   j = 1 : 3 ,
22   f_usb(j)=fc/10^6+(fm*j/10^6);
23   end
24   disp (  ’MHz ’ , f _ u s b ( 3 ) ,  ’ f u s b 3 = ’ ,  ’MHz ’ , f _ u s b ( 2 ) , ’ f u s b 2
= ’ , ’MHz ’ , f _ u s b ( 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 _ l s b ( 3 ) ,  ’ f l s b 3 = ’ ,  ’MHz ’ , f _ l s b ( 2 ) , ’ f l s b 2
= ’ , ’MHz ’ , f _ l s b ( 1 ) , ’ f l s b 1 = ’ ) ;
30   / / / // / // / // / d ) D e te r m in a t io n o f po we r o f e ac 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 ac 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 in a t i o n o f p ow er t h a t i s u n co u nt ed
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 ce n t ag e o f t o t a l p ower u nc ou nt ed
42   Px=(P_x/P)*100;
43   disp (  ’% ’ , P x , ’ e ) P e r ce n t ag e t o t a l p ower w hi ch i s
u n co u nt ed i s ’ ) ;
44   // / / // // // f ) P l o t i n g t he s i g n a l i n f r e q domain
/////////////////////
45   / / C o n v e r t i n g p o we r i n dBm
46   for   i = 1 : 4 ,
47   / / a ( k ) = (P ( k ) ) / ( 1 0 ˆ −3 ) ;
48   P _ d B m ( i ) = 1 0 * log10 ( a ( i ) ) ;
49   end ;
50   disp (  ’ f ) P ower o f e ac h s i d e b an ds i n dBm i s ’ )
51   disp (  ’dBm ’ , P _ d B m ( 4 ) ,  ’ P3( dBm)= ’ ,  ’dBm ’ , P _ d B m ( 3 ) ,  ’ P 2 (
dBm)=’ , ’dBm ’ , P _ d B m ( 2 ) ,  ’ P1(dBm)= ’ , ’dBm ’ , P _ d B m ( 1 ) , ’

33
 

Pc (dBm) ’ ,) ;
52   x = [ 1 5 9 . 9 9 7 : 0 . 0 0 1 : 1 6 0 . 0 0 3 ] ;
53   y = [ 2 6 . 8 , 3 0 . 8 , 2 7 . 6 , 2 5 . 3 , 2 7 . 6 , 3 0 . 8 , 2 6 . 8 ] ;
54   plot ( x , y ) ;

Scilab code Exa 4.9  example 7

1   clc ;
2   / / pa ge no 1 57
3   / / pr ob no . 4 . 9
4   / /An FM s i g n a l h as f r e q d e v i a t i o n o f 5 kHz m od ul at in g
f r e q fm=1kHz w i th SNR a t i / p i s 2 0 dB
5   // C on ve rt in 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 _ f n = p h i ; // m o du la ti on i nd ex e q ua l t o p h i n
11   d e v _ n = ( m _ f n ) * f m ; // E q ui v a le 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 iv en a s
13   SNR=(dev_s)/(dev_n);
14   // C on ve rt in g t h i s v o l t ag e r a t i o n i n dB
15   S N R _ d B = 2 0 * ( log10 ( S N R ) ) ;
16   disp (  ’ dB ’ , S N R _ d B , ’ 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   / / pa ge no 1 63
3   / / pr ob no . 4 . 1 0
4   // R ef er t he f i g . 4 . 1 9

34
 

5   / / We know t h i s t r a n s m i t t e r i s d e si g ne d f o r v o i c e
f r e q u e n c i e s , s o we h av e t o u s e t r i a l and e r r o r
method t o p r o du ce 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   m f = 2 . 4 ; // s t a r t i n g w i th t he f i r s t n u l l f o r mf =2.4
7   d e v = 5 ; / / i n kHz
8   fm=dev/mf;
9   if   ( 0. 3 < = fm & 3 > = fm )   then
10   disp (  ’ kHz ’ , f m , ’ The f r e q i s w id in t he a c c ep t a b l e
range ’ );
11   else
12   mf=5.5;
13   fm=dev/mf;
14   disp (  ’ kHz ’ , f m , ’ The f r e q i s w id in t he a c c ep 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 to r t o t he v al u e o f fm s o t ha 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   / / pa ge no 1 79
3   / / pr ob no . 5 . 2
4   / /A t r a n s m i t t e r w i th c a r r i e r power o /p 1 0W a t
e f f i c i e n c y 7 0% a t 1 00% mo du la tn
5   Po=10;eta=0.7;
6   / / D e t e r m in a t i o n o f d c p ow er o / p
7   Ps=Po/eta;
8   disp (  ’W’ , P s , ’ The v a l ue o f dc power i n pu t i s ’ ) ;
9   / / D e t e r m in a t i o n o f a u d i o p ow er
10   Pa=0.5*Ps;
11   disp (  ’W’ , P a , ’ The v a l ue o f a ud io power i s ’ ) ;

Scilab code Exa 5.3  example 2

1   clc ;
2   / / pa ge no 1 81
3   / / pr ob no . 5 . 3

36
 

4   //A t r a n s m i t t e r o p e ra t e s a t 1 2V, w i th col lect or


c u r r e n t 2A . Mo du la tn t r a n s f o r m e r h as t u rn r a t i o
4:1
5   / / D e te r m in a t io n o f i mp ed an ce 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 ’ , Z a , ’ The i mp ed an ce o f t r a n s f o r m e r
s e co n da r y i s ’ ) ;
9   / / D e te r m in a t io n o f i mp ed an ce o f t r a n s f o r m e r p ri ma ry
10   Z p = Z a * ( N 1 / N 2 ) ^ 2 ;
11   disp (  ’ ohm ’ , Z p , ’ The i mp ed an ce o f t r a n s f o r m e r p ri ma ry
i s ’ );

Scilab code Exa 5.4  example 3

1   clc ;
2   / / pa ge no 1 82
3   / / pr ob no . 5 . 4
4   // C l a s s C a m p l i f i e r w it h c a r r i e r o /p power o f 1 0 0W
w it h e f f i c i e n c y o f 70% & w it h 10 0% m od ul at io n
5   Pc=100;eta=0.7;
6   / / D e t e r m in a t i o n o f o / p p ow er
7   Po=1.5*Pc;
8   disp (  ’W’ , P o , ’ The o / p p ow er w i th 1 00% m o d u l a t io n i s ’ )
;
9   / / D e t e r m in a t i o n o f s u p p l y p ow er
10   Ps=Po/eta;
11   disp (  ’W’ , P s , ’ The v a l ue o f s u pp l y power i s ’ ) ;
12   / / D e te r m in a t io n o f p ower d i s s i p a t e d Pd
13   Pd=Ps-Po;
14   disp (  ’W’ , P d , ’ Power d i s s i p a t e d i s ’ );

37
 

Scilab code Exa 5.5  example 4

1   clc ;
2   / / pa ge no 1 84
3 / / pr ob no . 5 . 5
4   / /An FM t r a n s m i t t e r p ro d uc e 1 0W o f c a r r i e r po wer
o p e r a t i ng a t 15V
5   Vcc=15;Pc=10;
6   / / D e te r m in a t io n o f l o a d i mp ed an ce s e e n f ro m
collector
7   Rl=((Vcc)^2)/(2*Pc);
8   disp (  ’ ohm ’ , R l , ’ The l o a d i mp ed an ce i s ’ ) ;

Scilab code Exa 5.6  example 5

1   clc ;
2   / / pa ge no 1 93
3   / / pr ob no . 5 . 6
4   // R e fe 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 cen tre fr eq .
7   B W = 3 * 1 0 ^ 3 ; / / F i l t e r b an dw id th
8   foc=4.9985*10^6;// c a r r i e r o s c i l l a t o r fr eq .
9   disp (  ’ a ) The USB w i l l b e p a s se d ’ ) ; // S i nc e c a r r i e r
f r e q i s a t l ow 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 ho u l d be moved t o t he h ig h
e nd o f f i l t e r a t 5 . 0 0 1 5 MHz ’ ) ; // To g e n e r a t e t h e
LSB

Scilab code Exa 5.7  example 6

1   clc ;
2   / / pa ge no 1 96

38
 

3   / / pr ob 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 sm 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   f o = 2 1 . 5 ; // c a r r i e r f r e q i n MHz
6   f o c = 8 . 9 9 8 5 ; / / 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 in 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 ’ , f l o ,  ’ The f r e q of l o ca l o s c i l l a t o r ’ );

Scilab code Exa 5.8  example 7

1   clc ;
2   / / pa ge no 1 99
3   / / pr ob 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 th 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 fr eq
6   flo=12.5015;// l o c a l o s c i l l a t o r fr eq
7   / / D e te r m in a t io n o f new o / p f r e q
8   fo=fco+flo;
9   disp (  ’MHz ’ , f o , ’ The o /p c a r r i e r f r e q ’ );

Scilab code Exa 5.9  example 8

1   clc ;
2   / / pa ge no 2 04
3   / / pr ob 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 th k f =2kHz /V & max
d e vi a t n o f 3 00 Hz .
5   kf=2*10^3;tx_dev=300;
6   disp (  ’ a ) S ee f i g . 5 . 2 3 f o r t h i s b l o c k d i ag r a m ’ ) ;

39
 

7   f _ m u l = 3 * 2 * 3 ; // 3 s t a g e f r e q m u l t i p l i e r w it h t r i p l e r
d o u b l e r a nd 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 d e v a t o s c i l l a t o r
9   d e v _ o = 5 * 1 0 ^ 3 ; / / D e v i a t io n a t o / p
10   d e v _ o s c = d e v _ o / f _ m u l ;
11   if   d ev _ os c < t x_ de v   then
12   disp (  ’ b ) T r an s mi t te r i s c a pa b l e o f 5 kHz d e v i a t i o n
’ );
13   else
14   disp (  ’ b ) T r an s mi t te r i s n ot c a pa b l e o f 5 kHz
deviat ion ’)
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   f o = 1 5 0 ; // c a r r i e r f r e q i n MHz
18   f o s c = f o / f _ m u l ;
19   disp (  ’MHz ’ , f o s c ,  ’ c ) T he o s c i l l a t o r f r e q i s ’ ) ;
20   / /d ) D e te r m in a t io n o f a u di o v o l t a g e f o r f u l l
deviation
21   V i _ p e a k = d e v _ o s c / k f ; / / d e v a t
o s c i l l a t o r o f 2 7 8 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 ti n g p eak v o l t a g e t o rms v o l t a g e
23   V i _ R M S = V i _ p e a k /sqrt ( 2 ) ;
24   disp (  ’mV’ , V i _ R M S * 1 0 ^ 3 , ’ The a u d i o RMS v o l t a g e is ’)

Scilab code Exa 5.10  example 9

1   clc ;
2   / / pa ge no 2 06
3   / / pr ob no . 5 . 1 0
4   // R e fe r f i g . 5 . 2 4
5   / / T i l l t h e a nt en na 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   d e v _ o = 7 5 * 1 0 ^ 3 ; // o /p f r e q d e v i a ti o n i s 75 kHz
8   / / D e t e r m ia n t i o n o f r e qd 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_os c , ’ F re q d e v i a t i o n o f oscillator is ’)


;

Scilab code Exa 5.11  example 10

1   clc ;
2   / / pa ge no 2 07
3   / / pr ob 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 it h
5   f _ r e f = 1 0 0 * 1 0 ^ 3 ; N = 2 0 0 ; k f = 5 0 * 1 0 ^ 3 ; // in Hz/V
6   // a ) D et er mi na ti on 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 ’ , f c / 1 0 ^ 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 te r m in a t io n o f RMS m o d u la t in g v o l t a g e for 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 er t i n g p ea k v o l t a g e t o RMS v o l t a g e
13   V _ R M S = V p /sqrt ( 2 ) ;
14   disp (  ’mV’ , V _ R M S * 1 0 0 0 , ’ The RMS v o l t a g e f o r n e ed ed
d ev ia ti on i s ’ );

41
 

Chapter 6

Receivers

Scilab code Exa 6.1  example 1

1   clc ;
2   / / pa ge no 2 27
3   / / pr ob no . 6 . 1
4   / /A t u ne d c k t w it h b r o a d a st band ( 5 40 t o 1 70 0 kHz ) .
Bw=10kHz at 540 kHz
5   B W 1 = 1 0 * 1 0 ^ 3 ; f 1 = 5 4 0 * 1 0 ^ 3 ; f 2 = 1 7 0 0 * 1 0 ^ 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 00 kHz
7   B W 2 = B W 1 * sqrt ( f 2 / f 1 ) ;
8   disp (  ’ kHz ’ , B W 2 / 1 0 0 0 , ’ T he B a nd wi d th a t 1 7 0 0 kHz ’ ) ;

Scilab code Exa 6.4  example 2

1   clc ;
2   / / pa ge no 2 36
3   / / pr ob 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 ck i n g
d yn am ic r a n g e 7 0dB .
5   // D et er m in a ti o n o f v p l t a ge s i g n a l V1

42
 

6   P 1 _ P 2 = 7 0 ; V 2 = 0 . 5 * 1 0 ^ - 6 ;/ / l e t
7   V1=V2*10^(P1_P2/20);
8   disp (  ’mV’ , V 1 * 1 0 0 0 , ’ The v o l t a g e v al ue o f s i g n a l is ’)
;

Scilab code Exa 6.5  example 3

1   clc ;
2   / / pa ge no 2 38
3   / / pr ob no . 6 . 5
4   / / R ef er t he f i g 6 . 5
5   / /A r e c e i v e r t u n ed t o s t a t i o n a t 5 90 kHz
6   f _ i f = 4 5 5 * 1 0 ^ 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 te r m in t i on o f i ma ge f r e q
9   f_image=f_sig+2*f_if;
10   disp (  ’ kHz ’ , f _ i m a g e / 1 0 0 0 , ’ a ) The im ag e f r e q i s ’ );
11   Q=40; / / Q f a c t o r
12   // b ) D et er m in a ti o n o f i ma ge r e j e c t i o n
13   x=(f_image/f_sig)-(f_sig/f_image);
14   A s i g _ A i m a g e =sqrt ( 1 + ( Q * x ) ^ 2 ) ; // i ma g e r e j e c t i o n
15   / / c o n v e r t i n g i n dB
16   I R _ d B = 2 0 * log10 ( A s i g _ A i m a g e ) ;
17   disp (  ’ dB ’ , I R _ d B , ’ b ) The i ma g e r e j e c t i o n i s ’ );

Scilab code Exa 6.6  example 4

1   clc ;
2   / / pa ge no 2 39
3   / / pr ob no . 6 . 6
4   //An AM hi gh −f r e q r e c e i v e r w it h I F =1 .8MHz t un ed a t
f r e q 1 0MHz
5   f _ s i g = 1 0 ; f _ i f = 1 . 8 ; / / A l l f r e q i n MHz

43
 

6   / / D e t e r m in 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 te r mi n at i o n o f f r e q . t h a t c au se IF r e sp o n se
9   m = [1 1 2 2]; // v a l ue s o f m t ha t a r e i n t e g e r
10   n = [1 2 1 2]; // v a lu e s o f n t ha t a re 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 ’ , f s 2 , f s 1 , ’ The d i f f e r e n t
f r e q s a re ’ );

Scilab code Exa 6.7  example 5

1   clc ;
2   / / pa ge no 2 45
3   / / pr ob 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 d e v =10 kHz
5   Vpp=1.2;dev=10*10^3;
6   / / D et er mi na ti on o f d e t e c t o r s e n s i t i v i t y
7   V p = V p p / 2 ; / / Pea k v o l t a g e
8   kd=Vp/dev;
9   disp (  ’ uV/Hz ’ , k d * 1 0 ^ 6 , ’ t h e s e n s i t i v i t y o f d et ec to r i s
’ );

Scilab code Exa 6.8  example 6

1   clc ;
2   / / pa ge no 2 49
3   / / pr ob no . 6 . 8
4   / /A PLL FM d e t e c t o r w i t h k f = 10 0 kHz /V & d e v =75 kH z

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 nv e rt i n g p ea k v o l t a g e i n RMS v o l t a g e
9   V _ R M S = V p _ o p /sqrt ( 2 ) ;
10   disp (  ’V ’ , V _ R M S , ’ The RMS v o l t a g e i s ’ );

Scilab code Exa 6.9  example 7

1   clc ;
2   / / pa ge no 2 58
3   / / pr ob no . 6 . 9
4   / /An I F t r a n s f o r m e r a t 4 55 kHz & pr im a ry c k t h as 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 in 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   k c = 1 / sqrt ( Q p * Q s ) ;
8   disp ( k c ,  ’ a ) The c r i t i c a l
coupl ing fac tor is ’ );
9   / /b ) D e te r m in a t io 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 ( K o p t ,  ’ b ) The optimum c o u p l i n g f a c t o r i s ’ );
12   / / c ) D e te r m in a t io 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 / 1 0 0 0 , ’ c ) T he BW u s i n g o pt im um c o u p l i n g
f a ct o r i s ’ );

Scilab code Exa 6.10  example 8

1   clc ;
2   / / pa ge no 2 61
3   / / pr ob no . 6 . 1 0
4   // R e c ei v e r r e f e r i n g i n f i g . 6 . 2 8
5   f _ s i g = 2 5 * 1 0 ^ 6 ; // s i g n a l i / p f r e q

45
 

6   f_lo1=29.5*10^6;// Is t lo ca l o s c i l l a t o r fr eq
7   / / d e te r mi n at i o n o f I s t IF wh ich u s es h ig h s i d e
injection
8   f _ I F 1 = f _ l o 1 - f _ s i g ; // h ig h s i d e i n j e c t i o n
9   disp (  ’MHz ’ , f _ I F 1 / 1 0 ^ 6 , ’ The f i r s t I F i s ’ ) ;
10   / / D et er m in a ti o n o f I I nd IF whi ch u s e s l ow s i d e
injection
11   f _ l o 2 = 4 * 1 0 ^ 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 _ I F 2 = f _ I F 1 - f _ l o 2 ;
13   disp (  ’ kHz ’ , f _ I F 2 / 1 0 ^ 3 , ’ The s ec on d IF i s ’ ) ;

Scilab code Exa 6.11  example 9

1   clc ;
2   / / pa ge no 2 65
3   / / pr ob no . 6 . 1 1
4   //An S−m e t er i s g i ve n
5   V 1 = 5 0 * 1 0 ^ - 6 ; // s i g n a l s t re n g t h a t t r a n s m i t t e r i n V
6   P = 1 8 ; / / 1 8 dB p ow er
7   V2=V1/(10^(P/20));
8   disp (  ’ uV ’ , V 2 * 1 0 ^ 6 , ’ S i g n a l s t re 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   / / pa ge no 2 85
3   / / p ro b n o 7.1
4   / / I n th e g iv en p r o b l e m a s i g n a l i s t r a n sm i t t e d
u si ng a f ou r l e v e l code
5   M=4;
6   B = 3 . 2 ; / / i n KKz
7   S N R = 3 5 ; / / i n dB
8   / / By u s i n g S ha nn on−H a r tl e y theorem , i g n o r i n g n o i s e
we h a v e
9   c = 2 * B * log2   ( M ) ;
10   disp (  ’ k b / s ’ ,c ,  ’ maximum d a ta r a t e f o r f o u r −l e v e l code
i n t he a v a i l a b l e b and wi dth ’ ) ;
11   / /Now we ha ve t o u se Shannon l i m i t t o f i n d t he
maximum d a ta r a t e f o r a ny c o de
12   / /SNR i n p ow er r a t i o i s
13   SNR1=10^(35/10);
14   C = B * log2 ( 1 + S N R 1 ) ;
15   disp (  ’ k b / s ’ ,C ,  ’ maximum d a ta r a t e f o r f o u r −l e v e l c o d e
i n t he a v a i l a b l e b and wi dth ’ ) ;
16   / / Both r e s u l t s a r e maxima , we h ave t o c ho o se 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 se c = 12 .8 kp / s

Scilab code Exa 7.2  example 2

1   clc ;
2   / / p ag e no . 2 89
3   // p ro b no . 7 . 2
4   / / I n t he g i ve n p ro bl em
5   f m = 3 0 ; / / i n KHz
6   f s = 4 4 . 1 ; / / s a m p l in g r a t e i n KHz
7   f a = f s - f m ; // a u d i b l e f r e qu e n cy
8   disp (  ’KHz ’ , f a , ’ The a u d i b l e f r e qu e n cy i s ’ ) ;

Scilab code Exa 7.3  example 3

1   clc ;
2   / / pa ge no 2 91
3   / / p ro b n o 7 . 3
4   / / p a r t a : no o f s am pl es ,
5   m=8;
6   N = 2 ^ m ; // t he 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 it h m=8
are ’ );
8   // p a rt b :
9   m=16;
10   N = 2 ^ m ; // t he 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 it h m=16
are ’ );

48
 

Scilab code Exa 7.4  example 4

1   clc ;
2   / / p ag e no 2 92
3   / / p ro b no 7 . 4
4   / / I n t he g i ve n p ro bl em
5   m=16;
6   D R = 1 .7 6 + 6 .0 2* m ;   / / Dynamic r a ng e f o r a l i n e a r PCM
i n dB
7   disp (  ’ dB ’ , D R , ’ D ynamic r a ng e f o r a l i n e a r PCM ’ ) ;

Scilab code Exa 7.5  example 5

1   clc ;
2   / / pa ge no 2 95
3   / / p ro b no 7 . 5
4   // i n t he g i ve n p ro bl em
5   f s = 4 0; m = 1 4 ;
6   / / t he minimum d at a r a t e n ee de d t o t r a ns m i t a ud io i s
g i v e n by
7   D=fs*m;
8   disp (  ’Kb/ s ’ ,D ,  ’ T he minimum d a t a r a t e n e e de d t o
t ra n s m i t a u di o i s ’ ) ;

Scilab code Exa 7.6  example 6

1   clc ;
2   / / p ag e no 2 94
3   / / p ro b no 7 . 6
4   / / I n t he g i ve n prob lem , i n pu t t o a mu−la w
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 he max v a lu e
6   u=255;

49
 

7   V i = 1 ; / /maximum i n p u t v a l u e i s considered as unity


volts
8   vi=0.5;
9   V 0 = 1 ; / / c o n s i d e r maximum o u t pu t v o l t a g e as unity
volts
10   v o = V 0 *   log ( 1 + u * v i / V i ) / log ( 1 + u ) ;
11   disp (  ’ v o l t s ’ , v o , ’ T he maximum o u t p u t v o l t a g e p r o d u ce d
i s ’ );

50
 

Chapter 8

The Telephone System

Scilab code Exa 8.3  example 1

1   clc ;
2   / / p ag e no 3 23
3   / / p ro 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 et er m in a ti o n o f n et l o s s VNL r e qd f o r acceptable
am oun t o f e c h o .
7   VNL=(0.2*t)+0.4;
8   disp (  ’ dB ’ , V N L , ’ The n et l o s s i s ’ );

Scilab code Exa 8.5  example 2

1   clc ;
2   / / p ag e no 3 26
3   / / p ro b no 8.5
4   // R e fe r i n g t he f i g . 8 . 1 5 c ha n n el 12 h a s l o w e s t
carri err 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 es up 4 kHz p er c h an n el
8   f_up=4;
9   / / D et er mi na ti on o f c a r r i e r f r e q f o r c ha n n el 5
10   c=5;
11   f c = F + ( f _ u p * ( c _ t ot a l - c ) ) ;
12   disp (  ’ kHz ’ , f c , ’ The v al u e o f c a r r i e r f r e q f o r c ha nn el
5 i s ’ );

Scilab code Exa 8.6  example 3

1   clc ;
2   / / pa ge no 3 28
3   / / p ro b n o 8 . 6
4   / / 2 kHz t o ne i s p r e s en t on c ha nn el 5 o f g r o u p 3 o f a
supergroup
5   / / r e f e r t o ex am pl e 8 . 5 , c a l c u l a t e d f c =92kHz
6   f c = 9 2 ; / / i n kHz
7   / / H er e s i g n a l i s l o w er s i de ba n d , t h e 2 kHz b as eb an 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   // f rom f i g 1 0 . 1 5 , g ro up 3 i n t he s u pe rg r ou p i s moved
t o t he r an ge 408 −456 kHz , w it h a s u p p r e s s e d
c a r r i e r f r e qu e n cy o f 5 16 kHz .
10   f s c = 5 1 6 ; // i n kHz
11   / / t h e m o du l at io n i s l o w er s i de b an d , s o t h e s u p er g r ou p
o /p f r e q w i l l be 9 0kHz l o we r t h a n c a r r i e r f r e q
12   f s g = f s c - f g ;
13   disp (  ’ kHz ’ , f s g ,  ’ The t on e a pp ea r i n t he s u pe rg r ou p
o ut pu t a t f r e qu e n cy o f ’ ) ;

52
 

Chapter 9

Data Transmission

Scilab code Exa 9.2  example 1

1   clc ;
2   / / p ag e no 3 49
3   / / p ro b no 9 . 2
4   N d = 7 ; N _ s ta r t = 1 ; N _ st o p = 1 ; N _ p ar i t y = 1 ;
5   N t = Nd + N _s ta rt + N _s to p + N _p ar it y ;
6   e f f ic i e nc y = N d / N t * 1 00 ;
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 ag e no 3 58
3   / / p ro b no 9 . 6
4   m=21;
5   / / The c o r r e c t number o f c h ec k b i t s i s t h e s m a l l e s t
number t ha t s a t i s f y t he e q u a ti o n 2ˆ n   >= m+n +1 ;
6   for   n = 1 : 1 : 1 0   // we c ho os e r a ng 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 requ ired ’)
11   break ;
12   end
13   end

54
 

Chapter 12

Digital Modulation and


Modems

Scilab code Exa 12.1  example 1

1   clc ;
2   / / p ag e no 4 07
3   // p ro b no 12 1
4   //A ra di o ch an ne l with BW=10KHz and SNR=15 dB
5   B=10*10^3;
6   snr=15;
7   // c o n v e r ti n g dB i n power r a t i o
8   SNR=10^(snr/10);
9   / / a ) D et er m in a ti o n o f t h e o r e t i c a l max d at a r a t e
10   C 1 = B * log2 ( 1 + S N R ) ;
11   disp (  ’ k b / s ’ , C 1 / 1 0 0 0 , ’ a ) The t h e o r e t i c a l max d at a r a t e
i s ’ );
12   / /b ) D e te r m in a t io n o f d at a r a t e w it h 4 s t a t e s i . e M=4
13   M=4;
14   C 2 = 2 * B * log2 ( M ) ;
15   disp (  ’ k b / s ’ , C 2 / 1 0 0 0 , ’ b ) The d a t a r a t e f o r 4 s t a t e s is
’ );

55
 

Scilab code Exa 12.2  example 2

1   clc ;
2   / / p ag e no 4 08
3   // p ro b no 12 2
4   / /A m o d ul a to r t r a n s m i t s ym bo l w i th s ym bo l r a t e =10 k/
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 im p ly sy mbo l r a t e
8   disp (  ’ kbaud ’ , S / 1 0 0 0 , ’ The baud r a t e i s ’ );
9   // D et er m in a ti o n o f b i t r a t e
10   C = S * log2 ( 6 4 ) ;
11   disp (  ’ k b / s ’ , C / 1 0 0 0 , ’ The b i t r at e i s ’ );

Scilab code Exa 12.3  example 3

1   clc ;
2   / / p ag e no 4 11
3   // p ro b no 12 3
4   f=200*10^3;
5   f b = 2 7 0 . 8 33 * 1 0^ 3 ;
6   d a t a_ r a te = 2 7 0. 8 3 3 * 1 0^ 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 qu e n c y
s h i f t i s ’ );
11   / / The s h i f t e a c h way f rom t he c a r r i e r f re q u e n cy i s
h al f the f r e q s h i f t
12   f _ m a x = f c + 0 . 2 5 * f b ;
13   disp (  ’ Hz ’ , f _ m a x , ’ b ) The maximum f r e q u e n c y i s ’ );
14   f _ m i n = f c - 0 . 2 5 * f b ;

56
 

15   disp (  ’ Hz ’ , f _ m i n , ’ T he minimum f r e q u e n c y i s ’ ) ;


16   b a n d w i d t h _ e f f i c i e n c y = d a t a _ r a t e / b a n d w i d t h ;
17   disp (  ’ b / s / Hz ’ ,bandwidth_efficiency , ’ T he b a n d w i d t h
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 ag e no 4 12
3   // p ro b no 12 4
4   b a u d _ r a t e = 2 4 . 3 ; // i n k i lo b au d
5   / / I n t h i s p r o b le m d i b i t s ys t em i s u se 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 (  ’ k b / s ’ ,bit_ rate , ’ The c ha n ne l d at a r a t e i s ’ );

Scilab code Exa 12.5  example 5

1   clc ;
2   / / p ag e no 4 13
3   // p ro 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   b i t _ p e r _ s y m b o l =log2 ( n o _ o f _ s t a t e s _ p e r _ s y m b o l ) ;
8   disp (bit_p er_symbol , ’ The no . o f b i t s p er sym bo l i s ’ )
;

Scilab code Exa 12.6  example 6

57
 

1   clc ;
2   / / p ag e no 4 15
3   // p ro b no 12 6
4   B=3*10^3;SNR_dB=30;
5   SNR_power=10^(30/10);
6   C = B * log2 ( 1 + S N R _ p o w e r ) ;
7   disp (  ’ b / s ’ ,C ,  ’ S h ann on l i m i t ’ ) ;

58
 

Chapter 13

Multiplexing and Multiple


Access Techniques

Scilab code Exa 13.1  example 1

1   clc ;
2   / / p ag e no 4 37
3   // p ro b no 13 1
4   freq_band=1*10^6;
5   / / A) F or SSBSC AM, t h e b an dw id th 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 ) F o r DSB AM, t h e b a nd wi d th i s t w i c e t h e maximunm
m o du l at i ng 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 in g C ar so n ’ s R ul e t o a p p ro x i ma t e t h e
bandwidth
15   f _ ma x = 1 5 * 1 0 ^3 ; d e v ia t i on = 7 5 *1 0 ^ 3;
16   B = 2* ( d e vi a ti o n + f _m ax ) ;

59
 

17   n o _ o f _ s i g n a l = f r e q _ b a n d / B ;
18   disp (no_of_signal , ’ c ) The number o f s i g n a l s a r e ’ ) ;
19   / / D ) U s e S ha nn o n−H a rt l ey t heo rem t o f i n d t he
bandwidth
20   C = 5 6 * 1 0 ^ 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 ag e no 4 44
3   // p ro b no 13 2
4   / / V o ic e t r a n s m i s s s i o n o c c u p i e s 3 0 kHz . S pr ea d
s pe ct ru m i s u se d t o i n c r e a s e BW to 1 0MHz
5   B 1 = 3 0 * 1 0 ^ 3 ; / /BW i s 3 0 kHz
6   B 2 = 1 0 * 1 0 ^ 6 ; //BW i s 10 MHz
7   T = 3 0 0 ; / / n o i s e temp a t i / p
8   P N = - 1 1 0 ; // 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 ei v e r
9   k = 1 . 3 8 * 1 0 ^ - 2 3 ; / / B ol tz ma nn ’ s c o n s t i n J /K
10   / / D e t e r m in a t i o n o f n o i s e p ow er a t B1=30kHz
11   P N 1 = 1 0 * ( log10 ( k * B 1 * T / 1 0 ^ - 3 ) ) ;
12   disp (  ’dBm ’ , P N 1 , ’ The n o i s e p ow er 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 p ow er a t B2=10MHz
14   P N 2 = 1 0 * ( log10 ( k * B 2 * T / 1 0 ^ - 3 ) ) ;
15   disp (  ’dBm ’ , P N 2 , ’ T he n o i s e p o we r 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 3 0 kHz BW
17   SNR1=PN-PN1;
18   disp (  ’ dB ’ , S N R 1 ,  ’ The v a l u eo 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 1 0MHz BW
20   SNR2=PN-PN2;
21   disp (  ’ dB ’ , S N R 2 ,  ’ T he 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 ag e no 4 45
3   // p ro b no 13 3
4   n o _ o f_ f r e q_ h o p s = 1 00 ; t o t a l_ t i m e_ r e q = 1 0 ;
5   t im e _f o r_ e ac h _f r eq = t o ta l _t i me _ re q /
no_of_freq_hops;
6   disp (  ’ se c /hop ’ ,time_for_each_freq , ’ Time r e q u i r e d f o r
e ac h f r e q ’ ) ;

Scilab code Exa 13.4  example 4

1   clc ;
2   / / p ag e no 4 46
3   // p ro b no 13 4
4   b i t _ r a t e = 1 6 * 1 0 ^ 3 ; / / i n b ps
5   c h i p _ r at e = 1 0 :1 ;
6   no_of_chip=10;
7   total_bit_rate=no_of_chip*bit_rate;
8   m = 4 ; n = log2 ( m ) ;
9   s y m b o l _r a t e = t o t a l_ b i t _r a t e / n ;
10   disp (  ’ baud ’ ,symbol_rate , ’ The no o f s i g n a l c ha ng es i .
e . s ymb ol r a t e i s ’ ) ;

Scilab code Exa 13.5  example 5

1   clc ;
2   / / p ag e no 4 47

61
 

3   // p ro b no 13 5
4   / / s i g n a l w i t h b a n d w i d t h Bbb =2 00 kH z & SNR=20 dB
s pr ed a t c hi p r a te 5 0 : 1
5   B b b = 2 0 0 * 1 0 ^ 3 ; //Bandwidth
6   Gp=50; / / c h i p r a t e
7   S N R _ i n = 2 0 ; / /SNR i s 20 dB w i th o ut s p r e a d i n g
8   / / D e te r m in a t io 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 ’ , B r f ,  ’ The v a lu e o f BW a f t e r s p r ea d i n g ’ ) ;
11   / / C o n v er t i n g i n t o dB
12   G p _ d B = 1 0 * log10 ( G p ) ;
13   disp (  ’ dB ’ , G p _ d B , ’ 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 in a t i o n o f SNR a f t e r s p r e ad n g
15   SNR_out=SNR_in-Gp_dB;
16   disp (  ’ dB ’ ,SNR_ou t , ’ The v a lu e o f SNR a f t e r s p r e ad i n g
i n dB ’ ) ;

62
 

Chapter 14

Transmission Lines

Scilab code Exa 14.1  example 1

1   clc ;
2   / / pa ge no 4 61
3   / / pr ob no . 1 4 . 1
4   / /A c o a x i a l c a b l e w it 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 mp ed an ce =50 ohm
5   C=90*10^-12;Zo=50;
6   / / D e te r m in a t io n o f i n d u c t an c e o f 1m l e n g t h
7   L=(Zo^2)*C;
8   disp (  ’nH/m ’ , L * 1 0 ^ 9 , ’ The i n d uc t an c e o f 1m l e n g t h is ’)
;

Scilab code Exa 14.2  example 2

1   clc ;
2   / / pa ge no 4 62
3   / / pr ob no . 1 4 . 2
4   / / a ) D e te r m in a t io n o f i mp ed an ce o f o pe n w i r e w it h
di am et er 3mm & r=10mm

63
 

5   D = 3 / 2 ; r = 1 0 ; // A l l v a l u e s a r e i n mm
6   Z o 1 = 2 7 6 * log10 ( r / D ) ;
7   disp (  ’ ohm ’ , Z o 1 ,  ’ a ) The c h a r a c t e r i s t i c i m p ed a nce o f  
c on d uc to r i s ’ ) ;
8 // b ) D et er m in a ti o n o f i mp ed an ce o f c o a x i a l w it 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   e r = 2 . 3 ; D = 8 ; d = 2 ; / / A l l d i a m et e r v a l u e s i n mm
10   Z o 2 = ( 1 3 8 / sqrt ( e r ) ) * log10 ( D / d ) ;
11   disp (  ’ ohm ’ , Z o 2 ,  ’ b ) The c h a r a c t e r i s t i c i mp ed an ce o f  
c o ax i al c ab le i s ’ );

Scilab code Exa 14.3  example 3

1   clc ;
2   / / pa ge no 4 63
3   / / pr ob 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   e r = 2 . 1 ; c = 3 * 1 0 ^ 8 ; // V e l o c it y o f l i g h t
6   // D et er mi na ti on o f v e l o c i t y f a c t o r
7   V f = 1 / sqrt ( e r ) ;
8   disp ( V f ,  ’ The v al ue o f v e l o c i t y f a c t o r i s ’ );
9   // D et er m in a ti o n o f p r o pa g a ti o n v e l o c i t y
10   Vp=Vf*c;
11   disp (  ’m/ s ’ , V p , ’ The v a l u e o f p r o p ag a ti o n v e l o . i s ’ );

Scilab code Exa 14.4  example 4

1   clc ;
2   / / pa ge no 4 68
3   / / pr ob no . 1 4 . 4
4   // R e fe 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   R s = 5 0 ; // s o u r c e r e s i s t a n c e

64
 

7   Z o = 5 0 ; / / l i n e i mp ed an ce
8   R L = 2 5 ; // l oa d r e s i s t a n c e
9   l = 1 0 ; // l e n g t h o f l i n e
10   v f = 0 . 7 ; // v e l o c i t y f a c t o r
11   Vi=0.5;
12   c = 3 * 1 0 ^ 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 et wee n Rs and Zo o f t he l i n e . S i n ce
two r e s i s t o r s a re e q u al , t he v o l t a g e w i l l d i v i d e
equally .
14   / / T h er e f o re a t t =0 , th e v o l t a g e a t t he s o u r c e end o f  
t h e l i n e w i l l r i s e fro m z er o t o 0 . 5V . The v o l t a g e
a t t h e l oa d w i l l r e m a i n z er o u n t i l l t h e s ur ge
r e a c h e s i t . The t im e f o r t h i s i s
15   T = l / ( v f * c ) ;
16   // A ft er T s ec , t h e v o l t a g e a t t h e l oa d w i l l rise .
The r e f l e c t i o n co ef f i c i e n t is given as
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   V r = r e f l_ c oe f f * V i ;
20   / / The t o t a l v o l t a g e a t t h e l oa d i s
21   Vt=Vr+Vi;
22   disp (  ’V ’ , V t , ’ The t o t a l v o l t a g e a t t h e l oa 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 ro po ga te ba ck a lo ng
t he l i n e , r e a c hi n g t he s o u r ce a t t im e 2T . A f te r
t h i s the v ol ta ge w i l l be 0 .3 33 5V a l l a lo ng 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 he l oa d w i l l be
25   V L = v s * ( R L / ( R L + Z o ) ) ;
26   disp (  ’V ’ , V L , ’ The v o l t a g e a c r o s s t he l i n e , ’ ) ;

Scilab code Exa 14.5  example 5

1   clc ;
2   / / pa ge no 4 72
3   / / pr ob no . 1 4 . 5

65
 

4   / / S ta nd ar d c o a x i a l c a b l e RG−8/U w i th 45 d e g r e e p ha s e
s h i f t a t 2 00MHz
5   p = 4 5 ; f = 2 0 0 * 1 0 ^ 6 ; c = 3 * 1 0 ^ 8 ; // S p eed o f l i g h t i n m/ s
6   v f = 0 . 6 6 ; // v el o . f a c t o r f o r t h i s l i n e
7   v p = v f * c ; / / D e t er m i na t i on o f p r o p a g a ti o n v e l o .
8   w a v = v p / f ; // D e te rm i na t io n o f w av el en gt h o f s i g n a l
9   / / D et er m in a ti o n o f r eq d l e n g th f o r 45 d e g re e p ha se
shift
10   L = w a v * ( p / 3 6 0 ) ;
11   disp (  ’m ’ ,L ,  ’ The l e n g th r e q d f o r p h a se s h i f t i s ’ );

Scilab code Exa 14.6  example 6

1   clc ;
2   / / pa ge no 4 76
3   / / pr ob no . 1 4 . 6
4   //A 50ohm l i n e t e rm i na t ed 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   S W R = Z o / Z l ; // I n t h i s c a s e Zo> Z l
8   disp ( S W R ,  ’ The v a l u e o f SWR i s ’ ) ;

Scilab code Exa 14.7  example 7

1   clc ;
2   / / pa ge no 4 77
3   / / pr ob no . 1 4 . 7
4   //A g e n e r a to r s en 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 te r m in a t io n o f amount o f p ower r e f l e c t e d
7   Pr=(I^2)*Pi;
8   disp (  ’mW’ , P r , ’ The amount o f power r e f l e c t e d i s ’ );

66
 

9   / / D e te r m in a t io n o f r e ma i n de r p ower t h a t r e a c h e s l o a d
10   P l = P i - P r ;
11   disp (  ’mW’ , P l , ’ The power d i s s i p a t e d i n l oa d i s ’ ) ;

Scilab code Exa 14.8  example 8

1   clc ;
2   / / pa ge no 4 78
3   / / pr ob 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 5 0W w it h SWR 2 : 1
5   Pi=50;SWR=2;
6   / / D e te r m in a t io n o f p ower a b so r be d by l o a d
7   Pl=(4*SWR*Pi)/(1+SWR)^2;
8   disp (  ’W’ , P l , ’ The p ower a b so r be d by l o a d i s ’ ) ;

Scilab code Exa 14.9  example 9

1   clc ;
2   / / p ag e no 5 45
3   / / p ro b n o 1 4 . 9
4   Z o = 5 0 ; // l i n e i mp ed en ce i n ohm
5   Z L = 1 0 0 ; / / l o a d i mp ed a nc e i n ohm
6   v f = 0 . 8 ; // v e l o c i t y f a c t o r
7   l = 1 ; // l e ng t h o f l i n e
8   f = 3 0 * 1 0 ^ 6 ; // f r e q o f o p er a ti o n
9   c = 3 * 1 0 ^ 8 ; // v e l o o f l i g h t
10   / / we h a ve t o f i n d t h e l en g t h o f l i n e i n d eg re e
11   wl=vf*c/f// wave leng th
12   / / Then t h e l e n g t h o f l i n e i n d eg re e i s
13   ang=l/wl*360
14   // c a l c u l a t i o n o f impedance
15   Z=Zo*(ZL+(%i*Zo*tand(ang)))/(Zo+(%i*ZL*tand(ang)));

67
 

16   disp (  ’ ohm ’ ,Z ,  ’ The i mp ed an ce l o o k i n g t ow ar d t h e l o a d ’


);

Scilab code Exa 14.10  example 10

1   clc ;
2   / / pa ge no 4 81
3   / / pr ob no . 1 4 . 1 0
4   / /A s e r i e s t un ed c kt t un ed a t 1GHz
5   vf=0.95;c=3*10^8;f=10^9;
6   v p = v f * c ; // d e t er m i n at i o n o f p r op a g at i on v e l o .
7   w a v = v p / f ; / / D e t e r m i na t i o n o f w a v el e n g th
8   / / D e te r m in a t io n o f l e n g t h
9   L = w a v / 2 ; // S i nc e h a l f w av el en gt h s e c t i o n w i i l be
s e r i e s r es o n a n t
10   disp (  ’m ’ ,L ,  ’ The l e n g t h s h o u ld be ’ ) ;

Scilab code Exa 14.11  example 11

1   clc ;
2   / / pa ge no 4 81
3   / / pr ob no . 1 4 . 1 0
4   / /A Tx d e l i v e r 1 00W t o a nt en na t h ro u gh 45m c o a x i a l
c a b l e w it h l o s s =4dB /1 00m
5   loss=4/100;L=45;Pout=100;
6   l o s s _ d B = L * l o s s ; // D et er m in a ti 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 in a t i o n o f Tx p ow er
9   Pin=Pout*Pin_Pout;
10   disp (  ’W’ , P i n , ’ The t r a n s m i t t e r p ower must b e ’ ) ;

68
 

Scilab code Exa 14.13  example 12

1   clc ;
2   / / pa ge no 4 90
3 / / pr ob no . 1 4 . 1 3
4   Z o = 5 0 ; / / l i n e i mp ed an ce i n ohm
5   f = 1 0 0 * 1 0 ^ 6 ; // o p e r a t i n g f r e q
6   v f = 0 . 7 ; // v e l o c i t y f a c t o r
7   L = 6 ; // l e n g th i n m
8   c = 3 * 1 0 ^ 8 ; // v e l o o f l i g h t
9   Z L = 5 0 + % i * 5 0 ; / / l o a d i m p ed a n ce i n ohm
10   // we h a ve t o c a l c u l a t e l e n g t h i n d eg re e , s o f o r t h i s
f i r s t f i n d wl
11   w l = v f * c / f ; / / w av en gt h i n m
12   a n g = 3 6 0 * L / w l ;
13   / / now f ro m t h e g ra ph i n p u t i mp ed an ce i s 1 9. 36 + %i5
.44;
14   Z i = 1 9 . 3 6 + % i * 5 . 4 4 ;
15   disp (  ’ ohm ’ , Z i , ’ I n p ut i mp ed an ce i s ’ ) ;

Scilab code Exa 14.14  example 13

1   clc ;
2   / / pa ge no 4 92
3   / / pr ob no . 1 4 . 1 4
4   Z o = 5 0 ; / / l i n e i mp ed an ce i n ohm
5   ZL=75+%i*25;
6   / / t h e r eq ui rm en t o f t h i s i s s im pl y t o match t he 50
ohm l i n e t o t he i mp ed sn ce a t t h i s p o in t on t he
l i n e , w h i c h i s 8 8 . 3 8 ohm , r e s i s t i v e .
7   Z 2 = 8 8 . 3 8 ; // in ohm
8   // The r e q u i r e d t ur n r a t i o i s
9   N 1 _ N 2 = sqrt ( Z o / Z 2 ) ;
10   disp ( N 1 _ N 2 ,  ’ The r e qu i r e d t ur n r a t i o i s ’ );

69
 

Scilab code Exa 14.15  example 14

1   clc ;
2   / / pa ge no 4 94
3   / / pr ob no . 1 4 . 1 5
4   / / r e f e r p r o b no 1 4 . 1 4
5   Z o = 5 0 ; / / l i n e i mp ed an ce i n ohm
6   Z 2 = 8 8 . 3 8 ; // in ohm
7   Z o _ = sqrt ( Z o * Z 2 ) ;
8   disp ( Z o _ ’ ) ;

Scilab code Exa 14.16  example 15

1   clc ;
2   / / pa ge no 4 94
3   / / pr ob no . 1 4 . 1 6
4   Z o = 5 0 ; / / l i n e i mp ed an ce i n ohm
5   f = 1 0 0 * 1 0 ^ 6 ; // o p e ra t i n g f r e q i n Hz
6   Z L 1 = 5 0 + % i * 7 5 ; / / l o a d i m pe d an c e w i t h Xc=75
7   Xc=75;
8   / / C ap ac it an ce i n f a r a d s i s g iv en a s
9   C=1/(2*%pi*f*Xc);
10   disp (  ’ F ’ ,C ,  ’ C a p a c i t a nc e i s ’ ) ;

Scilab code Exa 14.17  example 16

1   clc ;
2   / / pa ge no 4 97
3   / / pr ob no . 1 4 . 1 7

70
 

4   Z o = 7 2 ; / / l i n e i mp ed an ce i n ohm
5   Z L = 1 2 0 - % i * 1 0 0 ; / / l o a d i m p e d an c e
6   / /The s tu b m ust b e i n s e r t e d a t a p o in t on t he line
where t he r e a l p ar t o f t he l oa d a dm it t an ce i s
c o r r ec t . This a lu e i s
7   s=1/Zo;
8   disp (  ’ S ’ ,s ,  ’ The v a l u e o f s tu de i s ’ );

Scilab code Exa 14.18  example 17

1   clc ;
2   / / pa ge no 5 01
3   / / pr ob no . 1 4 . 1 8
4   //A TDR d i s p l a y s ho ws d s c o n t i n u i t y at 1.4 us & vf 
=0.8
5   t = 1 . 4 * 1 0 ^ - 6 ; v f = 0 . 8 ; c = 3 * 1 0 ^ 8 ; // S peed o f l i g h t
6   // D et er mi na ti on o f d i s t a n c e o f f a u l t
7   d = ( v f * 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 ce i s ’ ) ;

Scilab code Exa 14.19  example 18

1   clc ;
2   / / pa ge no 5 03
3   / / pr ob no . 1 4 . 1 9
4   / / 2 a d j a ce n t minima on s l o t t e d a r e 23cm a p a r t w it h
v e l o f a c t o r =95%
5   L = 2 3 * 1 0 ^ - 2 ; v f = 0 . 9 5 ; c = 3 * 1 0 ^ 8 ; // V el o . o f l i g h t i n m/ s
6   / / D e t e r m in a t i o n o f w a v el e n g th
7   w a v = 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 ’ , w a v * 1 0 0 , ’ The w a v el e n g th i s ’ ) ;
9   / / D e te r m in a t io n o f f r e q .

71
 

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

Scilab code Exa 14.20  example 19

1   clc ;
2   / / pa ge no 5 04
3   / / pr ob no . 1 4 . 2 0
4   / / Frwd p ow er i n Tx l i n e i s 1 5 0W, R e v e r s e p ow er =20W
5   P i = 1 5 0 ; P r = 2 0 ; / / A l l p ower i n w at t
6   / / D e t e r m i n a t i o n o f SWR
7   S W R = ( 1 + sqrt ( P r / P i ) ) / ( 1 - sqrt ( P r / P i ) ) ;
8   disp ( S W R ,  ’ 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   / / pa ge no 5 17
3   / / pr ob 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 et er m in a ti o n o f c h a r a c t e r i s t i c i mp ed an ce
7   Z = 3 7 7 / sqrt ( e r ) ;
8   disp (  ’ ohm ’ ,Z ,  ’ The c h a r a s t e r i s t i c impedance o f  
p o l ye t h yl e n e i s ’ );

Scilab code Exa 15.2  example 2

1   clc ;
2   / / pa ge no 5 18
3   / / pr ob 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 * 1 0 ^ 6 ; // e l e c t r i c f i e l d st re ng t h
6   Z = 3 7 7 ; / / i mp ed an ce o f a i r

73
 

7   P d = ( e ^ 2 ) / Z ; / / D e t er m i na t i on o f p ower d e n s i t y
8   disp (  ’GW/m2 ’ , P d / 1 0 ^ 9 , ’ The max p ower d e n s i t y i s ’ );

Scilab code Exa 15.3  example 3

1   clc ;
2   / / pa ge no 5 20
3   / / pr ob no . 1 5 . 3
4   / /An i s o t r o p i c r a d i a t o r w it h power 1 00W & d i s t g i ve n
i s 1 0km
5   Pt=100;r=10*10^3;
6   / / D e t e r m in a t i o n o f p ow er d e n s i t y a t r =10km
7   Pd=Pt/(4*%pi*(r^2));
8   disp (  ’nW/m2 ’ , P d * 1 0 ^ 9 , ’ Power d e n s i t y a t a p o i nt 10km ’
);

Scilab code Exa 15.4  example 4

1   clc ;
2   / / pa ge no 5 21
3   / / pr ob 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 nt
10km
5   Pt=100;r=10*10^3;
6   // Determination of e l e c t r i c f i e l d str eng th
7   e = sqrt ( 3 0 * P t ) / r ;
8   disp (  ’mW/m ’ , e * 1 0 0 0 ,  ’ The e l e c t r i c f i e l d st re ng th i s ’ )
;

Scilab code Exa 15.5  example 5

74
 

1   clc ;
2   / / pa ge no 5 25
3   / / pr ob no . 1 5 . 5
4   / /A t r a n s m i t t e r w i t h p o we r o / p =15 0W a t f c =3 25MHz .
a nt en na g a i n =12 dB i r e c e i v e r a nt en na g a i n =5 dB i a t
10km away
5   / / c o n s i d e r i n g no l o s s i n t he s ys te m
6   d=10;Gt_dBi=12;Gr_dBi=5;fc=325;Pt=150;
7   / / D e te r m in a t io n o f p ower d e l i v e r e d
8   L f s = 3 2 . 4 4 + ( 2 0 * log10 ( d ) ) + ( 2 0 * log10 ( f c ) ) - ( G t _ d B i ) - (
Gr_dBi);
9   Pr=Pt/(10^(Lfs/10));
10   disp (  ’nW’ , P r * 1 0 ^ 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   / / pa ge no 5 25
3   / / pr ob no . 1 5 . 6
4   / /A t r a n s m i t t e r w i t h o / p p o we r =10W a t f c =25 0MHz ,
c o n ne c te d t o Tx 1 0m l i n e w it h l o s s =3dB /1 00m t 0
a n t e nn a w i t h g a i n =6 dB i . Rx a n t en n a 2 0km away w i t h
gain=4dBi
5   / / R e f er f i g . 1 5 . 6 , a ss um in g f r e e s p a ce p r o p a g a ti 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   L f s = 3 2 . 4 4 + ( 2 0 * log10 ( d ) ) + ( 2 0 * log10 ( f c ) ) - G t _ d B i - G r _ d B i
; // p ath l o s s
8   disp ( L f s ) ;
9   L _ t x = L * l o s s ; // D et er m in a ti o n o f l o s s
10   r e f _ c o e = ( Z l - Z o ) / ( Z l + Z o ) ; // R e f l e c t i o n c o e f f i c i e n t
11   L _ r x = 1 - ( r e f _ c o e ^ 2 ) ; // P r o po r ti o n o f i n c i d e n t power
t ha t r e a c h e s l o a d
12   L _ r x _ d B = - 1 0 * log10 ( L _ r x ) ; // C o n ve r ti n g t h a t p r o p o r t i o n

75
 

i n dB
13   / / D et er mi na ti on o f t o t a l l o s s Lt
14   Lt=(Lfs)+(L_tx)+(L_rx_dB);
15   / / D et er m in a ti 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   P t _ P r = 1 0 ^ ( L t / 1 0 ) ; / / Power r a t i o
17   Pr=Pt/Pt_Pr;
18   disp (  ’W’ , P r , ’ 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   / / pa ge no 5 30
3   / / pr ob no . 1 5 . 7
4   / /A r a d i o wave mo ves f ro m a i r ( e r = 1) t o g l a s s ( e r = 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 te r mi n at i o n o f a n gl e o f r e f r a c t i o n
7   t h e t a _ r = a s i n d ( ( s i n d ( t h e t a _ i ) ) / (sqrt ( e r 2 / e r 1 ) ) ) ;
8   disp (  ’ d e g r e e ’ ,theta_r , ’ The a ng le o f r e f r a c t i o n i s ’ ) ;

Scilab code Exa 15.8  example 8

1   clc ;
2   / / pa ge no 5 37
3   / / pr ob no . 1 5 . 8
4   / /A Tx s t a t n w i th f c = 11 .6MHz & a n g l e o f i n c i d e n c e =70
degree
5   t h e t a _ i = 7 0 ; f c = 1 1 . 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 ’ , M U F , ’ 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   / / pa ge no 5 39
3   / / pr ob no . 1 5 . 9
4   / /A t a x i compony u s i ng c e n t r a l d i s p a t c h e r w it h
a n t e nn a h e i g h t =15m & t a x i a n t en n a h e i g h t = 1. 5m
5   ht=15;hr=1.5;
6   / / a ) D e t e r m in a t i o n o f max commn d i s t b e tn d i s p a t c h e r
and t a x i
7   d1 = sqrt ( 1 7 * h t ) + sqrt ( 1 7 * h r ) ;
8   disp (  ’km ’ ,d ,  ’ a ) The max commn d i s t b e tn d i s p a t c h e r &
t a x i ’ );
9   / /b ) D e te r m in a t io n o f max ommn d i s t b et n 2 t a x i s
10   d2 = sqrt ( 1 7 * h r ) + sqrt ( 1 7 * h r ) ; / / h t=h r= h e i g h t o f a n t e nn a
o f t a x i ca b
11   disp (  ’km ’ , d 2 , ’ The max commn d i s t b e tn two t a x i i s ’ ) ;

Scilab code Exa 15.11  example 10

1   clc ;
2   / / p ag e no 5 45
3   / / p ro b n o 1 5 . 1 1
4   / / An a u t o m o bi l e t r a v e l s a t 6 0km/ h r
5   v = 6 0 * 1 0 ^ 3 / ( 6 0 * 6 0 ) ; / / c o n v e r s i o n o f c ar ’ s s p e e dt o m/ s
6   c = 3 * 1 0 ^ 8 ; // s pe ed o f l i g h t
7   // p ar t a ) c a l c u l a t i o n o f t i m e b e tw e en f a d e s i f c ar
u s e s a c e l l phone a t 8 00 ∗ 1 0 ˆ 6 H z
8   f=800*10^6;
9   T=c/(2*f*v);
10   disp (  ’ s e c ’ ,T ,  ’ The f a d in g p e ri 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 me b e tw e en f a d e s i f c a r
u s e s a PCS p h on e a t 1 9 00∗ 1 0 ˆ 6 H z
12   f=1900*10^6;
13   T=c/(2*f*v);
14   disp (  ’ s e c ’ ,T , ’ The f a d in g p e ri o d i s ’ ) ;
15   // N ote t ha t t he r a p i d i t y o f t h e f a di n g i n c r e a s e s
w i th b o t h t he f r e q ue n cy o f t he t r a n s m i s s i o n s and
t h e s pe e d o f t he v e h i c l e

Scilab code Exa 15.12  example 11

1   clc ;
2   / / pa ge no 5 50
3   / / p ro bl em no 1 5 . 1 2
4   A = 1 0 0 0 ; // m e t r o p o l i t i a n a r ea e x p r es 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 ve n a s
7   N=A/(3.464*r^2);
8   disp (N ,  ’ Number o f cell si te s are ’ );

78
 

Chapter 16

Antennas

Scilab code Exa 16.1  example 1

1   clc ;
2   / / pa ge no 5 64
3   / / pr ob no . 1 6 . 1
4   / / D et er m in a ti o n o f l e n g th o f h a l f −wave
  dipol e
5   f = 2 0 ; / / O p e r at i n g f r e q i n MHz
6   L=142.5/f;
7   disp (  ’m ’ ,L ,  ’ The l e ng t h o f h a lf −wave
  dipole i s ’ );

Scilab code Exa 16.2  example 2

1   clc ;
2   / / pa ge no 5 66
3   / / pr ob no . 1 6 . 2
4   / /A d i p o l e a nt en na w it 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 et er mi na ti on o f e f f i c i e n c y
7   eta=Rr/(Rr+Rl);
8   disp (  ’% ’ , e t a , ’ The e f f i c i e n c y o f d i p ol e antenna i s ’ );

79
 

Scilab code Exa 16.3  example 3

1   clc ;
2   / / pa ge no 5 69
3   / / pr ob no . 1 6 . 3
4   / /Two a n t e nn a s w i th g a i n 5 . 3 d Bi & 4 . 5 dBd
5   / / C o nv e rt i n g u n i t dBd i n dB i f o r c o mp a ri s on
6   G1_dBi=5.3;G2_dBd=4.5;
7   G2_dBi=2.14+G2_dBd;
8   if   G 2 _d Bi > G 1_ dB i   then
9   disp (  ’ S ec on d a n te n na w i th g a i n = 4. 5dBd h a s h i g h e r
gain ’ );
10   else
11   disp (  ’ F i r s t a nt en na w it h g a i n =5 .3 d Bi h as h i g h e r
g a i n ’ );
12   end ;

Scilab code Exa 16.4  example 4

1   clc ;
2   / / pa ge no 5 71
3   / / pr ob no . 1 6 . 4
4   / /A d i p o l e a nt en na w it h e f f i c e n c y =85% g i v e n
5   n = 0 . 8 5 ; D _ d B i = 2 . 1 4 ; // D i r e c t i v i t y i n dBi
6   / / D e te r m in a t io n o f g a i n i n dB
7   D=10^(D_dBi/10);
8   G = D * n ; / / D e t er m i na t i on o f g a i n
9   G _ d B i = 1 0 * log10 ( G ) ; / / C o n v e rt i n g t o d Bi
10   disp (  ’ d B i ’ , G _ d B i , ’ The g a in i s ’ ) ;

80
 

Scilab code Exa 16.6  example 5

1   clc ;
2   / / pa ge no 5 73
3 / / pr ob no . 1 6 . 6
4   //ERP of Tx st at n =17W
5   ERP=17;
6   / / D e t e rm n a t i on o f EIRP
7   E R P _ d B m = 1 0 * log10 ( E R P / 1 0 ^ - 3 ) ; / / C o n v e r t i n g ERP i n dBm
8   E I R P _ d B m = E R P _ d B m + 2 . 1 4 ; / / C o n v e r t i n g ERP i n EIRP
9   disp (  ’dBm ’ ,EIR P_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   / / pa ge no 5 82
3   / / pr ob no . 1 6 . 7
4   // a h e l i a l a nt en na w it h 8 t u r ns w it h f r e q =1.2GHz
given
5   N = 8 ; f = 1 . 2 * 1 0 ^ 9 ; c = 3 * 1 0 ^ 8 ; // S peed o f l i g h t i n m/ s
6   / / a ) D e t e r m in a t i o n o f optimum d i a m e t e r o f a n te n na
7   wav=c/f;
8   D=wav/%pi;
9   disp (  ’m ’ ,D ,  ’ a ) 1 . The optimum d i a m et e r f o r a nt en na i s ’
);
10   S = w a v / 4 ; // D et er m in a ti o n o f s p a c in g f o r t he a nt en na
11   disp (  ’m ’ ,S ,  ’ a ) 2 . The s p a c in g f o r t he a nt en na ’ ) ;
12   L = N * S ; // D e te rm i na t io n o f t o t a l l e n g th o f an a nt en na \
13   disp (  ’m ’ ,L ,  ’ a ) 3 . The t o t a l l e ng t h o f an a nt e n na i s ’ ) ;
14   / / b ) D e te r m in a t io n o f a nt en na g a i n i n dB i
15   G = ( 1 5 * N * S * ( % p i * D ) ^ 2 ) / ( w a v ^ 3 ) ;
16   G _ d B i = 1 0 * log10 ( G ) ; / / C o n v e rt i n g i n d Bi
17   disp (  ’ d B i ’ , G _ d B i , ’ b ) The a nt en na g a i n i s ’ ) ;
18   / / c ) d e t e r m i n a t i o n o f b ea mw id th
19   t h e t a = ( ( 5 2 * w a v ) / ( % p i * D ) ) *sqrt ( w a v / ( N * S ) ) ;

81
 

20   disp (  ’ d e g r e e ’ , t h e t a , ’ T he b ea mw id th i s ’ ) ;

Scilab code Exa 16.8  example 7

1   clc ;
2   / / pa ge no 5 90
3   / / pr ob no . 1 6 . 8
4   / / D es i gn o f l o g p e r i o d i c a n t e n n a t o c ov er f r e q
100 −300MHz & t =0. 7 , a=30 de gr ee
5   t=0.7;a=30;
6   / / F or g oo d p e rf o rm a n ce c o n v e r t i n g r a ng e t o 9 0MHz t o
320MHz
7   f2=90;f1=320;
8   // D et er m in a ti o n o f l e n g t h s o f e l em e nt s
9   L 1 = 1 4 2 . 5 / f 1 ; / / Fo r f r e q o f 3 20MHz
10   L2=L1/t;L3=L2/t;L4=L3/t;L5=L4/t;
11   disp (  ’ The l e n g th o f e l em e nt s a r e ’ ) ;
12   disp (  ’m ’ , L 5 , ’ L5= ’ ,  ’m ’ , L 4 , ’ L4= ’ ,  ’m ’ , L 3 , ’ L3= ’ ,  ’m ’ , L 2 , ’
L2=’ , ’m ’ , L 1 , ’ L1= ’ ,) ;
13   / / D e te r m in a t io n o f s p a c i n g b et n e l e m en 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 in g b et n e l em e nt s a r e ’ ) ;
17   disp (  ’m ’ , D 5 , ’D5=’ ,  ’m ’ , D 4 , ’ D4= ’ ,  ’m ’ , D 3 , ’D3=’ ,  ’m ’ , D 2 , ’
D2=’ , ’m ’ , D 1 , ’D1=’ ,) ;

Scilab code Exa 16.9  example 8

1   clc ;
2   / / pa ge no 5 98
3   / / pr ob no . 1 6 . 9
4   / /A p a r a b o l i c a nt en na w it h d i a me t er =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 * 1 0 ^ 9 ; c = 3 * 1 0 ^ 8 ; // Spped o f l i g h t
6   / / D e t e r m in a t i o n o f g a i n & b ea mwi dth
7   w a v = c / f ; / / D e t er m i na t i on o f f r e e s p a ce w a ve l en g th
8   t h e t a = ( 7 0 * w a v ) / D ; / / C a l c u l a i n g b ea mw id th
9   disp (  ’ d e g r e e ’ , t h e t a , ’ T he b ea mw id th i s ’ ) ;
10   G = ( n * ( % p i ^ 2 ) * ( D ^ 2 ) ) / w a v ^ 2 ;/ / C a l c u l a t i n g g a i n
11   / / C o nv e rt i n g g a i n i n d Bi
12   G _ d B i = 1 0 * log10 ( G ) ;
13   disp (  ’ d B i ’ , G _ d B i , ’ The g a in i s ’ );

83
 

Chapter 17

Microwave Devices

Scilab code Exa 17.1  example 1

1   clc ;
2   / / pa ge no 6 21
3   / / pr ob 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
sectn=2cm∗4cm
5   / / D e t e r m in a t i o n o f c ut − o f f f r e q
6   a = 4 * 1 0 ^ - 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 * 1 0 ^ 8 ; // S peed o f l i g h t i n m/ s
8   fc=c/(2*a);
9   / / D e te r m in a t io n o f d om in an t mode o f p r o p a g a ti o n o v er
2:1
10   M U F = 2 * f c ;
11   disp (  ’ Hz ’ , M U F , ’ The max u s a b l e f r e q i s ’ );

Scilab code Exa 17.2  example 2

1   clc ;
2   / / pa ge no 6 24

84
 

3   / / pr ob no . 1 7 . 2
4   // D et er m in a ti o n o f g ro up v e l o f o r w av eg ui de i n
e xa mp le 7 . 1
5   f = 5 * 1 0 ^ 9 ; / / f r e q . i n Hz
6   f c = 3 . 7 5 * 1 0 ^ 9 ; / / c u t −o f f f r e q fro m eg . 7 . 1
7   c = 3 * 1 0 ^ 8 ; // s pe ed o f l i g h t i n m/ s
8   v g = c * sqrt ( 1 - ( f c / f ) ^ 2 ) ;
9   disp (  ’m/ s ’ , v g , ’ The g r ou p v e l o . i s ’ ) ;

Scilab code Exa 17.3  example 3

1   clc ;
2   / / pa ge no 6 24
3   / / pr ob no . 1 7 . 3
4   / /A w av eg ui de w it h f c =10GHz . 2 s i g n a l w i t h f r e q 1 2 &
17GHz pr op og at 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 te r m in a t io n o f g ro up v e l o f o r 12GHz
7   v g 1 = c * sqrt ( 1 - ( f c / f 1 ) ^ 2 ) ;
8   disp (  ’m/ s ’ , v g 1 , ’ The g ro up v e l o . f o r 12GHz s i g n a l i s ’
);
9   / / D e te r m in a t io n o f g ro up v e l o f o r 17GHz
10   v g 2 = c * sqrt ( 1 - ( f c / f 2 ) ^ 2 ) ;
11   disp (  ’m/ s ’ , v g 2 , ’ The g ro up v e l o . f o r 17GHz s i g n a l i s ’
);
12   / / D et er m in a ti o n o f t im e t ak en f o r 50m d i s t by f 1
13   t 1 = d / v g 1 ;
14   / / D et er m in a ti o n o f t im e t ak en f o r 50m d i s t by f 2
15   t 2 = d / v g 2 ;
16   / / D et er mi na ti on o f d i f f n i n t h e t r a v e l t im es f o r 2
signals
17   d e l = t 1 - t 2 ;
18   disp (  ’ s e c ’ , d e l ,  ’ The d i f f n i n t h e t r a v e l t i me s f o r 2
s i g na l s i s ’);

85
 

Scilab code Exa 17.4  example 4

1   clc ;
2   / / pa ge no 6 27
3   / / pr ob no . 1 7 . 4
4   / / D e t e r m in a t i o n o f p h as e v e l o . w i th g i v e n 5GHz f r e q
5   f = 5 * 1 0 ^ 9 ; c = 3 * 1 0 ^ 8 ; f c = 3 . 7 5 * 1 0 ^ 9 ; //Cut−o f f f r e q
r e f e r i n g eg . 1 7 . 1
6   v p = c / sqrt ( 1 - ( f c / f ) ^ 2 ) ; // C a l c u l a t i o n o f p ha se v e l o .
7   disp (  ’m/ s ’ , v p , ’ The p ha se v e l o i s ’ ) ;

Scilab code Exa 17.5  example 5

1   clc ;
2   / / pa ge no 6 28
3   / / pr ob no . 1 7 . 5
4   // d e te r mi n at i o n o f c h a r a c t e r i s t i c i m ped a nce o f  
w a ve g ui d e w i th g i v e n 5GHz f r e q
5   f = 5 * 1 0 ^ 9 ; f c = 3 . 7 5 * 1 0 ^ 9 ; // R e f e ri n g i n eg . 1 7 . 4
6   Z o = 3 7 7 / sqrt ( 1 - ( f c / f ) ^ 2 ) ;
7   disp (  ’ ohm ’ , Z o , ’ The c h a r a c t e r i s t i c i m ped a nce o f  
w a ve g ui d e i s ’ ) ;

Scilab code Exa 17.7  example 6

1   clc ;
2   / / pa ge no 6 31
3   / / pr ob no . 1 7 . 7
4   //A s i g n a l w i th l e v e l o f 20dBm & i n s e r t i o n l o s s =1dB
& 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 et er mi na ti on o f s i g n a l l e v e l i n main g u i de
7   sig_level_main=signal_in -loss;
8   disp (  ’dBm ’ ,sig_lev el_main , ’ The s i g n a l l e v e l i n main
g u i de i s ’ ) ;
9   / / D et er mi na ti on o f s i g n a l l e v e l i n s ec on d a ry g u i de
10   s i g _ l e v e l _ s e c = s i g _ i n - c o u p l e ;
11   disp (  ’dBm ’ ,sig_level_ sec , ’ The s i g n a l l e v e l i n
s e co n da r y g u id e i s ’ ) ;
12   // I f s i g n a l d i r n i n main g u id e we re r e v er e s ed , t he
s i g n a l l e v e l i n s e c g i d e would r e du ce d b y 40dB t o
13   s i g _ s e c _ r e v = ( s i g _ l e v e l _ s e c ) - ( d i r e c t ) ;
14   disp (  ’dBm ’ ,sig_sec_rev , ’ The s i g n a l l e v e l fro m s e c
g u id e when r e v e r s e d g u id e i s ’ ) ;

Scilab code Exa 17.8  example 7

1   clc ;
2   / / pa ge no 6 42
3   / / pr ob 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 * 1 0 ^ - 6 ; v = 1 0 ^ 5 ; // B as ic v e l o c i t y o f e
6   t = d / v ; // B as ic v e l o c i t y r e l a t i o n
7   // Determination of fr eq of 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   / / pa ge no 6 48
3   / / pr ob no . 1 7 . 9

87
 

4   / /A p u l s e m a gn e tr o n w i t h a vg p ow er = 1 . 2kW & p e a k
p ower = 18 .5kW & 1 p u l s e i s g e n e r a t ed e v er y 10 ms
5   Pavg=1.2*10^3;Pp=18.5*10^3;Tt=10*10^-3;
6   / / D e te r m in a t io n o f d ut y c y c l e
7   D=Pavg/Pp;
8   disp (D ,  ’ The du ty c y c l e i s ’ );
9   / / D et er m in a ti o n o f l e n g th o f p u l s e
10   Ton=D*Tt;
11   disp (  ’ s e c ’ , T o n ,  ’ 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   / / pa ge no 6 52
3   / / pr ob no . 1 7 . 1 0
4   / /A p y r a m i d a l h o rn h a s a p e r t u r e = 58mm i n E−p l a n e & 7 8
mm i n H−p l a n e & o p e r a t e s a t 1 0GHz
5   f=10*10^9;c=3*10^8;dH=78*10^-3;dE=58*10^-3;
6   // a ) D et er m in a ti o n o f g a in i n dB
7   w l = c / f ; // c a l c u l a t i o n o f w av el en gt h
8   G=(7.5*dE*dH)/(wl^2);
9   G _ d B i = 1 0 * log10 ( G ) ; / / C o n v e rt i n g t o d Bi
10   disp (  ’ d B i ’ , G _ d B i , ’ a ) The g a in i s ’ ) ;
11   / /b ) D e t e r m in a t i o n o f b ea mw id th 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 b ea mw id th i n H−p la ne is
’ );
14   / / c ) D e t e r m in a t i o n o f b ea mwi dt h i n E−p l a n e
15   t h e t a _ E = ( 5 6 * w l ) / d E ;
16   disp (  ’ d e g r e e ’ ,theta_E , ’ c ) The b ea mw id th i n H−p la ne is
’ );

Scilab code Exa 17.11  example 10

88
 

1   clc ;
2   / / pa ge no 6 54
3   / / p ro bl em no 1 7 . 1 1
4   / / f o r a s q u a re p at ch a nt en na
5   f = 2 * 1 0 ^ 6 ; // f r e q o f o p e r a t i o n i n Hz
6   E r = 2 ; // r e l a t i v e p e r m i t t i v i t y
7   c = 3 * 1 0 ^ 8 ; // v e lo o f l i g h t
8   // w av el en gt h i s g i ve n a s
9   w l = c / ( f * sqrt ( E r ) ) ;
10   / / The a nt en na w id th and l e n g t h a r e e ac h
a p p ro xi m a te ly h a l f o f t h i s .
11   w = w l / 2 ;
12   l = w l / 2 ;
13   disp (  ’m ’ ,w ,  ’ T he a n t en n a w i d th ’ ,  ’ and ’ ,  ’m ’ ,l ,  ’ The
a n te n na l e n g t h ’ ) ;

Scilab code Exa 17.12  example 11

1   clc ;
2   / / pa ge no 6 57
3   / / pr ob no . 1 7 . 1 2
4   / /A r a d a r Tx h a s p o we r =10kW a t f r e q = 9 .5 GHz & t a r g e t
a t 15km w it h c r o s s s e c t n =1 0.2 m2 w it h g a in o f  
a nt en na i s 20 d Bi
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 te r m in a t io n o f r e c e i v e d p ower
7   w l = c / f ; // c a l c u l a t i n g w a ve l en g th
8   G = 1 0 ^ ( G _ d B i / 1 0 ) ; / / C o nv e rt i ng t o p ower r a t i o
9   Pr=((wl^2)*Pt*(G^2)*a)/(((4*%pi)^3)*(r^4));
10   disp (  ’W’ , P r , ’ The r e c e i v e d power i s ’ ) ;

Scilab code Exa 17.13.a   example 12

89
 

1   clc ;
2   / / pa ge no 6 59
3   / / pr ob no . 1 7 . 1 3 a
4   // a p u l se s en t , r e t u rn s a f t e r 15 u s
5   t=15*10^-6;c=3*10^8;
6   // D et er mi na ti on 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 ta n c e o f t a r g e t i s ’ );

Scilab code Exa 17.13.b  example 13

1   clc ;
2   / / pa ge no 6 60
3   / / pr ob no . 1 7 . 1 3 . b
4   t p = 1 0 ^ - 6 ; // p u l se d u ra t io n o f p u l se r a d ar
5   f = 1 0 ^ 3 ; // o p e r a t i n g f r e q i n Hz
6   / / T he maximum u n a m b i g u ou s r a n g e i s
7   Rmax=c/(2*f);
8   disp (  ’m ’ , R m a x , ’ T he maximum r a n g e i s ’ );
9   / / T he minimum u n a mb i g uo u s r a n g e i s
10   Rmin=c*tp/2;
11   disp (  ’m ’ , R m i n , ’ The minimum r a n g e i s ’ );

Scilab code Exa 17.14  example 14

1   clc ;
2   / / pa ge no 6 62
3   / / pr ob no . 1 7 . 1 4
4   v = 6 0 ; / / s p ee d o f v e h i c l e mo ving t o wa r ds r a d a r i n mph
5   c = 3 * 1 0 ^ 8 ; // v e l o o f l i g h t i n m/ s
6   f = 1 0 ^ 1 0 ; // o p e ra t i n g f r e q ue n cy i n Hz
7   / / c o n v e r s i o n o f s p ee d f ro m mph t o km/ h r
8   v1=60*1.6;

90
 

9   / / c o n v e r si o n o f s pe ed fro m km/ h r t o m/ s
10   v2=v1*10^3/3600;
11   / / Now t he D op pl er s h i f t i s f ou n d a s
12   fd=2*v2*f/c;
13   disp (  ’ Hz ’ , f d , ’ The D o p p l e r s h i f t is ’ );

91
 

Chapter 18

Terrestrial Microwave
Communication system

Scilab code Exa 18.1  example 1

1   clc ;
2   / / p ag e no 6 76
3   // p ro b no 18 1
4   / / T r an s mi t te r and r e c e i v e r ha ve same h e i g h t a t d i s t
40km
5   d = 4 0 ; // d i s t i s 40 km
6   h = ( d ^ 2 ) / 6 8 ; / / 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 ac h t ow er must be a t
l e a s t ’ )l;

Scilab code Exa 18.2  example 2

1   clc ;
2   / / p ag e no 6 78
3   // p ro b no 18 2
4   / /A l i n e o f s i g h t r a di o l i n k a t f r e q 6GHz wi t h
s e p e r a t i o n 40 km b et n a nt en na s

92
 

5   f = 6 ; d 1 = 1 0 ; d 2 = 3 0 ; // o b s t a c l e l o c a t ed a t 10 km
6   / / D et er mi na ti on o f d i s t R t o c l e a r o b s t a c l e
7   R = 1 0 . 4 * sqrt ( ( d 1 * d 2 ) / ( f * ( d 1 + d 2 ) ) ) ;
8   disp (  ’m ’ ,R ,  ’ The d i s t by w hi ch beam must c l e a r the
o b s t ac l e i s ’ )

Scilab code Exa 18.3  example 3

1   clc ;
2   / / p ag e no 6 79
3   // p ro 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 te d by 40
km w i th o / p p ow er 2 W
5   f = 6 * 1 0 ^ 9 ; d = 4 0 ; P t = 2 ; // p ower i n w at t
6   / / t r a n s m i t t i n g a n te n na g a i n Gt=20 dBi , r e c e i v i n g
a n t e n n a Gr =25 d B i
7   Gt=20;Gr=25;
8   f _ m h z = 6 0 0 0 ; // f =600 0 MHz
9   P r _ P t _ d B = ( G t + G r ) - ( 3 2 . 4 4+ ( 2 0 *log10 ( d ) ) + ( 2 0 * log10 (
f_mhz)));
10   P t _ d B m = 1 0 * log10 ( P t / 1 0 ^ - 3 ) ;
11   P r _ d Bm = P t _ d B m + P r _ Pt _ d B ;
12   disp (  ’dBm ’ , P r _ d B m ,  ’ The power d e l i v e r e d t o t he Rx i s ’
);

Scilab code Exa 18.4  example 4

1   clc ;
2   / / p ag e no 6 80
3   // p ro b no 18 4
4   T _ s k y = 1 2 0 ; // Sky temp e x p r es s e d i n K
5   L _ d B = 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 he n o i s e temp i s g i v en a s
8   T a =( ( L -1 ) * 29 0 + T _s ky ) / L ;
9   disp (  ’K ’ , T a , ’ N o i se t e mp e ra t u re i s ’   );

Scilab code Exa 18.5  example 5

1   clc ;
2   / / p ag e no 6 81
3   / / p ro b n o 1 8 . 5
4   NF_dB=2;
5   N F _ p ow e r = 1 0 ^( N F _ d B / 1 0) ;
6   T _ e q = 2 9 0 *( N F _ po w e r - 1) ;
7   disp (  ’K ’ , T _ e q , ’ The e q u i v a l e n t n o i s e t em p er a tu re ’ ) ;

Scilab code Exa 18.6  example 6

1   clc ;
2   // p ag e no 6 81
3   // p ro b n o 1 8 . 6
4   // r e f e r ex a m p l e no 1 8 . 4 and 1 8 . 5
5   // The a nt en na and f e e d l i n e c om bi na ti on fro m ex 1 8 . 4
i s u se d w i th t he Rx f ro m ex 1 8 . 5
6  T a = 1 8 2 ; // n o i s e temp o f t he a nt en na and f e e d l i n e
c om bi na ti o n e x p r es s e d i n K
7   T e q = 1 6 9 ; // n o i s e t em pe ra tu re o f t he Rx
8   B = 2 0 * 1 0 ^ 6 ; // BW o f t he r e c e i v e r
9   T n _ s y s = T a + T e q ; // N o i se temp f o r t h e s ys te m
10   k = 1 . 3 8 * 1 0 ^ - 2 3 ; / / B o lt zm an n c o n s t a n t
11   / / N oi se power o f t he s ys te m i s g i ve n a s
12   P n = k * T n _ s y s * B ; // w he re k i s B olt zm an n c o n s t a n t
13   disp (  ’W’ , P n , ’ The n o i s e power i s ’ ) ;
14   P n _ d B m = 1 0 * log10 ( P n / 1 0 ^ - 3 ) ;
15   disp (  ’dBm ’ , P n _ d B m ,  ’ The t he rm al n o i s e power i s ’ ) ;

94
 

Scilab code Exa 18.7  example 7

1   clc ;
2   / / p ag e no 6 82
3   / / p ro b n o 1 8 . 7
4   / / r e f e r ex n o 1 8 . 3 and 1 8 . 6
5   P r _ d B m = - 6 2 ; // p ower a t t he r e c e i v e r i n dBm
6   P n _ d B m = - 1 0 0 ; / / t h e r ma l n o i s e p ow er 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 = P r _ dB m - P n _ dB m ;
9   disp (  ’ dB ’ , C _ N , ’ C a r r i e r t o n o i s e r a t io i s ’ );

Scilab code Exa 18.8  example 8

1   clc ;
2   / / p ag e no 6 83
3   / / p ro b n o 1 8 . 8
4   / / r e f e r ex 1 8. 7
5   f b = 4 0 * 1 0 ^ 6 ; // b i t r a t e i n b ps
6   P r _ d B m = - 6 2 ; // p ower a t t he r e c e i v e r i n dBm
7   P r = 1 0 ^ ( P r _ d B m / 1 0 ) * 1 0 ^ - 3 ; // power a t t h e r e c e i v e r i n
W
8   E b = P r / f b ; // t h e e n e r g y p e r b i t i n J
9   k = 1 . 3 8 * 1 0 ^ - 2 3 ; / / B o lt zm an n 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   / / En erg y 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   E b _ N o = 1 0 * log10 ( E b / N o ) ;
15   disp (  ’ dB ’ , E b _ N o , ’ Energ y p er 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 ag e no 6 86
3   / / p ro b n o 1 8 . 9
4   // r e f e r f i g 1 8 . 7 ( b )
5   / / Th is i s t he s ta nd a r d s u pe r h e te ro d yn e r e c e i v e r
6   f c = 6 8 7 0 ; // 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   I F = 7 0 ; / / I F 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 _ l o ,  ’ The l o c a l o s c i l l a t o r freq is ’ );

Scilab code Exa 18.10  example 10

1   clc ;
2   / / p ag e no 6 88
3   / / p ro b n o 1 8 . 1 0
4   / / r e f e r f i g 1 8. 9 a )
5   f c _ r = 6 8 7 0 ; // 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   f c _ t = 6 7 1 0 ; // c a r r i e r f r e q o f t ra n s m i t t ed s i g n a l i n
MHz
7   I F = 7 0 ; // i n MHz
8   // t he f r e q o f s h i f t o s c i l l a t o r i s
9   f s o = f c_ r - f c_ t ;
10   disp (  ’MHz ’ , f s o , ’ The f r e q of sh if t os cill at or is ’ );
11   //the lo ca l o s c i l l a t o r freq is given as
12   flo=fc_t-IF;
13   disp (  ’MHz ’ , f l o ,  ’ The l o c a l
o s ci l l a t o r freq is ’ );
14   / / from f i g , m ix e r 3 w i l l p ro du ce an o /p a s
15   op_mix3=flo+fso;
16   disp (  ’MHz ’ ,op_mi x3 , ’O/P o f M ix er 3 i s ’ ) ;

96
 

Scilab code Exa 18.11  example 11

1   clc ;
2   / / p ag e no 6 90
3   / / p ro b n o 1 8 . 1 1
4   / / A t y p i c a l mi c ro wa ve d i g i t a l r a d io s ys te m u s es 16−
QAM.
5   f b = 9 0 . 5 2 4 ; // b i t r a t e e x p r e s s e s d i n Mbps
6   n = 1 6 ; // f o r 16−QAM sy st em
7   / / p ar t a ) c a l c u l a t i o n o f no o f b i t s p er s ymb ol
8   m = log2 ( n ) ;
9   disp (  ’ b i t s ’ ,m ,  ’ The number o f b i t s p e r s ym bo l a r e ’ ) ;
10   / / p a rt b ) c a l c l a t i o n o f baud r a t e
11   / / b aud 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 ’ , b a u d ,  ’ The baud r a t e i s ’ );

97
 

Chapter 19

Television

Scilab code Exa 19.1  example 1

1   clc ;
2   / / p ag e no 7 03
3   / / p ro b n o 1 9 . 1
4   // I n t he g i ve n prob lem , a v i de o s i g n a l h as 50% o f  
t h e maximum l u m i n a n c e l e v e l
5   //A b la ck s et up 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 mi n an ce , a nd 1 00 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 ng e f ro m min t o max l u mi nn a nc e h as
1 0 0 −7 .5 =9 2. 5 u n i t s .
6   / / T h er e f o re t he l e v e l i s
7   I RE = 7 .5 + ( 0 .5 * 92 . 5) ;
8   disp (  ’ IRE u n i t s ’ , I R E , ’ L ev el o f v id eo s i g n a l s i n IRE
units ’ );

Scilab code Exa 19.2  example 2

1   clc ;
2   / / p ag e no 7 04

98
 

3   / / p ro b n o 1 9 . 2
4   / / p ar t a ) h o r i z o n t a l b la n k i n g
5   / / H o r i z o n t a l b l an k i n g o c c u p i e s a p p ro xi m a te ly 10 u s
o f t he 6 3 . 5 u s d u r a t i o n o f e a ch l i n e ,
6   H z t l_ b l nk = 1 0 /6 3 . 5 * 1 00 ;
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 nk i n g o c c u p i e s ’ ) ;
8   // p ar t b ) v e r t i c a l b l a n k in g
9   // V e r t i c a l b l a n ki n g o c c u p i e s a p p ro x i ma te ly 21 l i n e s
p er f i e l d o r 42 l i n e s p er f ra me . A f ra me h as 5 25
l i n e s a l t o g e t h er , s o
10   V e r t_ b l nk = 4 2 /5 2 5 * 1 00 ;
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 nk i n g o c c u p i e s ’ ) ;
12   / / p ar 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 an 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 he t a n s mi s si o n
o f the a c ti v e l i n e s .
14   a c t _v i d = ( 10 0 - H z t l _ b ln k ) * ( 1 00 - V e r t_ b l nk ) / 1 0 0 ;
15   disp (  ’% ’ ,act_vid , ’ The a c i v e v i d eo i s ’ ) ;

Scilab code Exa 19.3  example 3

1   clc ;
2   / / p ag e no 7 07
3   / / p ro b n o 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 as a
v i d e o b a nd w id t h o f 3MHz
5   B = 3 ; / / b a n d wi d t h 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 iv 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 ol u t i on i n l i n e s
i s ’ );

99
 

Scilab code Exa 19.4  example 4

1   clc ;
2   / / p ag e no 7 09
3   / / p ro b n o 1 9 . 4
4   / / A RGB v i de o s i g n a l h as n o rm a li z ed v a l u e s a s
5   R=0.2;G=0.4;B=0.8;
6   / / The l u mi na nc e s i g n a l i s g i ve n a s
7   Y=0.30*R+0.59*G+0.11*B;
8   disp (Y ,  ’ The l um in an ce s i g n a l
i s ’ );
9   / / T he i n −p ha se component o f t he c o l o r s i g n a l is
g i ve n a s
10   I = 0 . 6 0 * R - 0 . 2 8 * G - 0 . 3 2 * B ;
11   disp (I ,  ’ The i n −p ha se component o f t he c o l o r s i g n a l
i s ’ );
12   // The q u ad r at u re component o f t he c o l o r s i g n a l i s
g i ve n a s
13   Q = 0 . 2 1 * R - 0 . 5 2 * G + 0 . 3 1 * B ;
14   disp (Q ,  ’ The q u ad r at u re component o f t he c o l o r sign al
i s ’ );

Scilab code Exa 19.5  example 5

1   clc ;
2   / / p ag e no 7 12
3   / / p ro b n o 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 ti o n i n t h e t a b l e a re v o l t a g e l e v e l s
and h av e t o be s qu ar ed t o g e t power .
6   // f o r b la ck s et u p t h e v o l t a g e l e v e l i s g iv en a s
7   v=0.675;

100
 

8   / / T h e re f o r e t he power l e v e l a s a f r a c t i o n o f t he
maximum t r a n s m i t t e r p ow er i s
9   P _ b l ac k _ s et u p = v ^ 2 * 1 00 ;
10   disp (  ’ o f t he maximum t r a n s m i t t e r power i s u se d t o
t r a ns m i t a b l ac k s e tu p ’ , ’% ’ ,P_black_set up ,)

Scilab code Exa 19.6  example 6

1   clc ;
2   // p ag e no 7 28
3   // p ro b n o 1 9 . 6
4   // r e f e r f i g 1 9 . 27 o f t h e p a g e n o 7 29
5   // fro m f i g , we ca n w r i t e down t he v a l ue s d i r e c t l y
a s g i v en
6   I n 1 = 1 0 0 * 1 0 ^ - 3 ; / / e x p r e s s e d i n mV
7   I n 1 _ d B m V = 2 0 * log10 ( I n 1 / 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 ve 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   G 1 = 4 0 ; // g a in o f Amp 1 e x p r es s e d i n dB
11   / / o / p l e v e l o f Amp 1 i s
12   O ut 1 = I n1 _ dB m V + G 1 ;
13   disp (  ’dBmV ’ , O u t 1 , ’ The o u tp u t o f Amp 1 i s ’ ) ;
14   L = 1 5 ; / / e x p r e s s e d i n dB
15   / / The i np 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   G 2 = 2 5 ; / / 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 ’ , O u t 2 , ’ The o u tp u t o f Amp 2 i s ’ ) ;
22   L 1 = 1 0 ; // l o s s i n c a b l e
23   L 2 = 1 2 ; // 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 np 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   G 3 = 2 0 ; / / 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 ’ , O u t 3 , ’ The o u tp u t o f Amp 3 i s ’ ) ;
30   / / T here 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 i n
t he t ap
31   L 3 = 3 ; // l o s s i n c a b l e
32   L 4 = 2 0 ; // l o s s i n t ap
33   / / s i g n a l s t re n gt h a t t h e t a p i s
34   V d r o p _ d B m V = O u t 3 - L 3 - L 4 ;
35   V _ d r o p = 1 0 ^ ( V d r o p _ d B m V / 2 0 ) ;// e x p r es s e d i n mV
36   disp (  ’mV’ , V _ d r o p , ’ S i g n a l s t re 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 = 7 5 ; / / e x p r e s s e d i n ohm
39   P d r o p = ( V _ d r op * 10 ^ - 3 ) ^ 2 / R ;
40   P d r o p _ d B m = 1 0 * log10 ( P d r o p / 1 0 ^ - 3 ) ;
41   disp (  ’dBm ’ ,Pdrop_dBm , ’ The power a t t he end i s ’ ) ;

Scilab code Exa 19.7.a  example 7

1   clc ;
2   / / p ag e no 7 31
3   / / p ro b n o 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 i s tuned t o
c h an n el 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 th
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 i nt o the c ab le .
6   / / The p i c t u r e c a r r i e r o f c h a nn e l 6 i s at a
f r e q u e n c y o f 8 3 . 2 5 MHz , s o
7   ch=6;
8   F c = 8 3 . 2 5 ; // e x p r e s s e d i n MHz
9   I F = 4 5 . 7 5 ; / / e x p r e s s e d i n MHz
10   f_lo=Fc+IF;

102
 

11   a = f _ lo + c h / 2 ; b = f _l o - c h / 2 ;
12   disp (  ’ band ’ ,  ’MHz ’ ,a ,  ’ to ’ ,  ’MHz ’ ,b ,  ’ The i n t e r f e r e n c e
w ou ld i n ’ ) ;

Scilab code Exa 19.7.b  example 8

1   clc ;
2   / / p ag e no 7 40
3   / / p ro b n o 1 9 . 8
4   N h = 6 4 0; N v = 4 80 ; // r e s o l u t i o n o f d i g i t a l v i de o
s i gn a l
a s 6 4 0∗ 4 8 0 p i x e l s
5   R f = 3 0 ; // f ra me r a t e e x pr e s s e d i n Hz
6   m = 8 ; // b i t s p er s am p le
7   // By u s i n g t he p ro du ct o f H o ri z o n ta l & v e r t i c a l
r e s o l u t i o n , no o f l um in an ce p i x e l s p er f r a me a r e
8   Npl=Nh*Nv;
9   // s i nc e each o f the c o lo 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 iv e n a s
12   fb=Npt*m*Rf;
13   disp (  ’ bps ’ , f b , ’ The b i t r at e f o r the s i g n al i s ’ );

103
 

Chapter 20

Satellite Communication

Scilab code Exa 20.1  example 1

1   clc ;
2   / / p ag e no 7 54
3   / / p ro b n o 2 0 . 1
4   / / p a rt A)
5   d=500;
6   //By u s i ng t he e q ua t i on 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 * 1 0 ^ 1 1 / ( d + 6 4 0 0 ) ) ;
8   disp (  ’m/ s ’ ,v ,  ’A) The v e l o c i t y of a s a t e l l i t e is ’ );
9   / / The r a d i u s o f o r b i t i s
10   r=(6400+d)*10^3// in 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 period of s a t e l l i t e i s ’ );
14   // part B)
15   d=36000;
16   //By u s i ng t he e q ua t i on 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 * 1 0 ^ 1 1 / ( d + 6 4 0 0 ) ) ;
18   disp (  ’m/ s ’ ,v ,  ’B) The v e l o c i t y of a s a t e l l i t e is ’ );
19   // The r a di u s o f o r b i t i s
20   r=(6400+d)*10^3// in 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 is

104
 

22   T = ( 2 * % p i * 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 ag e no 7 57
3   / / p ro b n o 2 0 . 2
4   R = 6 4 0 0 ; // R ad iu s o f e a rt h
5   L = 4 5 ; // e ar t h s t a t i o n l a t t i t u d e
6   H = 3 6 0 0 0 / / H e i g ht o f s a t e l l i t e a bo ve t h e earth ;
7   ang=atand((6400*sind(45))/(36000+(6400*(1-cosd(45)))
));
8   disp ( a n g ) ;

Scilab code Exa 20.3  example 3

1   clc ;
2   / / p ag e no 7 58
3   / / p ro b n o 2 0 . 3
4   / / D e t e r m in a t i o n o f l e n g h t o f g e o s t a t i o n a r y s a t e l l i t e
w i th a n gl e o f e l a v a t i o n =30 d e g r e e
5   r = 6 4 * 1 0 ^ 5 ; // R ad iu s o f e a r th
6   h=36*10^6; // he ig ht of s a t e l l i t e
7   t h e t a = 3 0 ; // a n gl e o f e l e v a t i o n
8   d = sqrt ( ( ( r + h ) ^ 2 ) - ( ( r * c o s d ( t h e t a ) ) ^ 2 ) ) - ( r * s i n d ( t h e t a )
);
9   disp (  ’km ’ , d / 1 0 0 0 , ’ The l e n g t h o f t he p a t h i s ’ ) ;

Scilab code Exa 20.4  example 4

105
 

1   clc ;
2   / / p ag e no 7 59
3   / / p ro b n o 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 nt en na g a i n 4 0 dBi
5   // R e c ei v e r a nt en na g a in 30 d Bi & p at h l e n g t h i s
4∗ 1 0 ˆ 7
6   G t _ d B i = 4 0 ; G r _ d B i = 3 0 ; P t = 7 ; d = 4 0 0 0 0 ; // in km
7   f = 4 0 0 0 ; // i n MHz
8   P r _ P t _ d B = G t _ d B i + G r _d B i - ( 3 2 . 4 4 + ( 2 0 *log10 ( d ) ) + ( 2 0 *
log10 ( f ) ) ) ;
9   // S i g n a l s t r en g t h a t t r a n s m i t t e r
10   P t _ d B m = 1 0 * log10 ( P t / 1 0 ^ - 3 ) ;
11   P r _ d B m = ( P t _ d B m ) + ( P r _ P t _ d B ) ;
12   disp (  ’dBm ’ , P r _ d B m ,  ’ The v al ue o f s i g n a l s t re 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 ag e no 7 60
3   / / p ro b n o 2 0 . 5
4   / / I n t he g i ve n p ro bl em
5   G = 4 0 ; // r e c e i v i n g a nt en na g a i n
6   T _ s k y = 1 5 ; // n o i s e temp
7   L = 0 . 4 ; / / l o s s b et we en a n te n na and LNA i n p u t
8   T _ e q = 4 0; // n o i s e t e m pe r a tu r e f LNA
9   / / F ir −s t we h ave t o f i n d G i n dB
10   G_ dB = G - L;
11   / / F or t h e c a l c u l a t i o n o f T , we h ave t o c o n ve rt t h e
f e e d h or n l o s s i n t o a r a t i o a s f o l l o w s
12   L = 1 0 ^ ( 0 . 4 / 1 0 ) ;
13   Ta = (( L -1) * 29 0 + T _s ky ) / L ;
14   // The r e c e i v e r n o i s e t em pe ra tu re i s g i ve n wrt t he
c ho s en r e f e r e n c e p oi nt , t h e e f o r e

106
 

15   R a t io = G - 10 *log10 ( T a + T _ e q ) ;
16   disp (  ’ dB ’ , R a t i o , ’ The r e c e i v e r n o i s e t em pe ra tu re i s ’ )
;

Scilab code Exa 20.6  example 6

1   clc ;
2   / / p ag e no 7 61
3   / / p ro b n o 2 0 . 6
4   N F _ d B = 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 le n t n o i s e t em pe ra tu re i s g i v eb a s
7   T_eq=290*(NF-1);
8   disp (  ’K ’ , T _ e q , ’ E q ui v al e n t n o i s e t em p er a tu r e i s ’ ) ;

Scilab code Exa 20.7  example 7

1   clc ;
2   / / p ag e no 7 61
3   / / p ro b n o 2 0 . 7
4   / / r e f e r p r o b no 2 0 . 5
5   d = 3 8 0 0 0 ; / / d i s t a n c e o f s a t e l l i t e f ro m t h e E a rt h
surface
6   P = 5 0 ; / / t r a n s m i t t e r p ow er
7   G = 3 0 ; / / a n te n na g a i n
8   f = 1 2 0 0 0 ; / / f r e q u e n c y i n MHz
9   B = 1 0 ^ 6 ; / / B a n dw i d th i n MHz
10   / / f ro m p ro bl em no 2 . 5
11   G_T=21;
12   L_misc=0;
13   k _ d B W = - 2 2 8 . 6 ; / / B o lt zm a nn ’ s c o n s t a n t i n dBW
14   / / Th ere 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 p ow er i n dBW i s

107
 

16   P t_ dB W = 1 0* log10 ( P ) ;
17   // The EIPR in dBW
18   E I RP _d B W = P t_ dB W + G ;
19   / / FSL i n dB
20   F SL _d B = 3 2. 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   r at io = E IR P_ dB W - F SL _d B - L _m is c + G _T - k _d BW - 1 0*
log10 ( B ) ;
23   disp (  ’ dB ’ , r a t i o , ’ 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 iv e r i s ’ );

Scilab code Exa 20.8  example 8

1   clc ;
2   / / p ag e no 7 62
3   / / p ro b n o 2 0 . 8
4   D = 4 0 0 0 0 ; / / d i s t a n c e o f s a t e l l i t e f ro m t h e e a r t h
station
5   v = 3 * 1 0 ^ 8 ; // v e lo o f l i g h t
6   d = 8 0 0 0 0 ; // d i s t a n c e b e tw ee n two e a rt h s t a t i o n s
7   // t i m e d el a y i s g i v en a s
8   t=d/v;
9   / / t o t a l t i m e d el ay w i l l be t wi ce t h at 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 el ay is ’ );

Scilab code Exa 20.9  example 9

1   clc ;
2   / / p ag e no 7 69
3   / / p ro b n o 2 0 . 9
4   f _d o wn = 4 *1 0 ^9 ; // d ow nl in k f r e q

108
 

5   D=3; // diam eter


6   n = 0 . 5 5 ; // e f f i c i e n c y
7   c = 3 * 1 0 ^ 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 nt e nn a i s g i v e n a s G=(n∗
%piˆ2∗Dˆ 2) / wl ˆ 2 . T h e re f o re w av el en gt h i s g i ve n a s
9   wl=c/f_down
10   G=(n*%pi^2*D^2)/wl^2;
11   G _ dB = 1 0* log10 ( G ) ;
12   disp (  ’ dB ’ , G _ d B ,  ’ The g a i n o f TVRO i s ’ );
13   / / The b ea mwi dth i s g i v e n a s
14   b w = ( 7 0* w l ) / D ;
15   disp (  ’ d e g r e e ’ , b w , ’ T he b ea m wi dt h i s ’ ) ;

109
 

Chapter 21

Cellular Radio

Scilab code Exa 21.1  example 1

1   clc ;
2   / / p ag e no 7 95
3   / / p ro b n o 2 1 . 1
4   v = 1 0 0 ; // in km/ hr
5   / / f i r s t c o n v e r t s p e ed i n t o m/ s e c
6   v 1 = ( 1 0 0 * 1 0 ^ 3 ) / 3 6 0 0 ; // in km/ s ec
7   //part a)
8   r=10^4; // in m
9   t=(2*r)/v1;
10   disp (  ’ s e c ’ ,t ,  ’ H an d of f t im e i s ’ ) ;
11   //part b)
12   r=500; // in m
13   t=(2*r)/v1;
14   disp (  ’ s e c ’ ,t ,  ’ H an d of f t im e i s ’ ) ;

Scilab code Exa 21.2  example 2

1   clc ;

110
 

2   / / p ag e no 8 07
3   / / p ro b n o 2 1 . 2
4   N = 1 2 ; m = 1 2 0;
5   a=20000;
6   t h = 3 0 ; / / 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 p ea k t r a f f i c
i n e r l a n g s f o r t he wh ol e s ys te m
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 traffic is ’ );
13   / / The p e a k t r a f f i c is
14   T1=(a*tp)/60;
15   disp (  ’ E ’ , T 1 ,  ’ The p e a k t r a f f i ci 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 p ea k t r a f f i c
i n e r l a n g s f o r o ne 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 per c e l l i s ’ );
20   / / The p ea k t r a f f i c p e r c e l l i s
21   t=T1/m;
22   disp (  ’ E ’ , T 1 , ’ The p ea k t r a f f i cper c e l l i s ’ );
23   // p a rt c )
24   / / Fo r a v e r ag 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 he
a ve r ag e n o 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 nn e l s . However , t he 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 ag e no 8 16
3   / / p ro b n o 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 et we en b a s e and m o b i l e i s
7   d=c*tg;
8   disp (  ’m ’ ,d , ’ T he maximum d i s t a n c e b e tw e en b a s e a nd
m ob il e i s ’ ) ;

112
 

Chapter 22

Personal Communication
Systems

Scilab code Exa 22.1  example 1

1   clc ;
2   / / p ag e no 8 42
3   / / p ro b n o 2 2 . 1
4   P R = -100; // In dBm
5   / / The m ob il e t r a n s mi t t ed power i s
6   P T _ d Bm = - 76 - P R ; // t h i s i s i n dBm
7   disp (  ’ or ’ ,  ’dBm ’ , P T _ d B m , ’ The m o bi l e t r a n s m i t t e d p ower
i n dBm i s ’ ) ;
8   P T _ m W = 1 0^ ( P T _ d Bm / 1 0) ;
9   disp (  ’mW’ , P T _ m W , ’ The m o bi l e t r a n s m i t t e d p ower i s ’ ) ;

113
 

Chapter 23

Paging and Wireless Data


Networking

Scilab code Exa 23.1  example 1

1   clc ;
2   / / p ag e no 8 63
3   / / p ro b n o 2 3 . 1
4   b i t _r a te = 5 12 ; / / i b b ps
5   t=60; / / i n s e c
6   / / p re am bl e u s es 57 6 b i t s
7   preamble=576;
8   b it s_ to ta l = b it _r at e * t ;;
9   u s ab l e_ b it s = b i ts _ to t al - p r ea mb l e ;
10   / / e ac h b at ch h as o ne 32− b i t s s y n c h r o n i z in g co de wo rd
and s i x t e e n 32− b i t a d d r e ss c o d e w o r d s f o r a t o t a l
o f 17∗3 2= 54 4 b i t s . T h e r e f o r e
11   b i t s _p e r _ ba t c h = 1 7 *3 2 ;
12   b a tc h es _ pe r _m i n = u s ab l e_ b it s / b i ts _ pe r _b a tc h ;
13   addr=16;
14   a d d r _ p e r_ m i n = b a t c he s _ p er _ m i n * a d dr ;
15   disp (addr_per_min , ’ The no o f p ag es t r an s m i t te d i n
o ne min a r e ’ ) ;

114
 

Scilab code Exa 23.2  example 2

1   clc ;
2   / / p ag e no 8 64
3   / / p ro b n o 2 3 . 2
4   / / F or t h e g i v e n FLEX s y st e m
5   Wc=25*10^3;
6   b i t _ ra t e = 6 40 0; / / i n b p s
7   e f f i c ie n c y = b i t _r a t e / W c ;
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 ag e no 8 71
3   / / p ro b n o 2 3 . 3
4   // f o r t he B l ue to o th s ys te m
5   fh_max=1/(625*10^-6);
6   fh_min=1/(5*625*10^-6);
7   disp (  ’ Hz ’ , f h _ m i n , ’ The minimum h o p p i ng r a t e i s ’ , ’ Hz ’ ,
f h _ m a x , ’ The maximum h o pp i ng r a t e i s ’ ) ;

115
 

Chapter 24

Fiber Optics

Scilab code Exa 24.3  example 1

1   clc ;
2   / / p ag e no 8 88
3   / / p ro b n o 2 4 . 3
4   NA=0.15;
5   wl=820*10^-9;// in m
6   d_core=2*(0.383*wl/NA);
7   disp (  ’m ’ , d _ c o r e , ’ The c o r e d i am e te r i s ’ ) ;

Scilab code Exa 24.4  example 2

1   clc ;
2   / / p ag e no 8 90
3   / / p ro b n o 2 4 . 4
4   B l = 5 0 0 ; // i n MHz−km
5   B = 8 5 ; // i n MHz
6   / / By u s i n g B an dw id th−d i s t a n c e p ro du ct f or mu la
7   l=Bl/B;
8   disp (  ’km ’ ,l ,  ’ The maximun d i s t a n c e t h a t ca n b e u s e
b et wee n r e p e a t e r s i s ’ ) ;

116
 

Scilab code Exa 24.5  example 3

1   clc ;
2   / / p ag e no 8 91
3   / / p ro b n o 2 4 . 5
4   wl0=1310; / / i n n s
5   S o = 0 . 0 5 ; // in ps /(nmˆ2∗km)
6   l = 5 0 ; // in km
7   wl=1550; / / i n n s
8   d = 2 ; // in nm
9   // Ch r o m a ti c d i s p e r s i o n i s g i ve 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 he re fo re t o t a l d i s p e r s i o n i s
14   dt=D*l;
15   disp (  ’ ps ’ , d t , ’ The t o t a l d i s p e rs i o n i s ’ );

Scilab code Exa 24.6  example 6

1   clc ;
2   / / p ag e no 8 93
3   / / p ro b n o 2 4 . 6
4   / / R e f e r p ro bl em 2 4 . 5
5   dt=949*10^-12;/ / i n s e d
6   l = 5 0 ; // in km
7   B=1/(2*dt);
8   / / By u s i n g B an dw id th−d i s t a n c e p ro du ct f or mu l a
9   B l = B *l ;
10   disp (  ’ Hz−km ’ , B l , ’ The b an dw id th d i s t a n c e p r od u ct i s ’ )
;

117
 

Scilab code Exa 24.7  example 5

1   clc ;
2   / / p ag e no 8 99
3   / / p ro b n o 2 4 . 7
4   / / r e f e r t a b l e fro m t he p r o bl e m p a g e no 8 99
5   P _ co u pl i ng 1 = - 3; P _ co u pl i ng 2 = - 6; P _ co u pl i ng 3 = - 40 ;
// i n dB
6   / / P ar t a ) The p r o p o r ti o n o f i n pu t power e me rg in g a t
p or t 2
7   P2_Pin=10^(P_coupling1/10);
8   disp (  ’% ’ , P 2 _ P i n * 1 0 0 , ’ a ) The p r o p o r ti o n o f i n p ut
p ower e m er g in g a t p o r t 2 ’ ) ;
9   P3_Pin=10^(P_coupling2/10);
10   disp (  ’% ’ , P 3 _ P i n * 1 0 0 , ’ The p r o p o r ti o n o f i n pu t power
e me rg in g a t p o rt 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 om bi na ti on s , s o
12   d i re c ti v it y = 4 0;
13   disp (  ’ dB ’ ,directivity , ’ D i r e c t i v i t y i s ’ );
14   P i n _t o ta l = P 2_ Pi n + P 3_ Pi n ;
15   / / e x c e s s l o s s i n dB
16   l o s s = - 1 0 * log10 ( P i n _ t o t a l ) ;
17   disp (  ’ dB ’ , l o s s ,  ’ 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 ag e no 9 01
3   / / p ro b n o 2 4 . 8
4   wl=1*10^-6;
5   c = 3 *1 0 ^8 ;

118
 

6   h=6.626*10^-34
7   f=c/wl;
8   E = h * f ; // i n J ou l e
9   // t h i s e ne rg y ca n be c o n v e r t ed i n t o e l e ct r o n −v o l t .
we know 1eV=1.6∗10ˆ −19 J
10   e V = 1 . 6* 1 0^ - 1 9 ;
11   E _ e v = E / e V ;
12   disp (  ’ eV ’ , E _ e v ,  ’ The e ne rg y o f p ho to n i n eV i s ’ ) ;

Scilab code Exa 24.9  example 9

1   clc ;
2   / / p ag e no 9 09
3   // p ro 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 _i n * R es po ns iv it y ;
7   disp (  ’ nA ’ , I _ d , ’ The d i od e c u r r e nt i s ’ );

119
 

Chapter 25

Fiber Optic Systems

Scilab code Exa 25.1  example 1

1   clc ;
2   / / p ag e no 9 19
3   // p ro b no 25 1
4   s p a n _ l e n g t h = 4 0 ; // in km
5   P i n _m W = 1 .5 ;
6   s i gn a l_ s tr e ng t h_ d Bm = - 25 ; f i be r _l e ng t h = 2 .5 ;// in
km
7  
l o s s _p e r _ s li c e _ dB = 0 .2 5 ; f _ l o s s _ dB _ p e r _k m = 0 .3 ;
8  
loss_connector_dB=4;
9  
P i n _ d Bm = 1 0* log10 ( P i n _ m W ) ;
10  
s p l i ce s = s p a n _ l en g t h / f i b er _ l e ng t h - 1;
11  
f i be r _l o ss = s p an _ le n gt h * f _ lo s s_ d B_ p er _ km ;
12  
s p li c e_ l os s = s p li ce s * l o ss _ pe r _s l ic e _d B ;
13  
T _ l os s = f i be r _l o ss + s p li c e_ l os s +
loss_connector_dB;
14   P _o ut = P in _d Bm - T _l os s ;
15   s y s _ m ar g i n = P _ ou t - s i g n a l_ s t r en g t h _ dB m ;
16   disp (  ’ dB ’ ,sys_margin , ’ The s y st e m m ar gi n i s ’ ) ;

120
 

Scilab code Exa 25.2  example 2

1   clc ;
2   / / p ag e no 9 21
3 // p ro b no 25 2
4   L = 4 5 ; // in km
5   dt=100; / / i n n s
6   / / The maximum p e r m i s s i b l e v a l u e f o r t h e p u l se −
s p r e a di n g c o ns t an t i s
7   D=dt/L;
8   disp (  ’ ns/km ’ ,D ,  ’ The maximum p e r m i s s i b l e value fo r
t he p u ls e −s p r e a di n g c o ns t an t i s ’ ) ;

Scilab code Exa 25.3  example 3

1   clc ;
2   / / p ag e no 9 22
3   // p ro b no 25 3
4   L=45;
5   T _ R t x = 5 0; T _ Rr x = 7 5 ; T _ Rf = 1 0 0 ;
6   T _ R T = sqrt ( T _R tx ^ 2 + T _R rx ^ 2 + T _R f ^2 ) ;
7   / / a ) f o r NRZ
8   fb=1/T_RT;
9   disp (  ’GHz ’ , f b , ’ 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 ’ , f b , ’ 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 ag e no 9 24
3   // p ro b no 25 4

121
 

4   B l = 5 0 0 ; // i n MHz−km
5   L = 5 ; // in km
6   / / u s i n g t h e ba nd wi dt h−d i s t a n c e p ro du ct f or mu l a
d i s p e r s i o n i s g iv e n a s
7   D=500/Bl;
8   disp (  ’ ns/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 iv en a s
10   T _ rt = D * L ;
11   disp (  ’ ns ’ , T _ r t ,  ’ T o ta l r i s e time i s ’ );

Scilab code Exa 25.5  example 5

1   clc ;
2   / / p ag e no 9 24
3   // p ro b no 25 5
4   T_Rrx=3*10^-9;
5   T_Rtx=2*10^-9;
6   f b = 1 0 0 * 1 0 ^ 6 ; / / i n b ps
7   L = 2 5 ; // in km
8   T _ RT = 1 /( 2* f b )
9   / / we h ave t o compute r i s e t im e t h e r e f o r e
10   T _ r f =   sqrt ( T _R T ^2 - T _R tx ^ 2 - T _R rx ^ 2)
11   / / d i s p e r s i o n p er km i s
12   D = T _r f / L ;
13   disp (  ’ ns/km ’ , D / 1 0 ^ - 9 , ’ T he maximum a c c e p t a b l e
d i s p e r si o n i s ’ );
14   / / u s i n g t h e ba nd wi dt h−d i s t a n c e p ro du ct
15   B l = 5 0 0 / D ;
16   disp (  ’MHz−km ’ , B l * 1 0 ^ - 9 , ’ T he b a n d wi d t h−d i s t a n c e
product i s ’ );

122

You might also like