Scilab Textbook Companion for Digital Telephony by J. C. Bellamy 1

Similar documents
Scilab Textbook Companion for Wireless Communications Principles and Practices by T. S. Rappaport 1

Scilab Textbook Companion for Linear Algebra and Its Applications by D. C. Lay 1

Coding theory: Applications

E303: Communication Systems

Channel capacity. Outline : 1. Source entropy 2. Discrete memoryless channel 3. Mutual information 4. Channel capacity 5.

PCM Reference Chapter 12.1, Communication Systems, Carlson. PCM.1

Estimation of Optical Link Length for Multi Haul Applications

Propagation losses in optical fibers

Scilab Textbook Companion for Optical Fiber Communication by A. Kalavar 1

16.36 Communication Systems Engineering

Review Quantitative Aspects of Networking. Decibels, Power, and Waves John Marsh

CSE 123: Computer Networks

CS6956: Wireless and Mobile Networks Lecture Notes: 2/4/2015

Scilab Textbook Companion for Microwaves and Radar Principles and Applications by A. K. Maini 1

Nagoya Institute of Technology

ETSF15 Analog/Digital. Stefan Höst

Solutions Communications Technology II WS 2010/2011

Diversity-Multiplexing Tradeoff in MIMO Channels with Partial CSIT. ECE 559 Presentation Hoa Pham Dec 3, 2007

Introduction to Information Theory. By Prof. S.J. Soni Asst. Professor, CE Department, SPCE, Visnagar

ELECTRONICS & COMMUNICATIONS DIGITAL COMMUNICATIONS

Scilab Textbook Companion for Microwave and Radar Engineering by M. Kulkarni 1

Lecture 18: Gaussian Channel

Lecture 4 Capacity of Wireless Channels

ATM VP-Based Ring Network Exclusive Video or Data Traffics

Digital Signal Processing

Chapter 5. Elementary Performance Analysis

Pulse-Code Modulation (PCM) :

Blind phase/frequency synchronization with low-precision ADC: a Bayesian approach

Scilab Textbook Companion for Linear Algebra And Its Applications by G. Strang 1

Scilab Textbook Companion for Data Communications And Networking by B. A. Forouzan 1

Approximate Algorithms for Maximizing the Capacity of the Reverse Link in Multiple Class CDMA Systems

Optical Fibre Communication Systems

Optimal Signal Constellations for Fading Space-Time Channels

Principles of Communications

Topic 3. Design of Sequences with Low Correlation

Compression methods: the 1 st generation

Predictive Coding. Prediction Prediction in Images

Predictive Coding. Prediction

Source-Controlled Variable-Rate Multimode Wideband Speech Codec (VMR-WB) Service Option 62 for Spread Spectrum Systems

EE4512 Analog and Digital Communications Chapter 4. Chapter 4 Receiver Design

Example: Bipolar NRZ (non-return-to-zero) signaling

Sample Problems for the 9th Quiz

Introduction to queuing theory

Information Sources. Professor A. Manikas. Imperial College London. EE303 - Communication Systems An Overview of Fundamentals

Non Orthogonal Multiple Access for 5G and beyond

EE5356 Digital Image Processing. Final Exam. 5/11/06 Thursday 1 1 :00 AM-1 :00 PM

Optoelectronic Applications. Injection Locked Oscillators. Injection Locked Oscillators. Q 2, ω 2. Q 1, ω 1

Adaptive Reverse Link Rate Control Scheme for cdma2000 1xEV-DO Systems

Analysis of coding on non-ergodic block-fading channels

Optical Fiber Concept

Multiaccess Problem. How to let distributed users (efficiently) share a single broadcast channel? How to form a queue for distributed users?

CS578- Speech Signal Processing

Scilab Textbook Companion for Physics by R. Resnick, D. Halliday, K. S. Krane 1

Multimedia Networking ECE 599

Consider a 2-D constellation, suppose that basis signals =cosine and sine. Each constellation symbol corresponds to a vector with two real components

EE 4TM4: Digital Communications II. Channel Capacity

EVALUATION OF PACKET ERROR RATE IN WIRELESS NETWORKS

Turbo Codes for xdsl modems

Class of waveform coders can be represented in this manner

PHYSICS 4TH EDITION WALKER PDF

Quantum Repeaters and Memories


Chapter 3: Technology Related Modelling Examples

LIKELIHOOD RECEIVER FOR FH-MFSK MOBILE RADIO*

Mobile Communications (KECE425) Lecture Note Prof. Young-Chai Ko

Scilab Textbook Companion for The Fundamentals of Engineering Physics by P. S. Khare and A. Swarup 1

DETERMINING the information theoretic capacity of

