Completing Lecture 3 and 4 Chapter 3 and

  • Slides: 57
Download presentation
Completing Lecture 3 and 4 Chapter 3 and 4 Handout #3 Dr. Clincy Professor

Completing Lecture 3 and 4 Chapter 3 and 4 Handout #3 Dr. Clincy Professor of CS Dr. Clincy Lecture Slide 1

DIGITAL-TO-DIGITAL CONVERSION Can represent digital data by using digital signals. The conversion involves three

DIGITAL-TO-DIGITAL CONVERSION Can represent digital data by using digital signals. The conversion involves three techniques: line coding – converting bit sequences to signals block coding – adding redundancy for error detection scrambling – deals with the long zero-level pulse issue Line coding is always needed; Block coding and scrambling may or may not be needed. Dr. Clincy Lecture 2

Line coding and decoding At Tx - Digital data represented as codes is converted

Line coding and decoding At Tx - Digital data represented as codes is converted to a digital signal via an encoder At Rx – Digital signal is converted back to digital codes via a decoder Dr. Clincy Lecture 3

Signal element versus data element Data element - smallest entity representing info Signal element

Signal element versus data element Data element - smallest entity representing info Signal element – shortest unit of a digital signal (carriers) r – is the ratio of # of data elements carried per signal element Example of adding extra signal elements for synchronization Example of increasing data rate Dr. Clincy Lecture 4

Data Rate Versus Signal Rate Data rate (or bit rate) - # of data

Data Rate Versus Signal Rate Data rate (or bit rate) - # of data elements (or bits) transmitted in 1 second – bitsper-second is the unit Signal rate (pulse rate or baud rate) - # of signal elements transmitted in 1 second – baud is the unit OBJECTIVE ALWAYS: increase data rate while decreasing signal rate – more “bang” for the “buck” Is it intuitive that if you had a data pattern of all 0 s or 1 s, it would effect the signal rate ? Therefore to relate data-rate with signal-rate, the pattern matters. Worst Case Scenario – we need the maximum signaling rate (alternating 1/0 s) Best Case Scenario – we need the minimum signaling rate (all 1/0 s) Focus on average case S = c x N x 1/r N – data rate (bps) c – case factor S - # of signal elements r – ratio of data to signal Dr. Clincy Lecture 5

Example A signal is carrying data in which one data element is encoded as

Example A signal is carrying data in which one data element is encoded as one signal element ( r = 1). If the bit rate is 100 kbps, what is the average value of the baud rate if c is between 0 and 1? Solution We assume that the average value of c is 1/2. The baud rate is then Dr. Clincy Lecture 6

Bandwidth Now we understand what baud rate is And we understand what bit rate

Bandwidth Now we understand what baud rate is And we understand what bit rate (or data rate) is Baud rate - # of carriers on the transport Data rate - # of passengers (or bits) in the carriers With this, we clearly see that baud rate effects bandwidth usage Signaling changes relate to frequency changes – therefore the bandwidth is proportionate with the baud rate: Bmin = c x N x 1/r or Nmax = 1/c x B x r minimum bandwidth N – data rate C – case factor r – data to signal ratio Dr. Clincy maximum data rate (given the bandwidth) This formula is consistent with Nyquist formula Lecture 7

Example The maximum data rate of a channel (see Chapter 3) is Nmax =

Example The maximum data rate of a channel (see Chapter 3) is Nmax = 2 × B × log 2 L (defined by the Nyquist formula). Does this agree with the previous formula for Nmax? Solution A signal with L levels actually can carry log 2 L bits per level. If each level corresponds to one signal element and we assume the average case (c = 1/2), then we have Dr. Clincy Lecture 8

Decoding Issue 1 Keep in mind the Rx decodes the digital signal – how

Decoding Issue 1 Keep in mind the Rx decodes the digital signal – how is it done ? • Rx determines a “moving average” of the signal’s power or voltage levels • This average is called the baseline • Then the Rx compares incoming signal power to this average (or baseline) • If higher than the baseline, could be a 1 • If lower than the baseline, could be a 0 • In using such a technique, is it intuitive that long runs of 0 s or 1 s could skew the average (baseline) ? ? – this is called baseline wandering (effects Rx’s ability to decode correctly) Dr. Clincy Lecture 9

Decoding Issue 2 Effect of lack of synchronization For the Rx, to correctly read

Decoding Issue 2 Effect of lack of synchronization For the Rx, to correctly read the signal, both the Tx and Rx “bit intervals” must be EXACT Example of Rx timing off – therefore decoding the wrong data from the signal To fix this, the Tx could insert timing info into the data that synchs the Rx to the start, middle and end of a pulse – these points could reset an out-of-synch Rx Dr. Clincy Lecture 10

