1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

39
1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding

Transcript of 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

Page 1: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

1

CSCD 433Network ProgrammingFall 2012

Lecture 5Physical Layer Line Coding

Page 2: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

Topics

• Digital Transmission of Digital Data• Analog Transmission of Digital Data• Digital Transmission of Analog Data• Multiplexing

2

Page 3: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

Digital Transmission of Digital Data Computer data is 0's and 1's Represented as a digital signal Saw voltages as positive, 0, and negative Discussed last time line coding techniques

NRZ, RTZ, Manchester enCoding plus others Example: Ethernet uses Manchester coding

for early Ethernet Issues

Clocking at the receiver Can't tell where one digit ends and another

begins if long string of zeros

Page 4: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

4

Digital Transmission Signals

Page 5: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

5

Summary

Page 6: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

6

Analog Transmission of Digital Data Traditional analog transmission has

been the Telephone service POTS – Plain Old Telephone Service Have an existing system of wired

communication Sending digital data over the telephone

service – How do we do it? Use a modem !!! Modems use carrier waves to send

information

Page 7: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

7

Carrier WavesModems use carrier waves to send information

Each wave has three fundamental characteristics:

Amplitude, meaning height (intensity) of wave

Frequency, which is number of waves that pass in a single second and is measured in Hertz (cycles/second) (wavelength, the length of the wave from crest to crest, is related to frequency)

Phase is a third characteristic

Describes point in wave’s cycle at which a wave begins and is measured in degrees

Page 8: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

8

Figure 3-13 A Carrier Wave

Page 9: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

9

Modulation

Modulation is modification of a carrier wave’s fundamental characteristics in order to encode information

There are three basic ways to modulate a carrier wave:

Amplitude Modulation Frequency Modulation Phase Modulation

Page 10: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

10

Amplitude ModulationAmplitude Modulation (AM)

Amplitude Shift Keying (ASK), means changing height of wave to encode data

AM dial on radio uses amplitude modulation to encode analog information.•Shows a simple case of amplitude modulation in which one bit is encoded for each carrier wave change.

A high amplitude means a bit value of 1 Zero amplitude means a bit value of 0

Page 11: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

11

Amplitude Modulation

Page 12: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

12

Frequency ModulationFrequency Modulation (FM)Frequency Shift Keying (FSK), means changing frequency of carrier wave to encode dataFM dial on the radio uses frequency modulation to encode analog information.•Next slide simple case of frequency modulation in which one bit is encoded for each carrier wave change.

Changing the carrier wave to a higher

frequency encodes a bit value of 1 No change in the carrier wave

frequency means a bit value of 0

Page 13: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

13

Frequency Modulation

Page 14: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

14

Phase ModulationPhase refers to point in each wave cycle at which the wave begins

Phase Modulation (PM)Phase Shift Keying (PSK) means changing phase of the carrier wave to encode data•Next slide shows a simple case of phase modulation in which one bit is encoded for each carrier wave change

Changing the carrier wave’s phase by

180o corresponds to a bit value of 1 No change in the carrier wave’s phase

means a bit value of 0

Page 15: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

15

Phase Modulation

Page 16: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

16

Sending Multiple Bits Simultaneously

Each modification of the carrier wave to encode information is called a symbol.

By using a more complicated information coding system, it is possible to encode more than 1 bit/symbol

•Next slide gives an example of amplitude modulation using 4 amplitude levels, corresponding to 2 bits/symbol

Increasing possible number of symbols from 4 to 8 corresponds with encoding 3 bits/symbol, 16 levels to 4 bits, and so on Likewise, multiple bits per symbol might be encoded using phase modulation, say using phase shifts of 0o, 90o, 180o, and 270o.

Page 17: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

17

Two-bit Amplitude Modulation

Page 18: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

18

Quadrature Amplitude Modulation (QAM)

QAM is a family of encoding schemes that are widely used for encoding multiple bits per symbol that combine Amplitude and Phase Modulation

16QAM is a common form of that uses 8 different phase shifts and 2 different amplitude levelsSince there are 16 possible symbols, each symbol encodes 4 bits QAM and related techniques are commonly used for voice modems with a data rate of up to about 28 kilobits/second

Page 19: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

19

Bit Rate vs. Baud Rate (Symbol Rate)

Bit rate (or data rate) is the number of bits transmitted per secondBaud rate (same as symbol rate) refers to the number of symbols transmitted per secondSince multiple bits can be encoded per symbol, the two terms are not the sameGeneral formula:Data Rate (bits/second)=

Symbol Rate (symbols/sec.) x No. of bits/symbol

Page 20: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

20

Multiplexing

Page 21: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

21

MultiplexingMultiplexing

Combining several signals onto one line.

Demultiplexing

Taking a multiplexed signal and recovering its original components

Frequency division multiplexing (FDM): using different frequency ranges for different signals

Wave division multiplexing (WDM): same as FDM, but with optical signals.

Time division multiplexing (TDM): each signal is allocated to a periodic time slot CDM is a mathematical approach used in cell phone mechanisms

Page 22: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

22

Frequency Division Multiplexing (FDM)

