Physical Layer Yan Wang 2 CS 428/528 Computer Networks Analog - - PowerPoint PPT Presentation
Physical Layer Yan Wang 2 CS 428/528 Computer Networks Analog - - PowerPoint PPT Presentation
Physical Layer Yan Wang 2 CS 428/528 Computer Networks Analog vs. Digital Data Means by which information is represented Analog Continuous values Voice, video, etc. Digital Discrete values ASCII data, numeric data
Analog vs. Digital Data
- Means by which information is represented
- Analog
▫ Continuous values ▫ Voice, video, etc.
- Digital
▫ Discrete values ▫ ASCII data, numeric data etc.
CS 428/528 Computer Networks
2
Data Transmission
- A signal is an electrical or electromagnetic encoding of data
- Signaling is the act of propagating a signal along a medium
▫ guided media: signals are sent along a physical path (e.g., wire, cable, fiber) ▫ unguided media: signals are broadcast (e.g., air, vacuum)
- A guided medium may be either
▫ point–to–point: direct link between two devices ▫ multipoint: more than two devices share the medium
CS 428/528 Computer Networks
3
A Mathematical View of Signals
- A signal is a function of time: x(t)
▫ A signal x(t) is periodic if and only if x(t +T) = x(t), for - ∞< t < ∞ ▫ Otherwise, it is aperiodic ▫ A signal x(t) is analog if it has infinite possibilities ▫ Otherwise, it is digital
CS 428/528 Computer Networks
4
Examples of Aperiodic Signals
CS 428/528 Computer Networks
5
Periodic Analog Signals - Sinusoidal Waves
- Amplitude: the value of the signal at a time
▫ Peak Amplitude (A): maximum strength of signal ▫ volts
- Frequency (f)
▫ Rate of change of signal ▫ Hertz (Hz) or cycles per second ▫ Period = time for one repetition (T) ▫ T = 1/f
- Phase (Φ)
▫ Relative position in time
CS 428/528 Computer Networks
6
Analog vs. Digital Signals
- Means by which data are propagated
- Analog
▫ Continuously vary ▫ Various media ▫ wire, optic fiber, air
- Digital
▫ Dis-continuously vary ▫ Use direct current component
- Different characteristics in transmission
▫ Analog – less distortion, more sensitive to noise ▫ Digital – larger distortion, less sensitive to noise
CS 428/528 Computer Networks
7
Varying Sine Wave:
CS 428/528 Computer Networks
8
s(t) = A sin(2πft + Φ) s(t) = A/2 sin(2πft + Φ) s(t) = A sin(2πf/2t + Φ)s(t) = A sin(2πft + Φ/2)
Periodic Digital Signals – Square Waves (Pulses)
- Amplitude
▫ Volts ▫ On/OFF – High/Low volts
- Frequency (f)
▫ Rate of change of signal ▫ Hertz (Hz) or cycles per second ▫ Period = time for one repetition (T) ▫ T = 1/f
- No phase
CS 428/528 Computer Networks
9
Ideal Digital Signals - Square Waves
CS 428/528 Computer Networks
10
Real Square Waves
CS 428/528 Computer Networks
11
Fourier Analysis
- Any periodic signal can be represented as a sum of sinusoids, known
as Fourier series:
CS 428/528 Computer Networks
12
1 1
) 2 sin( ) 2 cos( ) (
n n n n
t nf b t nf a a t x
T
dt t x T a ) ( 1
where
T n
dt t nf t x T a
0 )
2 cos( ) ( 2
T n
dt t nf t x T b
0 )
2 sin( ) ( 2
Square Wave with An Increasing Number Of Harmonics
CS 428/528 Computer Networks
13
By Peretuset (Own work) [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY 3.0 (http://creativecommons.org/licenses/by/3.0)], via Wikimedia Commons
Some Terminologies
- The spectrum of a signal is the range of frequencies that it contains
- The absolute bandwidth is the width of the spectrum
▫ The absolute bandwidth of the square wave is infinite
- Due to the limitations of real-world media, a signal must be
represented in a limited band of frequencies. This band is referred to as the effective bandwidth, or just bandwidth.
- The exact range of this “limited band” is largely an engineering issue
CS 428/528 Computer Networks
14
Examples
- Consider a square wave x(t) whose fundamental frequency f=1M Hz.
- If the representation of x(t) by harmonics 1f+3f+5f is good enough,
then the (effective) bandwidth of x(t) is 5M - 1M = 4M Hz.
- A more faithful representation that uses up to 9f will have the
bandwidth of 9M-1M = 8M Hz.
CS 428/528 Computer Networks
15
Bandwidth of Human Voice
- Typically, a baby can hear from 20 Hz to 20 KHz.
- Many adults are not as capable.
- Speech bandwidth 100Hz to 7KHz
- Voice telephone systems pass frequencies from 300 Hz to 3300 Hz
▫ a transmission medium meeting this specification is called voice grade.
CS 428/528 Computer Networks
16
Discussion 3
- Why use twisted pair cable in Ethernet cable?
CS 428/528 Computer Networks
17
T-568B Straight-Through Ethernet Cable T-568B Straight-Through Ethernet Cable
Twisted Cabling
- Patented by the Bell in 1881
- A pair of cable counter-clock wise twisted together can reduce the
Electromagnetic Interference (EMI) from external sources without shields
- Use differential mode transmission
CS 428/528 Computer Networks
18
Transmission Impairment (1)
- Signal received may differ from signal transmitted
- Analog - degradation of signal quality
- Digital - bit errors
- Caused by
▫ Attenuation and attenuation distortion ▫ Delay distortion ▫ Noise
CS 428/528 Computer Networks
19
Transmission Impairment (2)
- Attenuation
▫ signal strength falls off with distance ▫ attenuation increases with frequency ▫ depends on medium
- Received signal strength:
▫ must be enough to be detected ▫ must be sufficiently higher than noise to be received without error
CS 428/528 Computer Networks
20
Transmission Impairment (3)
- Delay distortion
▫ Only in guided media ▫ Different frequency components propagate at different speeds
- ver guided media
- Noise
▫ Additional signals inserted between transmitter and receiver ▫ Thermal: due to thermal agitation of electrons ▫ cross talk: unwanted coupling between parallel signal paths ▫ impulse noise: due to, for example, lighting
CS 428/528 Computer Networks
21
Transmission Impairment (4)
- Signal-to-Noise ratio is measured in decibels:
- Consequences
▫ limited data rate or limited distance ▫ errors in transmission inevitable
CS 428/528 Computer Networks
22
power noise power signal log 10 ) / (
10
dB
N S
Shannon Theorem
- Notice that we need the direct S/N ratio (not in decibel) in the
formula.
- Example: in voice telephone system, H=3300Hz-300Hz=3000Hz,
suppose S/NdB=30 ▫ S/N = ? ▫ Max data rate = ?
- Shannon’s theorem gives an upper bound of the channel capacity
CS 428/528 Computer Networks
23
bits/sec ) / 1 ( log rate data maximum
2
N S H
Analog vs. Digital Transmission
- Analog data, analog signals
▫ Traditional telephone networks
- Analog data, digital signals
▫ Modern telephone networks, musical CD
- Digital data, analog signals
▫ Modem
- Digital data, digital signals
▫ File exchanges in LANs
CS 428/528 Computer Networks
24
Analog Signal/Transmission
- Continuously varying signal
- Can be used to transmit analog/digital data
- Use amplifiers to boost energy in signal due to attenuation
- Amplification distorts analog signal because noise is also amplified
CS 428/528 Computer Networks
25
Sender signal weakened and distorted
- ver distance
Receiver signal amplified, including the distortion
Amplifier
Digital Signal/Transmission
- (ideally) Sequence of discrete values
- Can be used to transmit analog/digital data
- Repeaters are used to restore signal periodically
- Repeaters do not disturb the signal (and data)
- Digital transmission is the future
CS 428/528 Computer Networks
26
Repeater
Sender 0,1 signals weakened and distorted
- ver distance
Receiver 0,1 signals reproduced with full strength
Encoding: Digital Data, Digital Signals
- Data Rate: number of bits/bytes transmitted per second – D
▫ Bit duration = 1/D
- Modulation rate (bauds): the rate at which the signal is changed,
i.e., signal elements per second – M ▫ What is the relationship between D and M?
- Encoding: mapping from data bits to signal elements
▫ NRZ, NRZI, Manchester, Differential Manchester, Delay Modulation, etc.
CS 428/528 Computer Networks
27
Non-return to Zero (NRZ) Encoding
- a positive voltage represents 1; a negative 0
- easy to implement
- efficient use of bandwidth (modulation rate equals data rate in
worst cases)
- Problem: no synchronization available from signal
▫ Consider sending 1,000 consecutive 0s or 1s
CS 428/528 Computer Networks
28 1 1 1 1 1 1
Non-return to Zero Inverted
- Non-return to zero inverted on ones
- Constant voltage pulse for duration of bit
- Data encoded as presence or absence of signal transition
at beginning of bit time
- Transition (low to high or high to low) denotes a binary 1
- No transition denotes binary 0
- An example of differential encoding
- Good for 1’s, bad for 0’s
CS 428/528 Computer Networks
29 1 1 1 1 1 1
Manchester Encoding
- In the middle of a bit period, a downward transition represents 1; an
upward represents 0
- At least one transition per bit
▫ Self-clocking/synchronization; error detection
- Problem: bit rate is half the baud rate
CS 428/528 Computer Networks
30 1 1 1 1 1
Combined Example
CS 428/528 Computer Networks
31
4B/5B Encoding
- Addresses the inefficiency of Manchester encoding without having
extended durations of high or low signals ▫ Insert extra bits into the bit stream to break up long sequences of 0s or 1s.
- 4 bits of data encoded into 5 bits.
- No more than 3 consecutive zeros sent.
- 5 bit codes are sent using NRZI
▫ consecutive 0s or 1s is not a problem
- Used in 100BASE-TX standard
CS 428/528 Computer Networks
32
4B/5B Codes
CS 428/528 Computer Networks
33
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
These 5 bit words are pre-determined in a dictionary and they are chosen to ensure that there will be at least two transitions per block of bits Original bits Original bits Output bits Output bits
4B/5B Pulse Illustration
CS 428/528 Computer Networks
34 1 1 1 1 1 1 1 1 1 NRZI for
- riginal
data in 4B view NRZI for converted bits in 5B view