Uploaded by Andy Barbu

Communication Protocols

advertisement
Ș.l. dr. ing. LucianLucian-Florentin Bărbulescu
1
Data communication is the exchange of digital
information between two computer devices.
It is realized within a communication network
2
Communication network types:
Miniature networks(< 5cm).
Small networks(< 50 cm).
Medium networks(< 10 km) - LAN
Large networks(>10 km) – WAN
First two types:
Data transfer is parallel
Also called Closely Coupled Systems - CCS
Homogeneous set of computational elements
Last two types:
Data transfer is serial
Also called Loosely Coupled Systems - LCS
Heterogeneous set of computational elements
3
Objectives of Loosely Coupled Systems:
◦ To ensure that the data transfer is performed without
errors;
◦ To ensure that the exchanged messages have the same
meaning in all systems involved in the transfer.
Classification:
◦ Closed Systems
All equipment belong to the same manufacturer
◦ Open Systems
The equipment implement a set of standard rules
4
Communication
networks based on
Mainframes:
5
Private computer
communication
networks:
networks
6
Public
Switched
Data
Networks:
Networks
7
Local Area
Networks:
Networks
8
Satellite
Networks:
Networks
9
ISO Reference Model for Open Systems
Interconnection (OSI)
Introduced by International Standards Organization (ISO)
It presents the general structure of a communication system
between equipment.
Defines a common base for the coordination of development
of new standards for system interconnection.
It uses the layers principle (all communication functions are
split between several layers)
10
Seven layers are defined:
◦ Application
◦ Presentation
◦ Session
◦ Transport
◦ Network
◦ Data Link
◦ Physical
“All
All People Seem To Need Data Processing”
11
Physical layer:
Represents the physical interface between equipment
Encodes the logical information (bits) in physical signals(electrical,
optical etc.)
◦ Transfer rate
◦ Bit duration
Data Link Layer:
Responsible with the data transfer through the physical layer
Offers a first layer of error detection
12
Network layer:
Ensures the data transfer between two entities regardless of their
interconnection method
Uniquely identifies the source and destination of data
Transport layer:
Responsible with big data segmentation
Contains high level mechanisms for error detection and correction
(retransmissions)
13
Session layer:
Offers a mechanism for controlling the dialog between applications.
Responsible with the management of application connections.
Presentation layer:
Fixes the differences in data representation formats
Can offer encryption/decryption and compression/decompression
mechanisms.
Application layer:
Offers an interface to the applications involved in data communication.
14
15
Ș.l. dr. ing. LucianLucian-Florentin Bărbulescu
1
Logical data is converted into physical signals
Two components:
◦ The physical medium
◦ Data to Signal Conversion
2
The physical medium:
◦ Physical or conducted media:
Twisted-pair cable,
Coaxial cable,
fiber-optic cable
◦ Radiated or wireless media:
Terrestrial microwave
Satellite microwave
Bluetooth
Wireless Local Area Networks
3
Twisted pair lines
◦ Two wires twisted together
◦ A cable may contain more than one pair (4 pairs usually)
◦ It reduces the crosstalk.
4
Twisted pair lines
◦ Crosstalk:
A current through a wire -> magnetic field
A magnetic field over a wire -> induced current
◦ Parallel wires ->
crosstalk
◦ Perpendicular wires: ->
no crosstalk
5
Twisted pair lines
◦ Cable types – different categories (CAT 1-7)
Category 1 (CAT 1)
standard telephone wire
few or no twists
a lot of noise in wire
low speeds (< 9600 bps)
obsolete
Category 2 (CAT 2)
telephone circuits and low-speed LANs
has some twisting -> less noise
used in T-1 and IDSN networks -> speed less than 1.544 Mbps
obsolete
6
Twisted pair lines
◦ Cable types – different categories (CAT 1-7)
Category 3 (CAT 3)
designed for speeds less than 10 Mbps
distance less than 100m
used today mostly for telephone networks
Category 4 (CAT 4)
designed for speeds less than 20 Mbps
distance less than 100m
obsolete
7
Twisted pair lines
◦ Cable types – different categories (CAT 1-7)
Category 5 (CAT 5)
designed for speeds less than 100 Mbps
distance less than 100m (cable frequency of 100Mhz)
less noise than previous cables
More twists per inch than previous cables
Category 5e (CAT 5e)
recommended for 100Mbs
cable frequency of 125 MHz
more detailed than CAT 5 (defines 4 pairs, connector types etc.)
Minimum for 1Gbps by using 4 pairs and more bits/signal
encoding
8
Twisted pair lines
◦ Cable types – different categories (CAT 1-7)
Category 6 (CAT 6)
designed for Gigabit networks
distance less than 100m (cable frequency of 250Mhz)
Uses 4 pairs for gigabit
Category 7 (CAT 7)
distance less than 100m (cable frequency of 600Mhz)
can be used for 10Gb networks
All pairs are shielded
9
Twisted pair lines
◦ CAT1-6 cables can be shielded (STP) or unshielded (UTP)
◦ CAT 7 is only shielded and more expensive
10
Twisted pair lines
◦ Summary:
UTP Category
Category 1
Category 2
Typical Use
Telephone wire
<100 kbps
5–6 kilometers
Inexpensive, easy to
install and interface
LANs
Category 5
LANs
20 Mbps
100 Mbps (100
MHz)
LANs
250 Mbps per pair
(125 MHz)
Category 6
LANs
250 Mbps per pair
(250 MHz)
100 m
Category 7
LANs
600 MHz
100 m
High data rates
Telephone circuits 10 Mbps
5–6 kilometers
Advantages
Category 4
Category 5e
<2 Mbps
Maximum
Transmission Range
Same as Category 1
Same as Category 1,
with less noise
Same as Category 1,
with less noise
Same as Category 1,
with less noise
Same as Category 5.
Also includes
specifications for
connectors, patch
cords, and other
components
Higher rates than
Category 5e, less
noise
Category 3
T-1, ISDN
Maximum Data
Transfer Rate
100 m
100 m
100 m
100 m
Disadvantages
Security, noise,
obsolete
Security, noise,
obsolete
Security, noise
Security, noise,
obsolete
Security, noise
Security, noise
Security, noise,
cost
Security, noise,
cost
11
Coaxial cable
◦ Solid wire in a foam isolation and a braided shield
◦ The shield reduces externally induced noise
12
Coaxial cable
◦ Two data communication techniques:
Baseband
one stream of data fills the entire cable
speeds up to 100 Mbps
can be used for large distance
Replaced by fiber-optics
Broadband
several streams of data fills the cable (like in video transmission)
several 6 MHz channels can be sent on one wire
used mainly in television
13
Coaxial cable
◦ Two cable types:
thick coaxial cable
~ 10 mm in diameter
used mainly for broadband transmission (analog video)
thin coaxial cable
~ 4 mm in diameter
used mainly in baseband transmissions
14
FiberFiber-optics cable
◦ The information is sent in the form of a fluctuating
beam of light
◦ It is immune to electromagnetic noise and crosstalk
◦ More secure (difficult to physically tap)
◦ One cable can contain several optical lines
15
Fiber optics types
◦ Step-index (multimode)
Use LED
The light reflects at different angles –
different paths followed by signals
Maximum 500m
◦ Graded index (multimode)
Use LED
Different refractive properties of the fiber at the
edges – higher speed at the edge, slower speed
at the middle
Maximum 1000m
◦ Single or Mono mode
Use Laser aligned with the cable
Higher distances (thouthands of Km at
10Gb/s with enhancements)
More expensive
16
Wireless media
◦ Electromagnetic
waves are used to
transmit the signals
17
Terrestrial Microwave Transmission
◦ focused beams of radio signals from one antenna to
another.
◦ distance up to 25-50 Km
do not follow the curvature of the Earth
do not pass through solid objects
◦ they suffer from attenuation and interference with
other signals.
◦ high maintenance costs
18
Satellite Microwave Transmission
◦ first communication satellite: Telstar (1962)
◦ satellites in orbit follow an ellipse with Earth in one of
the foci
◦ With few exceptions the satellites follow a circular orbit
19
Satellite Microwave Transmission
◦ There are three main categories of orbits
Low Earth Orbit (LEO)
Between 100 and 2000 Km
Used mainly for Earth observation
The satellite circles the Earth ~ 14 times / day
Medium Earth Orbit (MEO)
Between 2000 and 36000 Km
Used primarily for global positioning and navigation
Some satellites with eliptic orbits are used for communication
The satellite circles the Earth ~ 2 times / day
20
Satellite Microwave Transmission
◦ There are three main categories of orbits
Geosynchronous Orbit (GEO)
At ~36000 Km
The satellite circles the Earth 1 once / day
Positioned above the equator
Used primarily for communication
Seen as fixed from Earth
21
Satellite Microwave Transmission
◦ Topologies
22
Bluetooth
◦ named after the Viking crusader Harald Bluetooth, who
unified Denmark and Norway in the tenth century
◦ uses low-power, short-range radio frequencies to
communicate between two or more devices.
◦ less than 100m (mainly < 10 m)
◦ capable of transmitting through nonmetallic objects
23
Bluetooth
◦ Five versions:
v1 – rates up to 700 kbps
v2 – rates up to 2Mbps
v3– rates up to 3Mbps
Up to 24 Mbps through an Ad-hoc Wi-Fi
v4 – new mode: Bluetooth Low Energy (BLE)
Only 1 Mbps, but with low power consumption
v5- 2 Mbps for Bluetooth Low Energy (BLE)
24
Wireless Local Area Networks
◦ Introduced in 1997 as IEEE 802.11
Initial speed of 2Mbps
Several revisions:
802.11b – 11Mbps
802.11g – 54Mbps
802.11n – 100Mbps
802.11ac – 1300Mbps
25
Ș.l. dr. ing. LucianLucian-Florentin Bărbulescu
1
Data:
Data entities that convey meaning within a
computer system
Signals:
Signals are the electric or electromagnetic
impulses used to encode and transmit data
Characteristics
◦ Both exists in either analog or digital form
2
Represented as continuous waveforms
Can be at an infinite number of points between
some given minimum and maximum
3
The most important shortcoming: Noise
◦ unwanted electrical or electromagnetic energy that degrades the
quality of signals and data
◦ found in every type of data and transmission system
◦ effects range from a slight hiss in the background to a complete
loss of data or signal
◦ Is also analog - extremely difficult to separate noise from an analog
waveform that represents data
4
Composed of a discrete or fixed number of values
◦ Digital Data - binary 1s and 0s
◦ Digital Signals – more complex
Most simple form is “square wave”
5
Digital signals are more tolerant to noise
But not completely immune
6
All signals have three characteristics:
◦ Amplitude
◦ Frequency
◦ Phase
Amplitude:
Amplitude the height of the wave above (or
below) a given reference point
7
Frequency:
Frequency the number of times a signal makes a
complete cycle within a given time frame
◦ Measured in Hertz (Hz)
◦ Period:
Period The time interval of one cycle (1 / frequency)
8
Signals are usually composed of more frequencies
◦ Spectrum: The range of frequencies that a signal spans from
minimum to maximum
Eg.: The spectrum of a simple telephone line must be between 300Hz
and 3400Hz
◦ Bandwidth: the absolute value of the difference between the lowest
and highest frequencies
Eg.: The bandwidth of a simple telephone line is 3100Hz (3400 – 300)
◦ Effective bandwidth: the real-life bandwidth
Less than the theoretical bandwidth
Value influenced by interferences and noise
9
Phase:
Phase the position of the waveform relative to a
given moment of time
10
Four possible data-to-signal conversions
◦ Analog data-to-analog signal
◦ Digital data-to-digital signal
◦ Digital data-to-(a discrete) analog signal
◦ Analog data-to-digital signal
11
An analog waveform is converted in another
analog waveform
The operation performed is modulation
◦ the process of sending data over a signal by varying
either its amplitude(AM), frequency(FM), or phase(PM)
12
AM example
13
Digital data is converted to a signal which have a
finite set of possible values
The operation is called digital encoding
Several encoding schemes:
◦
◦
◦
◦
◦
◦
NRZ-L
NRZ-I
Manchester
Differential Manchester
Bipolar-AMI (alternate mark inversion)
4B/5B
14
NonNon-Return to Zero
◦ Non-Return to Zero – Level (NRZ-L)
1 -> 0 V
0 -> Positive V
◦ Non-Return to Zero – Inverted (NRZ-I)
1 -> Voltage change
0 -> Voltage keep
15
NonNon-Return to Zero
◦ Advantages: easy to implement, baud rate equal to bit rate
Baud rate: the number of times a signal changes value per second.
Bit rate: the number of data bits sent in one second.
◦ Disadvantages: no signal change for long streams of 0 or 1 (only for
NRZ-L) – problem with receiver synchronization
16
Manchester
◦ Manchester
1 -> low to high transition
0 -> high to low transition
◦ Differential Manchester
1 -> One transition: at the middle
0 -> Two transitions: one at the beginning, one at the middle
17
Manchester
◦ Advantage: guaranteed transitions for each bit
◦ Disadvantage: Large baud rate
With Manchester – baud rate = 2 * bit rate
Eg.: for 5 zeros the bit rate is 5 and the baud rate is 10
18
BipolarBipolar-AMI (alternate mark inversion)
◦ 0 -> 0 V
◦ 1 -> Either positive or negative voltage, depending on
previous 1
◦ Advantages: zero voltage sum - useful in certain types
of electronic systems
◦ Disadvantages: no signal change for long streams of 0
19
4B/5B
◦ 4 bits are encoded in 5 bits and sent using NRZ-I
◦ The 5 bits never contain more than two consecutive zeros
20
4B/5B
◦ Advantages: signal transition after at most 3 bits
◦ Disadvantages: 20% more data
21
Digital data is converted to an analog wave
A modulator is used
The analog signal takes on a discrete number of
signal levels
Three simple techniques (plus other complex)
◦ Amplitude Shift Keying
◦ Frequency Shift Keying
◦ Phase Shift Keying
22
Amplitude Shift Keying
◦ 1 and 0 are represented by different levels of the signal
◦ More than two levels can be used
23
Amplitude Shift Keying
◦ Advantages: the most simple form of modulation
◦ Disadvantages:
susceptible to sudden noise impulses
not very efficient – very few levels can be used
not used for high data rates
24
Frequency Shift Keying
◦ 1 and 0 are represented by different frequencies of the
signal
25
Frequency Shift Keying
◦ Advantages: resistant to sudden noise impulses
◦ Disadvantages:
subject to intermodulation distortion (the frequencies of
two or more signals mix together and create new
frequencies)
not used for high data rates
26
Phase Shift Keying
◦ 1 and 0 are represented by different phases of the signal
27
Phase Shift Keying
◦ More phases can be
used (quadrature
phase shift)
28
Complex techniques
◦ 12 different phaseshift angles with two
different amplitudes
29
Analog wave is converted to a signal which have a
discrete number of values
The equipment used is called a codec
Different encoding techniques:
◦ Pulse Code Modulation (PCM)
◦ Delta Modulation
30
Pulse Code Modulation
◦ The analog value is converted at specific time moments
(sampling points) to the closest level
◦ Approximations are made (quantization
quantization errors)
errors
31
Pulse Code Modulation
◦ Correct reconstruction depends on the sampling interval
and quantization errors.
32
Pulse Code Modulation
◦ Better results are obtained with larger sampling rate and
more output levels.
33
Delta Modulation
◦ a codec tracks the incoming analog data by assessing up
or down “steps”
◦ not efficient if the analog waveform rises or drops too
quickly
34
Ș.l. dr. ing. Lucian-Florentin Bărbulescu
1


