97593Encoding n Transmission

57
Encoding and Transmission of Data 1

description

Encoding and Transmission presentation

Transcript of 97593Encoding n Transmission

Page 1: 97593Encoding n Transmission

Encoding and Transmission of Data

1

Page 2: 97593Encoding n Transmission

Overview

• Analog and Digital Signals– Vocabulary– Analog Signals– Digital Signals

• Encoding and Modulation– Digital to Digital Conversion– Analog to Digital Conversion– Digital To Analog Conversion– Analog to Analog Conversion

2

Page 3: 97593Encoding n Transmission

Analog and Digital Signals

• Signal - an electromagnetic wave that transfers information

• Analog Signal - Continuous set of data– Real Numbers

• Digital Signals - Discrete set of data– Integer Numbers– Often binary (1 or 0 only)

CSIS 625 3

Analog Signal Digital Signal

Page 4: 97593Encoding n Transmission

Periodic vs. A periodic Signals

• Periodic Signal– A signal that completes a pattern in a measureable

time frame• Aperiodic Signal

– A signal that does not exhibit a pattern– All aperiodic signals can be shown to be a

combination of periodic signals

CSIS 625 4

Periodic Signal APeriodic Signal

Page 5: 97593Encoding n Transmission

Signal definitions

• Amplitude - The “height” of a signal. Measured in Volts, Amps, Watts, etc.

• Period - The amount of time to complete one cycle

• Frequency - The number of periods per second. Measured in Hertz (Hz)

CSIS 625 5

Amplitude

Period

Page 6: 97593Encoding n Transmission

Phase • The position of a sine wave relative to time

zero. Measured in degrees.

CSIS 625 6

0 Degrees 90 Degrees1/4 Cycle

180 Degrees1/2 Cycle

270 Degrees3/4 Cycle

Page 7: 97593Encoding n Transmission

Bandwidth

• Bandwidth - A range of frequencies• Analog - measured in Hz.

– Bandwidth = High-Freq – Low-Freq• Spectrum - synonym - used only in analog

measurements.• Bandwidth in digital realm - often used to

refer to bits-per-second

CSIS 625 7

Page 8: 97593Encoding n Transmission

Bit Rate

• Most digital signals are aperiodic• Period and frequency are not appropriate to

describe digital signals• Bit Interval - time to send one bit• Bit rate - number of bits send in a second.

Measured in bits per second• bps - Bits Per Second• Do NOT use Hz when you mean bps or vice-versa

CSIS 625 8

Page 9: 97593Encoding n Transmission

Decomposing a digital signal

• A digital signal can be decomposed into an infinite number of simple sine waves

• It is not practical or necessary to send all of these components

• Significant Bandwidth - Those frequencies necessary to recreate a digital bit pattern

• Significant Bandwidth is related to bit rate– Greater bit rate = Greater significant bandwidth

CSIS 625 9

Page 10: 97593Encoding n Transmission

Medium Bandwidth and Significant Bandwidth

• All transmission mediums have limited bandwidth

• The significant bandwidth of a digital bit rate must fit within the limited bandwidth of the medium that carries it.

CSIS 625 10

Page 11: 97593Encoding n Transmission

Encoding

• Information must often be encoded before being sent over a medium

• Four basic types of encoding– Digital to Digital– Analog to Digital– Digital to Analog– Analog to Analog

• Encoding schemes may be stacked– Voice to digital data to radio waves

CSIS 625 11

Page 12: 97593Encoding n Transmission

Digital to Digital Encoding

• Using a digital signal to represent digital data• Binary data is translated to different voltage,

current, or light pulses that can be transported over the medium.

• Types– Unipolar - uses 1 signal level– Polar - uses 2 signal levels– Bipolar - uses 2 signal levels and 0

CSIS 625 12

Page 13: 97593Encoding n Transmission

Digital signal encoding formats

CSIS 625 13

0 1 0 0 1 1 0 0 0 1

Unipolar

NRZL

NRZI

RZ

Manchester

Differential Manchester

Bipolar-AMI

Pseudoternary

Page 14: 97593Encoding n Transmission

Unipolar Encoding

• Simplest scheme• Uses two signal levels

– 1’s are encoded with signal present – 0’s are encoded by absence of a signal– (Sometimes inverse of the above)

• Long run of 0s or 1s can’t be handled by some mediums

CSIS 625 14

Page 15: 97593Encoding n Transmission

Unipolar encoding - synchronization

• When a signal isn’t varying, receiver can’t determine beginning and ending of each bit

• Solutions:– A separate line with a clock signal – Asynchronzous Serial lines wrap each byte with

start and stop bit– Scrambling of data to ensure enough transitions– Use of additional coding schemes like 8b10b

