Sie sind auf Seite 1von 96

University of Roma La Sapienza

Telecomunicazioni
Docente: Andrea Baiocchi
Dip. INFOCOM - Stanza 35, 1 piano palazzina P. Piga Sede Facolt S. Pietro in Vincoli E-mail: andrea.baiocchi@uniroma1.it

Corso di Laurea in Ingegneria Gestionale A.A. 2010/2011

Programma
1. 2. 3. 4. 5. 6. 7.

SERVIZI E RETI DI TELECOMUNICAZIONE FONDAMENTI DI COMUNICAZIONI ARCHITETTURE DI COMUNICAZIONE MODI DI TRASFERIMENTO LO STRATO DA ESTREMO A ESTREMO: UDP E TCP LO STRATO DI RETE IN INTERNET TECNOLOGIE DI STRATO DI COLLEGAMENTO

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications A roadmap


! ! ! ! ! ! ! ! !

Digital Representation of Information Digital Representation of Analog Signals Chapter 3 Why Digital Communications? 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

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Digital Networks
!

Digital transmission enables networks to support many services


TV E-mail

Telephone

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Questions of Interest
! ! ! !

Can we reduce all information to sequences of bits? How? How many bits do we need to represent a message (text, speech, image)? How fast does the network/system transfer information? Under which quality constraints? How can we deal with errors?
! !

How are errors introduced? How are errors detected and corrected?

What transmission speed and coding of data is possible over radio, copper cables, fiber, infrared, ?

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Digital Representation of Information
Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Bits, numbers, information


! !

Bit: BInary digiT Either symbol belonging to a set of two elements or number with value 0 or 1
! ! !

n bits allows enumeration of 2n possibilities


! ! !

n bits: digital representation for 0, 1, , 2n1 Byte or Octet, n = 8 Computer word, typically n = 32, or 64 n-bit field in a header n-bit representation of a voice sample Message consisting of n bits

The number of bits required to represent a message is a measure of its information content
!

More bits -> More information

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Block vs. Stream Information


Block ! Information that occurs in a single, delimited data unit (bit string)
!

Text message, Data file, JPEG image, MPEG file

Size = bits / block

Stream ! Information that is produced and possibly conveyed over a communication system continuously
! !

Real-time voice (e.g. telephony) Streaming video

Bit rate = bits / second

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Examples of Block Information

Type Text Fax Color Image

Method Zip, compress CCITT Group 3 JPEG

Format ASCII A4 page 200x100 pixels/in2 8x10 in2 photo 4002 pixels/in2

Original kbytesMbytes 256 kbytes 38.4 Mbytes

Compressed (Ratio) (2-6) 5-54 kbytes (5-50) 1-8 Mbytes (5-30)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Color Image
W H Color image = H W
Red component image

W + H
Green component image

W + H
Blue component image

Total bits = 3 ! H ! W pixels ! B bits/pixel = 3HWB bits


Example: 8!10 inch picture at 400 ! 400 pixels per inch2 400 ! 400 ! 8 ! 10 = 12.8 million pixels 8 bits/pixel/color 12.8 megapixels ! 3 bytes/pixel = 38.4 megabytes
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Stream Information
! !

A real-time voice signal must be digitized and transmitted or recorded as it is produced Analog signal level varies continuously in time

Th e s p ee

ch s

g n al l e

v el

v a r ie s w i th

m(e)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Analog signal
!

In communications engineering signal refers to e physically measurable entity that can be used to carry information
!

E.g. e.m. field, voltage and current in lumped circuits, air pressure

An analog signal is a function x(t) defined over the real axis and taking values in an interval of the real line Information is carried by the values of x(t) at each time t

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Examples of analog signal sources


!

Images are natively carried by analog signals, under the form of e.m. field in the visible bandwidth, i.e. the range of frequencies that produces a reaction in human sight sensors Sounds are natively carried by analog signals, i.e. variation of air pressure that produces a reaction in human hearing sensors Analog nature is due to the fact that for our purposes all these phenomena are well described by classical physics models (Newton mechanics, Maxwell e.m. field theory) and classical physics rests on classical analysis to describe its models (variables taking values on a continuum, e.g. real axis).

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Digitization of Analog Signal


! !

Sample analog signal in time and amplitude Find closest approximation


Original signal Sample value Approximation

3 bits / sample

7"/2 5"/2 3"/2 "/2 #"/2 #3"/2 #5"/2 #7"/2

Rs = Bit rate = # bits/sample x # samples/second


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

(a) Original 7"/2 waveform and 5"/2 the sample 3"/2 values "/2 -"/2 -3"/2 -5"/2 -7"/2 (b) Original waveform and the quantized values 7"/2 5"/2 3"/2 "/2 -"/2 -3"/2 -5"/2 -7"/2
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi
Figure 3.2

Example: Voice & Audio


Telephone voice ! Ws = 4 kHz -> 8000 samples/sec ! 8 bits/sample ! Rs=8 x 8000 = 64 kbps
!

CD Audio
! ! ! !

Cellular phones use more powerful compression algorithms: e.g. 6.5-13 kbps for GSM

Ws = 22 kHertz -> 44000 samples/sec 16 bits/sample Rs=16 x 44000= 704 kbps per audio channel MP3 uses more powerful compression algorithms: 50 kbps per audio channel

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Video Signal
!

Sequence of picture frames


!

Each picture digitized & compressed 10-30-60 frames/second depending on quality Small frames for videoconferencing Standard frames for conventional broadcast TV HDTV frames

Frame repetition rate


!

Frame resolution
!

30 fps

Rate = M bits/pixel x (WxH) pixels/frame x F frames/second


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Video Frames
176 QCIF videoconferencing 144 720 Broadcast TV 480 1920 HDTV 1080
at 30 frames/sec = 67 x 106 pixels/sec at 30 frames/sec = 10.4 x 106 pixels/sec at 30 frames/sec = 760,000 pixels/sec

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Digital Video Signals


Type Video Conference Method H.261 Format Original Compressed 2-36 Mbps 249 Mbps 1.6 Gbps 64-1544 kbps 2-6 Mbps 19-38 Mbps

176x144 or 352x288 pix @10-30 fr/sec Full Motion MPEG2 720x480 pix @30 fr/sec HDTV MPEG2 1920x1080 @30 fr/sec

More recent standards: H.264, MPEG4


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Transmission of Stream Information


!

Constant bit-rate
! !

Variable bit-rate
!

Signals such as digitized telephone voice produce a steady stream: e.g. 64 kbps Network must support steady transfer of information, e.g. 64 kbps circuit Signals such as digitized video produce a stream that varies in bit rate, e.g. according to motion and detail in a scene Network must support variable transfer rate of information with possibly a guaranteed minimum rate, e.g. packet switching with traffic engineering functions

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Stream Service Quality Issues


Network Transmission Impairments ! Delay: Is information delivered in timely fashion?
!

! !

Jitter: Is information delivered in smooth fashion?


!

E.g. mean e2e delay

Loss: Is information delivered without loss? If loss occurs, is delivered signal quality acceptable?
! ! !

E.g. delay standard deviation

Errored data Undelivered data Mis-ordered data

Applications & application layer protocols developed to deal with these impairments

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Transmission Delay
L R L/R tprop d c
number of bits in message bps speed of digital communication system time to transmit the message time for signal to propagate across medium distance in meters speed of light (3x108 m/s in vacuum)

Delay = tprop + L/R = d/c + L/R

seconds

Use data compression to reduce L Use higher speed modem to increase R Place far end system closer to reduce d
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Compression
! !

Information usually not represented efficiently Data compression algorithms


! ! !

Represent the information using fewer bits than provided natively Noiseless: original information recovered exactly
!

Noisy: recover information approximately. Tradeoff: # bits vs. quality


!

E.g. zip, compress, GIF

#bits (original file) / #bits (compressed file)

Compression Ratio

E.g. JPEG, MPEG

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Lempel-Ziv (LZ77) algorithm

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Digital Representation of Analog Signals

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Digitization of Analog Signals


"

"

"
! !

Sampling: obtain samples of x(t) at uniformly spaced time intervals: xk=x(tk), tk=t0+kT, k integer T is the sampling time, F=1/T is the sampling rate. Quantization: map each sample xk into an approximation value yk=f(xk) of finite precision Compression: to lower bit rate further, apply additional compression method
Differential coding: cellular telephone speech Subband coding: MP3 audio

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Sampling Rate and Bandwidth


! !

A signal that varies faster needs to be sampled more frequently Bandwidth measures how fast a signal varies
1 01 01 01 0 11 1 1 0 000 ...
t

...

...

...
t

1 ms
! !

1 ms

What is the bandwidth of a signal? How is bandwidth related to sampling rate?

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Periodic Signals
!