a short but finite time delay for a signal to
propagate (travel) from one side of the medium to
the other
transmission speed
◦ In ideal case: 3 * 108 m/s
◦ Typically: 2 * 108 m/s
2


data are normally transmitted in blocks of bits
and, on receipt, an acknowledge is sent back
round-trip delay:
◦ the time delay between the first bit of a block being
transmitted by the sender and the last bit of its
associated acknowledgement being received
◦ it is a function of the propagation delay (Tp) and
transmission delay (Tx)
3

The ratio between Tp and Tx is often used
𝑇𝑝
𝑎=
𝑇𝑥
where:
𝑝ℎ𝑦𝑠𝑖𝑐𝑎𝑙 𝑠𝑒𝑝𝑎𝑟𝑎𝑡𝑖𝑜𝑛 𝑆 𝑖𝑛 𝑚𝑒𝑡𝑒𝑟𝑠
𝑇𝑝 =
𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 𝑜𝑓 𝑝𝑟𝑜𝑝𝑎𝑔𝑎𝑡𝑖𝑜𝑛 𝑉 𝑖𝑛 𝑚𝑒𝑡𝑒𝑟𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
𝑇𝑥 =
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑡𝑜 𝑏𝑒 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑑 𝑁
𝑙𝑖𝑛𝑘 𝑏𝑖𝑡 𝑟𝑎𝑡𝑒 𝑅 𝑖𝑛 𝑏𝑖𝑡𝑠 𝑝𝑒𝑟 𝑠𝑒𝑐𝑜𝑛𝑑
4

