Data Encoding (Chap. 5)

39
University of Delaware CPEG 419 1 Data Encoding (Chap. 5) Transforming original signal just before transmission. Both analog and digital data can be encoded into either analog or digital signals.

description

Data Encoding (Chap. 5). Transforming original signal just before transmission. Both analog and digital data can be encoded into either analog or digital signals. Digital Transmission Terminology. Data element: bit. Signaling element: encoding of data element for transmission. - PowerPoint PPT Presentation

Transcript of Data Encoding (Chap. 5)

Page 1: Data Encoding (Chap. 5)

University of Delaware CPEG 419 1

Data Encoding (Chap. 5)

Transforming original signal just before transmission.

Both analog and digital data can be encoded into either analog or digital signals.

Page 2: Data Encoding (Chap. 5)

University of Delaware CPEG 419 2

Digital Transmission Terminology

Data element: bit.Signaling element: encoding of data

element for transmission.Unipolar signaling: signaling

elements have same polarization (all + or all -).

Polar signaling: different polarization for different elements.

Page 3: Data Encoding (Chap. 5)

University of Delaware CPEG 419 3

More Terminology

Data rate: rate in bps at which data is transmitted; for data rate of R, bit duration (time to emit 1 bit) is 1/R sec.

Modulation rate = baud rate (rate at which signal levels change).

Page 4: Data Encoding (Chap. 5)

University of Delaware CPEG 419 4

Approach 1: NRZ

Switch when a 1 occurs

But how do you know when to sample?Phase-locked-loop (PLL) – measures the difference when transitions occur on the wire and when they occur on a local adjustable oscillator, and then make adjustments accordingly.YOU MUST HAVE TRANSISTIONS TO LOCK ON TO.

Page 5: Data Encoding (Chap. 5)

University of Delaware CPEG 419 5

Multilevel Binary

Pros:No DC component.Can be used to force transitions (to help PLL).

Cons:We are using 3 levels and could send ?? bits instead of 1

opposite direction

Page 6: Data Encoding (Chap. 5)

University of Delaware CPEG 419 6

Scrambling – to help the PLL

If there are not enough transitions, the PLL may have problems.

So we force extra transitions when there are not enough.

Approach 1 – Use special coding so that long strings of zeros (or ones) don’t occur.

Page 7: Data Encoding (Chap. 5)

University of Delaware CPEG 419 7

Scrambling – to help the PLL Approach 2 – Use multilevel binary and set illegal

transitions to long strings of zeros. Here, if an octet of zeros occurs, send a special illegal

sequence. The receiver must be able to interpret this special

sequence.

used in long-distance transmission

Page 8: Data Encoding (Chap. 5)

University of Delaware CPEG 419 8

Biphase – Differential Manchester(Self-Clocking)

A transition always occurs in the middle of the period.A zero is represented by a transition occurring at the beginning of the period.A one is represented by no transition at the beginning of the period.

0 0 1 1

always a transition in the middle

Used in CD players and Ethernet

Page 9: Data Encoding (Chap. 5)

University of Delaware CPEG 419 9

Methods to Encode Digital Signals

NRZMultilevel binaryManchester

Issues: DC? Self Clocking? How big is the spectrum?

Page 10: Data Encoding (Chap. 5)

University of Delaware CPEG 419 10

Sending Digital Signals over Analog (e.g. Modem)

Amplitude shift keying (ASK) (Amplitude Modulation)

Frequency shift keying (FSK) (Frequency modulation)

Phase shift keying (PK) (Phase Modulation)

Modems use phase and amplitude.

Page 11: Data Encoding (Chap. 5)

University of Delaware CPEG 419 11

Modulation Techniques

ASK

FSK

PSK

0bit when 0

1bit when2cos tfAts c

0bit when 2cos

1bit when 2cos

1

1

tfA

tfAts

0bit hen w2cos

1bit when2cos

1tfA

tfAts c

Page 12: Data Encoding (Chap. 5)

University of Delaware CPEG 419 12

Fixed mistakes on last slide?

Page 13: Data Encoding (Chap. 5)

University of Delaware CPEG 419 13

Phase-shift Keying

Quadrature phase-shift keying (QPSK) - send 2 bits.

3 sending when4/72cos

2 sending when4/52cos

1 sending when4/32cos

0 sending when4/2cos

tfA

tfA

tfA

tfA

ts

c

c

c

c

0

90

180

270

Page 14: Data Encoding (Chap. 5)

University of Delaware CPEG 419 14

