4.1 Chapter 4 Digital Transmission Copyright © The McGraw-Hill Companies, Inc. Permission required...

Post on 18-Jan-2018

216 views 0 download

description

4.3 Figure 4.1 Line coding and decoding

transcript

4.1

Chapter 4Digital Transmission

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

4.2

4-1 DIGITAL-TO-DIGITAL CONVERSION4-1 DIGITAL-TO-DIGITAL CONVERSION

In this section, we see how we can represent digital In this section, we see how we can represent digital data by using digital signals. The conversion involves data by using digital signals. The conversion involves three techniques: three techniques: line codingline coding, , block codingblock coding, and , and scramblingscrambling. Line coding is always needed; block . Line coding is always needed; block coding and scrambling may or may not be needed.coding and scrambling may or may not be needed.

Line CodingLine Coding SchemesBlock CodingScrambling

Topics discussed in this section:Topics discussed in this section:

4.3

Figure 4.1 Line coding and decoding

Some Important Concepts Before going into the details of “encoding” schemes

we need to understand some important concepts related to digital signals. These concepts are:

Data Element Signal Element Date Rate Signal Rate Effective Bandwidth Baseline Wandring DC Component Self Synchronization Built-in error detection Immunity to noise and interference complexity

4.4

Data Element Vs Signal Element A data element is the smallest entity

that can represent a piece of information: this is the bit.

A signal element is the shortest unit ( timewise) of a digital signal.

A data element is being carried; signal elements are the carriers.

4.5

Ratio (r ) We define a ratio ‘r’ which is the

number of data elements carried by each signal element.

R= (no. of data elements)/ (no. of signal element)

4.6

4.7

Figure 4.2 Signal element versus data element

Data Rate Vs. Signal Rate The data rate defines the no. of data

elements(bits) sent in 1 sec. the unit is bps.

Data rate is also called as bit rate.

The signal rate is the no. of signal elements sent in 1 sec. the unit is baud.

The signal rate is also called as pulse rate, modulation rate or baud rate.

4.8

Goal in data Communication One goal in data communication is to

increase data rate and decrease signal rate.

Increasing data rate increases the speed of transmission.

Decreasing the signal rate decreases the bandwidth requirement.

Example: Carrying more people in fewer vehicles to

prevent traffic jams.

4.9

4.10

Although the actual bandwidth of a digital signal is infinite, the effective

bandwidth is finite.

Note

Baseline Wandering In decoding a digital signal, the receiver

calculates a running average of the received signal power. This average is called the baseline.

The incoming signal power is evaluated against this baseline to determine the value of the data element.

A long string of 0s and 1s can cause a drift in the baseline and make it difficult for the receiver to decode correctly.

This is called baseline wandering. A good line coding scheme needs to prevent

baseline wandering.

4.11

DC Component When the voltage level in a digital

signal is constant for a while, the spectrum creates very low frequencies.

These frequencies around zero are called DC (direct current) components.

DC components creates problems for the system that cannot pass low frequencies or a system that uses electrical coupling (via a transformer).

4.12

DC Component (2) Example:

A telephone line cannot pass frequencies below 200Hz.

A long distance link may use one or more transformers to isolate different parts of the line electrically.

For the above systems we need an encoding scheme with no DC component.

4.13

Self-synchronization To correctly interpret the signals

received from the sender, the receiver’s bit intervals must correspond exactly to the sender’s bit intervals.

If the receiver’s clock is slow or faster, the bit intervals are not matched and the receiver might misinterpret the signals.

In the following figure: the sender sends 10110001, while receiver receives 110111000011.

4.14

4.15

Figure 4.3 Effect of lack of synchronization

Self synchronization (2) A self synchronizing digital signal

includes timing information in the data being transmitted.

This can be achieved if there are transitions in the signal that alert the receiver to the beginning , middle, or end of the pulse.

If the receiver’s clock is out of synchronization, these points can reset the clock.