Example:
A 1000 bits block of data is to be transmitted between two
machines. Determine the ratio of the propagation delay to the
transmission delay, a, for the following types of data link:
1.
2.
3.
100 m of twisted pair wire and a transmission rate of 10
kbps.
10 km of coaxial cable and a transmission rate of 1 Mbps.
50 000 km of free space (satellite link) and a transmission
rate of 10 Mbps.
Assume that the velocity of propagation of an electrical signal
within each type of cable is 2×108m/s, and that of free space
3×108m/s.
5

Solution:
1.
𝑆
100
−7 𝑠
𝑇𝑝 = =
=
5
×
10
𝑉 2 × 108
𝑁
1000
𝑇𝑥 = =
= 0.1𝑠
3
𝑅 10 × 10
𝑇𝑝 5 × 10−7
𝑎=
=
= 5 × 10−6
𝑇𝑥
0.1
6

Solution:
2.
𝑆 10 × 103
−5 𝑠
𝑇𝑝 = =
=
5
×
10
𝑉
2 × 108
𝑁
1000
−3
𝑇𝑥 = =
=
1
×
10
𝑠
6
𝑅 1 × 10
𝑇𝑝 5 × 10−5
−2
𝑎=
=
=
5
×
10
𝑇𝑥 1 × 10−3
7

