chapter 3. communication networks leon-garcia, widjajaanalog vs digital analog: if we transmit .8...

139
Digital Transmission Fundamentals Chapter 3. Communication Networks Leon-Garcia, Widjaja

Upload: others

Post on 25-Mar-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Digital Transmission Fundamentals

Chapter 3.Communication Networks

Leon-Garcia, Widjaja

Page 2: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

The Questions● Digital representation● Why digital transmission● Digital representation of analog signals● Characterization of communication channels● Fundamental limits● Line coding● Properties of transmission media● Error detection-correction

Page 3: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Block vs Stream communication

● Block:– Text, pictures, software

– Total time of communication

● Stream:– Internet radio, streaming video, midi

– Restrictions on rate of arrival of packets

Page 4: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Block information

D=t p+LR

Page 5: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Reducing delay

● Decrease propagation delay– Increase speed of light ;-)

– Optimize routing● Avoid satellite channels

● Increase transmission rate– The subject of intense research

● Reduce data length– Compression.

Page 6: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Secret to compression

● In text– Some letters or letter pairs are far more common

– “ae” is more common than “zq”

– We may encode “ae” with 3 bits and “zq” with 16

● In images, sound, etc– Do not transmit non perceivable information (lossy)

– Exploit statistical correlations

– Use different encoding

Page 7: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Streaming

● For analog signals, the most important quantity is bandwidth (of the signal)– A measure of how fast the signal changes

– The unit is the Hz

– It is the frequency of the highest frequency component

Page 8: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Streaming

● Voice (telephony)– 4 kHz is considered enough

– We need 8,000 samples per second

– This is called Pulse Code Modulation

● Music– 20 kHZ is enough, but use 22 kHz

– We need 44,000 sample per second

Page 9: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Streaming

● PCM– A stream of 8-bit (or 16 or ...) samples

● Differential PCM– Transmit difference from previous sample.

● Adaptive DPCM– Adapts to variation of voice level

● Linear Predictive Methods– Predict next value and transmit the difference only

Page 10: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Why Digital Comunication

● Many common signals are analog● Yet almost all communication is digital now● Reasons

– Cheaper

– Ability to restore signal after degradation

– Advanced routing

Page 11: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Analog vs Digital

● Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise– Noise is impossible (to a great extend) to remove

● Digital: If we transmit 1 Volt and receive .8 Volt we know it is 1 Volt– All the noise enters the system upon digitization.

– Can have re-generators at regular intervals

– Only if the noise is strong and signal weak we lose information (kind of)

Page 12: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Channel Bandwidth

● Amplitude response function– The amplification (or attenuation) of every

frequency component going through the channel

● Bandwidth is the frequency after which the components have much more significant attenuation.– Frequency after which the ARF dips

Page 13: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Channel Bandwidth

f

A(f)

Page 14: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sawtooth components

Page 15: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Intermediate components

Page 16: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Signal to Noise Ratio

● SNR, one of the most useful quantities● Ratio of (average) signal power to (average)

noise power● Power and variance of a signal are sometimes

indistinguishable for electrical engineers● Commonly reported in decibell (db)

– It is a logarithmic scale

Page 17: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Signal to Noise ratio

σn2=E {n2

}

P=1Rn2

Page 18: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Signal to Noise ratio

SNR=P sig

Pnoise

SNR db=10 log10 SNR

Page 19: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Why is SNR Important?

● Imagine we had no noise...● We could take the entire wikipedia, say 1 TB● Treat the whole thing as a number● Transmit it as 0.10111001101.... Volt● We need zero bandwidth for this!

Page 20: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Noise and Signal

Page 21: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Multilevel Signals

Page 22: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Multilevel Signals

● The noise should be small enough to allow us to distinguish the levels– Increase the power of the signal

– Decrease the noise

– Lower the bit rate (if we transmit every bit for a longer time we can average the noise out)

Page 23: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Example: Telephone lines

● They have 1% noise (amplitude)● SNR is 10,000:1● SNR in db is 10*log 10000 = 10*4 = 40

Page 24: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Channel Capacity

● Depends on:– Bandwidth

– SNR

● Studied by Claude E. Shannon, father of communication theory– Information Theory (1948)

● It is a probabilistic theory● Provides upper limit for the amount of data the

receiver can meaningfully determine

Page 25: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Channel Capacity

C=W log2(1+SNR)

Page 26: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Example Telephone lines

● Bandwidth 3.4 kHz● SNR 10,000● Capacity is:

– 3400 * log(10000)/log(2) = 3400*4*3.3 = 45,178

Page 27: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Fourier Transform Signals

x (t)=∑ αk cos (2 π k f o t+ϕk )

x (t)=∑ αk sin (2π k f ot+ϕ k )

x (t)=∑ αk cos (2 π k f o t)+¿

∑βk sin(2π k f o t)

Page 28: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Signal Bandwidth

● It is the frequency of the highest frequency component... but

● Components of very high frequency with miniscule weight are always present

● A better definition is:– Bandwidth is the frequency range that contains

99% of the power of the signal

Page 29: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Bandwidth: Examples

1 0

kHz

1 2 3 4

1 2 3 4

Page 30: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sampling

● We can approximate an analog signal with a set of discrete measurements

● Under certain conditions the original analog signal can be reconstructed exactly

● The “Sampling Theorem” provides the preconditions– The bandwidth of the signal can be no more than

half the sampling rate

Page 31: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sampling

x (t)x (nT )xn= x(nT )

s (t )

xr( t)=∑n

xn s (t−nT )

Page 32: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Samplingxr=∑

n

xn s (t−nT )

s (t )

x1 x3

x1 x3

Page 33: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sampling

● We can do linear interpolation with this little triangle

● We can do a smoother interpolation with a “spline”

● The “perfect” interpolation is the sampling function

Page 34: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sampling Function

s (t )=sin (2πW t )

2πW t

W=1T

Page 35: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sampling Function

● Works perfectly... in theory● It dies off very slowly (1/t)● Cannot be implemented in practice● We use various approximations● Typically we window it with a Gaussian

Page 36: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Sampling Function

Page 37: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Quantization

● In modern applications samples are digitized● Digital signals can be transmitted error-free

(almost)● All the error sneaks in during digitization● Simplest is the uniform quantizer

Page 38: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Quantization Error

en= yn− xn

SNR=σ x

2

σ e2

Page 39: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Quantization Error

y

x−Δ2

Δ2

Page 40: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Quantization Error

σ e2=Δ2

12

Δ=V

2m−1

Page 41: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Power of the Signal

● It is related to V– Signal ranges between -V...V

● V is chosen so that the signal is almost always between -V...V

● If we assume that the pdf of the signal is Gaussian– Signal is almost always within 4 standard

deviations

Page 42: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Power of the Signal

-VV

V=4 σ x

Page 43: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

SNR

SNR =σ x

2

σ e2 =

V 2

16Δ

2

12

=34V 2

Δ2

=34V 222 (m−1)

V 2 =34

22(m−1 )

=316

4m

Page 44: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

SNR db

SNRdb = 10 log(4 )m + 10 log(316

)

= 6m−7.27

= 10 log316

4m

Page 45: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

SNR - Example

● For 8 bit per sample (telephones)● SNR = 48 – 7.27 = 40.73 db● Every extra bit adds 6db to the SNR

– An extra bit halves the quantization error

– So it reduces the power of the quantization error by 4

– The log of 4 is about 6

Page 46: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Non-uniform Quantization

● Depending on the application it might not be optimal to have all intervals same size

● For audio we prefer larger intervals for larger signal magnitude

● This may increase– The SNR for a particular application

– The perception of quality by humans

Page 47: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Communication Channels

● We usually assume channels to be– Linear

– Time invariant

● Neither is perfectly true but works in practice.● Summarized as:

– The response to the sum of two signals is equal to the sum of the responses.

– The response does not change with time.

– The response to a sine is a shifted scaled sine

Page 48: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Linear Time Invariant

x2( t )→ y2( t)

x1(t )+ x2( t)→ y1(t)+ y2(t)

x1(t+τ)→ y1( t+ τ)

x1(t )→ y1( t)

Page 49: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Attenuation

● The ratio of power going in over the power coming out

● If we have attenuation 3db per kilometer– In one kilometer the power if halved

– In 15km the power is down about 30,000 times!

– Voltage is down about 170 times

Page 50: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Amplitude Response Function & Fourier

x (t) =∑k

αk cos(2π k f o t)

y (t )=∑k

A(k f o)akcos (2 π k f o t + ϕ (k f o))

Page 51: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Delay

ϕ( f ) =−2π f τ

cos (2π k f o t−2π f τ) = cos (2 π k f o(t−τ))

Page 52: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Finding the Frequency Response

● We could send one cosine after another through the channel and measure the response

● Or we could send the sum of all the cosines at once– It is linear time invariant after all