A periodic signal with period T can be represented as sum of sinusoids using Fourier Series: x(t) = a0 + a1cos(2!f0t + "1) + a2cos(2$2f0t + "2) + + akcos(2!kf0t + "k) +

DC long-term average

fundamental frequency f0=1/T first harmonic

kth harmonic

|ak|2 determines amount of power in kth harmonic Amplitude specturm |a0|, |a1|, |a2|,
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example Fourier Series


x1(t) ... 1 01 01 01 0 ...
t

x2(t) ...

11 1 1 0 000 ...
t

T2 =0.25 ms

T1 = 1 ms

x1(t) = 0 + 4 cos(2!4000t) ! 4 cos(2!3(4000)t) 3! 4 + cos(2!5(4000)t) + 5!

x2(t) = 0 + 4 cos(2!1000t) ! 4 cos(2!3(1000)t) 3! 4 + cos(2!5(1000)t) + 5!

Only odd harmonics have power


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Spectra & Bandwidth


!

Spectrum of x1(t) Spectrum of a signal: magnitude of amplitudes as a function of frequency x1(t) varies faster in time & has more high frequency content than x2(t) Bandwidth W is defined as Spectrum of x2(t) range of frequencies where a signal has non-negligible power, e.g. range of band that contains 99% of total signal power
1.2 1 0.8 0.6 0.4 0.2 0

18

21

24

27

15

12

frequency (kHz)

1.2 1

0.8 0.6 0.4 0.2 0

30

33

36

39 39

18

30

15

12

frequency (kHz)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

24

27

33

36

42

21

42

Bandwidth of General Signals


speech

(noisy )

|p

(air stopped)

| ee (periodic)

| t (stopped) | sh (noisy)

! !

Not all signals are periodic ! E.g. voice signals varies according to sound X(f) ! Vowels are periodic, s is noiselike Spectrum of long-term signal ! Averages over many sounds, many speakers ! Involves Fourier transform Telephone speech: 4 kHz CD Audio: 22 kHz

f 0 W

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Sampling theorem
Sampling theorem (Nyquist): Perfect reconstruction if sampling rate 1/T ! 2W
(a)
x(t) t x(nT) t

Sampler

(b)
x(nT) t Interpolation filter x(t) t

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Quantization of Analog Samples


output y(nT)
2.5" 1.5" 0.5" #4" #3" #2" #" -0.5" -1.5" -2.5" -3.5" " 2" 3" 4" 3.5"

input x(nT)

Uniform quantizer

Quantizer maps input into closest of 2m representation values Quantization error: noise = y(nT) x(nT)
Original signal Sample value Approximation

7"/2 5"/2 3"/2 "/2 -"/2 -3"/2 -5"/2 -7"/2

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Quantizer error
M = 2m quantization levels Dynamic range (V, V) Quantization interval " = 2V/M (uniform quantization)
y(nT) ... #2" "
!

3 bits / sample

error = y(nT)x(nT) = e(nT) " 2" 3" ... input

! 2

-V

" 2

V x(nT)

If the number of levels M is large, the error e(x)=y(x)x is approximately uniformly distributed between ("/2, "/2) in each quantization interval
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Quantizer performance
!

Power of quantization error signal = average of squared error

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Signal-to-quantization noise ratio


Signal-to-Noise Ratio (SNR) = Let %x2 be the signal power, then Average signal power Average noise power

The SNR is usually stated in decibels: SNR dB = 10 log10(#x2/#e2) = 6m + 10 log10(3#x2/V2) Example: SNR dB = 6m 7.27 dB for V/#x = 4.
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Digital Transmission of Analog Information


2W samples / sec Analog source Original Sampling (A/D) x(t) Bandwidth W m bits / sample Quantization

2W m bits/sec Transmission or storage

Approximationy(t) Display or playout Interpolation filter Pulse generator

2W samples / sec
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example: Telephone Speech


W = 4 kHz, so Nyquist sampling theorem & 2W = 8000 samples/second Suppose error requirement = 1% error SNR = 10 log10(1/.01)2 = 40 dB

Assume V/#x = 4, then 40 dB = 6m 7.27 & m = 8 bits/sample PCM (Pulse Code Modulation): Bit rate= 8000 x 8 bits/sec= 64 kbps

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Why Digital Communications?

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

A Transmission System
Transmitter Communication channel Transmitter
!
!

Receiver

Converts information into signal suitable for transmission

Receiver
! !

Injects energy into communications medium or channel

Signal = measurable physical quantity that can be modified according to the value of the data to be transmitted, conveyed over a transmissin medium and detected by a receiving device.

Receives energy from medium Converts received signal into form suitable for delivery to user

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Transmission Impairments
Transmitter
Transmitted Signal Received Signal Receiver

Communication channel

Communication Channel Transmission Impairments


! ! ! !

Pair of copper wires Coaxial cable Optical fiber Radio


!

! ! ! ! !

Including infrared

Attenuation Distortion Noise Interference Timing errors

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Analog vs. Digital Transmission


Analog transmission: all details must be reproduced accurately Sent Distortion Attenuation Received

Digital transmission: only discrete levels need to be reproduced Sent Distortion Attenuation Received

Simple Receiver: Was original pulse positive or negative?

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Analog Long-Distance Communications


Transmission segment
Source Repeater

...

Repeater

Destination

Each repeater attempts to restore signal to its original form


! ! !

Attenuation is removed (amplifier) Distortion is not completely eliminated In-band noise & interference can be removed only in part (out of band)

Signal quality decreases with # of repeaters Attenuated and distorted signal + noise Recovered signal + residual noise

Repeater
Amp Equalizer

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Digital Long-Distance Communications


Transmission segment
Source Regenerator

...

Regenerator

Destination

Regenerator recovers original data (bit) sequence from degraded signal and retransmits on next segment by using a clean signal
!

All impairments are condensed into bit errors


Amplifier equalizer Timing recovery Decision circuit and signal regenerator

But timing recovery is required!

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Digital Binary Signal


+A
0

2T

-A

3T

4T

5T

6T

Bit rate = 1 bit / T seconds Signal is meaningless without associated clock


For a given communications medium: ! How do we increase transmission speed? ! How do we achieve reliable communications? ! Are there limits to speed and reliability?
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example of clock
Clock signal

0 1 0 1 1 0 1 0 0 0 1 1 0
1 0

Message bits

+d -d
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Baseband signal with NRZ coding

Bit rates of digital transmission systems


System Telephone twisted pair Ethernet twisted pair Cable modem ADSL twisted pair 2.4 GHz radio 28 GHz radio Optical fiber Optical fiber Bit Rate 33.6-56 kbps 10 Mbps, 100 Mbps, 1 Gbps, 10 Gbps 500 kbps-4 Mbps Observations 4 kHz telephone channel From a few m up to a few hundreds m of unshielded twisted copper wire pair Shared CATV return channel

Up 8 Mbps down (ADSL) Coexists with analog telephone 20 Mbps down (ADSL2+) signal 50 Mbps down (VDSL) From 1 to 54 Mbps IEEE 802.11b/a/g wireless LAN 1.5-45 Mbps 2.5-10 Gbps >1600 Gbps 5 km multipoint radio 1 wavelength Many wavelengths

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Characterization of Communication Channels

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Communications Channels
!

A physical medium is an inherent part of a communications system


!

Copper wires, radio medium, or optical fiber

Communications system includes electronic or optical devices that are part of the path followed by a signal
!

Transmitter, equalizers, amplifiers, filters, couplers, detector, clocks and carrier generators

By communication channel we refer to the combined end-to-end physical medium and attached devices

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Communication system block scheme


Source Source encoder Channel encoder Line encoder Modulator & tx front end

Information source Channel Information destination Information rendering Final user Demodulation, equalization, symbol decision

Timing recovery A/D converter Rx front end

Channel decoder

Line decoder

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

How good is a channel?


!

Performance: What is the maximum reliable transmission speed?


! ! !

Speed: Bit rate, R bps Reliability: Bit error rate, BER=10k Focus of this section

Cost: What is the cost of alternatives at a given level of performance?


! ! !

Wired vs. wireless? Electronic vs. optical? Standard A vs. standard B?

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Communications Channel
Transmitted Signal Received Signal

Transmitter

Communication channel

Receiver

Bandwidth ! In order to transfer data faster, a signal has to vary more quickly. ! A channel or medium has an inherent limit on how fast the signals it passes can vary ! Channel bandwidth limits how tightly input pulses can be packed

Impairments ! Signal attenuation ! Signal distortion ! Spurious noise ! Interference from other signals ! Channel impairments limit accuracy of measurements on received signal

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Communication channel model


! !

We often assume two basic properties of channels Linearity y1(t)=Ch[x1(t)], y2(t)=Ch[x2(t)] => y1(t)+y2(t)=Ch[x1(t)+x2(t)]
!

Counterexample: amplifiers distorsion

Stationarity y1(t)=Ch[x1(t)] => y2(t+d)=Ch[x2(t+d)] for any d>0.


!

Counterexample: radiomobile channels

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Frequency Domain Channel Characterization


x(t) = Aincos(2$ft)
Channel

y(t) = Aout(f)cos(2$ft + '(f)) t

t A(f) =
!

Aout Ain

Assumption. Channel is linear and stationary


! !

Apply sinusoidal input at frequency f


! !

Linear: superposition of effects holds Stationary: input-output relationship does not vary over time Output is sinusoid at same frequency, but attenuated & phaseshifted Sinusoids are autofunctions of LTI systems

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Frequency Domain Channel Characterization


x(t) = Aincos(2$ft)
Channel

y(t) = Aout(f)cos(2$ft + '(f)) t

Transfer function: H(f) = A(f)ei'(f)


!

Apply sinusoidal input at frequency f


!

Measure amplitude of output sinusoid (of same frequency f) and calculate amplitude response A(f) = ratio of output amplitude to input amplitude
! !

Bandwidth Wc is range of frequencies passed by channel

If A(f) ! 1, then input signal passes readily If A(f) ! 0, then input signal is blocked

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Ideal Low-Pass Filter


!

Ideal filter: all sinusoids with frequency f<Wc are passed without attenuation and delayed by ( seconds; sinusoids at other frequencies are blocked y(t) = Aincos(2$ft 2$f() = Aincos(2$f(t ( )) = x(t()
Amplitude Response 1 0 Phase Response

'(f) = 2$f(
1/ 2$ f

Wc

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example: Low-Pass Filter


!

Simplest non-ideal circuit that provides low-pass filtering H(f)=1/(1+i2$bf)


!

Example: RC circuit, b=RC.

Amplitude Response 1

Phase Response

A(f) = (1+4$2b2f2)1/2
0 -45o

$(f) = arctan(2$bf)
1/ 2$ f

1/" 2

Wc

-90o

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example: Bandpass Channel


Amplitude Response A(f) Wc =f2f1

f1
!

f2 f

Some channels pass signals within a band that excludes low frequencies
!

ADSL modems, radio systems,

! !

Channel bandwidth is the width of the frequency band that passes non-negligible signal power Example. 3dB bandwidth: frequency interval where output power density is no less than 1/2 than peak value

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Channel Distortion
x(t) = )k akcos(2$fkt + *k)
! !

Channel

y(t)

Let x(t) be a digital signal bearing data information How well does y(t) follow x(t)?

y(t) = )k A(fk) ak cos(2$fkt + *k + '(fk ))


!

Channel has two effects:


!

If amplitude response is not flat, then different frequency components of x(t) will be transferred by different amounts If phase response is not linear, then different frequency components of x(t) will be delayed by different amounts

In either case, the shape of x(t) is altered

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example: Amplitude Distortion


1 0 x(t) . . .
1 ms !

0 0

0 0

1
...

f0=1/T=1000 Hz t

Let x(t) input to ideal lowpass filter that has zero delay and Wc = 1.5 kHz, 2.5 kHz, or 4.5 kHz

! ! !

Wc = 1.5 kHz passes only the first two terms Wc = 2.5 kHz passes the first three terms Wc = 4.5 kHz passes the first five terms

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

1.5 1 0.5 0 -0.5 -1 -1.5

Amplitude Distortion
0.125 0.25 0.625 0.75 0.375 0.875 0.5 0 1

1.5 1 0.5 0 -0.5 -1 -1.5

0.125

0.375

0.625

0.75

0.875

0.25

As the channel bandwidth increases, the output of the channel resembles the input more closely

1.5 1 0.5 0 -0.5 -1 -1.5

0.5

0.375

0.625

0.75

0.125

0.875

0.25

0.5

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Time-domain Characterization
+(t) a Channel h(t) t

0
! ! !

td

Time-domain characterization of a channel requires finding the impulse response h(t) Apply a very narrow pulse of amplitude a to a channel at time ( and observe the channel output at time t The output in case of a linear, stationary, causal channel is y(t) = 0, t < ( y(t) = ah(t(), t > (

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Impulse response
!

h(t) is the impulse response of the channel


INPUT OUTPUT h(t) h(t)=0 for t<0 h(tT) +(t) a+(t) +(tT)

By definition Causality Time invariance Linearity


!

a+(tTa)+b+(tTb) ah(tTa)+bh(tTb) If a signal x(t) is applied to LTI channel input, then y(t) = " x(()h(t()d(
!

x(t) can be thought of as the sum of pulses at times ( (#< (<#) with amplitude x((), so y(t) is the sum of responses x(()h(t()

It can be shown that H(f) is the Fourier transform of h(t) and thatY(f) = H(f)X(f)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Linear, stationary channels and pulse transmission


Input
! !

Output

Time invariance Linearity

xk+(tkT)
#k xk+(tkT)

xkh(tkT)
#k xkh(tkT)

In case of pulse transmission in a linear, time invariant, additive noise channel, we get an output signal y(t): noise

y(t) = !k xk h(tkT) + z(t)


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

InterSymbol Interference (ISI)


!

By sampling channel output at time nT (perfect sync) we get

yn = y(nT) = $k xk hnk + zn
with hnk = h(nTkT) and zn = z(nT).
output sample
!

yn = xnh0 + $k% n xkhnk + zn


useful term ISI noise sample

ISI is the undesired interference coming from tails of pulses other than the n-th one and giving non-null contributions to the n-th output sample

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Nyquist condition for null ISI


!

Given a channel response H(f), we can add reception and possibly transmission filters, so that the overall (filtered) channel response is Hc(f) = HTX(f) H(f) HRX(f) To get null ISI at sampling rate 1/T it must be

$k Hc(fk/T) = cost
!

For a low-pass channel with Hc(f)=0 for |f|>Wc this is not possible unless 1/T <= 2Wc.

Max symb rate for zero ISI = 2 x channel bandwidth

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Nyquist Pulse with Zero ISI


!

For channel with ideal low-pass amplitude response of bandwidth Wc, the impulse response is a Nyquist pulse h(t)=s(t(), where T =1/(2Wc), and
1.2 1 0.8 0.6 0.4 0.2 0 -1 T 0 -0.2 -0.4

-7T

-6T

-5T

-4T

-3 T

-2 T

1T

2T

3T

4T

5T

6T

7T

! !

s(t) has zero crossings at t = kT, k = 1, 2, Pulses can be packed every T seconds with zero InterSymbol Interference (ISI)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example of composite waveform


Three Nyquist pulses shown separately ! + s(t) ! + s(t-T) ! - s(t-2T) Composite waveform r(t) = s(t)+s(t-T)-s(t-2T) Samples at kT r(0)=s(0)+s(-T)-s(-2T)=+1 r(T)=s(T)+s(0)-s(-T)=+1 r(2T)=s(2T)+s(T)-s(0)=-1 Zero ISI at sampling times kT +s(t) 1 +s(t-T)

0 -2 T -1T 0 1T 2T 3T

4T

-1

-s(t-2T)

r(t)

2 1 0

-2T

-1T -1 -2

1T

2T

3T

4T

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Nyquist pulse shapes


! !

If channel is ideal low pass with Wc, then pulses maximum rate pulses can be transmitted without ISI is 2Wc pulse/s s(t) is one example of class of Nyquist pulses with zero ISI
!

Problem: sidelobes in s(t) decay as 1/t which add up quickly when there are slight errors in timing Requires slightly more bandwidth than Wc Sidelobes decay as 1/t3, so more robust to timing errors

Raised cosine pulse below has zero ISI


! !

A(f)

sin(!t/T) cos(!,t/T) !t/T 1 (2,t/T)2

(1,)Wc Wc

(1+,)Wc

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Eye diagram
!

10 Gbit/s signal without dispersion (negligible ISI)

10 Gbit/s signal after transmission through a dispersive channel (with non negligible ISI)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Fundamental Limits in Digital Transmission

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Signaling with Nyquist Pulses


!

! !

p(t) pulse at receiver in response to a single input pulse (takes into account pulse shape at input, transmitter & receiver filters, and communications medium) r(t) waveform that appears in response to sequence of pulses If s(t) is a Nyquist pulse, then r(t) has zero intersymbol interference (ISI) when sampled at multiples ofT

1 +A -A
0

0
T

1
2T

1
3T

0
4T

1
5T t
r(t) Receiver

Transmitter Filter

Communication Medium

Receiver Filter

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Received signal

Multilevel Signaling
!

Nyquist pulses achieve the maximum signalling rate with zero ISI
!

With two signal levels, each pulse carries one bit of the source bit stream
!

2Wc pulses per second or 2Wc pulses / Wc Hz = 2 pulses / Hz

With M = 2m signal levels, each pulse carries m bit


!

Bit rate = 2Wc (bit/s)

Bit rate = 2Wc (pulse/s) m (bit/pulse) = 2Wcm (bit/s)

In the absence of noise, the bit rate can be increased without limit by increasing m BUT Additive noise limits # of levels that can be used reliably.

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example of Multilevel Signaling


! ! !

Four levels {-1, -1/3, 1/3, +1} for {00,01,10,11} Waveform for 11,10,01 sends +1, +1/3, -1/3 Zero ISI at sampling instants
1.2 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -1 0 1 2 3

Composite waveform

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

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 signal separation is comparable to noise level Noise places a limit on how many amplitude levels can be used in pulse transmission

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Noise Limits Accuracy


!

Receiver makes decision based on (sampled) received signal level = source pulse level + noise
!

Error rate depends on relative value of noise amplitude and spacing between signal levels Large (positive or negative) noise values can cause wrong decision
+A

+A +5A/7 +3A/7 +A/7 -A/7 Typical noise -3A/7 -5A/7 Eight signal levels -A

+A/3

-A/3

-A

Four signal levels

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Noise
!
! !

Noise signal is usually a zero-mean process z(t) characterized by


probability distribution of amplitude samples, i.e. Pr(z(t) > u) Time auto-correlation, i.e. Rzz(t)=E[z(h)z(h+t)]

Thermal electronic noise is inevitable (due to vibrations of electrons); thermal Noise can be modeled as a white Gaussian process
! !

Probability distribution is Gaussian zero mean Time auto-correlation is a Dirac pulse at 0

Often interference from a large number of scattered and similar sources can be modeled as white Gaussian noise

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Gaussian noise
x
x0 %2 = Avg Noise Power t

1 2" !

e#x

2 2! 2

x0

Pr(X(t)>x0) = area under graph on the right of x0


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Probability of Error
!

Error occurs if noise value exceeds the information signal magnitude over the decision threshold With two-level signalling, +A and A, probability of error is Q(A/%)
0
1.00E+00 1.00E-01 1.00E-02 1.00E-03 1.00E-04 1.00E-05 1.00E-06 1.00E-07 1.00E-08 1.00E-09 1.00E-10 1.00E-11 1.00E-12

Q(x)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Role of SNR
! ! !

With M=2m levels per symbol, the tx symbol values are ak=A+(2k1)A/M, with k=1,,M. With equiprobable symbols: E[ak2]=(M21)A2/(3M2)=PTX Received sample is (dispersive channel, zero ISI): yn=h0xn+zn.

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Channel Noise affects Reliability


signal High SNR noise signal + noise

signal Low SNR

noise

virtually error-free signal + noise

error-prone SNR = Average Signal Power Average Noise Power SNR (dB) = 10 log10 SNR
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Shannon Channel Capacity


If transmitted power is limited, then as M increases spacing between levels decreases ! Presence of noise at receiver causes more frequent errors to occur as M is increased Shannon Channel Capacity: ! The maximum reliable transmission rate over an AWGN bandlimited channel with bandwidth Wc Hz is
!

Cb = Wc log2(1+SNR)

bit/s

Bandlimited channel (Wc) X Y=X+Z 2Wc symbols/s Input symbol Output symbol (Gaussian) Z White gaussian noise
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Capacity of AWGN channel


!

It can be shown that in case of real input signal the optimal source is gaussian and the AWGN capacity is C = 0.5 log2(1+P/PN) [bit/symbol] where PN is the additive noise power, P is the useful signal received power A dispersive, additive noise channel can be reduced to AWGN if zero ISI is provided; to that end it must be symbol rate < 2Wc. Then Cb = Wclog2(1+(Eb/N0)Rb/Wc) [bit/s]

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Shannon Channel Capacity


! !

Reliable communications is possible if the tx rate Rb<Cb. If Rb > Cb, then reliable communications is not possible.

Reliable means the bit error rate (BER) can be made arbitrarily small through sufficiently complex coding.
!

Bandwidth Wc & SNR determine Cb


!

Cb can be used as a measure of how close a system design is to the best achievable performance. P= average power of input signal N0=noise power spectral density=k-F, k=1.381023 J/K, -=noise temperature, typically 300 K, F=noise figure, typically 6 dB

SNR=P/(N0Wc), with
! !

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example
!

Find the Shannon channel capacity for a telephone channel with Wc = 3400 Hz and SNR = 10000

C = 3400 log2 (1 + 10000) = 3400 log10 (10001)/log102 = 45200 bps


Note that SNR = 10000 corresponds to SNR (dB) = 10 log10(10000) = 40 dB

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Line Coding

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

What is Line Coding?


!

Mapping of binary information sequence into the digital signal that enters the channel
!

Ex. 1 maps to +A square pulse; 0 to A pulse

Line code selected to meet system requirements:


! ! ! !

Transmitted power: Power consumption = $ Bit timing: Transitions in signal help timing recovery Bandwidth efficiency: Excessive transitions wastes bw Low frequency content: Some channels block low frequencies
! !

long periods of +A or of A causes signal to droop Waveform should not have low-frequency content

! !

Error detection: Ability to detect errors helps Complexity/cost: Is code implementable in chip at high speed?

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Line coding examples


1
Unipolar NRZ Polar NRZ

NRZ-inverted (differential encoding) Bipolar encoding Manchester encoding Differential Manchester encoding
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Figure 3.35

Spectrum of Line codes


!

Assume 1s & 0s independent & equiprobable


!
1.2 1

NRZ Bipolar
!

power density

0.8 0.6 0.4 0.2

NRZ has high content at low frequencies Bipolar tightly packed around T/2 Manchester wasteful of bandwidth

Manchester

0.2

0.4

0.6

0.8

1.2

1.4

1.6

-0.2

1.8

fT

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Unipolar & Polar Non-Return-to-Zero (NRZ)


1 Unipolar NRZ Polar NRZ 0 1 0 1 1 1 0 0

Unipolar NRZ ! 1 maps to +A pulse ! 0 maps to no pulse ! High Average Power


0.5*A2 +0.5*02=A2/2
! ! ! !

Polar NRZ ! 1 maps to +A/2 pulse ! 0 maps to A/2 pulse ! Better Average Power
! ! ! !

0.5*(A/2)2 +0.5*(-A/2)2=A2/4 Poor timing Low-frequency content

Long strings of A or 0 Simple

Long strings of +A/2 or A/2 Simple

Poor timing Low-frequency content

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Bipolar Code
1 Bipolar Encoding
! ! !

Three signal levels: {-A, 0, +A} 1 maps to +A or A in alternation 0 maps to no pulse


!

Every +pulse matched by pulse so little content at low frequencies Spectrum centered at T/2

String of 1s produces a square wave


!

! !

Long string of 0s causes receiver to lose synch Zero-substitution codes

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Manchester code & mBnB codes


1 Manchester Encoding
! ! !

1 maps into A/2 first T/2, A/2 last T/2 0 maps into -A/2 first T/2, A/2 last T/2 Every interval has transition in middle
! !

! ! ! ! ! !

! !

Simple to implement Used in 10-Mbps Ethernet & other LAN standards

Timing recovery easy Uses double the minimum bandwidth

mBnB line code Maps block of m bits into n bits Manchester code is 1B2B code 4B5B code used in FDDI LAN 8B10B code used in Gigabit Ethernet 64B66B code used in 10G Ethernet

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Differential Coding
1
NRZ-inverted (differential encoding) Differential Manchester encoding
!

Errors in some systems cause transposition in polarity, +A become A and vice versa ! All subsequent bits in Polar NRZ coding would be in error Differential line coding provides robustness to this type of error
! !

! ! !

Same spectrum as NRZ Errors occur in pairs Also used with Manchester coding

1 mapped into transition in signal level 0 mapped into no transition in signal level

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Modems and Digital Modulation

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Bandpass Channels
fc Wc/2 fc fc + Wc/2

0
!

Bandpass channels pass a range of frequencies around some center frequency fc


!

Radio channels, telephone & DSL modems

Digital modulators embed information into waveform with frequencies passed by bandpass channel
!

A sinusoidal signal with frequency fc centered in middle of bandpass channel is named carrier Modulators embed information into the carrier

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Amplitude Modulation and Frequency Modulation


Information
+1 Amplitude Shift Keying
T 2T 3T 4T 5T 6T

-1

Map bits into amplitude of sinusoid: 1 send sinusoid; 0 no sinusoid Demodulator looks for signal vs. no signal

+1 Frequency Shift Keying


6T

-1

2T

3T

4T

5T

Map bits into frequency: 1 send frequency fc + + ; 0 send frequency fc - + Demodulator looks for power around fc + + or fc - +
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Phase Modulation
Information
Phase Shift Keying +1
T 2T 3T 4T 5T 6T

-1
!

Map bits into phase of sinusoid:


! !

1 send A cos(2$ft) 0 send A cos(2$ft+$)

, i.e. phase is 0 , i.e. phase is $

Equivalent to multiplying cos(2$ft) by +A or -A


! !

1 send A cos(2$ft) , i.e. multiply by 1 0 send A cos(2$ft+$) = - A cos(2$ft) , i.e. multiply by -1

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Modulator
Modulate cos(2$fct) by multiplying by Ak for T seconds:
Ak

Y(t) = Ak cos(2$fct), kT<t<(k+1)T

cos(2$fct) Transmitted signal during kth interval

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Demodulator
Demodulate (recover Ak) by multiplying by 2cos(2$fct) for T seconds and lowpass filtering (smoothing):
Y(t) = Akcos(2$fct) Received signal during kth interval

x
2cos(2$fct)

Lowpass Filter (Smoother)

X(t)

2Ak cos2(2$fct) = Ak {1 + cos(2$2fct)}

Multiplication for the local carrier and integration over a symbol interval takes place for every symbol Synchronous demodulation (perfect local carrier)
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example of Modulation
Information Baseband Signal

1 +A -A +A -A
0 T 0 T

2T

3T

4T

5T

6T

Modulated Signal x(t)

2T

3T

4T

5T

6T

A cos(2$ft)

-A cos(2$ft)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example of Demodulation
A {1 + cos(4$fct)} -A {1 + cos(4$fct)}

+2A
After multiplication at receiver x(t) cos(2$fct)
0 T 2T 3T 4T 5T 6T

2A +A
0 T 2T 3T 4T 5T 6T

Baseband signal discernable after smoothing

-A 1 0 1 1 0 1

Recovered Information

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Signaling rate and Transmission Bandwidth


!

Fact from modulation theory:

If Baseband signal x(t) with bandwidth B Hz then Modulated signal x(t)cos(2$fct) has bandwidth 2B Hz
!

f fc-B fc fc+B

If bandpass channel has bandwidth Wc Hz,


! ! !

Then baseband channel has Wc/2 Hz available, so modulation system supports Wc/2 x 2 = Wc pulses/second That is, Wc pulse/s per Wc Hz = 1 pulse/Hz Recall baseband transmission system supports 2 pulses/Hz

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Quadrature Amplitude Modulation (QAM)


!

QAM uses two-dimensional signaling


! !

Ak modulates in-phase cos(2$fct) Bk modulates quadrature phase cos(2$fct + $/2) = sin(2$fct)

Ak

x
cos(2$fct)

Yi(t) = Ak cos(2$fct)

+
Yq(t) = Bk sin(2$fct)

Y(t)
Transmitted Signal

Bk

x
sin(2$fct)

! !

Yi(t) and Yq(t) both occupy the bandpass channel QAM sends 2 pulses/Hz

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

QAM Demodulation
Y(t)

x
2cos(2!fct)

Lowpass filter (smoother)

Ak

2Ak cos2(2!fct)+2Bk cos(2!fct)sin(2!fct) = Ak [1 + cos(4!fct)]+Bk sin(4!fct) = Ak + [Ak cos(4!fct)+Bk sin(4!fct)]


smoothed to zero Lowpass filter (smoother)

x
2sin(2!fct)

Bk

2Bk sin2(2!fct)+2Ak cos(2!fct)sin(2!fct) = Bk [1 cos(4!fct)]+Ak sin(4!fct) = Bk [Bk cos(4!fct) Ak sin(4!fct)]


smoothed to zero

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Complex numbers
!

Tx signal with in-phase and quad modulation is x(t) = Akcos(2$fct)+Bksin(2$fct) Let Ck=Ak+iBk; then x(t) = Re[Ckexp(i2$fct)] We can now generalize to any alphabet of complex symbols to code information bits.
!

E.g. in case of polar coordinates: Re[Mkexp(i'k)exp(i2$fct)] = Mkcos(2$fct+'k) This is phase modulation ifMk is a constant or mixed amplitude and phase modulation in the general case (QAM)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Signal Constellations
! !

Each pair (Ak, Bk) defines a point in the plane Signal constellation set of signaling points
Bk
(-A,A) (A, A)

Bk

Ak
(-A,-A) (A,-A)

Ak

4 possible points per T s 2 bits / pulse


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

16 possible points per T s 4 bits / pulse

Other Signal Constellations


!

Point selected by amplitude & phase

Bk

Bk

Ak

Ak

4 possible points per T s


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

16 possible points per T s

Signal constellations and errors

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Telephone Modem Standards


Telephone Channel for modulation purposes has Wc = 2400 Hz hence 2400 pulses per second Modem Standard V.32bis
!

Trellis modulation maps m bits into one of 2m+1 constellation points


! ! !

14,400 bps 9600 bps 4800 bps

Trellis 128 Trellis 32 QAM 4

2400x6 2400x4 2400x2 2400-3429 pulses/sec

Modem Standard V.34 adjusts pulse rate to channel


!

2400-33600 bps Trellis 960

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Properties of Media and Digital Transmission Systems

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Fundamental Issues in Transmission Media


d meters Communication channel t=0 t = d/c

Information bearing capacity


! !

Amplitude response & bandwidth Susceptibility to noise & interference c = 3 x 108 m/s in vacuum . = c/"/ speed of light in medium where />1 is the dielectric constant of the medium . = 2.3 x 108 m/s in copper wire; . = 2.0 x 108 m/s in optical fiber

Propagation speed of signal


! !

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Communications systems & Electromagnetic Spectrum


!

Frequency of communications signals


DSL Cell phone WiFi

Analog telephone

Frequency (Hz)

Optical fiber

102 104

106

108

1010 1012 1014 1016 1018 1020 1022 1024

Ultraviolet light

Infrared light

Visible light

106

104

102

10

10-2 10-4 10-6 10-8 10-10 10-12 10-14 Wavelength (meters)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Gamma rays

Power and telephone

Microwave radio

Broadcast radio

X-rays

Wireless & Wired Media


Wireless Media ! Signal energy propagates in space, limited directionality ! Interference possible, so spectrum regulated ! Limited bandwidth ! Simple infrastructure: antennas & transmitters ! User/terminal can move Wired Media ! Signal energy contained & guided within medium ! Spectrum can be re-used in separate media (wires or cables), more scalable ! Extremely high bandwidth ! Complex infrastructure: ducts, conduits, poles, right-of-way

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Attenuation
!

Attenuation varies with media


!

Dependence on distance of central importance Received power at d meters proportional to 100d Attenuation in dB = 0d, where 0 is dB/meter Received power at d meters proportional to d-n Attenuation in dB = n log d, where n is path loss exponent; n=2 in free space Signal level maintained for much longer distances Space communications possible

Wired media has exponential dependence


! !

Wireless media has logarithmic dependence


! !

! !

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Twisted Pair
Twisted pair ! Two insulated copper wires arranged in a regular spiral pattern to minimize interference ! Various thicknesses, e.g. 0.016 inch (24 gauge) ! Low cost ! Telephone subscriber loop from customer to CO ! Intra-building telephone from wiring closet to desktop ! LAN cabling (Fast Ethernet, GbE) 30 26 gauge 24 gauge 22 gauge 19 gauge 12 6 1 f (kHz) 10 100 1000 Higher attenuation rate for DSL

Attenuation (dB/mi)

24 18

Lower attenuation rate analog telephone


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Twisted Pair Bit Rates


Data rates of 24-gauge twisted pair
Standard T-1 DS2 1/4 STS-1 1/2 STS-1 STS-1 Data Rate Distance
!

1.544 18,000 feet, Mbps 5.5 km 6.312 12,000 feet, Mbps 3.7 km 12.960 Mbps 25.920 Mbps 51.840 Mbps 4500 feet, 1.4 km 3000 feet, 0.9 km 1000 feet, 300 m
!

Twisted pairs can provide high bit rates at short distances Asymmetric Digital Subscriber Loop (ADSL)
! !

Much higher rates possible at shorter distances


!

High-speed Internet Access Above 28 kHz

Strategy for telephone companies is to bring fiber close to home & then twisted pair Higher-speed access + video

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Ethernet LANs
! ! !
! ! ! ! ! !

Category 3 unshielded twisted pair (UTP): ordinary telephone wires Category 5 UTP: tighter twisting to improve signal quality Shielded twisted pair (STP): to minimize interference; costly 10BASE-T Ethernet ! 10 Mbps, Baseband, Twisted pair ! Two Cat3 pairs ! Manchester coding, 100 meters 100BASE-T4 Fast Ethernet ! 100 Mbps, Baseband, Twisted pair ! Four Cat3 pairs ! Three pairs for one direction at-a-time ! 100/3 Mbps per pair; ! 3B6T line code, 100 meters Cat5 & STP provide other options

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Coaxial Cable
!

! !

! !

Cylindrical braided outer conductor surrounds insulated inner wire conductor High interference immunity Higher bandwidth than twisted pair ! Hundreds of MHz Cable TV distribution Long distance telephone transmission Original Ethernet LAN medium

35 30 0.7/2.9 mm 1.2/4.4 mm

Attenuation (dB/km)

25 20 15 10 5 0.1 1.0

2.6/9.5 mm

10

100 f (MHz)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Cable Modem & TV Spectrum


Upstream Downstream Downstream

42 MHz

500 MHz

750 MHz

550 MHz

! ! ! !

Cable TV network originally unidirectional Cable plant needs upgrade to bidirectional 1 analog TV channel is 6 MHz, can support very high data rates Cable Modem: shared upstream & downstream
! !

5-42 MHz upstream into network; 2 MHz channels; 500 kbps to 4 Mbps >550 MHz downstream from network; 6 MHz channels; 36 Mbps

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Cable Network Topology


Upstream fiber Downstream fiber Coaxial distribution plant

5 MHz
Head end

54 MHz
Fiber node

Fiber

Fiber node

Fiber

= Bidirectional split-band amplifier

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Optical Fiber
Electrical signal Modulator Optical fiber Receiver Electrical signal

Optical source
!

Light sources (lasers, LEDs) generate pulses of light that are transmitted on optical fiber
! ! !

Very long distances (>1000 km) Very high speeds ( up ro 40 Gbps/wavelength) Nearly error-free (BER of 10-15) Dominates long distance transmission Distance less of a cost factor in communications Plentiful bandwidth for new services

Profound influence on network architecture


! ! !

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Transmission in Optical Fiber


Geometry of optical fiber Light

Cladding Core

Jacket

Total Internal Reflection in optical fiber

1c

! ! !

Very fine glass cylindrical core surrounded by concentric layer of glass (cladding) Core has higher index of refraction than cladding Light rays incident at less than critical angle 1c is completely reflected back into the core

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Multimode & Single-mode Fiber


Multimode fiber: multiple rays follow different paths Reflected path Direct path Single-mode fiber: only direct path propagates in fiber

Multimode: Thicker core, shorter reach


!

Rays on different modes interfere causing dispersion & limiting bit rate More expensive lasers, but achieves very high speeds

Single mode: Very thin core supports only one mode


!

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Optical Fiber Properties


Advantages
! !

Disadvantages
!

Very low attenuation Immunity to external e.m interference Extremely high bandwidth Security: Very difficult to tap without breaking No corrosion More compact & lighter than copper wire Wideband optical amplifiers available (EDFA, SOA)

New types of optical signal impairments & dispersion


! ! !

Shot noise Polarization dependence Non linear effects If physical arc of cable too high, light lost or wont reflect Will break

! !

Limited bend radius


!

! !

! !

Difficult to splice Mechanical vibration becomes signal noise

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Very Low Attenuation


100 50 10
Water Vapor Absorption (removed in new fiber designs)

Loss (dB/km)

5 1 0.5 0.1 0.05 0.01

Infrared absorption Rayleigh scattering

0.8

1.0

1.2

1.4

1.6

1.8

Wavelength (m)

850 nm Low-cost LEDs LANs

1300 nm Metropolitan Area Networks: Short Haul

1550 nm Long Distance Networks: Long Haul

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Huge Available Bandwidth


!

Optical range from 21 to 21+"2 contains bandwidth


B = f1 f2 = 2 1 = 2 1
v v

100 50 10

v 21+"2 ! v "2 21 2
Loss (dB/km)

"2/21 1 + "2/21

5 1 0.5 0.1

Example: 21 = 1450 nm 21+"2 =1650 nm:


B= 2(108)m/s 200nm ! 19 THz (1450 nm)2

0.8

1.0

1.2

1.4

1.6

1.8

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Wavelength Division Multiplexing


! ! ! !

Different wavelengths carry separate signals Multiplex into shared optical fiber Each wavelength like a separate circuit A single fiber can carry 160 wavelengths, 10 Gbps per wavelength: 1.6 Tbps!
21 22 21 22 . 2m

21 22

2m

optical mux

optical fiber

optical demux

2m

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Coarse & Dense WDM


Coarse WDM ! Few wavelengths 4-8 with very wide spacing ! Low-cost, simple Dense WDM ! Many tightly-packed wavelengths ! ITU Grid: 0.8 nm separation for 10Gbps signals ! 0.4 nm for 2.5 Gbps

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

1540

1550

1560

ITU standard optical carrier grid


193.1 THz 1552.52 nm Supervision channel 198.51.4 THz 151010 nm 196.1 THz 193.2 THz 193.0 THz 192.1 THz 1528.77 nm 1551.72 nm 1553.33 nm 1560.61 nm

100 GHz

100 GHz

wavelength

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Carriers and optical bands


band S
1440 1460 14801520

band C
1540 1560 1580

band L
1600 1620

OA Erbium:Silica Erbium:

100 GHz

40
1440 1460 14801520

40
1540 1560 1580

40
1600 1620

80
1440 1460 14801520

80
1540 1560 1580

80
1600 1620 50 GHz

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Transmission impairments of o.f.


! !

Attenuation Dispersion: chromatic (guide + material), polarization (PMD) Non linear effect: Brillouin, Raman, Kerr (Self-Phase Modulation (SPM), Cross-Phase Modulation (CPM), Four Wave Mixing (FWM))
!

Launched power of 20&mW (13 dBm) in the cross section of a monomodal fiber (50 'm2) corresponds to 40 kW/cm2.

! ! !

Crosstalk in (D)WDM systems Noise of optical amplifiers (ASE) Laser phase noise

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Four Wave Mixing


!

Optical fiber response to an input pulse x(t) is the sum of two terms:
! !

Let x(t) be the sum of three sinusoidal terms with frequencies f1, f2, f3
!

a linear dispersive term yL(t) = "x(()h(t()d( an instantaneous cubic non linear term yNL(t) = Ax3(t)

Besides linear terms, at the output we can find sinusoidal signals at frequencies f1f2f3
!

Model for DWDM channels (extremely narrowband!!!)

Part of these spurious harmonics falls within signal band

OA
input

Low dispersion fiber

output

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Effect of FWM

Power spectrum of an 8x10 Gbps DWDM signal with Unequal Channel Spacing after 50 km of G.653 fiber (2 mW/ch).
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Standard fiber (G.652)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Dispersion shifted fiber (G.653)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Non-zero dispersion fiber (G.655)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Regenerators & Optical Amplifiers


!

The maximum span of an optical signal is determined by the available power & the attenuation:
!

If 30 dB attenuation are allowed, then at 1550 nm, optical signal attenuates at 0.25 dB/km, so max span = 30 dB/0.25 km/dB = 120 km

Optical amplifiers increase optical signal power (no equalization, no regeneration): Pout=GPin+PASE.
! !

Noise is added by each amplifier SNRout < SNRin, so there is a limit to the number of OAs in an optical path

Optical signal must be regenerated when this limit is reached


!

Requires optical-to-electrical (O-to-E) signal conversion, equalization, detection and retransmission (E-to-O) Expensive

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

DWDM & Regeneration


!

Single signal per fiber requires 1 regenerator per span


R R Regenerator R R R R R R

! ! !

DWDM system carries many signals in one fiber At each span, a separate regenerator required per signal Very expensive
R R R R

DWDM multiplexer

R R

R R

R R

R R R

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Optical Amplifiers
!

Optical amplifiers can amplify the composite DWDM signal without demuxing or O-to-E conversion Erbium Doped Fiber Amplifiers (EDFAs) boost DWDM signals within 1530 to 1620 range
! !

Spans between regeneration points >1000 km Number of regenerators can be reduced dramatically with dramatic reduction in cost of long-distance communications

OA
Optical amplifier

OA

R R R

OA

OA

R R R

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Radio Transmission
! ! !

Radio signals: antenna transmits sinusoidal signal (carrier) that radiates in air/space Information embedded in carrier signal using modulation, e.g. QAM Communications without tethering
!

Cellular phones, satellite transmissions, Wireless LANs

! ! !

Multipath propagation causes fading; iintercation of e.m. field with obstacles causes shadowing Interference from other users Spectrum regulated by national & international regulatory organizations

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Radio Spectrum
Frequency (Hz) 104 105 106 107 108 109 1010 1011 1012

FM radio and TV AM radio Wireless cable Cellular and PCS Satellite and terrestrial microwave LF 10
4

MF 103

HF 102

VHF 101 1

UHF 10-1

SHF

EHF 10-2 10-3

Wavelength (meters) Omni-directional applications Point-to-Point applications

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Spectrum allocation
Short-Wave Radio FM Broadcast Audio Frequencies AM Broadcast Television Telecommunications PCS

Gamma Rays Cosmic Rays

Visible Light

Ultra High

Ultra Violet

Very High

Very Low

Medium

Extremely Low

High

Low

Microwave

Infrared

X-rays

Cellular Telephone, SMR, Packet Radio 1 KHz 1 MHz 1 GHz 1 THz

Source: Motorola

2.4 GHz ISM (Industrial Scientific, Medical) Band

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Unlicensed Operation RF Bands


!

902MHz North & South America


902 928 Americas, most of Europe Japan Spain
! !

2.4GHz

5.1GHz

2400 U-NII Japan* Europe HiperLAN1 5200 5300

2440

France 2480

2500

902 MHz ! 26 MHz BW ! Crowded ! Worldwide limited 2.4 GHz ! 83.5 MHz BW ! Available worldwide ! IEEE802.11 WLANs 5.1 GHz ! 300 MHz BW discontinuous ! Developing
U-NII Europe HiperLAN2* 5700 5800 5900

5100

5400

U-NII: Unlicensed National Information Infrastructure

5500

5600

*Frequency Allocations are pending


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Examples
Cellular Phone ! Allocated (licensed) spectrum ! First generation: ! 800, 900 MHz ! Initially analog voice ! Second generation: ! 1800-1900 MHz ! Digital voice, messaging Wireless LAN ! Unlicenced ISM spectrum ! Industrial, Scientific, Medical ! 902-928 MHz, 2.400-2.4835 GHz, 5.725-5.850 GHz ! IEEE 802.11 LAN standard ! 11-54 Mbps Point-to-Multipoint Systems ! Directional antennas at microwave frequencies ! High-speed digital communications between sites ! High-speed Internet Access Radio backbone links for rural areas Satellite Communications ! Geostationary satellite @ 36000 km above equator ! Relays microwave signals from uplink frequency to downlink frequency ! Long distance telephone ! Satellite TV broadcast

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

GSM: radio characteristics

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Radio spectrum allocated to UMTS

Frequency Division Duplex.


! !

1920-1980 for Uplink.(12x5MHz) 2110-2170 for Downlink.(12x5Mhz) 1900-1920 (4x5Mhz) 2010-2025 (3x5Mhz)

Time Division Duplex.


! !

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Current 3G scenario
UMTS Operator
UTRAN Node B RNC UMTS IPv4 Core Network SGSN Node B GGSN IPv4 backbone

Server farm and IMS

Signaling Gateway

WWW E-mail .,

Profiles DBs ,

Diameter SIP proxy Dynamic DNS .

IPv4 over WAN

Wireless LANs IEEE 802.11

UMTS: (3GPP) MM: Ad-Hoc Protocols AA: Ad-Hoc Protocols WLAN: (IETF) MM: Mobile IP, Cellular IP, etc AA: User Name/Pwd

Wireless Internet Service Provider

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

WLAN and WPAN standards

Applications
! ! ! !

Local wireless networking (infrastructured, ad hoc) Public hot spots Home Networking Sensor networks

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
Error Detection and Correction

Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Error Control
! !

Digital transmission systems introduce errors Applications require certain reliability level
! !

Data applications require error-free transfer Voice & video applications tolerate some errors, the less the more source coding removes redundancy from original signal

Error control used when transmission system does not meet application requirement Two basic approaches: Error detection & retransmission (ARQ) Forward error correction (FEC)

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Key Idea
!

All transmitted data blocks (codewords) satisfy a pattern


! !

If received block doesnt satisfy pattern, it is in error If it satisfies pattern, it is assumed to be correct

Redundancy: Only a subset of all possible blocks can be codewords


!

Example: spell checking by taking dictionary words with same initial as letter to be spelled out

All inputs to channel satisfy pattern or condition User Encoder information Channel

Channel output Pattern checking Deliver user information or set error alarm

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Single Parity Check


!

Given a data block of k bits, add one more bit so as to make the number of 1s even
!

Same as making 0 the xor of the coded (k+1)-bit block

Info Bits: Check Bit: Codeword:


!

b1, b2, b3, , bk bk+1 = b13b23b33 3bk (b1, b2, b3, , bk,, bk+1)

Receiver checks to see if # of 1s is even


!

All error patterns that change an odd # of bits are detectable; all even-numbered patterns are undetectable

Parity bit used in ASCII code

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Example of Single Parity Code


! ! ! !

Information (7 bits): (0, 1, 0, 1, 1, 0, 0) Parity Bit: b8 = 0 + 1 +0 + 1 +1 + 0 = 1 Codeword (8 bits): (0, 1, 0, 1, 1, 0, 0, 1) If single error in bit 3 : (0, 1, 1, 1, 1, 0, 0, 1)
! !

# of 1s =5, odd Error detected

If errors in bits 3 and 5: (0, 1, 1, 1, 0, 0, 0, 1)


! !

# of 1s =4, even Error not detected

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Checkbits & Error Detection


Systematic code concept
Information bits

k bit

append nk bit

Sent codeword

n bit Channel
Received codeword

Calculate check bits

n bit
Received check bits Information accepted if check bits match

Compare

Recalculate check bits

Received info bits

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

How good is the single parity check code?


!

Redundancy: Single parity check code adds 1 redundant bit per k information bits: overhead = 1/(k+1) Coverage: all error patterns with odd # of errors can be detected
!

An error patten is a binary (k + 1)-tuple with 1s where errors occur and 0s elsewhere Of 2k+1 binary (k+1)-tuples, 1/2 have odd weight, so 50% of error patterns can be detected

Is it possible to detect more errors if we add more check bits? Yes, with the right codes

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

What if bit errors are random?


! !

Many transmission channels introduce bit errors at random, independently of each other, with probability p Some error patterns are more probable than others: P[10000000] = p(1 p)7 = (1 p)8 P[11000000] = p2(1 p)6 p 1p p)8 and p 2 1p

= (1

In any worthwhile channel p < 0.5, and so p/(1p) < 1


!

It follows that patterns with 1 error are more likely than patterns with 2 errors and so forth

What is the probability that an undetectable error pattern occurs?

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Single parity check code with random bit errors


!

Undetectable error pattern if even # of bit errors:


P[error detection failure] = P[undetectable error pattern] = P[error patterns with even number of 1s] = n 2 n p (1 p)n-2 + 2 4 p4(1 p)n-4 +

Example: Evaluate above for n = 32, p = 103


32 32 (103)2 (1 103)30 + (103)4 (1 103)28 2 4

P[undetectable error] =

$ 496 (106) + 35960 (1012) $ 4.96 (104)


!

For this example, roughly 1 in 2000 error patterns is undetectable

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Two-Dimensional Parity Check


! !

More parity bits to improve coverage Arrange information as columns


!

1 0 0 1 0 0 0 1 0 0 0 1 Last column consists 1 0 0 1 0 0 of check bits for each 1 1 0 1 1 0 row 1 0 0 1 1 1 Bottom row consists of check bit for each column

Add single parity bit to each column Add a parity column

Used in early error control systems

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Error-detecting capability
1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 1 1 One error 1 0 0 1 0 0 0 0 0 0 0 1 Two 1 0 0 1 0 0 errors 1 0 0 1 1 0 1 0 0 1 1 1

1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 Three errors 1 0 0 1 1 0 1 0 0 1 1 1

1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 bits

1, 2, or 3 errors can always be detected; Not all patterns >4 errors can be detected

Four errors
(undetectable)

Telecomunicazioni - a.a.Arrows indicate failed check 2010/2011 - Prof. Andrea Baiocchi

What is a good code?


!

Many channels have preference for error patterns that have fewer # of errors These error patterns map transmitted codeword to nearby n-tuple If codewords close to each other then detection failures will occur Good codes should maximize separation between codewords

o o o o x x x x x o o o x x o o o o o
x = codewords o = noncodewords

Poor distance properties

o x x o o

o o x

x o

o o x

o o o x o x

Good distance properties

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Other Error Detection Codes


!

Many applications require very low error rate


! !

Single parity check codes do not detect enough errors Two-dimensional codes require too many check bits

The following error detecting codes are used in practice: ! Internet Check Sums ! CRC Polynomial Codes

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Internet Checksum
!

Several Internet protocols (e.g. IP, TCP, UDP) use check bits to detect errors in the IP header (or in the header and data for TCP/UDP)
!

A checksum is calculated for header/segment contents and included in a special field. Checksum recalculated at every router, so algorithm selected for ease of implementation in software

Let header consist of L, 16-bit words, b0, b1, b2, ..., bL1 The algorithm appends a 16-bit checksum bL

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Checksum Calculation
The checksum bL is calculated as follows:
!

Treating each 16-bit word as an integer, find x = b0 + b1 + b2 + ... + bL1 modulo 2161 The checksum is then given by: bL = x modulo 2161 Thus, the headers must satisfy the following pattern: 0 = b0 + b1 + b2+ ...+ bL1 + bL modulo 2161

The checksum calculation can be carried out in software at speed compatible with router operations

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Internet Checksum Example


Use Modulo Arithmetic ! Assume 4-bit words ! Use mod 24-1 arithmetic ! b0=1100 = 12 ! b1=1010 = 10 ! b0+b1=12+10=7 mod15 ! b2 = -7 = 8 mod15 ! Therefore ! b2=1000 Use Binary Arithmetic ! Note 16=1 mod15 ! So: 10000 = 0001 mod15 ! leading bit wraps around b0+b1 =1100+1010 =10110 =10000+0110 =0001+0110 =0111 (=7) Take 1-complement b2 = 0111 =1000

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Polynomial Codes
!

Binary codewords can be associated to polynomials


!

Coefficients of polynominal are orderly equal to bits of the codeword, e.g. MSB being the coefficient of the leading power of the polynomial

! ! ! !

Polynomial arithmetic instead of check sums Implemented using shift-register circuits Also called cyclic redundancy check (CRC) codes Most data communications standards use polynomial codes for error detection
!

Polynomial codes also basis for powerful error-correction methods

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Binary Polynomial Arithmetic


!

Binary vectors map to polynomials (bk-1 , bk-2 ,, b2 , b1 , b0) # bk-1xk-1 + bk-2xk-2 + + b2x2 + b1x + b0

Addition:
(x7 + x6 + 1) + (x6 + x5) = x7 + x6 + x6 + x5 + 1 = x7 +(1+1)x6 + x5 + 1 = x7 +x5 + 1 since 1+1=0 mod2

Multiplication:
(x + 1) (x2 + x + 1) = x(x2 + x + 1) + 1(x2 + x + 1) = x3 + x2 + x) + (x2 + x + 1) = x3 + 1
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Binary Polynomial Division


!

Division with Decimal Numbers


quotient dividend

34 35 | 1222 105 divisor 17 2 140 32


!

dividend = quotient x divisor + remainder 1222 = 34 x 35 + 32

remainder x3 + x2 + x x3 + x + 1 | x6 + x5 x6 + x4 + x3 x5 + x4 + x3 x5 + x3 + x2 x4 + x4 + x2 x2 + x x = r(x) remainder = q(x) quotient dividend

Polynomial Division
divisor

Note: Degree of r(x) is less than degree of divisor


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Polynomial Coding
!

Code has binary generating polynomial of degree nk g(x) = xn-k + gn-k-1xn-k-1 + + g2x2 + g1x + 1 k information bits define polynomial of degree (k1 i(x) = ik-1xk-1 + ik-2xk-2 + + i2x2 + i1x + i0 Find remainder polynomial of at most degree nk1 q(x) xn-ki(x) = q(x)g(x) + r(x) g(x) | xn-k i(x) r(x) Define the codeword polynomial of degree (n1

b(x) = xn-ki(x) + r(x)


n bits k bits n-k bits
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Polynomial example: k=4, nk=3


Generator polynomial: g(x) = x3 + x + 1 Information: (1,1,0,0): i(x) = x3 + x2 Encoding: x3i(x) = x6 + x5
x3 + x2 + x x3 + x + 1 | x6 + x5 x6 + x5 + x4 + x4 + x4 + x3 x3 + x2 x2 x2 + x 1110 1011 | 1100000 1011 1110 1011 1010 1011 010

x5 + x4 + x3

Transmitted codeword: b(x) = x6 + x5 + x


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

b = (1,1,0,0,0,1,0)

Calcolo con shift register


Encoder for

G(x) = x 3 + x +1
g1 = 1

M(x) = x 3 + x

g0 = 1

g3 = 1
Reg 1 Reg 2

M(x)
!

Reg 0

!
!

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

The Pattern in Polynomial Coding


!

All codewords satisfy the following pattern:

b(x) = xn-ki(x) + r(x) = q(x)g(x) + r(x) + r(x) = q(x)g(x)


! ! !

All codewords are a multiple of g(x)! Receiver should divide received n-tuple by g(x) and check if remainder is zero If remainder is nonzero, then received n-tuple is not a codeword

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Undetectable error patterns


(Transmitter) (Receiver)

b(x)

R(x)=b(x)+e(x)

(Channel) e(x) Error polynomial


! ! !

! !

e(x) has 1s in error locations & 0s elsewhere Receiver divides the received polynomial R(x) by g(x) Blindspot: If e(x) is a multiple of g(x), that is, e(x) is a nonzero codeword, then R(x) = b(x) + e(x) = q(x)g(x) + q(x)g(x) The set of undetectable error polynomials is the set of nonzero code polynomials Choose the generator polynomial so that most common error patterns can be detected.

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Designing good polynomial codes


!

Select generator polynomial so that likely error patterns are not multiples of g(x)

Detecting Single Errors


! !

e(x) = xi for error in location i+1


If g(x) has more than 1 term, it cannot divide xi

Detecting Double Errors


! ! !

e(x) = xi + xj = xi(xj-i+1) where j > i


If g(x) has more than 1 term, it cannot divide xi If g(x) is a primitive polynomial, it cannot divide xm+1 for all m<2n-k-1 (Need to keep codeword length less than 2n-k-1)
!

Primitive polynomials can be found by consulting coding theory books

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Designing good polynomial codes


!

Detecting Odd Numbers of Errors


!

Define g(x) to be a multiple of x+1


!

This implies x+1 must be a factor of all codewords b(x)

For e(x) to be an undetectable error pattern, it must be e(x) = q(x)g(x) for some q(x) Evaluate this identity at x=1 and get e(1) = 0 (it must be g(1)=0; why?); then e(x) cannot have ad odd number of 1s (why?)
!

All odd numbers of errors are detectable!

Pick g(x)=(x+1)p(x), where p(x) is primitive

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Standard Generator Polynomials


CRC = cyclic redundancy check
!

CRC-8: = x8 + x2 + x + 1 CRC-16: = x16 + x15 + x2 + 1 = (x + 1)(x15 + x + 1) CCITT-16: = x16 + x12 + x5 + 1

ATM Bisync HDLC, XMODEM, V.41

CCITT-32: = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 IEEE 802, DoD, V.42

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Hamming Codes
! ! !

Class of error-correcting codes Capable of correcting all single-error patterns For each m > 2, there is a Hamming code of length n = 2m 1 with n k = m parity check bits
Redundancy

m
3 4 5 6

n = 2m1
7 15 31 63

k = nm
4 11 26 57

m/n
3/7 4/15 5/31 6/63

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

m = 3 Hamming Code
! !

Information bits are b1, b2, b3, b4 Equations for parity checks b5, b6, b7 b5 = b1 b6 = b1 + b2 b7 = + b3 + b4 + b4 + b 2 + b3 + b4

! !

There are 24 = 16 codewords (0,0,0,0,0,0,0) is a codeword

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Hamming (7,4) code


Information Codeword Weight

b1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

b2
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

b3
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

b4
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

b1 b2 b3 b4 b5 b6 b7
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1

w( b )
0 4 3 3 3 3 4 4 3 3 4 4 4 4 3 7

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Parity Check Equations


!

Rearrange parity check equations: 0 = b5 + b5 = b 1 0 = b6 + b6 = b 1 + b2 0 = b7 + b7 = + b3 + b4 + b5 + b4 + b6 + b7 + b2 + b3 + b4

In matrix form: b1
b2
0 0 0 = 1011100 = 1101010 = 0111001

b3 b4 = H bt = 0 b5 b6 b7
!

All codewords must satisfy these equations Note: each nonzero 3tuple appears once as a column in check matrix H

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Error Detection with Hamming Code


s=He= 1101010
0111001 1011100 0 0 1 0 0 0 0 0 1 0 0 1 0 0

= 0
1

Single error detected

s=He= 1101010
0111001

1011100

= 1 + 0
1 0

= 1
1

Double error detected

1 1 1 0 1011100 1 1 0 = 1 + 1 + 0 s=He= 1101010 0 1 0111001 0 1 0 Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi 0

= 0

Triple error not detected

Minimum distance of Hamming Code


!

With Hamming (7,4) code undetectable error pattern must have 3 or more bits, i.e. at least 3 bits must be changed to convert one codeword into another codeword
o o

Set of n-tuples within distance 1 of b1

b1
o

Distance 3 o o

b2
o

Set of n-tuples within distance 1 of b2

! !

Spheres of distance 1 around each codeword do not overlap If a single error occurs, the resulting n-tuple will be in a unique sphere around the original codeword

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

General Hamming Codes


!

For m > 2, the Hamming code is obtained through the check matrix H:
! !

Each nonzero m-tuple appears once as a column of H The resulting code corrects all single errors

For each value of m, there is a polynomial code with g(x) of degree m that is equivalent to a Hamming code and corrects all single errors
!

For m = 3, g(x) = x3+x+1

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Error-correction using Hamming Codes


(Transmitter) b

R (Receiver)

e Error pattern
!

! !

The receiver first calculates the syndrome: s = HR = H (b + e) = Hb + He = He If s = 0, then the receiver accepts R as the transmitted codeword If s is nonzero, then an error is detected
! ! !

Hamming decoder assumes a single error has occurred Each single-bit error pattern has a unique syndrome The receiver matches the syndrome to a single-bit error pattern and corrects the appropriate bit

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Error correcting codes


!

Very powerful correcting codes have been devised over time


!

Used especially for wireless communications, satellite, deep space communications

! ! !

Two common code types are Convolutional codes Turbo-codes

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Fundamentals of communications
RS-232 Asynchronous Data Transmission
Adapted from slides of the book: A. Leon Garcia, I. Widjaja, Communication networks, McGraw Hill, 2004

Recommended Standard (RS) 232


! ! ! !

Serial line interface between computer and modem or similar device Data Terminal Equipment (DTE): computer Data Communications Equipment (DCE): modem Mechanical and Electrical specification

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Pins in RS-232 connector


1 13

(a)

14 25

(b)

1 2 3 4 5 6 7 8 20 22

Protective Ground (PGND) Transmit Data (TXD) Receive Data (RXD) Request to Send (RTS) Clear to Send (CTS) Data Set Ready (DSR) Ground (G) Carrier Detect (CD) Data Terminal Ready (DTR) Ring Indicator (RI)

1 2 3 4 5 6 7 8 20 22

DTE

DCE

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Synchronization
!

Synchronization of clocks in transmitters and receivers.


!

Example: assume 1 and 0 are represented by V volts and 0 volts respectively


! !

clock drift causes a loss of synchronization

Data T S
1 0 1 1 1

Correct reception Incorrect reception due to incorrect clock (slower clock)

Clock
0 0 1 0 0 0

Data T S Clock

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Synchronization (contd)
! !

Incorrect reception (faster clock) How to avoid a loss of synchronization?


! !

Asynchronous transmission Synchronous transmission


1 Data T S Clock 0 1 1 1 0 0 1 0 0 0

Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Asynchronous Transmission
!

Avoids synchronization loss by specifying a short maximum length for the bit sequences and resetting the clock in the beginning of each bit sequence. Accuracy of the clock?

Data bits Line idle Start bit 1 2 3 4 5 6 7 8 Stop bit

3T/2

Receiver samples the bits


Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Synchronous Transmission
!

Sequence contains data + clock information (line coding)


!

i.e. Manchester encoding, self-synchronizing codes, is used.

! ! !

R transition for R bits per second transmission R transition contains a sine wave with R Hz. R Hz sine wave is used to synch receiver clock to the transmitters clock using PLL (phase-lock loop)

1 Voltage

time
Telecomunicazioni - a.a. 2010/2011 - Prof. Andrea Baiocchi

Das könnte Ihnen auch gefallen