COSC 3213 Computer Networks I Instructor Dr Amir

  • Slides: 29
Download presentation
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York

COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1. Digital Information 2. Digital Communications versus Analogue Communications 3. Channel Capacity: Nyquist and Shannon Bounds. 4. Time and Frequency Domain Representations of Signals Garcia: Sections 3. 1 – 3. 5

Digital Information 1. 2. 3. 4. 5. 6. Recall that the lowest layer in

Digital Information 1. 2. 3. 4. 5. 6. Recall that the lowest layer in OSI is the physical layer. The physical layer deals with the transfer of raw bits and is the focus of our attention in the next few lectures. Communication systems can be classified in two categories: a. Analogue Communication System dealing with analogue signals b. Digital Communication System dealing with digital signals Analogue signals are defined for the entire duration and can have any value. Digital signals are defined at fixed instants and can only have one of the pre-selected set of values. Information can be classified in two categories: 1. Block-oriented information usually arranged nicely in contiguous blocks. Includes data files, BW documents, and images 2. Stream information usually arising from a natural process such as audio and video. 2

Block Oriented Information (1) Information Type Format Raw Data Size Data Compression Compressed Data

Block Oriented Information (1) Information Type Format Raw Data Size Data Compression Compressed Data Size (CR) Applications Kbytes to Mbytes Lossless Compression such as Dictionary or Arithmetic codes. Compress, Zip, and variations (2 – 6) Disk Storage, Modem transmission 15– 54 KB (1 D) 5 – 35 KB (2 D) (5 – 50) Storage, Fax Transmission 1. 2 – 8 Mbytes (5 – 30) Image storage or transmission Text Files ASCII Scanned B&W documents A 4 (8. 5 x 11 in) page @ 200 x 100 pixels / inch + overhead 256 Kbytes CCITT Group 3 fax standard Color images 8 x 10 inch photo scanned @ 400 pixels / in 38. 4 Mbytes JPEG standard Activity 1: Show that the raw data size of the color image (last row entry) is indeed 38. 4 Mbytes/s? 3

Block Oriented Information (2) 1. 2. 3. 4. 5. Data compression seeks to exploit

Block Oriented Information (2) 1. 2. 3. 4. 5. Data compression seeks to exploit the redundancy present in the data to encode information in a fewer number of bytes. Compression ratio (CR) is the ratio between the size of raw data to the size of the compressed data. Why Data Compression? Transmission time of Color image (raw) on V. 90 modem = 12 minutes Transmission time of JPEG encoded Color image on V. 90 modem = 24 seconds Data Compression schemes can be classified in two categories: a. Lossless Compression: No loss of information but compression ratio limited. b. Lossy Compression: Controlled loss of information for higher compression. Bound of Lossless Compression is provided by Shannon's Source encoding theorem which states that the minimum size of compressed data without loss of information equals the entropy of the source generating the data. 4

Streamed Information Type Voice Format 4 k. Hz voice Raw Data Size Data Compression

Streamed Information Type Voice Format 4 k. Hz voice Raw Data Size Data Compression 64 kbps PCM Compressed Data Size 64 kbps Digital telephony ADPCM 16 - 32 kbps Voice mail, Telephony Linear Prediction 8 - 16 kbps Cellular Telephony Audio 16 – 24 k. Hz audio 512 -748 kbps MPEG MP 3 Video QCIF (176 x 144) or CIF (352 x 288) @ 10 - 30 fps 2 – 36. 5 Mbps ITU H. 261 coding 720× 480 pels/frame @ 30 fps 249 Mbps ISO MPEG 2 2 – 6 Mbps ISO MPEG 2 19 – 38 Mbps 1920× 1020 1. 6 Gbps pels/frame @ 30 fps Applications 32 – 384 kbps MPEG audio 64 kbps – 1. 544 Mbps Video conferencing NTSC TV, DVD HDTV Activity 2: Show that the raw data size of HDTV (last row entry) is indeed 1. 6 Gbps? 5

Why Digital Communications (1)? Digital Communications results in an improved Signal to Noise ratio

Why Digital Communications (1)? Digital Communications results in an improved Signal to Noise ratio (SNR) as compared to analogue communications. Signal Tx Example of an Analogue Communication System: Transmitter Analogue Channel Signal Rx Receiver Attenuates and introduces distortion Equalized Signal Repeater Equalizer Amp. Note that the tx signal can not be recovered from the rx signal due to attenuation and distortions. 6 Attenuation must be compacted so that the received signal: (1) is strong enough for the receiver to detect the signal; and (2) maintains a level sufficiently higher than noise for correct bit detection.