Solution:
3.
𝑆 5 × 107
−1
𝑇𝑝 = =
=
1.67
×
10
𝑠
8
𝑉 3 × 10
𝑁
1000
−4
𝑇𝑥 = =
=
1
×
10
𝑠
6
𝑅 10 × 10
𝑇𝑝 1.67 × 10−1
3
𝑎=
=
=
1.67
×
10
𝑇𝑥
1 × 10−4
8

Conclusion:
◦ If a is less than 1, then the round-trip delay is
determined primarily by the transmission delay.
◦ If a is equal to 1, then both delays have equal effect.
◦ If a is greater than 1, then the propagation delay
dominates.
9

Three main impairments:
◦ Attenuation – decrease in
amplitude
◦ Distortion – changes in
shape
◦ Noise – outside influences

Also:
◦ Limited bandwidth – some
frequencies are removed
10

Attenuation - the decrease in amplitude
◦ limits the length of a cable
◦ amplifiers (repeaters) can be used to reduce it
 The amplification is called gain
◦ varies with signal frequency
 a signal contains different frequencies -> different
attenuation -> distortion
 equalizers can be used to equalize the amount of
attenuation across a defined band of frequencies
11

Attenuation and Amplification (Gain)
◦ Measured in decibels (dB)
 P1 – power of the transmitted signal
 P2 – power of the received signal
𝐴𝑡𝑡𝑒𝑛𝑢𝑎𝑡𝑖𝑜𝑛 = 10 log10
𝑃1
𝑑𝐵
𝑃2
𝐴𝑚𝑝𝑙𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛 = 10 log10
𝑃2
𝑑𝐵
𝑃1
◦ the overall attenuation/amplification of a multi-section transmission
channel can be determined simply by summing together the
attenuation/amplification of the individual sections.
12

Attenuation and Amplification (Gain)
◦ Example
A transmission channel between two communicating equipment is
made up of three stations. The first introduces an attenuation of 16
dB, the second an amplification of 20 dB and the third an attenuation
of 10 dB. Assuming a mean transmitted power level of 400 mW,
determine the mean output power level of the channel
13

Attenuation and Amplification (Gain)
◦ Solution 1
For first section: 16 = 10 log10
400
,
𝑃2
hence P2 ≈ 10.0475 mW
𝑃2
, hence P2 = 1004.75 mW
10.0475
1004.75
log10
, hence P2 = 100.475 mW
𝑃2
For second section: 20 = 10 log10
For third section: 10 = 10
That is, the mean output power level is 100.475 mW.
◦ Solution 2
Overall attenuation of channel is 16 – 20 + 10 = 6dB
Hence 6 = 10 log10
400
𝑃2
and P2 = 100.475 mW
14

Distortion – changes in shape
◦ Delay distortion
 the various frequency components making up the signal
arrive at the receiver with varying delays between them
 bit rate increase -> bit cell time decrease -> frequencies of
one bit interfere with the frequencies of the previous bit
 It is also called inter-symbol interference
15

Noise – external influence
◦ Can be expressed in decibel-Watt - the strength of a
signal expressed in decibels relative to one Watt
𝑃𝑊
𝑃𝑜𝑤𝑒𝑟𝑑𝐵𝑊 = 10 log10
𝑑𝐵𝑊
1𝑊
◦ Another unit: decibel-miliWatt – uses 1mW as reference
𝑃𝑚𝑊
𝑃𝑜𝑤𝑒𝑟𝑑𝐵𝑚 = 10 log10
𝑑𝐵𝑚
1 𝑚𝑊
◦ Relations:
0 dBm = -30 dBW
+30 dBm = 0 dBW
16

Noise
◦ Four categories
 Thermal noise
 Intermodulation noise
 Crosstalk
 Impulse noise
17

Thermal noise
◦ due to thermal agitation of electrons
◦ also called white noise
◦ cannot be eliminated
◦ Thermal noise in 1 Hz bandwidth (noise power density per
Hertz)
𝑁0 = 𝑘𝑇
 K - Boltzmann’s constant = 1.38 * 10-23 J/K
 T – temperature in Kelvins
◦ Thermal noise in B Hz bandwidth
𝑁 = 𝑘𝑇 𝐵
◦ Thermal noise in dBW:
𝑁 = 10 log10 𝑘𝑇𝐵 = 10 log10 𝑘 + 10log10 𝑇 + 10log10 𝐵 = −228.6𝑑𝐵𝑊 + 10log10 𝑇 + 10log10 𝐵
18

Thermal Noise
◦ Example:
Given a receiver with an effective noise temperature of 21°C and a 10MHz bandwidth, compute the thermal noise level at the receiver’s
output, in dBW:
◦ Solution:
T = 21 + 273 = 294K
B = 10*106 = 107Hz
N0 = -228.6 + 10 log10(294) + 10 log10(107)
= -228.6 + 24.7 + 70
= -133.9 dBW
19

Intermodulation noise
◦ A frequency created by the combination of two other interfere with
an intended signal
 Consider f1 and f2, they can generate fp = f1 + f2
 If it exists a nominal signal with frequency fp, if will interfere with the
generated signal
◦ Generated by nonlinearities in the transmitter, receiver, and/or
intervening transmission medium
20

Crosstalk
◦ an unwanted coupling between signal paths
◦ same order of magnitude as thermal noise
◦ the most limiting impairment is near-end crosstalk
(NEXT)
 also called self-talk
 coupling of a strong transmitter signal with a weak receiver
signal
 adaptive NEXT cancelers can be used to remove it
21

Crosstalk
22

Impulse noise
◦ short spikes of high amplitude signal (eg.: influence of
lightning)
◦ unpredictable
◦ minor annoyance for analog data
◦ main source of errors for digital data
23

Limited bandwidth
◦ Some frequencies are removed from the signal
◦ Can be removed by selecting large bandwidth
transmission lines
24

The maximum rate at which data can be transmitted over
a given communication path, or channel, under given
conditions

Four related concepts involved

Efficiency - get a data rate as high as possible at a
particular limit of error rate for a given bandwidth

Main constraint - noise
◦
◦
◦
◦
Data rate
Bandwidth
Noise
Error rate
25