Example In a digital transmission, the receiver clock is 0. 1 percent faster than

Example In a digital transmission, the receiver clock is 0. 1 percent faster than the sender clock. How many extra bits per second does the receiver receive if the data rate is 1 kbps? How many if the data rate is 1 Mbps? Solution At 1 kbps, the receiver receives 1001 bps instead of 1000 bps. At 1 Mbps, the receiver receives 1, 000 bps instead of 1, 000 bps. NOTE: Keep in mind that a FASTER clock means SHORTER intervals Dr. Clincy Lecture 11

Chapter 3 and 4 Handout #3 Dr. Clincy Professor of CS Dr. Clincy Lecture

Chapter 3 and 4 Handout #3 Dr. Clincy Professor of CS Dr. Clincy Lecture Slide 12

Line coding scheme categories Dr. Clincy Lecture 13

Line coding scheme categories Dr. Clincy Lecture 13

Unipolar NRZ scheme Data Signal Voltages on one side of the axis Positive voltage

Unipolar NRZ scheme Data Signal Voltages on one side of the axis Positive voltage signifies 1 Almost zero voltage signifies 0 Power needed to send 1 bit unit of resistance Dr. Clincy Lecture 14

Polar NRZ-L and NRZ-I schemes (non-return-to-zero) change no change Voltages on both sides of

Polar NRZ-L and NRZ-I schemes (non-return-to-zero) change no change Voltages on both sides of the axis NRZ-L (level) version – voltage level determines the bit value NRZ-I (invert) version – voltage change or no-change determines the bit value (no change = 0, change = 1) Dr. Clincy Lecture 15

Polar RZ scheme Uses 3 values: positive, negative and zero Signal changes Not between

Polar RZ scheme Uses 3 values: positive, negative and zero Signal changes Not between bits BUT during the bit H-to-L in middle for 1 L-to-H in middle for 0 Positioning occurs at the beginning of the period Dr. Clincy Lecture 16

Polar biphase: Manchester and Differential Manchester Schemes Manchester: H-to-L=0, L-to-H=1 Differential Manchester: H-to-L or

Polar biphase: Manchester and Differential Manchester Schemes Manchester: H-to-L=0, L-to-H=1 Differential Manchester: H-to-L or L-to-H at begin=0, No change at begin=1 Dr. Clincy Lecture 17

Bipolar schemes: AMI and pseudoternary Bipolar encoding uses 3 voltage levels: positive, negative and

Bipolar schemes: AMI and pseudoternary Bipolar encoding uses 3 voltage levels: positive, negative and zero. One data element is at ZERO, while the others alternates between negative and positive Alternate Mark Inversion (AMI) scheme – neutral zero voltage is 0 and alternating positive and negative voltage represents 1 Pseudoternary scheme – vice versa from the AMI scheme Dr. Clincy Lecture 18

Multilevel Schemes These schemes attempt to increase the number of bits per baud Given

Multilevel Schemes These schemes attempt to increase the number of bits per baud Given m data elements, could produce 2 m data patterns Given L levels, could produce Ln combinations of signal patterns (where n is the length of the signal patterns) If 2 m = Ln, each data pattern is encoded into one signal pattern (1 -to-1) If 2 m < Ln, data patterns use a subset of signal patterns – could use the extra signal patterns for fixing baseline wandering and error detection Classify these codes as m. Bn. L where: m – length of the binary pattern B – means Binary data n – length of the signal pattern Dr. Clincy Lecture L - # signaling levels (letters in place of L: B=2, T=3 and Q=4) 19

Multilevel: 2 B 1 Q scheme 2 B 1 Q Data patterns of size

Multilevel: 2 B 1 Q scheme 2 B 1 Q Data patterns of size 2 bits Encodes 2 -bit patterns in one signal element If previous level was positive and the next level becomes +3, represents 01 4 levels of signals If previous level was positive and the next level becomes -3, represents 11 Dr. Clincy Lecture 20

Multilevel: 8 B 6 T scheme Data patterns of size 8 bits Encodes 8

Multilevel: 8 B 6 T scheme Data patterns of size 8 bits Encodes 8 -bit patterns in six signal elements Using 3 levels of signal Dr. Clincy Lecture 21

Multilevel: 4 D-PAM 5 scheme 4 -dimensional five-level pulse amplitude modulation scheme Instead of