Giuseppe Bianchi, Ilenia Tinnirello

A Family of Nyquist Filters Based on Generalized Raised-Cosine Spectra

Finite Word Length Effects and Quantisation Noise. Professors A G Constantinides & L R Arnaut

Introduction to Wireless & Mobile Systems. Chapter 4. Channel Coding and Error Control Cengage Learning Engineering. All Rights Reserved.

Estimation of Performance Loss Due to Delay in Channel Feedback in MIMO Systems

Information Theory and Coding Techniques

Digital Image Processing Lectures 25 & 26

Chapter 5. Transmission System Engineering. Design the physical layer Allocate power margin for each impairment Make trade-off

A New Technique for Link Utilization Estimation

NEC's 1310 nm InGaAsP MQW DFB LASER DIODE IN COAXIAL PACKAGE FOR 2.5 Gb/s APPLICATION

MAHALAKSHMI ENGINEERING COLLEGE-TRICHY QUESTION BANK UNIT V PART-A. 1. What is binary symmetric channel (AUC DEC 2006)

Strong Performance Guarantees for Asynchronous Buffered Crossbar Schedulers

Digital Band-pass Modulation PROF. MICHAEL TSAI 2011/11/10

(Classical) Information Theory III: Noisy channel coding

Outline of the Lecture. Background and Motivation. Basics of Information Theory: 1. Introduction. Markku Juntti. Course Overview

EXPERIMENT Traffic Light Controller

requests/sec. The total channel load is requests/sec. Using slot as the time unit, the total channel load is 50 ( ) = 1

Long-baseline intensity interferometry: data transmission and correlation

MODULATION AND CODING FOR QUANTIZED CHANNELS. Xiaoying Shao and Harm S. Cronie

When does vectored Multiple Access Channels (MAC) optimal power allocation converge to an FDMA solution?

encoding without prediction) (Server) Quantization: Initial Data 0, 1, 2, Quantized Data 0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256

A Practical Application of Wave-Pipelining Theory on a Adaptive Differential Pulse Code Modulation Coder-Decoder Design

WIRELESS COMMUNICATIONS AND COGNITIVE RADIO TRANSMISSIONS UNDER QUALITY OF SERVICE CONSTRAINTS AND CHANNEL UNCERTAINTY

"ON LOSS PROBABILITIES FOR DELAYED -ACCESS CIRCUIT- SWITCHED MULTIPLEXERS''

Scilab Manual for Control Systems & Electrical Machines by Dr Lochan Jolly Electronics Engineering Thakur College of Engineering & Technology 1

ECE6604 PERSONAL & MOBILE COMMUNICATIONS. Week 3. Flat Fading Channels Envelope Distribution Autocorrelation of a Random Process

LOPE3202: Communication Systems 10/18/2017 2

Efficient Nonlinear Optimizations of Queuing Systems

Game Theoretic Approach to Power Control in Cellular CDMA

Orbital Angular Momentum (OAM) based Mode Division Multiplexing (MDM) over a km-length Fiber

Lecture 2. Fading Channel

Audio Coding. Fundamentals Quantization Waveform Coding Subband Coding P NCTU/CSIE DSPLAB C.M..LIU

Computation of Bit-Error Rate of Coherent and Non-Coherent Detection M-Ary PSK With Gray Code in BFWA Systems

Transcription:

Scilab Textbook Companion for Digital Telephony by J. C. Bellamy Created by Harish Shenoy B.Tech Electronics Engineering NMIMS, MPSTME College Teacher Not decided Cross-Checked by TechPassion May 0, 06 Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/nmeict-intro. This Textbook Companion and Scilab codes written in it can be downloaded from the Textbook Companion Project section at the website http://scilab.in

Book Description Title: Digital Telephony Author: J. C. Bellamy Publisher: Wiley India (P.) Ltd., New Delhi Edition: 3 Year: 000 ISBN: 9788650994

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.5 means solved example 3.5 of this book. Sec.3 means a scilab code whose theory is explained in Section.3 of the book.

Contents List of Scilab Codes 4 3 Voice Digitization 5 5 Digital Switching 8 6 Digital Modulation and Radio Systems 3 7 Network Synchronization Control and Management 5 8 Fiber Optic Transmission System 8 9 Digital Mobile Telephony 5 0 Data and Asynchronous Transfer Mode Network 7 Digital Subscriber Access 30 Traffic Analysis 33 3

