Internet of Things (IoT) represents one of the most significant paradigm shifts in recent decades poised to revolutionize several aspects of everyday life such as e-health and smart house. The new paradigm transforms every physical object into an intelligent entity capable of sensing, communicating and computing . Ericsson foresaw that by 2021, there will be around 28 billion IoT devices and a majority of them will be empowered by wireless communication technologies . Analysts predicted that by 2025, the economic impact of the IoT could reach US $11 trillion, or 11% of the global economy, and by 2030 IoT could influence nearly the entire economy .
A typical wireless IoT network is made up of three main ingredients: 1) IoT devices, 2) a communication network, and 3) gateways serving as information fusion nodes. The IoT devices are often deployed to observe the physical characteristic of a certain process, e.g., corrosion condition inside a refinery pipe, pollution levels within a gas factory, and speed and location of automated guided vehicles. The sensed data are transmitted through the communication network to the information fusion gateways where they are processed to extract useful information for the prediction, diagnostic, and decision making. For many applications, the usefulness of the information is heavily dependent on the freshness of the data measurements of the IoT devices when they arrive at the gateways .
Conventional performance metrics, e.g., throughput and delay, cannot adequately capture the information freshness. Specifically, due to the random network delay, maximizing throughput or minimizing delay does not necessarily guarantee the freshest information observed at the receivers . In this context, the AoI concept was coined in  as a new metric to measure the information freshness at the destination side. AoI is a function of both how often packets are transmitted and how much delay that packets experience in the system. The metric of AoI is of great importance in time-sensitive IoT applications where the timeliness of information is crucial, and thus has attracted increasing attention recently, see, e.g., [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] and references therein.
With the new metric of AoI, a fundamental design problem for large-scale wireless IoT networks is “how to schedule the status update packets of massive IoT devices in a decentralized manner towards achieving a low network-wide AoI?”. We note that there has only been limited work that attempted to answer this fundamental question [18, 19, 20, 21, 22]. Specifically, [18, 19, 20]
investigated age-independent stationary randomized policies, in which each transmitter sends its packet with a certain fixed probability that can be optimized for minimizing the network-wide AoI ahead of time. Very recently, and  devised age-dependent random access policies that can leverage the latest AoI at the transmitter and receiver sides to make age-based decisions at the transmitter side. The key difference between the random access policies proposed in  and  lies in how the channel access probability (CAP) of IoT devices is determined. Specifically, the CAP of each device in  is calculated based on conventional ALOHA backoff mechanisms, while the scheme in  uses a pre-determined CAP for each IoT end device. Moreover, the random access policy proposed in  is optimized only for the case when the number of devices approaches infinity. In contrast, the results presented in  are suitable for any number of IoT devices. Nevertheless, all the aforementioned work focused on theoretical design and analysis. The development and implementation of a working prototype to evaluate and further improve these random access policies have been overlooked.
As the first attempt to fill such a gap, in this paper we build a prototype for testing and comparing the recently proposed AoI-oriented random access protocols. Specifically, we develop a testbed based on the Ettus USRP software-defined radio (SDR) equipment. To enable a time slotted system, we devise an over-the-air time synchronization scheme. We also design the frame structures of various packets exchanged within the system. Finally, we design the workflow of experiments, and test and compare the performance of the concerned protocols in an office environment.
Our experiment results show that the experimental average AoI curves of both age-independent and age-dependent schemes match well with their theoretical counterparts derived in the literature, when the signal powers at the AP’s received antenna transmitted by different end devices are tuned to be roughly the same. The signal power at the AP’s received antenna will be referred to as the received power hereafter. To unveil the impact of different levels of received powers of end devices at the AP, we adjust the received powers for all the IoT devices at the AP into two levels. That is, one group of IoT devices has higher received power than the other group. Experiment results show that the average AoI of the group with a higher received power has a lower average AoI, while the group with a lower received power has a higher average AoI. The rationale behind this observation is that the status update packets from the group with a stronger received power may still be decoded successfully by the AP even when they collide with the status update packets from the other group. Furthermore, as the difference between the received power for the two groups increases, the gap between their average AoI tends to be stable.
The rest of the paper is organized as follows. In Sec. II, we describe some preliminaries on the system model, the definition of AoI, and the principles of the considered AoI-oriented random access protocols. Sec. III elaborates on the development of the SDR-based prototype. In Sec. IV, we present and discuss the experimental results. Finally, Sec. V concludes the paper.
Ii Preliminaries on System Model, AoI, and Protocols
In this section, we present some preliminaries on the system model, the definition of AoI, and the principles of the considered AoI-oriented random access protocols.
Ii-a System Model
Consider an uplink IoT network consisting of an AP serving as the gateway and IoT devices denoted by . All the IoT devices aim to report their statuses as timely as possible to the AP via a common wireless channel. Time is divided into slots of equal durations and the transmission of each status update packet takes exactly one time slot. All IoT devices implement a slotted ALOHA-like random access protocol. Specifically, during each time slot, each IoT device can become either active or inactive according to a probability. If the device is active during one time slot, it firstly samples the latest state of the underlying process and generates a status update packet at the beginning of the time slot, which is known as the “generate-at-will” model in the literature. The device then sends the generated status update packet to the AP. Otherwise, if the device chooses to be inactive, it stays idle during the time slot. Moreover, we assume that collisions happen if more than one device becomes active during the same time slot, and the AP cannot receive the status update packets correctly in collisions.
Ii-B Definition of the AoI
In this paper, the timeliness and freshness of the status update packets from the IoT devices at the AP are quantified by the recently proposed AoI metric. Denote by the index of time slots and denote by , , the instantaneous AoI of the -th IoT device in the time slot . We then can mathematically express as 
where is the generation time of the most recently received status update packet in the time slot .
We use to denote the indicator of the active or inactive status for device in the time slot . Particularly, means that the device is active during the time slot . Otherwise, . Based on the definition of the AoI, the instantaneous AoI of the device drops to one when the device is active and all the other devices are inactive, i.e., the device successfully delivers a status update packet to the AP. Otherwise, the instantaneous AoI of the device increases by one for each time slot. Mathematically, the evolution of the instantaneous AoI for the device can be expressed as
Based on the AoI evolution, the long-term average AoI for the -th IoT device can be defined as
Ii-C Principles of AoI-oriented Random Access Protocols
We now introduce the principles of the ALOHA-like AoI-oriented random access protocol proposed in .
Ii-C1 Age-Independent Random Access
In the AIRA protocol, devices access the channel with the same probability no matter whether their instantaneous AoI values are low or high. The AIRA protocol is easy to implement in a distributed manner. However, it has the shortcoming of not leveraging the instantaneous AoI information at the transmitter side . The performance of the AIRA protocol was analyzed and optimized in . More specifically, the average AoI of the considered -device network can be expressed as 
where is the fixed CAP of all IoT devices. The optimal CAP that minimizes the network wide average AoI is given by .
Ii-C2 Age-Dependent Random Access
To improve the system performance by properly leveraging the instantaneous AoI information available at the transmitter side,  developed an ADRA protocol. In the ADRA protocol, the CAP of each device is no longer a constant. Instead, the CAP varies according to the instantaneous age of the IoT devices. A key design problem for the ADRA protocol lies in “how to adjust the CAP as the instantaneous AoI values evolves?”. A simple yet effective strategy is to impose an age threshold such that those devices with instantaneous age being not larger than the threshold will keep silent, and those with instantaneous age exceeding the threshold will access the channel with a certain probability. In this paper, we focus on the implementation and evaluation of the ADRA protocol with a fixed threshold that was referred to as a threshold-based ADRA protocol in , which has been shown to have a better performance than the one proposed in .
In the ADRA protocol from 
, all IoT devices maintain a fixed age-dependent CAP vector, where denotes the active probability when the instantaneous AoI is equal to . Specifically, if the instantaneous AoI is no less than the threshold , the IoT device transmits with a fixed probability . Otherwise, the IoT device keeps idle with probability 1. Thanks to the simplified CAP model, an approximate closed-form expression of the average AoI for the ADRA protocol can be obtained and be given as 
Iii A Software-Defined Radio-based Prototype
In this section, we elaborate on the development of a proof-of-concept prototype by using a stream-oriented real-time SDR platform called GNURadio to test and verify the performance of the considered random access protocols. We use the Ettus USRP N210’s as transceivers: One USRP N210 serves as the AP and eight USRP N210s serve as the IoT devices.
All of them are connected to two powerful PCs111In principle, each USRP equipment can be connected to a dedicated PC for baseband signal processing. We connect multiple USRPs to one PC for saving the prototype cost. through multiple 1 Gigabit Ethernet cables and two Ethernet switches. A block diagram of the connections among the USRPs and PCs is given in Fig. 1. It is worth emphasizing that though some USRPs are connected to the same PC, they use individual local clocks on their motherboards, and thus the time synchronization among all devices is needed to guarantee that every device accesses the channel medium in a slotted manner. The SBX RF front-boards  embedded in USRPs are used to transmit RF signals, working at 1 GHz with 500 kHz channel bandwidth. We use a program developed in the GNURadio platform to define the signal generation and data processing in our SDR prototype. GNURadio is a mature software framework that provides a comprehensive library of signal processing blocks. With this powerful tool, users are able to design and deploy a real-world radio system on USRPs according to their own demands . A photograph of the developed proof-of-concept prototype is shown in Fig. 2. To ensure high transmission reliability when there is no collision as assumed in the previous section, we implement the convolutional code in the physical layer. Orthogonal frequency duplex modulation (OFDM) is used for higher frequency efficiency.
To realize time-slotted transmissions among the USRPs, we design a simple yet effective synchronized transmission scheme. The scheme involves three types of transmissions: (1) beacon broadcasting, (2) channel access, and (3) feedback. The beacon broadcasting phase aims to achieve the time synchronization. In this phase, the USRP that acts as the AP broadcasts a Beacon, which contains timing information to serve as a time reference for a slotted communication scenario. The duration of the inter-beacon period is determined by the precision of the USRP oscillator, which is set to 100 time slots in our experiments. In our prototype, each time slot is further split into two transmission slots, which are used to convey Status Update Packets and Feedback Packets, respectively. The channel access phase starts at the beginning of the subsequent transmission slot. The USRP(s) operating as IoT device(s) sends the Status Update Packet(s) to the AP if it chooses to be active according to the age threshold and CAP. Immediately following the IoT device(s)’ transmission slot, the AP broadcasts a Feedback Packet indicating the successful reception of a Status Update Packet. An IoT device only resets its AoI back to one if its identity is declared in the received Feedback Packet. Otherwise, its AoI increases by one.
For a better understanding, a diagram of the transmission scheme as well as the frame structures of three types of packets are depicted in Fig. 3. The functions and structures of these frames are elaborated in the following:
Beacon is sent by the AP and carries the time synchronization information. It includes the following parts
Bitrate gives the modulation bitrate information.
Destination ID is the broadcasting ID.
Source ID gives the AP’s node ID.
Beacon number is the current beacon’s number.
Payload carries the interval information.
Status Update Packet is sent by IoT devices. It is used for reporting the devices’ statuses or the related information to the AP.
Bitrate gives the modulation bitrate information.
Destination ID is the AP’s node ID.
Source ID gives the transmitting device’s node ID.
Slot number is the counting number of the current time slot.
Status Payload provides the device’s status information.
Feedback Packet is broadcasted by the AP. It is used for notifying IoT devices about the reception of Status Update Packet in the previous transmission slot, which allows each IoT device to calculate its instantaneous AoI.
Bitrate gives the modulation bitrate information.
Destination ID is the broadcasting ID.
Source ID gives the AP’s node ID.
Slot number is the counting number of the current time slot.
Feedback ID is the Node ID who successfully transmitted a Status Update Packet in previous transmission slot.
Feedback Payload provides other control information for the IoT devices.
Iv Experiment Results and Discussions
In this section, we will present the experimental average AoI of the ADRA and AIRA protocols obtained by using our prototype. We then discuss the impact of imbalanced received powers (i.e., the received powers of IoT devices are set to different levels) on the AoI performance.
Iv-a Performance in A Small-Scale Network Setup
We first evaluate and compare the performance of AIRA and ADRA protocols in an IoT network with a small number of devices. To that end, we conduct three experiments by varying the number of USRPs serving as the IoT devices from 6 to 8. For each experiment setup, we first adjust the transmit powers of the USRPs representing the IoT devices in the GNURadio program to ensure that their received powers at the AP are nearly the same. We then gradually change the values of the age threshold. For each age threshold, we find the optimal CAP value by utilizing the analytical results of the ADRA protocol derived in Sec. III of . Since the CAP in the AIRA protocol is not relevant to the instantaneous AoI, its age threshold and CAP values are fixed as 1 and , respectively. We next use these parameters to conduct packet transmissions while the host PCs connected to each IoT device record the AoI evolution. The experiment takes a duration of 800 time slots, and at the end of the experiment, we average the AoI for all the IoT devices according to the records in the host PCs. We also calculate the analytical average AoI of the ADRA and AIRA protocols using the mathematical expressions given in (4) and (5).
The experimental and the corresponding analytical results are shown in Fig. 4. We can see that for both protocols, the analytical and experimental results in terms of the average AoI are close to each other in each experimental case with the difference between them being no more than 0.3. The slight mismatches between them are caused by the packet misdetection when no collision happens. Note that we conduct the experiment in an office environment and our experiments show that the packet misdetection rate is around 2%, which could be caused by the USRP hardware imperfection.
Iv-B Performance in A Large-Scale Network Setup
To overcome the limitation on the number of available USRPs in our laboratory, we implement a new mechanism in the GNURadio program to drive one USRP for acting as multiple virtual IoT devices. The idea is to use one USRP to represent multiple IoT devices and emulate a part of transmission before ejecting Status Update Packets into the channel. At the beginning of each time slot, each virtual IoT device checks whether its AoI value exceeds the predefined age threshold. If not, the virtual IoT device keeps silent. Otherwise, it becomes active and tries to access the channel according to the CAP. For an USRP driven as multiple virtual IoT devices, if there is only one virtual IoT device chooses to be active, it will transmit a Status Update Packet to the AP. If not, it remains silent as an internal collision occurs. After the USRP receives a Feedback Packet from the AP, it will reset the AoI of the virtual IoT device whose identity is declared in the Feedback Packet back to one while increasing the AoI of the other devices by one. If there is no broadcasted Feedback Packet in the channel, the USRP will increase the AoI of all its underlying virtual IoT devices by one.
With the above improved GNURadio program, our prototype becomes capable to mimic larger IoT networks with more than 8 IoT devices. We then design an experiment to compare the performances of the AIRA and ADRA protocols in network setups with 8 to 40 virtual IoT devices. In each new experiment, the number of the virtual IoT devices increases by 8. We then conduct packets transmissions over more than 800 time slots and obtain the average AoI of the AIRA and ADRA protocols, respectively. At the end of the experiment, we again attain the analytical average AoI for both the AIRA and ADRA protocols by using the mathematical expressions given in (4) and (5).
The experimental and analytical results are plotted in Fig. 5. We can see that the experimental average AoI of the AIRA and ADRA protocol is still close to the analytical value in a larger IoT network with more than 10 nodes. Comparing Fig. 5 with Fig. 4, we can find that the average AoI of the ADRA protocol is always smaller than that of the AIRA protocol for the simulated cases. Besides, the gap between the average AoI of these two protocols increases with more virtual IoT devices deployed in the network. The reason for this observation is that the ADRA protocol provides more opportunities to IoT devices with higher AoI values to access the channel, and thus the IoT devices co-exist in a more harmonious way, leading to lower network-wide average AoI performance.
Iv-C Impact of Imbalanced Received Powers
In order to quantify the impact of different levels of received powers of IoT devices at the AP, we design three experiments with 4, 6 and 8 USRPs serving as IoT devices, respectively. In each experiment setup, we initially adjust the received powers of all IoT devices to be around 35dB at the AP. We then divide IoT devices into two groups and intentionally set their received powers into different levels. Specifically, we fix the received power of the lower group and then gradually increase the value of the received power for the higher group.
Fig. 6 shows the experimental and analytical average AoI results. Fig. 6 shows that when the received powers of IoT devices are equal, the two groups have approximately the same experimental average AoI. which are close to the analytical counterpart. AS the gap between the received powers of the two groups enlarges, Status Update Packets from the group with a stronger received power have a higher probability to be detected by the AP even under the collision with packets from the other group. As a result, the average AoI of the group with higher received power gradually decreases. After the gap between the received powers is larger than 8dB, the average AoI of the group with a higher received power tends to remain stable. This is because that the AP can easily decode the Status Update Packets correctly from the group with a higher received power even under the interference with the other lower group. Keep increasing the gap thus will not benefit the group with a higher received power further. For the group with a lower received power, because the AP can hardly decode its Status Update Packets correctly under the interference from the group with a higher received power, its average AoI is almost the same for different gaps.
In this paper, we developed a time slotted wireless prototype by using the Ettus USRP software-defined radio platform for experimental evaluation and comparison of recently proposed age-of-information-oriented ALOHA-like random access protocols. Our experimental results showed that the age-dependent random access policy outperforms its age-independent counterpart, which aligns well with the analytical results available in the literature. The analytical expression of average age of information available in the literature were derived based on the assumption that no packets can be decoded when there is a collision. Our experiments demonstrated that the curves of the analytical expressions can match well with the corresponding excremental curves when the received powers of all IoT devices at the access point are tuned to be roughly the same. Nevertheless, when there exist imbalanced received powers, mismatches between analytical and experimental results appear, which is caused by the fact that the packet with higher received power can be decoded correctly even when it collides with a packet with lower received power. This phenomenon is referred to as “capture effect”. This observation in our experiments motivates us to investigate the impact of capture effect on the average AoI of ALOHA-like random access protocols.
The authors thank Mr. Lihao Zhang for his constructive suggestions on the prototype development and thank Prof. Soung Liew for polishing the writing of the paper.
-  J. Lin, W. Yu, N. Zhang, X. Yang, H. Zhang, and W. Zhao, “A survey on internet of things: Architecture, enabling technologies, security and privacy, and applications,” IEEE Internet of Things Journal, vol. 4, no. 5, pp. 1125–1142, Oct 2017.
-  Ericsson, “Cellular networks for massive IoT,” Tech. Rep., Jan 2016.
-  M. G. Institute, “The Internet of Things: Mapping the value beyond the hype,” June 2015.
-  T. Shreedhar, S. K. Kaul, and R. D. Yates, “Acp: Age control protocol for minimizing age of information over the internet,” in Proceedings of the 24th Annual International Conference on Mobile Computing and Networking, 2018, pp. 699–701.
-  Y. Sun, E. Uysal-Biyikoglu, R. D. Yates, C. E. Koksal, and N. B. Shroff, “Update or wait: How to keep your data fresh,” IEEE Transactions on Information Theory, vol. 63, no. 11, pp. 7492–7508, Nov 2017.
-  S. Kaul, M. Gruteser, V. Rai, and J. Kenney, “Minimizing age of information in vehicular networks,” in 2011 8th Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks, June 2011, pp. 350–358.
-  I. Kadota, A. Sinha, E. Uysal-Biyikoglu, R. Singh, and E. Modiano, “Scheduling policies for minimizing age of information in broadcast wireless networks,” IEEE/ACM Transactions on Networking (TON), vol. 26, no. 6, pp. 2637–2650, 2018.
-  B. Wang, S. Feng, and J. Yang, “To skip or to switch? minimizing age of information under link capacity constraint,” in 2018 IEEE 19th International Workshop on Signal Processing Advances in Wireless Communications (SPAWC). IEEE, 2018, pp. 1–5.
-  Y. Gu, H. Chen, C. Zhai, Y. Li, and B. Vucetic, “Minimizing age of information in cognitive radio-based iot systems: Underlay or overlay?” IEEE Internet of Things Journal, 2019.
-  A. Maatouk, M. Assaad, and A. Ephremides, “Minimizing the age of information: Noma or oma?” arXiv preprint arXiv:1901.03020, 2019.
-  Y. Gu, H. Chen, Y. Zhou, Y. Li, and B. Vucetic, “Timely status update in internet of things monitoring systems: An age-energy tradeoff,” IEEE Internet of Things Journal, 2019.
-  Q. Wang, H. Chen, Y. Li, Z. Pang, and B. Vucetic, “Minimizing age of information for real-time monitoring in resource-constrained industrial iot networks,” arXiv preprint arXiv:1912.07186, 2019.
-  Q. Wang, H. Chen, Y. Li, and B. Vucetic, “Minimizing age of information via hybrid noma/oma,” arXiv preprint arXiv:2001.04042, 2020.
-  Q. Wang, H. Chen, Y. Gu, Y. Li, and B. Vucetic, “Minimizing the age of information of cognitive radio-based iot systems under a collision constraint,” arXiv preprint arXiv:2001.02482, 2020.
-  B. Li, H. Chen, Y. Zhou, and Y. Li, “Age-oriented opportunistic relaying in cooperative status update systems with stochastic arrivals,” arXiv preprint arXiv:2001.04084, 2020.
-  H. Chen, Q. Wang, Z. Dong, and N. Zhang, “Multiuser scheduling for minimizing age of information in uplink mimo systems,” arXiv preprint arXiv:2002.00403, 2020.
-  H. Chen, Q. Wang, P. Mohapatra, and N. Pappas, “Secure status updates under eavesdropping: Age of information-based physical layer security metrics,” arXiv preprint arXiv:2002.07340, 2020.
-  S. K. Kaul and R. D. Yates, “Status updates over unreliable multiaccess channels,” in Proc. 2017 IEEE International Symposium on Information Theory (ISIT), June 2017, pp. 331–335.
-  R. Talak, S. Karaman, and E. Modiano, “Distributed scheduling algorithms for optimizing information freshness in wireless networks,” in Proc. 2018 IEEE 19th International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), June 2018, pp. 1–5.
-  A. Kosta, N. Pappas, A. Ephremides, and V. Angelakis, “Age of information performance of multiaccess strategies with packet management,” Journal of Communications and Networks, vol. 21, no. 3, pp. 244–255, June 2019.
-  X. Chen, K. Gatsis, H. Hassani, and S. S. Bidokhti, “Age of information in random access channels,” arXiv preprint arXiv:1912.01473, 2019.
-  H. Chen, Y. Gu, and S.-C. Liew, “Age-of-information dependent random access for massive IoT networks,” in IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS). IEEE, 2020.
-  https://kb.ettus.com/Selecting_a_RF_Daughterboard, accessed Jan. 23, 2020.
-  https://www.gnuradio.org/, accessed Jan. 23, 2020.