Nyquist bandwidth
◦ Ignores noise
◦ For a 2B bit rate the bandwidth required is B
𝐶 = 2𝐵


With multi-level signaling (Hartley’s law)
𝐶 = 2𝐵 log 2 𝑀
It is a theoretical limit
26

Nyquist bandwidth
◦ Example
A modem to be used with a PSTN uses an AM-PSK modulation
scheme with eight levels per signaling element. If the bandwidth
of the PSTN is 3100 Hz, deduce the Nyquist maximum data
transfer rate.
◦ Solution
C = 2B log2M
= 2 x 3100 x log28
= 2 x 3100 x 3
= 18 600 bps
27

Shannon Capacity Formula
◦ Takes noise into consideration
◦ It uses signal-to-noise ratio (SNR, S/N)
𝑠𝑖𝑔𝑛𝑎𝑙 𝑝𝑜𝑤𝑒𝑟
𝑆𝑁𝑅 =
𝑛𝑜𝑖𝑠𝑒 𝑝𝑜𝑤𝑒𝑟
◦ SNR is often expressed in decibels
𝑆𝑁𝑅𝑑𝐵 = 10 log10 𝑆𝑁𝑅
28

Shannon Capacity Formula
◦ Shannon-Hartely theorem:
𝐶 = 𝐵 log 2 (1 + 𝑆𝑁𝑅)
◦ Also a theoretical limit
 It considers thermal noise
 It ignores impulse noise, distortion and distortion delay
29

Shannon Capacity Formula
◦ Example
Assuming that a PSTN has a bandwidth of 3000 Hz and a typical
signal-to-noise ratio of 20 dB, determine the maximum theoretical
information (data) rate that can be obtained.
◦ Solution
Because:
It results that:
Therefore:
Now:
Therefore:
𝑆𝑁𝑅𝑑𝐵 = 10 log10 𝑆𝑁𝑅
20 = 10 log10 𝑆𝑁𝑅
SNR = 100
𝐶 = 𝐵 log 2 (1 + 𝑆𝑁𝑅)
𝐶 = 3000 log 2(1 + 100) ≈ 19963 𝑏𝑝𝑠
30

The expression Eb / N0
◦ Eb - signal energy per bit 𝐸𝑏 = 𝑆𝑇𝑏 , 𝑇𝑏 = 1/𝑅
◦ N0 - noise power density per Hertz 𝑁0 = 𝑘𝑇
◦ Important because the error rate is a decreasing
function of it
𝐸𝑏 𝑆Τ𝑅
𝑆
=
=
𝑁0
𝑁0
𝑘𝑇𝑅

In decibels:
31




Relation of Eb / N0 with SNR
Because N = N0B :
From Shannon:
Thus:
𝐸𝑏
𝑆
=
𝑁0 𝑁0 𝑅
𝐸𝑏 𝑆 𝐵
=
𝑁0 𝑁 𝑅
𝑆𝑁𝑅 = 2𝐶 Τ𝐵 − 1
𝐸𝑏 𝐵 𝐶 Τ𝐵
=
2
−1
𝑁0 𝐶
32

Relation of Eb / N0 with SNR
◦ Example:
Compute the minimum Eb/N0 required to achieve a spectral
efficiency of 6 bps/Hz
◦ Solution
Eb/N0 = (1/6)(26 – 1) = 10.5 ≈ 10.21 dB
33
Ș.l. dr. ing. LucianLucian-Florentin Bărbulescu
1
Elements of data
◦ finite number of binary digits
◦ called words
◦ their size is usually a power of 2 (8, 16, 32, 64 etc.)
Content format
◦ stream of bytes or octets (group of 8 bits)
◦ text
2
Text
◦ sequence of characters (printable and special)
◦ each character is represented as a set of binary 0s and
1s
◦ the set of all textual characters or symbols and their
corresponding binary patterns is called a data code
Data codes
◦ ASCII
◦ Unicode
3
ASCII
◦ American Standard Code for Information Interchange
◦ Uses 7 bits – 128 encoded characters
◦ It exists 8 bits encodings which use the 128 characters
from ASCII and that are sometimes labeled ASCII
extensions
◦ It encodes all printable characters from the English
language and some control characters
4
ASCII
5
Unicode
◦ powerful encoding technique
◦ provides a unique coding value for every character in
every language
◦ supports more than 110 different code charts
(languages and symbol sets)
◦ It uses different encodings: UTF-8, UTF-16 etc.
◦ All Unicode encodings cover the ASCII set
6
Example: Transfer $1200.00
ASCII
Unicode
7
data is usually transmitted between machines in
multiples of a fixed-size unit (8 bits)
the 8-bit unit is called byte or character
(depending on encoding)
each byte or character is transmitted serially (bitby-bit)
8
the receiver must know:
◦ the bit rate being used (time duration of each bit cell),
bit or clock synchronism
◦ the start and end of each element (character or byte)
byte or character synchronism
◦ the start and end of each message block or frame.
block or frame synchronism
9
Synchronization is accomplished based on the
sender and receiver clocks:
◦ If clocks are completely independent – asynchronous
transmission
◦ If clocks are synchronized – synchronous transmission
10
Asynchronous transmission
◦ each character or byte that makes up a block/message
is treated independently for transmission purposes
◦ used for transmission of small amount of data at
random time intervals and low data rates.
11
Asynchronous transmission
◦ the transmission control circuit on the communication
card must perform the following functions:
parallelparallel-toto-serial conversion of each character or byte in
preparation for its transmission on the line;
serialserial-toto-parallel conversion of each received character or
byte in preparation for its storage and processing in the
receiving end system;
a means for the receiver to achieve bit, character, and frame
synchronization;
synchronization
the generation of suitable error check digits for error
detection and the detection of such errors at the receiver
should they occur.
12
Asynchronous transmission
13
Asynchronous transmission
◦ Bit synchronization
14
Asynchronous transmission
◦ Bit synchronization
15
Asynchronous transmission
◦ Character synchronization
Performed by inserting a start bit at the beginning and one or
more stop bits at the end
◦ Frame synchronization
Performed by using the special characters STX and ETX
If binary data is transmitted then a special character DLE is used
16
Asynchronous transmission
17
Synchronous transmission
◦ The block is treated as a whole
◦ used for transmission of large amount of data at higher
data rates.
◦ two synchronous transmission control schemes:
character-oriented and bit-oriented
Both use the same bit synchronization schemes
18
Synchronous transmission
◦ Bit synchronization
Two possibilities:
clock information is
embedded into the
transmitted signal
the receiver has a local
clock kept in synchronism
with the received signal
It uses a devices called
digital phasephase-locklock-loop
(DPLL)
19
Synchronous transmission
◦ Bit synchronization – clock encoding and extraction
20
Synchronous transmission
◦ Bit synchronization – digital phase-lock-loop (DPLL)
21
Synchronous transmission
◦ Bit synchronization – digital phase-lock-loop (DPLL)
22
Synchronous transmission
◦ Character oriented transmission
23
Synchronous transmission
◦ Bit oriented transmission
24
Ș.l. dr. ing. Lucian-Florentin Bărbulescu
1