List of Scilab Codes Exa 3. Exa 3. Exa 3.4 Exa 5. Exa 5. Exa 5.3 Exa 5.5 Exa 6.4 Exa 7. Exa 7.3 Exa 8. Exa 8. Exa 8.3 Exa 8.4 Program to calculate quantization interval and bits needed to encode each sample.................. 5 Program to calculate the minimum bit rate for a PCM encoder must provide for high fidelity......... 6 Program to calculate how many bits per sample can be saved by using DPCM.................. 7 Program to find the idle path in a three stage 89 line switch........................... 8 Program to determine the implementaton complexity of the TS switch....................... 9 Program to determine the implementaton complexity of a 048 channel...................... 0 Program to determine the implementaton complexity of a 307 channel..................... Program to determine system gain of 0Mbps Ghz digital microwave repeater using 4 PSK modulation... 3 Program to determine relative accuracy of maintaining a mutual slip rate ojective of one slip in 0hrs..... 5 Program to determine the minimum and maximum input channel rate accommodated by an M multiplexer 6 Program to determine the loss limit and the multimode dispersion limit of a graded index FOC........ 8 Program to determine the loss limit and the chromatic dispersion limit of a high performance SMF FOC... 9 Program to determine the BDP of SMF system and DS SMF system using DFB LD............... 0 Program to determine the difference in wavelength of two optical signal..................... 4

Exa 8.5 Program to determine the system gain......... Exa 8.6 Program to determine the range of SPE data rates that can be accomodated by the byte stuffing operation.. 3 Exa 9. Progam to determine the probability of maximum interference of a 64 channel CDMA system....... 5 Exa 0. Program to determine the amount of transmission capacity........................... 7 Exa 0.3 Program to determine the probability that the delay of an ATM voice cell.................... 8 Exa. Program to determine the distance limit imposed by the need to echo E bit in a BRI ST interface........ 30 Exa. Program to determine the theoretical maximum data rate of a prefectly equalized voiceband modem.... 3 Exa. Program to calculate how often do two calls arrive with less than milisec between them............ 33 Exa. Program to calculate the probability that eight or more arrivals occur in an chosen 30 sec............ 34 Exa.3 Program to calculate the probability that a 000 bit data block experiences exaclty 4 errors while being transmitted over a link having error............. 35 Exa.4 Program to calculate the percentage of total traffic carried by first five ckt and traffic carried by all other remaining.......................... 36 Exa.5 Program to calculate how much traffic can the trunk group carry........................ 37 5

Chapter 3 Voice Digitization Scilab code Exa 3. Program to calculate quantization interval and bits needed to encode each sample 3 // Example 3. 4 5 // Page 0 6 7 sqr =30 //SQR=30dB 8 9 q =*0^[ -( sqr -7.78) /0] 0 disp ( Thus 3 q u a n t i z a t i o n i n t e r v a l s a r e r needed f o r each p o l a r i t y f o r a t o t a l o f 6 i n t e r v a l s i n a l l. The number o f b i t z r e q u i r e d a r e d e t e r m i n e d as ) 3 N= log (6) 4 5 // R e s u l t 6 7 // q = 0. 0 7 8 V 8 6

9 //N = 4. 7 = 5 b i t s per sample Scilab code Exa 3. Program to calculate the minimum bit rate for a PCM encoder must provide for high fidelity 3 // Example 3. 4 5 // Page 05 6 7 dr =40 // dynamic range =400dB 8 9 SNR =50 // s i g n a l to n o i s e r a t i o =5 0dB 0 SQR =dr+snr 3 n =[( SQR -.76) /6.0] 4 5 disp ( This can be approximated to 5 b i t s per sample ) 6 7 disp ( Assuming e x c e s s sampling f a c t o r u s i n g D type channel, we c h o o s e sampling r a t e as 48KHz ) 8 9 disp ( T h e r e f o r e r e q u i r e d b i t r a t e i s ) 0 5*48000 3 // R e s u l t 4 5 // 70 kbps 7

Scilab code Exa 3.4 Program to calculate how many bits per sample can be saved by using DPCM 3 // Example 3. 4 4 5 // Page 8 6 7 w =800 // Omega=800Hz 8 9 // x ( t )=A s i n ( p i. wt ), e q u a t i o n f o r s i n e wave with maximum a m p l i t u d e 0 //x ( t )=A( p i ). w. c o s ( p i. wt ), d i f f w. r. t time 3 (* %pi ) *800*(/8000) 4 5 // 0. 6 8 3 a, x ( t ) max 6 7 disp ( s a v i n g s i n the b i t s per sample can be d e t e r m i n e d as ) 8 9 log (/0.68) 0 // R e s u l t 3 // 0. 6 7 b i t s 8