CSIS 625 15

Page 16: 97593Encoding n Transmission

Polar Encoding

• Uses a positive and a negative signal – but not a zero level

• Several types of Polar encoding– NRZ - Non-Return to Zero– RZ - Return to Zero– Biphase

CSIS 625 16

Page 17: 97593Encoding n Transmission

Non-Return to Zero - Level

• NRZL - Non-Return to Zero - Level • Simple - exactly like Polar, except

– 1’s are encoded with positive signal – 0’s are encoded with negative signal– (Sometimes inverse of the above)

• Same synchronization problems and solutions

CSIS 625 17

Page 18: 97593Encoding n Transmission

Non-Return to Zero - Invert on Ones

• NRZI - Non-Return to Zero - Invert on Ones• A change in voltage level indicates a 1• No change in voltage level indicates a 0• Synchronization less of a problem

– Every 1 bit causes a signal change– A string of 0’s still causes problems

• Same synchronization solutions

CSIS 625 18

Page 19: 97593Encoding n Transmission

Return to Zero

• RZ - Return to Zero• Not strictly polar - uses 0 in addition to positive and

negative • Works like NRZL, except it goes to zero between

each bit.• Transition to/from zero provides for synchronization• Because there are more transisitions (2 per bit time)

it has a higher significant bandwidth than NRZ

CSIS 625 19

Page 20: 97593Encoding n Transmission

Manchester Coding

• A biphase mechanism• Inversion of signal in middle of each bit

– low to high transition is 1– high to low transition is 0

• Mid-bit inversion provides for both data and synchronization information

• May have transition between bits so that right transition can be made in middle of a bit

CSIS 625 20

Page 21: 97593Encoding n Transmission

Differential Manchester

• A biphase mechanism• Always has a mid-bit inversion to provide

timing information• Inversion at beginning of bit time provides

data– Presence of inversion means 0– No inversion means 1

CSIS 625 21

Page 22: 97593Encoding n Transmission

Bipolar AMI

• Bipolar Alternate Mark Inversion• Mark comes from old telegraphy - means 1• Encoding

– 0 = lack of signal (0)– 1 = positive or negative values alternating for

successive ones

CSIS 625 22

Page 23: 97593Encoding n Transmission

Pseudo ternary

• Same as Bipolar AMI, but inverts 1s and 0s• Encoding

– 0 = positive or negative values alternating for successive zeros

– 1 = lack of signal (0)

CSIS 625 23

Page 24: 97593Encoding n Transmission

B8ZS

• Bipolar 8-Zero Substitution• A modification of Bipolar AMI to solve the

synchronization problem that occurs when a long string of 0s occurs

• Substitutes 8 consecutive 0s with fixed pattern that contains 2 AMI violations

CSIS 625 24

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

Binary-AMI

B8ZS

V = Bipolar AMI Violation

V V

Page 25: 97593Encoding n Transmission

HDB3

• High Density Bipolar - 3 Zeros• Similar to B8ZS• Substitutes 4 zeros with a pattern that

contains 1 AMI violation

CSIS 625 25

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

Binary-AMI

HDB3

V = Bipolar AMI Violation

V V V

Numberof Bipolar pulses (ones)Polarity of Since Last Substitution

Preceding Pulse Odd Even- 000- +00++ 000+ -00-

Page 26: 97593Encoding n Transmission

Analog to Digital Encoding

• Digitizing - analog to digital conversion• Approximate analog information with a digital

signal• Reduces infinite number of analog values to a

finite number of digital values.• Codec - Coder-Decoder

– Analog to digital converter

CSIS 625 26

Page 27: 97593Encoding n Transmission

Pulse Amplitude Modulation (PAM)

• First step to analog to digital encoding• Sample analog amplitude information at equal

intervals• PAM alone not useful as measurements are

still analog values

CSIS 625 27

Page 28: 97593Encoding n Transmission

Pulse Code Modulation (PCM)

• Modifies PAM output to create completely digital signal

• PCM quantizes Take the samples from PAM and assigns digital values to each measurement.

• Nyquist theorem - To ensure accurate reproduction of a signal, the sample rate must be twice the highest frequency of the original signal

CSIS 625 28

Page 29: 97593Encoding n Transmission

PCM & Telephony

• Telephony system uses 8 bits (256 levels) when quantizing

• A non-linear set of quantizing levels is used so that quiet sounds are accurately reproduced

• 300-3300Hz is voice range.• 8kHz sample rate is used to cover this range• 8kHz * 8 bits/sample = 64,000 bps

CSIS 625 29

Page 30: 97593Encoding n Transmission

DM - Delta Modulation