Synchronizing and interfacing techniques are not
sufficient because:
◦ Transmission errors
◦ Transmission rate

A layer of control is needed
◦ To manage errors – Error control
◦ To manage rate – Flow control

The layer of control is called Data Link Control Protocol

The transmission medium with a layer of control is called
data link
2

Flow control
◦ technique for assuring that a transmitting entity does
not overwhelm a receiving entity with data.
◦ the receiving entity typically allocates a data buffer of
some maximum length for a transfer.
◦ when data are received, the receiver must do a certain
amount of processing before passing the data to the
higher-level software.
◦ in the absence of flow control, the receiver’s buffer may
fill up and overflow while it is processing old data.
3

Error control
◦ mechanisms to detect and correct errors that occur in
the transmission of frames.
◦ When data are being transmitted it is possible for the
bits to be interpreted incorrectly
◦ The receiver must deduce, to a high probability, when
received information contains errors.
◦ Should errors be detected, a mechanism is needed for
obtaining a copy of the (hopefully) correct information.
4

Error control
◦ Two mechanisms of error control
 Forward error control - the transmitted data contains
information for error detection AND error correction
 Feedback error control – the transmitted data contains
information for error detection, while the error correction is
performed by retransmitting the frame
◦ Both mechanisms rely on error detection methods
5

Error detection
◦ Several bits are computed and added to the transmitted
data – error detection bits
◦ The error detection bits are used by the receiver to
determine the presence of an error
6

Error detection - Two factors
◦ Bit Error Rate (BER) – probability P of an error bit
 Probability of error frame:
 Pf = 1 – (1 – P)n ≈ nP, n = number of bits in frame
 Ex:
 P = 10-3, n = 10 -> Pf ≈ 10-2
 P = 10-3, n = 125 * 8 = 1000 -> Pf ≈ 1
◦ Error Type
 Single bit error
 Multiple bits error – error burst
7

Error detection
◦
◦
◦
◦
parity
block sum check
arithmetic checksum
cyclic redundancy check
8

Parity
◦ Used in asynchronous transmission
◦ Additional bit for odd number of 1s
(odd parity) or even number of 1s
(even parity)
◦ XOR gates are used
◦ Detect an odd number of error bits
9

Block sum check
◦ Transverse and longitudinal parity bits
– simplest version
◦ Longitudinal parity bits forms the block
check sum (computed as 1’s
complement of the modulo 1 sum)
◦ Verification is performed by modulo-1
adding - the result should be +0 or -0
in 1s complement
10

Arithmetic checksum
◦ The arithmetic sum of data bytes is
added to the transmission
◦ Ex: “This is cool.”
 1010100 1101000 1101001
1110011 0100000 1101001
1110011 0100000 1100011
1101111 1101111 1101100
0101110
◦ Better error detection
11

Cyclic redundancy check
◦ Best method for error burst detection
 A stream beginning and ending with an error bit followed by a stream of
correct bits with at least the same length
12

Cyclic redundancy check
◦ Based on polynomial codes
 Data is interpreted as a large polynomial
 Eg: 101001101
 The polynomial is divided with another polynomial (called generating polynomial)
and the reminder is kept
 The remainder is added to the data and transferred to the destination
 The data concatenated with the remainder is divided by the generating polynomial
and the new reminder must be 0 if no error occurs.
13

Cyclic redundancy check
◦ Common generating polynomials
◦ Error detection performance
14

Cyclic redundancy check
◦ Example
 Data: 11100110
 Generator polynomial: 11001
15

Cyclic redundancy check
◦ Hardware calculation
 Generator polynomial: X5+X4+X2+1
 Data: 1010011010
16
Ș.l. dr. ing. Lucian-Florentin Bărbulescu
1

Forward Error Control
◦ sufficient additional bits are added to each message for
 error detection
 locate the position of the error
◦ correction is achieved simply by inverting the bit(s) that
have been identified as erroneous
2

Forward Error Control
◦ the number of added bits is larger that the number
needed just for error detection
◦ often less efficient than Feedback Error Control
◦ efficient mainly for:
 entertainment applications (live transmission)
 long distance transmission (some satellite links)
3

Forward Error Control
◦ Several methods, the basic:
 Multiple copies of data
 Hamming codes
4

Forward Error Control
◦ Multiple copies of data
 Each bit is replicated several times.
 If one bit is in error, majority rule can be applied.
 Eg.:
 data: 0110110
 transmitted:
000 111 111 000 111 111 000
 if one bit in error: 000 111 111 001 111 111 000
5

Forward Error Control
◦ Hamming code
 Several parity bits are added to the message
 If one bit is in error then the parity bits can be used to detect the error
and positon of the bit
6

Forward Error Control
◦ Hamming code
 Eg.:
 data: 01010101 – bits b12, b11, b10, b9, b7, b6, b5, b3
 4 parity bits:
 c8 – even parity between b12, b11, b10, b9
 c4 – even parity between b12, b7, b6, b5
 c2 – even parity between b11, b10, b7, b6, b3
 c1 – even parity between b11, b9, b7, b5, b3
 sent data: 010100101111
7

Forward Error Control
◦ Hamming code
 Eg.:
 expected data ->