Why Digital Communications (2)? Example of a Digital Communication System: Transmitter Digital Channel Receiver

Why Digital Communications (2)? Example of a Digital Communication System: Transmitter Digital Channel Receiver Attenuates and introduces distortion Repeater Decision Circuit & Signal Regenerator Amplifier Equalizer Timing Recovery Signal is recovered perfectly even when attenuation and distortions are introduced. 7

Analog Signals 1. Analog signals are classified in two categories: a. Periodic Signals: that

Analog Signals 1. Analog signals are classified in two categories: a. Periodic Signals: that repeat themselves b. Aperiodic or nonperiodic signals: that do not repeat themselves. Sample waveform of “ae” sound as in cat Periodic Signal with Period = T T Waveform for word “speech” s (noisy ) | p (air stopped) | ee (periodic) |t(stopped)|sh(noisy) Non-periodic Signal 8

Periodic Signals 1. Periodic signals repeat over time, i. e. , 2. Aperiodic signals

Periodic Signals 1. Periodic signals repeat over time, i. e. , 2. Aperiodic signals do not repeat themselves regularly. s(t) = Asin(2 f 0 t +f 0) 9

Periodic Signals: Sine wave Activity 3: Identify the amplitude, fundamental frequency, and phase of

Periodic Signals: Sine wave Activity 3: Identify the amplitude, fundamental frequency, and phase of the sinusoidal signals? 10

Frequency Representation of Periodic Signals (1) Periodic signals with fundamental frequency f 0 =

Frequency Representation of Periodic Signals (1) Periodic signals with fundamental frequency f 0 = 1/T Hz may be represented by the Fourier Series, defined as: Time Domain 1 0 1 0 • • • Frequency Domain x 1(t) • • • t f (k. Hz) 0 4 8 12 0. 25 ms 1 1 0 0 • • • x 2(t) • • • t f (k. Hz) 0 1 ms 4 8 12 11

Frequency Representation of Periodic Signals (1) Fourier Series says that any periodic signal with

Frequency Representation of Periodic Signals (1) Fourier Series says that any periodic signal with the fundamental frequency of f 0 can be represented as a linear combination of a sinusoidal wave with the fundamental frequency of f 0 and the higher order harmonics of the sinusoidal wave with fundamental frequencies (kf 0) for (2 ≤ k ≤ ∞). q As an example, consider the sum of the first two harmonics of q q Including more terms will make the approximation closer to a square wave. 12

Frequency Representation of of Aperiodic Signals (1) Non-periodic signals may be represented by the

Frequency Representation of of Aperiodic Signals (1) Non-periodic signals may be represented by the Fourier Transform, defined as: Time Domain Frequency Domain 1 1 f t 0 0 1 t 0 f 0 13

Streamed Data: Analogue to Digital Conversion There are two steps involved in converting an

Streamed Data: Analogue to Digital Conversion There are two steps involved in converting an analogue signal to a digital signal: 1. Sampling: obtain the value of signal every T seconds. ¾ Choice of T is determined by how fast a signal changes, i. e. , the frequency content of the signal ¾ Nyquist Sampling theorem says: T 5 D/2 D/2 -5 D/2 Sampling Analogue Signal: Defined for all time Can have any amplitude D/2 -5 D/2 Discrete-time Signal: Defined for multiples of T Can have any amplitude 14

Analogue to Digital Conversion There are two steps involved in converting an analogue signal

Analogue to Digital Conversion There are two steps involved in converting an analogue signal to a digital signal: 2. Quantization: approximate signal to certain levels. Number of levels used determine the resolution. T T 5 D/2 D/2 -D/2 -5 D/2 Quantization Discrete-time Signal: Defined for multiples of T Can have any amplitude Digital Signal: Defined for multiples of T Amplitude limited to a few levels . 5 output y(n. T) . 5 1. 5 0. 5 1. 5 input x(n. T) 0. 5 15

Example: First row of streamed information detailing voice (from previous table): Voice: maximum frequency

Example: First row of streamed information detailing voice (from previous table): Voice: maximum frequency = 4 k. Hz voice Sampling rate (1 / T) >= 2 × 4000 or 8000 samples/second Sampling period (T) = 1 / 8000 = 125 microseconds For digital telephony, no. of levels (L) used in the uniform quantizer are 256 Number of bits required to represent a level = log 2(L) = log 2 (256) = 8 bits Data rate = 8000 × 8 or 64 kbps Activity 4: Repeat for stereo music system that contains a maximum frequency of 22 k. Hz. The number of levels used by the uniform quantizer are 64 K. Remember there are 2 channels (L & R) in a stereo system. How much data will be generated in one hour? 16