QAM - Quadrature Amplitude Modulation

0

90

180

270

QAM-16(16 levels, how many bits)

constellation diagrams

0

90

180

270QAM - 64

Page 15: Data Encoding (Chap. 5)

University of Delaware CPEG 419 15

V32

128 bits: 6 data and 1 parity (error correction)

Page 16: Data Encoding (Chap. 5)

University of Delaware CPEG 419 16

How fast is V32?The phone system transmits over the 300 to 3400 Hz band.

So what data rate can we use? How fast can we send symbols?

Use 2400 sample each way - duplex

Definition: a duplex connection means that we can send data in both directions at the same time.A simplex or half-duplex connection only sends data in one direction at a time.

So 2400 * 6 = 14400 bps

What is the baud rate?

V.34 2400 baud - with 12 data bits/symbolV.34 bis 2400 baud – with 14 data bits/symbolThat’s the fastest there is!

To get 56K you send at 4000 baud (if the phone system can handle it)

Page 17: Data Encoding (Chap. 5)

University of Delaware CPEG 419 17

Digital Subscriber Lines (DSL)

ADSL – A for asymmetric, faster down load speed than up.

The 56kbps or 33kbps modem speed is due to a filter installed at the end office.

If this filter is removed, then the full spectrum of the twisted pair is available (which is?)

But, if you are far from the office, then you can’t get a very high data rate because…?

The DSL standard goes up to 8 Mbps down and 1 Mbps up.

Page 18: Data Encoding (Chap. 5)

University of Delaware CPEG 419 18

DSL

VoicePOTS (stands for ?)(channel 0)

empty

A total of 256 4kHz channels

25kHz (channel 6)

Upstream

downstream

250 parallel channels: Each data channel uses QAM 16 (with 1 parity bit).

What is the maximum data rate?

The quality of each channel is monitored and adjusted. So channels may transmit at different speeds

channel 6+32

Page 19: Data Encoding (Chap. 5)

University of Delaware CPEG 419 19

ADSL configuration

ADSL Modem

voiceswitch

DSLAMdigital subscriber line access multiplexer

TO ISP

splittersplittertelephone line

Page 20: Data Encoding (Chap. 5)

University of Delaware CPEG 419 20

Cable - History

Starting in the late 1940s, mountain people put a big antenna on a hill top and ran a cable to them and their friends.

1970, 1000s of independent cable systems existed.

1974 Time Inc started HBO

Page 21: Data Encoding (Chap. 5)

University of Delaware CPEG 419 21

Early CableCommunity Antenna Television

Head end

Page 22: Data Encoding (Chap. 5)

University of Delaware CPEG 419 22

Internet over Cable

Headend

very high bandwidth

(fiber)

fiber

coaxial

A group of homes share the cable. (As oppose to DSL.) The number of homes per group is around 500-2000.

Page 23: Data Encoding (Chap. 5)

University of Delaware CPEG 419 23

Cable Spectrum

Upstream5 – 42 MHZ

TVFM

54 MHz88MHz

108MHz

TVHBOshoppingDownstream

data

550MHz 750MHz

Each TV channel gets its own frequency.This is called frequency multiplexing

Page 24: Data Encoding (Chap. 5)

University of Delaware CPEG 419 24

Multiplexing

One high bandwidth link is shared by many.But how?

It cost the same to install a high bandwidth connection as it does to install a low bandwidth one. So the approach is to install a few high bandwidth connections and make it seem like many low bandwidth connections.

Page 25: Data Encoding (Chap. 5)

University of Delaware CPEG 419 25

Frequency Division Multiplexing

FDMUseful bandwidth of medium exceeds

required bandwidth of channelEach signal is modulated to a different

carrier frequencyCarrier frequencies separated so signals do

not overlap (guard bands)e.g. broadcast radioChannel allocated even if no dataADSL uses FDM

Page 26: Data Encoding (Chap. 5)

University of Delaware CPEG 419 26

FDM

Channel 1 Channel 2 Channel n

Page 27: Data Encoding (Chap. 5)

University of Delaware CPEG 419 27

Analog Carrier SystemsAT&T (USA)Hierarchy of FDM schemesGroup

12 voice channels (4kHz each) = 48kHz Range 60kHz to 108kHz

Supergroup 60 channel FDM of 5 group signals on carriers between 420kHz

and 612 kHzMastergroup

10 supergroups

Page 28: Data Encoding (Chap. 5)

University of Delaware CPEG 419 28

Back to Cable