0101 00101111
 if b9 is in error -> received data: 0100 00101111
 c8 is received as 0 and computed as 1 -> Error (1)
 c4 is received as 1 and computed as 1 -> Ok (0)
 c2 is received as 1 and computed as 1 -> Ok (0)
 c1 is received as 0 and computed as 1 -> Error (1)
 1001 = 9 -> position of bit in error
8

Feedback Error Control
◦ the frame contains only error detection information
◦ a short confirmation message (ACK) is sent back to
confirm error-free transmission
◦ In case of an error:
 no ACK is sent
 another short message might be sent (NAK)
 a retransmission of the frame is performed – the process is
known as Automatic Repeat Request (ARQ)
9

Automatic Repeat Request
◦ Two variations of the scheme:
 Idle RQ (send and wait)
 Continuous RQ (with two retransmission methods)
 Selective retransmission (selective-reject)
 Only the missing frames are retransmitted
 Go-back N
 All frames starting with the missing frames are retransmitted
10

Idle RQ
11

Continuous RQ
12

Continuous RQ – selective retransmission
13

Continuous RQ – selective retransmission
14

Continuous RQ – go-back N
15

Continuous RQ – go-back N
16

Flow Control
◦ Ensure that the receiver is not overwhelmed with data by
the sender
◦ Two mechanisms
 Stop and wait
 implemented by Idle RQ
 Sliding window
17

Sliding window
◦ The sender has a limit
of frames that can be
emitted before an
acknowledge is
received – window
size
◦ If window size is 1 ->
Idle RQ
◦ The window size
defines the required
buffers
18

Sequence numbers
◦ The frames are
identified by adding
an integer identifier
to them
◦ The number of
required identifiers
and thus of bits
needed for them is
dependent on the
retransmission
method used
19

Performance issues – stop and wait without errors
𝑛 × 𝑡𝑓𝑟𝑎𝑚𝑒
𝑡𝑓𝑟𝑎𝑚𝑒
𝑈=
=
𝑛(2𝑡𝑝𝑟𝑜𝑝 + 𝑡𝑓𝑟𝑎𝑚𝑒 ) 2𝑡𝑝𝑟𝑜𝑝 + 𝑡𝑓𝑟𝑎𝑚𝑒
where
tframe -> time to transmit a frame
tprop -> propagation time (delay)
𝑡𝑝𝑟𝑜𝑝
𝑎=
𝑡𝑓𝑟𝑎𝑚𝑒
1
𝑈=
1 + 2𝑎
20

Performance issues – stop and wait without errors
𝑑 Τ𝑉 𝑑𝑅
𝑎=
=
𝐿Τ𝑅 𝐿𝑉
where
d -> distance between emitter and receiver
V -> signal speed (close to the speed of light)
L -> number of bits in frame
R -> bit rate
𝑈=
1
𝑑𝑅
1 + 2 𝐿𝑉
21

Performance issues – Error-Free Sliding-Window
1
𝑊 ≥ 2𝑎 + 1
𝑈=ቐ 𝑊
𝑊 < 2𝑎 + 1
2𝑎 + 1
where
W -> window size
22

Performance issues – stop and wait with errors
𝑇𝑓
𝑈=
𝑁𝑟 𝑇𝑡
where
 Tf = time for transmitter to emit a single frame
 Tt = total time that line is engaged in the transmission of a
single frame
 Nr = the expected number of transmissions of a frame
1
𝑈=
𝑁𝑟 1 + 2𝑎
23

Performance issues – stop and wait with errors
∞
𝑁𝑟 = ෍
𝑖𝑃𝑖−1
1−𝑃
𝑖=1
1
=
1−𝑃
where
 P = probability of a frame error
1−𝑃
1−𝑃
𝑈=
=
𝑑𝑅
1 + 2𝑎
1+2
𝐿𝑉
24

Performance issues – sliding window with errors
◦ Selective retransmission
◦ Go-back N
1−𝑃
𝑈 = ቐ𝑊 1 − 𝑃
2𝑎 + 1
𝑊 ≥ 2𝑎 + 1
𝑊 < 2𝑎 + 1
1−𝑃
1 + 2𝑎𝑃
𝑈=
𝑊 1−𝑃
(2𝑎 + 1)(1 − 𝑃 + 𝑊𝑃)
𝑊 ≥ 2𝑎 + 1
𝑊 < 2𝑎 + 1
25

Performance issues – sliding window with errors
26
Ș.l. dr. ing. Lucian-Florentin Bărbulescu
1

Two transmission modes
◦ Parallel
 Used mainly for short distance
◦ Serial
 Used for longer distance

First long distance communications used telephone
lines
◦ The connection between the data terminal equipment (DTE)
and the line was performed via a data communication
equipment (DCE) called modem
◦ Several protocols for the communication between the DTE
and the DCE were defined
2

Electrical interface
◦ RS 232C / V.24
 Allows peer-to-peer connections
◦ RS 422 / V.11
 Allows for one emitter and multiple receivers
◦ RS 485
 Upgrade for RS 422
 Allows for multiple emitters and receivers
3


The standard interface used to connect an
equipment to a modem
Maximum distance between equipment and
modem is 15m and maximum bitrate is 9600 bps
4


It uses a 20mA electrical current
Maximum distance can grow up to 1 Km
5


Used for big distance and speed
It uses twisted pair cables and differential circuits.
6





D-subminiature or D-sub
The name is followed by P
(pins or plug) or S (socket)
Sometimes M(male) or
F(female) are used instead
pf P and S
RS232 uses DB25 and DE9
RS422 doesn’t define any
connector
◦ RS449 uses DC37
7
8

Pinout
◦ DE9 connector
◦ DB25 connector
9
◦ Without handshaking
10
◦ With loopback handshaking
11
◦ With full handshaking
12

Interface corresponding to RS-422 standard.
◦ Receiver Ready = Data Terminal Ready
◦ Data Mode = Data Set Ready
◦ Test mode: data transmitted by DTE are returned through
DCE
13

Based on the link type
◦ For asynchronous transmission
 Universal Asynchronous Receiver and Transmitter (UART)
◦ For synchronous transmission
 Universal Synchronous Receiver and Transmitter (USRT)

If a circuit supports both link types
◦ Universal Communication Interface Circuits or Universal
Synchronous/Asynchronous Receiver and Transmitter
(USART)
14
15