Multilevel: 4 D-PAM 5 scheme 4 -dimensional five-level pulse amplitude modulation scheme Instead of transmitting in serial form – parts of the code are in sent in parallel over 4 wires (versus 1 wire) In this particular case, it would take ¼ less time to transmit Dr. Clincy Lecture 22

Multitransition: MLT-3 scheme Multi-line transmission, three-level scheme Uses three levels and three transition rules

Multitransition: MLT-3 scheme Multi-line transmission, three-level scheme Uses three levels and three transition rules to jump between levels: - if the next bit is 0, there is no transition - if the next bit is 1 and the current level is not 0, the next level is 0 - if the next bit is 1 and the current level is 0, the next level is the opposite of the last nonzero level Dr. Clincy Lecture 23

Block coding concept Block coding provides redundancy for synchronization and error detection Block coding

Block coding concept Block coding provides redundancy for synchronization and error detection Block coding changes a block of m bits into a block of n bits (where n>m) Block coding is also called m. B/n. B encoding Dr. Clincy Lecture 24

Using block coding 4 B/5 B with NRZ-I line coding scheme Fixes that PROBLEM

Using block coding 4 B/5 B with NRZ-I line coding scheme Fixes that PROBLEM of long stream of 0 s Use 4 B/5 B to change the long stream of 0 s prior to using NRZ-I For example, for 4 B/5 B encoding, 4 -bit groups or replaced with 5 -bit groups and those 5 -bit groups are re-combined – NOTE: the 5 -bit code could be completely different from the original 4 -bit code Dr. Clincy Lecture 25

4 B/5 B mapping codes Because the 5 -bit code has 25 = 32

4 B/5 B mapping codes Because the 5 -bit code has 25 = 32 codes, the extra codes can be used for control sequences and error detection For example, for 4 B/5 B encoding, 4 -bit groups or replaced with 5 -bit groups and those 5 -bit groups are re-combined – NOTE: the 5 -bit code could be completely different from the original 4 -bit code Dr. Clincy Lecture 26

8 B/10 B block encoding Eight binary, ten binary encoding scheme 8 -bit codes

8 B/10 B block encoding Eight binary, ten binary encoding scheme 8 -bit codes replaced with 10 -bit codes If there are more consecutive 0 s over 1 s (or vice versa), controller detects and complements either the 0 s or 1 s – uses 768 redundant bit groups for this Provide greater error detection 5 most significant bits are fed to 5 B/6 B encoder 3 least significant bits are fed to 3 B/4 B encoder Dr. Clincy Lecture Done to simplify mapping table 27

Scrambling The biphase encoding schemes are suited for longdistance communication due to bandwidth requirement.

Scrambling The biphase encoding schemes are suited for longdistance communication due to bandwidth requirement. However, bipolar AMI encoding is good because of the narrow bandwidth requirement – however, long streams of 0 s could throw off the synchronization In dealing with synchronization issue, we could substitute long zero-level pulses with a combination of other levels to provide synchronization This is called scrambling Dr. Clincy Lecture 28

AMI used with scrambling Unlike block coding, scrambling is done at the SAME time

AMI used with scrambling Unlike block coding, scrambling is done at the SAME time encoding is done System inserts the require pulses based on “scrambling rules” Two techniques: (1) bipolar with 8 -zero substitution (B 8 ZS), (2) highdensity bipolar 3 -zero (HDB 3) Dr. Clincy Lecture 29

Two cases of B 8 ZS scrambling technique Takes 8 consecutive zeros and replace

Two cases of B 8 ZS scrambling technique Takes 8 consecutive zeros and replace with 000 VB where V denotes violation (a non-zero voltage not in accordance with the AMI rule) and B denotes bipolar (a non-zero voltage in accordance with AMI rule) Recall the Bipolar AMI scheme on page 110 [Alternate Mark Inversion (AMI) scheme – neutral zero voltage is 0 and alternating positive and negative voltage represents 1] Dr. Clincy Lecture 30

Different situations in HDB 3 scrambling technique For HDB 3, 4 consecutive zeros are

Different situations in HDB 3 scrambling technique For HDB 3, 4 consecutive zeros are replaced with 000 V or B 00 V With the two choices, an even number of non-zero pulses can be maintained Because # of non-zero pulses here is even, used B 00 V. Now we have only 1 non-zero pulse (odd), so use 000 V Since there are no non-zero pulses after the 2 nd substitution, the 3 rd substitution is B 00 V because this is an even case Dr. Clincy Rule 1: if the # of non-zero pulses is odd after the last substitution, use pattern 000 V – which will make the total number even Rule 2: if the # of non-zero pulses is even after the last substitution, use pattern B 00 V – which will make the total number even Lecture 31