4.16

Built-in error detection

Some encoding schemes have built in error detection mechanism.

4.17

Immunity to noise and interference Another desirable code

characteristics is a code that is immune to noise and other interferences.

Some encoding schemes that we will discuss have this capability.

4.18

Complexity A Complex encoding scheme is more

costly to implement than a single one.

For example a scheme that uses four signal levels is more difficult to interpret than one that uses two levels.

4.19

4.20

Figure 4.4 Line coding schemes

Unipolar Scheme

In a unipolar scheme, all the signal levels are on one side of the time axis, either above or below.

4.21

Polar Scheme:

In a polar scheme, the voltages are on the both sides of the time axis.

Example: The voltage level for 0 can be positive

and the voltage level for 1 can be negative.

4.22

Bipolar Scheme:

In bipolar encoding, we use three levels: Positive, negative and zero.

The voltage level for one element is at zero, while the voltage level for the other data element alternates between positive and negative.

4.23

NRZ (unipolar) Positive voltage defines bit 1 and the zero voltage

level defines bit 0. It is called NRZ because the signal does not

return to zero at the middle of the bit. Compared with its polar counterpart, this scheme

is very costly.Drawback: The normalized power(power needed to send one

bit per unit line resistance) of uni-polar NRZ is double that for polar NRZ. For this reason this scheme is not normally used in data communication today.

4.24

4.25

Figure 4.5 Unipolar NRZ scheme

Polar (NRZ) There are two versions of Polar NRZ:

NRZ-L (NRZ level) NRZ-I (NRZ Invert)

In NRZ-L the level of the voltage determines the value of the bit

In NRZ-I the change(transition) or lack of change determines the value of the bit. If there is no change the bit is zero. If there is change the bit is one.

4.26

4.27

Figure 4.6 Polar NRZ-L and NRZ-I schemes

4.28

In NRZ-L the level of the voltage determines the value of the bit.

In NRZ-I the inversion or the lack of inversion

determines the value of the bit.

Note

Drawbacks: Baseline wandering is more observed in

NRZ-L than NRZ-I. Baseline wandering occurs in NRZ-I in

case of long string of 0s. Synchronization problem is more

observed in NRZ-L than NRZ-I. Synchronization occurs in NRZ-I in case

of long string of 0s. Direct Current component also occurs in

both NRZ-L NRZ-I.4.29

Drawbacks(2): Another problem with NRZ-L is that of

sudden change of polarity in the system.

This usually occurs in twisted pair cable.

Due to change of polarity all 0s are interpreted as 1 and all 1s interpreted as 0s.

NRZ-I do not have this problem.4.30

RZ (Return to Zero) The main problem with NRZ encoding

occurs when the sender and receiver clocks are not synchronized.

The receiver does not know when one bit has ended and the next bit is started.

The solution is provided by RZ scheme. RZ uses three voltage levels i.e. Positive,

negative and Zero. In RZ the change or transition occurs

during the bit.

4.31

RZ In RZ, signal goes to zero in the

middle of each bit. It remains there until the beginning of the next bit.

In RZ the problem of DC Component is resolved.

4.32

4.33

Figure 4.7 Polar RZ scheme

Drawbacks: The main disadvantage of RZ is that it require

two transitions to encode a single bit which increases the bandwidth requirement of the signal.

The problem due to sudden change of polarity is still there.

One problem is of complexity, as there are three voltage levels

Due to above disadvantages this scheme is not used today. It is replaced by better performing Manchester and differential Manchester (discussed later).

4.34

Manchester Encoding The idea of RZ and NRZ-L are

combined into Manchester scheme. In this scheme the duration of one bit

is divided into two halves. The voltage level remains at one

level in the first half and turns to another level in the second half.

The transition in the middle of the bit provides synchronization.

4.35

4.36

Figure 4.8 Polar biphase: Manchester and differential Manchester schemes

