data and computer communications chapter 5 – signal encoding techniques

54
Data and Computer Data and Computer Communications Communications Chapter 5 – Signal Encoding Chapter 5 – Signal Encoding Techniques Techniques

Upload: marissa-purvis

Post on 15-Dec-2015

282 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Data and Computer Data and Computer CommunicationsCommunications

Chapter 5 – Signal Encoding Chapter 5 – Signal Encoding TechniquesTechniques

Page 2: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Signal Encoding TechniquesSignal Encoding Techniques

Page 3: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Digital Data, Digital SignalDigital Data, Digital Signal

Digital signalDigital signal discrete, discontinuous discrete, discontinuous voltage pulsesvoltage pulses Each bit is a signal elementEach bit is a signal element binary data encoded into signal elementsbinary data encoded into signal elements

Page 4: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Some TermsSome Terms

Unipolar - signal elements have the Unipolar - signal elements have the samesame signsign

Polar - Polar - OneOne logic state represented by logic state represented by positive voltage, positive voltage, otherother by negative by negative

duration or length of a bitduration or length of a bit modulation rate in signal elements per modulation rate in signal elements per

secondsecond mark and spacemark and space

Page 5: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Interpreting Digital SignalsInterpreting Digital Signals

Receiver needs to knowReceiver needs to know timingtiming of bits - when they start and end of bits - when they start and end signal signal levelslevels

factors affecting signal interpretationfactors affecting signal interpretation signal to noise ratiosignal to noise ratio data ratedata rate bandwidthbandwidth encoding scheme – affects performanceencoding scheme – affects performance

Page 6: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Comparison of Encoding Comparison of Encoding SchemesSchemes

signal signal spectrumspectrum clockingclocking error error detectiondetection signal interference and noise immunitysignal interference and noise immunity cost and complexitycost and complexity

Page 7: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Encoding SchemesEncoding Schemes

Page 8: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Nonreturn to Zero-LevelNonreturn to Zero-Level(NRZ-L)(NRZ-L)

two different voltages for 0 and 1 bitstwo different voltages for 0 and 1 bits voltage voltage constantconstant during bit interval during bit interval

no transition i.e. no return to zero voltageno transition i.e. no return to zero voltage such as absence of voltage for zero, constant such as absence of voltage for zero, constant

positive voltage for onepositive voltage for one more often, negative voltage for one value more often, negative voltage for one value

and positive for the otherand positive for the other

Page 9: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Nonreturn to Zero InvertedNonreturn to Zero Inverted Non-return to zero, Non-return to zero, inverted on onesinverted on ones constant voltage pulse for duration of bitconstant voltage pulse for duration of bit data encoded as presence or absence of signal data encoded as presence or absence of signal

transition at beginning of bit timetransition at beginning of bit time transition (low to high or high to low) denotes binary 1transition (low to high or high to low) denotes binary 1 no transition denotes binary 0no transition denotes binary 0

example of differential encoding since example of differential encoding since data is represented by data is represented by changeschanges rather than levels rather than levels more reliable more reliable detection of transition rather than leveldetection of transition rather than level easy to easy to lose sense of polarity lose sense of polarity in twisted-pair line (for in twisted-pair line (for

NRZ-L)NRZ-L)

Page 10: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

NRZ Pros & ConsNRZ Pros & Cons

ProsPros easy to engineereasy to engineer make good use of bandwidthmake good use of bandwidth

ConsCons dc componentdc component lack of synchronization capabilitylack of synchronization capability

used for used for magneticmagnetic recording recording notnot often used often used for for signal signal transmissiontransmission

Page 11: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Multilevel BinaryMultilevel BinaryBipolar-AMIBipolar-AMI

Use Use more than two more than two levelslevels Bipolar-AMIBipolar-AMI

zerozero represented by represented by no line signalno line signal one represented by positive or negative pulseone represented by positive or negative pulse ‘‘One’ One’ pulses pulses alternatelyalternately in polarity in polarity no loss of sync no loss of sync if a long string of onesif a long string of ones long runs of zeros still a problemlong runs of zeros still a problem no net dc componentno net dc component lower bandwidthlower bandwidth easy easy error detectionerror detection

Page 12: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Multilevel BinaryMultilevel BinaryPseudoternaryPseudoternary

one one represented by represented by absenceabsence of line signal of line signal zero represented by alternating positive zero represented by alternating positive

