ch_04_Ph_L_Digital_T..

Download Report

Transcript ch_04_Ph_L_Digital_T..

Chapter 4
Digital
Transmission
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
4.1 Line Coding
Some Characteristics
Line Coding Schemes
Some Other Schemes
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Services
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
•E.g. in the tel. systems electric signals lose their strength over the
metallic wire, and used amplifiers create distortion and phase changes.
•In the digital signal it is not easy to distort a 0 to 1 or a 1 to 0.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Channel Capacity





Channel capacity = max data rate
Data rate = rate of data in bps
Bandwidth - of transmitted signal in Hz
Noise - averaged over the transmission
path
Error rate - rate at which errors occur

0 sent and 1 received or vice versa
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.1
Line coding
Line coding – process of converting, data, a sequence of bits, to a digital signal
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DEFINITIONS
Data - entities that convey meaning, or information.
Signals - are electric or electromagnetic
representations of data.
Transmission - the communication of data by
the propagation and processing of signals.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
INTRODUCTION
Both analog and digital information can be
encoded as either analog or digital signals.
The particular encoding that is chosen depends on
[1] the specific requirements to be met, and
[2] the media and communications facilities
available.
Digital Data, Digital Signals (DD)
Digital Data, Analog Signals (DA)
Analog Data, Digital Signals (AD)
Analog Data, Analog Signals (AA)
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DIGITAL DATA, DIGITAL SIGNALS
A digital data is a sequence of discrete,
discontinuous voltage pulses.
Each pulse is a signal element.
Binary data are transmitted by encoding
each data bit into signal elements.
In the simplest case, there is one-to-one
correspondence between bits and signal
elements.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DIGITAL DATA, DIGITAL SIGNALS
The simplest form of digital encoding of
digital data is to assign one voltage level to
binary 1 and another to binary 0.
More complex encoding schemes are used
to improve performance by
1. altering the spectrum of the signal and
2. providing error detection and
3. synchronization capability.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DIGITAL DATA, DIGITAL SIGNALS
Encoding scheme is the mapping from
data bits to signal elements. There are
many ways.
If the signal elements all have the same
algebraic sign (that is, all positive or all
negative) then the signal is UNIPOLAR.
In the BIPOLAR signal, one logic level is
represented by a positive voltage level, and
the other by a negative voltage.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.2
Signal level versus data level
signal levels refers to - # of values allowed in a particular signal as # of signal levels
data levels refers to - # of values (symbols) used to represent data
an error on p.86, replace by
b. Three signal levels, two data levels ( binary 1 or 0)
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
pulse rate and bit rate
Bit Rate = Pulse Rate x log2 L
Pulse Rate - # of pulses per sec
a pulse is the min amount of time required to
transmit a symbol drawn from a fixed
alphabet. (a representation of a subset of digits
or letters)
•a binary alphabet, that is, an alphabet of two characters, typically
denoted "0" and "1".
Bit Rate - # of bits per sec
L - # of data levels of the signal
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Example 1
A signal has two data levels with a pulse duration of 1
ms. We calculate the pulse rate and bit rate as follows:
Pulse Rate = 1/ 10-3= 1000 pulses/s
Bit Rate = Pulse Rate x log2 L = 1000 x log2 2 = 1000 bps
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Example 2
A signal has four data levels (e.g. transmit 2 bits 00, 01,
10, 11 per pulse) with a pulse duration of 1 ms. We
calculate the pulse rate and bit rate as follows:
Note: The four data levels correspond to a symbol
composed of 2 bits.
Pulse Rate = = 1000 pulses/s
Bit Rate = PulseRate x log2 L = 1000 x log2 4 = 2000 bps
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.3
DC component
DC component – a residual direct-current component (0 frequency)
•is undesirable and useless
• can create errors in the output
•takes extra energy
•doesn’t pass via a transformer
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.4 Lack of synchronization – if bit
intervals don’t correspond on both sites
Lack of synchronization – if bit intervals don’t correspond on both sites
•Lack of synchronization – if the receive clock is faster (or slower),
the receiver might interpret the signal differently than the sender intended
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Example 3
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:
1000 bits sent 1001 bits received1 extra bps
At 1 Mbps:
1,000,000 bits sent 1,001,000 bits received1000 extra bps
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.5
Line coding schemes
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.6
Unipolar encoding
Unipolar encoding uses only one
voltage level.
•inexpensive
•has a dc component
•a lack of sync
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.7
Types of polar encoding
Polar encoding uses two voltage
levels (positive and negative).
•dc component – the average voltage on the line is reduced
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.8
DIGITAL SIGNAL ENCODING FORMATS
NRZ-L (Nonreturn to Zero)
The most common, and easiest, way to
transmit digital signals is to use two different
voltage levels for the two binary digits.
Binary 1 - negative voltage
Binary 0 - positive voltage
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.8
DIGITAL SIGNAL ENCODING FORMATS
NRZ-L (NonReturn to Zero - Level)
•In NRZ-L the level of the signal is
dependent upon the state of the bit.
•receiver R is relying on its clock when
is sent a long stream of 0s or 1s
Binary 1 - negative voltage
Binary 0 - positive voltage
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.8 DIGITAL SIGNAL ENCODING FORMATS
NRZ-I (NonReturn to Zero, Invert on ones)
In NRZ-I the signal is inverted if a binary
1 is encountered, so sync is provided
If the current bit is binary 0, then the current bit is encoded
with the same signal as the preceding bit.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DIGITAL SIGNAL ENCODING FORMATS
NRZ-L & NRZI
Advantages



