Fundamentals of Telecommunications and Networking for IT / R.Morikawa

Chapter 3. Introduction to Digital Communications

3.1 Introduction

3.2 Data Encoding

3.3 Digital Data Modulation of an Analog Carrier

3.4 Line Coding

3.4.1 Non-Return to Zero (NRZ)

3.4.2 Bipolar Alternate Mark Inversion (AMI)

3.4.3 Manchester

3.4.4 Bipolar with Eight-Zero Substitution (B8ZS)

3.4.5 4B5B

3.5 Digital Representation of Analog Information

3.5.1 Pulse Code Modulation (PCM)

3.6 Digital Compression

3.7 Error Control

3.7.1 Error Detection

3.7.2 Automatic Repeat Request (ARQ)

3.7.3 Error Correction

3.8 Network Timing Basics

3.9 Time Division Multiplexing (TDM)

Key Terms

Chapter 3 Problems

Chapter 3. Introduction to Digital Communications

"It is not the strongest of the species that survive, nor the most intelligent that survives. It is the one that is the most adaptable to change." Charles Darwin (

3.1 Introduction

Chapter 2 introduced us to the differences between analog and digital communications, as well as the concepts of baseband[1], passband and broadband. In this chapter, we focus our attention on digital communication techniques. In particular, we discuss how logical data (0's and 1's) can be modulated onto sinusoidal carriersin order to form passband signals, and how logical data can be line coded into an electrical baseband signal. In addition, analog-to-digital and digital-to-analog signal conversion is covered through a discussion of pulse code modulation (PCM) methods.

While digital communication systems require the use of computers and intelligent networking devices, thus making them more complex than analog systems, it has numerous advantages in terms ofnoise elimination, data compression, digital security, network survivability, and network efficiency.

3.2 Data Encoding

When we think of digital communications, we think of streams of logical 1's and 0's moving along guided or unguided mediums. However, a stream of 1's and 0's are meaningless unless we can group the data into bytes and frames, and map these groupings to meaningful symbolssuch as text, pixels, voice, video, or machine-to-machine (M2M) computer languages. This mapping between symbols, such as the letter "A" or pixel value, to bytes[2] of data is called encoding.

The specific mapping between logical data and symbols is dependent upon the type of information being sent. As an example, popular text encoding standards such as ASCII Extended (American Standard Code for Information Interchange Extended) consists of an 8 bit pattern that represents a single symbol. With 8 bits, we are able to represent 28=256 different symbols which include the alphabet, numbers and other symbols used in text exchanges. A newer text encoding scheme, Unicode, which was developed by the Unicode Consortium, consists of several schemas such as UTF-16, which consists of 16 bit code units enabling the representation of 216=65,536 symbols and is widely used on the Internet today.

Images have several encoding schemes such as True Color which consists of 24 bits, divided into three bytes, with each byte representing one ofthree basic colors (i.e., blue, green and red)[3]that are associated with the pixel. Each 8-bit byte represents up to 256 shades for a basic color. All three bytes combined can represent a rainbow of up to 224=16,777,216 colors, which is considered the maximum number of color levels that the average human eye can discern.

Likewise, audio, video or machine-to-machine (M2M) also have their own digital encoding schemes that uniquely maps byte or code units to a desired symbol.

It's obvious that a shared encoding scheme must exist between communicating entities. However, in order transmit logical 1's and 0's through guided or unguided medium it must be turned into an electrical, E-M, or optical signal. Sections 3.3 and 3.4 discuss two methods by which this can be accomplished.

3.3 Digital Data Modulation of an Analog Carrier

In chapter 2, we discussed AM, FM and PM modulation techniques which involved impressing information onto a sinusoidal carrier wave. We can use these same techniques to modify a carrier wave with a digital message wave. As an example, digital messages can modulate sinusoidal carriers by impressing information on the carrier's amplitude (Amplitude Shift Keying, ASK), frequency (Frequency Shift Keying, FSK), or phase (Phase Shift Keying, PSK). In the case of QAM (Quadrature Amplitude Modulation), the amplitude and phase of two carriers operating at the same frequency but separated by a phase angle of π/2 radians, are modulated using a combination of both ASK and PSK. This enables a single symbol using QAM modulation to take on numerous signaling levels, which results in increased capacity in bits per second of the signal. More will be said about signaling level, symbol rate, and its relationship to bit rate capacity.

Let's first look at a simplified version of Amplitude Shift Keying (ASK) called on-off keying (OOK) shown in fig. 3.1. The digital message, m(t), modulates the carrier, c(t), which operates at frequency fc. Whenever m(t) is a logical "1", the carrier amplitude, Ac, is equal to a specific voltage which is 5v in fig. 3.1. When m(t) is a logical "0", then Ac=0v.

m(t) ϵ {0, 1}, where m(t) is either a logical "1" or "0"(3.1)

c(t) = Ac cos(2πfct ± ɸ)(3.2)

Figure 3.1. On-Off Keying (OOK).

Logical data in "1s" and "0s" are obviously different than electrical signals which are changes in signal voltage, frequency or phase. Therefore, logical data must be mapped to electrical symbols,which carry these changes as an electrical signal between communicating entities. In fig. 3.1, a symbol equals two sinusoidal periods of the carrier wave which take on one of two amplitude levels, 0v or 5v. In this case, the symbol amplitude maps to a logical "0" or "1". It should be noted that a symbol in this case is equal to two periods of c(t);however, symbols can be represented by any number of carrier cycle periods (T = 1/fc). The definition of a symbol is dependent upon the particulartechnique being applied.

The number of symbols per secondtransmitted by the electrical signal is termed thebaud rate. In the case of fig. 3.1, we see that there is a one-to-one relationship between bit and symbol. The bit can have one of two values "1" or "0". Likewise, the symbol can have one of two values, +5v or 0v. If "M" is the number of values or levels that a symbol can have, then in fig 3.1, M=2 and the data rate in bits per second equals the baud rate in symbols per second. However, this relationship is not always the case. As an example, in fig. 3.2, a single electrical symbol, represented by four cycles, can take on values of -5v, -2.5v, +2.5v, and +5v. With M=4, each symbol can have one of four different values, with each symbol value mapped to two bits of data (-5v="01", -2.4v="00", +2.5v="10", +5v="11"). Therefore, for every symbol transmitted, two bits of data are sent, resulting in a data rate that is twice the baud rate. Depending upon the sophistication of our send and receive equipment we can increase "M" to gain even greater ratios of data rate over baud rate.

Figure 3.2. M'ary ASK where M=4.

Hartley's Law gives us an easy way to determine data rate gains given a baud rate and number of levels per symbol M (eq. 3.3). The number of bits that can be represented by a single symbol is given by the equation, N(bits per symbol) = log2M. Note that a binary log is used in Hartley's equation since we are working with binary data. The log identity in eq. 3.4 can be used to directly enter the equation into a standard calculator configured for base 10 math.

C(bps) = baud x log2M(3.3)

Log identity: log2M = log10M/log102(3.4)

Example 3.1. Determine the data rate in bits/second given a baud rate of 2400 symbols per second and an M=32.

Solution: For a 2400 baud signal, we know that each symbol can take on one of 32 signaling levels (M=32). Applying Hartley's equation gives us the following:

N(bits per symbol) = log2(32) = 5 bits per symbol

C(bps) = 2400 baud x log2(32) = 12,000 bps

or C(bps) = 2400 baud x (log1032/log102) = 12,000 bps

With Frequency Shift Keying (FSK)logical data is similarly mapped to electrical symbols. However, in FSK, symbol values equate to changes in frequency vice amplitude changesas in ASK. Figure 3.3 shows that a symbol can take on one of two different frequencies, f1 or f2, which are mapped to logical "0" and "1" respectively. In the case of fig. 3.3, the number of different frequency levels that a single symbol can take on is M=2. We can add additional frequency values per symbol as seen in fig. 3.4 where M=4.

Figure 3.3. Frequency Shift Keying (FSK), M=2.

Figure 3.4. Frequency Shift Keying (FSK), M=4.

In Phase Shift Keying (PSK), logical data is impressed by changing the carriers phase angle. PSK, like FSK, is an angular modulation technique that, when viewed on a spectrum analyzer, can look similar to one another. However, as discussed in chapter two, PSK and FSK modulation techniques use different mechanisms to impress information onto the carrier and therefore cannot be used interchangeably for signal modulation/demodulation.

In any phase modulation technique, it would be difficult for the receiver to determine the exact phase of the carrier without a mutual reference point in time; therefore differential phase changes are used instead. As an example, fig. 3.5 depicts an M=2, PSK modulated signal where a logical "1" is seen as a phase shift of π radians (180 degrees), and logical "0" a shift of 0 radians(0 degree). So the receiver need only see the phase shift of the carrier to determine if a logical "1" or "0" was sent.

Similar to other modulation techniques, a single PSK symbol can have more than two signaling levels or values (i.e., M≥2 or M'ary modulation[4]). As an example, fig. 3.6 depicts an M=4, PSK modulated signal where values equate to: 45 degrees --> "11", 135 degrees --> "10", 225 degrees --> "00", and 315 degrees --> "01". M=4 PSK modulation is termed Quadrature Phase Shift Keying (QPSK), while M=2 PSK is termed Binary Phase Shift Keying (BPSK).

Figure 3.5. Phase Shift Keying (PSK), M=2.

Figure 3.6. Phase Shift Keying (PSK), M=4.

Similar to FM and PM, FSK and PSK both have inherent advantages over amplitude modulation techniques. In particular, additive noise products that impact the amplitude of the carrierthus causing severe degradation to AM and ASK modulated signals, do not impact FSK and PSK signals. This is becauseinformation is captured as frequency changes or phase angle shifts vice amplitude changes. The result is greater immunity from the effects of additive noise products. The tradeoff, however, is in the bandwidth occupied. Both FSK and PSK modulated signals typically occupy more frequency bandwidth than ASK signals.

Quadrature Amplitude Modulation (QAM)incorporates both ASK and PSK techniques. It is comprised of two carriers operating at the same frequency but separated by 90 degrees or π/2 radians. Once each carrier is modulated, they are combined and transmitted as a single carrier. The advantage of QAM over the application of a single modulating technique, is its ability to represent a greater number of bits per symbol as a combination of both amplitude and phase angles of the carriers. QAM easily supports M'ary modulation, which leads to improved data rate capacity. The best way to illustrate how QAM works is to consider theconstellation map in fig. 3.7.

Figure 3.7 Quadrature Amplitude Modulation (QAM). QAM consists of two carriers of the same frequency, but separated by π/2 radians. The constellation diagram shows M=8.

The QAM constellation map in fig. 3.7 is shown for M=8. The two concentric circles represents two different amplitudes (ASK), while the intersecting lines show phase angles at 0 (or 2π), π/2, π, and 3π/2 radians. The solid dots show the various values that a single QAM symbol can have (i.e., in this case one of eight values, or M=8). Of course we can add additional amplitudes and phase angles in order to increase M levels per symbol, thus increasing our data rate capacity. Hartley's Law can be applied to determine the data rate capacity and the number of bits per symbol for a given value of M.

C(bps)=Baud x log2M, where log2M = no. bits per symbol

N(bits per symbol) = log2M = log28 = 3 bits per symbol

Figure 3.8. 16QAM, M=16 levels per symbol

As an example fig. 3.8 shows a QAM method in which there are M=16 levels per symbol or 16QAM. If we wish to know how many bits a single symbol represents, then we use the second part of Hartley's equation:

N (bits/symbol) = log2M = log216 = (log1016/log102) = 4 bits/symbol

If given a baud rate of 2400 symbols per second, the our data rate capacity is:

C(bps) = baud x log2M = 2400 baud x log216 = 2400 symbols/sec x 4 bits/sec = 9600 bps

These are some basic examples of how we modulate digital data directly onto an analog carrier. There are other modulation techniques that are beyond the scope of this chapter; however, they follow the same ideas of directly modifying the carrier wave with digital information. Next we will discuss how logical data is line coded as an electrical signal.

3.4 Line Coding

In addition to impressing digital data onto an analog sinusoidal carrier, we can also impress logical 1's and 0's directly onto an electrical signal to create a digital baseband. A prime example is the Ethernet LAN (Local Area Network) in which 1's and 0's are directly line codedas an electrical signal onto a common, shared medium. The difference between the digital modulation of an analog carrier and line coding, is that the former produces a passband signal transmitted at the higher carrier frequency, whereas line coding produces an electric baseband signal.

In order for logical "1s" and "0s" to be exchanged on a medium, they need to be mapped to an electrical signal, or symbol, consisting of voltage and current changes. This is termed line coding, and the representation of logical data is dependent upon the actual standardbeing implemented. Multiple line coding standards have been developed to address particular strengths or weaknesses, with each having various tradeoffs in performance depending upon the application. However, the typical traits of a good line code includes the efficient use of frequency bandwidth and transmit power (i.e., transmission efficiency), and the existence of signal transitions that enable clock synchronization using received data.

In the following sections we discuss five line coding methods: Non-Return to Zero (NRZ), Bipolar Alternative Mark Inversion (Bipolar AMI), Manchester Line Coding, Bipolar with Eight-Zero Substitution (B8ZS), and 4B5B. While there are numerous other line coding methods that exist and are being developed, these five basic techniques give you an idea of how line coding is used.

3.4.1 Non-Return to Zero (NRZ)

Digital clocks are used by both the transmitter and receiver to synchronize data exchanges over a circuit. The clock provides the timing for the electrical signal as well as a reference that definesdata frames. With the Non-Return to Zero (NRZ) line coding method shown in fig. 3.9, we see the relationship between the logical data, clock and NRZ line coded signal. A logical "1" equates to a +v, and a logical "0" to a -v; therefore, a single symbol can have one of two values (i.e., M=2). Since the electrical signal can have either a +v or -v value, it is called a bipolarsignal. This is in contrast to a signal that has 0v as one of its values which is called a unipolar signal (fig 3.10).

The darker outline of the signal in fig. 3.9 shows that the time is takes to transmit a single bit is Tb seconds, which is called the bit-time. The data rate can then be determined by eq. (3.5).

R(bps)=(3.5)

In this case the time to takes to transmit one bit also equals the time it takes to transmit one symbol, or Tb=Tsymbol.

We can also determine the highest signal frequency by observing how the signal changes over time. In fig. 3.9, the signal shows the characteristics of a repeating cycle with a period of Tp when the logical data has consecutive changes of "0" and "1". This gives us the highest frequency of the signal as:

f(NRZ, M=2) = = = (3.6)

A weakness of NRZ line coding occurs when a string of logical "1s" or "0s" are transmitted. As you can see in the figure, consecutive "1s" or "0s" results in a signal being transmitted with no transitions. As a consequence, since the data received cannot be used to keep the receive timing accurate, synchronization between the transmitter and receiver may drift.

Figure 3.9. Non-Return to Zero (NRZ)

Figure 3.10. (a) Unipolar signal shown with values of +v and 0v. Unipolar signals may also have the values of 0v and -v. (b) Bipolar signals shown having both +v and -v values.

3.4.2 Bipolar Alternative Mark Inversion (AMI)

Bipolar Alternate Mark Inversion (Bipolar AMI) is a bipolar line coding method in which logical "1s" alternate between a +v and -v. A logical "0" is represented by 0v and therefore is considered a DC signal. In fig. 3.11, we see that the voltage representing "1" alternates regardless of whether they are adjacent or not. Bipolar AMI ensures signal transitions in the case of consecutive "1s" being transmitted; however, consecutive "0s" result in the transmission of a DC signal whichcan lead to the same synchronization issues as discussed with NRZ.

The period of one signal cycle can be readily observed when transmitting consecutive logical "1s". In fig. 3.11, we see that Tb = Tsymbol, and that Tp = 2Tb = 2Tp. Therefore, the frequency of the bipolar AMI signal is similar to the frequency for the NRZ signal based upon Tp. We can see this similarity by comparing equations 3.6 and 3.7. This tells us that both NRZ and bipolar-AMI have similar frequency bandwidth and power efficiencies. The advantage of bipolar-AMI compared to NRZ is that the number of signaling transitions has increased.

f(B-AMI, M=2) = = = (3.7)

Figure 3.11. Bipolar Alternate Mark Inversion (Bipolar AMI)

3.4.3 Manchester

Manchester line coding was designed to ensure that a signal transition takes place in the middle of the clock cycle for every bit sent. This enables receive clocks to continuously synchronize with the incoming signal despite the presence of long string of "1s" or "0s"being received. Instead of coding logical data as discrete voltage values, logical data mapping is accomplished through the transition from one voltage to another. So a voltage transition from -v to +v equates to a logical "1", while a transition from +v to -v represents a logical "0". From fig. 3.12, we see that even when consecutive "1s" and "0s" exist, signal transitions alwaystakes place.