FDM works by making a number of smaller channels from a larger frequency band

FDM is sometimes referred to as dividing the circuit “horizontally”

In order to prevent interference between channels, unused frequency bands called guardbands are used to separate the channels

Because of guardbands, there is some wasted capacity on an FDM circuit

Page 23: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

23

Frequency Division Multiplexing

Page 24: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

24

Frequency Division MultiplexingSuppose that we have three phone signals that we want to combine onto one line with higher bandwidth.

Allocate 4 KHz of bandwidth to each signal, which includes a “guard band” of unused frequency range to ensure signals don’t overlap.

Each signal originally uses the range 0.3 – 3.3 KHz.

Transform each signal to a different frequency range:

Signal 1: 20 – 24 KHz channel• Use 20.5 KHz to 23.5 KHz, with 0.5 KHz of guard

band on each end.

Signal 2: 24 – 28 KHz

Signal 3: 28 – 32 KHz

At receiver, filters are used to isolate each channel, and then the frequency is transformed back to its original range.

Page 25: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

25

FDM

Page 26: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

26

FDM applicationsHigh capacity phone lines

AM radio: 530 KHz to 1700 KHz, 10 KHz bandwidth per station

FM radio: 88 MHz to 108 MHz, 200 KHz bandwidth per station

TV broadcasts: 6 MHz bandwidth per TV channel

First generation cell phones: each user gets two 30 KHz channels (sending, receiving).

Page 27: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

27

Wave Division MultiplexingEssentially the same as FDM, except the signals are optical and prisms are used to combine/split signals instead of electrical components.

Used to combine signals of different frequencies (i.e. colours) onto one fibre-optic cable.

Page 28: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

28

Time Division Multiplexing (TDM)

TDM allows multiple channels to be used by allowing channels to send data by taking turnsTDM is sometimes referred to as dividing circuit “vertically” •Next slide shows an example of 4 terminals sharing a circuit, with each terminal sending one character at a timeWith TDM, time on circuit is shared equally with each channel getting a specified time slot, whether or not it has any data to sendTDM is more efficient than FDM, since TDM doesn’t use guardbands, so the entire capacity can be divided up between the data channels.

Page 29: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

29

Time Division Multiplexing (TDM) TDM is a digital method, as opposed to FDM which is analog

Signal is split into fixed-size units of time, and units from each signal are sent alternately.

If signal represents bits, use a fixed size block of bits as the unit.

Suppose that we have 3 signals to combine, and the time unit is 1 ms Cycle through the signals as follows:

• Send signal 1 for 1 ms.• Send signal 2 for 1 ms.• Send signal 3 for 1 ms.

Each signal has its own time slot; if it has nothing to send, the slot is left empty to preserve synchronization.

Page 30: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

30

Time Division Multiplexing

Page 31: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

31

TDM

Page 32: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

32

TDM applicationsDigital Service lines: DS-n

Implemented as telephone lines: T-n

Service Phone line Data rate # of voice channels

(DS-0) standard phone line

64 Kb/s 1

DS-1 T-1 1.544 Mb/s 24

DS-2 T-2 6.312 Mb/s 96

DS-3 T-3 44.736 Mb/s 672

DS-4 T-4 274.176 Mb/s 4032

Page 33: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

33

Code Division Multiplexing (CDM)

CDM used in parts of the cellular telephone system and for some satellite communication

CDM relies on an interesting mathematical ideavalues from orthogonal vector spaces can be combined and separated without interference

Each sender is assigned a unique binary code Ci

that is known as a chip sequencechip sequences are selected to be orthogonal vectors

• Means dot product of any two chip sequences is zero

Page 34: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

34

Code Division Multiplexing (CDM)

At any point in time, each sender has value to transmit, Vi

The senders each multiply Ci x Vi and transmit the results

The senders transmit at the same time and the values are added together

To extract value Vi, a receiver multiplies the sum by Ci

Exampleto keep the example easy to understand, use a chip sequence that is only two bits long and data values that are four bits longthink of the chip sequence as a vector

Next slide lists the values

Page 35: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

35

Code Division Multiplexing

Page 36: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

36

Code Division Multiplexing

The first step consists of converting the binary values into vectors that use -1 to represent 0:

If we think of the resulting values as a sequence of signal strengths to be transmitted at the same timethe resulting signal will be the sum of the two signals

Page 37: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

37

Code Division Multiplexing A receiver treats the sequence as a vectorcomputes product of vector and the chip sequencetreats result as a sequence, and converts the result to binary by interpreting positive values as binary 1 and negative values as 0Thus, receiver number 1 computes:

Interpreting the result as a sequence produces: (2 -2 2 -2)which becomes the binary value: (1 0 1 0)note that 1010 is the correct value of V1

receiver 2 will extract V2 from the same transmission

C1

Received data

Code division multiple access (CDMA) is a channel access method utilized by various radio communication technologies.

Page 38: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

Summary

• Many types of encoding for sending data • Multiplexing allows efficient use of shared

physical media

Page 39: 1 CSCD 433 Network Programming Fall 2012 Lecture 5 Physical Layer Line Coding.

39