Chapter 5 Digital Switching Scilab code Exa 5. Program to find the idle path in a three stage 89 line switch 3 // Example 5. 4 5 // Page43 6 7 // R e f e r to t a b l e 5. on page36 8 9 disp ( From the t a b l e, s p a c e e x p a n s i o n f a c t o r o f 0. 3 4 i s 0. 0 0. Hence the u t i l i z a t i o n o f each i n t e r s t a g e i s g i v e n by ) 0 0./0.34 3 p = -[( -0.47) ^] // p r o b a b i l i t y t h a t one o f two l i n k s i n s e r i e s i s busy 4 5 disp ( T h e r e f o r e, the e x p e c t e d number o f paths to be t e s t e d are, ) 6 9

7 Np =[ -(0.67) ^5]/( -0.67) 8 9 // R e s u l t 0 // Only 3 o f the 5 paths s h o u l d be t e s t e d b e f o r e an i d l e path i s found Scilab code Exa 5. Program to determine the implementaton complexity of the TS switch 3 // Example 5. 4 5 // Page 53 6 7 // R e f e r to f i g u r e 5. 9 on page 5 8 9 N =80 //Number o f l i n k s 0 Nc =4 //Number o f c o n t r o l words 3 Nb =7 //Number o f b i t s per c o n t r o l word 4 5 Nb =5 //Number o f b i t s per c o n t r o l word 6 7 disp ( The number o f c r o s s p o i n t s i n the s p a c e s t a g e i s ) 8 9 Nx=N^ 0 disp ( The t o t a l number o f memory b i t s f o r the s p a c e s t a g e c o n t r o l s t o r e i s ) 3 Nbx =N*Nc*Nb 0

4 5 disp ( The t o t a l number o f memory b i t s f o r the time s t a g e i s ) 6 7 Nbt =(N*Nc *8) +(N*Nc*Nb ) 8 9 disp ( Thus the i m p l e m e n t a t i o n c o m p l e x i t y i s ) 30 3 Cmplx =Nx +[( Nbx + Nbt ) /00] 3 33 // R e s u l t 34 35 // Complexity i s 6784 e q u i v a l e n t c r o s s p o i n t. Scilab code Exa 5.3 Program to determine the implementaton complexity of a 048 channel 3 4 // Example 5. 3 5 6 // Page 56 7 8 k=7 // from e q u a t i o n 5. 4 on page 56 9 0 disp ( Using the v a l u e o f k ) disp ( Using the v a l u e o f k, the number o f c r o s s p o i n t d e t e r m i n e d a r e ) 3 4 *7*6 5 6 disp ( The number o f b i t s o f memory can be d e t e r m i n e d a r e )

7 8 N =[*7* 8*4]+[7* 8*8]+[7* 8*7] 9 0 // R e s u l t // The c o m p o s i t e i m p l e m e n t a t i o n c o m p l e c i t y i s 430 e q u i v a l e n t c r o s s p o i n t s. Scilab code Exa 5.5 Program to determine the implementaton complexity of a 307 channel 3 4 // Example 5. 5 5 6 // Page 6 7 8 9 0 n =3 // b i n a r y w. r. t (N/) ˆ k =7 // d e t e r m i n e d as a b l o c k i n g p r o b a b i l i t y o f 0. 0 0 5 3 4 // R e f e r e q u a t i o n s 5. 8 and 5. 9 5 6 Nx =[*04*7]+[7+(3^) ] 7 8 Nx =[*04*7]+[7*(3^) ] 9 0 Nbx =[*7*8*3*5]+{7*8*3*5} Nbt =[*04*8*8] 3 4 Nbtc =[*04*8*7]

5 6 cmplx =[ Nx +{( Nbx + Nbt + Nbtc ) /00}] 7 8 // R e s u l t 9 30 // Complexity i s 38,854 e q u i v a l e n t c r o s s p o i n t. 3

Chapter 6 Digital Modulation and Radio Systems Scilab code Exa 6.4 Program to determine system gain of 0Mbps Ghz digital microwave repeater using 4 PSK modulation 3 // Example 6. 4 4 5 // Page 35 6 7 // R e f e r to f i g u r e 6. 7 on page 300 8 9 0 disp ( SNR d e t e c t o r i s 3dB h i g h e r than Eb/N0, t h e r e f o r e ) snr =3.7 //SNR=3.7dB 3 4 disp ( S i n c e 4 PSK modulation p r o v i d e s bps /Hz, the s a m p l i n g r a t e i s 5 MHz, which i s Nqyuist r a t e, t h e r e f o r e ) 5 4