Differential Manchester This scheme combines the idea of RZ

and NRZ-I. There is always a transition at the

middle of the bit but the bit values are determined at the beginning of the bit.

If the next bit is zero there is a transition. If the next bit is one there is no transition.

4.37

Advantages: Manchester encoding overcomes the

drawbacks of NRZ-L and differential Manchester overcomes the drawbacks of NRZ-I.

There is no baseline wandering. There is no DC Component as each

bit has a positive and negative voltage contribution.

4.38

Disadvantage: The only drawback is the signal rate. The signal rate of both manchester

and differential manchester is double that of NRZ.

The reason is that there is always one transition at the middle of the bit and maybe one transition at the end of the bit.

4.39

4.40

Manchester and differential Manchester are also called as biphase schemes.

Note

AMI (Bipolar) AMI stands for Alternate Mark

Inversion. The word “mark” comes from

telegraphy and means 1. So AMI means alternate 1 inversion A zero voltage represent binary 0

and 1s are represented by alternating positive and negative voltages.

4.41

4.42

Figure 4.9 Bipolar schemes: AMI and pseudoternary

Pseudoternary Same as AMI, only difference is 1 is

encoded using zero voltage and 0 by alternating positive and negative voltages.

4.43

Block Coding In line coding schemes we need

redundancy to ensure synchronization and to provide some kind of inherent error detection.

Block coding gives us this redundancy and improve performance of line coding schemes.

block coding changes a block of m bits into a block of n bits, where n is larger than m.

4.44

4.45

Block coding is normally referred to as mB/nB coding;

it replaces each m-bit group with an n-bit group.

Note

Block coding working It involves three steps: division,

substitution and combination In the division step a sequence of

bits is divided into groups of m bits. In the substitution step each group

of m bits is replaced by group of n bits.

In the combination step groups of n bits are combined to form a stream.

4.46

4.47

Figure 4.14 Block coding concept

4.48

Table 4.2 4B/5B mapping codes

4.49

Figure 4.15 Using block coding 4B/5B with NRZ-I line coding scheme

Scrambling Scrambling is done at the same time

of encoding. The system needs to insert the

required pulses based on the defined scrambling rules.

Scrambling is used with AMI encoding scheme.

4.50

4.51

Figure 4.19 Two cases of B8ZS scrambling technique

4.52

B8ZS substitutes eight consecutive zeros with 000VB0VB.

Note

4.53

4-2 ANALOG-TO-DIGITAL CONVERSION4-2 ANALOG-TO-DIGITAL CONVERSION

We have seen in Chapter 3 that a digital signal is We have seen in Chapter 3 that a digital signal is superior to an analog signal. The tendency today is to superior to an analog signal. The tendency today is to change an analog signal to digital data. In this section change an analog signal to digital data. In this section we describe two techniques, we describe two techniques, pulse code modulationpulse code modulation and and delta modulationdelta modulation. .

Pulse Code Modulation (PCM)Delta Modulation (DM)

Topics discussed in this section:Topics discussed in this section:

4.54

Figure 4.21 Components of PCM encoder

4.55

Figure 4.22 Three different sampling methods for PCM

4.56

According to the Nyquist theorem, the sampling rate must be

at least 2 times the highest frequency contained in the signal.

Note

4.57

Figure 4.23 Nyquist sampling rate for low-pass and bandpass signals

4.58

For an intuitive example of the Nyquist theorem, let us sample a simple sine wave at three sampling rates: fs = 4f (2 times the Nyquist rate), fs = 2f (Nyquist rate), and fs = f (one-half the Nyquist rate). Figure 4.24 shows the sampling and the subsequent recovery of the signal.

It can be seen that sampling at the Nyquist rate can create a good approximation of the original sine wave (part a). Oversampling in part b can also create the same approximation, but it is redundant and unnecessary. Sampling below the Nyquist rate (part c) does not produce a signal that looks like the original sine wave.

