18-345: Introduction to Telecommunication Networks Lectures 3: Physical Layer Peter Steenkiste Spring 2015 www.cs.cmu.edu/~prs/nets-ece Physical Layer: Outline Digital networking Modulation Characterization of Communication Channels Fundamental Limits in Digital Transmission Modems and Digital Modulation Line Coding Properties of Media and Digital Transmission Systems Error Detection and Correction 1 2 Digital Networks Digital transmission enables networks to support many services TV E-mail Telephone Analog versus Digital Information Analog information takes on continuous values Sound, images, etc. Digital information takes on discrete values Text, banking data, etc. Can convert between the two representations of information Sampling and interpolation 3 4 1
Block vs. Stream Information Block Information that occurs in a single block Text message Data file JPEG image MPEG file Size = bits / block or Bytes/block 1 KByte (KB) = 2 10 bytes 1 MByte (MB) = 2 20 bytes 1 GByte (GB) = 2 30 bytes Stream Information that is produced & transmitted continuously Real-time voice Streaming video Bit rate = bits / second 1 Kbps = 10 3 bps 1 Mbps = 10 6 bps 1 Gbps = 10 9 bps Many Types of Information Stream Block Analog Voice, video Images, radar map, Digital Stock market Spreadsheets, text file, 5 6 Traditional Communication Options Send analog information over analog networks Voice over the telephone network Video using broadcast TV Pictures using the USPS Send digital information over digital networks Messages via telegraph: beacons electrical Internet: many applications, e.g., ftp, (text) email, bboards, telnet, initially now social networks, But Can Mix and Match Analog information can be digitized and sent over digital network Video becomes MPEG Image becomes JPEG Digital networks use analog channels Bits are encoded on analog waveforms But switching is done based on the bits 7 8 2
Example Why Use a Single Digital Network? JPEG Modem IP Telephone Network Optical Backbone JPEG Modem Economically advantageous to have a single network Multimedia applications want to mix different types of data More convenient if a single networks is used Computers operate only on digital data Digital transmission can recover from errors (e.g. noise, distortion) Not possible when transmitting analog information over an analog network 9 10 Analog Transmission All details must be reproduced accurately Why digital? Problem with Analog Long- Distance Communications Transmission segment Source Repeater... Repeater Destination Sent Distortion Attenuation Received 11 Each repeater attempts to restore analog signal to its original form Restoration is imperfect Distortion is not completely eliminated Noise & interference is only partially removed Signal quality decreases with # of repeaters Communications becomes distance-limited Still used in analog cable TV systems Analogy: Copy a song using a cassette recorder 12 3
Digital Transmission Only discrete levels need to be reproduced Digital Long-Distance Communications Transmission segment Source Regenerator... Regenerator Destination Sent Distortion Attenuation Received Simple Receiver: Was original pulse positive or negative? Regenerator recovers original data sequence and retransmits on next segment Can design so error probability is very small Then each regeneration is like the first time! Analogy: copy an MP3 file Communications is possible over very long distances Digital systems advantage over analog systems Less power, longer distances, lower system cost Monitoring, multiplexing, coding, encryption, protocols 13 14 Physical Layer: Outline Digital networking Modulation Characterization of Communication Channels Fundamental Limits in Digital Transmission Modems and Digital Modulation Line Coding Properties of Media and Digital Transmission Systems Error Detection and Correction 15 Transferring Information Information transfer is a physical process In this class, we generally care about Electrical signals (on a wire) Optical signals (in a fiber) More broadly, EM waves Information carriers can be very diverse: Sound waves,quantum states, proteins, ink & paper, etc. Quote: You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. 16 4
Modulation Changing a signal to convey information Ways to modulate a sinusoidal wave In music: Amplitude Modulation (AM) Volume Frequency Modulation (FM) Pitch Phase Modulation (PM) Timing Amplitude Frequency Modulation Examples 0 0 1 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 In our case, modulate signal to encode a 0 or a 1. (multi-valued signals sometimes) Analog is the same value just changes continuously Phase 17 18 Why Different Modulation Methods? Offers choices with different tradeoffs: Transmitter/Receiver complexity Power requirements Bandwidth Medium (air, copper, fiber, ) Noise immunity Range Multiplexing More on this next lecture Physical Layer: Outline Digital networks Modulation Characterization of Communication Channels Fundamental Limits in Digital Transmission Modems and Digital Modulation Line Coding Properties of Media and Digital Transmission Systems Error Detection and Correction 19 20 5
Questions of Interest How long will it take to transmit a message? How many bits are in the message (text, image)? How fast does the network/system transfer information? Can a network/system handle a voice (video) call? How many bits/second does voice/video require? At what quality? How long will it take to transmit a message without errors? How are errors introduced? How are errors detected and corrected? What transmission speed is possible over radio, copper cables, fiber, infrared,? Transmitter A Communications System Communication channel Receiver Transmitter Converts information into a signal suitable for transmission Injects energy into communications medium or channel Telephone converts voice into electric current Wireless LAN card converts bits into electromagnetic waves Receiver Receives energy from medium Converts received signal into a form suitable for delivery to user Telephone converts current into voice Wireless LAN card converts electromagnetic waves into bits 21 22 +A -A Digital Binary Signal 1 0 1 1 0 1 0 T 2T 3T 4T 5T 6T Here, Bit Rate = 1 bit / T seconds For a given communications medium: How do we increase the bit rate (speed)? How do we achieve reliable communications? Are there limits to speed and reliability? Bandwidth Bandwidth is width of the frequency range in which the Fourier transform of the signal is non-zero. Sometimes referred to as the channel width Or, where it is above some threshold value (Usually, the half power threshold, e.g., -3dB) db - short for decibel Defined as 10 * log 10 (P 1 /P 2 ) When used for signal to noise: 10 * log 10 (S/N) Also: dbm power relative to 1 milliwatt Defined as 10 * log 10 (P/1 mw) 23 24 6
Signal = Sum of Waves Simpler Example + 1.3 X + 0.56 X + 1.15 X 25 26 The Frequency Domain A (periodic) signal can be viewed as a sum of sine waves of different strengths. Corresponds to energy at a certain frequency Every signal has an equivalent representation in the frequency domain. What frequencies are present and what is their strength (energy) E.g., radio and TV signals, Spectra & Bandwidth Spectrum of a signal: measures power of signal as function of frequency x 1 (t) varies faster in time & has more high frequency content than x 2 (t) Bandwidth W s is defined as range of frequencies where a signal has non-negligible power, e.g. range of band that contains 99% of total signal power Spectrum of x 1 (t) 1.2 1 0.8 0.6 0.4 0.2 0 0 3 6 9 Spectrum of x 2 (t) 1.2 1 0.8 0.6 0.4 0.2 12 15 18 21 24 27 30 frequency (khz) 33 36 39 42 0 0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 frequency (khz) 27 28 7
Transmission Channel Considerations Every medium supports transmission in a certain frequency range. Outside this range, effects such as attenuation,.. degrade the signal too much Transmission and receive hardware will try to maximize the useful bandwidth in this frequency band. Tradeoffs between cost, distance, bit rate As technology improves, these parameters change, even for the same wire. Good Frequency Bad Attenuation & Dispersion Real are not nice low pass filters Why do we care? Good Frequency Bad + =??? Signal 30 Limits to Speed and Distance Noise: random energy is added to the signal. Attenuation: some of the energy in the signal leaks away. Dispersion: attenuation and propagation speed are frequency dependent. (Changes the shape of the signal) Effects limit the data rate that a channel can sustain.» But affects different technologies in different ways Effects become worse with distance.» Tradeoff between data rate and distance Pulse Transmission Rate Objective: Maximize pulse rate through a channel, that is, make T as small as possible Channel T t t If input is a narrow pulse, then typical output is a spread-out pulse with ringing Question: How frequently can these pulses be transmitted without interfering with each other? 2W c pulses/sec with binary amplitude encoding where W c is the bandwidth of the channel 32 8
X(t) = a cos(2 ft) Bandwidth of a Channel Channel If input is sinusoid of frequency f, then output is a sinusoid of same frequency f Output is attenuated by an amount A(f) that depends on f A(f) 1, then input signal passes readily A(f) 0, then input signal is blocked Bandwidth W c is range of frequencies passed by channel Y(t) = A(f) a cos(2 ft) A(f) 0 1 W c Ideal lowpass channel f 33 Multi-level Pulse Transmission Assume channel of bandwidth W c, and transmit 2W c pulses/sec (without interference) If pulses amplitudes are either -A or +A, then each pulse conveys 1 bit, so Bit Rate = 1 bit/pulse x 2W c pulses/sec = 2W c bps If amplitudes are from {-A, - A/3, +A/3, +A}, then bit rate is 2x2W c bps By going to M=2 m amplitude levels, we achieve Bit Rate = m bits/pulse x 2W c pulses/sec = 2mW c bps In the absence of noise, the bit rate can be increased without limit by increasing m 34 Noise & Reliable Communications All physical systems have noise Electrons always vibrate at non-zero temperature Motion of electrons induces noise Presence of noise limits accuracy of measurement of received signal amplitude Errors occur if digital signal separation is comparable to noise level Thus, noise places a limit on how many amplitude levels can be used in pulse transmission Bit Error Rate (BER) increases with decreasing signal-tonoise ratio High SNR Low SNR Signal-to-Noise Ratio (SNR) Signal Noise Signal + noise t t t No errors Signal Noise Signal + noise t t t Average signal power error SNR = Average noise power 35 SNR (db) = 10 log 10 SNR 36 9
Physical Layer: Outline Digital networks Modulation Characterization of Communication Channels Fundamental Limits in Digital Transmission Line Coding Modems and Digital Modulation Properties of Media and Digital Transmission Systems Error Detection and Correction The Nyquist Limit A noiseless channel of width H can at most transmit a binary signal at a rate 2 x H. Assumes binary amplitude encoding 37 38 The Nyquist Limit A noiseless channel of width H can at most transmit a binary signal at a rate 2 x H. Assumes binary amplitude encoding E.g. a 3000 Hz channel can transmit data at a rate of at most 6000 bits/second Past the Nyquist Limit More aggressive encoding can increase the bandwidth Example: modulate multi-valued symbols Modulate blocks of digital signal bits, e.g, 3 bits = 8 values Often combine multiple modulation techniques PSK PSK+AM Hmm, I once bought a modem that did 54K???? Problem? Noise! The signals representing two symbols are less distinct Noise can prevent receiver from decoding them correctly 39 40 10
Modem rate Example: Modem Rates 100000 10000 1000 100 1975 1980 1985 1990 1995 2000 Year Lecture 4 15-441 2008-10 41 Capacity of a Noisy Channel Places upper bound on channel capacity, while considering noise Shannon s theorem: C = B x log 2 (1 + S/N) C: maximum capacity (bps) B: channel bandwidth (Hz) S/N: signal to noise ratio of the channel Often expressed in decibels (db) ::= 10 log(s/n) Example: Local loop bandwidth: 3200 Hz Typical S/N: 1000 (30db) What is the upper limit on capacity? C = 3200 x log 2 (1 + 1000) = 31.9 Kbps 42 Shannon s Channel Capacity Theorem C Wc log 2 (1 SNR) bps Arbitrarily-reliable communications is possible if the transmission rate R < C If R > C, then arbitrarily-reliable communications is not possible Arbitrarily-reliable means the BER can be made arbitrarily small through sufficiently complex coding C can be used as a measure of how close a system design is to the best achievable performance Bandwidth W c & SNR determine C 43 Example Find the Shannon channel capacity for a telephone channel with W c = 3400 Hz and SNR = 40 db SNR (db) = 40 db corresponds to SNR = 10^(40/10) = 10000 C = 3400 log 2 (1 + 10000) = 3400 log 10 (10001)/log 10 2 = 45200 bps 44 11