Pulse Code Modulation (PCM) � � PCM (sampling followed by quantization) is used to

Pulse Code Modulation (PCM) � � PCM (sampling followed by quantization) is used to digitize voice signals in telephony. Voice signal is band limited to 4 k. Hz (Sampling rate = 8 ksamples/s) 8 -bit nonuniform quantizer is used to quantize each sample (Data rate = 64 kbits/s) It can be shown that the SNR for PCM = (6 m – 10) d. B 3 -bit codewords Reconstruction Levels 111 0. 875 110 0. 625 101 0. 375 100 0. 125 011 -0. 125 010 -0. 375 001 -0. 625 000 -0. 875 PCM with m = 3, No. of levels = 23 = 8 Decision Levels 1. 00 0. 75 0. 50 0. 25 t 0 -0. 25 -0. 50 -0. 75 Ts -1. 00 17 PCM output 011 010 001 000 001 111 110 101 100

Fundamental Problem q q Fundamental Question: How fast (maximize data rate) and reliably (minimize

Fundamental Problem q q Fundamental Question: How fast (maximize data rate) and reliably (minimize errors) digital transmission can occur through a channel? Depends upon a number of factor: ¾ Amount of energy present in the signal ¾ Noise properties of the channel ¾ Distance for signal to propagate ¾ Bandwidth (BW) of the transmission medium Bandwidth: determines the range of frequencies that can be transmitted through a channel. ¾ Consider a sinusoidal wave: Frequency present in the wave = f 0 Hz or 2 f 0 radians/s ¾ Apply s(t) at the input of the channel and measure the amplitude of the output ¾ Calculate the ratio of the amplitude of the output to that of the input (referred to as Amplitude response function) that provides a measure of the Bandwidth 18

Communication Channels: Frequency Domain Characterization (1) ¾ Communication channels can be characterized either in

Communication Channels: Frequency Domain Characterization (1) ¾ Communication channels can be characterized either in the frequency domain or time domain ¾ To obtain the frequency domain characterization, apply a sinusoidal signal at the input and measure the output Aincos(2 ft) Aoutcos(2 ft + f( f )) t Channel t ¾ Amplitude Response A(f): is the ratio of the output amplitude to input amplitude (Aout / Ain) as a function of frequency. ¾ Phase Shift: is the variation in f(f ) as a function of frequency. 19

Communication Channels: Frequency Domain Characterization (2) ¾ Examples of Amplitude and Frequency-response functions f(

Communication Channels: Frequency Domain Characterization (2) ¾ Examples of Amplitude and Frequency-response functions f( f ) = 1 0 tan-1 2 f 1/ 2 f f -45 o -90 o ¾ Bandwidth (BW): is the range of frequencies passed by the channel. ¾ Attenuation: is the reduction in signal power as in propagates through the channel. Attenuation in d. B = 10 log 10(Pin / Pout) Activity 5: Show that the attenuation of the above channel is -201 og 10(A ( f ))? 20

Communication Channels: Frequency Domain Characterization (3) Activity 6: What are the bandwidth of the

Communication Channels: Frequency Domain Characterization (3) Activity 6: What are the bandwidth of the channels with the following amplitude-response functions? A(f) 1 0 f W Lowpass Channel 0 W Ideal Lowpass Channel A(f) 1 1 0 W 1 W 2 Ideal Bandpass Channel f 0 W Ideal Highpass Channel f f 21

Communication Channels: Time Domain Characterization ¾ Time Domain characterization of a channel is determined

Communication Channels: Time Domain Characterization ¾ Time Domain characterization of a channel is determined by applying an impulse at the input of the channel and measuring the output. h(t) t 0 Channel t td where h(t) is called the impulse response. ¾ Impulse response and amplitude-response function are related by the Fourier transform. Knowing one, the other can be calculated. ¾ Given the impulse response (or the amplitude-response function), the output for any given input can be calculated. 22

Baseband Transmission (1) ¾ Baseband Transmission: is the transmission of digital information over a

Baseband Transmission (1) ¾ Baseband Transmission: is the transmission of digital information over a lowpass channel. ¾ Two parameters used to characterize the performance of a communication system: ¾ Data rate in bps: Number of bits transmitted per second. ¾ Error rate: Fraction of bits received in error. ¾ Consider a binary lowpass channel using Polar NRZ representation for bits: 1 0 1 +A 0 T 2 T 3 T 4 T 5 T -A t ¾ The communication system is designed in such a way that the response to a single pulse is p(t) 0 Transmitter Filter Comm. Channel Receiver Filter Receiver t 0 Received signal 23

Baseband Transmission (2) Overall response to the binary data 101101 is: How does the

Baseband Transmission (2) Overall response to the binary data 101101 is: How does the receiver detects bits from r(t)? ¾ Sample r(t) at t = 0, T, 2 T, 3 T ¾ If r(k. T) > 0, then bit 1 was transmitted at t = k. T ¾ If r(k. T) < 0, then bit 0 was transmitted at t = k. T ¾ For t = 0, we get ¾ The second term involving the summation results in Intersymbol Interference (ISI). ¾ ISI causes overlapping between neighbouring pulses and therefore degrades the ability of the receiver in detecting the transmitted bits from the received signal. ISI is a nuisance. ¾ How do we reduce ISI? Select a pulse p(t) that contributes zero Intersymbol Interference. 24

Channel Capacity (1) Transmitter Filter 0 Comm. Channel Receiver Filter r(t) t Receiver 0

Channel Capacity (1) Transmitter Filter 0 Comm. Channel Receiver Filter r(t) t Receiver 0 Received signal Output to bits 110: 2 1 1 T -2 T T -T 0 0 TT T 2 T T 3 T t 4 T -2 T -T -1 0 T 2 T 3 T t 4 T -1 -2 Separate Pulses Width of pulse (T) = 1 / (2 W) where W = BW of the channel Maximum transmission rate = 2 W pulses / second Combined 25

Channel Capacity (2) Let us calculate the bit rate for a channel with BW

Channel Capacity (2) Let us calculate the bit rate for a channel with BW = W Hz. ¾ If bandwidth is W Hz, then minimum width of pulse = 1 / 2 W seconds. ¾ Nyquist Signaling Rate = 2 W pulses/s (maximum data rate assuming a noiseless channel). 1/(2 W) 1 0 1 t Channel t ¾ Binary Transmission: 1 bit per pulse => Transmission rate = 1 / duration of pulse = 2 W bps ¾ M-level Transmission: 1/(2 W) 2 -ary Transmission t 00 01 10 11 ¾ No. of bits represented by one pulse = log 2(M) = m ¾ Nyquist Signaling Rate in bps = m ×(1 / duration of pulse) = 2 m. W = 2 W log 2(M) bps ¾ Increasing m, increases the transmission rate !!!! Is there an upper limit? 26

Channel Capacity (3) ¾ Channel Capacity (C) is the maximum bit rate supported by

Channel Capacity (3) ¾ Channel Capacity (C) is the maximum bit rate supported by a channel. ¾ Can the channel capacity C be made infinite by increasing m? No! There are other constraints introduced by noise and channel interference. signal High SNR t t t signal Low SNR signal + noise t signal + noise t t More Errors 27

Channel Capacity (4) ¾ By increasing m, the difference between adjacent levels is reduced

Channel Capacity (4) ¾ By increasing m, the difference between adjacent levels is reduced affecting SNR ¾ Reduction in SNR affects the Channel Capacity (C). ¾ Shannon Channel Capacity theorem provides an upper bound on the channel capacity in terms of bandwidth for a noisy channel C = W log 2 (1 + SNR) bps ¾ Recall that the Nqyuist theorem provided the upper bound on the channel capacity for a noiseless channel. The Shannon theorem provides the upper bound for a noisy channel. ¾ Shannon theorem provides no indication of levels. For M = 2 m levels or symbols, the channel capacity based on the Shannon theorem is given by C = {W log 2 (1 + SNR)} / m symbols/s ¾ Activity 7: Calculate the channel capacity of a dial-in modem that has a BW of 3400 Hz if the best SNR possible in the modem is 40 d. B. Recall that SNR in d. B = 10 log 10(SNR on a linear scale). 28

Channel distortion ¾ Probability of error in presence of additive White Gaussian noise (AWGN):

Channel distortion ¾ Probability of error in presence of additive White Gaussian noise (AWGN): where d is the distance between levels and s is the standard deviation of noise. ¾ Activity 8: Consider a dial-in modem that uses Pulse Shift Keying (PSK) of a sinusoidal wave having a maximum amplitude of +5 V. The bandwidth of the twisted pair wire used is limited to 3400 Hz. Assuming that the noise introduced by the channel is AWGN with a variance (s 2) of 2. 25. Calculate: (a) the signal-to-noise ratio (SNR) for the channel in d. B. (b) the channel capacity C of the twisted pair as a channel. (c) the probability of error Pe for binary transmission. Answers: (a) 7. 45 d. B (b) 2. 78 kbps (c) 2. 43 x 10 -6 29