and negativeand negative no advantage or disadvantage over no advantage or disadvantage over

bipolar-AMIbipolar-AMI each used in some applicationseach used in some applications

Page 13: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Multilevel Binary IssuesMultilevel Binary Issues

synchronization with synchronization with long runs long runs of 0’s or 1’sof 0’s or 1’s can insert additional bits, c.f. ISDNcan insert additional bits, c.f. ISDN scramblescramble data (discussed later) data (discussed later)

not as efficient as NRZnot as efficient as NRZ each signal element only represents one biteach signal element only represents one bit

• receiver distinguishes between three levels: +A, -A, 0receiver distinguishes between three levels: +A, -A, 0

a 3 level system could represent loga 3 level system could represent log223 = 1.58 bits3 = 1.58 bits requires approx. 3dB more signal power for same requires approx. 3dB more signal power for same

probability of bit errorprobability of bit error

Page 14: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Manchester EncodingManchester Encoding has has transition in the middle transition in the middle of each bit periodof each bit period transition serves as clock and datatransition serves as clock and data low to high represents onelow to high represents one high to low represents zerohigh to low represents zero used by IEEE 802.3 used by IEEE 802.3 (Ethernet LAN) (Ethernet LAN)

Page 15: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Differential Manchester Differential Manchester EncodingEncoding

Mid-bit transition is clocking onlyMid-bit transition is clocking only transition transition at start at start of bit period of bit period representing 0representing 0 no transition at start of bit period representing 1no transition at start of bit period representing 1

this is a differential encoding schemethis is a differential encoding scheme used by IEEE 802.5 used by IEEE 802.5 (Token Ring LAN)(Token Ring LAN)

Page 16: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Biphase Pros and ConsBiphase Pros and Cons

ConCon at least one transition per bit time and possibly twoat least one transition per bit time and possibly two maximum modulation rate is twice NRZmaximum modulation rate is twice NRZ requires requires more bandwidthmore bandwidth

ProsPros synchronization on mid bit transition (synchronization on mid bit transition (self clockingself clocking)) has no dc componenthas no dc component has error detectionhas error detection

Page 17: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Modulation RateModulation Rate

Page 18: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemsProblems Q1.Q1. Assume a stream of ten 1’s. Encode the Assume a stream of ten 1’s. Encode the

stream using the following schemes:stream using the following schemes:

NRZ-I, AMI, Manchester, Differential NRZ-I, AMI, Manchester, Differential Manchester.Manchester.

How many transitions (vertical lines) are there How many transitions (vertical lines) are there for each scheme.for each scheme.

Q2.Q2. For the Manchester encoded binary stream For the Manchester encoded binary stream of the following page, extract the clock of the following page, extract the clock information and the data sequence. information and the data sequence.

Page 19: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemsProblems

Page 20: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ScramblingScrambling use use scramblingscrambling to to replacereplace sequences that would sequences that would

produce constant voltageproduce constant voltage these filling sequences mustthese filling sequences must

produce enough transitions to syncproduce enough transitions to sync be recognized by receiver & replaced with original databe recognized by receiver & replaced with original data be same length as original, be same length as original, no rate penaltyno rate penalty

design goalsdesign goals have no dc componenthave no dc component have no long sequences of zero level line signalhave no long sequences of zero level line signal have no reduction in data ratehave no reduction in data rate give error detection capabilitygive error detection capability

Page 21: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

B8ZS and HDB3B8ZS and HDB3

Page 22: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

B8ZS Substitution Rules:

• If an octet of all zeros occurs and the last voltage pulse preceding this octet was positive, then the eight zeros of the octet are encoded as 000+–0–+.

• If an octet of all zeros occurs and the last voltage pulse preceding this octet was negative, then the eight zeros of the octet are encoded as 000–+0+–.

# If the AMI signal is inverted in the previous diagram,Draw the B8ZS and HDB3 signals.

Page 23: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

HDB3 Substitution Rules:

Number of Bipolar Pulses (ones) since Last Substitution

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

- the fourth zero is replaced with a code violation. - successive violations are of alternate polarity

Page 24: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemsProblems Q3.Q3. Consider a stream of binary data consisting of a Consider a stream of binary data consisting of a