Example 4.6

4.59

Figure 4.24 Recovery of a sampled sine wave for different sampling rates

4.60

Consider the revolution of a hand of a clock. The second hand of a clock has a period of 60 s. According to the Nyquist theorem, we need to sample the hand every 30 s (Ts = T or fs = 2f ). In Figure 4.25a, the sample points, in order, are 12, 6, 12, 6, 12, and 6. The receiver of the samples cannot tell if the clock is moving forward or backward. In part b, we sample at double the Nyquist rate (every 15 s). The sample points are 12, 3, 6, 9, and 12. The clock is moving forward. In part c, we sample below the Nyquist rate (Ts = T or fs = f ). The sample points are 12, 9, 6, 3, and 12. Although the clock is moving forward, the receiver thinks that the clock is moving backward.

Example 4.7

4.61

Figure 4.25 Sampling of a clock with only one hand

4.62

An example related to Example 4.7 is the seemingly backward rotation of the wheels of a forward-moving car in a movie. This can be explained by under-sampling. A movie is filmed at 24 frames per second. If a wheel is rotating more than 12 times per second, the under-sampling creates the impression of a backward rotation.

Example 4.8

4.63

Telephone companies digitize voice by assuming a maximum frequency of 4000 Hz. The sampling rate therefore is 8000 samples per second.

Example 4.9

4.64

A complex low-pass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal?

SolutionThe bandwidth of a low-pass signal is between 0 and f, where f is the maximum frequency in the signal. Therefore, we can sample this signal at 2 times the highest frequency (200 kHz). The sampling rate is therefore 400,000 samples per second.

Example 4.10

4.65

A complex bandpass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal?

SolutionWe cannot find the minimum sampling rate in this case because we do not know where the bandwidth starts or ends. We do not know the maximum frequency in the signal.

Example 4.11

4.66

Figure 4.26 Quantization and encoding of a sampled signal

4.67

What is the SNRdB in the example of Figure 4.26?

SolutionWe can use the formula to find the quantization. We have eight levels and 3 bits per sample, so

SNRdB = 6.02(3) + 1.76 = 19.82 dB

Increasing the number of levels increases the SNR.

Example 4.12

4.68

A telephone subscriber line must have an SNRdB above 40. What is the minimum number of bits per sample?

SolutionWe can calculate the number of bits as

Example 4.13

Telephone companies usually assign 7 or 8 bits per sample.

4.69

We want to digitize the human voice. What is the bit rate, assuming 8 bits per sample?

SolutionThe human voice normally contains frequencies from 0 to 4000 Hz. So the sampling rate and bit rate are calculated as follows:

Example 4.14

4.70

Figure 4.27 Components of a PCM decoder

4.71

We have a low-pass analog signal of 4 kHz. If we send the analog signal, we need a channel with a minimum bandwidth of 4 kHz. If we digitize the signal and send 8 bits per sample, we need a channel with a minimum bandwidth of 8 × 4 kHz = 32 kHz.

Example 4.15

4.72

Figure 4.28 The process of delta modulation

4.73

Figure 4.29 Delta modulation components

4.74

Figure 4.30 Delta demodulation components

4.75

4-3 TRANSMISSION MODES4-3 TRANSMISSION MODES

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

Parallel TransmissionSerial Transmission

Topics discussed in this section:Topics discussed in this section:

4.76

Figure 4.31 Data transmission and modes

4.77

Figure 4.32 Parallel transmission

4.78

Figure 4.33 Serial transmission

4.79

In asynchronous transmission, we send 1 start bit (0) at the beginning and 1 or more stop bits (1s) at the end of each

byte. There may be a gap between each byte.

Note

4.80

Asynchronous here means “asynchronous at the byte level,”

but the bits are still synchronized; their durations are the same.

Note

4.81

Figure 4.34 Asynchronous transmission

4.82

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.

Note

4.83

Figure 4.35 Synchronous transmission