Used during the initialization phase

An example:
16

Used during communication

An example:
17

The controll unit waits until TxBE is “1” (Emission buffer empty)

Data is transferred to the Transmit buffer and TxBE becomes “0”

It waits for the eventual data that exists in the Transmit register to be
serially sent to the destination

Data is transferred from the Transmit buffer to the Transmit register

TxBE is reset to “1”
18

Data is received serially and saved inside the Receive register

Data is transferred to the Receive buffer and the state is updated:
◦ If not all stop bits are received then FE (Frame error) becomes “1”
◦ If a parity error is detected then PE (Parity error) becomes “1”
◦ If RxBE was “1” then OE (Overun error) becomes “1”
◦ If none of the above then RxBE is set to “1”

The control unit transfers the data from the Receive buffer to the
equipment

RxBE is set to “0”
19
20

Used during the initialization phase

An example
21

Used during communication

An example:
22

TxBE is used as for UART

The controll unit writes SYN in the Transmit buffer

The content of the Transmit buffer is transferred to the Transmit
register and the data is sent serially

The operation is repeated for another SYN (if needed), followed by a
STX, the data and an ETX

If no data is available then SYN is sent continuously
23

Each bit received is saved in the Receive register and the content is
compared with SYN. If a match is detected:
◦ SYNDET is set to “1”
◦ Each group of 8 bits that is received is transfered to the Received Buffer

If the received value is not SYN or STX then:
◦ SYNDET is set to “0”

Else if the value received is STX then:
◦ The data is read byte by byte until ETX is received
24
Ș.l. dr. ing. Lucian-Florentin Bărbulescu
1

History
◦ Development begun in 1994 by Compaq, DEC, IBM,
Intel, Microsoft, NEC, and Nortel
◦ First circuits – Intel in 1995
◦ Goals




replace the multitude of connectors at the back of PCs
address the usability issues of existing interfaces
simplifying software configuration of connected devices
greater data rates for external devices.
2

History
◦ Several versions:
 1.0 (January 1996)
 Defines 1.5 Mbit/s (Low Speed) and 12 Mbit/s (Full Speed).
 Few devices were created
 1.1 (August 1998)
 Fixed issues identified in v1.0
 The earliest revision that was widely adopted
 2.0 (April 2000)
 Defines 480 Mbit/s (High Speed)
3

History
◦ Several versions:
 3.0 (November 2008)




Defines a new bus parallel with USB 2.0 at 5Gbit/s (SuperSpeed)
Uses 8b/10b encoding – 4Gbit/s theoretical payload throughput
Full-duplex
Renamed USB 3.1 Gen1
 3.1 (July 2013)
 Defines 10Gbit/s (SuperSpeedPlus)
 Uses 128b/132b encoding – only 3% overhead
 Renamed USB 3.1 Gen2
4

History
◦ Several versions:
 3.2 (September 2017)
 Keeps the capabilities of USB 3.1
 Introduces a new version of the SuperSpeedPlus transfer mode at 20
Gbit/s
 Uses USB-C
 4.0 (August 2019)
 Compatibility with USB 3.2
 Based on Thunderbolt 3
 Speeds up to 40 Gbit/s
5

Architecture
◦ USB communications require:





a host computer with USB support
a device with a USB port
hubs
connectors
cables
6

Topology
◦ Tiered star
◦ Maximum 127
elements
◦ Maximum 5
external hubs in
series
7

Bus Speed considerations – USB 3.1 Host
8

Bus Speed considerations – USB 2.0 Host
9

Terminology
◦ Function
 a set of one or more related interfaces that expose a
capability
 a single physical device can contain multiple functions
 Eg.: a device can offer printer and scanner functions
◦ Device
 a logical or physical entity that performs one or more
functions.
 Each device has a unique address assigned by the Host
 A compound device: a hub with one or more permanently
attached devices
 Treated by the HUB as separate entities with different addresses
10

Host responsibilities
◦ Detect devices
 At power up
 Process called enumeration
 Hubs inform the host about the connected devices
 The host assigns addresses to devices
 After power up
 Hubs inform the host about the connected/disconnected
devices
◦ Manage data flow
 divides the available time into intervals
 gives each transmission a portion of the available time.
11

Host responsibilities
◦ Error checking
 Adds error-checking bits
 Verifies the validity of packets (if required)
◦ Provide and manage power
 USB offers 5V power supply and ground
◦ Exchange data with devices
 Main function of the Host
12

Device responsibilities
◦ Detect communications
 Detect communication directed to the device
 Uses hardware buffers to store data
◦ Respond to standard requests
 Requests are sent at power up
 All devices must answer to those requests
◦ Error check
 Adds error-checking bits (like a Host)
 Verifies the validity of packets
13

Device responsibilities
◦ Manage power
 may have its own power supply, obtain power from the bus,
or use power from both sources
 At host request can enter in Suspend state (2.5mA current)
◦ Exchange data with the host
 Main function of the Device
 Devices send data only on Host request
14

Connectors
USB 2.0
USB 3.0
A
B
15

Connectors
USB 3.0
B Power
Micro A
Micro B
16

Cables
17

Cables
SuperSpeed
18

USB Transfers
◦ Composed of transactions
 Each transaction contains packets
 Token
 Defines the type of the transfer: IN, OUT, Setup
 Data
 Useful data
 Handshake
 Error checking
19

USB Transfers
20

USB Transfers
◦ Four types
 Control
 Used for device configuration and report
 Well defined structure
 Bulk
 No guaranteed transmission time (use the available time on
bus)
 Interupt
 Guaranteed low latency
 Isochronous
 No error check
21

Four transfer types
Control
Transfer Type
Number and Direction of Transactions
Setup Stage 1 (SETUP)
Data Stage
Zero or more
(IN or OUT)
Status
Stage
1 (opposite direction of the
transaction(s) in the Data stage or
IN if there is no Data stage)
Bulk
1 or more
(IN or OUT)
Interrupt
1 or more
(IN or OUT)
Isochronous
1 or more
(IN or OUT)
Phases (packets)
Token
Data
Handshake
Token
Data
Handshake
Token
Data
Handshake
Token
Data
Handshake
Token
Data
Handshake
Token
Data
22
Download