Introduction to Wireless Networks
John C.S. Lui
Department of Computer Science & Engineering
The Chinese University of Hong Kong
www.cse.cuhk.edu.hk/cslui
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 1 / 36
Outline
Outline
1
Aloha and Slotted Aloha
2
Slotted ALOHA with Delay
3
Stability in ALOHA
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 2 / 36
Aloha and Slotted Aloha
Goals
For "pure" ALOHA, users transmit any time they desire.
For "slotted ALOHA, the channel is to "slot" time into segments
whose duration is exactly equal to transmission time of a single
packet.
The aim is to derive the
throughput
delay
throughput-delay tradeoff
stability issue
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 4 / 36
Aloha and Slotted Aloha
Analysis
Let say transmission of a packet takes P secs. The vulnerable
period is 2P, as shown:
P
2P
vulnerable
period for
slotted ALOHA
P
vulnerable period for
pure ALOHA
time
Dene:
S denote the throughput of the channel (e.g., average number of
successful transmission per transmission period P).
G denote the average channel trafc (e.g., number of packet
transmission attempted per P sec).
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 5 / 36
Aloha and Slotted Aloha
Analysis: Pure ALOHA
Assume the total trafc (G) is Poisson and entering the channel is
an independent process generated by an innite population, then
S = GProb[no additional packet in vulnerable period] = Ge
2G
.
(1)
This was obtained by Abramson for ALOHA.
What is the maximum S? Taking
S
G
and equate to 0, maximum
occurs at G = 1/2 and we have:
S
=
1
2
e
1
0.184. (2)
Comment on the physical meaning and the efciency of pure
ALOHA.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 6 / 36
Aloha and Slotted Aloha
Analysis: Slotted Aloha
Time is "slotted" and all users are synchronized to these slot
intervals.
When a packet arrives within a slot, user delays the transmission
until next time slot. Therefore, the vulnerable period is P only.
Using similar assumption that the total trafc is a Poisson process:
S = Ge
G
. (3)
To obtain the maximum value of S, use similar technique, the
maximum occurs at G = 1, we have
S
= e
1
= 0.368. (4)
It is twice that of pure ALOHA.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 7 / 36
Aloha and Slotted Aloha
Throughput for pure and slotted ALOHA
Consider the throughput vs. offered trafc
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 8 / 36
Aloha and Slotted Aloha
Analysis: continue
Consider a nite population model with M independent users in a
slotted ALOHA.
Users packet transmission (old or new packet) as a sequence of
independent Bernoulli trials, or G
m
be the probability the m
th
user
transmits a packet in any give slot, where m = 1, . . . , M.
G
m
can be viewed as the average trafc (per slot) for the m
th
user.
So the average offered load is G =
M
i =1
G
m
.
Let S
m
be the probability that the m
th
users packet is successfully
transmitted. Similarly, S =
m
i =1
S
m
is the system throughput (per
slot). We have:
S
m
= G
m
i =m
(1 G
i
) m = 1, 2, . . . , M. (5)
The set of M equations has a solution set, {S
m
}, which denes the
allowable mixtures of source rates which this channel can support.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 9 / 36
Aloha and Slotted Aloha
Example 1
Assume all users are statistically identical. Then S
m
= S/M and
G
m
= G/M, we have
S = G
_
1
G
M
_
M1
.
Also, as M , S Ge
G
. So as M increases, throughput of
nite user model approaches to the Poisson throughput of innite
users.
The above express, maximum S
occurs when M = 1 and S = G.
Dene g =
M
i =1
(1 G
i
), we have
S
m
=
G
m
1 G
m
g. m = 1, 2, . . . , M.
This set of M equations dene the set of achievable throughput
{S
m
} in terms of offer load {G
m
}.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 10 / 36
Aloha and Slotted Aloha
Condition to achieve maximum S
Previous M equations dene a region in the Mdimensional
space whose coordinates are G
1
, . . . , G
M
.
The boundary to this region denes the maximum throughput for
S
m
when all other S
i
(i = m) are xed at allowable values. This
can be found by setting the Jacobian (determinant) J to zero with:
S
j
G
i
=
_
g
1G
i
i = j
gG
i
(1G
j
)(1G
i
)
i = j
After some algebra, we nd
J = g
M2
(1 G
1
) G
1
G
1
G
1
G
2
(1 G
2
) G
2
G
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
G
M
G
M
G
M
(1 G
M
)
= g
M2
(1 G
1
G
2
G
M
).
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 11 / 36
Aloha and Slotted Aloha
Condition to achieve maximum S
Applying J = 0, we have the following general condition on the set
of offered loads that achieves the set of maximum throughput
values:
G =
M
m=1
G
i
= 1.
The above equation gives us our throughput performance contour.
Example 1
Let M = 1, we then have S = G = 1.
This is obvious the best we can do that a user never collides or
destroys his own packet.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 12 / 36
Aloha and Slotted Aloha
Example 2
The M users form two groups such that m
1
of them have a rate S
1
and m
2
= Mm
1
of them have a rate S
2
.
S = m
1
S
1
+m
2
S
2
and G = m
1
G
1
+m
2
G
2
. The M equations
reduce
S
1
= G
1
(1 G
1
)
m
1
1
(1 G
2
)
m
2
S
2
= G
2
(1 G
2
)
m
2
1
(1 G
1
)
m
1
.
This denes the set of permitted rates {S
1
, S
2
} as a function of
offer loads {G
1
, G
2
}.
Imposing the optimization condition G = 1, we may solve for S
1
and S
2
for any given value of G
1
[0, 1/m
1
] and
G
2
= (1 m
1
G
1
)/m
2
.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 13 / 36
Aloha and Slotted Aloha
Throughput Contour:
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 14 / 36
Aloha and Slotted Aloha
Throughput Contour:
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 15 / 36
Slotted ALOHA with Delay
Slotted ALOHA with Delay
Assume an innite number of users who collectively form a source
that generates packets independent of the channel.
This source generates V packets per slot from the distribution
v
k
= P[V = k] with mean of S packets per slot.
Packet is of constant length requiring 1 slot time to transmit.
Let R be the number of slots it takes to check whether a
transmitted packet is successful or not (e.g., satellite).
If the packet was destroyed, user retransmits and randomly
choose one of the next K slots to retransmit (so as to avoid
colliding again with other collided packets). Thus, the
retransmission will take place either R +1 to R +K slots after the
initial transmission.
Total packets (new and retransmit pkt) per slot is L, where
p
k
= P[L = k] with mean trafc of G packets per slot.
What is the maximum throughput S, the average packet delay T?
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 17 / 36
Slotted ALOHA with Delay
Analysis
Goal: derive p
k
= P[exactly k transmitted packets per slot] or its
Ztransform. Consider the following gure:
current
slot
tagged slot
R slots
K slots
.... ...
The trafc of "current slot" is due to (a) retransmission from any of
the "K-slots" and (b) new packets generate in the current slot.
Let q
m
= Probability that exactly m packets which are transmitted
in the current slot due to retransmission from the tagged slot, for
m = 0, 1, 2, . . ..
Dene Z-transforms:
P(z) =
k=0
p
k
z
k
; q(z) =
m=0
q
m
z
m
; V(z) =
k=0
v
k
z
k
.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 18 / 36
Slotted ALOHA with Delay
Since transmission in slots are independent, let us rst derive q
0
:
q
0
= p
0
+p
1
+
k=2
p
k
_
1
1
K
_
k
.
For q
1
, we have:
q
1
=
k=2
p
k
k
_
1
K
__
1
1
K
_
k1
.
For the rest q
m
, where m 2, we have:
q
m
=
k=m
p
k
_
k
m
__
1
K
_
m
_
1
1
K
_
km
m 2.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 19 / 36
Slotted ALOHA with Delay
The Ztransform of q
m
, or q(Z) is
q(Z) = q
0
+q
1
Z +
m=2
_
k=m
p
k
_
k
m
__
1
K
_
m
_
1
1
K
_
km
_
Z
m
Adding and subtracting m = 0 and m = 1 terms, we have
q(Z) = q
0
+q
1
Z
k=0
p
k
_
1
1
K
_
k
z
k=1
p
k
k
_
1
K
_
m
_
1
1
K
_
k1
+
m=0
_
k=m
p
k
_
k
m
__
1
K
_
m
_
1
1
K
_
km
_
Z
m
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 20 / 36
Slotted ALOHA with Delay
Substituting q
0
and q
1
and interchanging the order of summation in the
double sum:
q(Z)=p
0
+p
1
_
p
0
+p
1
_
1
1
K
__
z
p
1
K
+
k=0
p
k
k
m=0
_
k
m
_
_
z
K
_
m
_
1
1
K
_
km
.
Reorganizing the binomial expansion, we get
q(Z) =
p
1
K
(1 Z) +
k=0
p
k
_
1
1
K
+
z
K
_
k
Taking the denition of P(Z), we have:
q(Z) =
p
1
K
(1 Z) +P
_
1
1 Z
K
_
.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 21 / 36
Slotted ALOHA with Delay
Now, the number of packets to be transmitted in the current slot is the
due to (1) the K slots in the tagged slot region; (2) number of newly
generated packets in the current slot, expressing the relationship of
these random variables:
p =
q +
q +
v.
Expressing in Z transform, we have:
P(Z) = [q(Z)]
K
V(Z).
Or
P(Z) =
_
p
1
K
(1 Z) +P
_
1
1 Z
K
__
K
V(Z).
Since P(Z) is a moment generating function, we can obtain various
moments and crank out probabilities.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 22 / 36
Slotted ALOHA with Delay
Analysis with Delay in Retransmission
Since S is the throughput of the channel (e.g., average number of
successful transmission per transmission period P), and G is the
average offered trafc (e.g., number of packet transmission attempted
per P sec), we have:
S/G : probability of successful packet transmission,
G/S : average number of transmission until success.
Let E be the average number of extra transmissions a packet incurs
(i.e., collision), we have:
1 +E = G/S.
We want to derive E. To do this, let us dene:
q : P[newly generated packet is successfully transmitted]
q
t
: P[previously collided packet is successfully transmitted]
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 23 / 36
Slotted ALOHA with Delay
Let x
i
be the probability that a packet collides exactly i times before
successful transmission, we have:
x
i
= (1 q)(1 q
t
)
i 1
q
t
i = 1, 2, . . . ,
So
E =
i =1
i x
i
=
1 q
q
t
.
We can now express S, the channel throughput:
S =
G
1 +E
= G
_
q
t
q
t
+1 q
_
. (6)
Remark: If we can derive q and q
t
, then we have S.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 24 / 36
Slotted ALOHA with Delay
Derive q: Based on previous analysis and denition of q
m
, we have
q = q
K
0
e
S
where q
0
can be expressed as:
q
0
= e
G
+Ge
G
+
i =2
G
i
i !
e
G
_
1
1
K
_
i
= e
G
+Ge
G
+e
G
_
e
G(11/K)
1 G
_
1
1
K
__
= e
G/K
+
G
K
e
G
.
Substituting this into the expression of q, we have:
q =
_
e
G/K
+
G
K
e
G
_
K
e
S
. (7)
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 25 / 36
Slotted ALOHA with Delay
Derive q
t
: the probability that previously collided packet is successfully
transmitted. It has three factors:
no packet which collided with it in the tagged slot again collides
with it in the current slot.
no packets from one of the K1 other possible tagged slots
collides with this packet in the current slot.
no new packet is generated in the current slot.
Let q
c
be the probability of the rst event, we have
q
c
=
k=1
_
G
k
k!
__
e
G
1 e
G
__
K 1
K
_
k
=
e
G/K
e
G
1 e
G
.
For second event, the probability is q
K1
0
.
For third event, the probability is e
S
.
We have
q
t
= q
c
q
K1
0
e
S
=
_
e
G/K
e
G
1 e
G
_
_
e
G/K
+
G
K
e
G
_
K1
e
S
. (8)
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 26 / 36
Slotted ALOHA with Delay
Note that Equations (6), (7) and (8) need to be solved numerically so
as to derive S, q and q
t
.
To derive T, the average number of slots to successfully deliver a
packet, we know that:
the time needed for one successful transmission (R +1) slots,
the extra transmission due to collision.
Therefore, T is:
T = (R+1) +
_
K+1
2
+(R+1)
_
E = (R+1) +
1q
q
t
_
R+1+
K1
2
_
. (9)
Remark: We now have the performance measures of S and T as a
function of K, R and G.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 27 / 36
Slotted ALOHA with Delay
To illustrate (a) S vs. G; (b) effect of K; (c) effect on T.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 28 / 36
Slotted ALOHA with Delay
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 29 / 36
Slotted ALOHA with Delay
Two groups of users: a group of "small" users (m
1
= ) and one large
user (m
2
= 1), with S
= lim
m
1
m
1
S
1
and their G
= m
1
G
1
. The
large user throughput is S
2
and offered load is G
2
. In her
T = (S
+S
2
T
2
)/S.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 30 / 36
Stability in ALOHA
Model
Previous analysis assumes equilibrium conditions. Now consider
Slotted ALOHA with large (but nite) number (M) of active
terminals.
Each terminal has one buffer space and only when the buffer is
empty a new packet can be generated with probability per slot.
Let N(t ) be the r.v. representing the total number of nonempty
terminals (or channel backlog) and S(t ) be the combined input
rates of packets into all terminals at time t . E.g., N(t ) = n, then
[N(t ), S(t )] = [n, (M n)]. This is a linear feedback model.
Packets that collide are retransmitted (after a round-trip
propagation delay of R slots) in one of the next K slots, each
being chosen at random with probability 1/K.
The retransmission takes place on the average R + (K +1)/2
slots after the previous transmission.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 32 / 36
Stability in ALOHA
Analysis
The model is hard to analyze. We approximate the backlogged packet
independently retransmits with probability p where
p =
1
R + (K +1)/2
.
Dene S
out
be the throughput rate of the channel, which is the
probability of exact one successful packet transmission in a slot. If
[N(t ), S(t )] = [n, (Mn)], then
S
out
= (1 p)
n
(M n)(1 )
Mn1
+np(1 p)
n1
(1 )
Mn
(10)
In the limit when M and 0 such that M = S < , we have
the innite population model in which packets are generated over the
channel at the Poisson rate S. We rewrite the equation to
S
out
= (1 p)
n
Se
S
+np(1 p)
n1
e
S
. (11)
This expression is very accurate even for nite M if << 1 and if we
replace S = M by S = (M n).
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 33 / 36
Stability in ALOHA
For a xed K, we show the behavior of S
out
as function of the channel
load [n, S]
There is an equilibrium contour in the (n, S) "phase plane" on
which the input rate S is equal to the system throughout S
out
.
In the shaded region, S
out
> S; elsewhere S
out
< S (the system
capacity is exceeded!).
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 34 / 36
Stability in ALOHA
The area of the shaded region (where S
out
> S) may be increased by
increasing K
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 35 / 36
Stability in ALOHA
We dene the channel load line in the (n, S) plane as the line
n = M (S/). A channel is said to be "stable" when its load line
intersects the equilibrium contour in exactly one place.
John C.S. Lui (CUHK) Advanced Topics in Network Analysis 36 / 36