data communication netwotks (graduate level) physical...
TRANSCRIPT
10/7/2013
1
Department of Computer and IT Engineering
University of Kurdistan
Data Communication Netwotks (Graduate level)
Physical Layer
By: Dr. Alireza Abdollahpouri
2
The physical layer is responsible for movements of individual bits from one node to the next
Physical Layer
3
Analog vs. digital
4
The benefit of digital transmission
10/7/2013
2
5
Multilevel Digital Signal
6
• Frequency range which can be
transmitted over a medium
• Bandwidth is the difference of the highest and lowest frequency which
can be transmitted • The cutoff is typically not sharp
A medium transports always a limited frequency-band.
Bandwidth
Bit rate is the number of bits per
second. Baud rate is the number of
signal units per second.
Bit rate vs. Baud rate
7
Example 1
An analog signal carries 4 bits in each signal unit. If
1000 signal units are sent per second, find the baud
rate and the bit rate
Solution
Baud rate = 1000 bauds per second (baud/s)
Bit rate = 1000 x 4 = 4000 bps
Bit rate vs. Baud rate
8
10/7/2013
3
Example 2
The bit rate of a signal is 3000. If each signal unit
carries 6 bits, what is the baud rate?
Solution
Baud rate = 3000 / 6 = 500 baud/s
Bit rate vs. Baud rate
9
Digital Signal Analysis
Digital Signal
Spectral Analysis
10
One harmonic
Two harmonics
Digital Signal Synthesis
Four harmonics
Eight harmonics
11
Maximum Data Rate or Capacity of a Noiseless Communication Channel
Maximum capacity ( C ) = 2 B log2 V bits/sec
Bandwidth (Hz)
number of signal levels
Nyquist’s Theorem
12
10/7/2013
4
Maximum Data Rate or Capacity of a Noisy Communication Channel
Shannon’s Theorem
If random noise is present, the situation deteriorates rapidly. The amount of thermal noise present is measured
by the ratio of the signal power to the noise power, called
the signal-to-noise ratio (S/N).
Maximum Capacity ( C ) =B log2(1+S/N)
13
signal noise signal + noise
signal noise signal + noise
High SNR
Low SNR
SNR = Average Signal Power
Average Noise Power
SNR (dB) = 10 log10 SNR
t t t
t t t
Signal to noise ratio
14
Numerical Example
1. Noiseless channel case:
Bandwidth B = 3000 Hz
Voltage Levels V = 4 ( two binary bits)
Then,
C = 2B log 2 (V) = 2 * 3000 log 2 (4) bps. = 12000 bps.
2. Noisy channel case:
Bandwidth B = 3000 Hz
S/ N = 20 dB 20 = 10 log 10 (S/ N) S/ N = 100
Then,
C = B log 2 ( 1 + S/N ) = 3000 log 2 (1 + 100) = 19800 bps.
15
Impairments: Factors that make the received signal different from the transmitted one
Transmission Impairments
16
10/7/2013
5
Attenuation Attenuation: Loss of energy due to resisting the medium (Signal strength falls off with distance)
Increases with signal frequency
Ex. A wire carrying electrical signal becomes warm after some time
Amplifiers (analog signals) and repeaters (digital signals) are used to handle attenuation
Attenuation affects analog signals
17
Distortion
Distortion: Signal changes in shape
Distortion will cause different bits to overlap
Usually occurs to composite signal due to different propagation delays of its components
18
Noise
Thermal Noise due to random motion of electrons in a wire which will create an extra signal
Induced Noise: caused by motors and electrical equipments.
Crosstalk noise : Two wires beside each others (hearing another conversation in the background while talking with the phone)
Impulse noise: irregular pulses or noise spikes of short duration and high
amplitude
- caused by power lines or lightning
- Very critical in case of digital signals (primary source of error in digital data communication)
19 20
Bit Error Rate
10/7/2013
6
Line coding
Binary data can be transmitted using a number of different types of pulses. The
choice of a particular pair of pulses to represent the symbols 1 and 0 is called Line Coding and the choice is generally made on the grounds of one or more of the
following considerations:
– Presence or absence of a DC level.
– Power Spectral Density- particularly its value at 0 Hz.
– Bandwidth.
– BER performance (this particular aspect is not covered in this lecture).
– Transparency (i.e. the property that any arbitrary symbol, or bit, pattern can
be transmitted and received).
– Ease of clock signal recovery for symbol synchronisation.
– Presence or absence of inherent error detection properties.
21
Line coding schemes
uses only one voltage level uses two voltage levels (positive and negative)
uses three voltage levels (positive and negative
and zero)
22
Unipolar Signalling
Unipolar signalling (also called on-off keying, OOK) is the type of line coding in
which one binary symbol (representing a 0 for example) is represented by the
absence of a pulse and the other binary symbol (denoting a 1) is represented by
the presence of a pulse.
There are two common variations of unipolar signalling: Non-Return to Zero (NRZ)
and Return to Zero (RZ).
23
Unipolar Signalling (NRZ)
• There is no synchronization information, • The signal has a DC component.
24
10/7/2013
7
Unipolar Signalling (RZ)
RZ pulses fill only the first half of the time slot, returning to zero for the second half.
–Presence of a spectral line at symbol rate which can be used as symbol timing clock signal.
25
Polar Signalling
In polar signalling a binary 1 is represented by a pulse g1(t) and a binary 0 by the opposite (or antipodal) pulse g0(t) = -g1(t). Polar signalling also has NRZ and RZ forms.
26
Manchester encoding
In Manchester encoding, the transition at the middle of the bit is used for both synchronization and bit representation.
27
Differential Manchester encoding
28
10/7/2013
8
BiPolar Signalling
Bipolar Signalling is also called “alternate mark inversion” (AMI) uses three voltage
levels (+V, 0, -V) to represent two binary symbols. Zeros, as in unipolar, are
represented by the absence of a pulse and ones are represented by alternating voltage
levels of +V and –V.
Alternating the mark level voltage ensures that the bipolar spectrum has a null at DC.
The alternating mark voltage also gives bipolar signalling a single error detection
capability.
Like the Unipolar and Polar cases, Bipolar also has NRZ and RZ variations.
29
BiPolar Signalling
BiPolar NRZ
1 0 1 0 1 1 1 1 1 0
+V
-V
0
Figure. BiPolar RZ
+V
-V
0
1 0 1 0 1 1 1 1 1 0
30
Block coding
31
4B/5B block coding
Groups of four bits are mapped on groups of five bits
32
10/7/2013
9
Digital-to-analog modulation
33
Types of digital-to-analog modulation
34
Sine wave features
35
Amplitude Shift Keying (ASK)
36
10/7/2013
10
Frequency Shift Keying (FSK)
37
Phase Shift Keying (PSK)
38
PSK constellation
39
The 4-PSK method
40
10/7/2013
11
The 4-PSK characteristics
41
The 8-PSK characteristics
42
r combines amplitude and phase shift keying
r It is possible to code n bits using one symbol
m 2n discrete levels
r bit error rate increases with n
0000
0001
0011
1000
Q
I
0010
φ
a
Quadrature Amplitude Modulation (QAM)
Example: 16-QAM (4 bits = 1 symbol)
Symbols 0011 and 0001 have the
same phase φ, but different amplitude
a. 0000 and 1000 have same
amplitude but different phase
Used in Modem
43
The 4-QAM and 8-QAM constellations
44
10/7/2013
12
Time domain for an 8-QAM signal
45
16-QAM constellations
46
Bit and baud rate comparison
Modulation Units Bits/Baud Baud rate Bit Rate
ASK, FSK, 2-PSK Bit 1 N N
4-PSK, 4-QAM Dibit 2 N 2N
8-PSK, 8-QAM Tribit 3 N 3N
16-QAM Quadbit 4 N 4N
32-QAM Pentabit 5 N 5N
64-QAM Hexabit 6 N 6N
128-QAM Septabit 7 N 7N
256-QAM Octabit 8 N 8N
47
Dividing a link into channels
Multiplexing
multiple analogue message signals or digital data streams are combined into one signal over a shared medium
48
10/7/2013
13
Categories of multiplexing methods
49
Frequency Division Multiplexing (FDM)
50
Frequency Division Multiplexing (FDM)
51
FDM Guard band
52
10/7/2013
14
Example
53
Analog hierarchy
54
Prisms in WDM multiplexing and demultiplexing
Wavelength Division Multiplexing (WDM)
WDM is an analog multiplexing technique to combine optical signals.
55
Time Division Multiplexing (TDM)
56
10/7/2013
15
Time Division Multiplexing (TDM)
57
From analog signal to PCM digital code
58
T-1 line for multiplexing telephone lines
59
T-1 frame structure
60
10/7/2013
16
A Taxonomy of Communication Networks Communication Communication Communication Communication NetworkNetworkNetworkNetwork SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork BroadcastBroadcastBroadcastBroadcast Communication Communication Communication Communication NetworkNetworkNetworkNetwork CircuitCircuitCircuitCircuit----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork PacketPacketPacketPacket----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork DatagramDatagramDatagramDatagram NetworkNetworkNetworkNetwork Virtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit Network 61
Broadcast communication networks information transmitted by any node is received by every
other node in the network
examples: usually in LANs (Ethernet, Wavelan)
Problem: coordinate the access of all nodes to the shared communication medium (Multiple Access Problem)
Switched communication networks
information is transmitted to a sub-set of designated nodes examples: WANs (Telephony Network, Internet)
Problem: how to forward information to intended node(s)
this is done by special nodes (e.g., routers, switches) running routing protocols
Broadcast vs. Switched Communication Networks
62
A Taxonomy of Communication Networks Communication Communication Communication Communication NetworkNetworkNetworkNetwork SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork BroadcastBroadcastBroadcastBroadcast Communication Communication Communication Communication NetworkNetworkNetworkNetwork CircuitCircuitCircuitCircuit----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork PacketPacketPacketPacket----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork DatagramDatagramDatagramDatagram NetworkNetworkNetworkNetwork Virtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit Network 63
Circuit Switching
Three phases
1. circuit establishment
2. data transfer
3. circuit termination
If circuit not available: “Busy signal”
Examples
Telephone networks
ISDN (Integrated Services Digital Networks)
64
10/7/2013
17
Timing in Circuit Switching
DATA
Circuit Establishment Data Transmission Circuit Termination Host 1 Host 2
Node 1 Node 2
propagation delay
between Host 1
and Node 1
propagation delay
between Host 2
and Node 1
processing delay at Node 1
65
Multiple paths in multi-stage switches
3-stage clos switch
66
A Taxonomy of Communication Networks Communication Communication Communication Communication NetworkNetworkNetworkNetwork SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork BroadcastBroadcastBroadcastBroadcast Communication Communication Communication Communication NetworkNetworkNetworkNetwork CircuitCircuitCircuitCircuit----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork PacketPacketPacketPacket----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork DatagramDatagramDatagramDatagram NetworkNetworkNetworkNetwork Virtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit Network 67
Packet Switching
Data are sent as formatted bit-sequences, so-called packets.
Packets have the following structure:
Header and Trailer carry control information (e.g., destination address, check sum)
Each packet is passed through the network from node to node along some path (Routing)
At each node the entire packet is received, stored briefly, and then forwarded to the next node (Store-and-Forward Networks)
Typically no capacity is allocated for packets
Header Data Trailer
68
10/7/2013
18
A Taxonomy of Communication Networks Communication Communication Communication Communication NetworkNetworkNetworkNetwork SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork BroadcastBroadcastBroadcastBroadcast Communication Communication Communication Communication NetworkNetworkNetworkNetwork CircuitCircuitCircuitCircuit----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork PacketPacketPacketPacket----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork DatagramDatagramDatagramDatagram NetworkNetworkNetworkNetwork Virtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit Network 69
Datagram Packet Switching
Each packet is independently switched
each packet header contains destination address
No resources are pre-allocated (reserved) in
advance
Example: IP networks
70
Packet 1
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
Timing of Datagram Packet Switching
Packet 1
Packet 2
Packet 3
processing delay of Packet 1 at Node 2 Host 1 Host 2 Node 1 Node 2
propagation delay between
Host 1 and
Node 2
transmission
time of Packet 1
at Host 1
71
A
B
C
D
E
in order
out of
order
Datagram Packet Switching
72
10/7/2013
19
A Taxonomy of Communication Networks Communication Communication Communication Communication NetworkNetworkNetworkNetwork SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork BroadcastBroadcastBroadcastBroadcast Communication Communication Communication Communication NetworkNetworkNetworkNetwork CircuitCircuitCircuitCircuit----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork PacketPacketPacketPacket----SwitchedSwitchedSwitchedSwitched Communication Communication Communication Communication NetworkNetworkNetworkNetwork DatagramDatagramDatagramDatagram NetworkNetworkNetworkNetwork Virtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit NetworkVirtual Circuit Network 73
Virtual-Circuit Packet Switching
Hybrid of circuit switching and packet switching
data is transmitted as packets
all packets from one packet stream are sent along a
pre-established path (=virtual circuit)
Guarantees in-sequence delivery of packets
However: Packets from different virtual circuits
may be interleaved
Example: ATM networks
74
Virtual-Circuit Packet Switching
Communication with virtual circuits takes place
in three phases
1. VC establishment
2. Data transfer
3. VC disconnect
Note: packet headers don’t need to contain the
full destination address of the packet
75
Packet 1
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
Timing of Virtual-Circuit Packet Switching
Packet 1
Packet 2
Packet 3
Host 1 Host 2 Node 1 Node 2 propagation delay
between Host 1
and Node 1 VC establishment
VC termination
Data transfer
76
10/7/2013
20
Virtual-Circuit Packet Switching
Host A
Host B Host E
Host D
Host C
Node 1 Node 2
Node 3
Node 4
Node 5
Node 6 Node 7
77
Circuit switching vs. packet switching
78
Transmission Media
Transmission medium:: the physical path between transmitter and receiver.
1. Guided media :: signals are guided along a
physical path (e.g, twisted pair, coaxial cable and optical fiber)
2. Unguided media :: means for transmitting but not guiding electromagnetic waves (e.g., the atmosphere and outer space).
Guided Media
• Twisted-Pair Cable
• Coaxial Cable
• Fiber-Optic Cable
80
10/7/2013
21
Twisted-pair cable
• Why twisted?
To make unwanted signals interference cancel out each other.
81
UTP and STP
Unshielded Twisted Pair Shielded Twisted Pair
82
UTP connector
83 84
T568A and T568B Connecting
10/7/2013
22
85
Straight-through UTP Cables
• Both ends are the same • Use straight-through cables for
the following connections: - Computer to switch - Computer to hub
86
Crossover UTP Cables
• T568A termination at one end
and T568B termination at the
other end
• crossover cables directly
connect the following devices:
- Switch to switch
- Switch to hub
- Hub to hub
- Computer to computer
87
Rollover UTP Cables
• opposite Pin assignments on each
end of the cable
• most commonly used to connect to
a router console port to configure
the router
88
UTP cables are classified according to the quality: Category 1 ― the lowest quality, only good for voice, mainly found
in very old buildings, not recommended now
Category 2 ― good for voice and low data rates (up to 4Mbps for
low-speed token ring networks)
Category 3 ― at least 3 twists per foot, for up to 10 Mbps (common
in phone networks in residential buildings)
Category 4 ― up to 16 Mbps (mainly for token rings)
Category 5 (or 5e) ― up to 100 Mbps (common for networks
targeted for high-speed data communications)
Category 6 ― more twists than Cat 5, up to 1 Gbps
Categories of UTP Cables
88
10/7/2013
23
Coaxial cable
Category Impedan
ce Use
RG-59 75 ΩΩΩΩ Cable TV
RG-58 50 ΩΩΩΩ Thin Ethernet
RG-11 50 ΩΩΩΩ Thick Ethernet
89
BNC connectors
90
Twisted-pair cable vs. coaxial cable
Bandwidth: coaxial > twisted-pair
Transmission distance: twisted-pair > coaxial
Thus cable needs frequent use of repeaters.
91
Fiber Optic - Bending of light ray
92
10/7/2013
24
Optical fiber
This is the reason why optical fiber
cannot be bended arbitrarily.
93
Fiber construction
94
Fiber-optic cable connectors
95
Fiber optic- Propagation modes
96
10/7/2013
25
Fiber optic modes
97
Type Core Cladding Mode
50/125 50 125 Multimode, graded-index
62.5/125 62.5 125 Multimode, graded-index
100/125 100 125 Multimode, graded-index
7/125 7 125 Single-mode
Fiber optic types
98
Optical fiber performance
99
Pros and Cons for Optical Fiber Cable
Pros: • Higher bandwidth
• Less signal attenuation (50km without repeater; twisted
pair and coaxial requires 5km per repeater) • Immune to electromagnetic interference
• Resistance to corrosive materials • Light weight
• Good resist to tapping
Cons:
• Installation and maintance • One direction communication for one line (not duplex)
• Cost 100
10/7/2013
26
Unguided Media: Wireless
• Radio Waves
• Microwaves
• Infrared
101
Electromagnetic wave
102
103
Electromagnetic spectrum Electromagnetic spectrum for wireless
communication
104
10/7/2013
27
Propagation methods
105
FM radio: 87.5 to 108.0 MHz
AM radio: long wave:: 148.5 kHz–283.5 kHz
Medium wave:: 520 kHz–1,610 kHz
Short wave:: 2.3 MHz–26.1 MHz
Bands
Band Range Propagation Application
VLF 3–30 KHz Ground Long-range radio navigation
LF 30–300 KHz Ground Radio beacons and
navigational locators
MF 300 KHz–3 MHz Sky AM radio
HF 3–30 MHz Sky Citizens band (CB),
ship/aircraft communication
VHF 30–300 MHz Sky and
line-of-sight
VHF TV,
FM radio
UHF 300 MHz–3 GHz Line-of-sight UHF TV, cellular phones,
paging, satellite
SHF 3–30 GHz Line-of-sight Satellite communication
EHF 30–300 GHz Line-of-sight Long-range radio navigation
106
Omnidirectional antennas
107
Unidirectional antennas
108
10/7/2013
28
Use:
Wireless link connecting two remote WLANs
Unidirectional antennas
109 110
Microwave antennas
111
Infrared Transmitter/Receiver
Radio waves are used for multicast and broadcast communications, such as radio and television, and paging
systems.
112
Microwaves are used for unicast communication such as cellular telephones, satellite networks, and wireless LANs.
Infrared signals can be used for short-range communication in a closed area using line-of-sight
propagation.
Wireless communication- different usage
10/7/2013
29
113
Wireless Optical Transmission
Idea: Light as the information carrier for free space communication
• Indoor applications: Wireless LAN, IrDA standard
• Outdoor application: Building to building communication
• Can transmit high data rates to distances of a few kilometers
• Should cope with air turbulence effects and adaptively focus on target receivers
Satellite Communication
Satellites can be used as a wireless node in the sky that can receive, amplify,
process and transmit communication signals
They are mainly used in three orbit ranges and
therefore have different rotation period around the earth
114
Satellite orbit altitudes
115
Satellites in geosynchronous orbit
116
GEO satellites remain in the same position relative to the
surface of earth.
10/7/2013
30
According to Kepler’s law, what is the period of a
satellite that is located at an orbit approximately 35,786
km above the earth?
Solution Applying the formula, we get
Period = (1/100) (35,786 + 6378)1.5 = 86,579 s = 24 h
A satellite like this is said to be stationary to the earth. The orbit, as we will see, is called a geosynchronous orbit.
117
Satellites in geosynchronous orbit
118
MEO Satellites
Used in GPS systems
LEO satellite system
119
Example: Sorayya mobile satellite service provider
Iridium constellation
The Iridium system has 66
satellites in six LEO orbits, each
at an altitude of 750 km.
120
10/7/2013
31
Teledesic
Teledesic has 288 satellites in 12
LEO orbits, each at an altitude of
1350 km.
121
Advantages of Satellites
The advantages of satellite communication over terrestrial communication are: The coverage area of a satellite greatly exceeds
that of a terrestrial system.
Transmission cost of a satellite is independent of the distance from the center of the coverage area.
Satellite to Satellite communication is very precise.
Higher Bandwidths are available for use.
122
Disadvantages of Satellites
The disadvantages of satellite communication:
Launching satellites into orbit is costly.
Satellite bandwidth is gradually becoming used
up.
There is a larger propagation delay in satellite
communication than in terrestrial communication.
123
Pros and Cons of Wireless Communication
Advantages User Mobility
Easy to install Reduced cost
Scalability
Disadvantages High data error rate Lower transmission data rates
Security
Battery of Mobile Devices Health Issues
124
10/7/2013
32
Media Selection
Network Transmission Error
Media Type Cost Distance Security Rates Speed
Twisted Pair LAN Low Short Good Low Low-high
Coaxial Cable LAN Mod. Short-Mod Good Low Low-high
Fiber Optics any High Mod.-long V. Good V.Low High-V.High
Network Transmission Error
Media Type Cost Distance Security Rates Speed
Radio LAN Low Short Poor Mod Low
Infrared LAN, BN Low Short Poor Mod Low
Microwave WAN Mod Long Poor Low-Mod Mod
Satellite WAN Mod Long Poor Low-Mod Mod
Guided Media
Radiated Media
125
Introduction
Four sources of packet delay
A
B
propagation
transmission
nodal
processing queueing
dnodal = dproc + dqueue + dtrans + dprop
1-126
Delay analysis
127
dtrans: transmission delay: L: packet length (bits)
R: link bandwidth (bps)
dtrans = L/R
dprop: propagation delay: d: length of physical link
s: propagation speed in medium (~2x108 m/sec)
dprop = d/s
dproc: processing delay
check bit errors
determine output link
typically < msec
dqueue: queueing delay
time waiting at output link for transmission
depends on congestion level of router
Delay analysis
128
Questions Questions