• Analog data is approximated using a staircase function that moves up or down by one level each sampling time.

• Digital data is a stream of 1s and 0s that specify the up and down steps.

• Can be implemented using simple components. • Not as good quality as PCM

– Quantizing noise when slope changes slowly– Slope overload noise when slope changes fast

CSIS 625 30

Page 31: 97593Encoding n Transmission

Digital to Analog Conversion

• ASK - Amplitude Shift Keying• FSK - Frequency Shift Keying• PSK - Phase Shift Keying

• QAM - Quadrature Amplitude Modulation– combination of ASK & PSK

CSIS 625 31

Page 32: 97593Encoding n Transmission

Bit rate vs. Baud Rate & Carrier Signal

• Bit rate is Bits per Second• Baud Rate is number of signal units per

second– Baud rate is less than or equal bit rate

• Don’t mix them up!• Carrier Signal

– high frequency signal that is modified to carry digital signal

CSIS 625 32

Page 33: 97593Encoding n Transmission

ASK - Amplitude Shift Keying

• Amplitude of signal varied for 1 or 0• Frequency and phase remain constant• Very susceptible to noise • On-Off-Keying - signal and no-signal• Example:

CSIS 625 33

1 BIT

01 BIT

11 BIT

01 BIT

1

Page 34: 97593Encoding n Transmission

FSK- Frequency Shift Keying

• Frequency of the carrier signal is varied to represent a 1or 0.

• Avoids many of the noise problems of Amplitude Shift keying

• Example:

CSIS 625 34

1 BIT

01 BIT

11 BIT

01 BIT

1

Page 35: 97593Encoding n Transmission

PSK - Phase Shift Keying

• The phase of the carrier signal is varied to represent a 1 or 0.

• Avoids noise problems of ASK • Uses less bandwidth than FSK• Example:

CSIS 625 35

1 BIT

01 BIT

11 BIT

01 BIT

1

Page 36: 97593Encoding n Transmission

QPSK - Quadrature PSK

• A type of PSK that uses 90° shifts instead of 180° shifts.

• Allows for 2 bits per baud to be encoded.

CSIS 625 36

Page 37: 97593Encoding n Transmission

DPSK - Differential PSK

• The bit pattern defines the phase change, instead of the current phase

• V.22bis standard at 1200 bps uses:– 00 90 Degree phase change– 01 0 Degree phase change– 10 180 Degree phase change– 11 270 Degree phase change

CSIS 625 37

Page 38: 97593Encoding n Transmission

Quadrature Amplitude Modulation

• The phase and amplitude of the carrier signal is varied to give several bits per baud

• Number of different phases is greater than number of amplitudes

• Example: 2 amplitudes & 4 phases

CSIS 625 38

3 BITS

0003 BITS

0103 BITS

0013 BITS

111

Page 39: 97593Encoding n Transmission

Trellis Coded Modulation

• Uses QAM, but includes extra data• Trellis coding is a specific type of convolutional

encoding • Viterbi Decoder - a specific algorithm for decoding

convolutionally encoded data.• Convolutional codes add redundancy to the data,

which makes it more resistant to noise.• Resistance to noise is more important as data rates

get higher.CSIS 625 39

Page 40: 97593Encoding n Transmission

Constellation diagrams

• Constellation diagram shows relationship between amplitude and phase of different signal levels

• polar diagram, – amplitude shown as distance from center– phase shown as degrees around circle

CSIS 625 40

ASK

10

PSK

10

8-QAM

001

16-QAM

000100101

011

010

110

111

Page 41: 97593Encoding n Transmission

Bandwidth required

• Amplitude Shift Keying– bandwidth = baud rate * (1 + noise factor)

• noise factor is 0 in ideal world

• Frequency Shift Keying– bandwidth = (fc1 - fc0) + baud rate

• Phase Shift Keying & QAM– bandwidth = baud rate * (1 + noise factor)– but bit rate is higher because more than one bit per

baud

CSIS 625 41

Page 42: 97593Encoding n Transmission

Analog to Analog Encoding

• AM - Amplitude Modulation– The amplitude of the carrier is modified– Bandwidth = 2x Bandwidth of modulating signal

• FM- Frequency Modulation– The frequency of the carrier is modified – Bandwidth = 10x Bandwidth of modulation signal

CSIS 625 42

Page 43: 97593Encoding n Transmission

Analog to Analog Encoding

• Phase Modulation– The phase of the carrier is modified

• Phase Modulation and FM are a special case of Angle modulation– Observing the signal, it is impossible to tell apart

FM and phase modulation

CSIS 625 43

Page 44: 97593Encoding n Transmission

Parallel/Serial Transmission of Data