● This sum is called impulse or Dirac function or Delta function

Page 53: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Impulse Response Function

● It is the response of the channel to the impulse function

● It is mathematically equivalent to the amplitude and phase responses of the channel– The one can be obtained from the other through a

Fourier transform

Page 54: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Example: Low-pass channel

A( f )=1

ϕ( f )=2π f τ

h( t)=s (t−τ)

s (t )=sin(2 πW t)

2πW t

−W≤f≤W

Page 55: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

The Nyquist Signaling Rate

● Let p(t) be the response to a pulse that appears at the other side of the channel

● What is a good shape for p(t) so that we recover the original signal most easily

● Reduce the inter-symbol interference.● What is the pulse rate under these conditions?

Page 56: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Nyquist Signaling Rate

Page 57: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

The Nyquist Signaling Rate

Page 58: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

The Nyquist Signaling Rate

● The peak of a pulse coincides with the zeros of all the other pulses

● This allows us to pack the pulses closely● Pulse rate is twice the bandwidth● The sampling function is not implementable● There are very good approximations

Page 59: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Shannon Channel Capacity

Withoutnoise

Page 60: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Shannon Channel Capacity

With littlenoise

Page 61: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Shannon Channel Capacity

More bits

Page 62: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Shannon Channel Capacity

Too manybits

Page 63: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Shannon Channel Capacity

C =W log2(1+SNR)

Page 64: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Line Coding

● We want to transmit bits over a channel● The obvious is to send 5V to transmit 1 and 0V

to transmit 0● Sounds good, but can we do better● What are the problems with this?

– Bandwidth

– Clocking

– Polarity

Page 65: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Return to Zero

● A transition 0, 5, 0 Volt is an one● A constant 0 Volt is a zero● Self clocking is easy (as long as we do not

have too many zeros in a row)

Page 66: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Non-Return to Zero

● Consecutive 1s have no intermediate zero in between

● Fewer transitions than RZ

Page 67: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

DC component

● This simplest scheme is called Unipolar NRZ● Biggest problem:

– DC component

– Wastes energy

– Very low frequencies are tricky● Most transmission lines cut-off DC component● May lose clock synchronization

Page 68: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

DC Component Power

P=0.5

P=0.5∗02+0.5∗12

Page 69: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

DC Component

● A long series of 1s can cause even more problems

Page 70: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Polar NRZ

● A simple solution is to represent– 1: +2.5V

– 0: -2.5V

● Same separation● Half the energy● DC component much smaller

– 0s and 1s are about 50-50

Page 71: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Polar NRZ Power

P=0.5∗0.25+0.5∗0.25

P=0.25

P=0.5∗(−0.5)2+0.5∗0.52

Page 72: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Polar NRZ

● Long sequences of either zeros or ones is still a problem– DC component

– Loss of clocking

Page 73: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Bipolar NRZ

● Zero is 0V● One is either -2.5 or +2.5V (alternates)● DC component disappears● Clocking problem for long strings of 0s

Page 74: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

NRZ-inverted (differential encoding)

● It is easy to detect polarity on a cable● How do you detect it in wireless?

– Hard

● Map bits to transitions– No transition: zero

– Transition: one

● Still a problem with long strings of zeros

1 1 1 0 0

Page 75: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Manchester Encoding

● Like polar encoding (positive-one, negative zero)● But:

– Transmit 10 for one

– Transmit 01 for zero

● There is always a transition in the middle of the pulse● Clocking easy, little low frequencies● Wastes bandwidth

Page 76: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Manchester Encoding

● Variant (differential):– Zero: transition at the beginning of pulse

– One: no transition at the beginning of pulse

● Variant (mBnB):– Straight Manchester uses two bits to encode one

(1B2B)

– 4B5B is used in FDDI (Fiber Distributed Digital Interface)

Page 77: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Manchester Encoding

● Variant 4B3T:– Uses 3 ternary bits (0, 1, 2) to represent 4 binary

– The ternary bits are positive, negative and zero voltage

– Used in 100Base-T4

Page 78: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Modulation-Demodulation

● Modems● We have to use them whenever we cannot

use the baseband– Telephone lines

– Cable

– Wireless

– Fiber

Page 79: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Amplitude Modulation

● Amplitude Shift Key in digital communication● Used in fiber mostly or in conjunction with PSK● The carrier frequency is turned on for 1, off for

0

Page 80: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Frequency Modulation

● Frequency Shift Keying● We have two carrier frequencies

– O: transmit one frequency

– 1: transmit the other

