Timeliness of Wireless Sensor Networks With Random Multiple Access
Timeliness of Wireless Sensor Networks With Random Multiple Access
Abstract—In this paper, we consider a wireless sensor network acceleration and position of vehicles in auto-driving, the
in which N sensor nodes deliver the observed information temperature/soil-moisture of the ambient environment in smart
of interest to a remote receiver by competing for a sharing agriculture, network controls of decision-making systems in
channel through the carrier sense multiple access with collision
avoidance (CSMA/CA) protocol or the slotted ALOHA protocol. modern factories of industry 4.0, and so on. For such infor-
For this network, we evaluate the information freshness of the two mation with timeliness requirements, delivering outdated infor-
random multiple access protocols using the age of information mation would reduce the reliability of system decision-making
(AoI) metric. In order to explicitly express the average AoI significantly and cause substantial security risks. Therefore,
of the CSMA/CA based network, we establish an equivalent timeliness is essential for IoT based real-time monitoring
and tractable transmission model for the network, in which
the transmission probabilities and the collision probabilities are systems and status updating systems.
assumed to be identical over time and among sensor nodes. For Traditional data communications focus more on the delay
the slotted ALOHA based network, we derive the average AoI by of information transmissions. The indices such as throughput
focusing on a randomly chosen reference node. Our theoretical and delay could not effectively characterize the timeliness of
results show that 1) the transmission probability and collision updates. For example, in a simple M/M/1 queueing system,
probability of the two networks increase with both the arrival rate
and the number of sensor nodes; 2) with the same transmission the more frequent the packets arrive, the larger the throughput
probability, the average AoI of the CSMA/CA based network is but the delay would be out of expectation, even tends to
always smaller than that of the slotted ALOHA based network, infinity (due to congestions); the sparser the packets arrive,
no matter how the arrival rate and the number of nodes change. the fewer timely update receptions there would be, which may
Our Monte Carlo simulation results also validate the correctness result in delayed information transmission and wrong action
of our theoretical calculations.
with high probability. Thus, neither delay nor throughput can
Index Terms—Age of information, carrier sense multiple access exactly characterize the freshness of the received information.
with collision avoidance (CSMA/CA), random multiple access,
To this end, an emerging metric called the age of information
slotted ALOHA, timely status updates.
(AoI) was formally introduced in [4]. Specifically, the AoI of
the system is defined as the difference between the current
I. I NTRODUCTION moment and the generation moment of the latest successfully
Source nodes
multiple
division multiple access (FDMA) may not be suitable for access
Sensor 2
such scenarios and with low efficiency. Thus, random multiple
access techniques, (e.g., carrier sense multiple access with Remote receiver
increasing with the arrival rate and the number of sensor with delayed access. That is, the data packets are generated or
nodes. received at the end of slots.
2) For both the CSMA/CA based and the slotted ALOHA In a slotted CSMA/CA based network, every sensor node
based networks, we derive the maximum packet rates needs to wait for a random period of t slots (which is referred
and the allowable numbers of sensor nodes. We also to as the back-off time) before attempting to transmit a data
explicitly present the average AoIs of two networks in packet to avoid collisions. The back-off time t would be
closed forms. Our results show that the average AoI of chosen uniformly from (0, 1, · · ·, ws ), where ws = 2s w0 , w0
the CSMA/CA based network is always smaller than is the minimum contention window, and s is the number of
that of the slotted ALOHA based network for the same previous failed back-off stage. We assume that the number
transmission probability, regardless of changes in the of back-offs can be infinite (i.e., s = 0, 1, · · ·). The initial
arrival rate and the number of sensor nodes. To the best back-off time t of a sensor node is recorded by its back-
knowledge of the authors, this is the first result explaining off counter, which would be reduced by one in each slot
why the CSMA/CA outperforms the slotted ALOHA in if all other sensor nodes are silent. Otherwise, it remains
terms of AoI in theory. unchanged. When the back-off counter reaches zero, a sensor
3) We investigate the transmission probability, the collision node has the opportunity to transmit its head-of-line packet. If
probability, and the average AoIs of heterogeneous net- the transmission is successful, the sensor node could start the
works through simulations. The simulation results indi- back-off process of a new data packet by resetting its back-
cate that the changes in the transmission probability, the off stage s to zero and resetting its back-off counter randomly
collision probability, and the average AoIs are with sim- between zero and w0 − 1. If a collision occurs, the sensor
ilar modes to the corresponding homogeneous networks. node enters the next back-off stage by doubling the contention
window and initializing the back-off counter. We refer to the
number of previous failed back-offs and the back-off counter
B. Organization
of a sensor node as its state, which is denoted as (s, t).
The rest of the paper is organized as follows. We present the In a slotted ALOHA based network, to reduce the ran-
wireless sensor network model and the definition of the AoI in domness of sensor nodes transmitting their data packets, and
Section II. In Section III, we analyze the CSMA/CA and the sensor nodes must wait until the next slot before they can start
slotted ALOHA transmission behaviors and establish an equiv- delivering their data packets. In particular, every data packet
alent and universal transmission model for the CSMA/CA would be transmitted with the same transmission probability
based network to derive the transmission probability and colli- λ in each slot. If any collisions occur, the data packet would
sion probability of the sensor nodes. We also explicitly obtain be retransmitted with probability λ in the next slot, until the
closed-form expressions for the average AoIs of networks transmission is successful.
that employ the CSMA/CA protocol and the slotted ALOHA
In this paper, both the CSMA and ALOHA protocols that
protocol. The Monte Carlo simulation results and numerical
we consider are slotted protocols. For the CSMA protocol, a
results are given in Section IV. Finally, the conclusion and
node attempts to transmit its packet when its back-off counter
future direction are presented in Section V.
reduces to zero. In case a collision occurs, the node needs to
perform a new round of back-off process (cf. Section III-A).
For the slotted ALOHA protocol, each node delivers its packet
II. S YSTEM M ODEL with a certain probability λ and retransmits the packet with
the same probability when a collision occurs.
As shown in Fig. 1, we consider a single-hop wireless
sensor network consisting of N identical sensor nodes and We evaluate the timeliness of the network by the AoI. To
a common remote receiver, in which all sensor nodes are be specific, the AoI is defined as the difference between the
visible to each other (i.e., without hidden nodes). Each sensor current time m and the generation time Un (m) of the latest
node observes the information of interest and attempts to successfully transmitted packet at sensor node n. Mathemati-
transmit the observed information to the remote common cally, the AoI is expressed as
receiver independently. All the sensor nodes contend for ∆n (m) = m − Un (m) . (1)
the channel through the CSMA/CA protocol or the slotted
ALOHA protocol. We assume that the data packet generation
of each sensor node follows the Bernoulli process with a rate Fig. 2 describes a sample AoI path ∆ (m) of a certain sensor
of p. Every sensor node stores its data packets in a buffer and node n. We denote the generation (arrival) time of the kth
delivers the data packets using the FCFS policy. packet status update of the sensor node as mk (k = 1, 2, · · ·)
Time is divided into discrete slots of equal length and all and the time when the remote receiver receives the k-th packet
data packets are of the same size. The start and completion of a sensor node n as m′k . Then the inter-arrival time of the
of each data packet transmission occur at the slot boundaries packets can be expressed as Xk = mk − mk−1 and the system
and it takes exactly one slot for the transmission of every time of kth packet is Tk = mk − m′k . The waiting time and
data packet. We assume that transmission failures occur only the service time of packet k are denoted, respectively, as Wk
when two or more nodes are transmitting their data packets in and Sk . It is noted that the system time Tk of packet k is the
the same slot. In addition, we employ the late-arriving system sum of the waiting time Wk and the service time Sk . Thus
408 JOURNAL OF COMMUNICATIONS AND NETWORKS, VOL. 25, NO. 3, JUNE 2023
' m
AoI
A1
A0
A2 A3
'0
(a) Transition diagram for each sensor node buffer size c = k ≥ 1
0 m1 m2 m3 mk m
m '1 m '2 m '3 m 'k
X2 T2
W2 S2
we have
Tk = Wk + Sk . (2)
Without loss of generality, it is supposed that the system is
observed from m = 0. At this moment, the queues are empty
and the AoI at the remote receiver is ∆0 . Between time m′k−1
and time m′k , the AoI is increased by one since the remote
receiver does not receive a new data packet from sensor node
n. Once the remote receiver receives an update (a data packet) (b) Transition diagram of the three-dimensional Markov chian
from a sensor node n, the AoI of the sensor node is reset to a
lower value which is equal to the latency experienced by the Fig. 3. Three dimensional transition diagram for a sensor node
data packet across the transmission system. state (s, t, c).
We assume that the packet arrival process and the age
process ∆ (m) are ergodic. Thus, we know that the sample
the collision probability, and the service rate of the sensor
average AoI converges to its statistical average. During a
nodes. After that, the maximum arrival rate and the number
period of M slots, we assume that K packets are successfully
of sensor nodes allowed by the network are calculated. Finally,
received by the remote receiver. Then the average AoI, in the
we derive the average AoI of the CSMA/CA based network
period, can be expressed as
and the slotted ALOHA based network explicitly.
M
¯ 1 X
∆= ∆ (m). (3)
M m=1 A. Equivalent Transmission Model of the CSMA/CA Network
To calculate this average, the area ∆ (m) shown in Fig. 2 is Since the transmission behavior of the CSMA/CA protocol
divided into a sequence of triangle-like areas A0 , A1 , A2 , · · ·, is quite complex, we shall establish an equivalent and universal
and the triangle-like area with width TK . As M approaches transmission model to facilitate the analysis of the transmitting
infinity, the average AoI can be expressed as process.
K−1
! Motivated by the approximation method proposed by
¯ 1 X 1 G. Bianchi in [11], we assume that for each transmission, the
∆ = lim A0 + Ak + TK (TK + 1) . (4)
M →∞ M 2 collision probability pcl is identical and independent among
k=1
sensor nodes, regardless of the number of retransmissions ex-
perienced. In each slot, every sensor node having a non-empty
buffer transmits its data packets with transmission probability
III. T RANSMISSION B EHAVIOR AND AVERAGE AO I OF ptx , which is also identical and independent, regardless of its
CSMA/CA AND S LOTTED ALOHA BASED N ETWORKS back-off state. For every sensor node, therefore, pcl is the
In this section, we first develop an equivalent transmission probability that the transmission of a sensor node collides with
model for the network using the slotted CSMA/CA protocol. some other sensor nodes; ptx is the probability that the back-
Based on the newly developed model, we derive the trans- off counter of the sensor node reduces to zero and attempts to
mission probability, the collision probability, and the service transmit a data packet.
rate of the sensor nodes. Likewise, in the slotted ALOHA We refer to the number s of failed back-offs, the back-off
based network, we also analyze the transmission probability, counter t of a sensor node, the number c of packets in the
LI et al.: TIMELINESS OF WIRELESS SENSOR NETWORKS WITH RANDOM ... 409
cache as the state of the sensor node, and thus model the three- The first equation in (6) accounts for the situation that
dimensional process (s, t, c) as a discrete-time Markov chain. when the buffer is empty and no data packet is generated
In addition, we assume that the number of back-off stages can in the slot. The second equation characterizes the case that
be infinite. Unlike the research of in [11], however, we shall the sensor node generates a data packet and will transit to
investigate the network in the non-saturated case in this paper. the zeroth back-off stage by randomly initializing the back-
That is, the buffer of all sensor nodes is not always non-empty, off counter. The third equation describes the case when the
and thus is more meaningful for systems with strict timeliness sensor node successfully delivers its only (k = 1) data packet,
requirements. In particular, we say a sensor node is in the idle and no new data packet arrives. Likewise, the fourth equation
state (−1, −1, 0) if its buffer is empty, i.e., c = 0. of (6) accounts for the situation that when the sensor node
The three-dimensional state (s, t, c) transition diagram of successfully transmits its head-of-line packet (k ≥ 2) and no
the discrete-time Markov chain is shown in Fig. 3, in which new data packet arrives. In this case, the back-off process of
Fig. 3(a) describes the state transitions when the buffer length the followed data packet restarts from the next layer. The fifth
is c = k ≥ 1 is not changed by a step of transition. equation characterizes the case when the back-off counter at
Fig. 3(b) describes possible transitions between neighboring the ith back-off stage of the kth layer returns to zero and
layers, i.e., the buffer length is increased or decreased by one. a collision is sensed, simultaneously, the sensor node gets a
In particular, the non-zero one-step transition probabilities of new data packet. Thus, the state will be transferred to the next
the kth layer corresponding to Fig. 3(a) are given by: back-off stage i + 1 of the k + 1th layer. Finally, as shown in
the sixth equation and the seventh equation of (6), the back-
Pr {i, j, k |i, j, k} = (1 − p) pcl
off counter is non-zero and the sensor node gets a new data
Pr {i, j − 1, k |i, j, k} = (1 − p) (1 − pcl ) packet.
p (1 − pcl )
(5) We represent the stationary distribution of the Markov chain
Pr {0, j, k |i, 0, k} =
w0 as bi,j,k = lim Pr {(s, t, c) = (i, j, k)}. We also denote
(1 − p) pcl P∞ m→∞
bi,j,∗ = k=1 bi,j,k . In the stationary state, for each sensor
Pr {i + 1, j, k |i, 0, k} = ,
wi+1 node, the state update rate (i.e., the rate of packet genera-
in which p is the data packet generation rate of each sensor tion) is p, and we further represent the service rate of the
node, i = 0, 1, · · ·, j ∈ (1, wi − 1), and k ≥ 1. network using the CSMA/CA protocol as µCA . In particular,
In (5), the first equation and the second equation account for the stationary distribution b is explicitly given in the following
the situations that no data packet is generated. In this case, the proposition.
back-off counter will be frozen if a collision is detected and Proposition 1. Given the packet rate p and the collision prob-
will be decremented by one if no collision occurs, respectively. ability pcl , the stationary distribution of the three-dimensional
The third equation models situations when the back-off counter Markov chain can be expressed as
returns to zero. To be specific, if a sensor node transmits its
data packet without any collisions (the data packet is removed b0,0,∗ = p, (7)
from the buffer) and generates a new data packet in the slot bi,0,∗ = ppicl , (8)
(the new data packet is pushed into the buffer), the sensor node p (wi − i) picl
will start a new back-off process in the same layer. Finally, the bi,j,∗ = , (9)
wi (1 − pcl )
fourth equation models the situation that the sensor node will
p 4p2cl − (w0 + 4) pcl + w0 + 1
go to the next back-off stage i + 1 in the same layer and initial b−1 = 1 − 2 , (10)
the back-off counter value (which is chosen between zero and 2(1 − pcl ) (1 − 2pcl )
wi+1 − 1), if a collision is detected at the ith back-off stage in which i ≥ 1, 0 ≤ j ≤ wi − 1, and wi = 2i w0 . Moreover,
and no data packet arrives. the idle probability of the sensor nodes is given by
When the number c of data packets in the buffer changes,
the state transition diagram of the discrete-time Markov chain pidle = b−1 . (11)
is shown in Fig. 3(b) and the non-zero transition probabilities Proof. Since all the states are connected and the Markov
are as follows: chain is irreducible, the Markov chain has an unique stationary
distribution. More details are shown in Appendix A. ■
Pr {−1, −1, 0 |−1, −1, 0} = 1 − p
According to the stationary distribution of the Markov
p
Pr {0, j, 1 |−1, −1, 0} =
chain acquired in Proposition 1, we can get the transmission
w0 probability ptx and the collision probability pcl of the sensor
Pr {−1, −1, 0 |i, 0, 1} = (1 − p)(1 − pcl )
nodes, as shown in the following theorem.
(1 − p)(1 − pcl ) Theorem 1. Given the packet rate p and the stationary dis-
Pr {0, j, k |i, 0, k} = k≥2 (6)
w0 tribution b of the Markov chain, the transmission probability
ppcl
Pr {i + 1, j, k + 1 |i, 0, k} = k≥1
ptx and the collision probability pcl of the sensor nodes in the
w i+1 network satisfies
{i, |i, k≥1
Pr j, k + 1 j, k} = pp cl p
ptx = , (12)
Pr {i, j − 1, k + 1 |i, j, k} = p(1 − pcl ) k ≥ 1.
1 − pcl
410 JOURNAL OF COMMUNICATIONS AND NETWORKS, VOL. 25, NO. 3, JUNE 2023
N −1
pcl = 1 − (1 − ptx ) , (13) Equation (17) can be interpreted as follows. In each slot of the
transmission, the service would be completed with probability
in which N is the number of sensor nodes.
µCA at the end of that slot and would be continued in the next
Proof. Note that a sensor node attempts to transmit its data slot with probability 1 − µCA .
packets every time when its back-off counter value is equal Remark 1. Under the condition that the packet rate approaches
to zero. Therefore, the transmission probability ptx is the the service rate, i.e., p → µCA , we have pidle → 0 from (16).
total probability that the sensor node is in state (i, 0, k), in
• Given the number N of sensor nodes, for each stable
which all i ≥ 0, k ≥ 1. The collision probability pcl is
buffer, the packet rate must satisfy p < µCA . Since µCA
the conditional probability that when a certain sensor node
is in fact a function of p, we can find the maximum
attempts to transmit its data packets, while at least having
achievable packet rate pmax in the process p → µCA , for
an interfering node transmits its data packets. Please refer to
which we have pidle = 0 from (16). From the expression
Appendix B for a detailed proof. ■
(11) of pidle and by combining (13) to (11), we have
According to (12) and (13), we further have the following
ptx 4p2cl − (w0 + 4) pcl + w0 + 1
expression about the collision probability pcl N −1
= 1, (19)
N −1 2(1 − ptx ) (1 − 2pcl )
p N −1
f (pcl ) = 1 − pcl − 1 − = 0. (14) in which pcl = 1 − (1 − ptx ) . In particular, we
1 − pcl
can solve ptx from (19) by using some mathematical
Since (14) is a nonlinear equation, we solve the collision tools (e.g., Matlab). We denote the real solution of ptx
probability pcl with Newton’s iteration method by iteratively is denoted as ptx and know that ptx is the maximum
using pcl = pcl − f (pcl )/f ′ (pcl ), starting from an initial value transmission probability. By substituting (13) into (12)
close to zero. The algorithm is shown in Algorithm 1. The and replacing ptx with ptx , the maximum packet rate can
proof of convergence of Newton’s iterative method can be be expressed as
found in [32, Chap. 7.4]. From Algorithm 1, we can obtain
N −1
pmax = ptx (1 − ptx ) . (20)
Algorithm 1 Solving for the collision probability pcl
• Likewise, for a fixed packet rate and a varying N , the idle
1: Input: Packet rate p, the number of node N , and tolerable iterative error ϵ
2: Output: pcl : Collision probability probability pidle also approaches zero as N approaches the
(0)
3: Initialize: pcl maximum available number Nmax of the system. Thus, we
4: while: ∆ > ϵ, do
have
5: i=i+1
(i) (i−1) (i−1) (i−1)
/f ′ pcl
6: Calculate pcl = pcl − f pcl p 4p2cl − (w0 + 4) pcl + w0 + 1
7: (i)
Calculate ∆ = |pcl − pcl
(i−1)
| 2 = 1. (21)
8: (i)
Let pcl = pcl
2(1 − pcl ) (1 − 2pcl )
9: End While
By expressing ptx in terms of pcl (cf. (13)) and solving
pcl from (21) (denoting the real solution of pcl as pcl ),
the collision probability pcl . The transmission probability ptx Nmax can be then expressed as
and the idle probability pidle can also be acquired by using
(12) and (11), respectively. ln (1 − pcl )
Nmax = +1 , (22)
It is worth noting that a sensor node can transmit the data ln (1 − ptx )
packet successfully in each slot only if the node gets the in which ⌊x⌋ represents the largest integer not exceeding
chance to use the channel and no collision occurs. Therefore, x.
the probability of a sensor node successfully delivering a data
packet in each slot can be expressed as
B. Transmissions of the Slotted ALOHA Based Network
ps = ptx (1 − pcl ) = p. (15)
In the slotted ALOHA based network, we refer to a certain
Accordingly, we can obtain the service rate of a sensor node sensor node arbitrarily selected from the N sensor nodes as
of the network using the CSMA/CA protocol as follows the reference node while referring to the remaining N − 1
p sensor nodes except the reference node as the other nodes.
µCA = . (16)
1 − pidle To evaluate the interference of the other nodes on the
We denote the time at which a sensor node successfully reference node, we need to know the busy probability pbsy
transmits a data packet as the service time Sk and model the of the other nodes. Specifically, a sensor node is said to be
service time Sk as a geometric distribution with parameter in the busy state if its buffer is not empty and in the idle
µCA . That is, state otherwise. Thus, the idle probability pidl and the busy
probability pbsy of a sensor node satisfies pidl + pbsy = 1.
j−1
Pr {Sk = j} = µCA (1 − µCA ) , j = 1, 2, · · ·. (17) It is clear that an idle sensor node will not crowd the
channel. Only when a sensor node is in busy state, the sensor
Further, the average service time can be represented as
node would compete for the channel. The busy probability pbsy
1 and (re)transmission probability λ of a sensor node, therefore,
E [Sk ] = . (18)
µCA have a decisive effect on crowdedness of the channel.
LI et al.: TIMELINESS OF WIRELESS SENSOR NETWORKS WITH RANDOM ... 411
allowable number of sensor nodes can be expressed by In this situation, due to the sparse arrival of data packets,
ln λp
the shared channel is rarely occupied by transmissions and
Nmax = +1 , (33) the inter-arrival time would be large. Therefore, in most
ln (1 − λ)
circumstances, the data packets received by the remote receiver
in which ⌊x⌋ denotes the largest integer that is not greater are not fresh.
than x. Second, when the packet generation rate reaches the max-
imum allowable packet rate (i.e., p → pmax , at this time,
C. Average AoI of the Networks pmax → µ ), it is seen from (39) that the average AoIs of
the network also is infinity.
For each node, we note that the arrival of data packets
In this situation, since the high packet arrival rate leads
follows the Bernoulli process with the parameter p and the
to frequent collisions occurring, the shared channel is always
service time Sk obeys the geometric distribution with the
congested. Therefore, the service time of the data packet may
parameter µ. Thus, the transmission process of each node can
be arbitrarily long, making the average AoIs infinite.
be modeled by a Geom/Geom/1 queue. Moreover, we model
the queuing process as a late-arriving system with delayed
access. Under this model, the probability generating function IV. S IMULATION R ESULTS
(PGF) of the system time Tk of a packet is given by the
In this section, we investigate the average AoI of the
following lemma.
networks via the numerical and the Monte Carlo simulation
Lemma 1. For a given the data packet arrival rate p, the PGF results. We set the minimum competition window as w0 = 8.
of the system time Tk is given by We assume that both the networks using the CSMA/CA and
βz slotted ALOHA protocols are homogeneous. That means that
GT (z) = , (34) the packet rates of all the nodes are the same. For the fairness
1 − (1 − β) z
of comparison, we also ensure that the transmission probability
in which
ptx of the network employing the CSMA/CA protocol and the
µ−p slotted ALOHA protocol are equal, which can be realized by
β= . (35)
1−p adjusting the (re)transmission probability λ.
Proof. A detailed proof of the probability generation function First, we observe from Figs. 5(a) and 5(b) that the trans-
of the system time Tk of the Geom/Geom/1 queuing model mission probabilities ptx of the networks using the CSMA/CA
can be found in [33, Chap. 3.1.2]. ■ protocol is increasing with both the packet rate p and the
number N of nodes. This is because the increase in packet
Equation (34) shows that the system time Tk obeys the
rate p leads to a larger probability of non-empty buffer, which
geometric distribution of parameter β. Thus, the probability
further leads to a larger transmission probability ptx . Likewise,
distribution of the system time and the average system time
an increase in the number of nodes leads to more attempts of
of data packets are expressed, respectively, as
transmitting and thus a larger transmission probability ptx . It
j−1
Pr {Tk = j} = β(1 − β) , j ≥ 1, (36) is also observed in Fig. 5(a) and Fig. 5(b) that the Monte
Carlo simulation (MC) results match our theoretical results
1 (TH) very well.
E [Tk ] = . (37) It is observed from Fig. 6(a) and Fig. 6(b) that the collision
β
probability pcl of the networks using the CSMA/CA protocol
Based on this Geom/Geom/1 queuing model, the average
increases with the packet rate p and the number N of nodes.
AoI of the network can be obtained, which is given by the
This is because as the packet rate and the number N of nodes
following theorem.
increases, there will be more contentions in the transmissions.
Theorem 2. Given the generation rate p of data packets, the Moreover, according to the derivations, we also find that with
average AoI of the network is given as follows: packet rate and the number of nodes increase both transmission
¯ = 1 + p + 1−p − p .
∆ (38)
and collision probabilities increase in polynomial with an order
p µ µ − p µ2 of three.
In Fig. 7(a), we show how the average AoIs of the
Proof. See Appendix D. ■
CSMA/CA and slotted ALOHA based networks varies with
From Theorem 2, we can obtain the average AoIs of the the packet rate p, in which the number of sensor nodes is
two networks using the CSMA/CA protocol and the slotted set to N = 20. First, we observe that as the packet rate
ALOHA protocol, in which the service rate µ are given, p increases, the average AoI is decreasing first and then
respectively, by (16) and (25). increasing. When the packet rate p is relatively small or large,
In the following, we study two extreme cases of the network the average AoIs are quite large. This is because the waiting
using two random multiple access strategies and obtain the time for the new updates are large when the packet rate is
subsequent results. small while collisions occur more frequently and thus the
First, as the generation rate of data packets approaches zero service time is larger when the packet rate is large. Second,
(i.e., p → 0), according to (39), it is clear that the average for the CSMA/CA based network, the average AoI reaches
AoIs of the network goes to infinity. the minimum when the packet rate p is close to 0.014; in the
LI et al.: TIMELINESS OF WIRELESS SENSOR NETWORKS WITH RANDOM ... 413
0.05 0.5
0.04 0.4
0.03 0.3
0.02 0.2
0.01 0.1
0 0
0.001 0.004 0.007 0.01 0.013 0.016 0.001 0.004 0.007 0.01 0.013 0.016
(a) Transmission probability ptx versus the packet rate p (N = 20) (a) Collision probability pcl versus the packet rate p (N = 20)
0.05 0.5
0.04 0.4
0.03 0.3
0.02 0.2
0.01 0.1
0 0
4 10 16 22 28 34
4 10 16 22 28 34
Number of nodes N
(b) Transmission probability ptx versus the number of nodes N (p = 0.01) (b) Collision probability pcl versus the number of nodes N (p = 0.01)
Fig. 5. Change in the transmission probability ptx . Fig. 6. Change in the collision probability pcl .
slotted ALOHA based network, the average AoI is minimized as the population of nodes grows, the frequency of collisions
when the packet rate p is close to 0.011. With the increase in becomes larger, and the service time would also be longer. In
packet rate p, the CSMA/CA based network performs better particular, the change in the average AoI of the CSMA/CA
than the slotted ALOHA based network. Third, we observe based network is relatively flat compared to the change in
that the Monte Carlo simulation results and theoretical results the average AoI of the slotted ALOHA based network. We
of the slotted ALOHA based network match well while the also observe that the performance of the CSMA/CA based
Monte Carlo simulation results and theoretical results of the network is better than the slotted ALOHA based network as
CSMA/CA based network slightly diverges when p > 0.013. the number N of sensor nodes is increased. Moreover, it is
For the CSMA/CA protocol, the mismatch between analysis seen from Fig. 7(b) that the Monte Carlo simulation results
and simulation is because the distribution of the real service of the slotted ALOHA based network match well with the
time deviates from the geometric distribution as the packet theoretical results, while the Monte Carlo simulation results
rate and the number of nodes increase. of the CSMA/CA based network deviate slightly from the
Fig. 7(b) presents how the average AoIs of the networks theoretical results when N > 24.
change with the number N of the sensor node when the packet From Figs. 7(a) and 7(b), we also see that the average
rate is set to p = 0.01. As is shown, the average AoI is increas- AoI of the CSMA/CA based network is always smaller than
ing with the number N of the sensor nodes. This is because that of the slotted ALOHA based network, regardless of the
414 JOURNAL OF COMMUNICATIONS AND NETWORKS, VOL. 25, NO. 3, JUNE 2023
1400 0.25
1200
0.2
1000
0.15
800
600
0.1
400
0.05
200
0 0
0 0.005 0.01 0.015 0.02 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016
(a) Average AoI versus the packets packet rate p (N = 20 and λ = 0.03) Fig. 8. Service rate µ versus packet rate p.
1200
protocol and the slotted ALOHA protocol AoI comes from
their different service rates. We observe from Fig. 8 that the
1000 service rate of the network using the CSMA/CA protocol is
always much larger than that of the slotted ALOHA protocol.
800 From Fig. 8 and Theorem 2, the difference in AoI performance
when the network uses these two protocols can be explained.
600
This suggests that CSMA/CA is superior to slotted ALOHA
and maybe is the most promising mode in the design of WSN
systems.
400 In addition, we investigate how the average AoI varies with
packet rate p in the finite buffer and finite retransmission cases
200 (for CSMA, i.e., the maximum number of back-off stages)
through Monte Carlo simulations, in which the buffer size is
set to 30 packets, the number of retransmission is set to 8, and
0
4 10 16 22 28 34 we use ‘finite’ to denote finite buffers and retransmission. It
is observed from Fig. 7(a) that the average AoI with packet
rate p for the finite buffer and retransmission cases remains
(b) Average AoI versus the number of the nodes N (p = 0.01 and consistent with that for the infinite buffer and retransmission
λ = 0.0186)
cases. That is, a 30 packets buffer and 8 retransmissions are
Fig. 7. Change in the average AoI. enough for the network.
In practical wireless sensor networks, since the data packet
generation rates of the sensor nodes are not necessarily the
same, we also study the performance of heterogeneous net-
packet rate p and the number N of nodes. Note that for works by Monte Carlo simulations. That is, the packet rates
comparison fairness, the attempt probability λ of the slotted of the nodes are different from each other. In particular, the
ALOHA protocol is chosen in such a way that the transmission packet rates of the nodes are randomly chosen in a finite
probabilities of the two scheme are equal for given the packet range [0, 2pmax ] while ensuring their average is equal to the
rate p. For example, we have λ = 0.03 when the number of packet rate p of the corresponding homogeneous network.
sensor nodes is set to N = 20; we have λ = 0.0186 when the From Figs. 5(b), 6(b) and 7(b), the changes in transmission
packet rate is set to p = 0.01. From (13) and (24), it is clear probability ptx , the collision probability pcl , and the average
that the collision probabilities pcl of the two networks using AoIs are with similar modes to the corresponding homoge-
the CSMA/CA protocol and the slotted ALOHA protocol are neous networks.
equal when their transmission probabilities ptx are the same.
According to Theorem 2, we can see that the average AoI of
the network is related to the packet rate p and the service rate V. C ONCLUSION
µ. For a given same packet rate p case, it is the service rate In this paper, we investigated the timeliness of two wireless
that determines the average AoI of the network. Therefore, the sensor networks using the CSMA/CA protocol and the slotted
difference in network performance by using the CSMA/CA ALOHA protocol. We showed that the average AoI would
LI et al.: TIMELINESS OF WIRELESS SENSOR NETWORKS WITH RANDOM ... 415
be larger when the packet rate is small or relatively large. been decreased to j, the expected sojourn time at the state
With the same transmission probability, the average AoI of the would be
network employing the CSMA/CA protocol is always smaller X∞
1
than that one using the slotted ALOHA protocol, irrespective L̄ = l (1 − pcl )pl−1
cl = . (44)
1 − pcl
of the packet rate and the growth in the number of nodes. l=1
In addition, we also found that the effects of variation of the Afterwards, the state eventually transits to the state (i, 0, ∗)
transmission probability ptx , the collision probability pcl , and and stay for exactly one slot. Therefore, the stationary prob-
the average AoIs of the heterogeneous networks are basically ability for the node to be in state (i, j, ∗) can be expressed
similar to that in the homogeneous networks. It is noted that as
the limitation of methods developed in this paper assumes that
p (wi − j) picl
each update takes one slot. In future work, we shall consider bi,j,∗ = L̄ Pr {J ≥ j} bi,0,∗ = , (45)
where multiple slots are required for each update and there wi (1 − pcl )
exist some hidden nodes. in which i ≥ 0, 0 ≤ j ≤ wi − 1, and we use (39). Moreover,
we also can apply the dynamic equilibrium equation to the
A PPENDIX Markov chain to prove (45).
A. Proof of Proposition 1 Finally, by the normalized condition of the stationary dis-
tribution, we have
Proof. First, for a given data packet arrival rate p < µCA ,
∞ i −1
∞ wX
it is clear that each data packet in the node buffer will be X X
successfully delivered within a certain period. Especially, in b−1 = b−1,−1,0 = 1 − bi,0,∗ − bi,j,∗
the zeroth back-off stage, the back-off counter will definitely i=0 i=0 j=1
∞ ∞ wi −1
return to zero eventually and stay at state (0, 0, k) for some ppicl X
X X j
k ≥ 1 for exactly one slot. Therefore, we have b0,0,∗ = p. =1− − ppicl 1−
i=0 i=0
1 − pcl j=1 wi
Second, a state will transfer from the (i, 0, ∗) to the (i+1)th
2
back-off stage if a collision occurs in the current slot. In this p 4pcl − (w0 + 4) pcl + w0 + 1
=1− 2 . (46)
case, the state returns to and stays at state (i+1, 0) for exactly 2(1 − pcl ) (1 − 2pcl )
one slot, and thus we have
This completes the proof of the Proposition 1. ■
bi,0,∗ pcl = bi+1,0,∗ , (39)
in which i ≥ 0. Further, we have B. Proof of Theorem 1
bi,0,∗ = picl b0,0,∗ = ppicl , (40) Proof. Based on Proposition 1 and the fact that every at-
tempted transmission occurs when the back-off counter is zero,
in which i ≥ 0. In fact, we are able to use the dynamic
the transmission probability ptx can be expressed as
equilibrium property of the stationary Markov chains to prove
∞ ∞
the (40). To this end, we shall divide the state space into two X X p
parts: The states (i′ , j, k) with i′ ≤ i and the states (i′′ , j, k) ptx = bi,0,∗ = picl b0,0,∗ = . (47)
i=0 i=0
1 − pcl
with i′′ ≥ i. Since the total transiting probability from the
left part to right part is equal to the total transiting probability It is seen from (47) that the transmission probability ptx de-
from the right part to the left part, thus we have pends on the collision probability pcl , which is also unknown.
∞ To address the unknown collision probability, it is worth noting
that the collision probability refers to the probability that at
X
bi,0,∗ pcl = bi′′ ,0,∗ (1 − pcl )
i′′ =i+1
least one of the remaining N − 1 nodes in the same slot will
∞
X interfere. Consequently, the collision probability pcl can be
= bi+1,0,∗ (1 − pcl ) + bi′′ ,0,∗ (1 − pcl ), (41) expressed by the transmission probability ptx ,
i′′ =i+2 N −1
pcl = 1 − (1 − ptx ) , (48)
which yields
∞
in which, ptx is the transmission probability of the data
packets, (1 − ptx ) is the non-transmission probability of the
X
bi+1,0,∗ pcl = bi′′ ,0,∗ (1 − pcl ). (42) N −1
i′′ =i+2
data packets, (1 − ptx ) is the probability that none of the
N −1
remaining N − 1 nodes transmits, and (1 − (1 − ptx ) ) is
By combining (41) with (42), (39) can be obtained readily.
the probability that at least one of the remaining N − 1 nodes
We denote the initial back-off counter of the i-th back-off
transmits, i.e., the collision probability pcl .
stage as J and have
This completes the proof of the Theorem 1. ■
wi − j
Pr {J ≥ j} = , (43)
wi
C. Proof of Proposition 2
in which 0 ≤ j ≤ wi − 1. We know that a node has a
opportunity to stay at state (i, j, ∗) only if the initial back- Proof. According to the state transition diagram of the
off counter J is no less than j. As the back-off counter has discrete-time Markov chain given in Fig. 4, when the steady-
416 JOURNAL OF COMMUNICATIONS AND NETWORKS, VOL. 25, NO. 3, JUNE 2023
K
state is reached, the transfer in is equal to the transfer out, we k−1 1 X
= lim Ak
have the following balance equations M →∞ M k − 1
k=1
j
X l−1 [9] A. M. Bedewy, Y. Sun, and N. B. Shroff, “Optimizing data freshness,
=1− β(1 − β) throughput, and delay in multi-server information-update systems,” in
l=1 Proc. IEEE ISIT, 2016.
j [10] Y. Sun, E. Uysal-Biyikoglu, R. D. Yates, C. E. Koksal, and N. B. Shroff,
= (1 − β) . (65) “Update or wait: How to keep your data fresh,” IEEE Trans. Inf. Theory,
vol. 63, no. 11, pp. 7492–7508, Nov. 2017.
Moreover, E [Xk Wk ] can be represented as [11] G. Bianchi, “Performance analysis of the IEEE 802.11 distributed
coordination function,” IEEE J. Sel. Areas in Commun., vol. 18, no. 2,
pp. 535–547, Mar. 2000.
E [Xk Wk ] = E [Xk max (0, Tk−1 − Xk )] [12] K. Duffy, D. Malone, and D. J. Leith, “Modeling the 802.11 distributed
∞ ∞ coordination function in non-saturated conditions,” IEEE Commun. Lett.,
X X vol. 9, no. 8, pp. 715–717, Aug. 2005.
= i Pr {Xk = j} Pr {max (0, Tk−1 − i) > j} [13] B. S. Tsybakov and V. A. Mikhailov, “Ergodicity of a slotted ALOHA
i=1 j=0 system,” Probl. Inf. Transm., vol. 15, no. 4, pp. 73–87, 1979.
X∞ X∞ [14] S. Ghez, S. Verdu, and S. C. Schwartz, “Stability properties of slotted
= i Pr {Xk = j} Pr {Tk−1 > i + j} ALOHA with multipacket reception capability,” IEEE Trans. Autom.
Control, vol. 33, no. 7, pp. 640–649, Jul. 1988.
i=1 j=0 [15] M. Wang and Y. Dong, “Broadcast age of information in CSMA/CA
′
based wireless networks,” in Proc. IEEE ACM IWCMC, 2019.
= lim (H (z)) [16] A. Maatouk, M. Assaad, and A. Ephremides, “On the age of information
z→1 −
in a CSMA environment,” IEEE/ACM Trans. Netw, vol. 28, no. 2,
p (1 − β) pp. 818–831, Apr. 2020.
= lim−
z→1 β [17] A. Maatouk, M. Assaad, and A. Ephremides, “Minimizing the age of
information in a CSMA environment,” in Proc. WiOPT, 2019.
(1 − (1 − p) (1 − β) z + z (1 − p) (1 − β))
× 2
[18] M. Moltafet, M. Leinonen, and M. Codreanu, “Worst case age of
(1 − (1 − p) (1 − β) z) information in wireless sensor networks: A multi-access channel,” IEEE
Wireless Commun. Lett., vol. 9, no. 3, pp. 321–325, Mar. 2020.
p (1 − β)
= 2. (66) [19] L. Li, Y. Dong, C. Pan, and P. Fan, “Age of information of CSMA/CA
β(1 − (1 − p) (1 − β)) based wireless networks,” in Proc. IEEE ACM IWCMC, 2022.
[20] M. O’Kennedy, T. Niesler, R. Wolhuter, and N. Mitton, “Practical
By replacing β in (66) with (35), we further have evaluation of carrier sensing for a LoRa wildlife monitoring network,”
in Proc. IFIP Networking Conf. (Networking), 2020.
p (1 − µ) [21] C. Pham, “Investigating and experimenting CSMA channel access
E [Xk Wk ] = . (67) mechanisms for LoRa IoT networks,” in Proc. IEEE WCNC, 2018.
(µ − p) µ2
[22] R. D. Yates and S. K. Kaul, “Status updates over unreliable multi-
According to (59) to (63) and (67), the average AoI can be access channels,” in Proc. IEEE ISIT, Aachen, Germany, Jun. 2017,
pp. 331–335.
expressed as [23] X. Chen, K. Gatsis, H. Hassani, and S. S. Bidokhti, “Age of information
¯ = pE [Ak ] in random access channels,” in Proc. IEEE ISIT, 2020.
∆ [24] I. Kadota, A. Sinha, and E. Modiano, “Scheduling algorithms for
1 1 optimizing age of information in wireless networks with throughput
= p E [Xk ] + E Xk2 + E [Xk ] E [Sk ] + E [Xk Wk ] constraints,” IEEE/ACM Trans. Netw., vol. 27, no. 4, pp. 1359–1372,
2 2 Aug. 2019.
1 2−p 1 p (1 − µ) [25] R. D. Yates and S. K. Kaul, “Age of information in uncoordinated
=p + + + unslotted updating,” in Proc. IEEE ISIT, 2020.
2p 2p2 pµ (µ − p) µ2 [26] A. Munari, “On the value of retransmissions for age of infor-
1 p 1−p p mation in random access networks without feedback,” Available:
= + + − . (68) https://doi.org/10.48550/arXiv.2205.15077.
p µ µ − p µ2 [27] H. Chen, Y . Gu, and S.-C. Liew, “Age-of-information dependent random
Thus, the proof of Theorem 2 has been completed. ■ access for massive IoT networks,” in Proc. IEEE INFOCOM, 2020.
[28] O. T. Y avascan and E. Uysal, “Analysis of slotted ALOHA with an age
threshold,” IEEE J. Sel. Areas Commun., vol. 39, no. 5, pp. 1456–1470,
May 2021.
[29] J. T. Lim and Y. Han, “Spreading factor allocation for massive connectiv-
R EFERENCES ity in LoRa systems,” IEEE Commun. Lett., vol. 22, no. 4, pp. 800–803,
Apr. 2018.
[1] H. Habibzadeh et al., “A Survey of healthcare Internet of Things (HIoT): [30] M. de Castro Tom, P . H. J. Nardelli, and H. Alves, “Long-range low-
A clinical perspective,” IEEE Internet Things J., vol. 7, no. 1, pp. 53–71, power wireless networks and sampling strategies in electricity metering,”
Jan. 2020. IEEE Trans. Ind. Electron., vol. 66, no. 2, pp. 1629–1637, Feb. 2019.
[2] B. V. Philip, T. Alpcan, J. Jin, and M. Palaniswami, “Distributed real- [31] Y. A. Al-Gumaei, N. Aslam, X. Chen, M. Raza, and R. I. Ansari,
time iot for autonomous vehicles,” IEEE Trans. Ind. Informat., vol. 15, “Optimizing power allocation in LoRaWAN IoT applications,” IEEE
no. 2, pp. 1131–1140, Feb. 2019. Internet Things J., vol. 9, no. 5, pp. 3429–3442, March, 2022.
[3] S. Chaudhary, R. Johari, R. Bhatia, K. Gupta, and A. Bhatnagar, [32] Q. Li and N. Wang, Numerical analysis, Tsinghua University Press,
“CRAIoT: Concept, review and application(s) of IoT,” in Proc. IoT-SIU, Beijing, China, 2008.
2019. [33] N. Tian and X. Xu, Discrete time queuing theory, Science Press, Beijing,
[4] S. Kaul, M. Gruteser, V. Rai, and J. Kenney, “Minimizing age of China, 2008.
information in vehicular networks,” in Proc. IEEE SECON, 2011. [34] Y. Dong, Z. Chen, and P. Fan, “Timely two-way data exchanging in
[5] S. Kaul, R. Yates, and M. Gruteser,“Real-time status: How often should unilaterally powered fog computing systems,” IEEE Access, vol. 7,
one update?,” in Proc. IEEE INFOCOM, 2012. pp. 21103–21117, 2019.
[6] J. P. Champati, H. Al-Zubaidy, and J. Gross, “Statistical guarantee
optimization for age of information for the D/G/1 queue,” in Proc. IEEE
INFOCOM, 2018.
[7] A. Soysal and S. Ulukus, “Age of information in G/G/1/1 systems: Age
expressions, bounds, special cases, and optimization,” IEEE Trans. Inf.
Theory, vol. 67, no. 11, pp. 7477–7489, Nov. 2021.
[8] S. K. Kaul, R. D. Yates, and M. Gruteser, “Status updates through
queues,” in Proc. CISS, 2012.
418 JOURNAL OF COMMUNICATIONS AND NETWORKS, VOL. 25, NO. 3, JUNE 2023
Liang Li received the B.S. degree in Communica- Pingyi Fan (M’03-SM’09) received the B.S. de-
tion Eengineering from Nanjing University of Infor- gree from the Department of Mathematics, Hebei
mation Science and Technology, Nanjing, China, in University, in 1985, the M.S. degree from Nankai
2020, and he is currently pursuing the M.S. degree in University in 1990, and the Ph.D. degree from
Eelectronic Information from Nanjing University of the Department of Electronic Engineering, Tsinghua
Information Science and Technology. His research University, Beijing, China, in 1994.
interests include the performance evaluations of From August 1997 to March 1998, he visited the
wireless networks and age of information. Hong Kong University of Science and Technology
as a Research Associate. From May 1998 to October
1999, he visited the University of Delaware, USA, as
a Research Fellow. In March 2005, he visited NICT,
Japan, as a Visiting Professor. From June 2005 to May 2014, he visited The
Hong Kong University of Science and Technology many times. From July
2011 to September 2011, he was a Visiting Professor with the Institute of
Yunquan Dong (M’15) received the B.S. degree Network Coding, The Chinese University of Hong Kong. He is currently a
in Electronic and Information Engineering from Professor with the Department of EE, Tsinghua University. His main research
Qingdao University in 2005, the M.S. degree in interests include B5G technology in wireless communications, such as MIMO,
Communication and Information Systems from Bei- OFDMA, network coding, network information theory, machine learning, and
jing University of Posts and Telecommunications big data analysis.
2008, and the Ph.D. degree in Communication and Dr. Fan is an Overseas Member of IEICE. He has received some aca-
Information Engineering from Tsinghua University, demic awards, including the IEEE WCNC08 Best Paper Award, the ACM
Beijing, in 2014. IWCMC10 Best Paper Award, the IEEE Globecom14 Best Paper Award, the
He was a BK Assistant Professor with the De- IEEE ICC20 Best Paper Award, the IEEE TAOS Technical Committee20
partment of Electrical and Computer Engineering, Best Paper Award, and the CIEIT Best Paper Awards in 2018 and 2019.
Seoul National University, Seoul, South Korea, from Also, he has received the IEEE ComSoc Excellent Editor Award for IEEE
2015 to 2016. He is currently a Professor with the School of Electronic T RANSACTIONS ON W IRELESS C OMMUNICATIONS in 2009. He has attended
and Information Engineering, Nanjing University of Information Science and to organize many international conferences, including as the General Co-Chair
Technology, Nanjing, China. His research interests include the performance of EAI Chinacom 2020 and IEEE VTS HMWC 2014, the TPC Co-Chair
evaluations and performance optimizations of wireless networks, with recent of IEEE International Conference on Wireless Communications, Networking
focus on age of information and ubiquitous sensing. and Information Security (WCNIS 2010), and the TPC Member of IEEE
ICC, GLOBECOM, WCNC, VTC, and INFOCOM. He is also a Reviewer
of more than 30 international journals, including 20 IEEE journals and eight
EURASIP journals. He has served as an Editor for IEEE T RANSACTIONS
ON W IRELESS C OMMUNICATIONS , International Journal of Ad Hoc and
Chengsheng Pan received the B.S. and M.S. de- Ubiquitous Computing (Inderscience), journal of Wireless Communications
grees from Nanjing University of Science and Tech- & Mobile Computing (Wiley), Electronics (MDPI), and Open Journal of
nology, in 1984 and 1987, respectively, and the Mathematical Sciences.
Ph.D. degree from Northeastern University, in 2001.
Since 1989, he has been an Assistant Professor
with Shenyang Ligong University. He is currently
a Professor with the Nanjing University of Infor-
mation Science and Technology and a part-time
Ph.D. advisor with the Nanjing University of Science
and Technology. He has authored three books and
more than 150 articles. His research interests include
intelligent network traffic theory and key technologies.