• Transmission of Digital Data– Serial & Parallel transmission– Serial interfaces - DTE & DCE - Modems

CSIS 625 44

Page 45: 97593Encoding n Transmission

Parallel Transmission of Data

• Send several bits of data at the same time, each one over a separate media link.– Typically 8 bits of data sent over 8 wires– Examples: Printer cables, SCSI, PCI bus

• Allows faster transmission of data, but at the cost of multiple wires, multiple transmitters, and multiple receivers

• Must keep all bits in sync• Typically uses a separate clock line

CSIS 625 45

Page 46: 97593Encoding n Transmission

Serial Transmission of Data

• Sends all bits from node to node over a single media link.

• Bits are sent one after another - or “serially”• May or may not have additional media links

for clock, frame, or flow control.• Need some method of keeping track of when

a byte starts and ends.– Asynchronous or Synchronous

CSIS 625 46

Page 47: 97593Encoding n Transmission

Serial - Asynchronous transmission

• Bits are grouped together into characters• Start and stop bits frame the data bits

– A start bit is sent first – Followed by the data bits– Followed by a stop bit or bits

• Variable number of idle bits between characters

CSIS 625 47

Page 48: 97593Encoding n Transmission

Serial - Asynchronous transmission

• At best - 80% efficient – 8 data bits – 1 start bit – 1 stop bit

• Allows for about a lot of timing error• Example:

CSIS 625 48

Start Data Data Data Data Data Data Data Data Stop Start Data Data Data Data Data Data Data Data Stop

Page 49: 97593Encoding n Transmission

Serial - Synchronous transmission

• Each byte of data is sent with no extra gaps between bytes.

• Data is grouped into frames– Frame contains

• Between frames, special idle patterns used• Much less overhead that asynchronous• Can achieve faster bit rates than asynchronous • Requires synchronization method

CSIS 625 49

Page 50: 97593Encoding n Transmission

Data transparency on serial links

• Data transparency - the ability of a link to send any data pattern

• Bit stuffing - insertion of extra bits to change a flag pattern so that data transparency is achieved

• Byte stuffing - insertion of extra bytes to change a flag pattern so that data transparency is achieved

• Flag character - special bit pattern to show start or end of a frame

CSIS 625 50

Page 51: 97593Encoding n Transmission

Serial - Synchronous transmission

• Bit-oriented synchronous transmission– Uses a special bit pattern at the start and end of

the frame (flag character)– Data may be any number of bits– Uses bit stuffing to replace flag pattern in data– Bit stuffing is slightly more efficient than byte

stuffing– Easier to implement in hardware

CSIS 625 51

Page 52: 97593Encoding n Transmission

Serial - Synchronous transmission

• Character oriented synchronous transmission– Uses a special byte at the start and end of the

frame– Data must be an even number of 8-bit bytes– Uses byte stuffing to replace flag byte in data– Byte stuffing makes this slightly less efficient– Easier to implement in software

CSIS 625 52

Page 53: 97593Encoding n Transmission

DTE-DCE interface

• DTE - Data Terminal Equipment– A device that is a source or destination for binary

digital data• DCE - Data Circuit-terminating Equipment

– A device that interfaces between a DTE and a network

– Modem is classic DCE example • Lots of standards specify DTE to DCE interface• More standards for DCE to DCE interface

CSIS 625 53

Page 54: 97593Encoding n Transmission

RS-232 Interface

• Specifies the mechanical, electrical & functional characteristics of DTE-DCE interface

• EIA-232 is now the official name• Tailored to Computer to modem interface• Limited to about 20 Kbps• Mechanical

– less than 50 feet long cable– DB-25 connector original standard– DB-9 connector now standardized

CSIS 625 54

Page 55: 97593Encoding n Transmission

RS-232 Interface

• Electrical - Uses NRZL – 0 = +3 to +15 volts– 1 = -3 to -15 volts

• 3 pins are all that are necessary– Receive Data– Transmit Data– Ground

• Other pins are often ignored• Null modem - a device that flips receive and

transmit linesCSIS 625 55

Page 56: 97593Encoding n Transmission

Other serial interfaces

• RS-449 - uses 37 pin connector• RS-423 - uses 2-6 volt levels

– 40 feet - 100 Kbps– 4000 feet - 1 Kbps

• RS-422 - 2-6 Volt balanced transmission– 40 feet - 10 Mbps– 4000 feet - 1 Kbps

CSIS 625 56

Page 57: 97593Encoding n Transmission

Balanced transmission

• Uses two wires with a positive or negative voltage put on the line

• Compared to unbalanced which using two wires, one as ground and the other as signal.

• Better noise resistance than unbalanced

CSIS 625 57