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
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
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.
Contents List of Scilab Codes
1 Introduction to communication system
2 Radio Frequency Circuits
3 The Amplitude Modulation
4 Angle Modulation
7 Digital communication
8 The Telephone System
9 Data Transmission
12 Digital Modulation and Modems
13 Multiplexing and Multiple Access Techniques
14 Transmission Lines
15 Radio Wave Propogation
17 Microwave Devices
18 Terrestrial Microwave Communication system
20 Satellite Communication
21 Cellular Radio
22 Personal Communication Systems
23 Paging and Wireless Data Networking
24 Fiber Optics
25 Fiber Optic Systems
List of Scilab Codes Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa
1.1 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 2.1 2.2 2.3 2.4 2.5 2.7 2.8 2.9 2.10 2.11 3.1 3.2 3.3 3.4 3.6 3.7 3.8
example example example example example example example example example example example example example example example example example example example example example example example example example example example example
1. 4. 5. 6. 7. 8. 9. 10 11 12 13 1. 2. 3. 4. 5. 6. 7. 8. 9. 10 1. 2. 3. 4. 5. 6. 7.
10 11 11 12 12 13 13 14 14 14 15 17 17 18 19 19 20 20 21 22 22 24 24 25 25 26 26 26
Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa
3.9 3.10 3.11 4.1 4.2 4.3 4.4 4.6 4.7 4.9 4.10 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 6.1 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 7.1 7.2 7.3 7.4 7.5 7.6 8.3 8.5
example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example
8. 9. 10 1. 2. 3. 4. 5. 6. 7. 10 1. 2. 3. 4. 5. 6. 7. 8. 9. 10 1. 2. 3. 4. 5. 6. 7. 8. 9. 1. 2. 3. 4. 5. 6. 1. 2.
27 27 28 29 30 30 31 31 32 34 34 36 36 37 38 38 38 39 39 40 41 42 42 43 43 44 44 45 45 46 47 48 48 49 49 49 51 51
Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa
8.6 9.2 9.6 12.1 12.2 12.3 12.4 12.5 12.6 13.1 13.2 13.3 13.4 13.5 14.1 14.2 14.3 14.4 14.5 14.6 14.7 14.8 14.9 14.10 14.11 14.13 14.14 14.15 14.16 14.17 14.18 14.19 14.20 15.1 15.2 15.3 15.4 15.5
example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example
3. 1. 2. 1. 2. 3. 4. 5. 6. 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10 11 12 13 14 15 16 17 18 19 1. 2. 3. 4. 5.
52 53 53 55 56 56 57 57 57 59 60 61 61 61 63 63 64 64 65 66 66 67 67 68 68 69 69 70 70 70 71 71 72 73 73 74 74 74
Exa 15.6 example Exa 15.7 example Exa 15.8 example Exa 15.9 example Exa 15.11 example Exa 15.12 example Exa 16.1 example Exa 16.2 example Exa 16.3 example Exa 16.4 example Exa 16.6 example Exa 16.7 example Exa 16.8 example Exa 16.9 example Exa 17.1 example Exa 17.2 example Exa 17.3 example Exa 17.4 example Exa 17.5 example Exa 17.7 example Exa 17.8 example Exa 17.9 example Exa 17.10 example Exa 17.11 example Exa 17.12 example Exa 17.13.aexample Exa 17.13.bexample Exa 17.14 example Exa 18.1 example Exa 18.2 example Exa 18.3 example Exa 18.4 example Exa 18.5 example Exa 18.6 example Exa 18.7 example Exa 18.8 example Exa 18.9 example Exa 18.10 example
6. 7. 8. 9. 10 11 1. 2. 3. 4. 5. 6. 7. 8. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10 11 12 13 14 1. 2. 3. 4. 5. 6. 7. 8. 9. 10
75 76 76 77 77 78 79 79 80 80 81 81 82 82 84 84 85 86 86 86 87 87 88 88 89 89 90 90 92 92 93 93 94 94 95 95 96 96
Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa
18.11 19.1 19.2 19.3 19.4 19.5 19.6 19.7.a 19.7.b 20.1 20.2 20.3 20.4 20.5 20.6 20.7 20.8 20.9 21.1 21.2 21.3 22.1 23.1 23.2 23.3 24.3 24.4 24.5 24.6 24.7 24.8 24.9 25.1 25.2 25.3 25.4 25.5
example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example example
11 1. 2. 3. 4. 5. 6. 7. 8. 1. 2. 3. 4. 5. 6. 7. 8. 9. 1. 2. 3. 1. 1. 2. 3. 1. 2. 3. 6. 5. 6. 9. 1. 2. 3. 4. 5.
97 98 98 99 100 100 101 102 103 104 105 105 105 106 107 107 108 108 110 110 111 113 114 115 115 116 116 117 117 118 118 119 120 121 121 121 122
Chapter 1 Introduction to communication system
Scilab code Exa 1.1 example 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
clc ; // p a g e no 7 // p r o b no 1 . 1 // p a r t a ) f r e q= 1MHz(AM r a d i o b r o a d c a s t band ) // We have t h e e q u a t i o n c=f r e q ∗ w a v e l e n g t h c =3*10^8; f =1*10^6; wl = c / f ; disp ( ’m ’ ,wl ,+ ’WAVELENGTH IN FREE SPACE I S ’ ) ; // p a r t B) f r e q= 27MHz(CB r a d i o band ) f =27*10^6; wl = c / f ; disp ( ’m ’ ,wl ,+ ’WAVELENGTH IN FREE SPACE I S ’ ) ; // p a r t C) f r e q= 4GHz( u s e d f o r s a t e l l i t e t e l e v i s i o n ) f =4*10^9; wl = c / f ; disp ( ’m ’ ,wl ,+ ’WAVELENGTH IN FREE SPACE I S ’ ) ;
Scilab code Exa 1.4 example 4 1 clc ; 2 // p a g e no 18 3 // p r o b no . 1 . 4 4 // I n g i v e n p r o b l e m n o i s e power bandwidth i s 10 kHz ; 5 6 7 8 9 10 11 12
r e s i s t o r temp T( 0 c ) =27 // F i r s t we have t o c o n v e r t t e m p e r a t u r e t o k e l v i n s : T0c =27; Tk = T0c +273; // n o i s e power c o n t r i b u t e d by r e s i s t o r , Pn= k ∗T∗B k =1.38*10^( -23) ; B =10*10^3; Pn = k * Tk * B ; disp ( ’W’ ,Pn , ’ n o i s e power c o n t r i b u t e d by r e s i s t o r ’ ) ;
Scilab code Exa 1.5 example 5 1 clc ; 2 // p a g e no 20 3 // p r o b no 1 . 5 4 // I n t h e g i v e n p r o b l e m B=6MHz, Tk=293 , k 5 6 7 8 9 10 11
=1.38∗10ˆ −23 B =6*10^6; Tk =293; k =1.38*10^ -23; R =300; Pn = k * Tk * B ; disp ( ’W’ ,Pn , ’ The n o i s e power i s ’ ) ; // Th n o i s e v o l t a g e i s g i v e n by Vn=s q r t ( 4 ∗ k ∗Tk∗B∗R) Vn = sqrt (4* k * Tk * B * R ) ; disp ( ’ v o l t s ’ ,Vn , ’ Th n o i s e v o l t a g e i s ’ ) ; // o n l y one−h a l f o f t h i s v o l t a g e i s a p p e a r s a c r o s s the antenna terminals , the other appears a c r o s s
the source r e s i s t a n c e . Therefore the actual n o i s e v o l t a g a t t h e i n p u t i s 2 . 7 uV
Scilab code Exa 1.6 example 6 1 clc ; 2 // p a g e no 21 3 // p r o b no 1 . 6 4 // g i v e n : FM b r o a d c a s t 5 6 7 8 9 10 11 12 13 14
r e c e i v e r :− Vn=10uV , R=75V, B =200 kHz Vn =10; // i n uV R =75; B =200*10^3; //By Ohm’ s law In = Vn / R ; disp ( ’ uA ’ ,In , ’ N o i s e c u r r e n t i s ’ ) ; // N o i s e v o t l a g e i s a l s o g i v e n a s I n=s q r t ( 2 ∗ q ∗ I o ∗B) q =1.6*10^ -19; // s o l v i n g t h i s f o r I o=I n ˆ 2 / 2 ∗ q ∗B ; Io =( In *10^ -6) ^2/(2* q * B ) ; disp ( ’A ’ ,Io , ’ c u r r e n t t h r o u g h t h e d i o d e i s ’ ) ;
Scilab code Exa 1.7 example 7 1 clc ; 2 // p a g e no 23 3 // p r o no 1 . 7 4 // Given : r e f e r 5 6 7 8
f i g . 1 . 1 2 o f p a g e no . 2 3 ; R1=100ohm , 3 0 0K ; R2=200ohm , 4 0 0 k ; B=100kHz ; Rl =300ohm R1 =100; T1 =300; R2 =200; T2 =400; B =100*10^3; Rl =300; k =1.38*10^ -23; // open−c k t n o i s e v o l t a g e i s g i v e n by // Vn1 =s q r t ( Vr1 ˆ2 + Vr2 ˆ 2 ) // =s q r t [ s q r t ( 4 kTBR1 ) ˆ2 + s q r t ( 4 kTBR2 ) ˆ 2 ] 12
9 // by s o l v i n g t h i s we g e t Vn1=s q r t [ 4 kB ( T1R1 + T2R2 ) ] 10 Vn1 = sqrt (4* k * B *( T1 * R1 + T2 * R2 ) ) ; 11 disp ( ’ v o l t s ’ ,Vn1 , ’ Open−c k t n o i s e v o l t a g e i s ’ ) ; 12 // s i n c e i n t h i s c a s e t h e l o a d i s e q u a l i n v a l u e t o 13 14 15 16
t h e sum o f t h e r e s i s t o r s , // one−h a l f o f t h i s v o l t a g e i s a p p e a r a c r o s s t h e load . // Now t h e l o a d power i s P= Vn1 ˆ2/ Rl P = ( Vn1 /2) ^2/ Rl ; disp ( ’W’ ,P , ’ The l o a d power i s ’ ) ;
Scilab code Exa 1.8 example 8 1 2 3 4 5 6 7 8
clc ; // p a g e no 24 // p r o b no 1 . 8 // Given : N=0.2W; S+N=5W; : . S =4.8W N =0.2; S =4.8; p =( S + N ) / N ; pdB =10* log10 ( p ) ; disp ( ’ dB ’ ,pdB , ’ The power r a t i o i n dB ’ ) ;
Scilab code Exa 1.9 example 9 1 2 3 4 5 6 7 8 9
clc ; // p a g e no 25 // p r o b no 1 . 9 // Given : S i =100uW; Ni=1uW; So=1uW; No =0.03W Si =100; Ni =1; So =1; No = 0.03 // a l l p o w e r s a r e i n uW r1 = Si / Ni ; // i n p u t SNR r2 = So / No ; // o u t p u t SNR NF = r1 / r2 ; // A m p l i f i e r n o i s e f i g u r e disp ( NF , ’ Te n o i s e f i g u r e i s ’ ) ; 13
Scilab code Exa 1.10 example 10 1 clc ; 2 // p a g e no 25 3 // p r o b no 1 . 1 0 4 // g i i v e n : SNRin=42 dB , NF=6dB 5 // NF i n dB i s g i v e n a s SNRin ( dB )−SNRop ( dB ) 6 SNRin =42 ; NF =6; 7 SNRop = SNRin - NF ; 8 disp ( ’ dB ’ , SNRop , ’SNR a t t h e o u t p u t i s ’ ) ;
Scilab code Exa 1.11 example 11 1 clc ; 2 // p a g e no 27 3 // p r o b no 1 . 1 1 4 // Given NFdB=2dB , : . NF= a n t i l o g (NFdB) / 1 0 = 1 . 5 8 5 5 NF =1.585; 6 Teq =290*( NF -1) ; 7 disp ( ’K ’ ,Teq , ’ The n o i s e t e m p e r a t u r e i s ’ ) ;
Scilab code Exa 1.12 example 12 1 clc ; 2 // p a g e no 29 3 // p r o b no 1 . 1 2 4 // Given : 5 A1 =10; A2 =25; A3 =30; NF1 =2; NF2 =4; NF3 =5; 6 At = A1 * A2 * A3 ;
7 disp ( At , ’ The power g a i n i s ’ ) ; 8 // The n o i s e f i g u r e i s g i v e n a s 9 NFt = NF1 +(( NF2 -1) / A1 ) + (( NF3 -1) /( A1 * A2 ) ) ; 10 disp ( NFt , ’ The n o i s e f i g u r e i s ’ ) ; 11 // N o i s e temp can be f o u n d a s 12 Teq =290*( NFt -1) ; 13 disp ( ’K ’ ,Teq , ’ The n o i s e t e m p e r a t u r e i s ’ ) ;
Scilab code Exa 1.13 example 13 1 clc ; 2 // p a g e no 34 3 // p r o b no1 . 1 3 r e f e r f i g 1 . 2 0 o f p a g e no 34 4 // p a r t A) The s i g n a l f r e q u e n c y i s f 1 =110MHz . 5 f =110; // i n MHz 6 disp ( ’MHz ’ ,f , ’A) The f r e q i s ’ ) ; 7 // The s i g n a l peak i s two d i v i s i o n s b e l o w t h e
8 9 10 11 12 13 14 15 16 17 18
r e f e r e n c e l e v e l o f −10dBm, w i t h 10dB/ d i v i s i o n , s o i t s −30dBm . PdBm = -30; disp ( ’dBm ’ , PdBm , ’ The power i n dBm ’ ) ; // The e q u i v a l e n t power can be f o u n d from P(dBm) =10 l o g P /1 mW //P(mW)= a n t i l o g dBm/10= a n t i l o g −30/10=1∗10ˆ −3mW=1uW // t h e v o l t a g e can be f o u n d from t h e g r a p h but i t i s more a c c u r a t e l y from P=Vˆ2/R P =10^ -6; R =50; disp ( ’W’ ,P , ’ The power i s ’ ) ; V = sqrt ( P * R ) ; disp ( ’ v o l t s ’ ,V , ’ The v o l t a g e i s ’ ) ;
// p a r t B) The s i g n a l i s 1 d i v i s i o n t o t h e l e f t o f c e n t e r , w i t h 100 kHz / d i v . The f r e q i s 100 kHz l e s s t h a n t h e r e f f r e q o f 7 . 5MHz 19 f =7.5 -0.1; // i n MHz 15
22 23 24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39 40 41
disp ( ’MHz ’ ,f , ’B) The f r e q i s ’ ) ; // With r e g a r d s t o t h e a m p l i t u d e , t h e s c a l e i s 1dB/ div & the s i g n a l i s 1 div below the r e f e r e n c e l e v e l . T h e r e f o r e t h e s i g n a l h a s a power l e v e l given as PdBm =10 -1; // i n dBm // T h i s can be c o n v e r t e d t o w a t t s & v o l t s a s same i n part A //P(mW)= a n t i l o g dBm/10= a n t i l o g 9 / 1 0 = 7 . 9 4mW P =7.94*10^ -3; R =50; disp ( ’W’ ,P , ’ The power i s ’ ) ; disp ( ’dBm ’ , PdBm , ’ The power i n dBm ’ ) ; V = sqrt ( P * R ) ; disp ( ’ v o l t s ’ ,V , ’ The v o l t a g e i s ’ ) ; // p a r t C) The s i g n a l i s 3 d i v i s i o n s t o t h e r i g h t o f t h e c e n t e r r e f f r e q o f 543MHz, w i t h 1MHz/ d i v . Therefore the f r e q i s f =543+3*1; // i n MHz disp ( ’MHz ’ ,f , ’C) The f r e q i s ’ ) ; // from t h e s p e c t r u m , s i g n a l l e v e l i s V =22.4*6/8; disp ( ’mV ’ ,V , ’ The v o l t a g e i s ’ ) ; // power i s g i v e n a s P = V ^2/ R ; disp ( ’uW ’ ,P , ’ The power i s ’ ) ; PdBm =10* log10 ( P *10^ -6/10^ -3) ; disp ( ’dBm ’ , PdBm , ’ The power i n dBm ’ ) ;
Chapter 2 Radio Frequency Circuits
Scilab code Exa 2.1 example 1 1 2 3 4 5 6 7 8 9 10 11
clc ; // p a g e no 50 // p r o b no 2 . 1 // R e f e r t h e f i g 2 . 6 o f p a g e 5 0 . L1=25uH ; C1=50pF L1 =25*10^ -6; C1 =50*10^ -12; Q =15; //A) The r e s o n e n t f r e q e n c y i s g i v e n a s fo =(1/(2* %pi * sqrt ( L1 * C1 ) ) ) ; disp ( ’ Hz ’ ,fo , ’ a ) The r e s o n e n t f r e q u e n c y i s ’ ) ; //B) The bandwidth i s g i v e n a s B = fo / Q ; disp ( ’ Hz ’ ,B , ’ The bandwidth i s ’ ) ;
Scilab code Exa 2.2 example 2 1 clc ; 2 // p a g e no 62 3 // p r o b no . 2 . 2 4 // Given : H a r t l e y
o s c i l l a t o r s L=10uH ; C=100pF 17
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
L =10*10^ -6; C =100*10^ -12; N1 =10; N2 =100 // A) The o p e r a t i n g f r e q u e n c y i s fo =1/(2* %pi * sqrt ( L * C ) ) ; disp ( ’ Hz ’ ,fo , ’ 1 ) The o p e r a t i n g f r e q u e n c y i s ’ ) ; // The f e e d b a c k f r a c t i o n i s g i v e n by B = - N1 / N2 ; // O p e r a t i n g g a i n i s g i v e n a s A =1/ B ; disp (A , ’ 2 ) O p e r a t i n g g a i n ’ ) ; disp ( ’ The −ve s i g n d e n o t e s a p h a s e i n v e r s i o n ’ ) ; //B) The o p e r a t i n g f r e q u e n c y i s same a s i n p a r t A) N1 =20; N2 =80; // The f e e d b a c k f r a c t i o n i s g i v e n by B =( N1 + N2 ) / N1 ; // O p e r a t i n g g a i n i s g i v e n a s A =1/ B ; disp (A , ’ 3 ) O p e r a t i n g g a i n ’ ) ;
Scilab code Exa 2.3 example 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc ; // p a g e no 66 // p r o b no 2 . 3 C1 =10*10^ -12; C2 =100*10^ -12; L =1*10^ -6; // The e f f e c t i v e c a p a c i t a n c e i s CT =( C1 * C2 ) /( C1 + C2 ) ; disp ( CT ) ; // The o p e r a t i n g f r e q u e n c y i s f0 =1/(2* %pi * sqrt ( L * CT ) ) ; disp ( ’ Hz ’ ,f0 , ’ 1 ) The o p e r a t i n g f r e q u e n c y i s ’ ) ; // The f e e d b a c k f r a c t i o n i s g i v e n a p p r o x i m a t e l y by B = - C1 / C2 ; disp (B , ’ The f e e d b a c k f r a c t i o n i s ’ ) ; // For t h e common−b a s e c k t , t h e op−f r e q i s same but the feedback f r a c t i o n w i l l b e d i f f e r e n t . 18
15 C1 =100*10^ -12; C2 =10*10^ -12; 16 // I t i s g i v e n by 17 B = C2 /( C1 + C2 ) ; 18 disp (B , ’ The f e e d b a c k f r a c t i o n
Scilab code Exa 2.4 example 4 1 2 3 4 5 6 7 8 9 10 11 12
clc ; // p a g e no 68 // p r o b no 2 . 4 // R e f e r f i g 2 . 2 2 c1 =1000; c2 =100; c3 =10; // a l l v a l u e s a r e i n p f // 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 Ct =1/((1/ c1 ) +(1/ c2 ) +(1/ c3 ) ) ; disp ( ’ pF ’ ,Ct , ’ The e f f e c t i v e t o t a l c a p a c i t a n c e i s ’ ) ; CT = Ct *10^ -12; L =10^ -6; // The o p e r a t i n g f r e q i s f0 =1/(2* %pi * sqrt ( L * CT ) ) ; disp ( ’ Hz ’ ,f0 , ’ The o p e r a t i n g f r e q i s ’ ) ;
Scilab code Exa 2.5 example 5 1 clc ; 2 // p a g e no 70 3 // p r o b no 2 . 5 4 C =80*10^ -12; L = 100*10^ -6; 5 // P a r t a ) The r e s o n e n t f r e q u e n c y i s 6 f0 =1/(2* %pi * sqrt ( L * C ) ) ; 7 disp ( ’ Hz ’ ,f0 , ’ The r e s o n e n t f r e q i s ’ ) ; 8 // P a r t b ) I n t h i s p a r t t h e c i r c u i t i s
r e s o n a t e on doubling the frequency , t h e r e f o r e 9 f1 =2* f0 ; 10 // from t h e e q u a t i o n o f r e s o n e n t f r e q u e n c y 19
11 C1 =1/(4*( %pi * f1 ) ^2* L ) ; 12 // Now f o r t u n i n g v o l t a g e 13 14 15 16
we have t o u s e e q u a t i o n C1=Co/ s q r t (1+2V) Co = C ; // a f t e r s o l v i n g t h e e x p r e s s i o n v =(( Co / C1 ) ^2 -1) /2; disp ( ’V ’ ,v , ’ The t u n i n g v o l t a g e i s ’ ) ;
Scilab code Exa 2.7 example 6 1 clc ; 2 // p a g e no 76 3 // p r o b l e m 2 . 7 4 // a l l f r e q u e n c i e s a r e i n MHz 5 f1 =11; f2 =10; 6 // o u t p u t f r e q u e n c i e s a t t h e o u t p u t o f s q u a r e −law
mixer 7 a = f1 + f2 ; 8 b = f1 - f2 ; 9 disp ( ’MHz ’ ,b , ’MHz ’ ,a , ’ The o u t p u t f r e q u e n c i e s a t t h e o u t p u t o f s q u a r e −law m i x e r a r e : ’ ) ;
Scilab code Exa 2.8 example 7 1 clc ; 2 // p a g e no 85 3 // p r o b l e m no . 2 . 8 4 // a l l t h e f r e q u e n c i e s 5 freq_free_run =12; 6 freq_lock1 =10; 7 freq_lock2 =16;
// c a p t u r e r a n g e i s a p p r o x i m a t e l y t w i c e t h e d i f f e r e n c e b e t w e e n t h e f r e e −r u n n i n g f r e q and t h e f r e q a t which l o c k i s f i r s t a c h i e v e d capture_range =2*( freq_free_run - freq_lock1 ) ; disp ( ’MHz ’ , capture_range , ’ The c a p t u r e r a n g e i s ’ ) ; // l o c k r a n g e i s a p p r o x i m a t e l y t w i c e t h e t h e d i f f e r e n c e b e t w e e n t h e f r e q where l o c k i s l o s t and f r e e −r u n n i n g f r e q lock_range = 2*( freq_lock2 - freq_free_run ) ; disp ( ’MHz ’ , lock_range , ’ The l o c k r a n g e i s ’ ) ; // The PLL f r e q r e s p o n s e i d a p p r o x i m a t e s y m m e t r i c a l . T h i s means t h e f r e e −r u n n i n g f r e q i s i n t h e c e n t e r o f t h e l o c k r a n g e and c a p t u r e r a n g e . T h e r e f o r e freq_lock_acquired = freq_free_run + ( capture_range /2) ; freq_lock_lost = freq_free_run - capture_range disp ( ’MHz ’ , freq_lock_acquired , ’ The f r e q a t which t h e l o c k i s a c q u i r e d , moving downward i n f r e q i s ’ ) ; disp ( ’MHz ’ , freq_lock_lost , ’ Lock w i l l be l o s t on t h e way down a t ’ ) ;
Scilab code Exa 2.9 example 8 1 clc ; 2 // p a g e no 86 3 // p r o b no 2 . 9 4 // r e f e r f i g 2 . 3 8 5 // Here we a r e u s i n g a 10MHz c r y s t a l , 6 7 8 9
i t w i l l be n e c e s s a r t o d e v i d e i t by a f a c t o r t o g e t 10 kHz f_osc = 10*10^6; f_ref =10*10^3; f0_1 =540*10^3; f0_2 =1700*10^3; Q = f_osc / f_ref ; // we have t o s p e c i f y t h e r a n g e o f v a l u e s o f N . Find N a t e a c h and o f t h e t u n i n g r a n g e N1 = f0_1 / f_ref ; 21
10 N2 = f0_2 / f_ref ; 11 disp ( N2 , ’ The v a l u e s
o f N a t h i g h end i s ’ ,N1 , ’ The v a l u e s o f N a t low end i s ’ ) ;
Scilab code Exa 2.10 example 9 1 clc ; 2 // p a g e no 89 3 // p r o b no 2 . 1 0 4 // r e f e r f i g 2 . 4 0 5 P =10; f_ref =10*10^3; M =10; 6 // c o n s i d e r 7 N =1; 8 // With a f i x e d −modulus p r e s c a l a r , 9 10
11 12 13 14 15 16 17
t h e min f r e q s t e p
is step_size = M * f_ref ; // With t h e two−modulus system , l e t t h e main d i v i d e r modulus N r e m a i n c o n s t a n t & i n c r e a s e t h e modulus m t o (m+1) t o f i n d how much t h e f r e q c h a n g e s . // f o r 1 s t c a s e , o /p f r e q fo =( M + N * P ) * f_ref ; // f o r 2 nd c a s e where l e a v e N a l o n e but c h a n g e s M t o M+1 , new o / p f r e q fo_ =( M +1+ N * P ) * f_ref ; // The d i f f e r e n c e i s f = fo_ - fo ; disp ( ’ Hz ’ ,f , ’ The s t e p s i z e t h a t would have b e e n o b t a i n e d without p r e s c a l i n g ’ );
Scilab code Exa 2.11 example 10 1 clc ; 2 // p a g e no 91
3 // p r o b no 2 . 1 1 4 // r e f e r f i g 2 . 4 2 5 f_ref = 20*10^3; 6 f_osc = 10*10^6; 7 N1 =10; N2 =100; 8 f0 =( N1 * f_ref ) + f_osc ; 9 f1 =( N2 * f_ref ) + f_osc ; 10 disp ( ’ Hz ’ ,f1 , ’ Hz ’ ,f0 , ’ The o u t p u t f r e q u e n c i e s 11 step_size =( f1 - f0 ) /( N2 - N1 ) ; 12 disp ( ’ Hz ’ , step_size , ’ The s t e p s i z e i s ’ ) ;
Chapter 3 The Amplitude Modulation
Scilab code Exa 3.1 example 1 1 clc ; 2 // p a g e no 105 3 // p r o b no 3 . 1 4 Erms_car =2; f_car =1.5*10^6; f_mod =500; Erms_mod =1; // 5 6 7 8 9
given // E q u a t i o n r e q u i r e s peak v o l t a g e s & r a d i a n frequencies Ec = sqrt (2) * Erms_car ; Em = sqrt (2) * Erms_mod ; wc =2* %pi * f_car ; wm =2* %pi * f_mod ; t =1; // T h e r e f o r e t h e e q u a t i o n i s disp ( ’ v ( t ) = ( 2 . 8 3 + 1 . 4 1 ∗ s i n ( 3 . 1 4 ∗ 1 0 ˆ 3 ∗ t ) ) ∗ s i n ( 9 . 4 2 ∗ 1 0 ˆ 6 ∗ t ) V ’ );
Scilab code Exa 3.2 example 2 1 clc ; 2 // p a g e no 106 3 // p r o b no 3 . 2
// To a v o i d t h e round− o f f e r r o r s we s h o u l d u s e t h e original voltage values Em =1; Ec =2; m = Em / Ec ; disp (m , ’m= ’ ) ; disp ( ’ v ( t ) = 2 . 8 3 ( 1 + 0 . 5 ∗ s i n ( 3 . 1 4 ∗ 1 0 ˆ 3 ∗ t ) ) ∗ s i n ( 9 . 4 2 ∗ 1 0 ˆ 6 ∗ t ) V ’ , ’ The e q u a t i o n can be o b t a i n e d a s ’ );
Scilab code Exa 3.3 example 3 1 2 3 4 5 6 7 8 9
clc ; // p a g e no 109 // p r o b no 3 . 3 E_car =10; E_m1 =1; E_m2 =2; E_m3 =3; m1 = E_m1 / E_car ; m2 = E_m2 / E_car ; m3 = E_m3 / E_car ; mT = sqrt ( m1 ^2+ m2 ^2+ m3 ^2) ; disp ( mT , ’ The m o d u l a t i o n i n d e x i s ’ ) ;
Scilab code Exa 3.4 example 4 1 clc ; 2 // p a g e no 110 3 // p r o b no 3 . 4 4 // r e f e r f i g 3 . 2 5 E_max =150; E_min =70; // v o l t a g e s a r e i n mV 6 m =( E_max - E_min ) /( E_max + E_min ) ; 7 disp (m , ’ The m o d u l a t i o n i n d e x i s ’ ) ;
Scilab code Exa 3.6 example 5 1 clc ; 2 // p a g e no 114 3 // p r o b no 3 . 6 4 B =10*10^3; 5 // maximum m o d u l a t i o n f r e q i s g i v e n a s 6 fm = B /2; 7 disp ( ’ Hz ’ ,fm , ’ The maximum m o d u l a t i o n f r e q
Scilab code Exa 3.7 example 6 1 clc ; 2 // p a g e no 116 3 // p r o b no 3 . 7 4 // AM b r o a d c a s t t r a n s m i t t e r 5 Pc =50; m =0.8; // power i s i n kW 6 Pt = Pc *(1+ m ^2 /2) ; 7 disp ( ’kW ’ ,Pt , ’ The t o t a l power i s ’ ) ;
Scilab code Exa 3.8 example 7 1 clc ; 2 // p a g e no 328 3 // p r o b no 8 . 6 4 // 2 kHz t o n e i s 5 6 7 8
p r e s e n t on c h a n n e l 5 o f g r o u p 3 o f
supergroup // s i g n a l i s l o w e r s i d e d s o fc_channel_5 =92*10^3; fg = fc_channel_5 - (2*10^3) ; // 2MHz b a s e b a n d s i g n a l // we know g r o u p 3 i n t h e s u p e r g r o u p i s moved t o t h e r a n g e 408 −456 kHz w i t h a s u p p r e s s e d c a r r i e r f r e q u e n c y o f 516 kHz 26
9 f_s_carr =516*10^3; 10 fsg = f_s_carr - fg ; 11 disp ( fsg ) ;
Scilab code Exa 3.9 example 8 1 clc ; 2 // p a g e no 122 3 // p r o b no . 3 . 9 4 // r e f e r f i g 3 . 1 4 5 // from s p e c t r u m we can s e e t h a t e a c h o f t h e two
6 7 8 9 10 11 12 13
s i d e b a n d s i s 20dB b e l o w t h e r e f l e v e l o f 10dBm . T h e r e f o r e e a c h s i d e b a n d h a s a power o f −10dBm i . e . 100uW. power_of_each_sideband = 100; Total_power = 2* power_of_each_sideband ; disp ( ’uW ’ , Total_power , ’ The t o t a l power i s ’ ) ; div =4; freq_per_div =1; sideband_separation = div * freq_per_div ; f_mod = sideband_separation /2; disp ( ’ kHz ’ , f_mod , ’ The m o d u l a t i n g f r e q i s ’ ) ; // Even i f t h i s s i g a n l h a s no c a r r i e r , i t s t i l l h a s a c a r r i e r f r e q which i s midway b e t w e e n t h e two sidebands . Therefore carrier_freq = 10; disp ( ’MHz ’ , carrier_freq , ’ The c a r r i e r f r e q ’ ) ;
Scilab code Exa 3.10 example 9 1 clc ; 2 // p a g e no 126 3 // p r o b no 3 . 1 0 4 f_car =8*10^6; f_mod1 =2*10^3; f_mod2 =3.5*10^3;
// S i g n a l i s LSB h e n c e o / p f r e q i s o b t a i n e d by s u b t r a c t i n g f mod from f c a r f_out1 = f_car - f_mod1 ; disp ( ’MHz ’ , f_out1 /(10^6) , ’ The o /p f r e q f o u t 1 i s f_out2 = f_car - f_mod2 ; disp ( ’MHz ’ , f_out2 /(10^6) , ’ The o /p f r e q f o u t 1 i s
Scilab code Exa 3.11 example 10 1 clc ; 2 // p a g e no 3 // p r o b no 4 // R e f e r i n g 5 // From f i g 6 7 8 9 10 11
127 3.11 the f i g . 3.17 i t i s c l e a r t h a t t h e e waveform i s made from two s i n e waves Vp =12.5; // S i n c e Vp−p i s 25V from f i g h e n c e i n d i v i d u a l Vp i s h a l f o f Vp−p Rl =50; // Load r e s i s t a n c e i s 50 ohm // D e t e r m i n a t i o n o f a v e r a g e power Vrms = Vp / sqrt (2) ; P =(( Vrms ) ^2) / Rl ; disp ( ’W’ ,P , ’ The v a l u e o f a v e r a g e power o f s i g n a l i s ’ );
Chapter 4 Angle Modulation
Scilab code Exa 4.1 example 1 1 clc ; 2 // p a g e no 139 3 // p r o b no . 4 . 1 4 //An FM m o d u l a t o r 5 6 7 8 9 10 11 12 13
i s g i v e n w i t h k f =30kHz /V o p e r a t e a t c a r r i e r f r e q 175MHz fc =175*10^6; kf =30*10^3; // a ) D e t e r m i n a t i o n o f o / p f r e q f o r m o d u l a t i n g s i g n a l v a l u e em1=150mV em1 =150*10^ -3; fsig1 = fc +( kf * em1 ) ; disp ( ’MHz ’ , fsig1 /(10^6) , ’ a ) The v a l u e o f o / p f r e q i s ’ ); // b ) D e t e r m i n a t i o n o f o /p f r e q f o r m o d u l a t i n g s i g n a l v a l u e em2=−2V em2 = -2; fsig2 = fc +( kf * em2 ) ; disp ( ’MHz ’ , fsig2 /(10^6) , ’ b ) The v a l u e o f o / p f r e q i s ’ );
Scilab code Exa 4.2 example 2 1 clc ; 2 // p a g e no 140 3 // p r o b no . 4 . 2 4 //An FM m o d u l a t o r
i s g i v e n which i s m o d u l a t e d by
s i n e wave 3V 5 v =3; 6 kf =30*10^3; 7 // D e t e r m i n a t i o n o f peak v a l u e 8 Em = v * sqrt (2) ; 9 // D e t e r m i n a t i o n o f d e v i a t i o n d e l t a 10 delta = kf * Em ; 11 disp ( ’ kHz ’ , delta /1000 , ’ The v a l u e o f
Scilab code Exa 4.3 example 3 1 clc ; 2 // p a g e no 140 3 // p r o b no . 4 . 3 4 //An FM b r o a d c a s t e r 5 6 7 8 9 10 11 12 13
t r a n s m i t t e r o p e r a t e a t max d e v i a t n o f 75 kHz delta =75*10^3; // a ) D e t e r m i n a t i o n o f m o d u l a t i o n i n d e x w i t h m o d u l a t i n g f r e q o f s i g n a l =15kHz fm1 =15*10^3; mf1 = delta / fm1 ; disp ( mf1 , ’ a ) The v a l u e o f m o d u l a t i o n i n d e x f o r fm=15 kHz i s ’ ) ; // b ) D e t e r m i n a t i o n o f m o d u l a t i o n i n d e x w i t h m o d u l a t i n g f r e q o f s i g n a l =50Hz fm2 =50; mf2 = delta / fm2 ; disp ( mf2 , ’ b ) The v a l u e o f m o d u l a t i o n i n d e x f o r fm=50 Hz i s ’ ) ; 30
Scilab code Exa 4.4 example 4 1 clc ; 2 // p a g e no 141 3 // p r o b no . 4 . 4 4 //A p h a s e m o d u l a t o r i s g i v e n w i t h kp=2 r a d /V 5 kp =2; 6 // Peak p h a s e d e v i a t i o n o f 60 d e g r e e 7 // C o n v e r t i n g d e g r e e i n r a d i a n 8 phi =(2* %pi *60) /360; 9 // D e t e r m i n a t i o n o f peak v o l t a g e t h a t c a u s e t h a t
deviation 10 Vp = phi / kp ; 11 // D e t e r m i n a t i o n o f rms v o l t a g e 12 Vrms = Vp /( sqrt (2) ) ; 13 disp ( ’V ’ , Vrms , ’ The rms v o l t a g e t h a t c a u s e d e v i a t i o n
Scilab code Exa 4.6 example 5 1 clc ; 2 // p a g e no 145 3 // p r o b no . 4 . 6 4 // Phase m o d u l a t o r w i t h 5 6 7 8 9
s e n s i t i v i t y kp=3 r a d /V & s i n e wave i / p 2 V peak a t 1 kHz kp =3; Vp =2; f =1*10^3; // As max v a l u e o f s i n e f u n c t n i s 1 , h e n c e max v a l u e o f p h i i s kp ∗Vp phi_max = kp * Vp ; // phi max i s n o t h i n g but mp mp = phi_max ; 31
// v a l u e o f mf i s same a s mp i f s i g n a l i s c o n s i d e r e d as f r e q modulation 11 // D e t e r m i n a t i o n o f f r e q d e v i a t i o n 12 dev = mp * f ; 13 disp ( ’ kHz ’ , dev /1000 , ’ The f r e q d e v i a t i o n p r o d u c e i s ’ ) ; 10
Scilab code Exa 4.7 example 6 1 clc ; 2 // p a g e no 149 3 // p r o b no . 4 . 7 4 //An FM s i g n a l h a s d e v i a t i o n 3 kHz & m o d u l a t i n g f r e q
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 kHz w i t h t o t a l power Pt=5W d e v e l o p e d a c r o s s 50 ohm w i t h f c =160 MHz dev =3*10^3; fm =10^3; Pt =5; Rl =50; fc =160*10^6; // a ) D e t e r m i n a t i o n o f RMS s i g n a l v o l t a g e Vt = sqrt ( Pt * Rl ) ; disp ( ’V ’ ,Vt , ’ a ) The rms s i g n a l v o l t a g e i s ’ ) ; // / / / / / / / / / / / b ) D e t e r m i n a t i o n o f rms v o l t a g e a t carrier freq // f o r t h a t m o d u l a t i o n i n d e x n e e d s t o be f o u n d o u t mf = dev / fm ; // From b e s s e l f u n c t i o n t a b l e , t h e c o e f f f o r t h e c a r r i e r f i r s t 3 s i d e bands J =[0.26 ,0.34 ,0.49 ,0.31]; disp ( ’ b ) The rms v o l t a g e o f s i d e bands a r e ’ ) for i =1:4 , V ( i ) = J ( i ) * Vt ; end ; disp ( ’V ’ ,V (4) , ’ V3= ’ , ’V ’ ,V (3) , ’ V2= ’ , ’V ’ ,V (2) , ’ V1= ’ , ’V ’ ,V (1) , ’ Vc= ’ ) ; // / / / / / / / / / c ) D e t e r m i n a t i o n o f f r e q o f e a c h s i d e bands / / / / / / / / / / / / / / / / disp ( ’ c ) The 3 s i d e bands a t d i f f e r e n t f r e q . a r e ’ ) 32
21 for j =1:3 , 22 f_usb ( j ) = fc /10^6+( fm * j /10^6) ; 23 end 24 disp ( ’MHz ’ , f_usb (3) , ’ f u s b 3= ’ , ’MHz ’ , f_usb (2) , ’ f u s b 2
= ’ , ’MHz ’ , f_usb (1) , ’ f u s b 1= ’ ) ; 25 26 for j =1:3 , 27 f_lsb ( j ) = fc /10^6 -( fm * j /10^6) ; 28 end 29 disp ( ’MHz ’ , f_lsb (3) , ’ f l s b 3 = ’ , ’MHz ’ , f_lsb (2) , ’ f l s b 2 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
= ’ , ’MHz ’ , f_lsb (1) , ’ f l s b 1 = ’ ) ; // / / / / / / / / / / d ) D e t e r m i n a t i o n o f power o f e a c h s i d e band / / / / / / / / / / / / / / / / / for i =1:4 , P ( i ) =(( V ( i ) ) ^2) / Rl ; a ( i ) =( P ( i ) ) /(10^ -3) ; end ; disp ( ’ d ) The power o f e a c h s i d e band i s ’ ) ; disp ( ’W’ ,P (4) , ’ P3= ’ , ’W’ ,P (3) , ’ P2= ’ , ’W’ ,P (2) , ’ P1= ’ , ’W ’ ,P (1) , ’ Pc= ’ ,) ; // / / / / / / / / e ) D e t e r m i n a t i o n o f power t h a t i s u n c o u n t e d P = P (1) +2*( P (2) + P (3) + P (4) ) ; // As t o t a l power i s 5 W P_x = Pt - P ; // P e r c e n t a g e o f t o t a l power u n c o u n t e d Px =( P_x / P ) *100; disp ( ’% ’ ,Px , ’ e ) P e r c e n t a g e t o t a l power which i s uncounted i s ’ ); // / / / / / / / / f ) P l o t i n g t h e s i g n a l i n f r e q domain ///////////////////// // C o n v e r t i n g power i n dBm for i =1:4 , // a ( k ) =(P( k ) ) /(10ˆ −3) ; P_dBm ( i ) =10* log10 ( a ( i ) ) ; end ; disp ( ’ f ) Power o f e a c h s i d e bands i n dBm i s ’ ) disp ( ’dBm ’ , P_dBm (4) , ’ P3 (dBm)= ’ , ’dBm ’ , P_dBm (3) , ’ P2 ( dBm)= ’ , ’dBm ’ , P_dBm (2) , ’ P1 (dBm)= ’ , ’dBm ’ , P_dBm (1) , ’ 33
Pc (dBm) ’ ,) ; 52 x =[159.997:0.001:160.003]; 53 y =[26.8 ,30.8 ,27.6 ,25.3 ,27.6 ,30.8 ,26.8]; 54 plot (x , y ) ;
Scilab code Exa 4.9 example 7 1 clc ; 2 // p a g e no 157 3 // p r o b no . 4 . 9 4 //An FM s i g n a l h a s f r e q 5 6 7 8 9 10 11 12 13 14 15 16
d e v i a t i o n o f 5 kHz m o d u l a t i n g f r e q fm=1kHz w i t h SNR a t i / p i s 20 dB // C o n v e r t i n g dB i n v o l t a g e r a t i o fm =1*10^3; dev_s =5*10^3; snr =20; Es_En =10^( snr /20) ; // S i n c e Es>>En t h e n phi =1/( Es_En ) ; m_fn = phi ; // m o d u l a t i o n i n d e x e q u a l t o p h i n dev_n =( m_fn ) * fm ; // E q u i v a l e n t f r e q d e v i a t i o n due t o noise //SNR a s a v o l t a g e r a t i o i s g i v e n a s SNR =( dev_s ) /( dev_n ) ; // C o n v e r t i n g t h i s v o l t a g e r a t i o n i n dB SNR_dB =20*( log10 ( SNR ) ) ; disp ( ’ dB ’ , SNR_dB , ’ The SNR a t d e t e c t t o r o /p i s ’ ) ;
Scilab code Exa 4.10 example 10 1 clc ; 2 // p a g e no 163 3 // p r o b no . 4 . 1 0 4 // R e f e r t h e f i g .
6 7 8 9 10 11 12 13 14 15 16
// We know t h i s t r a n s m i t t e r i s d e s i g n e d f o r v o i c e f r e q u e n c i e s , s o we have t o u s e t r i a l and e r r o r method t o p r o d u c e a c a r r i e r n u l l f o r a d e v i a t i o n o f 5 kHz mf =2.4; // s t a r t i n g w i t h t h e f i r s t n u l l f o r mf =2.4 dev =5; // i n kHz fm = dev / mf ; if (0.3 = fm ) then disp ( ’ kHz ’ ,fm , ’ The f r e q i s w i d i n t h e a c c e p t a b l e range ’ ); else mf =5.5; fm = dev / mf ; disp ( ’ kHz ’ ,fm , ’ The f r e q i s w i d i n t h e a c c e p t a b l e range ’ ); end // f o r t h i s c a l c u l a t e d fm , s e t t h e f u n c t i o n g e n e r a t o r t o t h e v a l u e o f fm s o t h a t t h e d e v i a t i o n i s 5 kHz
Chapter 5 Transmitters
Scilab code Exa 5.2 example 1 1 clc ; 2 // p a g e no 179 3 // p r o b no . 5 . 2 4 //A t r a n s m i t t e r 5 6 7 8 9 10 11
w i t h c a r r i e r power o / p 10W a t e f f i c i e n c y 70% a t 100% modulatn Po =10; eta =0.7; // D e t e r m i n a t i o n o f dc power o / p Ps = Po / eta ; disp ( ’W’ ,Ps , ’ The v a l u e o f dc power i n p u t i s ’ ) ; // D e t e r m i n a t i o n o f a u d i o power Pa =0.5* Ps ; disp ( ’W’ ,Pa , ’ The v a l u e o f a u d i o power i s ’ ) ;
Scilab code Exa 5.3 example 2 1 clc ; 2 // p a g e no 181 3 // p r o b no . 5 . 3
5 6 7 8 9 10 11
//A t r a n s m i t t e r o p e r a t e s a t 12V, w i t h c o l l e c t o r c u r r e n t 2A . Modulatn t r a n s f o r m e r h a s t u r n r a t i o 4:1 // D e t e r m i n a t i o n o f i m p e d a n c e a t t r a n s f o r m e r secondary Vcc =12; Ic =2; N1 =4; N2 =1; Za = Vcc / Ic ; disp ( ’ ohm ’ ,Za , ’ The i m p e d a n c e o f t r a n s f o r m e r s ec on d ar y i s ’ ); // D e t e r m i n a t i o n o f i m p e d a n c e o f t r a n s f o r m e r p r i m a r y Zp = Za *( N1 / N2 ) ^2; disp ( ’ ohm ’ ,Zp , ’ The i m p e d a n c e o f t r a n s f o r m e r p r i m a r y i s ’ );
Scilab code Exa 5.4 example 3 1 clc ; 2 // p a g e no 182 3 // p r o b no . 5 . 4 4 // C l a s s C a m p l i f i e r w i t h 5 6 7 8 9 10 11 12 13 14
c a r r i e r o / p power o f 100W w i t h e f f i c i e n c y o f 70% & w i t h 100% m o d u l a t i o n Pc =100; eta =0.7; // D e t e r m i n a t i o n o f o / p power Po =1.5* Pc ; disp ( ’W’ ,Po , ’ The o /p power w i t h 100% m o d u l a t i o n i s ’ ) ; // D e t e r m i n a t i o n o f s u p p l y power Ps = Po / eta ; disp ( ’W’ ,Ps , ’ The v a l u e o f s u p p l y power i s ’ ) ; // D e t e r m i n a t i o n o f power d i s s i p a t e d Pd Pd = Ps - Po ; disp ( ’W’ ,Pd , ’ Power d i s s i p a t e d i s ’ ) ;
Scilab code Exa 5.5 example 4 1 clc ; 2 // p a g e no 184 3 // p r o b no . 5 . 5 4 //An FM t r a n s m i t t e r p r o d u c e 10W o f
c a r r i e r power
o p e r a t i n g a t 15V 5 Vcc =15; Pc =10; 6 // D e t e r m i n a t i o n o f l o a d i m p e d a n c e
s e e n from collector 7 Rl =(( Vcc ) ^2) /(2* Pc ) ; 8 disp ( ’ ohm ’ ,Rl , ’ The l o a d i m p e d a n c e i s ’ ) ;
Scilab code Exa 5.6 example 5 1 2 3 4 5 6 7 8 9
clc ; // p a g e no 193 // p r o b no . 5 . 6 // R e f e r f i g . 5 . 1 3 // F i l t e r method SSB g e n e r a t o r fc =5*10^6; // f i l t e r c e n t r e f r e q . BW =3*10^3; // F i l t e r bandwidth foc =4.9985*10^6; // c a r r i e r o s c i l l a t o r f r e q . disp ( ’ a ) The USB w i l l be p a s s e d ’ ) ; // S i n c e c a r r i e r f r e q i s a t low end o f p a s s b a n d 10 disp ( ’ b ) The c a r r i e r f r e q s h o u l d be moved t o t h e h i g h end o f f i l t e r a t 5 . 0 0 1 5MHz ’ ) ; //To g e n e r a t e t h e LSB
Scilab code Exa 5.7 example 6 1 clc ; 2 // p a g e no 196
// p r o b no . 5 . 7 // SSB t r a n s m i t t e r r e f e r i n g f i g . 5 . 1 7 t o t r a n s m i t USB s i g n a l a t c a r r i e r f r e q 2 1 . 5MHz fo =21.5; // c a r r i e r f r e q i n MHz foc =8.9985; // c a r r i e r o s c i l l a t o r f r e q . i n MHz // D e t e r m i n a t i o n o f f r e q o f l o c a l o s c i l l a t o r flo = fo - foc ; disp ( ’MHz ’ ,flo , ’ The f r e q o f l o c a l o s c i l l a t o r ’ ) ;
Scilab code Exa 5.8 example 7 1 clc ; 2 // p a g e no 199 3 // p r o b no . 5 . 8 4 //LSB t r a n s m i t t e r
r e f e r i n g f i g . 5 . 1 4 w i t h new c a r r i e r f r e q 9 . 0 0 1 5 MHz & l o c a l o s c i l l a t o r f r e q 1 2 . 5 0 1 5 MHz fco =9.0015; // c a r r i e r o s c i l l a t o r f r e q flo =12.5015; // l o c a l o s c i l l a t o r f r e q // D e t e r m i n a t i o n o f new o / p f r e q fo = fco + flo ; disp ( ’MHz ’ ,fo , ’ The o /p c a r r i e r f r e q ’ ) ;
Scilab code Exa 5.9 example 8 1 clc ; 2 // p a g e no 204 3 // p r o b no . 5 . 9 4 //A d i r e c t FM t r a n s m i t t e r w i t h k f =2kHz /V & max
d e v i a t n o f 300 Hz . 5 kf =2*10^3; tx_dev =300; 6 disp ( ’ a ) S e e f i g . 5 . 2 3 f o r
t h i s b l o c k diagram ’ ); 39
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
f_mul =3*2*3; // 3 s t a g e f r e q m u l t i p l i e r w i t h t r i p l e r d o u b l e r and t r i p l e r // b ) D e t e r m i n a t i o n o f max dev a t o s c i l l a t o r dev_o =5*10^3; // D e v i a t i o n a t o /p dev_osc = dev_o / f_mul ; if dev_osc = m+n +1; 6 for n =1:1:10 // we c h o o s e r a n g e o f 1 t o 10 7 a = m + n +1; 53
8 b =2^ n ; 9 if (b >= a ) 10 disp (n , ’ hammming b i t s 11 break ; 12 end 13 end
Chapter 12 Digital Modulation and Modems
Scilab code Exa 12.1 example 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc ; // p a g e no 407 // p r o b no 12 1 //A r a d i o c h a n n e l w i t h BW=10KHz and SNR=15 dB B =10*10^3; snr =15; // c o n v e r t i n g dB i n power r a t i o SNR =10^( snr /10) ; // a ) D e t e r m i n a t i o n o f t h e o r e t i c a l max d a t a r a t e C1 = B * log2 (1+ SNR ) ; disp ( ’ kb / s ’ , C1 /1000 , ’ a ) The t h e o r e t i c a l max d a t a r a t e i s ’ ); // b ) D e t e r m i n a t i o n o f d a t a r a t e w i t h 4 s t a t e s i . e M=4 M =4; C2 =2* B * log2 ( M ) ; disp ( ’ kb / s ’ , C2 /1000 , ’ b ) The d a t a r a t e f o r 4 s t a t e s i s ’ );
Scilab code Exa 12.2 example 2 1 clc ; 2 // p a g e no 408 3 // p r o b no 12 2 4 //A m o d u l a t o r t r a n s m i t symbol w i t h symbol r a t e =10k /
s e c w i t h 64 s t a t e s 5 M =64; 6 S =10000; 7 // Baud r a t e i s s i m p l y symbol r a t e 8 disp ( ’ kbaud ’ ,S /1000 , ’ The baud r a t e i s ’ ) ; 9 // D e t e r m i n a t i o n o f b i t r a t e 10 C = S * log2 (64) ; 11 disp ( ’ kb / s ’ ,C /1000 , ’ The b i t r a t e i s ’ ) ;
Scilab code Exa 12.3 example 3 1 2 3 4 5 6 7 8 9 10 11
clc ; // p a g e no 411 // p r o b no 12 3 f =200*10^3; fb =270.833 *10^3; data_rate =270.833 *10^3 fc =880*10^6; bandwidth =200*10^3; freq_shift =0.5* fb ; disp ( ’ Hz ’ , freq_shift , ’ a ) The f r e q u e n c y s h i f t i s ’ ) ; // The s h i f t e a c h way from t h e c a r r i e r f r e q u e n c y i s h a l f the f r e q s h i f t 12 f_max = fc +0.25* fb ; 13 disp ( ’ Hz ’ , f_max , ’ b ) The maximum f r e q u e n c y i s ’ ) ; 14 f_min = fc -0.25* fb ; 56
disp ( ’ Hz ’ , f_min , ’ The minimum f r e q u e n c y i s ’ ) ; bandwidth_efficiency = data_rate / bandwidth ; disp ( ’ b / s /Hz ’ , bandwidth_efficiency , ’ The bandwidth e f f i c i e n c y i n b / s /Hz i s ’ ) ;
Scilab code Exa 12.4 example 4 1 clc ; 2 // p a g e no 412 3 // p r o b no 12 4 4 baud_rate =24.3; // i n k i l o b a u d 5 // I n t h i s p r o b l e m d i b i t s y s t e m i s u s e d . 6 // T h e r e f o r e s y m b o l r a t e=b a u d r a t e =0.5∗ b i t r a t e 7 bit_rate =2* baud_rate ; 8 disp ( ’ kb / s ’ , bit_rate , ’ The c h a n n e l d a t a r a t e i s ’ ) ;
Scilab code Exa 12.5 example 5 1 clc ; 2 // p a g e no 413 3 // p r o b no 12 5 4 no_of_phase_angles =16; 5 no_of_amplitudes =4; 6 no_of_states_per_symbol = no_of_phase_angles * 7 8
no_of_amplitudes ; bit_per_symbol = log2 ( no_of_states_per_symbol ) ; disp ( bit_per_symbol , ’ The no . o f b i t s p e r symbol i s ’ ) ;
Scilab code Exa 12.6 example 6 57
1 clc ; 2 // p a g e no 415 3 // p r o b no 12 6 4 B =3*10^3; SNR_dB =30; 5 SNR_power =10^(30/10) ; 6 C = B * log2 (1+ SNR_power ) ; 7 disp ( ’ b / s ’ ,C , ’ Shannon l i m i t ’ ) ;
Chapter 13 Multiplexing and Multiple Access Techniques
Scilab code Exa 13.1 example 1 1 clc ; 2 // p a g e no 437 3 // p r o b no 13 1 4 freq_band =1*10^6; 5 // A) For SSBSC AM, 6 7 8 9 10 11 12 13 14 15 16
t h e bandwidth i s t h e same a s t h e maximunm m o d u l a t i n g f r e q . fmax =4*10^3; B = fmax ; no_of_signal = freq_band / B ; disp ( no_of_signal , ’ a ) The number o f s i g n a l s a r e ’ ) ; // B) For DSB AM, t h e bandwidth i s t w i c e t h e maximunm modulating f r e q . B =2* fmax ; no_of_signal = freq_band / B ; disp ( no_of_signal , ’ b ) The number o f s i g n a l s a r e ’ ) ; // C) U s i n g Carson ’ s Rule t o a p p r o x i m a t e t h e bandwidth f_max =15*10^3; deviation =75*10^3; B =2*( deviation + f_max ) ; 59
17 18 19 20 21 22 23
no_of_signal = freq_band / B ; disp ( no_of_signal , ’ c ) The number o f s i g n a l s a r e ’ ) ; // D) Use Shannon−H a r t l e y t h e o r e m t o f i n d t h e bandwidth C =56*10^3; M =4; // f o r QPSK B = C /(2* log2 ( M ) ) ; no_of_signal = freq_band / B ; disp ( no_of_signal , ’ d ) The number o f s i g n a l s a r e ’ ) ;
Scilab code Exa 13.2 example 2 1 clc ; 2 // p a g e no 444 3 // p r o b no 13 2 4 // V o i c e t r a n s m i s s s i o n 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
o c c u p i e s 30 kHz . S p r e a d s p e c t r u m i s u s e d t o i n c r e a s e BW t o 10MHz B1 =30*10^3; //BW i s 30 kHz B2 =10*10^6; //BW i s 10 MHz T =300; // n o i s e temp a t i /p PN = -110; // s i g n a l h a s t o t a l s i g n a l power o f −110 dBm at r e c e i v e r k =1.38*10^ -23; // Boltzmann ’ s c o n s t i n J /K // D e t e r m i n a t i o n o f n o i s e power a t B1=30kHz PN1 =10*( log10 ( k * B1 * T /10^ -3) ) ; disp ( ’dBm ’ ,PN1 , ’ The n o i s e power a t BW=30 kHz i s ’ ) ; // D e t e r m i n a t i o n o f n o i s e power a t B2=10MHz PN2 =10*( log10 ( k * B2 * T /10^ -3) ) ; disp ( ’dBm ’ ,PN2 , ’ The n o i s e power a t BW=10 MHz i s ’ ) ; // D e t e r m i n a t i o n o f SNR f o r 30 kHz BW SNR1 = PN - PN1 ; disp ( ’ dB ’ , SNR1 , ’ The v a l u e o f SNR f o r BW=30 kHz i s ’ ) ; // D e t e r m i n a t i o n o f SNR f o r 10MHz BW SNR2 = PN - PN2 ; disp ( ’ dB ’ , SNR2 , ’ The v a l u e o f SNR f o r BW=10 MHz i s ’ ) ;
Scilab code Exa 13.3 example 3 1 clc ; 2 // p a g e no 445 3 // p r o b no 13 3 4 no_of_freq_hops =100; total_time_req =10; 5 time_for_each_freq = total_time_req /
no_of_freq_hops ; 6 disp ( ’ s e c / hop ’ , time_for_each_freq , ’ Time r e q u i r e d f o r each f r e q ’ );
Scilab code Exa 13.4 example 4 1 clc ; 2 // p a g e no 446 3 // p r o b no 13 4 4 bit_rate =16*10^3; // i n bps 5 chip_rate =10:1; 6 no_of_chip =10; 7 total_bit_rate = no_of_chip * bit_rate ; 8 m =4; n = log2 ( m ) ; 9 symbol_rate = total_bit_rate / n ; 10 disp ( ’ baud ’ , symbol_rate , ’ The no o f s i g n a l
e . symbol r a t e i s
Scilab code Exa 13.5 example 5 1 clc ; 2 // p a g e no 447
3 4 5 6 7 8 9 10 11 12 13 14 15 16
// p r o b no 13 5 // s i g n a l w i t h bandwidth Bbb=200 kHz & SNR=20 dB spred at chip rate 50:1 Bbb =200*10^3; // Bandwidth Gp =50; // c h i p r a t e SNR_in =20; //SNR i s 20 dB w i t h o u t s p r e a d i n g // D e t e r m i n a t i o n o f BW a f t e r s p r e a d i n g Brf = Gp * Bbb ; disp ( ’MHz ’ ,Brf , ’ The v a l u e o f BW a f t e r s p r e a d i n g ’ ) ; // C o n v e r t i n g i n t o dB Gp_dB =10* log10 ( Gp ) ; disp ( ’ dB ’ , Gp_dB , ’ The v a l u e o f p r o c e s s i n g g a i n ’ ) ; // D e t e r m i n a t i o n o f SNR a f t e r s p r e a d n g SNR_out = SNR_in - Gp_dB ; disp ( ’ dB ’ , SNR_out , ’ The v a l u e o f SNR a f t e r s p r e a d i n g i n dB ’ ) ;
Chapter 14 Transmission Lines
Scilab code Exa 14.1 example 1 1 clc ; 2 // p a g e no 461 3 // p r o b no . 1 4 . 1 4 //A c o a x i a l c a b l e w i t h c a p a c i t a n c e =90pF/m &
c h a r a c t e r i s t i c i m p e d a n c e =50 ohm 5 C =90*10^ -12; Zo =50; 6 // D e t e r m i n a t i o n o f i n d u c t a n c e o f 1m l e n g t h 7 L =( Zo ^2) * C ; 8 disp ( ’ nH/m ’ ,L *10^9 , ’ The i n d u c t a n c e o f 1m l e n g t h
Scilab code Exa 14.2 example 2 1 clc ; 2 // p a g e no 462 3 // p r o b no . 1 4 . 2 4 // a ) D e t e r m i n a t i o n o f i m p e d a n c e o f open w i r e w i t h
d i a m e t e r 3mm & r =10mm 63
5 D =3/2; r =10; // A l l v a l u e s a r e i n mm 6 Zo1 =276* log10 ( r / D ) ; 7 disp ( ’ ohm ’ ,Zo1 , ’ a ) The c h a r a c t e r i s t i c
conductor i s ’ ); // b ) D e t e r m i n a t i o n o f i m p e d a n c e o f c o a x i a l w i t h e r = 2 . 3 , i n n e r d i a m e t e r =2mm & o u t e r d i a m e t e r =8mm 9 er =2.3; D =8; d =2; // A l l d i a m e t e r v a l u e s i n mm 10 Zo2 =(138/ sqrt ( er ) ) * log10 ( D / d ) ; 11 disp ( ’ ohm ’ ,Zo2 , ’ b ) The c h a r a c t e r i s t i c i m p e d a n c e o f c o a x i a l c a b l e i s ’ ); 8
Scilab code Exa 14.3 example 3 1 2 3 4 5 6 7 8 9 10 11
clc ; // p a g e no 463 // p r o b no . 1 4 . 3 // 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 er =2.1; c =3*10^8; // V e l o c i t y o f l i g h t // D e t e r m i n a t i o n o f v e l o c i t y f a c t o r Vf =1/ sqrt ( er ) ; disp ( Vf , ’ The v a l u e o f v e l o c i t y f a c t o r i s ’ ) ; // D e t e r m i n a t i o n o f p r o p a g a t i o n v e l o c i t y Vp = Vf * c ; disp ( ’m/ s ’ ,Vp , ’ The v a l u e o f p r o p a g a t i o n v e l o . i s ’ ) ;
Scilab code Exa 14.4 example 4 1 clc ; 2 // p a g e no 468 3 // p r o b no . 1 4 . 4 4 // R e f e r f i g . 1 4 . 1 3 ( a ) 5 vs =1; // s o u r c e v o l t a g e 6 Rs =50; // s o u r c e r e s i s t a n c e
7 8 9 10 11 12 13
15 16 17 18 19 20 21 22 23
Zo =50; // l i n e i m p e d a n c e RL =25; // l o a d r e s i s t a n c e l =10; // l e n g t h o f l i n e vf =0.7; // v e l o c i t y f a c t o r Vi =0.5; c =3*10^8; // v e l o o f l i g h t // Vs w i l l d i v i d e b e t w e e n Rs and Zo o f t h e l i n e . S i n c e two r e s i s t o r s a r e e q u a l , t h e v o l t a g e w i l l d i v i d e equally . // T h e r e f o r e a t t =0 , t h e v o l t a g e a t t h e s o u r c e end o f t h e l i n e w i l l r i s e from z e r o t o 0 . 5V . The v o l t a g e at the load w i l l remain z e r o u n t i l l the s u rg e r e a c h e s i t . The t i m e f o r t h i s i s T = l /( vf * c ) ; // A f t e r T s e c , t h e v o l t a g e a t t h e l o a d w i l l r i s e . The r e f l e c t i o n c o e f f i c i e n t i s g i v e n a s refl_coeff =( RL - Zo ) /( RL + Zo ) //Now r e f l e c t i o n v o l t a g e i s Vr = refl_coeff * Vi ; // The t o t a l v o l t a g e a t t h e l o a d i s Vt = Vr + Vi ; disp ( ’V ’ ,Vt , ’ The t o t a l v o l t a g e a t t h e l o a d i s ’ ) ; // The r e f l e c t e d v o l t a g e w i l l p r o p o g a t e back a l o n g t h e l i n e , r e a c h i n g t h e s o u r c e a t t i m e 2T . A f t e r t h i s t h e v o l t a g e w i l l be 0 . 3 3 3 5V a l l a l o n g t h e line // The v o l t a g e a c r o s s t h e l i n e , and t h e l o a d w i l l be VL = vs *( RL /( RL + Zo ) ) ; disp ( ’V ’ ,VL , ’ The v o l t a g e a c r o s s t h e l i n e , ’ ) ;
Scilab code Exa 14.5 example 5 1 clc ; 2 // p a g e no 472 3 // p r o b no . 1 4 . 5
4 5 6 7 8 9 10 11
// S t a n d a r d c o a x i a l c a b l e RG−8/U w i t h 45 d e g r e e p h a s e s h i f t a t 200MHz p =45; f =200*10^6; c =3*10^8; // Speed o f l i g h t i n m/ s vf =0.66; // v e l o . f a c t o r f o r t h i s l i n e vp = vf * c ; // D e t e r m i n a t i o n o f p r o p a g a t i o n v e l o . wav = vp / f ; // D e t e r m i n a t i o n o f w a v e l e n g t h o f s i g n a l // D e t e r m i n a t i o n o f r e q d l e n g t h f o r 45 d e g r e e p h a s e shift L = wav *( p /360) ; disp ( ’m ’ ,L , ’ The l e n g t h r e q d f o r p h a s e s h i f t i s ’ ) ;
Scilab code Exa 14.6 example 6 1 clc ; 2 // p a g e no 476 3 // p r o b no . 1 4 . 6 4 //A 50ohm l i n e t e r m i n a t e d i n 25ohm r e s i s t a n c e 5 Zo =50; Zl =25; 6 // D e t e r m i n a t i o n o f SWR 7 SWR = Zo / Zl ; // I n t h i s c a s e Zo>Z l 8 disp ( SWR , ’ The v a l u e o f SWR i s ’ ) ;
Scilab code Exa 14.7 example 7 1 clc ; 2 // p a g e no 477 3 // p r o b no . 1 4 . 7 4 //A g e n e r a t o r s e n d s 50mW a t 50ohm l i n e & r e f l e c t i o n 5 6 7 8
c o e f f I =0.5 Pi =50; I =0.5; // D e t e r m i n a t i o n o f amount o f power r e f l e c t e d Pr =( I ^2) * Pi ; disp ( ’mW’ ,Pr , ’ The amount o f power r e f l e c t e d i s ’ ) ; 66
9 // D e t e r m i n a t i o n o f r e m a i n d e r power t h a t r e a c h e s l o a d 10 Pl = Pi - Pr ; 11 disp ( ’mW’ ,Pl , ’ The power d i s s i p a t e d i n l o a d i s ’ ) ;
Scilab code Exa 14.8 example 8 1 clc ; 2 // p a g e no 478 3 // p r o b no . 1 4 . 8 4 //A t r a n s m i t t e r s u p p l i e s 50W w i t h SWR 2 : 1 5 Pi =50; SWR =2; 6 // D e t e r m i n a t i o n o f power a b s o r b e d by l o a d 7 Pl =(4* SWR * Pi ) /(1+ SWR ) ^2; 8 disp ( ’W’ ,Pl , ’ The power a b s o r b e d by l o a d i s ’ ) ;
Scilab code Exa 14.9 example 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc ; // p a g e no 545 // p r o b no 1 4 . 9 Zo =50; // l i n e i m p e d e n c e i n ohm ZL =100; // l o a d i m p e d a n c e i n ohm vf =0.8; // v e l o c i t y f a c t o r l =1; // l e n g t h o f l i n e f =30*10^6; // f r e q o f o p e r a t i o n c =3*10^8; // v e l o o f l i g h t // we have t o f i n d t h e l e n g t h o f l i n e i n d e g r e e wl = vf * c / f // w a v e l e n g t h // Then t h e l e n g t h o f l i n e i n d e g r e e i s ang = l / wl *360 // c a l c u l a t i o n o f i m p e d a n c e Z = Zo *( ZL +( %i * Zo * tand ( ang ) ) ) /( Zo +( %i * ZL * tand ( ang ) ) ) ; 67
disp ( ’ ohm ’ ,Z , ’ The i m p e d a n c e l o o k i n g t o w a r d t h e l o a d ’ );
Scilab code Exa 14.10 example 10 1 2 3 4 5 6 7 8 9
clc ; // p a g e no 481 // p r o b no . 1 4 . 1 0 //A s e r i e s t u n e d c k t t u n e d a t 1GHz vf =0.95; c =3*10^8; f =10^9; vp = vf * c ; // d e t e r m i n a t i o n o f p r o p a g a t i o n v e l o . wav = vp / f ; // D e t e r m i n a t i o n o f w a v e l e n g t h // D e t e r m i n a t i o n o f l e n g t h L = wav /2; // S i n c e h a l f w a v e l e n g t h s e c t i o n w i i l be s e r i e s resonant 10 disp ( ’m ’ ,L , ’ The l e n g t h s h o u l d be ’ ) ;
Scilab code Exa 14.11 example 11 1 clc ; 2 // p a g e no 481 3 // p r o b no . 1 4 . 1 0 4 //A Tx d e l i v e r 100W t o a n t e n n a t h r o u g h 45m c o a x i a l
w i t h l o s s =4dB / 1 0 0m
5 loss =4/100; L =45; Pout =100; 6 loss_dB = L * loss ; // D e t e r m i n a t i o n o f l o s s i n dB 7 Pin_Pout =10^( loss_dB /10) ; 8 // D e t e r m i n a t i o n o f Tx power 9 Pin = Pout * Pin_Pout ; 10 disp ( ’W’ ,Pin , ’ The t r a n s m i t t e r power must be ’ ) ;
Scilab code Exa 14.13 example 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc ; // p a g e no 490 // p r o b no . 1 4 . 1 3 Zo =50; // l i n e i m p e d a n c e i n ohm f =100*10^6; // o p e r a t i n g f r e q vf =0.7; // v e l o c i t y f a c t o r L =6; // l e n g t h i n m c =3*10^8; // v e l o o f l i g h t ZL =50+ %i *50; // l o a d i m p e d a n c e i n ohm // we have t o c a l c u l a t e l e n g t h i n d e g r e e , s o f o r t h i s f i r s t f i n d wl wl = vf * c / f ; // wavength i n m ang =360* L / wl ; // now from t h e g r a p h i n p u t i m p e d a n c e i s 1 9 . 3 6 + %i5 .44; Zi =19.36+ %i *5.44; disp ( ’ ohm ’ ,Zi , ’ I n p u t i m p e d a n c e i s ’ ) ;
Scilab code Exa 14.14 example 13 1 clc ; 2 // p a g e no 492 3 // p r o b no . 1 4 . 1 4 4 Zo =50; // l i n e i m p e d a n c e i n ohm 5 ZL =75+ %i *25; 6 // t h e r e q u i r m e n t o f t h i s i s s i m p l y t o match t h e 50
ohm l i n e t o t h e i m p e d s n c e a t t h i s p o i n t on t h e l i n e , which i s 8 8 . 3 8 ohm , r e s i s t i v e . Z2 =88.38; // i n ohm // The r e q u i r e d t u r n r a t i o i s N1_N2 = sqrt ( Zo / Z2 ) ; disp ( N1_N2 , ’ The r e q u i r e d t u r n r a t i o i s ’ ) ;
Scilab code Exa 14.15 example 14 1 2 3 4 5 6 7 8
clc ; // p a g e no 494 // p r o b no . 1 4 . 1 5 // r e f e r p r o b no 1 4 . 1 4 Zo =50; // l i n e i m p e d a n c e i n ohm Z2 =88.38; // i n ohm Zo_ = sqrt ( Zo * Z2 ) ; disp ( Zo_ ’) ;
Scilab code Exa 14.16 example 15 1 2 3 4 5 6 7 8 9 10
clc ; // p a g e no 494 // p r o b no . 1 4 . 1 6 Zo =50; // l i n e i m p e d a n c e i n ohm f =100*10^6; // o p e r a t i n g f r e q i n Hz ZL1 =50+ %i *75; // l o a d i m p e d a n c e w i t h Xc=75 Xc =75; // C a p a c i t a n c e i n f a r a d s i s g i v e n a s C =1/(2* %pi * f * Xc ) ; disp ( ’ F ’ ,C , ’ C a p a c i t a n c e i s ’ ) ;
Scilab code Exa 14.17 example 16 1 clc ; 2 // p a g e no 497 3 // p r o b no . 1 4 . 1 7
4 Zo =72; // l i n e i m p e d a n c e i n ohm 5 ZL =120 - %i *100; // l o a d i m p e d a n c e 6 // The s t u b must be i n s e r t e d a t a p o i n t on t h e
line where t h e r e a l p a r t o f t h e l o a d a d m i t t a n c e i s c o r r e c t . This a lu e i s 7 s =1/ Zo ; 8 disp ( ’ S ’ ,s , ’ The v a l u e o f s t u d e i s ’ ) ;
Scilab code Exa 14.18 example 17 1 clc ; 2 // p a g e no 501 3 // p r o b no . 1 4 . 1 8 4 //A TDR d i s p l a y shows d s c o n t i n u i t y
at 1 . 4 us & v f
=0.8 5 t =1.4*10^ -6; vf =0.8; c =3*10^8; // Speed o f l i g h t 6 // D e t e r m i n a t i o n o f d i s t a n c e o f f a u l t 7 d =( vf * c * t ) /2; // One−h a l f t i m e i s u s e d t o c a l c u l a t e 8 disp ( ’m ’ ,d , ’ The d i s t a n c e i s ’ ) ;
Scilab code Exa 14.19 example 18 1 clc ; 2 // p a g e no 503 3 // p r o b no . 1 4 . 1 9 4 // 2 a d j a c e n t minima on s l o t t e d 5 6 7 8 9
a r e 23cm a p a r t w i t h
v e l o f a c t o r =95% L =23*10^ -2; vf =0.95; c =3*10^8; // V e l o . o f l i g h t i n m/ s // D e t e r m i n a t i o n o f w a v e l e n g t h wav =2* L ; // Minima a r e s e p e r a t e d by one−h a l f wavelength disp ( ’ cm ’ , wav *100 , ’ The w a v e l e n g t h i s ’ ) ; // D e t e r m i n a t i o n o f f r e q . 71
10 f =( vf * c ) / wav ; // vp=v f ∗ c 11 disp ( ’MHz ’ ,f /10^6 , ’ The f r e q
Scilab code Exa 14.20 example 19 1 clc ; 2 // p a g e no 504 3 // p r o b no . 1 4 . 2 0 4 // Frwd power i n Tx l i n e i s 150W, R e v e r s e power =20W 5 Pi =150; Pr =20; // A l l power i n w a t t 6 // D e t e r m i n a t i o n o f SWR 7 SWR =(1+ sqrt ( Pr / Pi ) ) /(1 - sqrt ( Pr / Pi ) ) ; 8 disp ( SWR , ’ The v a l u e o f SWR i s ’ ) ;
Chapter 15 Radio Wave Propogation
Scilab code Exa 15.1 example 1 1 clc ; 2 // p a g e no 517 3 // p r o b no . 1 5 . 1 4 // D i e l e c t r i c c o n s t t =2.3 5 er =2.3; 6 // D e t e r m i n a t i o n o f c h a r a c t e r i s t i c i m p e d a n c e 7 Z =377/ sqrt ( er ) ; 8 disp ( ’ ohm ’ ,Z , ’ The c h a r a s t e r i s t i c i m p e d a n c e o f
p o l y e t h y l e n e i s ’ );
Scilab code Exa 15.2 example 2 1 clc ; 2 // p a g e no 518 3 // p r o b no . 1 5 . 2 4 // D i e l e l e c t r i c s t r e n g t h o f a i r =3MV/m 5 e =3*10^6; // e l e c t r i c f i e l d s t r e n g t h 6 Z =377; // i m p e d a n c e o f a i r
7 Pd =( e ^2) / Z ; // D e t e r m i n a t i o n o f power d e n s i t y 8 disp ( ’GW/m2 ’ , Pd /10^9 , ’ The max power d e n s i t y
Scilab code Exa 15.3 example 3 1 clc ; 2 // p a g e no 520 3 // p r o b no . 1 5 . 3 4 //An i s o t r o p i c r a d i a t o r w i t h power 100W & d i s t 5 6 7 8
i s 10km Pt =100; r =10*10^3; // D e t e r m i n a t i o n o f power d e n s i t y a t r =10km Pd = Pt /(4* %pi *( r ^2) ) ; disp ( ’nW/m2 ’ , Pd *10^9 , ’ Power d e n s i t y a t a p o i n t 10km ’ );
Scilab code Exa 15.4 example 4 1 clc ; 2 // p a g e no 521 3 // p r o b no . 1 5 . 4 4 //An i s o t r o p i c r a d i a t o r
r a d i a t e s power =100W a t p o i n t
10km 5 Pt =100; r =10*10^3; 6 // D e t e r m i n a t i o n o f e l e c t r i c f i e l d s t r e n g t h 7 e = sqrt (30* Pt ) / r ; 8 disp ( ’mW/m ’ ,e *1000 , ’ The e l e c t r i c f i e l d s t r e n g t h
Scilab code Exa 15.5 example 5 74
1 clc ; 2 // p a g e no 525 3 // p r o b no . 1 5 . 5 4 //A t r a n s m i t t e r w i t h power o / p=150W a t f c =325MHz .
a n t e n n a g a i n =12 dBi r e c e i v e r a n t e n n a g a i n =5dBi a t 10km away // c o n s i d e r i n g no l o s s i n t h e s y s t e m d =10; Gt_dBi =12; Gr_dBi =5; fc =325; Pt =150; // D e t e r m i n a t i o n o f power d e l i v e r e d Lfs =32.44+(20* log10 ( d ) ) +(20* log10 ( fc ) ) -( Gt_dBi ) -( Gr_dBi ) ; Pr = Pt /(10^( Lfs /10) ) ; disp ( ’nW ’ , Pr *10^9 , ’ The power d e l i v e r e d t o r e c e i v e r i s ’ );
Scilab code Exa 15.6 example 6 1 clc ; 2 // p a g e no 525 3 // p r o b no . 1 5 . 6 4 //A t r a n s m i t t e r w i t h o / p power =10W a t f c =250MHz,
5 6 7 8 9 10 11 12
c o n n e c t e d t o Tx 10m l i n e w i t h l o s s =3dB / 1 0 0m t 0 a n t e n n a w i t h g a i n =6dBi . Rx a n t e n n a 20km away w i t h g a i n =4dBi // R e f e r f i g . 1 5 . 6 , a s s u m i n g f r e e s p a c e p r o p a g a t i o n d =20; fc =250; Gt_dBi =6; Gr_dBi =4; loss =3/100; Zl =75; Zo =50; L =10; Pt =10; Lfs =32.44+(20* log10 ( d ) ) +(20* log10 ( fc ) ) - Gt_dBi - Gr_dBi ; // p a t h l o s s disp ( Lfs ) ; L_tx = L * loss ; // D e t e r m i n a t i o n o f l o s s ref_coe =( Zl - Zo ) /( Zl + Zo ) ; // R e f l e c t i o n c o e f f i c i e n t L_rx =1 -( ref_coe ^2) ; // P r o p o r t i o n o f i n c i d e n t power that reaches load L_rx_dB = -10* log10 ( L_rx ) ; // C o n v e r t i n g t h a t p r o p o r t i o n 75
13 14 15 16 17 18
i n dB // D e t e r m i n a t i o n o f t o t a l l o s s Lt Lt =( Lfs ) +( L_tx ) +( L_rx_dB ) ; // D e t e r m i n a t i o n o f power d e l i v e r e d t o r e c e i v e r Pt_Pr =10^( Lt /10) ; // Power r a t i o Pr = Pt / Pt_Pr ; disp ( ’W’ ,Pr , ’ The power d e l i v e r e d t o r e c e i v e r i s ’ ) ;
Scilab code Exa 15.7 example 7 1 clc ; 2 // p a g e no 530 3 // p r o b no . 1 5 . 7 4 //A r a d i o wave moves from a i r ( e r =1) t o 5 6 7 8
g l a s s ( er =7.8)
. a n g l e o f i n c i d e n c e =30 deg theta_i =30; er1 =1; er2 =7.8; // d e t e r m i n a t i o n o f a n g l e o f r e f r a c t i o n theta_r = asind (( sind ( theta_i ) ) /( sqrt ( er2 / er1 ) ) ) ; disp ( ’ d e g r e e ’ , theta_r , ’ The a n g l e o f r e f r a c t i o n i s ’ ) ;
Scilab code Exa 15.8 example 8 1 clc ; 2 // p a g e no 537 3 // p r o b no . 1 5 . 8 4 //A Tx s t a t n w i t h f c =11.6MHz & a n g l e o f 5 6 7 8
i n c i d e n c e =70
degree theta_i =70; fc =11.6; // i n MHz // 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) MUF = fc /( cosd ( theta_i ) ) ; disp ( ’MHz ’ ,MUF , ’ The max u s a b l e f r e q MUF i s ’ ) ;
Scilab code Exa 15.9 example 9 1 clc ; 2 // p a g e no 539 3 // p r o b no . 1 5 . 9 4 //A t a x i compony u s i n g 5 6 7 8 9 10 11
c e n t r a l d i s p a t c h e r with a n t e n n a h e i g h t =15m & t a x i a n t e n n a h e i g h t =1.5m ht =15; hr =1.5; // a ) D e t e r m i n a t i o n o f max commn d i s t b e t n d i s p a t c h e r and t a x i d1 = sqrt (17* ht ) + sqrt (17* hr ) ; disp ( ’km ’ ,d , ’ a ) The max commn d i s t b e t n d i s p a t c h e r & t a x i ’ ); // b ) D e t e r m i n a t i o n o f max ommn d i s t b e t n 2 t a x i s d2 = sqrt (17* hr ) + sqrt (17* hr ) ; // h t=h r=h e i g h t o f a n t e n n a o f t a x i cab disp ( ’km ’ ,d2 , ’ The max commn d i s t b e t n two t a x i i s ’ ) ;
Scilab code Exa 15.11 example 10 1 clc ; 2 // p a g e no 545 3 // p r o b no 1 5 . 1 1 4 // An a u t o m o b i l e t r a v e l s a t 60km/ h r 5 v =60*10^3/(60*60) ; // c o n v e r s i o n o f c a r ’ s s p e e d t o m/ s 6 c =3*10^8; // s p e e d o f l i g h t 7 // p a r t a ) c a l c u l a t i o n o f t i m e b e t w e e n f a d e s i f c a r
u s e s a c e l l phone a t 8 0 0 ∗ 1 0 ˆ 6 Hz 8 f =800*10^6; 9 T = c /(2* f * v ) ; 10 disp ( ’ s e c ’ ,T , ’ The f a d i n g p e r i o d i s ’ ) ;
// p a r t b ) c a l c u l a t i o n o f t i m e b e t w e e n f a d e s i f c a r u s e s a PCS phone a t 1 9 0 0 ∗ 1 0 ˆ 6 Hz f =1900*10^6; T = c /(2* f * v ) ; disp ( ’ s e c ’ ,T , ’ The f a d i n g p e r i o d i s ’ ) ; // Note t h a t t h e r a p i d i t y o f t h e f a d i n g i n c r e a s e s w i t h b o t h t h e f r e q u e n c y o f t h e t r a n s m i s s i o n s and the speed of the v e h i c l e
Scilab code Exa 15.12 example 11 1 2 3 4 5 6 7 8
clc ; // p a g e no 550 // p r o b l e m no 1 5 . 1 2 A =1000; // m e t r o p o l i t i a n a r e a e x p r e s s e d i n s q . km r =2; // r a d i u s o f c e l l i n km // Number o f c e l l s i t e s g i v e n a s N = A /(3.464* r ^2) ; disp (N , ’ Number o f c e l l s i t e s a r e ’ ) ;
Chapter 16 Antennas
Scilab code Exa 16.1 example 1 1 clc ; 2 // p a g e no 564 3 // p r o b no . 1 6 . 1 4 // D e t e r m i n a t i o n o f l e n g t h o f h a l f −wave d i p o l e 5 f =20; // O p e r a t i n g f r e q i n MHz 6 L =142.5/ f ; 7 disp ( ’m ’ ,L , ’ The l e n g t h o f h a l f −wave d i p o l e i s ’ ) ;
Scilab code Exa 16.2 example 2 1 clc ; 2 // p a g e no 566 3 // p r o b no . 1 6 . 2 4 //A d i p o l e a n t e n n a w i t h r a d i a t n 5 6 7 8
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 Rr =67; Rl =5; // D e t e r m i n a t i o n o f e f f i c i e n c y eta = Rr /( Rr + Rl ) ; disp ( ’% ’ ,eta , ’ The e f f i c i e n c y o f d i p o l e a n t e n n a i s ’ ) ; 79
Scilab code Exa 16.3 example 3 1 clc ; 2 // p a g e no 569 3 // p r o b no . 1 6 . 3 4 //Two a n t e n n a s w i t h g a i n 5 . 3 dBi & 4 . 5 dBd 5 // C o n v e r t i n g u n i t dBd i n dBi f o r c o m p a r i s o n 6 G1_dBi =5.3; G2_dBd =4.5; 7 G2_dBi =2.14+ G2_dBd ; 8 if G2_dBi > G1_dBi then 9 disp ( ’ S e c o n d a n t e n n a w i t h g a i n =4.5 dBd h a s h i g h e r
g a i n ’ ); 10 11
else disp ( ’ F i r s t a n t e n n a w i t h g a i n =5.3 dBi h a s h i g h e r g a i n ’ );
Scilab code Exa 16.4 example 4 1 2 3 4 5 6 7 8 9 10
clc ; // p a g e no 571 // p r o b no . 1 6 . 4 //A d i p o l e a n t e n n a w i t h e f f i c e n c y =85% g i v e n n =0.85; D_dBi =2.14; // D i r e c t i v i t y i n dBi // D e t e r m i n a t i o n o f g a i n i n dB D =10^( D_dBi /10) ; G = D * n ; // D e t e r m i n a t i o n o f g a i n G_dBi =10* log10 ( G ) ; // C o n v e r t i n g t o dBi disp ( ’ dBi ’ , G_dBi , ’ The g a i n i s ’ ) ;
Scilab code Exa 16.6 example 5 1 clc ; 2 // p a g e no 573 3 // p r o b no . 1 6 . 6 4 //ERP o f Tx s t a t n =17W 5 ERP =17; 6 // D e t e r m n a t i o n o f EIRP 7 ERP_dBm =10* log10 ( ERP /10^ -3) ; // C o n v e r t i n g ERP i n dBm 8 EIRP_dBm = ERP_dBm +2.14; // C o n v e r t i n g ERP i n EIRP 9 disp ( ’dBm ’ , EIRP_dBm , ’ EIRP i n dBm i s e x p r e s s e d a s ’ ) ;
Scilab code Exa 16.7 example 6 1 clc ; 2 // p a g e no 582 3 // p r o b no . 1 6 . 7 4 // a h e l i a l a n t e n n a w i t h 8 t u r n s w i t h f r e q =1.2GHz
given 5 N =8; f =1.2*10^9; c =3*10^8; // Speed o f l i g h t i n m/ s 6 // a ) D e t e r m i n a t i o n o f optimum d i a m e t e r o f a n t e n n a 7 wav = c / f ; 8 D = wav / %pi ; 9 disp ( ’m ’ ,D , ’ a ) 1 . The optimum d i a m e t e r f o r a n t e n n a 10 11 12 13 14 15 16 17 18 19
is ’ ); S = wav /4; // D e t e r m i n a t i o n o f s p a c i n g f o r t h e a n t e n n a disp ( ’m ’ ,S , ’ a ) 2 . The s p a c i n g f o r t h e a n t e n n a ’ ) ; L = N * S ; // D e t e r m i n a t i o n o f t o t a l l e n g t h o f an a n t e n n a \ disp ( ’m ’ ,L , ’ a ) 3 . The t o t a l l e n g t h o f an a n t e n n a i s ’ ) ; // b ) D e t e r m i n a t i o n o f a n t e n n a g a i n i n dBi G =(15* N * S *( %pi * D ) ^2) /( wav ^3) ; G_dBi =10* log10 ( G ) ; // C o n v e r t i n g i n dBi disp ( ’ dBi ’ , G_dBi , ’ b ) The a n t e n n a g a i n i s ’ ) ; // c ) d e t e r m i n a t i o n o f beamwidth theta =((52* wav ) /( %pi * D ) ) * sqrt ( wav /( N * S ) ) ; 81
disp ( ’ d e g r e e ’ , theta , ’ The beamwidth i s ’ ) ;
Scilab code Exa 16.8 example 7 1 clc ; 2 // p a g e no 590 3 // p r o b no . 1 6 . 8 4 // D e s i g n o f l o g 5 6 7 8 9 10 11 12 13 14 15 16 17
p e r i o d i c antenna to cover f r e q 100 −300MHz & t = 0 . 7 , a=30 d e g r e e t =0.7; a =30; // For good p e r f o r m a n c e c o n v e r t i n g r a n g e t o 90MHz t o 320MHz f2 =90; f1 =320; // D e t e r m i n a t i o n o f l e n g t h s o f e l e m e n t s L1 =142.5/ f1 ; // For f r e q o f 320MHz L2 = L1 / t ; L3 = L2 / t ; L4 = L3 / t ; L5 = L4 / t ; disp ( ’ The l e n g t h o f e l e m e n t s a r e ’ ) ; disp ( ’m ’ ,L5 , ’ L5= ’ , ’m ’ ,L4 , ’ L4= ’ , ’m ’ ,L3 , ’ L3= ’ , ’m ’ ,L2 , ’ L2= ’ , ’m ’ ,L1 , ’ L1= ’ ,) ; // D e t e r m i n a t i o n o f s p a c i n g b e t n e l e m e n t s D1 = L1 /(2* tand ( a /2) ) ; D2 = D1 / t ; D3 = D2 / t ; D4 = D3 / t ; D5 = D4 / t ; disp ( ’ The s p a c i n g b e t n e l e m e n t s a r e ’ ) ; disp ( ’m ’ ,D5 , ’ D5= ’ , ’m ’ ,D4 , ’ D4= ’ , ’m ’ ,D3 , ’ D3= ’ , ’m ’ ,D2 , ’ D2= ’ , ’m ’ ,D1 , ’ D1= ’ ,) ;
Scilab code Exa 16.9 example 8 1 clc ; 2 // p a g e no 598 3 // p r o b no . 1 6 . 9 4 //A p a r a b o l i c a n t e n n a w i t h d i a m e t e r =3m & e f f i c i e n c y
=60% o p e r a t e a t 4GHz 82
5 D =3; n =0.6; f =4*10^9; c =3*10^8; // Spped o f l i g h t 6 // D e t e r m i n a t i o n o f g a i n & beamwidth 7 wav = c / f ; // D e t e r m i n a t i o n o f f r e e s p a c e w a v e l e n g t h 8 theta =(70* wav ) / D ; // C a l c u l a i n g beamwidth 9 disp ( ’ d e g r e e ’ , theta , ’ The beamwidth i s ’ ) ; 10 G =( n *( %pi ^2) *( D ^2) ) / wav ^2; // C a l c u l a t i n g g a i n 11 // C o n v e r t i n g g a i n i n dBi 12 G_dBi =10* log10 ( G ) ; 13 disp ( ’ dBi ’ , G_dBi , ’ The g a i n i s ’ ) ;
Chapter 17 Microwave Devices
Scilab code Exa 17.1 example 1 1 clc ; 2 // p a g e no 621 3 // p r o b no . 1 7 . 1 4 // TE10 mode i n a i r
d i e l e c t r i c mode w i t h i n s i d e c r o s s
s e c t n =2cm∗4cm 5 // D e t e r m i n a t i o n o f cut − o f f f r e q 6 a =4*10^ -2; // l a r g e s t dimn i s u s e d f o r c a l c u l a t i o n 7 c =3*10^8; // Speed o f l i g h t i n m/ s 8 fc = c /(2* a ) ; 9 // D e t e r m i n a t i o n o f dominant mode o f p r o p a g a t i o n o v e r
2:1 10 MUF =2* fc ; 11 disp ( ’ Hz ’ ,MUF , ’ The max u s a b l e f r e q i s ’ ) ;
Scilab code Exa 17.2 example 2 1 clc ; 2 // p a g e no 624
// p r o b no . 1 7 . 2 // D e t e r m i n a t i o n o f g r o u p v e l o f o r w a v e g u i d e i n example 7 . 1 f =5*10^9; // f r e q . i n Hz fc =3.75*10^9; // cut − o f f f r e q from e g . 7 . 1 c =3*10^8; // s p e e d o f l i g h t i n m/ s vg = c * sqrt (1 -( fc / f ) ^2) ; disp ( ’m/ s ’ ,vg , ’ The g r o u p v e l o . i s ’ ) ;
Scilab code Exa 17.3 example 3 1 clc ; 2 // p a g e no 624 3 // p r o b no . 1 7 . 3 4 //A w a v e g u i d e w i t h f c =10GHz . 2
s i g n a l w i t h f r e q 12 &
17GHz p r o p o g a t e down=50m 5 fc =10*10^9; c =3*10^8; f1 =12*10^9; f2 =17*10^9; d =50; 6 // D e t e r m i n a t i o n o f g r o u p v e l o f o r 12GHz 7 vg1 = c * sqrt (1 -( fc / f1 ) ^2) ; 8 disp ( ’m/ s ’ ,vg1 , ’ The g r o u p v e l o . f o r 12GHz s i g n a l
); 9 // D e t e r m i n a t i o n o f g r o u p v e l o f o r 17GHz 10 vg2 = c * sqrt (1 -( fc / f2 ) ^2) ; 11 disp ( ’m/ s ’ ,vg2 , ’ The g r o u p v e l o . f o r 17GHz s i g n a l 12 13 14 15 16 17 18
is ’ ); // D e t e r m i n a t i o n o f t i m e t a k e n f o r 50m d i s t by f 1 t1 = d / vg1 ; // D e t e r m i n a t i o n o f t i m e t a k e n f o r 50m d i s t by f 2 t2 = d / vg2 ; // D e t e r m i n a t i o n o f d i f f n i n t h e t r a v e l t i m e s f o r 2 signals del = t1 - t2 ; disp ( ’ s e c ’ ,del , ’ The d i f f n i n t h e t r a v e l t i m e s f o r 2 s i g n a l s i s ’ );
Scilab code Exa 17.4 example 4 1 clc ; 2 // p a g e no 627 3 // p r o b no . 1 7 . 4 4 // D e t e r m i n a t i o n o f p h a s e v e l o . w i t h g i v e n 5GHz f r e q 5 f =5*10^9; c =3*10^8; fc =3.75*10^9; // Cut− o f f f r e q
r e f e r i n g eg . 1 7 . 1 6 vp = c / sqrt (1 -( fc / f ) ^2) ; // C a l c u l a t i o n o f p h a s e v e l o . 7 disp ( ’m/ s ’ ,vp , ’ The p h a s e v e l o i s ’ ) ;
Scilab code Exa 17.5 example 5 1 clc ; 2 // p a g e no 628 3 // p r o b no . 1 7 . 5 4 // d e t e r m i n a t i o n o f
c h a r a c t e r i s t i c impedance o f w a v e g u i d e w i t h g i v e n 5GHz f r e q 5 f =5*10^9; fc =3.75*10^9; // R e f e r i n g i n e g . 1 7 . 4 6 Zo =377/ sqrt (1 -( fc / f ) ^2) ; 7 disp ( ’ ohm ’ ,Zo , ’ The c h a r a c t e r i s t i c i m p e d a n c e o f waveguide i s ’ );
Scilab code Exa 17.7 example 6 1 clc ; 2 // p a g e no 631 3 // p r o b no . 1 7 . 7 4 //A s i g n a l w i t h
l e v e l o f 20dBm & 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 6 7 8 9 10 11 12 13 14
sig_in =20; loss =1; couple =20; direct =40; // D e t e r m i n a t i o n o f s i g n a l l e v e l i n main g u i d e sig_level_main = signal_in - loss ; disp ( ’dBm ’ , sig_level_main , ’ The s i g n a l l e v e l i n main g u id e i s ’ ); // D e t e r m i n a t i o n o f s i g n a l l e v e l i n s e c o n d a r y g u i d e sig_level_sec = sig_in - couple ; disp ( ’dBm ’ , sig_level_sec , ’ The s i g n a l l e v e l i n s ec on d ar y g ui d e i s ’ ); // I f s i g n a l d i r n i n main g u i d e w e r e r e v e r e s e d , t h e s i g n a l l e v e l i n s e c g i d e would r e d u c e d by 40dB t o sig_sec_rev =( sig_level_sec ) -( direct ) ; disp ( ’dBm ’ , sig_sec_rev , ’ The s i g n a l l e v e l from s e c g u i d e when r e v e r s e d g u i d e i s ’ ) ;
Scilab code Exa 17.8 example 7 1 2 3 4 5 6 7 8 9
clc ; // p a g e no 642 // p r o b no . 1 7 . 8 //A Gunn d e v i c e w i t h t h i c k n e s s =7um d =7*10^ -6; v =10^5; // B a s i c v e l o c i t y o f e t = d / v ; // B a s i c v e l o c i t y r e l a t i o n // D e t e r m i n a t i o n o f f r e q o f o s c i l l a t i o n f =1/ t ; // I n v e r s e o f p e r i o d i s f r e q disp ( ’ Hz ’ ,f , ’ The f r e q o f o s c i l l a t i o n i s ’ ) ;
Scilab code Exa 17.9 example 8 1 clc ; 2 // p a g e no 648 3 // p r o b no . 1 7 . 9
4 5 6 7 8 9 10 11
//A p u l s e magnetron w i t h avg power =1.2kW & peak power =18.5kW & 1 p u l s e i s g e n e r a t e d e v e r y 10ms Pavg =1.2*10^3; Pp =18.5*10^3; Tt =10*10^ -3; // D e t e r m i n a t i o n o f duty c y c l e D = Pavg / Pp ; disp (D , ’ The duty c y c l e i s ’ ) ; // D e t e r m i n a t i o n o f l e n g t h o f p u l s e Ton = D * Tt ; disp ( ’ s e c ’ ,Ton , ’ The l e n g t h o f p u l s e i s ’ ) ;
Scilab code Exa 17.10 example 9 1 clc ; 2 // p a g e no 652 3 // p r o b no . 1 7 . 1 0 4 //A p y r a m i d a l h o r n h a s a p e r t u r e =58mm i n E−p l a n e & 78
mm i n H−p l a n e & o p e r a t e s a t 10GHz 5 f =10*10^9; c =3*10^8; dH =78*10^ -3; dE =58*10^ -3; 6 // a ) D e t e r m i n a t i o n o f g a i n i n dB 7 wl = c / f ; // c a l c u l a t i o n o f w a v e l e n g t h 8 G =(7.5* dE * dH ) /( wl ^2) ; 9 G_dBi =10* log10 ( G ) ; // C o n v e r t i n g t o dBi 10 disp ( ’ dBi ’ , G_dBi , ’ a ) The g a i n i s ’ ) ; 11 // b ) D e t e r m i n a t i o n o f beamwidth i n H−p a l n e 12 theta_H =(70* wl ) / dH ; 13 disp ( ’ d e g r e e ’ , theta_H , ’ b ) The beamwidth i n H−p l a n e 14 15 16
’ ); // c ) D e t e r m i n a t i o n o f beamwidth i n E−p l a n e theta_E =(56* wl ) / dE ; disp ( ’ d e g r e e ’ , theta_E , ’ c ) The beamwidth i n H−p l a n e i s ’ );
Scilab code Exa 17.11 example 10 88
1 2 3 4 5 6 7 8 9 10
clc ; // p a g e no 654 // p r o b l e m no 1 7 . 1 1 // f o r a s q u a r e p a t c h a n t e n n a f =2*10^6; // f r e q o f o p e r a t i o n i n Hz Er =2; // r e l a t i v e p e r m i t t i v i t y c =3*10^8; // v e l o o f l i g h t // w a v e l e n g t h i s g i v e n a s wl = c /( f * sqrt ( Er ) ) ; // The a n t e n n a w i d t h and l e n g t h a r e e a c h approximately half of t h i s . 11 w = wl /2; 12 l = wl /2; 13 disp ( ’m ’ ,w , ’ The a n t e n n a w i d t h ’ , ’ and ’ , ’m ’ ,l , ’ The antenna l e n g t h ’ );
Scilab code Exa 17.12 example 11 1 clc ; 2 // p a g e no 657 3 // p r o b no . 1 7 . 1 2 4 //A r a d a r Tx h a s power =10kW a t f r e q =9.5GHz & t a r g e t
a t 15km w i t h c r o s s s e c t n =10.2 m2 w i t h g a i n o f a n t e n n a i s 20 dBi f =9.5*10^9; Pt =10*10^3; c =3*10^8; G_dBi =20; a =10.2; r =15*10^3; // D e t e r m i n a t i o n o f r e c e i v e d power wl = c / f ; // c a l c u l a t i n g w a v e l e n g t h G =10^( G_dBi /10) ; // C o n v e r t i n g t o power r a t i o Pr =(( wl ^2) * Pt *( G ^2) * a ) /(((4* %pi ) ^3) *( r ^4) ) ; disp ( ’W’ ,Pr , ’ The r e c e i v e d power i s ’ ) ;
Scilab code Exa 17.13.a example 12 89
1 clc ; 2 // p a g e no 659 3 // p r o b no . 1 7 . 1 3 a 4 // a p u l s e s e n t , r e t u r n s a f t e r 15 u s 5 t =15*10^ -6; c =3*10^8; 6 // D e t e r m i n a t i o n o f d i s t a n c e o f t a r g e t 7 R =( c * t ) /2; 8 disp ( ’m ’ ,R , ’ The d i s t a n c e o f t a r g e t i s ’ ) ;
Scilab code Exa 17.13.b example 13 1 clc ; 2 // p a g e no 660 3 // p r o b no . 1 7 . 1 3 . b 4 tp =10^ -6; // p u l s e d u r a t i o n o f p u l s e r a d a r 5 f =10^3; // o p e r a t i n g f r e q i n Hz 6 // The maximum unambiguous r a n g e i s 7 Rmax = c /(2* f ) ; 8 disp ( ’m ’ , Rmax , ’ The maximum r a n g e i s ’ ) ; 9 // The minimum unambiguous r a n g e i s 10 Rmin = c * tp /2; 11 disp ( ’m ’ , Rmin , ’ The minimum r a n g e i s ’ ) ;
Scilab code Exa 17.14 example 14 1 2 3 4 5 6 7 8
clc ; // p a g e no 662 // p r o b no . 1 7 . 1 4 v =60; // s p e e d o f v e h i c l e moving t o w a r d s r a d a r i n mph c =3*10^8; // v e l o o f l i g h t i n m/ s f =10^10; // o p e r a t i n g f r e q u e n c y i n Hz // c o n v e r s i o n o f s p e e d from mph t o km/ h r v1 =60*1.6; 90
9 // c o n v e r s i o n o f s p e e d from km/ h r t o m/ s 10 v2 = v1 *10^3/3600; 11 // Now t h e D o p p l e r s h i f t i s f o u n d a s 12 fd =2* v2 * f / c ; 13 disp ( ’ Hz ’ ,fd , ’ The D o p p l e r s h i f t i s ’ ) ;
Chapter 18 Terrestrial Microwave Communication system
Scilab code Exa 18.1 example 1 1 clc ; 2 // p a g e no 676 3 // p r o b no 18 1 4 // T r a n s m i t t e r and r e c e i v e r have same h e i g h t a t
40km 5 d =40; // d i s t i s 40 km 6 h =( d ^2) /68; // As d=s q r t ( 1 7 h )+s q r t ( 1 7 h ) 7 disp ( ’m ’ ,h , ’ The h e i g h t o f e a c h t o w e r must be a t l e a s t ’ )l;
Scilab code Exa 18.2 example 2 1 clc ; 2 // p a g e no 678 3 // p r o b no 18 2 4 //A l i n e o f s i g h t
r a d i o l i n k a t f r e q 6GHz w i t h s e p e r a t i o n 40 km b e t n a n t e n n a s 92
5 f =6; d1 =10; d2 =30; // o b s t a c l e l o c a t e d a t 10 km 6 // D e t e r m i n a t i o n o f d i s t R t o c l e a r o b s t a c l e 7 R =10.4* sqrt (( d1 * d2 ) /( f *( d1 + d2 ) ) ) ; 8 disp ( ’m ’ ,R , ’ The d i s t by which beam must c l e a r
Scilab code Exa 18.3 example 3 1 clc ; 2 // p a g e no 679 3 // p r o b no 18 3 4 //A t r a n s m i t t e r and r e c e i v e r 5 6 7 8 9 10 11 12
a t 6GHz s e p e r a t e d by 40 km w i t h o /p power 2 W f =6*10^9; d =40; Pt =2; // power i n w a t t // t r a n s m i t t i n g a n t e n n a g a i n Gt=20dBi , r e c e i v i n g a n t e n n a Gr=25 dBi Gt =20; Gr =25; f_mhz =6000; // f =6000 MHz Pr_Pt_dB =( Gt + Gr ) -(32.44+(20* log10 ( d ) ) +(20* log10 ( f_mhz ) ) ) ; Pt_dBm =10* log10 ( Pt /10^ -3) ; Pr_dBm = Pt_dBm + Pr_Pt_dB ; disp ( ’dBm ’ , Pr_dBm , ’ The power d e l i v e r e d t o t h e Rx i s ’ );
Scilab code Exa 18.4 example 4 1 clc ; 2 // p a g e no 680 3 // p r o b no 18 4 4 T_sky =120; // Sky temp e x p r e s s e d i n K 5 L_dB =2; // a n t e n n a f e e d l i n e l o s s 6 L =10^( L_dB /10) ;
7 // t h e n o i s e temp i s g i v e n a s 8 Ta =(( L -1) *290 + T_sky ) / L ; 9 disp ( ’K ’ ,Ta , ’ N o i s e t e m p e r a t u r e
Scilab code Exa 18.5 example 5 1 clc ; 2 // p a g e no 681 3 // p r o b no 1 8 . 5 4 NF_dB =2; 5 NF_power = 10^( NF_dB /10) ; 6 T_eq =290*( NF_power -1) ; 7 disp ( ’K ’ , T_eq , ’ The e q u i v a l e n t
n o i s e temperature ’ );
Scilab code Exa 18.6 example 6 1 clc ; 2 // p a g e no 681 3 // p r o b no 1 8 . 6 4 // r e f e r e x a m p l e no 1 8 . 4 and 1 8 . 5 5 // The a n t e n n a and f e e d l i n e c o m b i n a t i o n from ex 1 8 . 4
i s u s e d w i t h t h e Rx from ex 1 8 . 5 6 Ta =182; // n o i s e temp o f t h e a n t e n n a and f e e d l i n e 7 8 9 10 11 12 13 14 15
combination expressed in K Teq =169; // n o i s e t e m p e r a t u r e o f t h e Rx B =20*10^6; // BW o f t h e r e c e i v e r Tn_sys = Ta + Teq ; // N o i s e temp f o r t h e s y s t e m k =1.38*10^ -23; // Boltzmann c o n s t a n t // N o i s e power o f t h e s y s t e m i s g i v e n a s Pn = k * Tn_sys * B ; // where k i s Boltzmann c o n s t a n t disp ( ’W’ ,Pn , ’ The n o i s e power i s ’ ) ; Pn_dBm =10* log10 ( Pn /10^ -3) ; disp ( ’dBm ’ , Pn_dBm , ’ The t h e r m a l n o i s e power i s ’ ) ; 94
Scilab code Exa 18.7 example 7 1 clc ; 2 // p a g e no 682 3 // p r o b no 1 8 . 7 4 // r e f e r ex no 1 8 . 3 and 1 8 . 6 5 Pr_dBm = -62; // power a t t h e r e c e i v e r i n dBm 6 Pn_dBm = -100; // t h e r m a l n o i s e power i n dBm 7 // c a r r i e r t o n o i s e r a t i o i n dB i s g i v e n a s 8 C_N = Pr_dBm - Pn_dBm ; 9 disp ( ’ dB ’ ,C_N , ’ C a r r i e r t o n o i s e r a t i o i s ’ ) ;
Scilab code Exa 18.8 example 8 1 clc ; 2 // p a g e no 683 3 // p r o b no 1 8 . 8 4 // r e f e r ex 1 8 . 7 5 fb =40*10^6; // b i t r a t e i n bps 6 Pr_dBm = -62; // power a t t h e r e c e i v e r i n dBm 7 Pr =10^( Pr_dBm /10) *10^ -3; // power a t t h e r e c e i v e r 8 9 10 11 12 13 14 15
W Eb = Pr / fb ; // t h e e n e r g y p e r b i t i n J k =1.38*10^ -23; // Boltzmann c o n s t a n t T =350; // t h e n o i s e power d e n s i t y i s No = k * T ; // Energy p e r b i t t o n o i s e d e n s i t y r a t i o i n dB i s Eb_No =10* log10 ( Eb / No ) ; disp ( ’ dB ’ , Eb_No , ’ Energy p e r b i t t o n o i s e d e n s i t y r a t i o i s ’ ); 95
Scilab code Exa 18.9 example 9 1 clc ; 2 // p a g e no 686 3 // p r o b no 1 8 . 9 4 // r e f e r f i g 1 8 . 7 ( b ) 5 // T h i s i s t h e s t a n d a r d s u p e r h e t e r o d y n e r e c e i v e r 6 fc =6870; // t h e r e c e i v e d c a r r i e r f r e q i n MHz 7 IF =70; // IF i n MHz 8 // The l o c a l o s c i l l a t o r f r e q i s g i v e n a s 9 f_lo = fc - IF ; 10 disp ( ’MHz ’ , f_lo , ’ The l o c a l o s c i l l a t o r f r e q i s ’ ) ;
Scilab code Exa 18.10 example 10 1 clc ; 2 // p a g e no 688 3 // p r o b no 1 8 . 1 0 4 // r e f e r f i g 1 8 . 9 a ) 5 fc_r =6870; // c a r r i e r f r e q o f r e c e i v e d s i g n a l i n MHz 6 fc_t =6710; // c a r r i e r f r e q o f t r a n s m i t t e d s i g n a l i n 7 8 9 10 11 12 13 14 15 16
MHz IF =70; // i n MHz // t h e f r e q o f s h i f t o s c i l l a t o r i s fso = fc_r - fc_t ; disp ( ’MHz ’ ,fso , ’ The f r e q o f s h i f t o s c i l l a t o r // t h e l o c a l o s c i l l a t o r f r e q i s g i v e n a s flo = fc_t - IF ; disp ( ’MHz ’ ,flo , ’ The l o c a l o s c i l l a t o r f r e q i s // from f i g , m i x e r 3 w i l l p r o d u c e an o / p a s op_mix3 = flo + fso ; disp ( ’MHz ’ , op_mix3 , ’O/P o f Mixer 3 i s ’ ) ; 96
Scilab code Exa 18.11 example 11 1 clc ; 2 // p a g e no 690 3 // p r o b no 1 8 . 1 1 4 // A t y p i c a l m i c r o w a v e
d i g i t a l r a d i o s y s t e m u s e s 16−
QAM. 5 fb =90.524; // b i t r a t e e x p r e s s e s d i n Mbps 6 n =16; // f o r 16−QAM s y s t e m 7 // p a r t a ) c a l c u l a t i o n o f no o f b i t s p e r symbol 8 m = log2 ( n ) ; 9 disp ( ’ b i t s ’ ,m , ’ The number o f b i t s p e r symbol a r e ’ ) ; 10 // p a r t b ) c a l c l a t i o n o f baud r a t e 11 // baud r a t e i s 1/4 t h o f t h e b i t r a t e 12 baud = fb /4; 13 disp ( ’ Mbaud ’ , baud , ’ The baud r a t e i s ’ ) ;
Chapter 19 Television
Scilab code Exa 19.1 example 1 1 clc ; 2 // p a g e no 703 3 // p r o b no 1 9 . 1 4 // I n t h e g i v e n problem , a v i d e o
s i g n a l h a s 50% o f
t h e maximum l u m i n a n c e l e v e l //A b l a c k s e t u p l e v e l o f 7 . 5 IRE r e p r e s e n t s z e r o l u m i n a n c e , and 100 IRE i s max b r i g h t n e s s . T h e r e f o r e t h e r a n g e from min t o max l u m i n n a n c e h a s 1 00 − 7 .5 = 92 . 5 u n i t s . 6 // T h e r e f o r e t h e l e v e l i s 7 IRE =7.5 + (0.5*92.5) ; 8 disp ( ’ IRE u n i t s ’ ,IRE , ’ L e v e l o f v i d e o s i g n a l s i n IRE u n i t s ’ ); 5
Scilab code Exa 19.2 example 2 1 clc ; 2 // p a g e no 704
// p r o b no 1 9 . 2 // p a r t a ) h o r i z o n t a l b l a n k i n g // H o r i z o n t a l b l a n k i n g o c c u p i e s a p p r o x i m a t e l y 10 u s o f the 6 3 . 5 us d u r a t i o n o f each l i n e , Hztl_blnk =10/63.5 *100; disp ( ’ o f t h e s i g n a l ’ , ’% ’ , Hztl_blnk , ’ H o r i z o n t a l b l a n k i n g o c c u p i e s ’ ); // p a r t b ) v e r t i c a l b l a n k i n g // V e r t i c a l b l a n k i n g o c c u p i e s a p p r o x i m a t e l y 21 l i n e s p e r f i e l d o r 42 l i n e s p e r f r a m e . A f r a m e h a s 525 l i n e s a l t o g e t h e r , so Vert_blnk =42/525 *100; disp ( ’ o f t h e s i g n a l ’ , ’% ’ , Vert_blnk , ’ v e r t i c a l b l a n k i n g o c c u p i e s ’ ); // p a r t c ) a c t i v e s i g n a l // s i n c e 8% o f t h e t i m e i s l o s t i n v e r t i c a l b l a n k i n g , 92% o f t h e t i m e i s i n v o l v e d i n t h e t a n s m i s s i o n of the a c t i v e l i n e s . act_vid = (100 - Hztl_blnk ) *(100 - Vert_blnk ) /100; disp ( ’% ’ , act_vid , ’ The a c i v e v i d e o i s ’ ) ;
Scilab code Exa 19.3 example 3 1 clc ; 2 // p a g e no 707 3 // p r o b no 1 9 . 3 4 // A t y p i c a l low−c o s t monochrome r e c e i v e r h a s a 5 6 7 8
v i d e o bandwidth o f 3MHz B =3; // bandwidth i n MHz // The h o r i z o n t a l r e s o l u t i o n i n l i n e s i s g i v e n a s L_h = B *80; disp ( ’ l i n e s ’ ,L_h , ’ The h o r i z o n t a l r e s o l u t i o n i n l i n e s i s ’ );
Scilab code Exa 19.4 example 4 1 clc ; 2 // p a g e no 709 3 // p r o b no 1 9 . 4 4 // A RGB v i d e o s i g n a l h a s n o r m a l i z e d v a l u e s a s 5 R =0.2; G =0.4; B =0.8; 6 // The l u m i n a n c e s i g n a l i s g i v e n a s 7 Y =0.30* R +0.59* G +0.11* B ; 8 disp (Y , ’ The l u m i n a n c e s i g n a l i s ’ ) ; 9 // The i n −p h a s e component o f t h e c o l o r s i g n a l i s
given as 10 I =0.60* R -0.28* G -0.32* B ; 11 disp (I , ’ The i n −p h a s e component o f t h e c o l o r
i s ’ ); // The q u a d r a t u r e component o f t h e c o l o r s i g n a l i s given as 13 Q =0.21* R -0.52* G +0.31* B ; 14 disp (Q , ’ The q u a d r a t u r e component o f t h e c o l o r s i g n a l i s ’ );
Scilab code Exa 19.5 example 5 1 clc ; 2 // p a g e no 712 3 // p r o b no 1 9 . 5 4 . // /// r e f e r t a b l e 1 9 . 1 / / / / / / / . . . . . . . 5 // The p r o p o r t i o n i n t h e t a b l e a r e v o l t a g e
and have t o be s q u a r e d t o g e t power . l e v e l i s given as
6 // f o r b l a c k s e t u p t h e v o l t a g e 7 v =0.675;
// T h e r e f o r e t h e power l e v e l a s a f r a c t i o n o f t h e maximum t r a n s m i t t e r power i s 9 P_black_setup = v ^2 *100; 10 disp ( ’ o f t h e maximum t r a n s m i t t e r power i s used to t r a n s m i t a b l a c k s e t u p ’ , ’% ’ , P_black_setup ,) 8
Scilab code Exa 19.6 example 6 1 clc ; 2 // p a g e no 728 3 // p r o b no 1 9 . 6 4 // r e f e r f i g 1 9 . 2 7 o f t h e p a g e no 729 5 // from f i g , we can w r i t e down t h e v a l u e s 6 7 8 9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
directly as given In1 =100*10^ -3; // e x p r e s s e d i n mV In1_dBmV =20* log10 ( In1 /1) ; disp ( ’dBmV ’ , In1_dBmV , ’ The i n p u t o f Amp 1 i s ’ ) ; // t h i s a b o v e c a l c u l a t e d s i g n a l i s a p p l i e d t o t h e i n p u t o f t h e f i r s t a m p l i f i e r , i . e . head−end s i g n a l processing G1 =40; // g a i n o f Amp 1 e x p r e s s e d i n dB // o / p l e v e l o f Amp 1 i s Out1 = In1_dBmV + G1 ; disp ( ’dBmV ’ , Out1 , ’ The o u t p u t o f Amp 1 i s ’ ) ; L =15; // e x p r e s s e d i n dB // The i n p u t l e v e l o f Amp 2 i s In2_dBmV = Out1 - L ; disp ( ’dBmV ’ , In2_dBmV , ’ The i n p u t o f Amp 2 i s ’ ) ; G2 =25; // g a i n o f Amp2 e x p r e s s e d i n dB // o / p l e v e l o f Amp 2 i s Out2 = In2_dBmV + G2 ; disp ( ’dBmV ’ , Out2 , ’ The o u t p u t o f Amp 2 i s ’ ) ; L1 =10; // l o s s i n c a b l e L2 =12; // l o s s i n d i r e c t i o n a l c o u p l e r // The i n p u t l e v e l o f Amp 3 i s 101
25 In3_dBmV = Out2 - L1 - L2 ; 26 disp ( ’dBmV ’ , In3_dBmV , ’ The i n p u t o f Amp 3 i s ’ ) ; 27 G3 =20; // g a i n o f Amp3 e x p r e s s e d i n dB 28 Out3 = In3_dBmV + G3 ; 29 disp ( ’dBmV ’ , Out3 , ’ The o u t p u t o f Amp 3 i s ’ ) ; 30 // There i s f u r t h e r 3dB c a b l e l o s s and 20dB l o s s
the tap 31 L3 =3; // l o s s i n c a b l e 32 L4 =20; // l o s s i n t a p 33 // s i g n a l s t r e n g t h a t t h e t a p i s 34 Vdrop_dBmV = Out3 - L3 - L4 ; 35 V_drop =10^( Vdrop_dBmV /20) ; // e x p r e s s e d i n mV 36 disp ( ’mV ’ , V_drop , ’ S i g n a l s t r e n g t h a t s u b s c r i b e r t a p
i s ’ ); 37 // C a l c u l a t i o n o f power i n t o 75 ohm 38 R =75; // e x p r e s s e d i n ohm 39 Pdrop = ( V_drop *10^ -3) ^2/ R ; 40 Pdrop_dBm =10* log10 ( Pdrop /10^ -3) ; 41 disp ( ’dBm ’ , Pdrop_dBm , ’ The power a t t h e end i s ’ ) ;
Scilab code Exa 19.7.a example 7 1 clc ; 2 // p a g e no 731 3 // p r o b no 1 9 . 7 4 // I n g i v e n p r o b l e m a TV r e c e i v e r 5 6 7 8 9 10
is channel 6. // A l l modern Rx u s e s a p i c t u r e IF o f 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 // The p i c t u r e c a r r i e r o f c h a n n e l 6 f r e q u e n c y o f 8 3 . 2 5MHz, s o ch =6; Fc =83.25; // e x p r e s s e d i n MHz IF =45.75; // e x p r e s s e d i n MHz f_lo = Fc + IF ; 102
tuned to 4 5 . 7 5 MHz w i t h into the cable . i s at a
11 a = f_lo + ch /2; b = f_lo - ch /2; 12 disp ( ’ band ’ , ’MHz ’ ,a , ’ t o ’ , ’MHz ’ ,b , ’ The i n t e r f e r e n c e
Scilab code Exa 19.7.b example 8 1 clc ; 2 // p a g e no 740 3 // p r o b no 1 9 . 8 4 Nh =640; Nv =480; // r e s o l u t i o n
of d i g i t a l video signal
as 640∗480 p i x e l s 5 Rf =30; // f r a m e r a t e e x p r e s s e d i n Hz 6 m =8; // b i t s p e r s a m p l e 7 // By u s i n g t h e p r o d u c t o f H o r i z o n t a l & v e r t i c a l 8 9 10 11 12 13
r e s o l u t i o n , no o f l u m i n a n c e p i x e l s p e r f r a m e a r e Npl = Nh * Nv ; // s i n c e e a c h o f t h e c o l o r s i g n a l s h a s one−f o u r t h t h e t o t a l no o f luma p i x e l s Npt =1.5* Npl ; // t h e r e f o r e b i t r a t e i s g i v e n a s fb = Npt * m * Rf ; disp ( ’ bps ’ ,fb , ’ The b i t r a t e f o r t h e s i g n a l i s ’ ) ;
Chapter 20 Satellite Communication
Scilab code Exa 20.1 example 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
clc ; // p a g e no 754 // p r o b no 2 0 . 1 // p a r t A) d =500; //By u s i n g t h e e q u a t i o n f o r v e l o c i t y o f a s a t e l l i t e v = sqrt (4*10^11/( d +6400) ) ; disp ( ’m/ s ’ ,v , ’A) The v e l o c i t y o f a s a t e l l i t e i s ’ ) ; // The r a d i u s o f o r b i t i s r =(6400+ d ) *10^3 // i n m // 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 T =(2* %pi * r ) / v ; disp ( ’ s e c ’ ,T , ’ The o r b i t a l p e r i o d o f s a t e l l i t e i s ’ ) ; // p a r t B) d =36000; //By u s i n g t h e e q u a t i o n f o r v e l o c i t y o f a s a t e l l i t e v = sqrt (4*10^11/( d +6400) ) ; disp ( ’m/ s ’ ,v , ’B) The v e l o c i t y o f a s a t e l l i t e i s ’ ) ; // The r a d i u s o f o r b i t i s r =(6400+ d ) *10^3 // i n m // The o r b i t a l p e r i o d o f s a t e l l i t e i s 104
22 T =(2* %pi * r ) / v ; 23 disp ( ’ s e c ’ ,T , ’ The o r b i t a l
period of s a t e l l i t e
Scilab code Exa 20.2 example 2 1 2 3 4 5 6 7
clc ; // p a g e no 757 // p r o b no 2 0 . 2 R =6400; // R a d i u s o f e a r t h L =45; // e a r t h s t a t i o n l a t t i t u d e H =36000 // H e i g h t o f s a t e l l i t e a b o v e t h e earth ; ang = atand ((6400* sind (45) ) /(36000+(6400*(1 - cosd (45) ) ) )); 8 disp ( ang ) ;
Scilab code Exa 20.3 example 3 1 clc ; 2 // p a g e no 758 3 // p r o b no 2 0 . 3 4 // D e t e r m i n a t i o n o f 5 6 7 8 9
lenght of geostationary s a t e l l i t e w i t h a n g l e o f e l a v a t i o n =30 d e g r e e r =64*10^5; // R a d i u s o f e a r t h h =36*10^6; // h e i g h t o f s a t e l l i t e theta =30; // a n g l e o f e l e v a t i o n d = sqrt ((( r + h ) ^2) -(( r * cosd ( theta ) ) ^2) ) -( r * sind ( theta ) ); disp ( ’km ’ ,d /1000 , ’ The l e n g t h o f t h e p a t h i s ’ ) ;
Scilab code Exa 20.4 example 4 105
1 clc ; 2 // p a g e no 759 3 // p r o b no 2 0 . 4 4 //A s a t e l l i t e t r a n s m i t t e r 5 6 7 8 9 10 11 12
o p e r a t e s a t 4GHz w i t h 7W & a n t e n n a g a i n 40 dBi // R e c e i v e r a n t e n n a g a i n 30 dBi & p a t h l e n g t h i s 4∗10ˆ7 Gt_dBi =40; Gr_dBi =30; Pt =7; d =40000; // i n km f =4000; // i n MHz Pr_Pt_dB = Gt_dBi + Gr_dBi -(32.44+(20* log10 ( d ) ) +(20* log10 ( f ) ) ) ; // S i g n a l s t r e n g t h a t t r a n s m i t t e r Pt_dBm =10* log10 ( Pt /10^ -3) ; Pr_dBm =( Pt_dBm ) +( Pr_Pt_dB ) ; disp ( ’dBm ’ , Pr_dBm , ’ The v a l u e o f s i g n a l s t r e n g t h a t r e c e i v e r ’ );
Scilab code Exa 20.5 example 5 1 clc ; 2 // p a g e no 760 3 // p r o b no 2 0 . 5 4 // I n t h e g i v e n p r o b l e m 5 G =40; // r e c e i v i n g a n t e n n a g a i n 6 T_sky =15; // n o i s e temp 7 L =0.4; // l o s s b e t w e e n a n t e n n a and LNA i n p u t 8 T_eq =40; // n o i s e t e m p e r a t u r e f LNA 9 // F i r −s t we have t o f i n d G i n dB 10 G_dB = G - L ; 11 // For t h e c a l c u l a t i o n o f T , we have t o c o n v e r t t h e
feedhorn l o s s i n t o a r a t i o as f o l l o w s 12 L =10^(0.4/10) ; 13 Ta = (( L -1) *290 + T_sky ) / L ; 14 // The r e c e i v e r n o i s e t e m p e r a t u r e
chosen r e f e r e n c e point , t h e e f o r e 106
i s g i v e n wrt t h e
Ratio = G -10* log10 ( Ta + T_eq ) ; disp ( ’ dB ’ , Ratio , ’ The r e c e i v e r n o i s e t e m p e r a t u r e i s ’ ) ;
Scilab code Exa 20.6 example 6 1 clc ; 2 // p a g e no 761 3 // p r o b no 2 0 . 6 4 NF_dB =1.5; // n o i s e f i g o f a r e c e i v e r 5 NF =10^( NF_dB /10) ; 6 // E q u i v a l e n t n o i s e t e m p e r a t u r e i s g i v e b a s 7 T_eq =290*( NF -1) ; 8 disp ( ’K ’ , T_eq , ’ E q u i v a l e n t n o i s e t e m p e r a t u r e
Scilab code Exa 20.7 example 7 1 clc ; 2 // p a g e no 761 3 // p r o b no 2 0 . 7 4 // r e f e r p r o b no 2 0 . 5 5 d =38000; // d i s t a n c e o f 6 7 8 9 10 11 12 13 14 15
s a t e l l i t e from t h e E a r t h surface P =50; // t r a n s m i t t e r power G =30; // a n t e n n a g a i n f =12000; // f r e q u e n c y i n MHz B =10^6; // Bandwidth i n MHz // from p r o b l e m no 2 . 5 G_T =21; L_misc =0; k_dBW = -228.6; // Boltzmann ’ s c o n s t a n t i n dBW // There a r e no m i s c e l l a n e o u s l o s s // The s t e l l i t e t r a n s m i t t i n g power i n dBW i s 107
16 17 18 19 20 21 22
Pt_dBW = 10* log10 ( P ) ; // The EIPR i n dBW EIRP_dBW = Pt_dBW + G ; // FSL i n dB FSL_dB = 32.44 + (20* log10 ( d ) ) + (20* log10 ( f ) ) ; // The c a r r i e r t o n o i s e r a t i o i s ratio = EIRP_dBW - FSL_dB - L_misc + G_T - k_dBW - 10* log10 ( B ) ; 23 disp ( ’ dB ’ , ratio , ’ The c a r r i e r t o n o i s e r a t i o a t t h e r e c e i v e r i s ’ );
Scilab code Exa 20.8 example 8 1 clc ; 2 // p a g e no 762 3 // p r o b no 2 0 . 8 4 D =40000; // d i s t a n c e 5 6 7 8 9 10 11
o f s a t e l l i t e from t h e e a r t h station v =3*10^8; // v e l o o f l i g h t d =80000; // d i s t a n c e b e t w e e n two e a r t h s t a t i o n s // t i m e d e l a y i s g i v e n a s t=d/v; // t o t a l t i m e d e l a y w i l l be t w i c e t h a t o f c a l c u l a t e d above T =2* t ; disp ( ’ s e c ’ ,T , ’ The t o t a l t i m e d e l a y i s ’ ) ;
Scilab code Exa 20.9 example 9 1 clc ; 2 // p a g e no 769 3 // p r o b no 2 0 . 9 4 f_down = 4*10^9; // d o w n l i n k f r e q
5 D =3; // d i a m e t e r 6 n =0.55; // e f f i c i e n c y 7 c =3*10^8; // v e l o o f l i g h t 8 // The g a i n o f a p a r a b o l i c a n t e n n a 9 10 11 12 13 14 15
i s g i v e n a s G=(n∗ %pi ˆ2∗Dˆ 2 ) / wl ˆ 2 . T h e r e f o r e w a v e l e n g t h i s g i v e n a s wl = c / f_down G =( n * %pi ^2* D ^2) / wl ^2; G_dB = 10* log10 ( G ) ; disp ( ’ dB ’ , G_dB , ’ The g a i n o f TVRO i s ’ ) ; // The beamwidth i s g i v e n a s bw = (70* wl ) / D ; disp ( ’ d e g r e e ’ ,bw , ’ The beamwidth i s ’ ) ;
Chapter 21 Cellular Radio
Scilab code Exa 21.1 example 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc ; // p a g e no 795 // p r o b no 2 1 . 1 v =100; // i n km/ h r // f i r s t c o n v e r t s p e e d i n t o m/ s e c v1 =(100*10^3) /3600; // i n km/ s e c // p a r t a ) r =10^4; // i n m t =(2* r ) / v1 ; disp ( ’ s e c ’ ,t , ’ H a n d o f f t i m e i s ’ ) ; // p a r t b ) r =500; // i n m t =(2* r ) / v1 ; disp ( ’ s e c ’ ,t , ’ H a n d o f f t i m e i s ’ ) ;
Scilab code Exa 21.2 example 2 1 clc ;
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// p a g e no 807 // p r o b no 2 1 . 2 N =12; m =120; a =20000; th =30; // i n min / day t h i s means H =0.5; tp =10; // p a r t a ) C a l c u l a t i o n o f t h e a v e r a g e and peak t r a f f i c i n e r l a n g s f o r the whole system // The a v e r a g e t r a f f i c i s T = a * H /24; disp ( ’E ’ ,T , ’ a ) The a v e r a g e t r a f f i c i s ’ ) ; // The peak t r a f f i c i s T1 =( a * tp ) /60; disp ( ’E ’ ,T1 , ’ The peak t r a f f i c i s ’ ) ; // p a r t b ) C a l c u l a t i o n o f t h e a v e r a g e and peak t r a f f i c i n e r l a n g s f o r one c e l l // The a v e r a g e t r a f f i c p e r c e l l i s t=T/m; disp ( ’E ’ ,T , ’ b ) The a v e r a g e t r a f f i c p e r c e l l i s ’ ) ; // The peak t r a f f i c p e r c e l l i s t = T1 / m ; disp ( ’E ’ ,T1 , ’ The peak t r a f f i c p e r c e l l i s ’ ) ; // p a r t c ) // For a v e r a g e t r a f f i c a t 3 . 4 7 E , t h e b l o c k i n g p r o b a b i l i t y i s much l e s s t h a n 1%, s i n c e t h e a v e r a g e no o f c a l l i s much l e s s t h a n t h e no o f c h a n n e l s . However , t h e b l o c k i n g p r o b a b i l i t y i n c r e a s e s t o j u s t o v e r 5%
Scilab code Exa 21.3 example 3 1 clc ; 2 // p a g e no 816 3 // p r o b no 2 1 . 3
4 tg =123*10^ -6; 5 c =3*10^8; 6 // The maximum d i s t a n c e b e t w e e n b a s e and m o b i l e i s 7 d = c * tg ; 8 disp ( ’m ’ ,d , ’ The maximum d i s t a n c e b e t w e e n b a s e and
Chapter 22 Personal Communication Systems
Scilab code Exa 22.1 example 1 1 clc ; 2 // p a g e no 842 3 // p r o b no 2 2 . 1 4 PR = -100; // I n dBm 5 // The m o b i l e t r a n s m i t t e d power i s 6 PT_dBm = -76 - PR ; // t h i s i s i n dBm 7 disp ( ’ o r ’ , ’dBm ’ , PT_dBm , ’ The m o b i l e t r a n s m i t t e d power
i n dBm i s ’ ) ; 8 PT_mW =10^( PT_dBm /10) ; 9 disp ( ’mW’ , PT_mW , ’ The m o b i l e t r a n s m i t t e d power i s ’ ) ;
Chapter 23 Paging and Wireless Data Networking
Scilab code Exa 23.1 example 1 1 clc ; 2 // p a g e no 863 3 // p r o b no 2 3 . 1 4 bit_rate = 512; // i b bps 5 t =60; // i n s e c 6 // p r e a m b l e u s e s 576 b i t s 7 preamble =576; 8 bits_total = bit_rate * t ;; 9 usable_bits = bits_total - preamble ; 10 // e a c h b a t c h h a s one 32− b i t s s y n c h r o n i z i n g c o d e w o r d
and s i x t e e n 32− b i t a d d r e s s c o d e w o r d s f o r a t o t a l o f 17∗32=544 b i t s . T h e r e f o r e bits_per_batch = 17*32; batches_per_min = usable_bits / bits_per_batch ; addr =16; addr_per_min = batches_per_min * addr ; disp ( addr_per_min , ’ The no o f p a g e s t r a n s m i t t e d i n one min a r e ’ ) ;
Scilab code Exa 23.2 example 2 1 clc ; 2 // p a g e no 864 3 // p r o b no 2 3 . 2 4 // For t h e g i v e n FLEX s y s t e m 5 Wc =25*10^3; 6 bit_rate = 6400; // i n bps 7 efficiency = bit_rate / Wc ; 8 disp ( ’ b / s /Hz ’ , efficiency , ’ The e f f i c i e n c y
Scilab code Exa 23.3 example 3 1 clc ; 2 // p a g e no 871 3 // p r o b no 2 3 . 3 4 // f o r t h e B l u e t o o t h s y s t e m 5 fh_max =1/(625*10^ -6) ; 6 fh_min =1/(5*625*10^ -6) ; 7 disp ( ’ Hz ’ , fh_min , ’ The minimum h o p p i n g r a t e
fh_max , ’ The maximum h o p p i n g r a t e i s
Chapter 24 Fiber Optics
Scilab code Exa 24.3 example 1 1 clc ; 2 // p a g e no 888 3 // p r o b no 2 4 . 3 4 NA =0.15; 5 wl =820*10^ -9; // i n m 6 d_core =2*(0.383* wl / NA ) ; 7 disp ( ’m ’ , d_core , ’ The c o r e d i a m e t e r
Scilab code Exa 24.4 example 2 1 2 3 4 5 6 7 8
clc ; // p a g e no 890 // p r o b no 2 4 . 4 Bl =500; // i n MHz−km B =85; // i n MHz // By u s i n g Bandwidth−d i s t a n c e p r o d u c t f o r m u l a l = Bl / B ; disp ( ’km ’ ,l , ’ The maximun d i s t a n c e t h a t can be u s e between r e p e a t e r s i s ’ ); 116
Scilab code Exa 24.5 example 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
clc ; // p a g e no 891 // p r o b no 2 4 . 5 wl0 =1310; // i n n s So =0.05; // i n p s / (nmˆ2∗km) l =50; // i n km wl =1550; // i n n s d =2; // i n nm // C h r o m a t i c d i s p e r s i o n i s g i v e n a s Dc =( So /4) *[ wl -( wl0 ^4/ wl ^3) ]; // D i s p e r s i o n i s D = Dc * d ; // T h e r e f o r e t o t a l d i s p e r s i o n i s dt = D * l ; disp ( ’ p s ’ ,dt , ’ The t o t a l d i s p e r s i o n i s ’ ) ;
Scilab code Exa 24.6 example 6 1 2 3 4 5 6 7 8 9 10
clc ; // p a g e no 893 // p r o b no 2 4 . 6 // R e f e r p r o b l e m 2 4 . 5 dt =949*10^ -12; // i n s e d l =50; // i n km B =1/(2* dt ) ; //By u s i n g Bandwidth−d i s t a n c e p r o d u c t f o r m u l a Bl = B * l ; disp ( ’ Hz−km ’ ,Bl , ’ The bandwidth d i s t a n c e p r o d u c t i s ’ ) ; 117
Scilab code Exa 24.7 example 5 1 clc ; 2 // p a g e no 899 3 // p r o b no 2 4 . 7 4 // r e f e r t a b l e from t h e p r o b l e m p a g e no 899 5 P_coupling1 = -3; P_coupling2 = -6; P_coupling3 = -40; 6 7 8 9 10 11 12 13 14 15 16 17
// i n dB // P a r t a ) The p r o p o r t i o n o f i n p u t power e m e r g i n g a t port 2 P2_Pin =10^( P_coupling1 /10) ; disp ( ’% ’ , P2_Pin *100 , ’ a ) The p r o p o r t i o n o f i n p u t power e m e r g i n g a t p o r t 2 ’ ) ; P3_Pin =10^( P_coupling2 /10) ; disp ( ’% ’ , P3_Pin *100 , ’ The p r o p o r t i o n o f i n p u t power emerging at p o r t 3 ’ ); // P a r t b ) I n t h e r e v e r s e d i r e c t i o n , t h e s i g n a l i s 40 dB down f o r a l l c o m b i n a t i o n s , s o directivity = 40; disp ( ’ dB ’ , directivity , ’ D i r e c t i v i t y i s ’ ) ; Pin_total = P2_Pin + P3_Pin ; // e x c e s s l o s s i n dB loss = -10* log10 ( Pin_total ) ; disp ( ’ dB ’ , loss , ’ t h e e x c e s s l o s s i s ’ ) ;
Scilab code Exa 24.8 example 6 1 clc ; 2 // p a g e no 901 3 // p r o b no 2 4 . 8 4 wl =1*10^ -6; 5 c = 3*10^8;
6 h =6.626*10^ -34 7 f = c / wl ; 8 E = h * f ; // i n J o u l e 9 // t h i s e n e r g y can be c o n v e r t e d
i n t o e l e c t r o n −v o l t . we know 1eV =1.6∗10ˆ −19 J 10 eV =1.6*10^ -19 ; 11 E_ev = E / eV ; 12 disp ( ’ eV ’ , E_ev , ’ The e n e r g y o f p h o t o n i n eV i s ’ ) ;
Scilab code Exa 24.9 example 9 1 clc ; 2 // p a g e no 909 3 // p r o b no 24 9 4 // r e f e r f i g 2 4 . 2 5 5 P_in =500; Responsivity =0.33; 6 I_d = P_in * Responsivity ; 7 disp ( ’ nA ’ ,I_d , ’ The d i o d e c u r r e n t
Chapter 25 Fiber Optic Systems
Scilab code Exa 25.1 example 1 1 clc ; 2 // p a g e no 919 3 // p r o b no 25 1 4 span_length =40; // i n km 5 Pin_mW = 1.5; 6 signal_strength_dBm = -25; fiber_length = 2.5; // i n
km loss_per_slice_dB =0.25; f_loss_dB_per_km =0.3; loss_connector_dB =4; Pin_dBm =10* log10 ( Pin_mW ) ; splices = span_length / fiber_length -1; fiber_loss = span_length * f_loss_dB_per_km ; splice_loss = splices * loss_per_slice_dB ; T_loss = fiber_loss + splice_loss + loss_connector_dB ; 14 P_out = Pin_dBm - T_loss ; 15 sys_margin = P_out - signal_strength_dBm ; 16 disp ( ’ dB ’ , sys_margin , ’ The s y s t e m m a r g i n i s ’ ) ;
7 8 9 10 11 12 13
Scilab code Exa 25.2 example 2 1 clc ; 2 // p a g e no 921 3 // p r o b no 25 2 4 L =45; // i n km 5 dt =100; // i n n s 6 // The maximum p e r m i s s i b l e
value f o r the pulse −
spreading constant i s 7 D = dt / L ; 8 disp ( ’ n s /km ’ ,D , ’ The maximum p e r m i s s i b l e
t h e p u l s e −s p r e a d i n g c o n s t a n t i s ’ ) ;
Scilab code Exa 25.3 example 3 1 2 3 4 5 6 7 8 9 10 11 12
clc ; // p a g e no 922 // p r o b no 25 3 L =45; T_Rtx =50; T_Rrx =75; T_Rf =100; T_RT = sqrt ( T_Rtx ^2 + T_Rrx ^2 + T_Rf ^2) ; // a ) f o r NRZ fb =1/ T_RT ; disp ( ’GHz ’ ,fb , ’ a ) The maximum b i t r a t e f o r NRZ ’ ) ; // b ) f o r RZ fb =1/(2* T_RT ) ; disp ( ’GHz ’ ,fb , ’ b ) The maximum b i t r a t e f o r NRZ ’ ) ;
Scilab code Exa 25.4 example 4 1 clc ; 2 // p a g e no 924 3 // p r o b no 25 4
4 Bl =500; // i n MHz−km 5 L =5; // i n km 6 // u s i n g t h e bandwidth−d i s t a n c e p r o d u c t f o r m u l a
d i s p e r s i o n i s given as 7 D =500/ Bl ; 8 disp ( ’ n s /km ’ ,D , ’ D i s p e r s i o n i s ’ ) ; 9 // T o t a l r i s e t i m e i s g i v e n a s 10 T_rt = D * L ; 11 disp ( ’ n s ’ , T_rt , ’ T o t a l r i s e t i m e i s ’ ) ;
Scilab code Exa 25.5 example 5 1 2 3 4 5 6 7 8 9 10 11 12 13
clc ; // p a g e no 924 // p r o b no 25 5 T_Rrx =3*10^ -9; T_Rtx =2*10^ -9; fb =100*10^6; // i n bps L =25; // i n km T_RT = 1/(2* fb ) // we have t o compute r i s e t i m e t h e r e f o r e T_rf = sqrt ( T_RT ^2 - T_Rtx ^2 - T_Rrx ^2) // d i s p e r s i o n p e r km i s D = T_rf / L ; disp ( ’ n s /km ’ ,D /10^ -9 , ’ The maximum a c c e p t a b l e d i s p e r s i o n i s ’ ); 14 // u s i n g t h e bandwidth−d i s t a n c e p r o d u c t 15 Bl =500/ D ; 16 disp ( ’MHz−km ’ , Bl *10^ -9 , ’ The bandwidth−d i s t a n c e product i s ’ );