Chapter 5 Handout #4 Dr. Clincy Professor of CS Dr. Clincy Lecture Slide 32

Chapter 5 Handout #4 Dr. Clincy Professor of CS Dr. Clincy Lecture Slide 32

Digital-to-analog conversion Based on the digital data, the Modulator changes characteristics of the “controllable”

Digital-to-analog conversion Based on the digital data, the Modulator changes characteristics of the “controllable” analog signal (bandpass analog signal) on the transmitter side to represent the digital data Demodulator interprets the analog signal in re-creating the digital data on the receiver side Terminology: “modulating digital data into an analog signal” The analog signal we can control ? Sine Wave, Carrier Signal, Periodic Signal Dr. Clincy Lecture 33

Types of digital-to-analog conversion Change amplitude to represent a bit Change frequency to represent

Types of digital-to-analog conversion Change amplitude to represent a bit Change frequency to represent a bit Change phase to represent a bit Combination of changing both amplitude and phase to represent a set of bits Dr. Clincy Lecture 34

Recall • For digital transmission, bit rate (data rate) and signal rate (baud rate)

Recall • For digital transmission, bit rate (data rate) and signal rate (baud rate) relationship was » S = N x 1/r where r = # of data elements per signal element and N is the data rate in bps (and S is the signaling or baud rate) • For analog, r = log 2 L where L is the type of signal (versus level) Dr. Clincy Lecture 35

Example An analog signal carries 4 bits per signal element. If 1000 signal elements

Example An analog signal carries 4 bits per signal element. If 1000 signal elements are sent per second, find the bit rate. Solution In this case, r = 4, S = 1000, and N is unknown. We can find the value of N from Dr. Clincy Lecture 36

Example An analog signal has a bit rate of 8000 bps and a baud

Example An analog signal has a bit rate of 8000 bps and a baud rate of 1000 baud. How many data elements are carried by each signal element? How many signal elements do we need? Solution In this example, S = 1000, N = 8000, and r and L are unknown. We find first the value of r and then the value of L. Dr. Clincy Lecture 37

Binary amplitude shift keying changing the original amplitude Explain this not changing the original

Binary amplitude shift keying changing the original amplitude Explain this not changing the original amplitude B = (1 + d) x S Dr. Clincy Bandwidth (B) is proportional to the signal rate (S) and depending on the modulation and filtering process, the required bandwidth can range between S to 2 S (where middle bandwidth is fc). The value of d relates to the modulation and filtering process Lecture 38

Example We have an available bandwidth of 100 k. Hz which spans from 200

Example We have an available bandwidth of 100 k. Hz which spans from 200 to 300 k. Hz. What are the carrier frequency and the bit rate if we modulated our data by using ASK with d = 1? Solution The middle of the bandwidth is located at 250 k. Hz. This means that our carrier frequency can be at fc = 250 k. Hz. We can use the formula for bandwidth to find the bit rate (with d = 1 and r = 1). Dr. Clincy S = N * 1/r Lecture 39

Binary frequency shift keying changing the original frequency Explain this Dr. Clincy not changing

Binary frequency shift keying changing the original frequency Explain this Dr. Clincy not changing the original frequency Lecture Use two different carrier frequencies, f 1 and f 2, for 0 and 1 40

Example We have an available bandwidth of 100 k. Hz which spans from 200

Example We have an available bandwidth of 100 k. Hz which spans from 200 to 300 k. Hz. What should be the carrier frequency and the bit rate if we modulated our data by using FSK with d = 1? The difference (delta) between the two frequencies Solution The midpoint of the band is at 250 k. Hz. We choose 2Δf to be 50 k. Hz; this means Dr. Clincy Lecture 41

Binary phase shift keying changing the original phase Explain this Dr. Clincy not changing

Binary phase shift keying changing the original phase Explain this Dr. Clincy not changing the original phase Lecture 42

QPSK and its implementation QPSK – Quadrature Phase Shift Keying Use 2 bits in

QPSK and its implementation QPSK – Quadrature Phase Shift Keying Use 2 bits in each signal element – decreases baud rate and bandwidth Uses 4 possible phases (versus 2) 2 composite signals are created Because the 2 signals are using the same bandwidth – each signal has ½ bandwidth Dr. Clincy Lecture 43

Example Find the bandwidth for a signal transmitting at 12 Mbps for QPSK. The

Example Find the bandwidth for a signal transmitting at 12 Mbps for QPSK. The value of d = 0. Solution For QPSK, 2 bits is carried by one signal element. This means that r = 2. So the signal rate (baud rate) is S = N × (1/r) = 6 Mbaud. With a value of d = 0, we have B = S = 6 MHz. B = (1 + d) x S Dr. Clincy Lecture 44