long sequence of 1s, followed by a zero, followed by a long sequence of 1s, followed by a zero, followed by a long sequence of 1s. Preceding bit and level is long sequence of 1s. Preceding bit and level is indicated within parentheses. Draw the waveforms for indicated within parentheses. Draw the waveforms for NRZI (high), AMI (1 as negative voltage), and pseudo-NRZI (high), AMI (1 as negative voltage), and pseudo-ternary (0 as negative voltage).ternary (0 as negative voltage).

Q4.Q4. The AMI waveform representing a sequence The AMI waveform representing a sequence 0100101011 is transmitted over a noisy channel. The 0100101011 is transmitted over a noisy channel. The received waveform with a single error is shown in the received waveform with a single error is shown in the following page. Locate the error with justification.following page. Locate the error with justification.

Page 25: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemsProblems

Page 26: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemsProblems

Q5.Q5. For the received AMI bipolar sequence + - 0 For the received AMI bipolar sequence + - 0 + - 0 - + which has one violation, construct two + - 0 - + which has one violation, construct two possible transmitted pattern that might result in possible transmitted pattern that might result in the same received pattern.the same received pattern.

Page 27: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Analog Data, Analog SignalsAnalog Data, Analog Signals

modulate carrier frequency with analog datamodulate carrier frequency with analog data why why modulate analog signals?modulate analog signals?

higher frequency can give more efficient transmissionhigher frequency can give more efficient transmission permits frequency division multiplexing (chapter 8)permits frequency division multiplexing (chapter 8)

types of modulationtypes of modulation AmplitudeAmplitude FrequencyFrequency PhasePhase

Page 28: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Analog Analog ModulationModulationTechniquesTechniques

AmplitudeAmplitude Modulation Modulation FrequencyFrequency Modulation Modulation PhasePhase Modulation Modulation

Page 29: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Digital Data, Analog SignalDigital Data, Analog Signal

main use is main use is public telephone public telephone systemsystem has freq range of 300Hz to 3400Hzhas freq range of 300Hz to 3400Hz use modem (modulator-demodulator)use modem (modulator-demodulator)

encoding techniquesencoding techniques Amplitude shift keying (Amplitude shift keying (ASKASK)) Frequency shift keying (Frequency shift keying (FSKFSK)) Phase shift keying (Phase shift keying (PSKPSK))

Page 30: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Modulation TechniquesModulation Techniques

Page 31: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Amplitude Shift KeyingAmplitude Shift Keying encode 0/1 by different carrier amplitudesencode 0/1 by different carrier amplitudes

usually have one amplitude zerousually have one amplitude zero susceptiblesusceptible to sudden gain changes to sudden gain changes inefficientinefficient used forused for

up to 1200bps on voice grade linesup to 1200bps on voice grade lines very high speeds over optical fibervery high speeds over optical fiber

Page 32: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Binary Frequency Shift Binary Frequency Shift KeyingKeying

most common most common is binary FSK (BFSK)is binary FSK (BFSK) two binary values represented by two different two binary values represented by two different

frequencies (near carrier)frequencies (near carrier) less susceptible less susceptible to error than ASKto error than ASK used forused for

up to 1200bps on voice grade linesup to 1200bps on voice grade lines high frequency radiohigh frequency radio higher frequency on LANs using co-axhigher frequency on LANs using co-ax

Page 33: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Multiple FSKMultiple FSK

eacheach signalling signalling elementelement represents represents more more than than one bitone bit

moremore than two than two frequenciesfrequencies used used more bandwidth efficientmore bandwidth efficient more prone to errormore prone to error

Page 34: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

MFSKMFSK

Page 35: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Phase Shift KeyingPhase Shift Keying phase of carrier signal is shifted to phase of carrier signal is shifted to

represent datarepresent data binary PSKbinary PSK

two phases represent two binary digitstwo phases represent two binary digits differential PSKdifferential PSK

phase shifted relative to previous transmission phase shifted relative to previous transmission rather than some constant reference signalrather than some constant reference signal

Page 36: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

DPSKDPSK

Page 37: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Quadrature PSKQuadrature PSK

get more efficient use if get more efficient use if eacheach signal signal elementelement represents represents more than more than one bitone bit e.g. shifts of e.g. shifts of /2 or (90/2 or (90oo)) each element represents two bitseach element represents two bits split input data stream in two & modulate onto split input data stream in two & modulate onto

carrier & phase shifted carriercarrier & phase shifted carrier can use 8 phase angles & more than one can use 8 phase angles & more than one

