T HE P HYSICAL L AYER Dr. Nawaporn Wisitpongphan.
-
Upload
samantha-edwards -
Category
Documents
-
view
220 -
download
0
Transcript of T HE P HYSICAL L AYER Dr. Nawaporn Wisitpongphan.
THE PHYSICAL LAYERDr. Nawaporn Wisitpongphan
OUTLINE
Introduction to some random topic about Computer Networks
Let’s get down the physical layer! What happen before things get onto the wire?
What is Self-Similarity?
SELF-SIMILARITY
SELF-SIMILAR BACKBONE TRAFFIC
ONE PICTURE SAYS A THOUSAND WORD
BUTTERFLY EFFECT
Small variations of the initial condition of a dynamical system may produce large variations in the long term behavior of the system
D(t)
A(t)
time
Q(t)
d(t)
PROBLEM REVISITCumulative
number of bits
Example: Every second, a train of 100 bits arrive at rate 1000b/s. The maximum departure rate is 500b/s.What is the average queue occupancy?
( ( ) ( ) 0) 0.5 (0.1 5
: During each cycle, the queue fi lls at rate 500b/ s f or 0.1s,
then drains at rate 500b/ s f or 0.1s.The average queue occupancy when
the queue is non-empty is theref ore: Q t Q t
Solution
00) 25 .
( ) (0.2 25) (0.8 0) 5 .
bits
The queue is empty f or 0.8s each cycle, and so: bits
(You' ll probably have to think about this f or a while...).
Q t
0.1s 0.2s 1.0s
100
7
PHYSICAL LAYER
Formatting and transmission of baseband signals
From: Digital Communicatoins Fundamental and Applications by Bernard Sklar
ANALOG SIGNAL (PRO/CON)
Advantanges Disadvantages
Analog signal has infinite amount of signal resolution
Processing may be achieved more simply than with the digital equivalent
Analog signal is prone to noise so it needs better shielding
Distorted signal is hard to recover.
BANDWIDTH VS. CHANNEL
Digital Bandwidth: a measure of available or
consumed data communication resources expressed in bit/s
Analog Bandwidth: frequency bandwidth or radio
bandwidth: a measure of the width of a range of frequencies, measured in hertz
Set of allocated/allowed frequencies Example: WLAN has a
total of 14 channels with 3 non-overlapping channels
BANDWIDTH CHANNEL
SIGNAL IMPAIRMENTS
Attenuation:
Distortion:
Noise:
WHAT ARE THE SOURCES OF NOISE IN THE CHANNEL?
Foreign signals show up
Thermal agitation of electrons Spikes, pulses of all sorts
Frequency independent (white noise)
Depends on temperature
CrossTalk, Impulse noise Pick up signals from near by conductor
Or sources of electromagnetic energy
12
SIGNAL/NOISE PARAMETERS
Noise Power : N [Joule/sec =Watts]
Signal Assume signal encoding bits at rate R bits/sec
Power (energy/sec): S [Watts]
Signal to Noise Ratio (S/N)
SNRdB ≡ 10*log10(S/N)
13
SHANNON THEOREM
In a noisy channel, bandwidth B, with signal to noise ratio S/N
The rate of transmitting bits through that channel is bounded by
Rmax < B*log2(1+ S/N) Example:
Calculate the maximum data rate on a channel with a range from 3 MHz to 4 MHz has SNRdB = 24 dB
channel bandwidth B = 4 – 3 = 1 MHz 10*log10(S/N) = 24 (S/N) = 102.4 = 250 Rmax = 106*log2(1+251) = 8*106 bps Rmax = 8 Mbps
14
ANALOG TO DIGITAL
Formatting and transmission of baseband signals
From: Digital Communicatoins Fundamental and Applications by Bernard Sklar
TEXT TO BINARY (TEXTBITS)
ASCII Code: Seven-bit American standard code for information interchange
From: Digital Communicatoins Fundamental and Applications by Bernard Sklar
GROUP OF BITS SYMBOL
A group of k bits can be combined to form M symbols such that M = 2k
The symbol set of size M is called “M-ary system” Example: k = 1 2-ary system or binary system
“THINK” IN A BINARY FORM
ข้�อความ
bit
Symbol
Waveform
SAMPLING & QUANTIZING
Amplitude and time coordinates of source data. (a) Originalanalog waveform. (b) Natural-sampled data. (c) Quantized samples. (d)Sample and hold.
SAMPLE
SAMPLING THEOREM
Undersampling
More samples allow for better signal recovery
SAMPLING THEOREM: EXAMPLE Audio (MP3)
32 kbps – AM Quality 96 kbps – FM Quality 128 kbps – Standard Quality 224 – 320 kbps – Near CD quality
Audio ประเภทอื่�นๆ 800 bps – Recognizable speech 8 kbps – Telephone quality
Video 16 kbps – videophone quality (สำ��หร�บผู้��ใช้�ท� วไป) 128 – 384 kbps – vdo conferencing (เช้�งธุ�รกิ�จ) 1.25 Mbps – VCD quality 5 Mbps – DVD quality 8 – 15 Mbps – HDTV quality 29.4 Mbps – HD DVD 40 Mbps – Blu-ray Disc
NYQUIST THEOREM
Nyquist Sampling Theorem: “an analog signal that has been sampled can be perfectly reconstructed from the samples if the sampling rate exceeds 2B samples per second, where B is the highest frequency in the original signal.”
Sampling rate?
Nyquist Capacity: “Given a channel with bandwidth B, a signal through this channel can have max symbol Rate Dmax < 2B (symbols/sec)”
Rmax = Dmax* log2M
Rmax < 2B* log2M
Rmax is called the channel capacity1 symbol = log2M bits
QUANTIZE
QUANTIZATION LEVEL
SAMPLING QUANTIZING
ENCODE (LINE CODING)
28
NON-RETURN TO ZERO (NRZ) 1 high signal; 0 low signal
0 0 1 0 1 0 1 1 0
Clock
– Does not posses any clocking component for ease of synchronization.– Is not Transparent. Long string of zeros causes loss of synchronization.
NRZ(non-return to zero)
29
NON-RETURN TO ZERO INVERTED (NRZI) 1 make transition; 0 stay at the same level ว�ธุ น !สำ�ม�รถแกิ�ป%ญห�ข้�อื่ม�ล bit 1 ติ�ดติ+อื่กิ�นน�นๆได� แติ+ไม+
สำ�ม�รถแกิ�ป%ญห�ข้�อื่ม�ล bit 0 ติ�ดติ+อื่กิ�นได�
0 0 1 0 1 0 1 1 0
Clock
NRZI(non-return to zero
inverted)
30
MANCHESTER 1 high-to-low transition; 0 low-to-high transition Solve Clock skew problem Disadvantages
signal transition rate doubled Because of the greater number of transitions it occupies a
significantly large bandwidth. Efficiency = 50%
0 0 1 0 1 0 1 1 0
Clock
Manchester
T. S. Eugene Ng
eugeneng at cs.rice.edu
Rice University
31
4-BIT/5-BIT (100MB/S ETHERNET) Goal: address inefficiency of Manchester encoding, while avoiding
long periods of low signals Solution:
Use 5 bits to encode every sequence of four bits such that no 5 bit code has more than one leading 0 and two trailing 0’s
Use NRZI to encode the 5 bit codes Efficiency is 80%
0000 111100001 010010010 101000011 101010100 010100101 010110110 011100111 01111
1000 100101001 100111010 101101011 101111100 110101101 110111110 111001111 11101
4-bit 5-bit 4-bit 5-bit
32
OTHER WAYS OF OTHER WAYS OF ENCODINGENCODING
LET’S PUT THINGS TO THE PERSPECTIVE
Voice: 4 KHz requires 8000 sample per second
Quantization: Sample encoded by 7 bit
number 8000 samples/sec of 7 bits each
56kbps data stream
Color TV channel: about 5 MHz analog data 106 samples/sec, each encoded 10 bits:
100 Mbps data stream
PULSE CODE MODULATION(PCM): VOICE Digitized voice: 56 Kbps data rate What’s the required channel bandwidth? Use Nyquist Theorem
Nyquist: Rmax < 2B* log2M
For Rmax = 56 Kbps, with M =2 we can use a
channel of B = 28 KHz channel
However, the original voice (analog)’s maximum frequency was 4KHz Why don’t we just use 4 KHz channel? Why do we have to digitize the voice?
34
TYPES OF ERROR An error occurs when a bit is altered
between transmission and reception Single bit errors
only one bit alteredcaused by white noise
Burst errorsContiguous sequence of B bits in
which all of them are in errorCaused by impulse noise or by
fading in wirelessEffect greater at higher data rates
35
ERROR DETECTION
Errors : change of ≥ 1 bit in a transmitted frame
Detection: using error-detecting code, called “Check Bits” added by transmitter recalculated and checked by receiver still chance of undetected error
36
37
ERROR DETECTION PROCESS
ERROR DETECTION SCHEME: PARITY CHECK Parity bit set so character has even (even parity) or
odd (odd parity) number of ones Example: If “A” (ASCII Code = 41 : 01000001) is
transmitted with “Odd Parity” algorithm. The transmitter will add “1” to the data, i.e. 101000001, to
make bit “1” to be odd (3 bits)
Correction Capability: Can only detect error but cannot correct error 38
7 bits of data
(number of 1s)
8 bits including parity
even odd
0000000 (0)
00000000 10000000
1010001 (3)
11010001 01010001
1101001 (4)
01101001 11101001
1111111 (7)
11111111 01111111
ERROR DETECTION SCHEME: CYCLIC REDUNDANCY CHECK (CRC)
One of most common and powerful checks For block of k bits transmitter generates an
(n-k) bits frame check sequence (FCS) Transmits n bits which is exactly divisible by
some number Receiver divides frame by that number
No remainder assume no error
39
40
TransmitterTransmitter
CYCLIC REDUNDANCY CHECK (CRC)
Data
FCSData
K bits
n-k bits
(Can be divided by predetermined number)n bits
FCSData
Divided by the same numberIf no remainder assume no error
ReceReceiveiverr
41
Modulo 2 Arithmetic Polynomial Digital Logic
CYCLIC REDUNDANCY CHECK (CRC)
42
MODULO 2 ARITHMETIC
T = transmitted frame (n bits)
D = Message or Block of Data (the first k bits of T)
F = FCS (the last n-k bits of T)
T = 2 n-k D + F
43
P = the predetermined divisor (n-k+1 bits) Q = Quotient R = Remainder Note: Pattern of P depends on the types of
errors expected, but at least the highest & the lowest order of P must be “1”
Example: Using the preceding example, where
D = 1010001101 ; D(x) = x9 + x7 + x3 + x2 + 1
P = 110101 ; P(x) = x5 + x4 + x2 + 1
MODULO 2 ARITHMETIC2 n-k D = Q + R P P
44
POLYNOMIALS
WIDELY USED POLYNOMIALS CRC-12 = x12 + x11 + x3 + x2 + x + 1
CRC-12 (12-bits FCS) : for streams of 6-bits characters
CRC-16 = x16 + x15 + x2 + 1 CRC-16 (16-bits FCS) : for 8-bits characters, used in
North America
CRC-CCITT = x16 + x12 + x5 + 1 CRC-CCITT (16-bits FCS) : for 8-bits characters, used in
Europe
CRC-32 = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10
+ x8 + x7 + x5 + x4 + x2 + x + 1 CRC-32 (32-bits FCS) : for some point-to-point
synchronous transmission and IEEE 802 LAN Standards45
DIGITAL LOGIC Represented by a dividing circuit, consists of
XOR Gates and a Shift Register Shift Register
a string of 1-bit storage device has 1 output line & I Input line at each clock time, the value in the storage device is
replaced by the value indicated by its input line The circuit is implemented, as follows;
The Register contains n-k bits, equal to the length of the FCS
There are up to n-k XOR Gates. The presence or absence of a gate corresponds
to the presence or absence of a term in the divisor polynomial, P(x), excluding the term 1 and Xn-k.
46
47
DIGITAL LOGIC
General CRC Architecture of Implement Divisor (1 + A1X + A2X2 + … + An-1Xn-k-1 + Xn-k)
48
+ ++
+
ExampleData D = 1010001101 ; D(x) = x9 + x7 + x3
+ x2 + 1Divisor P = 110101 ; P(x) = x5 + x4 + x2 + 1
MODULATING
50
ANALOG ENCODING OF DIGITAL DATA: MODULATION
modulates a carrier signal A*cos(2fct + )
ASK change A FSK changes f PSK change
HOMEWORK!!!: HAND IN AT THE BEGINNING OF THE NEXT CLASS
1. Encode 10010011100010101 using the following line codes:
a) NRZb) NRZIc) Manchester
2. Explain how the following line codes work and use them to encode the string of bits in the previous question
a) Bipolar or AMIb) Pseudoternaryc) Differential Manchester
WORKSHEET FOR PROBLEM 1
1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1
Clock
NRZ 0
NRZI 0
Manchester 0
WORKSHEET FOR PROBLEM 2
1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1
Clock
Differential Manchester 0
Pseudoternary0
Bipolar 0