Concept of a constellation diagram the amplitude of the 2 nd carrier Helps define

Concept of a constellation diagram the amplitude of the 2 nd carrier Helps define the amplitude and phase of a signal element Peak Amplitude Phase Only use 1 carrier and phase is static and 2 amplitude levels Dr. Clincy This is the amplitude given using one carrier Only use 1 carrier and 1 amplitude and 2 phases (0 o and 180 o) Lecture Uses 2 carriers and 1 amplitude and 4 phases (45 o, 135 o, -45 o, -135 o) 45

Constellation diagrams for some QAMs QAM – Quadrature Amplitude Modulation For QPSK, we only

Constellation diagrams for some QAMs QAM – Quadrature Amplitude Modulation For QPSK, we only changed the phase For QAM, we change both the phase and amplitude Has a 0 amplitude and a positive amplitude (with 2 carriers) Dr. Clincy Has a negative amplitude and a positive amplitude (with 2 carriers) Lecture Has 2 positive amplitudes (with 2 carriers) Has 4 negative levels and 4 positive levels (with 2 carriers) 46

ANALOG TO ANALOG Analog-to-analog conversion is the representation of analog information by an analog

ANALOG TO ANALOG Analog-to-analog conversion is the representation of analog information by an analog signal. One may ask why we need to modulate an analog signal; it is already analog. Modulation is needed if the medium is bandpass in nature or if only a bandpass channel is available to us. Bandpass – signal being shifted to a particular range Lowpass – signal that IS NOT shifted to a particular range Dr. Clincy Lecture 47

Types of analog-to-analog modulation Dr. Clincy Lecture 48

Types of analog-to-analog modulation Dr. Clincy Lecture 48

Amplitude modulation Vary the amplitude of the carrier signal to mimic the changing voltage

Amplitude modulation Vary the amplitude of the carrier signal to mimic the changing voltage levels (amplitude) of the modulating signal result The total bandwidth required for AM can be determined from the bandwidth of the audio signal: BAM = 2 B. Dr. Clincy Lecture 49

Frequency modulation Vary the frequency of the carrier signal to mimic the changes in

Frequency modulation Vary the frequency of the carrier signal to mimic the changes in voltage level (amplitude) of the modulating signal result The total bandwidth required for FM can be determined from the bandwidth of the audio signal: BFM = 2(1 + β)B. Dr. Clincy Lecture Would be given 50

Phase modulation Vary the phase of the carrier signal to mimic the changes in

Phase modulation Vary the phase of the carrier signal to mimic the changes in voltage level (amplitude) of the modulating signal This illustrates the signal starting at different phases The total bandwidth required for PM can be determined from the bandwidth and maximum amplitude of the modulating signal: BPM = 2(1 + β)B. Dr. Clincy Lecture 51

TRANSMISSION MODES The transmission of binary data across a link can be accomplished in

TRANSMISSION MODES The transmission of binary data across a link can be accomplished in either parallel or serial mode. In parallel mode, multiple bits are sent with each clock tick. In serial mode, 1 bit is sent with each clock tick. While there is only one way to send parallel data, there are three subclasses of serial transmission: asynchronous, and isochronous. Dr. Clincy Lecture 52

Parallel transmission Dr. Clincy Lecture 53

Parallel transmission Dr. Clincy Lecture 53

Serial transmission Dr. Clincy Lecture 54

Serial transmission Dr. Clincy Lecture 54

Asynchronous transmission In asynchronous transmission, we send 1 start bit (0) at the beginning

Asynchronous transmission In asynchronous transmission, we send 1 start bit (0) at the beginning and 1 or more stop bits (1 s) at the end of each byte. There may be a gap between each byte. Asynchronous here means “asynchronous at the byte level, ” but the bits are still synchronized; their durations are the same. Dr. Clincy Lecture 55

Synchronous transmission In synchronous transmission, we send bits one after another without start or

Synchronous transmission In synchronous transmission, we send bits one after another without start or stop bits or gaps. It is the responsibility of the receiver to group the bits. Dr. Clincy Lecture 56

Isochronous Transmission • For realtime audio and video, uneven delays between frames is not

Isochronous Transmission • For realtime audio and video, uneven delays between frames is not acceptable – so synchronous transmission doesn’t work well • The entire stream of bits must be synchronized – this is isochronous transmission • Isochronous transmission guarantees data at a fixed rate Dr. Clincy Lecture 57