6 a =0* log0 (5000000000000) 7 8 a =0* log0 (.3) 9 0 A0=a -3.7-7 -3 - a disp ( At a c a r r i e r f r e q u e n c y o f GHz, the wavelength i s ) 3 4 (3*0^8) /(*0^9) 5 6 FM =6+60+0* log0 (0.5) -5-0* log0 (4* %pi *5*0^4) // Fade Margin can be found by Equation 6. 3 7 8 // R e s u l t 9 //A0 = 6dB 30 // wavelength = 0. 5 m 3 // Fade Margin = 3 8. 5 db 5

Chapter 7 Network Synchronization Control and Management Scilab code Exa 7. Program to determine relative accuracy of maintaining a mutual slip rate ojective of one slip in 0hrs 3 // Example 7. 4 5 // Page 350 6 7 8 df =(/0*60*60) 9 0 df =[/(0*60*60) ] disp ( S i n c e t h e r e a r e 8000 frame per second, the r e l a t i v e a c c u r a c y i s d e t e r m i n e d as ) 3 4 ans =[ df /8000] 5 6 // R e s u l t 7 6

8 // Hence the c l o c k must be a c c u r a t e to. 7 p a r t s i n 0 ˆ 9. Scilab code Exa 7.3 Program to determine the minimum and maximum input channel rate accommodated by an M multiplexer 3 // Example 7. 3 4 5 // Page 354 6 7 disp ( The maximum i n f o r m a t i o n r a t e per c h a n n e l i s d e t e r m i n e d as ) 8 9 Imax =[(6.3*88) /76] 0 disp ( The minimum i n f o r m a t i o n r a t e per c h a n n e l i s d e t e r m i n e d as ) 3 Imin =[(6.3*87) /76] 4 5 disp ( S i n c e t h e r e a r e t h r e e p o s s i b l e c o m b i n a t i o n s o f two e r r o r s i n the C b i t s, the p r o b a b i l i t y o f m i s i n t e r p r e t i n g an S b i t i s ) 6 7 3*(0^ -6) ^ 8 9 76/6.3 // d u r a t i o n o f each master frame 0 [(3*0^ -) /(86*0^ -6) ] 3 // R e s u l t 4 5 // 0.06 0ˆ 6 m i s f r a m e s per second 7

8

Chapter 8 Fiber Optic Transmission System Scilab code Exa 8. Program to determine the loss limit and the multimode dispersion limit of a graded index FOC // Caption : Program to d e t e r m i n e the l o s s l i m i t and the multimode d i s p e r s i o n l i m i t o f a graded i n d e x FOC 3 4 // Example 8. 5 6 // Page 388 7 8 // R e f e r to f i g u r e 8. on page 385 9 0 Pin =4 // i n p u t power = 4dB 3 A=3 // a t t e n u a t i o n 4 5 LL =( Pin /A) // Loss Limit 6 9

7 disp ( Using Gbps km as t y p i c a l BDP o f graded i n d e x multimode f i b e r, the multimode d i s p e r s i o n d i s t a n c e i s d e t e r m i n e d as ) 8 9 Dl =(000/90) // D i s p e r s i o n l i m i t 0 // R e s u l t 3 // Loss Limit = 4 km 4 5 // D i s p e r s i o n Limit =. km Scilab code Exa 8. Program to determine the loss limit and the chromatic dispersion limit of a high performance SMF FOC 3 // Example 8. 4 5 // Page 389 6 7 // R e f e r f i g u r e 8. on page 385 8 9 disp ( The a t t e n u a t i o n o f s i n g l e mode f i b r e o p e r a t i n g at 300nm i s a p p r o x i m a t e l y 0. 3 5 db/km. Thus, ) 0 Pin =4 // i n p u t power = 4dB 3 A =0.35 4 5 LL =( Pin /A) // Loss Limit 6 7 disp ( Using 50 Gbps km as BDP o f a s i l i c a s i n g l e mode f i b e r, the c h r o m a t i c d i s p e r s i o n l i m i t i s d e t e r m i n e d as ) 0

8 9 Cd =(50000/47) // Chromatic d i s p e r s i o n l i m i t 0 // R e s u l t 3 // Loss Limit = 0 km 4 5 // Chromatic D i s p e r s i o n Limit = 5 9 9. 5 = 600 km Scilab code Exa 8.3 Program to determine the BDP of SMF system and DS SMF system using DFB LD 3 4 // Example 8. 3 5 6 // Page 393 7 8 // R e f e r to t a b l e 8. on page 39, a l s o to f i g u r e 8. 6 on page 39 9 0 smf =6 smf =6 // d i s p e r s i o n co e f f i c i e n t o f SMF at 550nm 3 4 sw =0.4 // s p e c t r a l width o f the s o u r c e 5 6 BDP =[50/( smf *sw)] // assuming l i n e code as NRZ 7 8 disp ( The BDP o f the DS SMF system i s d e t e r m i n e d as ) 9 0 smf =3.5 // d i s p e r s i o n co e f f i c i e n t o f DS SMF at 550nm