● Not used much● Very similar to PSK

Page 81: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Phase Shift Keying

● Transmit cos(w t) for 0● Transmit cos(w t + ph) for 1

Page 82: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Decoding PSK

● To decode a PSK signal we need– A local oscillator at the same frequency (easy) and

phase (hard) with the transmitter

– A signal multiplier

● We multiply the incoming signal with the cosine produced by the local oscillator

Page 83: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Decoding PSK

A cos (ωc t)×cos (ωc t )=A2

(1−cos(2ωc t ))

A2

(1−cos(2ωc t ))∗LPF =

A2

Page 84: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Half the Bandwidth?

● In baseband line coding the pulse rate was 2W for a channel of bandwidth W

● It can be shown that the pulse rate is only W for this scheme

● Somewhere someone is hiding something!

Page 85: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Quadrature Amplitude Modulation

● We can transmit the sum of a sine and a cosine and separate them at the receiver end

● Mathematicians say that a sine and a cosine are orthogonal to each other– Orthogonal means that their dot product is zero

– The dot product is the integral of their product over their period (or multiple of it)

– We approximate the integral with a LPF

Page 86: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

QAM

Y (t )= A cos (ωc t) + B sin(ωc t )

(Y (t )×cos(ωc t))∗LPF =

( A2 (1+cos (2ωc t )) +B2

sin(2ωc t))∗LPF =

A2

Page 87: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

QAM

Y (t )= A cos (ωc t) + B sin(ωc t )

(Y (t )×sin (ωc t ))∗LPF =

( A2 sin (2ωc t) +B2

(1−cos (2ωc t)))∗LPF =

B2

Page 88: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

QAM Mod-Demod

Bk

×

+

sin(ωc t)

Ak

cos (ωc t)

×

Y k

Y k

×

×

2sin(ωc t)

2cos (ωc t)

Bk

Ak

LPF

LPF

Page 89: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Signal ConstellationsB

A A

B

Page 90: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

QPSK

● Same as QAM but– A and B take values +1 or -1

● Can encode 2 bits per pulse– Constellation of 4 points

● QAM systems fall back to QPSK in the presence of strong noise

Page 91: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

WiFi-n

● Combines WiFi-g with– Broader channel (40MHz vs 20MHz)

– MIMO antennas

● Negotiation between transmitter and receiver– Single stream PSK (6.5 Mb/s)

– …

– 4 stream QAM-64 (5B6B) (600 Mb/s)

Page 92: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

MIMO

● Multiple Input Multiple Output● Several transmitting and receiving antennas● Spatial beam forming● E.g. a x b : c

– Transmit antennas: a

– Receive antennas: b

– Spatial streams: c

Page 93: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Properties of Media

● Distortion– Amplitude response function

– Phase shift (response) function

● Signal to noise ratio– Signal attenuation

– Crosstalk and interference

● Signal delay

Page 94: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Speed of Propagation

● Speed of light– Affected by the dielectric medium, geometry

– Modality

● Skew– Multiple paths

– Multiple modes

– Multiple wires

Page 95: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Wired vs Wireless

● Wired– Point to point

– Needs right of way

– Can bundle more wires to increase capacity

– Exponential attenuation

● Wireless– Limited spectrum

– Heavily regulated

– Mobile

– Polynomial attenuation (for small distances)

Page 96: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Twisted Pair

● The twists help minimize interference● Many pairs can be bundled together● Significant attenuation w/ distance

– 1-4 db/mile @ 1kHz

– 10-20 db/mile @ 500kHz

● Bandwidth depends on distance

Page 97: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Digital Subscriber Lines

● Asymmetric DSL– Uses twisted pairs

– Depending on the distance can have from 1.5 to 6 Mbps

– Often use Discrete MultiTone to avoid noisy and distorting areas of the spectrum

– Subchannels use QAM

Page 98: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Local Area Networks

● Mostly twisted pairs currently– Used coaxial cable 20 years ago

● Cat-3 is Unshielded Twisted Pair● Cat-5 (5e, 6) is tightly twisted UTP

Page 99: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

10BASE-T

● 10 Mb/s baseband twisted pair● Two cat-3 UTP connect between computer

and hub (star configuration)● Manchester line coding● Max distance 100 meters

Page 100: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

100BASE-T

● Comes in at least two flavours– 100BASE-T4 (defunct)

● 3 pairs of UTP, cat-3, + one more for collision detection● Each pair carries 33 1/3 Mb● Uses a 4B3T scheme