amplitudeamplitude 9600bps modem uses 12 angles, four of 9600bps modem uses 12 angles, four of

which have two amplitudeswhich have two amplitudes

Page 38: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

QPSK and OQPSK QPSK and OQPSK ModulatorsModulators

Page 39: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

QPSKQPSK

Page 40: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Performance of Digital to Performance of Digital to Analog Modulation SchemesAnalog Modulation Schemes

bandwidthbandwidth ASK/PSK bandwidth ASK/PSK bandwidth directlydirectly relates to bit rate relates to bit rate multilevel PSK gives significant improvementsmultilevel PSK gives significant improvements

in presence of noise:in presence of noise: bit error rate of bit error rate of PSKPSK and QPSK are about 3dB and QPSK are about 3dB

superiorsuperior to ASK and FSK to ASK and FSK

Page 41: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Analog Data, Digital SignalAnalog Data, Digital Signal

digitizationdigitization is conversion of analog data is conversion of analog data into digital data which can then:into digital data which can then: be transmitted using NRZ-Lbe transmitted using NRZ-L be transmitted using code other than NRZ-Lbe transmitted using code other than NRZ-L be converted to analog signalbe converted to analog signal

analog to digital conversion done using a analog to digital conversion done using a codeccodec pulse code modulationpulse code modulation delta modulationdelta modulation

Page 42: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Digitizing Analog DataDigitizing Analog Data

Page 43: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Pulse Code Modulation (PCM)Pulse Code Modulation (PCM)

sampling theorem:sampling theorem: ““If a signal is sampled at regular intervals at a If a signal is sampled at regular intervals at a

rate higher than twice the highest signal rate higher than twice the highest signal frequency, the samples contain all information frequency, the samples contain all information in original signal”in original signal”

e.g. 4000Hz voice data, requires 8000 sample e.g. 4000Hz voice data, requires 8000 sample per secper sec

Strictly: these are analog samples Strictly: these are analog samples Pulse Amplitude Modulation (Pulse Amplitude Modulation (PAMPAM))

so assign each a digital valueso assign each a digital value

Page 44: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

PCM ExamplePCM Example

Page 45: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

PCM Block DiagramPCM Block Diagram

Page 46: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Non-Linear CodingNon-Linear Coding

Page 47: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

CompandingCompanding

Page 48: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Delta ModulationDelta Modulation

analog input is approximated by a analog input is approximated by a staircasestaircase function function can move up or down one level (can move up or down one level () at each ) at each

sample intervalsample interval has binary behaviorhas binary behavior

since function only moves up or down at each since function only moves up or down at each sample intervalsample interval

hence can encode each sample as single bithence can encode each sample as single bit 1 for up or 0 for down1 for up or 0 for down

Page 49: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Delta Modulation ExampleDelta Modulation Example

Page 50: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

Delta Modulation OperationDelta Modulation Operation

Page 51: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

PCM verses Delta ModulationPCM verses Delta Modulation DM has DM has simplicitysimplicity compared to PCM compared to PCM but has but has worse SNRworse SNR issue of bandwidth usedissue of bandwidth used

e.g. for good voice reproduction with PCMe.g. for good voice reproduction with PCM• want 128 levels (7 bit) & voice bandwidth 4khzwant 128 levels (7 bit) & voice bandwidth 4khz• need 8000 x 7 = 56kbpsneed 8000 x 7 = 56kbps

data compression data compression can improve on thiscan improve on this still growing demand for digital signalsstill growing demand for digital signals

use of repeaters, TDM, efficient switchinguse of repeaters, TDM, efficient switching PCM preferred to DM for analog signalsPCM preferred to DM for analog signals

Page 52: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemProblem

Q6.Q6. The analog waveform shown in the following The analog waveform shown in the following figure is to be delta modulated. The sampling figure is to be delta modulated. The sampling period and the step size are indicated by the period and the step size are indicated by the grid. The first DM output is also shown. Give the grid. The first DM output is also shown. Give the DM output for the complete signal.DM output for the complete signal.

Page 53: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

ProblemProblem

Page 54: Data and Computer Communications Chapter 5 – Signal Encoding Techniques

SummarySummary

looked at signal encoding techniqueslooked at signal encoding techniques analog data, analog signalanalog data, analog signal digital data, analog signaldigital data, analog signal analog data, digital signalanalog data, digital signal