BDP =[50/( smf *sw)] // assuming l i n e code as NRZ 3 4 // R e s u l t 5 6 //BDP = 39 Gbps=km (SMF) 7 8 //BDP = 79 Gbps km (DS SMF) Scilab code Exa 8.4 Program to determine the difference in wavelength of two optical signal 3 // Example 8. 4 4 5 // Page 40 6 7 c =3*0^8 // speed o f l i g h t 8 9 wl =500*0^ -9 // wavlength =500nm 0 f =[(3*0^8) /wl] 3 disp ( Thus the upper and l o w e r f r e q u e n c i e s a r e d e t e r m i n e d as 00,00 and 99,999 GHz r e s p e c t i v e l y. The c o r r e s p o n d i n g w a v e l e n g t h s a r e ) 4 5 lam =[ c /(99999*0^9) ] 6 7 lam =[ c /(0000*0^9) ] 8 9 // R e s u l t 0 // The d i f f e r e n c e i n w a v e l e n g h t s i s 0. 0 5nm

Scilab code Exa 8.5 Program to determine the system gain 3 // Example 8. 5 4 5 // Page 405 6 7 // R e f e r to t a b l e 8. and f i g u r e 8. 8 on page 394 8 9 dr =565 // data r a t e 0 wl =550*0^ -9 // wavelength 3 disp ( The use o f 5B6B l i n e code i m p l i e s the l i n e data r a t e i s, ) 4 5 565*(6/5) 6 7 // 678 Mbps 8 9 disp ( The r e c e i v e r s e n s i t i v i t y f o r 678 Mbps i s d e t e r m i n e d from f i g 8. 8 or t a b l e 8. as ) 0 rsen = -34.5 3 A=( -5 - rsen ) // system g a i n 4 5 BDP =[500/(7*0.4) ] 6 7 BDPs =[73.6/0.678] 8 9 lossp =(0.+0.) *(65) 30 3

3 lossm =A- lossp 3 33 // R e s u l t 34 35 // System g a i n = 9. 5 db 36 37 //BDP = 7 3. 6 Gbps 38 39 //BDP s p a c i n g = 09 km 40 4 // Path Loss = 6 db 4 43 // Loss Margin = 3. 5 db Scilab code Exa 8.6 Program to determine the range of SPE data rates that can be accomodated by the byte stuffing operation // Example 8. 6 3 4 // Page 45 5 6 frames =4*9*87 // Four SPE f r a m e s 7 8 rate =8* frames *000 // normal r a t e SPE 9 0 Rmin =8*33*000 // minimum SPE r a t e 3 4 disp ( When n e g a t i v e byte s t u f f i n g i s used to accomodate a f a s t incoming SPE r a t e, 333 b y t e s o f data a r e t r a n s m i t t e d i n f o u r f r a m e s. Thus, the h i g h e s t s l i p r a t e i s ) 5 4

6 Rmax =8*333*000 //maximum SPE r a t e 7 8 // R e s u l t 9 0 // Normal SPE r a t e = 5 0. Mbps //Minimum SPE r a t e = 5 0. 0 9 6 Mbps 3 4 //Maximum SPE r a t e = 5 0. 8 Mbps 5

Chapter 9 Digital Mobile Telephony Scilab code Exa 9. Progam to determine the probability of maximum interference of a 64 channel CDMA system 3 // Example 9. 4 5 // Page 447 6 7 disp ( The p r o b a b i l i t y o f 63 d e s t r u c t i v e i n t e r f e r e r s i s merely the p r o b a b i l i t y o f o c c u r e n c e o f 63 e q u a l l y l i k e l y b i n a r y e v e nts, ) 8 9 Pmax =(0.5) ^63 //maximum p r o b a b i l i t y 0 disp ( The v a l u e o f a d e s i r e d r e c e i v e s i g n a l i s the a u t o c o r r e l a t i o n o f a codeword with i t s e l f and can t h e r e f o r e be r e p r e s e n t e d as a v a l u e o f 6 4. ) 3 disp ( The mean and v a r i e n c e o f a sum o f 63 such v a r i a b l e a r e 0 and 63, r e s p e c t i v e l y. The s i g n a l to i n t e r f e r e n c e r a t i o i s now d e t e r m i n e d as, ) 4 6

5 a =[(64^) /63] 6 7 SIR =0* log0 (a) 8 9 // R e s u l t 0 // S i g n a l to i n t e r f e r e n c e r a t i o = 8. db 7