NRZ codes are easy to
engineer.
Make efficient use of
bandwidth.
Commonly used for
digital magnetic
recording.
expanded by Jozef Goetz
Disadvantages


The presence of DC
component.
NRZ-L: lack of
synchronization
capability

any drift between the
timing of transmitter and
receiver will result in loss
of synchronization
between the two
©The McGraw-Hill Companies, Inc., 2004
Figure 4.9
RZ (Return to Zero) encoding
•RZ encoding has 3 values to build up sync per each bit.
•the signal changes between and during each bit
•1 represented by positive to zero (in the 2nd part of the bit)
•0 represented by negative to zero (in the 2nd part of the bit)
so it occupies more bandwidth. It is the most effective so far.
A good encoded digital signal must contain a
provision for synchronization.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.10
Manchester encoding uses an inversion
•In the Manchester code, there is a transition at
the middle of each bit period.
•The midbit transition serves as a clocking
mechanism and also as data.
A low-to-high transition represents a 1,
A high-to-low transition represents a 0.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.10
Manchester encoding
In Manchester encoding, the transition at
the middle of the bit is used for both
synchronization and bit representation.
The midbit transition is used only to provide clocking.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.11 Differential Manchester encoding
•The encoding of a 0 is represented by the presence
of a transition at the beginning of a bit period,
•2 signal changes
• 1 is represented by the absence of a transition at
the beginning of a bit period
• 1 signal change
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.11 Differential Manchester encoding
•In differential Manchester encoding, the transition at
the middle of the bit is used only for synchronization.
•The bit representation is defined by the inversion or
noninversion at the beginning of the bit.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.12
Bipolar AMI (Alternative Mark Inversion) encoding
In bipolar encoding, we use three levels:
positive, zero, and negative.
•Binary 1’s are represented by alternating positive and negative voltages.
•This alternation occurs even when the 1 bits are not consecutive.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.13
2B1Q – 1 Binary 1 Quaternary
uses four signal levels. Each pulse represents 2 bits.
Four signal levels: 2 bits per level
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.14
MLT-3 signal – Multiline Transition, three level
similar to NRZ-I
* In NRZ-I the signal is inverted if a binary 1 is encountered and
no transition at the beginning of a 0 bit
but uses 3 levels – the signal transition from one level to the next at the beginning of a 1 bit
transition because the next bit is 1
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DIGITAL SIGNAL ENCODING FORMATS
Pseudoternary (3 levels)
A binary 1 is represented by no line signal
A binary 0 is represented by positive or
negative voltage.
The binary 0 pulses must alternate in
polarity.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
DIGITAL SIGNAL ENCODING FORMATS
Pseudoternary (3 levels)
Binary 1 - negative voltage, Binary 0 - positive voltage
inverted if a binary 1 is encountered
Binary 1’s are represented by alternating positive and negative voltages.
A binary 1 is represented by no line signal
The binary 0 pulses must alternate in polarity.
A binary 0 is represented by positive or
negative
voltage.
A low-to-high transition represents a 1, A high-to-low transition represents a 0.
The binary pulses must alternate in polarity.
the inversion (bit 0) or noninversion (bit 1) at the beginning of the bit
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
4.2 Block Coding
To improve the performance of line
coding, block coding was
introduced.
We need some kind of redundancy to
ensure sync and error detection.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.15
Block coding
Division: of data
to m bit chunks (m=4)
Substitution: of data stream to
n coded bit (n= 5)
Line Coding for the channel/medium:
used simple line code b/c the block coding
procedure provides 2 desirable features:
sync and error detection
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.16
Substitution in block coding
•if one or more of the bits in the block is changed in such a way
that the one of the unused code is received,
the receiver R can easy detect the error
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Table 4.1 4B/5B = 4Binary/5Binary encoding
Data
Code
Data
Code
0000
11110
1000
10010
0001
01001
1001
10011
0010
10100
1010
10110
0011
10101
1011
10111
0100
01010
1100
11010
0101
01011
1101
11011
0110
01110
1110
11100
0111
01111
1111
11101
expanded by Jozef Goetz
select only the
subset
of 32 5-bit blocks
in such a way that
•no more than one leading 0
and
• no more than two trailing 0s
©The McGraw-Hill Companies, Inc., 2004
Table 4.1 Control characters don’t follow the 4B/5B rules of coding
Control characters
enable the physical
layer to be controlled:
e.g.
• Idle
• Start
• End
• Set
• Reset
• Halt
Data
Code
Q (Quiet)
00000
I (Idle)
11111
H (Halt)
00100
J (start delimiter)
11000
K (start delimiter)
10001
T (end delimiter)
01101
S (Set)
11001
R (Reset)
00111
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.17
Example of 8B/6T = 8Binary/6Ternary Encoding
is designated to substitute an 8-bit group with a six-symbol code,
which each symbol is ternary, having 3 signal levels (-1, 0, +1).
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
4.3 Sampling
•Pulse Amplitude Modulation - PAM
•Pulse Code Modulation - PCM
•Sampling Rate: Nyquist Theorem
•How Many Bits per Sample?
•Bit Rate
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
ANALOG DATA, DIGITAL SIGNALS
•The process o transforming analog data into
digital signals (less prone to noise and distortion) is
known as digitization.
•In the tel. systems electric signals lose their strength over the metallic wire,
and used amplifiers create distortion and phase changes.
•In the digital signal it is not easy to distort a 0 to 1 or a 1 to 0.
•To send analog data digitally we need to change
it through process called sampling i.e. measuring
the amplitude of the signal at equal intervals.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
ANALOG-TO-DIGITAL CONVERSION
SAMPLING PROCESS
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.18 Pulse Amplitude Modulation PAM
•PAM takes an analog signal,
•samples it, and
• generates a series of pulses based on the results of the sampling.
•PAM uses a technique called sample and hold.
•at a given moment signal is read, then held briefly
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.18 Pulse Amplitude Modulation PAM
•
Pulse amplitude modulation has some applications, but it is not used by itself in
data communication
•
b/c even though it translates the original waveform to a series of pulses,
* these pulses are still of any amplitude (still an analog, not digital signal).
•
1. However, it is the first step in another very popular conversion method called
pulse code modulation.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.19
Quantized PAM signal
2. Quantization is a method of assigning integral values in a specific range to sampled instances
Note: Be aware of a picture error: all 1st digits of all peak amplitudes should be removed
3. Binary coding: assigning sign and magnitude quantized samples
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.21 Pulse Code Modulation - PCM
4. Transformation: Binary digits are then transformed to a digital signals by using one of
the line coding techniques, here is a unipolar signal
Pulse Code Modulation is made up of 4 processes
1. PAM
2. quantization
3. binary encoding
4. line coding
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.22
From analog signal to PCM digital code: steps 1-4
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
ANALOG-TO-DIGITAL CONVERSION - example
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
ANALOG-TO-DIGITAL CONVERSION
•
After the analog signal is sample - steps 1-4,
1. we can store the binary data in the computer
2. or use a combination of block coding and line
coding and send digital data over the medium and
then convert into the original analog data from
the digital
•
The device used for converting analog data into digital
form for transmission, and subsequently recovering the
original analog data from the digital, is known as a codec
(coder-decoder).
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
How Many Sample are sufficient?
Note:
The accuracy of any digital reproduction of an analog signal depends on the # of samples taken
•Using PAM and PCM, we can to reproduce the waveform exactly by taken infinite samples.
Pulse Code Modulation (PCM) is based on the
sampling Nyquist theorem, which states that the
sampling frequency has to be at least twice the
highest signal frequency.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.23
Nyquist theorem
According to the Nyquist theorem, the sampling rate
must be at least 2 times the highest frequency.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Note:
•Note that we can always change a
band-pass signal to a low-pass signal
before sampling.
•In this case, the sampling rate is twice
the bandwidth.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Nyquist theorem
•
So a signal run through a low-pass channel (or
filter) of bandwidth B, the signal can be
completely reconstructed by making only
2B samples per sec.
= maximum data rate for a finite bandwidth
noiseless channel with the binary signal (2
signal levels) b/c
Bit Rate [bps] = 2 B log2 L
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Example 4
sampling rate
What sampling rate is needed for a signal with a
bandwidth of 10,000 Hz (1000 to 11,000 Hz)?
Solution
The sampling rate must be twice the highest frequency in
the signal:
Sampling rate = 2 x (11,000) = 22,000 samples/s
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Example 5
How Many Bits per Samples?
A signal is sampled. Each sample requires at least 12
levels of precision (+0 to +5 and -0 to -5).
•How many bits should be sent for each sample?
Solution
•We need 4 bits; 1 bit for the sign and 3 bits for the
value.
•A 3-bit value can represent 23 = 8 levels (000 to 111), which is more
than what we need.
•A 2-bit value is not enough since 22 = 4. A 4-bit value is
too much because 24 = 16.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Example 6
Bit Rate
We want to digitize the human voice. What is the bit
rate, assuming 8 bits per sample?
Solution
The human voice normally contains frequencies from 0 to 4000 Hz.
Sampling rate = 4000 x 2 = 8000 samples/s
Bit rate = sampling rate x number of bits per sample
= 8000 x 8 = 64,000 bps = 64 Kbps
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
4.4 Transmission Mode
Parallel Transmission
Serial Transmission
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.24
Data transmission
Data transmission can be accomplished in 2 modes:
1 bit is sent with each clock tick
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.25
Parallel transmission
Binary data are organized into groups n bits each
Parallel transmission sends n bits at a time
•each group has its own wire
•all n bits of one group can be transmitted with each clock tick
+’s:
•speed: increase speed by a factor of n over serial transmission
-’s:
•b/c of lines cost it is limited toexpanded
shortbydistances
Jozef Goetz
•clock line
• control lines (e.g. to
determine direction of data
flow)
©The McGraw-Hill Companies, Inc., 2004
Figure 4.26
Serial transmission
+’s:
reduces cost by a factor of n over parallel transmission
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.27
Asynchronous transmission
•is so named b/c the timing of a signal is unimportant (here on the byte level)
•info is received and translated by agreed-upon patterns
•which are based on grouping the bit stream into bytes
•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.
-’s:
+’s:
•slow b/c of gaps and additional bits
•cheap, effective
•used: keyboard to a computer
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Figure 4.28
Synchronous transmission
•In synchronous transmission, we send multiple bytes one
after another without start/stop bits or gaps.
•It is the responsibility of the receiver to group the bits.
The receiver counts the bits as they arrive and groups them in 8-bit units
Timing is very important and the byte sync is accomplished in the DL level
+’s:
•faster then async – no extra bits and gaps
•used for high speed apps
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Roundup
Highlighted key aspects of different digital
signals





