1 mobile and wireless networks summer 2005 wichita state university computer science chin-chih chang...
Post on 15-Jan-2016
214 views
TRANSCRIPT
1
Mobile and Wireless Networks
Summer 2005
Wichita State University
Computer Science
Chin-Chih Chang
http://www.cs.wichita.edu/~chang
2
Overview of the Course Lecture
• Introduction (06/06, 06/07, 06/08)
• Wireless LANS and PANS (06/09, 06/10, 06/13)
• Wireless WANS AND MANS (06/14, 06/15, 06/16)
• Wireless Internet (06/17, 06/20, 06/21)
• Ad Hoc Wireless Networks (06/22, 06/23, 06/24)
• MAC Protocols for Ad Hoc Wireless Networks (07/06, 07/07, 07/08)
• Transport Layer and Security Protocols for Ad Hoc Wireless Networks (07/11, 07/12, 07/13)
• Hybrid Wireless Networks (07/14, 07/15, 07/18)
• Recent Advances in Wireless Networks (07/19, 07/20, 07/21)
Lab• J2ME
• Mobile Web Service
3
Chapter 1: Introduction
Fundamentals Electromagnetic spectrum Radio propagation
mechanisms Characteristics of the wireless
channel Modulation techniques Multiple access techniques
Voice coding Error control Computer networks IEEE 802 Networking
Standard Wireless networks and book
overview
4
Fundamentals
A computer network is an interconnected collection of autonomous computers.
Networking Goals:• Resource sharing - e.g., shared printer, shared files.
• Increased reliability - e.g., one failure does not cause system failure.
• Economics - e.g., better price/performance ratio.
• Communication - e.g., e-mail.
Mobile communication Two aspects of mobility:
• User mobility: users communicate (wireless) “anytime, anywhere, with anyone”
• Device portability: devices can be connected anytime, anywhere to the network
Wireless vs. mobile Examples stationary (wired and fixed) computer notebook in a hotel wireless LANs in historic buildings Personal Digital Assistant (PDA)
The demand for mobile communication creates the need for integration of wireless networks into existing fixed networks:• Local area networks: standardization of IEEE 802.11,
ETSI (European Telecommunications Standards Institute) (HIPERLAN - combined technology for broadband cellular short-range communications and wireless Local Area Networks (LANs) )
• Internet: Mobile IP extension of the Internet Protocol IP• Wide area networks: e.g., internetworking of GSM and ISDN
6
The Electromagnetic Spectrum
The electromagnetic spectrum and its uses for communication.
7
Electromagnetic spectrum
ELF = Extremely Low Frequency (30 ~ 300 Hz) UHF = Ultra High Frequency (300 MHz ~ 3GHz)VF = Voice Frequency (300 ~ 3000 Hz) SHF = Super High Frequency (3 ~ 30 GHz)VLF = Very Low Frequency (3 ~ 30 KHz) EHF = Extremely High Frequency (30 ~
300GHz)LF = Low Frequency (30 ~ 300 KHz) Infrared (300 GHz ~ 400 THz)MF = Medium Frequency (300 ~ 3000 KHz) Visible Light (400 THz ~ 900 THz)HF = High Frequency (3 ~ 30 MHz) UV = Ultraviolet Light (900 THz ~ 1016 Hz)VHF = Very High Frequency (30 ~ 3000 MHz) X-ray (1016 ~ 1022 Hz)
Gamma ray (1022 Hz ~)
Frequency and wave length: = c/f wave length , speed of light c 3x108m/s, frequency f
1 Mm300 Hz
10 km30 kHz
100 m3 MHz
1 m300 MHz
10 mm30 GHz
100 m3 THz
1 m300 THz
visible lightVLF LF MF HF VHF UHF SHF EHF infrared UV
optical transmissioncoax cabletwisted pair
ELF VF
8
The Electromagnetic spectrum is used for information transmission by modulating the amplitude, frequency, or phase of the waves.
VLF, LF, and MF are called as ground waves. • Transmission range up to a hundred kilometers
• Used for AM radio broadcasting
HF and VHF• The sky wave may get reflected several times between the Earth and the
ionosphere.
• Used by amateur ham radio operators and for military communication.
VHF-/UHF-ranges for mobile radio• simple, small antenna for cars
• deterministic propagation characteristics, reliable connections
Electromagnetic spectrum
9
Radio Transmission
(a) In the VLF, LF, and MF bands, radio waves follow the curvature of the earth.
(b) In the HF band, they bounce off the ionosphere.
10
SHF and higher for directed radio links, satellite communication• small antenna, focusing• Microwave transmissions travel in straight lines. • High signal-to-noise ratio (SNR)• Line-of-sight alignment is required.• large bandwidth available
Wireless LANs use frequencies in UHF to SHF spectrum• some systems planned up to EHF• limitations due to absorption by water and oxygen molecules (resonance
frequencies)– weather dependent fading, signal loss caused by heavy rainfall etc.
Infrared waves and waves in the EHF band are used for short-range communication.• Widely used in television, VCR, stereo remote controls
Visible light• Used in the optical fiber• Laser can be used to connect LANs on two buildings but can travel limited
distance and cannot penetrate through rain or thick fog.
Electromagnetic spectrum
11
Spectrum allocation methods:
• Comparative binding (beauty contest) requires each carrier to explain why its proposal serves the public interest best.
• Lottery system
• Auction The other option of allocating frequencies is not to allocate them. ITU (International Union Radiocommunication) has designated
ISM (industrial, scientific, medical) bands as open bands:
• Frequencies are not allocated but restrained in a short range.
• These bands usually used by wireless LANs and PANs are around the 2.4 GHz band.
• Parts of the 900 MHz and 5 GHz bands are also available for unlicensed usage.
Spectrum Allocation
12
Spectrum Allocation
ITU-R holds auctions for new frequencies, manages frequency bands worldwide (WRC, World Radio Conferences)
Europe USA Japan
Cellular Phones
GSM 450-457, 479-486/460-467,489-496, 890-915/935-960, 1710-1785/1805-1880 UMTS (FDD) 1920-1980, 2110-2190 UMTS (TDD) 1900-1920, 2020-2025
AMPS, TDMA, CDMA 824-849, 869-894 TDMA, CDMA, GSM 1850-1910, 1930-1990
PDC 810-826, 940-956, 1429-1465, 1477-1513
Cordless Phones
CT1+ 885-887, 930-932 CT2 864-868 DECT 1880-1900
PACS 1850-1910, 1930-1990 PACS-UB 1910-1930
PHS 1895-1918 JCT 254-380
Wireless LANs
IEEE 802.11 2400-2483 HIPERLAN 2 5150-5350, 5470-5725
902-928 IEEE 802.11 2400-2483 5150-5350, 5725-5825
IEEE 802.11 2471-2497 5150-5250
Others RF-Control 27, 128, 418, 433, 868
RF-Control 315, 915
RF-Control 426, 868
13
Signals physical representation of data function of time and location signal parameters: parameters representing the value of data classification
• continuous time/discrete time
• continuous values/discrete values
• analog signal = continuous time and continuous values
• digital signal = discrete time and discrete values signal parameters of periodic signals:
period T, frequency f=1/T, amplitude A, phase shift • sine wave as special periodic signal for a carrier:
s(t) = At sin(2 ft t + t)
14
Fourier representation of periodic signals
)2cos()2sin(2
1)(
11
nftbnftactgn
nn
n
1
0
1
0
t t
ideal periodic signal real composition(based on harmonics)
Periodic signals can be represented by Fourier series.
15
Different representations of signals
• amplitude (amplitude domain)
• frequency spectrum (frequency domain)
• phase state diagram (amplitude M and phase in polar coordinates) Composed (multiple frequencies) signals transferred into frequency domain
using Fourier transformation Digital signals need
• infinite frequencies for perfect transmission (Fourier equation)
• modulation with a carrier frequency for transmission (analog signal!)
Signals
f [Hz]
A [V]
I= M cos
Q = M sin
A [V]
t[s]
16
Radiation and reception of electromagnetic waves, coupling of wires to space for radio transmission
Isotropic radiator: equal radiation in all directions (three dimensional) - only a theoretical reference antenna
Real antennas always have directive effects (vertically and/or horizontally)
Radiation pattern: measurement of radiation around an antenna
Antennas: isotropic radiator
zy
x
z
y x idealisotropicradiator
17
Antennas: simple dipoles Real antennas are not isotropic radiators but, e.g., dipoles with lengths /4 on
car roofs or /2 as Hertzian dipole shape of antenna proportional to wavelength
Example: Radiation pattern of a simple Hertzian dipole Gain: maximum power in the direction of the main lobe compared to the
power of an isotropic radiator (with the same average power)
side view (xy-plane)
x
y
side view (yz-plane)
z
y
top view (xz-plane)
x
z
simpledipole
/4 /2
18
Antennas: directed and sectorized
side view (xy-plane)
x
y
side view (yz-plane)
z
y
top view (xz-plane)
x
z
top view, 3 sector
x
z
top view, 6 sector
x
z
Often used for microwave connections or base stations for mobile phones (e.g., radio coverage of a valley)
directedantenna
sectorizedantenna
19
Antennas: diversity Grouping of 2 or more antennas: multi-element antenna arrays
Antenna diversity
• switched diversity, selection diversity
• receiver chooses antenna with largest output
• diversity combining
• combine output power to produce gain
• cophasing needed to avoid cancellation
+
/4/2/4
ground plane
/2/2
+
/2
20
Signal propagation ranges
distance
sender
transmission
detection
interference
Transmission range• communication possible• low error rate
Detection range• detection of the signal
possible• no communication
possible Interference range
• signal may not be detected
• signal adds to the background noise
21
Radio propagation Radio waves can be propagated and receiving power is influenced
in different ways:• Direct transmission (path loss, fading dependent on frequency)• Reflection at large obstacles• Refraction through different media• Scattering at small obstacles• Diffraction at edges• shadowing
Propagation in free space is always like light (straight line). Receiving power proportional to 1/d² (d = distance between sender
and receiver)
reflection scattering diffractionshadowing refraction
22
Radio propagation - example
23
Path loss: the ratio of the power of the transmitted signal to the power of the same signal received by the receiver.• Free space model: Assume there is only a direct-path between the
transmitter and the receiver.
• Two-way model: Assume there is a light-of-sight path and the other path through reflection, refraction, or scattering between the transmitter and the receiver
• Isotropic antennas (in which the power of the transmitted signal is the same in all direction): The receiving power varies inversely to the distance of power of 2 to 5.
Fading: fluctuations in signal strength when received at the receiver.• Fast fading/small-scale fading: rapid fluctuations in the amplitude, phase, or
multipath delays.
• Slow fading/large-scale fading (shadow fading): objects that absorb the transmissions lie between the transmitter and receiver.
Characteristics of the Wireless Channel
24
Measures used for countering the effects of fading are diversity and adaptive modulation.• Diversity modulation:
• Time diversity: spread the data over time.
• Frequency diversity: spread the transmission over frequencies. Example: the direct sequence spread spectrum and the frequency hopping spread spectrum.
• Space diversity: use different physical transmission paths. An antenna array could be used.
• Adaptive modulation: the transmitter adjusts the transmission based on the feedback from the receiver.
• Complex to implement
Characteristics of the Wireless Channel
25
Interference• Adjacent channel interference: interfered by signals in nearby frequencies.
Solved by the guard bands.• Co-channel interference: narrow-band interference due to other systems
using the same frequency. Solved by multiuser detection machenisms, directional antennas, and dynamic channel allocation methods.
• Inter-symbol interference: distortion in the received signal caused by the temporal spreading and the consequent (neighbor) overlapping of individual pulses in the signal. Solved by adaptive equalization that involves mechanisms for gathering the dispersed symbol energy into its original time interval.
Doppler Shift• The change/shift in the frequency of the received signal when the
transmitter and the receiver are mobile to each other.• Moving towards each other, the frequency will be higher; two moving away,
the frequency will be lower.
Characteristics of the Wireless Channel
26
Signal can take many different paths between sender and receiver due to reflection, scattering, diffraction.
Time dispersion: signal is dispersed over time
interference with “neighbor” symbols, Inter Symbol Interference (ISI)
The signal reaches a receiver directly and phase shifted
distorted signal depending on the phases of the different parts
Multipath propagation
signal at sendersignal at receiver
LOS pulsesmultipathpulses
27
Transmission Rate Constraints• The number of times of signal changes is called the baud rate. Bit rate =
baud rate x bits per signal• Nyquist’s Theorem for noiseless channel:
• If the signal has L discrete levels over a transmission medium of bandwidth B , the maximum data rate C = 2B log2 L bits/sec
• Example: a noiseless 3-kHz channel cannot transmit binary signals at a rate exceeding 6000 bps (= 2 x 3000 log2 2).
• Shannon’s Theorem for noisy Channel• maximum data rate C = B log2 (1 + S/N) bits/sec B: bandwdith, S: signal
power, N: noise power• S/N (Signal-to-noise ratio, SNR), usually measured as 10 log10S/N in db
= decibels, is called thermal noise ratio.• Example: SNR = 20 db, 2 KHz bandwidth. The maximum data rate is
2000 x log2 (1 + 100) = 9230.241 bps
Characteristics of the Wireless Channel
28
Modulation Techniques Analog modulation
• Used for transmitting analog data.• shifts center frequency of baseband signal up to the radio carrier
• Analog modulation techniques• Amplitude Modulation (AM): Not efficient. Example: Broadcast radio • Frequency Modulation (FM): Example: Broadcast radio • Phase Modulation (PM)
Digital modulation• digital data (0 and 1) is translated into an analog signal (baseband)• Required if digital data has to be transmitted over a media that only allows
for analog transmission - old analog telephone system and wireless networks
Analog modulation techniques• Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), Phase
Shift Keying (PSK) • differences in spectral efficiency, power efficiency, robustness
29
Modulation Techniques An example of amplitude
modulation (AM):
• The top diagram shows the modulating signal superimposed on the carrier wave.
• The bottom diagram shows the resulting amplitude-modulated signal. Notice how the peaks of the modulated output follow the contour of the original, modulating signal.
30
Modulation Techniques An example of frequency
modulation (FM).
• The top diagram shows the modulating signal superimposed on the carrier wave.
• The bottom diagram shows the resulting frequency-modulated signal.
31
Modulation and demodulation
synchronizationdecision
digitaldataanalog
demodulation
radiocarrier
analogbasebandsignal
101101001 radio receiver
digitalmodulation
digitaldata analog
modulation
radiocarrier
analogbasebandsignal
101101001 radio transmitter
32
Digital modulation
Modulation of digital signals known as Shift Keying
Amplitude Shift Keying (ASK):
• very simple
• low bandwidth requirements
• very susceptible to interference Frequency Shift Keying (FSK):
• needs larger bandwidth
• Binary FSK (BFSK): 1 is represented by fc + k and 0 by fc – k.
Phase Shift Keying (PSK):
• more complex
• robust against interference
1 0 1
t
1 0 1
t
1 0 1
t
33
Advanced Frequency Shift Keying bandwidth needed for FSK depends on the distance between the
carrier frequencies special pre-computation avoids sudden phase shifts
MSK (Minimum Shift Keying) bit separated into even and odd bits, the duration of each bit is
doubled depending on the bit values (even, odd) the higher or lower
frequency, original or inverted is chosen the frequency of one carrier is twice the frequency of the other even higher bandwidth efficiency using a Gaussian low-pass
filter filtering out the unwanted signals GMSK (Gaussian MSK), used in GSM
34
Example of MSK
data
even bits
odd bits
1 1 1 1 000
t
low frequency
highfrequency
MSKsignal
bit
even 0 1 0 1
odd 0 0 1 1
signal h l l hvalue - - + +
h: high frequencyn: low frequency+: original signal-: inverted signal
No phase shifts!
35
Advanced Phase Shift Keying BPSK (Binary Phase Shift Keying):
• bit value 0: sine wave
• bit value 1: inverted sine wave
• very simple PSK
• low spectral efficiency
• robust, used e.g. in satellite systems QPSK (Quadrature Phase Shift Keying):
• 2 bits coded as one symbol
• symbol determines shift of sine wave
• needs less bandwidth compared to BPSK
• more complex Often also transmission of relative, not
absolute phase shift: DQPSK - Differential QPSK (IS-136, PHS)
11 10 00 01
Q
I01
Q
I
11
01
10
00
A
t
36
Advanced Phase Shift Keying Quadrature Amplitude Modulation (QAM): combines
amplitude and phase modulation• it is possible to code n bits using one symbol
• 2n discrete levels, n=2 identical to QPSK
• bit error rate increases with n, but less errors compared to comparable PSK schemes
Example: 16-QAM (4 bits = 1 symbol)Symbols 0011 and 0001 have the same phase φ,
but different amplitude a. 0000 and 1000 have
different phase, but same amplitude.
used in standard 9600 bit/s modems 0000
0001
0011
1000
Q
I
0010
φ
a
37
Multiplexing in 4 dimensions• frequency (f)
• time (t)
• code (c)
• space (si)
Goal: multiple use of a shared medium
Important: guard spaces needed!
s2
s3
s1
Multiple Access Techniques
f
t
c
k2 k3 k4 k5 k6k1
f
t
c
f
t
c
channels ki
38
Frequency Multiplexing Separation of the whole spectrum into smaller frequency bands A channel gets a certain band of the spectrum for the whole time Advantages:
• no dynamic coordination necessary
• works also for analog signals
Disadvantages:• waste of bandwidth
if the traffic is distributed unevenly
• inflexible
• guard spaces
k2 k3 k4 k5 k6k1
f
t
c
39
f
t
c
k2 k3 k4 k5 k6k1
Time Multiplexing A channel gets the whole spectrum for a certain amount of time
Advantages:• only one carrier in the
medium at any time
• throughput high even for many users
Disadvantages:• precise
synchronization necessary
40
f
Time and Frequency Multiplexing Combination of both methods A channel gets a certain frequency band for a certain amount of
time Example: GSM Advantages:
• better protection against tapping
• protection against frequency selective interference
• higher data rates compared
to code multiplex but: precise coordination
requiredt
c
k2 k3 k4 k5 k6k1
41
Code Multiplexing Each channel has a unique code
All channels use the same spectrum at the same time
Advantages:• bandwidth efficient
• no coordination and synchronization necessary
• good protection against interference and tapping
Disadvantages:• lower user data rates
• more complex signal regeneration
Implemented using spread spectrum technology
k2 k3 k4 k5 k6k1
f
t
c
42
FHSS (Frequency Hopping Spread Spectrum)
Frequency Hopping Spread Spectrum (FHSS) is a transmission technology used in wireless transmissions where the data signal is modulated with a narrowband carrier signal that "hops" in a random but predictable sequence from frequency to frequency as a function of time over a wide band of frequencies.
Discrete changes of carrier frequency• The total bandwidth is split into many channels of smaller bandwidth.
Transmitter and receiver stay on one of these channels for a certain time and hop to another channel.
• This system implements FDM and TDM.• The pattern of channel usage is called the hopping sequence, the time spent
on a channel with a certain frequency is called the dwell time.• sequence of frequency changes determined via pseudo random number
sequence
43
FHSS (Frequency Hopping Spread Spectrum)
Two versions• Fast Hopping: several frequencies per user bit• Slow Hopping: several user bits per frequency (not immune to narrowband
interference) Advantages
• frequency selective fading and interference limited to short period• simple implementation• uses only small portion of spectrum at any time
Disadvantages• not as robust as DSSS• simpler to detect
44
FHSS (Frequency Hopping Spread Spectrum)
user data
slowhopping(3 bits/hop)
fasthopping(3 hops/bit)
0 1
tb
0 1 1 t
f
f1
f2
f3
t
td
f
f1
f2
f3
t
td
tb: bit period td: dwell time
45
FHSS (Frequency Hopping Spread Spectrum)
modulatoruser data
hoppingsequence
modulator
narrowbandsignal
spreadtransmitsignal
transmitter
receivedsignal
receiver
demodulatordata
frequencysynthesizer
hoppingsequence
demodulator
frequencysynthesizer
narrowbandsignal
46
DSSS (Direct Sequence Spread Spectrum) Direct Sequence Spread Spectrum (DSSS) is a transmission technology used
in wireless transmissions where a data signal at the sending station is combined with a higher data rate bit sequence, or chipping code. The chipping code which increases the signal's resistance to interference.
XOR of the signal with pseudo-random number (chipping sequence)• many chips per bit (e.g., 128) result in higher bandwidth of the signal
Advantages• reduces frequency selective
fading• in cellular networks
• base stations can use the same frequency range
• several base stations can detect and recover the signal
• soft handover Disadvantages
• precise power control necessary (synchronization)
user data
chipping sequence
resultingsignal
0 1
0 1 1 0 1 0 1 01 0 0 1 11
XOR
0 1 1 0 0 1 0 11 0 1 0 01
=
tb
tc
tb: bit periodtc: chip period
47
DSSS (Direct Sequence Spread Spectrum)
Xuser data
chippingsequence
modulator
radiocarrier
spreadspectrumsignal
transmitsignal
transmitter
demodulator
receivedsignal
radiocarrier
X
chippingsequence
lowpassfilteredsignal
receiver
integrator
products
decisiondata
sampledsums
correlator
48
Space Division Multiple Access Space division multiple access (SDMA) uses directional
transmitters/antennas to cover angular regions. Different areas/regions can be served using the same frequency
channel. This method is suited to• Satellite system: a narrowly focused beam to prevent the signal from
spreading too widely.
• Cellular phone system: base station covers a certain transmission area (cell). Mobile devices communicate only via the base station
49
Comparison SDMA/TDMA/FDMA/CDMA
Approach SDMA TDMA FDMA CDMAIdea segment space into
cells/sectorssegment sendingtime into disjointtime-slots, demanddriven or fixedpatterns
segment thefrequency band intodisjoint sub-bands
spread the spectrumusing orthogonal codes
Terminals only one terminal canbe active in onecell/one sector
all terminals areactive for shortperiods of time onthe same frequency
every terminal has itsown frequency,uninterrupted
all terminals can be activeat the same place at thesame moment,uninterrupted
Signalseparation
cell structure, directedantennas
synchronization inthe time domain
filtering in thefrequency domain
code plus specialreceivers
Advantages very simple, increasescapacity per km²
established, fullydigital, flexible
simple, established,robust
flexible, less frequencyplanning needed, softhandover
Dis-advantages
inflexible, antennastypically fixed
guard spaceneeded (multipathpropagation),synchronizationdifficult
inflexible,frequencies are ascarce resource
complex receivers, needsmore complicated powercontrol for senders
Comment only in combinationwith TDMA, FDMA orCDMA useful
standard in fixednetworks, togetherwith FDMA/SDMAused in manymobile networks
typically combinedwith TDMA(frequency hoppingpatterns) and SDMA(frequency reuse)
still faces some problems,higher complexity,lowered expectations; willbe integrated withTDMA/FDMA
50
The voice coding process converts the analog signal into its equivalent digital representation without any noticeable distortion.
The devices that perform the analog to digital conversion (at the sender) and the reverse digital to analog signal conversion (at the receiver) are known as codecs (coder/decoder).
The Pulse position modulation (PPM) is a technique used for converting an analog signal into its digital representation. • The position of a pulse relative to its unmodulated time of occurrence is
varied in accordance with the message signal.• Disadvantage: Perfect synchronization is required.
Pulse Code Modulation (PCM) is a technique of converting an analog signal to a digital signal. • The audio signal is converted in samples according to the frequency of the
signal. • Every sample is then written in the stream without using any compression
techniques.
Voice Coding
51
PCM consists of three stages: sampling of the analog signal, quantization, and binary encoding.• Sampling
• The codec converts the analog speech signal to its digital representation by sampling the signal at regular intervals of time.
• The series of pulses produced after sampling the analogy signal is known as pulse amplitude modulation (PAM) pluses whose amplitudes are proportional to that of the original signal.
• Quantization: A fixed number of amplitude laves are used to represent the amplitudes of the PAM pulses. The distortion could occur. It is called quantization.
• Binary encoding: The sequence of quantized PAM pulses are represented by bit streams.
PCM are not suitable for wireless networks because of limited bandwidth.
Vocoders are devices that makes use of knowledge (distinct features/characteristics) of the actual structure and operation of human speech production organs. Only those characteristics are encoded, transmitted, and decoded so that it can achieve voice transfer at low bit rates.
Voice Coding
52
Error Control Error-correcting codes/forward error correction
• include enough redundant information to enable the receiver to deduce the correct transmitted data.
• Used in unreliable channel such as wireless links Error-detecting codes
• include only enough redundancy to allow the receiver to request a retransmission.
• Used in reliable channel such as fiber
N-bit codeword = m-bit data + r-bit check The number of bit positions in which two codewords differ is
called the Hamming distance. Example: Hamming distance is 3.
10001001
xor 10110001
00111000 3 bit difference
53
Error Control
If two codewords are a Hamming distance d apart, it will require d single-bit errors to convert one into the other.
To detect d errors, we need a distance d+1 code (because there is no way to convert a valid codeword into another valid codeword with d changes. The detail needs mathematical analysis).
Example: A simple error - detection code: (check bit) A parity bit is chosen so that the number of 1 bits in the
codeword is even or odd. 000(0) - check bit 001 1 010 1 That is Hamming distance of parity bit code is 2 = d + 1 can
detect d = 1 error
54
Error Control - Error Correction Codes
To correct d errors, we need a distance 2d+1 code. (because d changes is not enough to recover the original valid codeword but only to convert to other valid codeword The detail needs mathematical analysis).
Examples: Consider a code with four valid codewords:• 0000000000, 0000011111, 1111100000, 1111111111• Hamming distance is 5. It can correct double errors.
• If 0000000111 is received, the receiver knows the original
• is 00000011111. But if a triple errors change 0000000000
• to 0000000111, the error will not be corrected properly.
Correct round off to the nearest codeword.
55
Error Control m data bits 2m legal messages = codewords Examples: Consider a code with four valid codewords:
• 000000, 000111, 111000, 111111 differ by 3
• 011000, 101000, 110000, 111001, 111010, and 111100 are six invalid code words a distance 1 from 111000.
each valid codeword has n invalid codewords within hamming distance 1. To correct these n invalid codewords with 1 bit error, n + 1 bit patterns are required.
• Since there are a total of 2n bit patterns
(n + 1) x 2m ≤ 2n (m + r + 1) x 2m ≤ 2m+r m + r + 1 ≤ 2r
• Given m, this puts a lower limit on the number of check bits needed to correct 1 error.
m = 7 7 + r + 1 ≤ 2r, 8 ≤ 2r - r r = 4
56
Hamming Codes
Bits are numbered from the left. Checkbits are bits numbered powers of 2. {1,2,4,8, ...}. Each check bit forces the parity of some collection of bits, including itself, to be even or odd.
To see which check bits the data in position k contributes to, write k as a sum of powers of 2.
Data bits 3 5 6 7 9 10 11
Check bits 1 + 2 1 + 4 2 + 4 1 + 2 + 4 1 + 8 2 + 8 1 + 2 + 8
Check bits 1 2 4 8
Data bits 3 + 5 + 7 + 9 + 11 3 + 6 + 7 + 10 + 11 5 + 6 + 7 9 + 10 + 11
57
Constructing Hamming Codes
Consider an ASCII code H (1001000). Use even parity:
H 1001000 _ _ 1 _ 001 _ 000
Bit Calculation Result
1 (1 + 0 + 1 + 0 + 0) mod 2 = 0 0
2 (1 + 0 + 1 + 0 + 0) mod 2 = 0 0
4 (0 + 0 + 1) mod 2 = 1 1
8 (0 + 0 + 0 mod 2 = 0 0
The codeword is 00110010000.
58
Error Control - Hamming Codes When a codeword arrives, counter = 0.
If a check bit k does not have the correct parity, it adds k to the counter.
Supposed there is only one bit error.
If counter = 0 no error
If counter = 11 bit 11 in error.
ASCII codeword
H 1001000 0 0 1 1 001 0 000
G 1100001 1 0 1 1 100 1 001
If G is received as (0) 0 1 1 100 1 001, 1st bit is incorrect.
If G is received as (1)(0){0} 1 100 1 001
1st and 2nd has errors. 3rd bit is incorrect.
59
Error Control - Cyclic Redundancy Check A major goal in designing error detection algorithms is to maximize the
probability of detecting errors using only a small number of redundant bits. In general, correcting is more expensive than detecting and re-transmitting. Add k bits of redundant data to an n-bit message
• want to use k << n to detect errors
• e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree polynomial
• e.g., MSG=10011010 as M(x) = x7 + x4 + x3 + x1
Let k be the degree of some divisor/generator polynomial
• e.g., G(x) = x3 + x2 + 1 Polynomial arithmetic is performed modulo 2.
10011011
11001010
01010001 EX-OR result. Sender & receiver agree upon a generator polynomial G(x).
60
Cyclic Redundancy Check Algorithm for computing the checksum
1. shift left r bits (append r zero bits to low order end of the frame), i.e., M(x)xr
2. divide the bit string corresponding to G(x) into (xr)M(x).3. subtract (or add) remainder of M(x)xr / G(x) from M(x)xr
using XOR, call the result T(x). Transmit T(x). Suppose that a transmission error E(x) has occured and T(x)
+E(x) arrives instead of T(x). Received polynomial T(x) + E(x) = (T(x)+E(x))/G(x) = T(x)/G(x) + E(x)/G(x) = E(x)/G(x)• E(x) = 0 implies no errors
Divide (T(x) + E(x)) by G(x); remainder zero if:• E(x) was zero (no error), or• E(x) is exactly divisible by C(x)
61
CRC ExampleM(x)=1101011011
C(x)=10011
k=4
P(x) = 1101011011 1110
1100001010 -------------- 10011 /11010110110000 10011 ----- 10011 10011 ----- 10110 10011 ----- 10100 10011 ----- 1110
62
Selecting G(x)
Selecting G(x)• All single-bit errors, as long as the xk and x0 terms have non-zero
coefficients.• All double-bit errors, as long as G(x) contains a factor with at least three
terms• Any odd number of errors, as long as G(x) contains the factor (x + 1)• Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the
length of the burst is less than k bits.• Most burst errors of larger than k bits can also be detected
International standards for G(x): CRC-12 = x12+x11+x3+x2+x1+1 CRC-16 = x16+x15+x2+1 16 bit check sum. catches all single, double,odd errors. catches all burst errors of length < 16 A simple shift register circuit can be constructed to compute and
verify the checksums in hardware.
63
Convolution Coding• Used for long bit streams in noisy channels.
• Two mechanisms: Sequential decoding and viterbi decoding
Turbo codes are a class of recently-developed high-performance error correction codes finding use in deep-space satellite communications and other applications where designers seek to achieve maximal information transfer over a limited-bandwidth communication link in the presence of data-corrupting noise.
Error Control
64
Computer Networks
Internetworks• Different networks are connected by means of machines called
gateways.
• A collection of interconnected networks is called an internetwork or internet.
• A common form of internet is a collection of LANs connected by a WAN.
Network Software• Protocol Hierarchies
• Design Issues for the Layers
• Connection-Oriented and Connectionless Services
• Service Primitives
• The Relationship of Services to Protocols
65
Protocol Hierarchies Protocol Hierarchies
• The reduce design complexity, most networks are organized as a stack of layers or levels.
• A protocol is an agreement between the communication parties.• The entities comprising the corresponding layers on different machines are
called peers.• The physical medium is the place through which actual communication
occurs.• Between each pair of adjacent layers is an interface. It defines which
primitive operations and services the lower layer makes available to the upper one.
Network Architecture• A network architecture is a set of layers and protocols used to reduce
network design complexity.• A protocol stack is a list of protocols used by a certain system, one protocol
per layer.
66
Network SoftwareProtocol Hierarchies
Layers, protocols, and interfaces.
67
Protocol Hierarchies
The philosopher-translator-secretary architecture.
68
Protocol Hierarchies
Example information flow supporting virtual communication in layer 5.
69
Design Issues for the Layers
Addressing: a specific destination needs to be specified.
Error Control: errors need to be detected and corrected. Flow Control: A fast sender is kept from swamping a
slow receiver with data. Multiplexing: the same connection is used for
multiple, unrelated conversations. Routing: a route must be chosen for a packet to
transmit.
70
Connection-Oriented and Connectionless Services
Connection-oriented: connection needs to be established before communication: telephone
Connectionless (datagram): connection needs not to be established before communication: postal system
Each service can be characterized by a Quality of Service (QoS).
Request-reply: the sender transmits a request; the reply contains the answer.
Reliable communication is communication where messages are guaranteed to reach their destination complete and uncorrupted and in the order they were sent.
Why is unreliable communication used?• Reliable communication is not available.• The delay in a reliable service might not be acceptable such
as real-time applications.
71
Connection-Oriented and Connectionless Services
Six different types of service.
72
Service Primitives
Five service primitives for implementing a simple connection-oriented service.
A service is specified by a set of primitives (operations) available to a user process to access the service.
73
Service Primitives
Packets sent in a simple client-server interaction on a connection-oriented network.
74
Services to Protocols Relationship
The relationship between a service and a protocol.
• Services relate to the interfaces between layers. Protocol relate to the packets sent between peer entities.
75
Reference Models
The OSI Reference Model The TCP/IP Reference Model A Comparison of OSI and TCP/IP A Critique of the OSI Model and Protocols A Critique of the TCP/IP Reference Model The OSI (Open Systems Interconnection) 7-Layer
Reference Model [ISO,1984] is a guide that specifies what each layer should do, but not how each layer is implemented.
The TCP/IP Reference Model is not of much use but the protocols associated with it are widely used.
76
Reference Model• OSI Reference Model
1. Physical Layer - transmission of raw bits over a physical channel.
2. Data Link Layer - provide an error-free point-to-point link to transmit data and control frames (sequencing frames, retransmission) between two directly connected nodes.
3. Network Layer - provide a point-to-point link between any two switching nodes (routing, congestion control).
4. Transport Layer - provide a link between any two processes in two hosts (connection-oriented or connectionless).
5. Session Layer - manage conversation between two peer session entities.
6. Presentation Layer - present data in a meaningful format (compress, encode, and convert data).
7. Application Layer - a variety of user applications (e-mail, ftp, etc.).
77
Application
Presentation
Session
Transport
End host
One or more nodes
Network
Data link
Physical
Network
Data link
Physical
Network
Data link
Physical
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
within the network
ISO 7-Layer Reference Model
Unreliable transmission (tx) of raw bits
Reliable transmission (tx) of frames
Unreliable end-to-end tx of packets
Reliable, end-to-end byte stream (TCP)
Provide session semantics (RPC)
Present data in a meaningful format
Various applications (FTP,HTTP,…)
78
Reference Models
The OSI reference model.
79
TCP/IP Reference Model
TCP/IP Reference Model• The internet layer defines an official packet format and
protocol called IP (Internet Protocol) and specifies how IP packets are routed from the source to the destination.
• The transport layer is designed to allow peer entities to talk.• TCP (Transmission Control Protocol) is a reliable
connection-oriented protocol that allows a byte stream to be delivered.
• UDP (User Datagram Protocol) is an unreliable, connectionless protocol for applications.
• The application layer contains all the higher-level protocols.• The host-to-network layer points out that the host has to
connect to the network.
80
Reference Models
The TCP/IP reference model.
81
Reference Models
Protocols and networks in the TCP/IP model initially.
82
Connection-Oriented Networks
The X.25 protocol, adopted as a standard by the Consultative Committee for International Telegraph and Telephone (CCITT), is a connection-oriented network protocol.
Frame relay is connection-oriented network with no error control and no flow control.
ATM (asynchronous transfer mode) is a dedicated-connection switching technology that organizes digital data into 53-byte cell units and transmits them over a physical medium using digital signal technology.
83
ATM Virtual Circuits
A virtual circuit.
An ATM cell.
84
ATM Reference Model
The physical layer deals with the physical medium.• The PMD (Physical Medium Dependent) sublayer interfaces
to the actual cable.• The TC (Transmission Convergence) sublayer converts back
forth a bit stream to a cell stream. The ATM layer deals with cells and cell transport. The ATM adaptation layer deals with segmentation
and re-assembly.• The SAR (Segmentation And Reassembly) sublayer breaks
up packets into cells and put them back.• The CS (Convergence Sublayer) is used to offer different
kind of services to the upper layers.
85
The ATM Reference Model
The ATM reference model.
86
The ATM Reference Model
The ATM layers and sublayers and their functions.
87
Shortcomings of the ATM Reference Model
Each 53-byte cell has a 5-byte header. This constitutes a significant control overhead.
Complex mechanisms are required for ensuring fairness among connections and provisioning quality of service.
Complex packets scheduling is required due to the varying delays.
The high cost and complexity of dvices. Lack of scalability
Ea
88
IEEE 802 Standards
The important ones are marked with *. The ones marked with are hibernating. The one marked with † gave up.
IEEE 802 standards defines the physical and data link layer for LANs.
89
IEEE 802 Standard
The physical layer in a LAN deals with the actual physical transmission medium used for communication.• Some commonly used physical media: twisted pair, coaxial cable, optical
fiber, and radio waves.
In IEEE 802 Logical Link Control (LLC) forms the upper half of the data link layer. Medium access control (MAC) forms the lower sublayer.• error-controlled, flow-controlled
• Adds an LCC header, containing sequence and acknowledgement numbers.
LLC provides three service options:
• Unreliable datagram service
• Acknowledged datagram service
• Reliable connection-oriented service
90
IEEE 802.2: Logical Link Control
(a) Position of LLC. (b) Protocol formats.
91
IEEE 802 Standard
The medium access control sublayer (MAC) • It directly interfaces with the physical layer.
• It provides services such as addressing, framing, and medium access control.
The Pure Aloha Protocol (by Abramson in 1970s) is one of oldest MAC protocol in which a station transmits the data whenever it is available. Then, the station listens to the channel to see if a collision occurred. If the frame was destroyed, the station waits for a random length of time and tries again.
In slotted Aloha (by Roberts in 1972) a computer is not permitted to send whenever a carriage return is typed but wait for a time slot.
92
Carrier Sense Multiple Access (CSMA) Protocols in which stations listen for a carrier and act accordingly
are called carrier sense protocols. 1-persistent CSMA Channel Busy Continue sensing until free and then grab. Channel Idle Transmit with probability 1. Collision Wait for a random length of time and try again. Nonpersisten CSMA: Channel Busy Wait for a random length of time and try again. Channel Idle Transmit. Collision Wait for a random length of time and try again. p-persistent CSMA: Channel Busy Continue sensing until free (same as idle). Channel Idle Transmit with probability p, and defer transmitting until the
next slot with probability q = 1-p. Collision Wait for a random length of time and try again.
93
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various random access protocols.
94
CSMA/CD
Carrier Sense Multiple Access/Collision Detect (CSMA/CD) is a protocol for carrier transmission access in Ethernet networks.
• In CSMA/CD, any device can try to send a frame at any time. Each device senses whether the line is idle and therefore available to be used.
• If it is available, the device begins to transmit its first frame. If another device has tried to send at the same time, a collision is said to occur and the frames are discarded. Each device then waits a random amount of time and retries until successful in getting its transmission sent.
• When there is collision, the station wait some time between 0 to 2n - 1 slotted time at the n's trial. This is called back-off algorithm. Usually, after 16 trials the station gives up.
95
IEEE 802.3 Standard
IEEE 802.3 is standard using Carrier Sense Multiple Access/Collision Detection (CSMA/CD). It is commonly referred to as the Ethernet standard.
IEEE 802.3 supports data transfer rate up to 10 Mbps. Fast Ethernet (IEEE 802.3u) specifies data transfer rate up to 100
Mbps. The 802.3 committee decided to keep 802.3 for the fast Ethernet
(802.3u).• Backward compatible
• A new protocol might have problems.
• Get job done before the technology changed.
Gigabit Ethernet (IEEE 802.3z) specifies data transfer rate up to 1 Gbps.
96
IEEE 802.3 Physical Layer
The most common kinds of Ethernet cabling.
10Base2 means that is operates at 10 Mbps, uses baseband signaling, and support segments up to 200 meters.
10Base-T became dominant due to its use of existing wiring and the ease of maintenance .
97
Fast/Gigabit Ethernet
The original fast Ethernet cabling.
100Base-T4 – 4 twisted pairs achieve 100 Mbps.
Gigabit Ethernet cabling.
98
Ethernet MAC Sublayer Protocol
Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.
Preamble – used for sender and receiver to synchronize their clock.
Addresses• unique, 48-bit unicast address assigned to each adapter
• example: 8:0:e4:b1:2• broadcast: all 1s, the set of all recipient nodes
• Multicast: first bit is 1,a group of recipient nodes
99
Wireless LAN: 802.11 A wireless LAN is one in which a mobile user can connect to a
local area network (LAN) through a wireless (radio) connection. A standard, IEEE 802.11, specifies the technologies for wireless
LANs. It is designed to work in two modes:
• In the presence of a base station: access point• In the absence of a base station: ad hoc networking
Physical Layer• It supports three different physical layers:
• Frequency hopping spread spectrum (FHSS)• Direct sequence spread spectrum (DSSS)• Infrared
• Clear channel assessment (CCA): It provides mechanisms for sensing the wireless channel and determine whether or not it is idle.
MAC Sublayer follows carrier sense multiple access with collision avoidance (CSMA/CA).
100
Wireless LANs
(a) Wireless networking with a base station.(b) Ad hoc networking.
101
IEEE 802.11 Standard The 802.11 task group has the object to develop MAC layer and
physical layer specifications for wireless connectivity. The 802.11a task group created a standard for wireless LAN
operations in the 5 GHz frequency baud, where data rates of up to 54 Mbps are possible.
The 802.11b task group created a standard for wireless LAN operations in the 2.4 GHz Industrial, Scientific, and Medical (ISM) band, which is freely available for use throughout the world.
The 802.11c task group devised standards for bridging operations. The 802.11d task group published the definitions and requirements
for enabling the operation of the 802.11 standard in countries where the 802.11 standard is not adopted yet.
The 802.11e task group defined an extension of the 802.11 standard for quality of service (QoS).
102
IEEE 802.11 Standard The 802.11f developed specifications for implementing access
points and distribution systems. The 802.11g task groups extended the 802.11b standard to support
high-speed transmissions of up to 54 Mbps in the 2.4 GHz frequency.
The 802.11h task groups developed the MAC layer standard that comply with European regulations for 5 GHz wireless LAN.
The 802.11i group is working on mechanisms for enhancing security in the 802.11 standard.
The 802.11j task group is working on mechanisms for enhancing security in the 802.11 MAC physical layer protocols to additionally operate in the newly available Japanese 4.9 GHz and 5 GHz bands.
The 802.11n defines standardized modifications to the 802.11 MAC and physical layers to allows at least 100 Mbps.
103
Wireless Networks Wireless networks are computer networks that use radio frequency
channels as their physical medium for communication. The first wireless radio communication system was invented by
Guglielmo Marconi in 1897. Radio and television broadcasting are common applications of
wireless communications techniques. The wireless communications industry includes cellular telephony,
wireless LANs, and satellite-based communication networks. In cellular networks a fixed based station serving all mobile
phones in its coverage area is called a cell. The first-generation (1G) cellular networks used analogy signal
technology. • They used frequency modulation.• Voice communication• Example: advanced mobile phone system (AMPS)
104
Cellular Systems The second-generation (2G) cellular systems used digital
transmission mechanisms such as TDMA and CDMA.• Voice communication
• Example: global system for mobile communication (GSM) in Europe, IS-136 in States, Personal Digital System (PDS) in Japan.
The present system is called 2.5 G. General packet Radio Services (GPRS) has been deployed for data communication.
The third-generation (3G) systems provides services such as enhanced multimedia, bandwidth up to 2 Mbps.• Standards: wideband code division multiple access (W-CDMA), universal
mobile telecommunications system (UMTS)
The fourth-generation (4G) systems provides further improvements such as higher bandwidth, enhanced multimedia, universal access, and portability across all types of devices.
105
Wireless Local Area Network (WLAN) The wireless Local Area Network (WLAN) is a type of local-area
network that uses radio waves to communicate between nodes. A stationary node called an access point (AP) coordinates the
communication between nodes. The two main standards for WLANs are the IEEE 802.11 standard
and European Telecommunications Standards Instititue (ETSI) HIPERLAN standard.
Wireless personal area networks (WPANs) are short-distance wireless networks.
Bluetooth is a popular WPAN specification.• Work within 10 m.
• Bluetooth Special Interest Group (SIG) including Ericsson, Intel, IBM, Nokia, and Toshiba is the driving force for Bluetooth.
The IEEE 802.15 is a standard for WPAN.
106
Ad Hoc/Hybrid Wireless Network An ad hoc wireless network is an autonomous system of mobile
nodes connected through wireless links. It doesn’t have any fixed infrastructure.
Hybrid networking combines the advantages of infrastructure-based and less networks.• Example: multi-hop cellular network (MCN), integrated cellular and ad hoc
relaying system (iCAR), multi-power architecture for cellular networks (MuPAC).
107
Network Standardization Who’s Who in the Telecommunications World: ITU Who’s Who in the International Standards World: ISO, ANSI,
NIST, IEEE Who’s Who in the Internet Standards World
• IAB (Internet Architecture Board)
• A Request for Comments (RFC) is a formal document from the Internet.
• IRTF (Internet Research Task Force)
• IETF (Internet Engineering Task Force)
Main sectors: Radiocommunications (ITU-R), Telecommunications Standardization (ITU-T), Development (ITU-D)
Classes of Members: National governments, Sector members, Associate members, Regulatory agencies
Wireless systems: overview of the development
cellular phones satellites wireless LANcordlessphones
1992:GSM
1994:DCS 1800
2001:IMT-2000
1987:CT1+
1982:Inmarsat-A
1992:Inmarsat-BInmarsat-M
1998:Iridium
1989:CT 2
1991:DECT 199x:
proprietary
1997:IEEE 802.11
1999:802.11b, Bluetooth
1988:Inmarsat-C
analogue
digital
1991:D-AMPS
1991:CDMA
1981:NMT 450
1986:NMT 900
1980:CT0
1984:CT1
1983:AMPS
1993:PDC
4G – fourth generation: when and how?
2000:GPRS
2000:IEEE 802.11a
200?:Fourth Generation(Internet based)
2003:IEEE 802.11g
109
Areas of research in mobile communication
Wireless Communication• transmission quality (bandwidth, error rate, delay)
• modulation, coding, interference
• media access, regulations
• ...
Mobility• location dependent services
• location transparency
• quality of service support (delay, jitter, security)
• ...
Portability• power consumption
• limited computing power, sizes of display, ...
• usability
110
Simple reference model used here
Application
Transport
Network
Data Link
Physical
Medium
Data Link
Physical
Application
Transport
Network
Data Link
Physical
Data Link
Physical
Network Network
Radio
111
Influence of mobile communication to the layer model
• service location• new applications, multimedia• adaptive applications• congestion and flow control• quality of service• addressing, routing,
device location• hand-over• authentication• media access• multiplexing• media access control• encryption• modulation• interference• attenuation• frequency
Application layer
Transport layer
Network layer
Data link layer
Physical layer
112
Metric Units
The metric prefixes are typically abbreviated by their first letters, with the units greater than 1 capitalized.
m is for milli and µ is for micro. For storage, Kilo means 210. For communication, 1-
Kbps means 1000 bits per second.