Chapter 0 Data and Asynchronous Transfer Mode Network Scilab code Exa 0. Program to determine the amount of transmission capacity 3 // Example 0. 4 5 // Page 47 6 7 // ( a ) With l i n k by l i n k 8 9 frame =000*0^ -8 0 disp ( The e x p e c t e d number o f b i t s o f t r a n s m i s s i o n c a p a c i t y r e q u i r e d to r e t r a n s m i t i s ) 3 frame *000 4 5 // ( b ) With end to end 6 7 frames =0*0^ -5 // c o r r u p t e d frame 8

8 9 disp ( The e x p e c t e d number o f b i t s o f t r a n s m i s s i o n c a p a c i t y r e q u i r e d i s ) 0 frames *000 3 // ( c ) With b i t e r r o r 0ˆ 5 4 5 ans =000*0^ -5 6 7 ans =000*0^ -5*000 8 9 ans =0*0^ -*000 30 3 // R e s u l t 3 33 // ( a ) 0. 0 b i t / l i n k 34 35 // ( b ) 0. b i t / l i n k 36 37 // ( c ). 0 b i t s / l i n k 38 39 // ( c ). 00 b i t s / l i n k Scilab code Exa 0.3 Program to determine the probability that the delay of an ATM voice cell 3 // Example 0. 3 4 5 // Page 488 6 7 disp ( Assuming the a c c e s s l i n k i s 90% u t i l i z e d on a v e r a g e. ) 9

8 9 disp ( The queuing t h e o r y i s p r o v i d e d i n Chapter. I t i n v o l v e s d e t e r m i n i n g the p r o b a b i l i t y t h a t the DSI a c c e s s queue c o n t a i n s enough c e l l s to r e p r e s e n t 0 msec o f t r a n s m i s s i o n time ) 0 tm =[(53*8) /(9*8000) ] 3 disp ( T h e r e f o r e, 0 msec d e l a y r e p r e s e n t s 0 / 0. 7 6 = 3 6. c e l l t i m e s. ) 4 5 p =(0.9) *{ %e ^[ -( -0.9) *36.]} // R e f e r to e q u a t i o n. 5 i n chap 6 7 disp ( R e s u l t ) 8 9 disp ( P(& gt ; 0 msec ) =. 5% d e l a y w i l l be d i s p l a y e d by more than 0 msec ) 30

Chapter Digital Subscriber Access Scilab code Exa. Program to determine the distance limit imposed by the need to echo E bit in a BRI ST interface // Example. 3 4 // Page 50 5 6 // R e f e r to f i g u r e. 5 on page 500 7 8 disp ( By s e e i n g the f i g u r e, i t can be s e e n t h a t the minimum d e l a y between a t e r m i n a l t r a n s m i t t i n g D b i t and r e c e i v i n g i t back i n the f o l l o w i n g E b i t i s s e v e n b i t t i m e s ) 9 0 disp ( At a 9 kbps data r a t e the d u r a t i o n o f b i t i s 5. u s e c. Thus, the t o t a l round t r i p p r o p a g a t i o n time i s ) 7*5. // u s e c 3 4 disp ( Assuming no a p p r e c i a b l e c i r c u i t r y d e l a y s i n the NT, ) 3

5 6 c =3*0^8 // speed o f l i g h t 7 8 Lmax =(36.4*0^ -6) *(/3) * c 9 0 disp ( Because round t r i p p r o p a g a t i o n i n v o l v e s both d i r e c t i o n o f t r a n s m i s s i o n ) Dmax =(/) * Lmax 3 4 disp ( R e s u l t ) 5 6 disp ( Maximum l e n g t h o f w i r e ( Lmax ) = 3640 m = 3. 6 4 km ) 7 8 disp ( Maximum d i s t a n c e (Dmax)= 80 m =. 8 km ) Scilab code Exa. Program to determine the theoretical maximum data rate of a prefectly equalized voiceband modem // Example. 3 4 // Page 53 5 6 disp ( The s i g n a l to q u a n t i z i n g n o i s e r a t i o (SQR) i s g i v e n i n chap3 to be on the o r d e r o f 36dB, which c o r r e s p o n d s to power r a t i o o f 3 9 8. ) 7 8 disp ( Using t h i s v a l u e i n Shannon theorem f o r the t h e o r e t i c a l c a p a c i t y o f a c h a n n e l y i e l d, ) 9 0 SNR =398 C =300*[ log (+ SNR )] 3

3 4 disp ( R e s u l t ) 5 6 disp ( data r a t e = 37 kbps ) 33