Unipolar, Polar, Bipolar
Synchronization (clock), DC component, self
clocking signals
Block Coding – aspects of error detection
Highlighted different types of
transmission:


Parallel,
Serial

asynchronous and synchronous
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Summary
* Line coding is the process of converting binary data to a digital
signal.
•
The number of different values allowed in a signal is the signal
level.
•
The number of symbols that represent data is the data level.
* Bit rate is a function of the pulse rate and data level.
* Line coding methods must eliminate the dc component and
provide a means of synchronization between the sender and the
receiver.
* Line coding methods can be classified as unipolar, polar, or
bipolar.
* NRZ, RZ, Manchester, and differential Manchester encoding are
the most popular polar encoding methods.
* AMI is a popular bipolar encoding method.
* Block coding can improve the performance of line coding through
redundancy and error correction.
* Block coding involves grouping the bits, substitution, and line
coding.
* 4B/5B, 8B/10B, and 8B/6T are common block coding methods.
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004
Summary
* Analog-to-digital conversion relies on PCM (pulse code modulation).
* PCM involves sampling, quantizing, and line coding.
•
The Nyquist theorem says that the sampling rate must be at least
twice the highest-frequency component in the original signal.
* Digital transmission can be either parallel or serial in mode.
* In parallel transmission, a group of bits is sent simultaneously,
with each bit on a separate line.
* In serial transmission, there is only one line and the bits are sent
sequentially.
* Serial transmission can be either synchronous or asynchronous.
* In asynchronous serial transmission, each byte (group of 8 bits) is
framed with a start bit and a stop bit. There may be a variablelength gap between each byte.
* In synchronous serial transmission, bits are sent in a continuous
stream without start and stop bits and without gaps between
bytes.
•
Regrouping the bits into meaningful bytes is the responsibility of the
receiver
expanded by Jozef Goetz
©The McGraw-Hill Companies, Inc., 2004