– 100BASE-TX● Two cat-5, one per direction● 125 Mpulses/s● Uses a 4B5B scheme

Page 101: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Coaxial Cable

● Solid center conductor inside a braided cylindrical outer conductor

● Great immunity against interference and crosstalk (low SNR)

● High bandwidth; good for backbone networks● Costly to make, install and handle

– Fiber (mostly) took over

Page 102: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Cable Modem

● Original cable was for downstream only● Was modified to carry a narrow band of

upstream● Each TV channel can carry 36Mb/s● User modem has to listen for packets in a

certain channel and compete for time slots on the cable

Page 103: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Old Style Ethernet

● 10Base5 and 10BASE2● Aka thick and thin Ethernet● Baseband, Manchester● Thick, was too bulky

Page 104: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Optical Fiber

● Thin ultra-transparent glass fiber● Transparency varies with wavelength● For some bands (1300 nm, 1550 nm) goes

down to about .2 db/km

Page 105: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Transmission Modes

Page 106: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Propagation

● Different modes travel with different speeds● After a long run the two modes will be out of

sync and the signal will be heavily distorted● Very thin fibers will support only one mode

– Unimodal fibers can be used for large distances (5-70 km)

● Unimodal fibers have very little (but non-zero) distortion

Page 107: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Frequency and Bandwidth

f =cλ

f =3⋅108

10−6 = 3⋅1014

∂ f =cλ2

∂λ = f ∂λλ

Page 108: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Higher Frequency-Higher Bandwidth

● Light is EM radiation, just higher frequency (in the order of a million times higher then WiFi)

● What looks like a narrow band can carry many Gb of information

● Main limit to distance is power loss– Intermediate optical amplifiers (now are cheap)

– Electronic regeneration (expensive)

Page 109: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Wavelength Division Multiplexing

● Similar to Frequency Division Multiplexing– Like tuning to radio stations

● We do not quote frequencies in optical bands● Hence “wavelength”● Lasers of different color carry different signals

– “Color” is in the infrared and thus invisible

Page 110: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

WDM

● Early systems handled 16 channels, 2.5 Gb/s each

● Coarse WDM have few channels widely separated (cheap)

● Dense WDM have dense packing of channels– 80-160 channels

– 10-40 Gb/s

– .8-.4 nm separation

Page 111: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Backbone Networks

● High capacity of fiber makes them ideal for backbone networks

● Typically 40-1600 Gb/s with WDM● Cost for the last mile is prohibitive

Page 112: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

LAN on Fiber

● Can easily do 1Gb/s and 10Gb/s● For shorter distances copper is competitive● For larger distances (.5-5 km) fiber wins● Multimode can do up to .5 km● Two primary standards

– 1000BASE-SX shortwave (850nm)

– 1000BASE-LX longwave (1300nm)

Page 113: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Radio Transmission

● Spectrum ranges from 3 kHz to 300 GHz● Wavelength is from 10 km to 1 mm● Bands are spaced every factor ten

– LF, MF, HF, VHF, UHF, SHF, EHF

● Higher frequencies more directional● Most digital communication is currently 1-5

GHz● Point-to-point, satellite comm in 2-40 GHz

Page 114: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Infrared

● Does not penetrate walls– Reduce interference

● Huge potential bandwidth– In theory!

● IrDA (Infrared Data Association)– Various standards to connect devices like

keyboards, mice and printers to a computer

Page 115: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Error Detection and Correction

● Probability of error in a transmission is never zero

● Using various techniques we can make it arbitrarily small

● Media have error rates from 1.0e-3 to 1.0e-9● Tolerance to error also varies hugely

Page 116: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Error Control Techniques

● Two basic approaches– ARQ (Automatic Retransmission reQuest)

● Needs a return channel

– Forward Error Correction● Enough redundancy to recover missed signal

● Both require error detection● Both trade bandwidth for reliability

Page 117: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Error Detection

● Basic idea simple– Specify a “pattern”

– Add enough bits to the signal to satisfy the pattern

– Check if it still satisfies the pattern after transmission

● Simplest pattern is a parity bit

Page 118: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Single Parity Check-code

● Takes k information bits and produces one check bit● Append the check bit to the information bits and form

a codeword● If the check bit is the modulo-2 sum of the

information bits we have an even parity scheme● If the receiver sees odd parity, it means an error

occurred.● We use modulo-2 arithmetic throughout this section

Page 119: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Probability of an Error

● We usually assume that the probability of an error (flipped bit) is small

