Chapter 04 Digital Transmission
Chapter 04 Digital Transmission
Chapter 04 Digital Transmission
Digital Transmission
4.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4-1 DIGITAL-TO-DIGITAL CONVERSION
4.2
Line Coding
Line coding is the process of
converting digital data to digital signals
At the sender, data elements are
encoded into signal elements
At the receiver, signal elements are
decoded into data elements
4.3
Figure 4.1 Line coding and decoding
4.4
Characteristics of line coding
Data Element vs. Signal Element
Data Rate vs. Signal Rate
Bandwidth
Baseline Wandering
DC Components
Self-Synchronization
Built-in Error Detection
Immunity to noise and interference
Complexity
4.5
Signal Elements vs. Data Elements
A data element is the smallest entity that
can represent a piece of information (a bit)
A signal element is the shortest unit in
time of a digital signal (a baud)
Data elements are what we need to send
Signals elements are what we can send
The ratio, r, is defined as the number of
data elements carried by each signal
element
4.6
Figure 4.2 Signal element versus data element
4.7
Data Rate vs. Signal Rate
The data rate (or bit rate), N, is the number of
data elements (bits) sent in one second
The signal rate (or baud rate or pulse rate or
modulation rate), S, is the number of signal
elements (bauds) sent in one second
The goal is to increase the data rate (and hence
the speed of transmission) while decreasing the
signal rate (and hence the required bandwidth)
Solution
We assume that the average value of c is 1/2 . The baud
rate is then
4.9
The Bandwidth
As learned previously, a digital signal that carries
information is nonperiodic and its bandwidth is
continuous and infinite
Also, many of its components have very small
amplitude that can be ignored
Therefore, the “effective bandwidth” of the real-
life digital signal is finite
The bandwidth is proportional to the signal rate
1
Given N: Bmin c N
r
1
Given B: N max Br
c
4.10
Example 4.2
Solution
A signal with L levels actually can carry log2L bits per
level. If each level corresponds to one signal element and
we assume the average case (c = 1/2), then we have
4.11
Note
4.12
Baseline Wandering
While decoding the received signal, the receiver,
calculates the running average of the received
signal power, called the “baseline”
The incoming signal power is evaluated against
the baseline in order to determine the value of
the data element
Long strings of 0’s or 1’s can cause a drift of the
baseline, called “baseline wandering”, which
makes it hard for the receiver to correctly
decode the signal
A good line coding scheme should prevent
baseline wandering
4.13
DC Components
4.14
Self-synchronization
The sender and receiver must be exactly
synchronized in order for the received signals to
be interpreted correctly
Bit duration, the start, and the end of the bits
should be exactly identified by the receiver
If the sender and the receiver are running at
different clock rates, the bit intervals will not
match and the receiver may misinterpret the
signals
A good “self-synchronized” line coding scheme
should keep the receiver well-synchronized
4.15
Figure 4.3 Effect of lack of synchronization
4.16
Example 4.3
4.17
Figure 4.4 Line coding schemes
4.18
Figure 4.5 Unipolar NRZ (Non-Return to Zero) scheme
4.19
Figure 4.6 Polar NRZ-L (NRZ-Level) and NRZ-I (NRZ-Invert) schemes
Polar: The signal levels are on both sides of the time axis
NRZ-L: the voltage level determines the value of the bit
NRZ-I: the change or lack of change determines the value
Baseline Wandering and Synchronization problems: in
both, but twice as severe in NRZ-L
Both have the DC Component problem
4.20
Note
4.21
Note
4.22
Example 4.4
Solution
The average signal rate is S = N/2 = 500 kbaud. The
minimum bandwidth for this average baud rate is Bmin = S
= 500 kHz.
4.23
Figure 4.7 Polar RZ (Return-to-Zero) scheme
No DC Component problem
4.26
Note
4.27
Note
4.28
Figure 4.9 Bipolar schemes: AMI and pseudoternary
4.30
Note
4.31
Figure 4.10 Multilevel: 2B1Q (2 Binary 1 Quaternary) scheme
4.33
Figure 4.12 Multilevel: 4D-PAM5 scheme
4.36
Block Coding
The process of stuffing the bit stream
with redundant bits in order to:
Ensure synchronization
Detect errors
The bit stream is divided into groups of m
bits (called blocks)
Each group is substituted with a different
(usually larger) group of n bits (a code)
This is referred to as mB/nB coding
4.37
Note
4.38
Steps in Block Coding Transformation
Step 1: Division
The bit stream is divided into groups of m bits
Step 2: Substitution
The m-bit groups are substituted with n-bit codes, where n>m
A number of n-bit codes are carefully chosen to ensure that the
synchronization and error detection are achieved
Notice that at most only one half of the n-bit codes are needed. Why?
Step 4: Combination
The n-bit groups are combined together to form a new bit stream
Step 3: Line Coding
A simple line coding scheme is used to convert the new bit stream
into signals
No need for a complex line coding scheme since block coding ensures
at least the synchronization
4.39
Figure 4.14 Block coding concept
4.40
Common Block Codes
4B/5B Code
Every 4-bit block of data is substituted with a 5-bit codes
The 5-bit codes are line encoded with NRZ-I
Each code has no more than one leading 0 and no more
than two trailing 0’s (i.e.; no more than 3 consecutive 0’s
will ever be transmitted)
What about consecutive 1’s? Why is it not handled?
20% more bauds on NRZ-I due to using redundant bits
Unused codes provide a kind of error detection. How?
What about the DC component problem with NRZ-I?
8B/10B Code
Same as 4B/5B except for the number of bits substituted
More codes are available for better error detection
capability
4.41
Figure 4.15 Using block coding 4B/5B with NRZ-I line coding scheme
4.42
Figure 4.16 Substitution in 4B/5B block coding
4.43
Table 4.2 4B/5B mapping codes
4.44
Example 4.5
Solution
First 4B/5B block coding increases the bit rate to 1.25
Mbps. The minimum bandwidth using NRZ-I is N/2 or
625 kHz. The Manchester scheme needs a minimum
bandwidth of 1 MHz. The first choice needs a lower
bandwidth, but has a DC component problem; the second
choice needs a higher bandwidth, but does not have a DC
component problem.
4.45
Figure 4.17 8B/10B block encoding
4.46
4-2 ANALOG-TO-DIGITAL CONVERSION
4.47
Figure 4.21 Components of PCM encoder
4.48
4.49
4.50
Sampling: Definition and Background
Sampling is converting analog signals into digital by
taking samples at certain uniform intervals called
sampling interval (or sampling period), Ts
The inverse of the sampling interval is called sampling
rate (or sampling frequency), fs = 1/Ts
Sampling is also called Pulse Amplitude Modulation (PAM)
The idea started by telephone carriers to provide long
distance services
The analog voice signal loses power on long distance cables and
therefore require amplifiers
Amplifiers distort the signal due to their own frequency spectrum
and phase changes and they also add noise
Since digital signals are more immune to noise and distortion,
digitization is used
4.51
Figure 4.22 Three different sampling methods for PCM
4.52
Sampling Rate: Nyquist Theorem
Question: How many samples are needed to
digitally reproduce the analog signal
accurately?
Ideally, infinite number of samples
4.53
Note
4.54
Figure 4.23 Nyquist sampling rate for low-pass and bandpass signals
4.55
Example 4.6
4.56
Figure 4.24 Recovery of a sampled sine wave for different sampling rates
4.57
Example 4.9
4.58
Example 4.10
Solution
The 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.
4.59
Example 4.11
Solution
We 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.
4.60
Quantization
Quantization: assigning values in a specific range of
sampled instances
Each value is translated into a binary equivalent number
(i.e.; Binary Encoding)
The binary digits are converted into digital signal using
line coding
Steps of quantization:
1. Assume that the analog signal ranges between Vmin and Vmax
2. Divide the range into L zones each of height (delta)
Vmax Vmin
L
3. Assign quantized values of 0 to L-1 to the midpoint of the zone
4. Approximate the sample amplitude to the quantized value
4.61
Figure 4.26 Quantization and encoding of a sampled signal
Vmin = -20 v
Vmax = +20 v
L=8
=5v
4.62
Quantization Levels and Error
The number of levels, L, depends on:
The amplitude range of the analog signal
The accuracy needed in recovering the signal
Choosing low values of L may increase the quantization
error if the signal changes a lot
The quantization error for each sample is less than /2 (-
/2 ≤ error ≤ /2)
The contribution of the quantization error to the SNRdB of
the signal depends on L or nb (the number of bits per
sample)
4.63
Example 4.12
Solution
We can use the formula to find the quantization. We have
eight levels and 3 bits per sample, so
Solution
We can calculate the number of bits as
4.65
PCM Bandwidth
Consider a low-pass analog signal
Bit Rate = Sampling Rate x bits per sample
= fs x nb
= 2 x Banalog x log2 L (Nyquist Data Rate)
Bmin = nb x Banalog
4.66
Example 4.14
Solution
The human voice normally contains frequencies from 0
to 4000 Hz. So the sampling rate and bit rate are
calculated as follows:
4.67
Example 4.15
4.68
Figure 4.27 Components of a PCM decoder
4.69
Delta Modulation (DM)
PCM is a relatively complex A-to-D technique
DM is a much simpler technique than PCM:
Finds the delta change of the current sample compared to the
previous sample
If the current sample is larger, it sends a 1. Otherwise, it sends a 0
4.70
Figure 4.29 Delta modulation components
4.71
Figure 4.30 Delta demodulation components
4.72
4-3 TRANSMISSION MODES
4.73
Figure 4.31 Data transmission and modes
4.74
Parallel Transmission
Principle: use n wires to send n bits simultaneously
Advantage: speed (n times faster than serial transmission)
Disadvantage: cost and complexity due to the extra wiring
Usually limited to short distances
Devices: older Centronics printers, internal data & address buses
Adapters: PIA (Par. Interface Adapter), PPI (Par. Peripheral. Interface)
4.75
Serial Transmission
Principle: use 1 wire to send 1 bit at a time
Advantage: cost and simplicity (almost a factor of n less than parallel)
Requires serial-to-parallel and parallel-to-serial conversion
Devices: Peripheral devices (e.g. mouse & keyboard), modems, etc.
Adapters: ACIA (Asynchronous Comm. Interface Adapter), UART
(Universal Asynchronous Receiver Transmitter)
Figure 4.33 Serial transmission
4.76
Asynchronous Serial Transmission
The information is received and translated by agreed-upon patterns
Usually, patterns are based on grouping the bits into bytes
The sender handles each group independently
Each group is sent whenever it is ready without regard to a timer
To alert the receiver to the arrival of a new group, a “start bit” (usually a 0 bit) is added
to the beginning of the group
To let the receiver know that the byte has finished, 1 or more “stop bits” are appended
to the end of the group
Each group may be followed by a gap of random duration
The gap can be an idle channel or a stream of stop bits
The start and stop bits allow the receiver to synchronize with the data stream within the
group
“Asynchronous” means that the sender and receiver do not have to be synchronized at
the group level, but at the bit level within the group
The receiver counts n bits after the start bit and looks for the stop bit
4.77
Note
4.78
Note
4.79
Figure 4.34 Asynchronous transmission
4.80
Synchronous Serial Transmission
The bit stream is combined into longer “frames”
Each frame may contain multiple bytes without gaps
Mainly, the data is sent as a continuous stream of bits
The receiver decides how to group them (e.g.; into
bytes, characters, numbers, etc.) for decoding purposes
If the sender sends the data in bursts, the gap must be
filled with a special sequence of 0’s & 1’s (i.e.; idle)
Without start and stop bits, the receiver can’t adjust its
bit-level synchronization
Therefore, strict timing between the sender and the
receiver is required in order to receive the bits correctly
The advantage of synchronous transmission is speed as
there is no overhead of synchronization bits
4.81
Note
4.82
Figure 4.35 Synchronous transmission
4.83
Isochronous Serial Transmission
Used for real-time applications, where:
The synchronization between characters or bytes is
not enough but rather the synchronization of the
entire stream
The delay between frames must be equal or none
The data is received at a fixed rate
Examples: real-time audio and video streaming
4.84