Why put downstream data at highend of spectrum? When they made the system they put in amplifiers that

could work at these high frequencies (why?) So the downstream was all set to go. But upstream

amplifiers had to be installed.

Downstream data also uses FDM: 6MHz or 8MHz channel width with QAM-64 (what is the data rate?)

But with overhead you only get 27Mbps. The upstream also uses FDM, but with QPSK (2 bits

per symbol).

Page 29: Data Encoding (Chap. 5)

University of Delaware CPEG 419 29

Cable modems

On modem boot-up, the headend tells the modem which channel to use for upstream and downstream transmission.

Many users may share the same channel.

To share the same channel, cable uses time division multiplexing (TDM).

Page 30: Data Encoding (Chap. 5)

University of Delaware CPEG 419 30

Time Division Multiplexing (TDM)

channel 1

channel 2 channel n

Page 31: Data Encoding (Chap. 5)

University of Delaware CPEG 419 31

TDM

Data rate of medium exceeds data rate of digital signal to be transmitted

Multiple digital signals interleaved in timeMay be at bit level of blocksTime slots preassigned to sources and fixedTime slots allocated even if no dataTime slots do not have to be evenly

distributed amongst sources

Page 32: Data Encoding (Chap. 5)

University of Delaware CPEG 419 32

TDM vs FDM

TDM FDM

Page 33: Data Encoding (Chap. 5)

University of Delaware CPEG 419 33

TDM

Must provide synchronizing mechanismAdded digit framing

One control bit added to each TDM frameLooks like another channel - “control channel”

Identifiable bit pattern used on control channel e.g. alternating 01010101…unlikely on a data

channel Can compare incoming bit patterns on each

channel with sync pattern

Page 34: Data Encoding (Chap. 5)

University of Delaware CPEG 419 34

Back to Cable

Downstream is easy. The headend just transmits packets as it wants. Each packet has a label, so the modem can detect that the packet belongs to it.

Upstream is hard. The upstream channel is shared. TDM is used, but still each TDM slot is shared

by many users. What happens if two users try to send

upstream data on the same channel?

Page 35: Data Encoding (Chap. 5)

University of Delaware CPEG 419 35

Cable: Upstream Media Access (link layer) Time is divided into minislot. It is possible to transmit 8 bytes in one

minislot. The modem asks the headend if it can transmit a packet. The headend responds with an acknowledgment and tells the modem

which minislots it can use. Problem: How can the modem sent the request without permission to use

minislots? Solution: on boot-up, the headend tells the modem which minislots it can

use for requesting minislots and the headend never allocates these minislots for upstream data.

Problem: These special control minislots are shared by many users (why?), so what happens if two users make a request at the same time?

Solution: If two users transmit at the same time, the signal cannot be understood by the headend and is ignored. Thus, no acknowledgement is made. The competing modems then wait a random amount of time and try again. It if fails again, then they wait a random amount of time again, but the maximum time they might wait is doubled.

Page 36: Data Encoding (Chap. 5)

University of Delaware CPEG 419 36

Cable MAC (media access control )modem headend

modem sends a request for upstream minislots

Headend gets request.Thinks about it.And sends acknowledgement with which minislots to use.

modem sends data

upstream request for bandwidth minislots

data does not overlap with request minislot

time

} minislot

Page 37: Data Encoding (Chap. 5)

University of Delaware CPEG 419 37

Cable MAC: ContentionTwo modems send request for bandwidth at the same time. The headend can figure out what

was transmitted and ignores itThe modems wait for the acknowledgement that will never arrive. The amount of time they wait is random.

This time the red modem gets through.

The blue modem tries again, but the green modem also sends a request.

Green gets throughNow the blue doubles the maximum random amount of time it waits before sending another request.

Page 38: Data Encoding (Chap. 5)

University of Delaware CPEG 419 38

Cable vs. DSL Cable could give higher bandwidth, but it might give

less. It depends on the number of users. If there are too many users in a group, the cable

operator has to put in a fiber and headend. That cost money, so they try not to do it.

DSL can promise 1Mbps down and 256kbps up, and you will likely get it.

Note that sharing bandwidth is much more efficient than assigning each user a fixed chunk.

The telephone system is very reliable. When was the last time you picked up the phone and there was no dial tone (major earthquake or huge storm). Cable will go down when the power goes out.

Page 39: Data Encoding (Chap. 5)

University of Delaware CPEG 419 39

Mobile Phone

FE

GA

D

CB

F

GE

FD

E

C

A