Channel Access Protocols - Update your links. The www.ee
Download
Report
Transcript Channel Access Protocols - Update your links. The www.ee
Channel Access Protocols
for
Ad Hoc Networks
Instructor: Carlos Pomalaza-Ráez
Fall 2003
University of Oulu, Finland
1
Media Access Control (MAC)
• Protocols that enable multiple users to share a
finite amount of frequency and time resources
• Needed for efficient operation and good
performance for wireless systems
• An important goal is to minimize overhead while
maximizing overall network capacity
• Ad Hoc networks have no pre-existing
infrastructure or centralized administration, e.g.
base stations, and as such they require distributed
MAC protocols
2
Wireless MAC issues
Half-duplex operation
Time varying channel
• reflection
• diffraction
multipath
fading
• scattering
received signal
power varies as
function of time
Burst channel errors
• bit-error rate can be as high as 10-3 or higher
• packet loss can be minimized by using smaller packets,
forward error correcting codes and retransmission
methods such as acknowledgement packets
3
Wireless MAC issues
Location dependent carrier sensing
• Hidden nodes. A hidden node is one that is within the
range of the intended destination but out of range of the
sender
• Exposed nodes. An exposed node is one that is within
the range of the sender but out of range of the
destination
• Capture. This event occurs when a receiver can
correctly receive a transmission from one of two (or
more) simultaneous transmissions, all within its range,
because the signal strength of the correctly received
signal is much higher than strength of the other signals
4
Hidden and Exposed Node Problems
• A is transmitting to B
Hidden node
• C is out of range of A and is unaware of the transmission
• If C transmits to B it will cause a collision at B
Exposed node
• B is transmitting to A
• C wants to transmit to D
• C senses transmission & declines even if its transmission
will not cause any collision at A
5
Capture Problem
A
dAB
B
dCB
C
D
If A and C transmit
simultaneously to B then
the signal power of C,
received at B, is higher than
the one from A (because
dCB < dAB) and there is a
good probability that C’s
signal can be correctly
decoded in the presence of
A’s transmission
This capture of C’s signal can improve protocol performance, but it results
in unfair sharing of the channel with preference given to nodes closer to the
receiver. Wireless MAC protocols need to ensure fairness under such
conditions
6
Classification of MAC Protocols
Wireless MAC protocols can be classified into two categories, distributed
and centralized, according of the type of network architecture for which
they have been designed. Protocols can be further classified, based on the
mode of operation, into random access protocols, guaranteed access
protocols, and hybrid access protocols
Wireless MAC protocols
Distributed
MAC protocols
Random
access
Centralized
MAC protocols
Random
access
Guaranteed
access
Hybrid
access
Since we are interested in Ad Hoc networks we will focus
our discussions on distributed type protocols
7
Performance Metrics
Delay – Average time spent by a packet in the MAC queue. It is a
function of protocol and traffic characteristics
Throughput – Fraction of the channel capacity used for data
transmission
Fairness – A fair MAC protocol does not exhibit preference to any
single node when multiple nodes are trying to access the channel
Stability – A stable system can handle instantaneous loads that are
greater than the maximum sustained load
Robustness against Channel Fading
Power Consumption – Most wireless devices have limited battery
power, it is then important to design MAC protocols that have power
saving features
Support for multimedia – Protocols need to treat packets from various
applications based on their delay constraints. Common methods are
the use of access priorities and scheduling
8
Distributed MAC Protocols
These protocols are based on carrier sensing and collision avoidance
Carrier sensing refers to listening to the physical medium to detect any
ongoing transmission
Collision avoidance techniques must be implemented to minimize
the probability of collisions. Two mechanisms can be used:
Collision Avoidance with Out-of-Band Signaling such as the one used
in the BTMA (busy tone multiple access) protocol → F.A. Tobagi and
L. Klienrock, “Packet Switching in Radio Channels: Part II – The
Hidden Terminal Problem in Carrier Sense Multiple Access and the
Busy Tone Solution,” IEEE Trans. Commun., COM-23, 1975, pp.
1417-1433
Collision Avoidance with Control Handshaking such as one used in
MACA (multiple access with collision avoidance) protocols → P.
Karn, “MACA – A New Channel Access Method for Packet Radio.”
ARRL/CRRL Amateur Radio 9th Computer Networking Conf., 1990
9
Distributed Foundation Wireless MAC
It is a derivative of the MACA protocol
It is the basic access protocol of the IEEE 802.11 standard
Consists of a four-way exchange, RTS-CTS-DATA-ACK
Sender
node
Receiver
node
Others
DIFS
SIFS
RTS
SIFS
DATA
SIFS
CTS
ACK
NAV(DATA)
NAV(CTS)
NAV(RTS)
NAV- Network Allocation Vector
10
Distributed Foundation Wireless MAC
To give preference to a stations trying to send and ACK
different waiting intervals are specified:
DIFS (distributed inter frame space) → a node must
sense channel idle for DIFS interval before making an
RTS attempt
SIFS (short inter frame space) → a node has to sense
channel idle for SIFS before sending an ACK.
SIFS < DIFS
NAV (Network Allocation Vector): Packets contain
time field (NAV) to indicate duration of current
transmission.
All nodes that hear RTS/CTS back off NAV amount
(time) before sensing the channel.
11
Performance Analysis of 802.11 DCF
Assumptions
Fixed number of stations, each always having a packet available for
transmission (saturation condition)
Each packet needs to wait for random backoff time before transmitting
Constant & independent collision probability for each transmitted packet
Ideal channel condition (no hidden terminals and capture)
Notation
b(t) = stochastic process representing the backoff time counter
CWmin = minimum contention window = W
m = maximum backoff stage → CWmax = 2mW
Wi = 2iW, where i (0,m) is called “backoff stage”
s(t) = stochastic process representing the backoff stage at time t
p = probability of each transmitted packet being collided
12
802.11 DCF Example
{s(t9),b(t9)} = {1,7}
{s(t0),b(t0)} = {0,3}
SIFS
DIFS
Station A
BO=3
RTS
SIFS
DIFS
BO=4
DATA
CTS
RTS
BO=7
ACK
Busy channel
t9
t4 …... t8
t0 t1 t2 t3
Station B
BO=5
collision
DIFS
Others
ACK
BO=7
DIFS
BO=4
Busy channel NAV(RTS)
BO=4
RTS
BO=2
RTS
Busy channel NAV(CTS)
Station A has a packet to transmit to station B. At the end of the ACK station A waits for a
DIFS and then chooses a backoff time equal to 3 before sending an RTS to station B. Another
station also waits for a DIFS and chooses a backoff time equal to 7. At t3 station A initiates the
RTS/CTS transaction with station B. The station that had a backoff time of 7 “freezes” its timer
until the channel is idle again. After B’s ACK station A has another packet to transmit and this
time it chooses a backoff time of 4 which brings it to a collision condition with the station that
had resumed its counter. Because of the collision station A increments its contention window
size and chooses a backoff time of 7.
13
802.11 DCF - Markov Chain Model
A bi-dimensional process model {s(t),b(t)} can be used (*) which leads
to a discrete-time Markov chain model with the following transition
probabilities:
P{i,k | i, k+1} = 1; k (0, Wi – 2), i (0,m)
i,k+1
1
i,k
This equations accounts for the fact that, at the beginning of each slot
time, the backoff time is decremented as long as the counter has not
reached zero and that the channel has been sensed idle for a mini-slot
(*) G. Bianchi, “Performance Analysis of the IEEE 802.11 Distributed
Coordinated Function,” IEEE Journal on Selected Areas in Communications,
vol. 18, no. 3, March 2003, pp. 535-547
14
802.11 DCF - Markov Chain Model
P{0,k | i, 0} = (1-p)/ W0 ; k (0, W0 – 1), i (0,m)
Tx
Success
i,0
(1-p)/ W0
0,0
0,1
...
0,W0 – 2
0, W0 – 1
This equations accounts for the fact that a new packet following a
successful packet transmission starts with backoff stage 0, and that the
backoff is initially uniformly chosen in the range (0, W0 – 1)
15
802.11 DCF - Markov Chain Model
P{i,k | i-1, 0} = p/ W1 ; k (0, Wi – 1), i (1,m)
Tx
Collision
i-1,0
p/ Wi
i,0
i,1
...
i,Wi – 2
i, Wi – 1
When an unsuccessful transmission occurs at backoff stage i-1, the
backoff stage increases, and the new initial backoff value is uniformly
chosen in the range (0, Wi)
16
802.11 DCF - Markov Chain Model
P{m,k | m, 0} = p/ Wm ; k (0, Wm – 1)
0,0
0,1
...
0,W0 – 2
0, W0 – 1
(1-p)/ W0
m,0
p/ Wm
m,1
m,2
...
m,Wm – 2
m, Wm – 1
This equation models the fact that once the backoff stage reaches the
value m, it is not increased in subsequent packet transmissions
17
Steady State Probabilities
The stationary transition probability distribution π(i,k) is then
(i,0) p i (0,0) 0 i m
pm
(m,0)
(0,0)
1 p
W k
(i, k ) i
(i,0) i (0, m), k (0, Wi 1)
Wi
π(0,0) is determined by using the normalization condition
m Wi 1
(i, k ) 1
i 0 k 0
from which
(0,0)
2(1 2 p)(1 p)
(1 2 p)(W 1) pW (1 (2 p) m )
18
Steady State Probabilities
The probability that a station transmits in a randomly chosen slot time can be
derived since any transmission occurs when the backoff time counter is zero
2(1 2 p)
(i,0)
(1 2 p)(W 1) pW (1 (2 p) m )
i 0
m
p, the probability that a transmitted packet encounters a collision, is the
probability that in a time slot at least one of the n-1 remaining stations
transmits. At steady state, each remaining station transmits a packet with
probability τ, this results in
p 1 (1 ) n1
From this two equations the values for p and τ can be found using
numerical techniques
19
Throughput
Let Ptr be the probability that there is at least one transmission in the
considered slot time, i.e.,
Ptr 1 (1 )n
The probability Ps that a transmission on the channel is successful is
given by the probability that exactly one station transmits on the
channel, conditioned on the fact that at least one station transmits, i.e.,
n (1 ) n1 n (1 ) n1
Ps
Ptr
1 (1 ) n
The normalized throughput S, defined as the fraction of the time the
channel is used to successfully transmit payload bits is then
E[payloadinformation transmitted in a slot time]
S
E[lengthof a slot time]
20
Throughput
If E[P] is the average packet payload then S can be expressed as
S
Ps Ptr E[ P]
(1 Ptr ) Ptr PsTs Ptr (1 Ps )Tc
where
durationof an emptyslot time
Ts average timethechannelis sensed busy because of a successful transmission
Tc average timethechannelis sensed busy by each stationduring a collision
For the basic access mechanism (no RTS/CTS transaction) the packet header is
H PHYhdr MAChdr
And let δ be the propagation delay
21
Throughput – Basic Access
PHYhdr MAChdr
PAYLOAD
SIFS
ACK
DIFS
Tsuccess (basic access)
PHYhdr MAChdr
PAYLOAD
DIFS
Tcollision (basic access)
Tsbasic H E[P] SIFS ACK DIFS
Tcbasic H E[ P* ] DIFS
E[P*] is the average length of the longest packet payload involved in a collision
Pmax
n k
nk
k
(
1
)
(
1
F
( x))dx
k 2 k
0
E[ P* ]
1 (1 ) n n (1 ) n1
n
Where F(.) is the
probability distribution
function for the packet
payload size
22
Throughput – RTS/CTS
RTS
SIFS CTS
SIFS PHYhdr MAChdr
PAYLOAD SIFS
ACK
DIFS
Tsuccess (RTS/CTS)
RTS
DIFS
Tcollision (RTS/CTS)
Tsrts / cts RT S SIFS CT S SIFS
H E[ P] SIFS ACK DIFS
Tcrts / cts RTS DIFS
23
Model Validation
The model is validated by comparing its results with those obtained
via simulation. The parameters used for the validation study are
summarized in the following table. A PHY layer using a FHSS
modulation system is assumed.
Packet payload 8184 bits
Channel Bit Rate
1Mbit/s
MAC header
272 bits
Propagation Delay
1μs
PHY header
128 bits
Slot Time
50 μs
ACK
112 bits + PHY header
SIFS
28 μs
RTS
160 bits + PHY header
DIFS
128 μs
CTS
112 bits + PHY header
ACK-Timeout
300 μs
CTS-Timeout
300 μs
24
Model Validation- Simulation vs. Analysis
Analytic results are represented by lines, simulation results by symbols
25
Elimination Yield – Non-Preemptive
Multiple Access (EY-NPMA)
EY-NPMA is the channel access protocol used in the HYPERLAN system.
HIPERLAN is a high-speed (24 Mb/s) wireless LAN standard. The
protocol works as follow:
A node that has data to transmit senses the channel
If the channel is free for at least 1,700 bits then it is considered free
and the node can start transmitting
Each data frame must be explicitly acknowledge with an ACK packet
If the channel is sensed busy the node synchronizes itself with the end
of the current transmission interval
At that point a channel access cycle begins according to the EY-NPMA
scheme
This scheme has 3 phases: prioritization, contention, and transmission
26
Channel Access (EY-NPMA)
Prioritization
phase
Contention phase
Elimination phase (B)
Transmission phase
Yield phase (D)
Data Frame
ACK
Priority
Detection
Cycle
Synchronization
Interval
Priority
Assertion
Survival
Verification
Interval
In the prioritization phase only the nodes with the highest channel access priority frame
are allowed to continue to the next phase
The contention phase has 2 sub-phases: elimination, and yield
In the elimination phase each node transmits for a random number of slots after which it
listen to the channel. If the channel is busy the node loses contention and waits for the
next cycle. If the channel is idle the node moves to the yield phase
In the yield phase the node listens to the channel for a random number of slots. If no
transmission is detected during this time, the node starts and completes its data
transmission
27
Channel Access (EY-NPMA)
For the prioritization phase each frame is assigned a priority level h (0, H-1).
Each node that has a frame with priority h senses the channel for the first h
prioritization slots. If the channel is idle during this interval, then the node transmits
a burst in the h + 1 slot and it is admitted to the contention phase, otherwise it stops
contending and waits for the next channel access cycle.
The elimination phase consists of at most n slots followed by an elimination survival
verification slot. Starting from the first elimination slot, each node transmits a burst
for a number B, 0≤ B ≤ n, of subsequent elimination slots.
(1 q )q b 0 b n
B has a truncated geometric probability
P r{B b} n
distribution function, i.e.,
q
bn
The yield phase consists of at most m yield slots. Each node listens to the channel
for a number D, 0≤ D ≤ m, of yield slots before beginning a transmission.
D has also a truncated geometric probability
d
(1 p) p 0 d m
P r{D d } m
distribution function, i.e.,
bm
p
28
Performance Analysis (EY-NPMA)
Analysis of the HIPERLAN MAC protocol via a mathematical model is very
difficult because of the complexity and level of interdependence of the various
processes that are involved. Therefore the analysis is carried out using simulation
models. For the study carried by Anastasi et. al. (*) the simulation model compared
the performance of the protocol with different arrival processes. The nodes have
infinite buffers and they contribute with the same offered load.
Poisson and ON/OFF processes are used. The ON/OFF period lengths are Weibull
distributed with α = 1 (Markov Modulated Markov Process) and α < 1.
Studies have shown that experimental data related to WWW applications
can be satisfactorily modeled by ON/OFF processes where the ON and OFF
time-lengths distributions are heavy tailed, e.g. Weibull, Pareto. The Weibull
probability distribution function of a random variable X is:
P{X x} 1 e
( x / )
,x0
(*) G. Anastasi, L. Lenzini, and E. Mingozzi, “Stability and Performance Analysis of
HIPERLAN,” Proceedings of IEEE INFOCOM’98, pp. 134-141.
29
Simulation Analysis (EY-NPMA)
30
Multi-Channel Assignment Approach
7
6
2
1
5
3
4
8
Proposed for CDMA Ad-Hoc Networks
Nodes use different channels (codes) to transmit data
The codes must be “locally” unique but they can be reused
The code or channel can be used as an implicit address for the node
Similar approach is used in cellular networks but there the topology is
static
31
Channel Assignment in Ad Hoc Networks
Let G(V,E) be the graph
representation of the
network and Δ the
maximum degree of the
graph. The problem of
channel assignment
becomes then one of
graph coloring
For any node:
All its neighbors have different colors (ROCA), or
All two-hop neighbors have different colors (TOCA)
ROCA = Receiver-Oriented-Code-Assignment
TOCA = Transmitter-Oriented-Code-Assignment
Brooks and Vizing theorem: Number of colorsneeded min{( 1) 1, V }
32
Channel Assignment in Ad Hoc Networks
In Ad-Hoc networks:
There is no base station
Nodes are free to connect or disconnect
Nodes move about
Increase or decrease their transmission range
Should minimize or avoid the primary and secondary conflicts
Two transmissions with the same
code arrive at a node simultaneously
A transmission arrives at a node that is
receiving a signal with a different code
These features call for distributed, dynamic, code assignment algorithms
33
Minimal Recoding Strategies
A change in the code assignment (recoding) is needed to eliminate
potential collisions caused by nodes joining the network, moving, or
changing the power of their transmissions
The recoding strategy must be distributed and local
The number of events required for recoding should be minimized
The maximum number of codes needed for a proper recoding should
be also minimized
Used TOCA method since it has better performance1
Assign a code ci to each node such that,
CA1 - For every edge (vi,vj) E, ci ≠ cj (primary collision avoidance)
CA2 - For every pair of edges (vi,vk), (vj,vk) E & i ≠ j, ci ≠ cj (secondary
collision avoidance)
Graph coloring problems of this nature are NP-complete
(1) L. Hu, “Distributed Code Assignment for CDMA Packet Radio Networks,” IEEE Trans.
on Networking, vol. 1, no. 6, December 1993, pp. 668-677
34
Recoding on Node Join
Consider the event where a new node n joins an Ad Hoc network
Set 1n
Set 4n
Set 2n
n
Set 3n
Node n joins
Nodes in 3n need not change their color since n will be assigned a new color
different from any color in 3n. To minimize the amount of recoding there is only
to recode the nodes in the set 1n U 2n U {n}
35
Recoding on Node Join
If the set of old colors in 1n U 2n is {C1, C2,…, Cm} and the number of nodes in 1n U 2n
with these corresponding colors is {K1, K2,…, Km}, then apart from recoding n, at least
m
(K
i 1
m
i
1) K i m of thenodesin 1n 2n
i 1
need to be recoded with different new colors to avoid conflicts into the new code
assignment after node n joins the network. To find out which nodes to chose for
recoding one can use the following approach(1).
Consider the undirected graph G’= (V1 U V2, E’) where,
V1 = 1n U 2n U {n}
V2 = {i : i Z+ & i ≤ max = maximum color constraint in the vicinity of 1n U 2n U {n} }
E = {(u,v) : u V1, v V2, u is not constrained to be newly colored with v}
“maximum color constraint in the vicinity of 1n U 2n U {n}” means the maximum
integer among all constraints due to 3n U 4n on nodes 1n U 2n U {n}, e.g. the set of old
colors in 3n U 4n forbidden to be assigned to nodes in 1n U 2n U {n} due to the
constraints CA1 and CA2, and all old colors in 1n U 2n . The edges in E are weighted;
edges (u,v), u 1n U 2n , v V2 where v is the old color assigned to node u are given a
weight of 3; all other edges have weight 1.
(1) I. Gupta, “Minimal CDMA Recoding Strategies in Power Controlled Ad-Hoc Wireless Networks,” Technical Report,
Dept. of Computer Science, Cornell University, 2001.
36
Recoding on Node Join (Example)
1n U 2n
2
H
A
B
D
3
C
F
3
1
1
G
4n
2
E
3
1n = {G}, 2n = {A,B,F,C}, 3n = { }, 4n = {D,F}. The original color assignment,
before node H joins the network, is indicated next to each node (in the square box).
Next G’ is built as previously defined. Note that G’ is a bipartite graph.
37
Recoding on Node Join (Example)
1
A
Consider now the maximum matching M
M E
3
1
B
1
1
3
3
C
1
2
3
F
1
1
G
3
3
on this bipartite graph. M is a set of edges
with no common end-vertices and with the
maximum total weight among all such
sets. There are many efficient algorithms
to find a maximum matching of a
weighted bipartite graph(1). Once M is
found assign a node u in V1 to the color in
V2 that M matches into, and for all the
remaining nodes in V1 not matched by M,
assign them consecutive colors one by one
starting from | V2 | + 1 onwards.
1
H
1
(1) Z. Galil, “Efficient Algorithms for Finding Maximum
Matching in Graphs,” ACM Computing Surveys, vol. 18,
March 1998, pp. 23-28.
38
Recoding on Node Join (Example)
A
1
3
B
3
2
The maximum matching M for this example is then {(A,2),
(B,3), (C,1)}. The color (code) assignment for the
unmatched nodes is (F,4), (G,5) and (H,6). This recoding
strategy is local since the task of recoding the nodes in 1n U
2n U {n} is locally centralized at node n, and uses only local
information.
3
C
Claims(1)
F
Minimal Recoding: For the event where n joins the
network this algorithm recodes the minimum number
of nodes
G
H
3
Optimal among Minimal: Among all minimal strategies
that recode nodes only one hop away from the event,
e.g. nodes in 1n U 2n U {n}, this strategy re-assigns the
least maximum color to any node
(1) I. Gupta, “Minimal CDMA Recoding Strategies in Power Controlled Ad-Hoc
Wireless Networks,” Technical Report, Dept. of Computer Science, Cornell
University, 2001.
39
Recoding on Node Join (Pseudo Code)
1. Obtain the constraints (u, oldcolor (v)) of the from-neighbors u of n,
u 1n 2n , v 1n 2n {n}
2. Obtain the constraints (n, oldcolor (v)) for n, v 1n 2n
3. Let max = maximum color seen in these constraints on old colors in 1n U 2n
4. Let V1 = 1n U 2n U {n}, V2 = (1,2,…,max}
Build the bipartite graph G’ by joining edges from each vertex v in V1 to each color k in
V2 that it can be assigned without conflicting with the constraints with any of the nodes
not in 1n U 2n U {n}
Assign a weight of 3 to the edge if it connects to the old color assigned to v, otherwise
assign it a weight of 1
5. Run the bipartite matching algorithm on G’
6. For each edge v in V1 that is matched to some edge k in V2 assign k as the new
color. For all the remaining m vertexes in V1 not assigned a color assigned them
the colors max + 1, …, max + m
7. Transmit this information to all concerned nodes and coordinate on when to
change colors
40
Recoding on Move
The event when a node n moves can be handled in almost the same way as when a
node joins the network, e.g. for the following example,
2
4n
B
A
3
B
D
F
C
3
1
1
E
G
3
2
1n U 2n
1n = { }, 2n = {E,F,G}, 3n = { }, 4n = {A,D,C}. The original color assignment,
before node B moves, is indicated next to each node (in the square box).
41
Recoding on Move (Example)
The bipartite graph G’ is
The maximum matching M is
1
B
B
3
1
1
E
1
E
3
2
3
3
2
3
F
1
F
1
3
3
G
3
3
1
G
The final color (code) is (A,2), (B,4), (C,1), (D,3), (E,3), (F,1), and (G,2)
42
Recoding on Node Move (Pseudo Code)
0. Define 1n, 2n, 3n, and 4n, for the node n in its new position
1.
Obtain the constraints (u, oldcolor (v)) of the from-neighbors u of n,
u 1n 2n , v 1n 2n {n}
2.
v 1n 2n
Obtain the constraints (n, oldcolor (v)) for n,
3.
Let max = maximum color seen in these constraints on old colors in 1n U 2n
4.
Let V1 = 1n U 2n U {n}, V2 = (1,2,…,max}
Build the bipartite graph G’ by joining edges from each vertex v in V1 to each
color k in V2 that it can be assigned without conflicting with the constraints with
any of the nodes not in 1n U 2n U {n}
Assign a weight of 3 to the edge if it connects to the old color assigned to v,
otherwise assign it a weight of 1
5.
Run the bipartite matching algorithm on G’
6.
For each edge v in V1 that is matched to some edge k in V2 assign k as the
new color. For all the remaining m vertexes in V1 not assigned a color
assigned them the colors max + 1, …, max + m
7.
Transmit this information to all concerned nodes and coordinate on when to
change colors
43