Chapter Traffic Analysis Scilab code Exa. Program to calculate how often do two calls arrive with less than milisec between them // Example. 3 4 // Page 54 5 6 disp ( The a v e r a g e a r r i v a l r a t e i s ) 7 8 lam =(3600/0000) // a r r i v a l s per s e c 9 0 disp ( From e q u a t i o n., the p r o b a b i l i t y on a r r i v a l i n 0.0 s e c i n t e r v a l i s ) // e q u a t i o n on page 54 P0 =( %e ^ -0.078) 3 4 disp ( Thus. 7% a r r i v a l s o c c u r w i t h n i n 0. 0 s e c o f the p e r v i o u s a r r i v a l. S i n c e the a r r i v a l r a t e i s. 7 8 a r r i v a l s per second, the r a t e o f o c c u r r e n c e o f i n t e r v a r r i v a l time l e s s than 0. 0 s e c i s ) 5 6.78*0.07 34

7 8 disp ( R e s u l t ) 9 0 disp ( 0. 0 7 5 t i m e s / s e c ) Scilab code Exa. Program to calculate the probability that eight or more arrivals occur in an chosen 30 sec // Example. 3 4 // Page 56 5 6 disp ( The a v e r a g e number o f a r r i v a l s i n a 30 s e c i n t e r v a l i s, ) 7 8 lamt =4*(30/60) 9 0 disp ( The p r o b a b i l i t y o f e i g h t or more a r r i v a l s i s, ) P0 = 3 4 P =[(^) /() ] 5 6 P =[(^) /(*) ] 7 8 P3 =[(^3) /(**3) ] 9 0 P4 =[(^4) /(**3*4) ] P5 =[(^5) /(**3*4*5) ] 3 4 P6 =[(^6) /(**3*4*5*6) ] 5 35

6 P7 =[(^7) /(**3*4*5*6*7) ] 7 8 i= -{( %e ^ -) *[ P0+P+P+P3+P4+P5+P6+P7 ]} 9 30 disp ( R e s u l t ) 3 3 disp ( P ( ) = 0. 0 0 ) Scilab code Exa.3 Program to calculate the probability that a 000 bit data block experiences exaclty 4 errors while being transmitted over a link having error 3 // Example. 3 4 5 // Page 57 6 7 disp ( Assuming i n p e n d e n t e r r o r, we can o b t a i n the p r o b a b i l i t y o f e x a c t l y 4 e r r o r s d i r e c t l y from the P o i s s o n d i s t r i b u t i o n. The a v e r a g e number o f e r r o r s i s, ) 8 9 lamt =[(0^3) *(0^ -5) ] 0 disp ( Thus, ) 3 P4 ={[(0.0^4) /(**3*4) ]* %e ^ -0.0} 4 5 disp ( R e s u l t ) 6 7 disp ( P ( 4 ) = 4.5 0ˆ 0 ) 36

Scilab code Exa.4 Program to calculate the percentage of total traffic carried by first five ckt and traffic carried by all other remaining 3 // Example. 4 4 5 // Page 59 6 7 disp ( The T r a f f i c i n t e n s i t y o f system i s, ) 8 9 A =* 0 disp ( The r a f f i c i n t e n s i t y c a r r i e d by i a c t i v e c k t i s e x a c t l y i e r l a n g s. Hence the t r a f f i c c a r r i e d by s t 5 c k t i s, ) 3 P =[(*^) /() ] 4 5 P =[(*^) /(*) ] 6 7 P3 =[(3*^3) /(**3) ] 8 9 P4 =[(4*^4) /(**3*4) ] 0 P5 =[(5*^5) /(**3*4*5) ] 3 A5 ={( %e ^ -) *[ P+P+P3+P4+P5 ]} 4 5 disp ( A l l o f r e m a i n i n g c k t s c a r r y, ) 6 7 Ar = -.89 8 9 disp ( R e s u l t ) 30 3 disp ( A( 5 ) =. 8 9 e r l a n g s ) 3 33 disp ( A( r e m a i n i n g ) = 0. e r l a n g s ) 37

Scilab code Exa.5 Program to calculate how much traffic can the trunk group carry 3 // Example 5. 5 4 5 // Page 534 6 7 // R e f e r f i g u r e. 5 on page 533 8 9 disp ( From f i g, i t can be t h a t the output c i r c u i t u t i l i z a t i o n f o r B=0. and N=4 i s 0. 8. ) 0 N =4 3 op =0.8 4 5 disp ( Thus the c a r r i e d t r a f f i c i n t e n s i t y i s ) 6 7 N*op 8 9 disp ( S i n c e the b l o c k i n g p r o b a b i l i t y i s 0., the maximum l e v e l o f o f f e r e d t r a a f f i c i s, ) 0 A =[9./( -0.) ] 3 disp ( R e s u l t ) 4 5 disp ( A =. 3 e r l a n g s ) 38