● Also assume that the probability or error in two bits is independent

● Let p is the probability of an error● Let n be the number of bits in a packet

Page 120: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Probability of having j Errors

p( j)= (nj) pj(1− p)n− j

(nj)=n!j !(n− j)!

Page 121: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Two Dimensional Parity

● The simplest method● Not the most efficient

0 1 1 11

1 0 1 00

1 0 0 10

1 0 0 01

1 1 0 00

Page 122: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Internet Checksum

● Most communication systems use some form of checksum

● Minimizes the probability of error going undetected

● Has to be simple to compute, portable● IP uses 16 bit, 1's complement● We will play with 4 bits

Page 123: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Checksum: example● The checksum of two words

– 10, 12: 1010, 1100

– 10+12 = 22; 1010+1100 = (1)0110

– 22 mod 15 = 7; 0111

– -7 mod 15 = 8; 1000

● At the receiving end– 10, 12, 8, 1010, 1100, 1000

– 10+12+8=30; (1)1110

– 30 mod 15 = 0

Page 124: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Polynomial Codes

● Also known as Cyclic Redundancy Check (or Codes)

● We use polynomials with modulo-2 coefficients● Every bit string is a polynomial

– In our mind!

– Every bit is a coefficient

– A byte is a 7th degree polynomial (not 8!)

Page 125: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Modulo-2 Arithmetic

● 1+1 = 0● 1+0=0● 0+1=0● 1-1 = 0

– Addition and subtraction are the same

● 1*1 = 1● 1*0=0● 0*1=0● 0*0=0

Page 126: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Information Polynomial

i( x) = ∑m=0

k−1

im xm

i( x) = i k−1 xk−1+ ik−2 x

k−2+…+i1 x1+i0

Page 127: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Operations on Polynomials● Add two polynomials

– Pairwise add of the corresponding coefficients

– Bit-wise XOR

● Subtract– Exactly the same as add!

● Multiply– Use the distributive property

– Unsurprisingly, polynomial multiplication is a ● Convolution!

Page 128: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Polynomial Division

● Similar to integer division● It is not (exactly) a convolution● We use a longhand-like procedure in our

examples

Page 129: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Polynomial Division

x3+ x+1

x3+ x2+x

x6+ x5

x6+ +x 4+x3

x5+ x4+x3

x5+ +x3+ x2

x 4+ + x2

x 4+ + x2+xxremainder

divisor

divident

quotient

Page 130: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Generator polynomial

● When we k bits of information embedded in n bit codeword we have n-k check-bits

● We will use an n-k degree generator poly● We multiply our information polynomial by the

n-k power of x (stick n-k zeros at the end)● Divide by the generator polynomial● Add the remainder to the shifted information

polynomial

Page 131: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Error Polynomial

R( x) = g (x )q (x )+e ( x)

e ( x)?= g (x )q ' ( x)

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

Page 132: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Error Polynomial

● The error is detectable iff the error polynomial is not divisible by the generating polynomial

● We examine 3 cases:– One error

– Two errors

– Burst of errors

Page 133: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Single Error

e ( x)=x i≠g (x )q ' ( x)

e ( x)=x i

Page 134: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Iff...

● The generating polynomial has more than one 1 in it

● Easy to guarantee that single errors are detected

Page 135: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Double errors

x i ≠ g ( x)q i( x)

e ( x) = x i + x j = x i (1+x j−i)

(1+x j−i) ≠ g (x )q j−i

i< j

Page 136: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Double errors● The second condition will hold if the

polynomial is primitive– A polynomial of degree N is primitive iff the

smallest value of m for which 1 + xm is divisible by the polynomial is m = 2N-1

● If g(x) is of degree n-k will detect double errors if the codeword length is less than 2n-k -1.

● Often the polynomials used in practice have the form– q(x) = ( 1 + x ) p(x)

– Where p(x) is primitive

Page 137: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Burst of Errors

e ( x) = x i d (x )

x i ≠ g ( x)q i( x)

Page 138: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Burst of Errors

● If the degree of d(x) is less than g(x), g(x) will never divide d(x)

● If the length of the burst is less than the degree of the generating polynomial the error will be detected

● I the error burst is longer it will be detected with probability 1-2k-n.

Page 139: Chapter 3. Communication Networks Leon-Garcia, WidjajaAnalog vs Digital Analog: if we transmit .8 Volt and receive .81 Volt the receiver does not know if it is noise – Noise is impossible

Shift register for remainder

Reg 0 Reg 1 Reg 2+ +