A Framed Slotted ALOHA-Based MAC for Eliminating Vain Wireless Power Transfer in Wireless Powered IoT Networks

: Multiple access control (MAC) is crucial for devices to send data packets and harvest wireless energy in wireless powered Internet of Things (IoT) networks. A framed slotted ALOHA (FSA) protocol is employed in several practical networks. This paper studies an FSA-based MAC in a centralized wireless powered IoT network, including half-duplex devices and a full-duplex base station transmitting wireless energy in an intended direction. Under such a network, it is possible that a half-duplex device contends for a time slot to transmit a packet while the base station transmits wireless energy to the device in the same time slot, which causes vain charging and wastes the opportunity to charge other devices. To eliminate the vain charging, this paper designs a MAC in which a base station utilizes the information conveyed from devices in advance to arrange the charging order of devices. The novelty is to develop an algorithm to ﬁnd a charging order of half-duplex devices instead of using full-duplex devices to eliminate the vain charging. Event-driven simulations are conducted to study the performance of the proposed MAC. Simulation results show that the proposed MAC produces better system performances than the system not eliminating the vain charging. In summary, the application of the proposed MAC yields the beneﬁts of higher throughput and lower packet loss.


Introduction
In Internet of Things (IoT) networks, various sensors, actuators and smart devices automatically communicate with each other, which can provide diverse and extensive IoT services and applications, for examples, Industry 4.0, smart grid, smart home, smart cities, smart transportation, and smart healthcare etc., some of the surveys in IoT services and applications can be found in [1][2][3]. Since IoT devices are usually low-power and stand-alone devices, it is crucial to replenish the energy of the IoT devices and prolong the operation time of IoT networks. Therefore, a number of technologies, such as solar, kinetic, thermal, and wireless power transfer, and so on, are developed [4]. Among the current energy harvesting technologies, radio frequency (RF) energy harvesting is one promising solution to supply energy to IoT devices in a convenient and cost-effective manner. In RF energy harvesting, a device harvests energy from an RF energy signal transmitted from a base station (also called a power transmitter or access point). There are many studies in RF energy harvesting; some of the surveys in RF energy harvesting are in [5][6][7][8][9].
More devices would lead to more requirements for radio spectrum access. There are a number of ways to provide more spectrum access for IoT devices in a limited radio resource. One possible way is full-duplex communication, which is a promising technology to increase spectrum efficiency at the expense of increased hardware complexity and energy consumption [10]. As a base station is equipped with the module of full-duplex communication, the base station could send and receive on a channel at the same time. That is, a base station could send an RF charging signal and receive information simultaneously.
In [11,12], a base station receives information and broadcasts RF charging signal simultaneously, and devices merely work in a half-duplex mode due to the reason of low-cost and easy implementation. Then, devices attempting to transmit cannot harvest RF energy in a time slot; however, those devices not sending information could harvest RF energy in the time slot. In [11], a device harvests wireless energy from those time slots in which the device does not transmit. In [12], each device continuously harvests wireless energy from the base station until it transmits data in its dedicated slot. Works in [11,12] assume that each device is allocated a dedicated time slot to send data; thus, there is no discussion on the time slot contention problem between devices.
A number of papers study RF energy harvesting and data transmission in contentionbased (or called random-access-based) multiple access control (MAC) protocols. In [13], a carrier sense multiple access with collision avoidance (CSMA/CA)-based MAC is presented to balance the charging time and communication time in order to improve the system performance. In [14], a fair polling-based MAC is proposed to use a device's energy harvesting rate to adjust its contention probability. In [15][16][17][18], a number of papers study RF energy harvesting and data transmission in the architecture of framed slotted ALOHA (FSA) protocol, which is a slotted ALOHA variant and is employed in several practical systems, for examples, machine-type communication networks [19], radio frequency identification (RFID) [20], and low-power wide-area networks (LPWAN) [21,22]. Due to several benefits of simplicity, low delay for short packets, without sensing in devices and without requiring initial connection setup, etc., the FSA is suitable for devices in IoT [23,24] and has been restudied recently. This paper focuses on RF energy harvesting and data transmission in the FSA system. In the FSA, time is divided into frames, and each frame is divided into time slots. At the beginning of a frame, each device having a packet to send selects a time slot in the frame randomly and contends for the time slot. If the device does not receive an acknowledgment from a base station, the device attempts to send in the next frame. In [15], a base station utilizes idle time slots to transmit RF energy. The base station detects whether a signal appears at the beginning of a time slot. If there is no signal, the base station sends an RF charging signal to all the devices in the coverage of the base station; otherwise, the base station receives and decodes the signal in the time slot. In [16], a time slot is divided into two phases. In the first phase, a base station broadcasts an RF charging signal to devices. The devices harvest the RF energy and store the energy in its battery. In the second phase, devices contend for slots to send data. The paper presents a proportionally fair resource allocation and determines (i) the optimal transmission power of base stations and (ii) the optimal duration of the two phases. In [17], a base station is equipped with successive interference cancellation, which can decode multiple transmissions; in the paper, a frame is divided into two parts. The first part is used for a base station to send an RF charging signal to charge devices equipped with batteries; the second part is further divided into time slots that are used to transmit data. Authors present distributed Q-learning-based channel access strategies to determine the transmission power of devices. The paper assumes that there is a saturated data buffer in each device, which implies that a device always has a data packet to transmit. In [15][16][17], a base station and devices work in a half-duplex mode. Therefore, as a base station receives data transmission, the base station cannot transmit. Moreover, the base station transmits RF energy in an omnidirectional manner. In [18], a base station works in full-duplex communication and transmits RF energy in an omnidirectional manner.
Instead of wireless power transfer in an omnidirectional manner (i.e., broadcasting RF charging signal), directional wireless power transfer [25][26][27][28][29][30] is used to increase the power intensity in the intended direction, which replenishes the energy of devices in superior energy transfer efficiency and reduces the energy waste of a base station. Since a base station equipped with directional antennas increases the energy density in an intended direction, the base station can have a longer energy transmission distance, which can be used in, for example, ecology monitoring in a forest where devices are far away from the base station [31]. Moreover, since the base station does not send energy in unintended directions, the base station can reduce its power consumption and prolong its operation time, which is especially important from the perspective of a stand-alone base station or a base station using green energy. In [29,30], directional energy transfer has been used to charge devices in IoT. In [26], data transmission and directional wireless power transfer are performed in different channels. In the channel of data transmission, devices send data in a time division multiple access (TDMA) manner. In [27], a device harvests energy in an energy harvesting slot and sends data in an energy consumption slot. An adaptively directional wireless power transfer is proposed to adapt an energy transfer strategy to the locations of devices and maximize the received power of devices. In [28], a time slot is divided into two parts. In the first part, a device sends data; in the second part, directional wireless power transfer is performed. In [26][27][28], the base station is half-duplex, and data transmission and energy harvesting are not studied in the FSA. To the best of our knowledge, there is no research on directional wireless power transfer in the FSA protocol.
This paper is the first work to study the FSA-based protocol on directional wireless energy transfer networks, including a full-duplex base station that can simultaneously send an RF charging signal and receive packets. The main difference between this work and the prior work [18] is that the base station in this work uses directional wireless energy transfer due to the superior energy transfer efficiency. There is an advantage of wireless power transfer in the FSA versus TDMA. Consider that a device sends data in successive frames. For a device assigned a dedicated slot in TDMA, the device cannot harvest energy in the frames since data transmission occupies the slot assigned to the device. However, for a device in the FSA, the device may harvest energy in the slots where the device does not send data because slots are sharable among devices. The main contributions of this paper are summarized as follows: • This paper is the first work to identify the vain charging problem in an FSA-based directional wireless energy transfer network, which is not studied before. In the FSA-based networks, devices randomly select time slots to send packets, while a base station independently uses its charging policy to select devices to charge devices. It is possible that a device contends for a time slot while a base station uses the same time slot to send an RF charging signal to the device. As a half-duplex communicationbased device contends for a time slot, the device cannot receive an RF charging signal; that is, the RF charging is in vain.

•
To eliminate the vain charging, the objective of this paper is to design a MAC in which a base station utilizes the information conveyed from devices in advance to arrange the charging order of devices. The novelty is to develop an algorithm to find a charging order of half-duplex devices instead of using full-duplex devices to eliminate the vain charging. • Event-driven simulations are conducted to study the performance of the proposed MAC. Simulation results show that the proposed MAC produces better system performances (in terms of packet dropping ratio and throughput) than the system not eliminating the vain charging. In summary, the proposed MAC effectively eliminates the vain charging discovered herein and significantly improves the system performance.
The rest of this paper is organized as follows: Section 2 describes the system architecture, time slot and frame structure. Then, the proposed directional RF charging MAC is introduced in Section 3. Simulation results and discussions are described in Section 4. Finally, some concluding remarks are presented in Section 5.

System Model
In this section, we first introduce the system architecture considered in this paper. Next, we describe time slots and frame structures used in the MAC under the system architecture. Figure 1 illustrates the system architecture studied in this paper. There are devices in the coverage of a base station. The base station works in a full-duplex transmission mode; that is, the base station can send an RF charging signal to devices and receive data packets at the same time. In order to reduce the cost of devices, devices are half-duplex devices. That is, as a device transmits a data packet, the device cannot harvest an RF charging signal from a base station. Time is divided into time slots. The base station would omnidirectionally broadcast a message including system and control information to devices in a broadcast time slot. According to the received broadcast message, a device would use the message, the packets in its queue and the energy in its battery to enable a MAC procedure to contend for a time slot to send its packets. When the base station receives the data packets transmitted from the device, the data packet is further forwarded to other networks or a destination. In order to charge devices, a base station would use directional wireless power transfer to send an RF charging signal to a device. With the aid of RF localization of the devices [32], a base station obtains the precise positions of devices. Then, a base station transfers energy in a narrow range, which reduces energy consumption and interference. For simplicity, it is assumed that a base station sends an RF charging signal to one device in a time slot. The detailed procedure in the MAC will be described in Section 3.

System Model
In this section, we first introduce the system architecture considered in this paper. Next, we describe time slots and frame structures used in the MAC under the system architecture. Figure 1 illustrates the system architecture studied in this paper. There are devices in the coverage of a base station. The base station works in a full-duplex transmission mode; that is, the base station can send an RF charging signal to devices and receive data packets at the same time. In order to reduce the cost of devices, devices are half-duplex devices. That is, as a device transmits a data packet, the device cannot harvest an RF charging signal from a base station. Time is divided into time slots. The base station would omnidirectionally broadcast a message including system and control information to devices in a broadcast time slot. According to the received broadcast message, a device would use the message, the packets in its queue and the energy in its battery to enable a MAC procedure to contend for a time slot to send its packets. When the base station receives the data packets transmitted from the device, the data packet is further forwarded to other networks or a destination. In order to charge devices, a base station would use directional wireless power transfer to send an RF charging signal to a device. With the aid of RF localization of the devices [32], a base station obtains the precise positions of devices. Then, a base station transfers energy in a narrow range, which reduces energy consumption and interference. For simplicity, it is assumed that a base station sends an RF charging signal to one device in a time slot. The detailed procedure in the MAC will be described in Section 3. A device is equipped with the module of RF energy harvesting to harvest an RF charging signal. Moreover, a device is equipped with a battery to store the harvested RF energy. The base station is assumed to be powered by a stable and unlimited power. Since an RF signal could carry information, receivers can retrieve information data and harvest RF energy at the same time; this technology is called "simultaneous wireless information and power transfer" (SWIPT) in [33][34][35][36][37]. The devices herein are equipped with the module of SWIPT. Therefore, as devices receive broadcast information, the devices could harvest RF energy. A device is equipped with the module of RF energy harvesting to harvest an RF charging signal. Moreover, a device is equipped with a battery to store the harvested RF energy. The base station is assumed to be powered by a stable and unlimited power. Since an RF signal could carry information, receivers can retrieve information data and harvest RF energy at the same time; this technology is called "simultaneous wireless information and power transfer" (SWIPT) in [33][34][35][36][37]. The devices herein are equipped with the module of SWIPT. Therefore, as devices receive broadcast information, the devices could harvest RF energy. Figure 2 displays the structures of time slots and frames. In this paper, time is first divided into frame times, and then a frame time is further divided into time slots. Time slots are classified into two types: downlink slots and uplink slots. In downlink slots, data packets are sent from a base station to devices. In uplink slots, devices send packets to the base station. The ratio of downlink slots to uplink slots is predetermined by a system operator considering traffic in a system. Since most traffic in the IoT is uplink traffic [38], a mere one downlink slot is included in a frame herein. The downlink slot is used as a broadcast slot. The broadcast time slot is at the beginning of each frame. During the broadcast slot time, a base station broadcasts a message including system and control information to devices, for example, frame synchronization, the number of slots in a frame, the acknowledgments in the previous frame. Next, consecutive time slots follow the broadcast time slot. The number of time slots in a frame is fixed, and the number is specified by system managers. The first time slot following the broadcast slot, as shown in Figure 2, is further divided into many mini-slots, each of which is allocated to one device in advance. A device uses its mini-slot to send its residual energy information to the base station.

Structures of Time Slots and Frames
Electronics 2021, 10, x FOR PEER REVIEW 5 of 20 Figure 2 displays the structures of time slots and frames. In this paper, time is first divided into frame times, and then a frame time is further divided into time slots. Time slots are classified into two types: downlink slots and uplink slots. In downlink slots, data packets are sent from a base station to devices. In uplink slots, devices send packets to the base station. The ratio of downlink slots to uplink slots is predetermined by a system operator considering traffic in a system. Since most traffic in the IoT is uplink traffic [38], a mere one downlink slot is included in a frame herein. The downlink slot is used as a broadcast slot. The broadcast time slot is at the beginning of each frame. During the broadcast slot time, a base station broadcasts a message including system and control information to devices, for example, frame synchronization, the number of slots in a frame, the acknowledgments in the previous frame. Next, consecutive time slots follow the broadcast time slot. The number of time slots in a frame is fixed, and the number is specified by system managers. The first time slot following the broadcast slot, as shown in Figure 2, is further divided into many mini-slots, each of which is allocated to one device in advance. A device uses its mini-slot to send its residual energy information to the base station. The mini-slot is used to merely send a device's necessary information to the base station. Thus, the length of the mini-slot is short. The remaining time slots are used to carry data packets from a device to the base station. It is assumed that one data packet is sent in a time slot. A device uses a contention procedure to contend for a time slot to send a packet. In a broadcast slot, a base station broadcasts a message to devices; each device attempts to use SWIPT to harvest wireless energy in the broadcast slot. For each time slot following the group of mini-slots in a frame, a base station selects a device to send RF energy, and the device attempts to harvest the RF energy. In [39], a base station uses energy beamforming to directionally send wireless energy to a device in a time slot, to another device in the next slot, and so on; such an energy transfer scheme has good performance with lower complexity. This paper employs the technology that a base station sends wireless energy directionally to a device in a slot time; thus, it is assumed that an The mini-slot is used to merely send a device's necessary information to the base station. Thus, the length of the mini-slot is short. The remaining time slots are used to carry data packets from a device to the base station. It is assumed that one data packet is sent in a time slot. A device uses a contention procedure to contend for a time slot to send a packet. In a broadcast slot, a base station broadcasts a message to devices; each device attempts to use SWIPT to harvest wireless energy in the broadcast slot. For each time slot following the group of mini-slots in a frame, a base station selects a device to send RF energy, and the device attempts to harvest the RF energy. In [39], a base station uses energy beamforming to directionally send wireless energy to a device in a time slot, to another device in the next slot, and so on; such an energy transfer scheme has good performance with lower complexity. This paper employs the technology that a base station sends wireless energy directionally to a device in a slot time; thus, it is assumed that an RF charging signal is sent to a device in a slot. Reference [40] provides a survey of energy beamforming and some descriptions of a sharp beam.

Structures of Time Slots and Frames
There are several examples of energy transfer and packet transmission in Figure 2. In slot 1, device 2 and device i contend for the same time slot, and the two packets collide with each other. The base station cannot receive packets successfully. In the slot M-1, mere one device, device 1, sends a data packet to the base station. Thus, the base station successfully receives the data packet. In slot 2, there is no device to send a packet. From slot 1 to slot M, a base station selects a device and sends an RF charging signal to the device. Note that in slot M, device 2 sends a data packet, and at the same time, the base station sends an RF charging signal to device 2; however, the device is half-duplex, and thus, the device cannot harvest the RF charging signal. This phenomenon is called "vain charging". The proposed directional wireless charging MAC would avoid the vain charging, which will be described in detail in Section 3.

The Multiple Access Control with the Proposed Directional Wireless Charging Scheme
In this section, we describe a multiple access control used by base stations and devices in which the proposed directional wireless power transfer scheme is embedded. Since the proposed MAC is based on FSA, which core idea is random access, the MAC considers the mechanism that devices randomly select time slots to send packets. Other multiple access mechanisms, such as reservation schemes, are not the focus of this paper but could be studied in the future. We describe the MAC in the first two subsections: Section 3.1: data transmission and Section 3.2: energy sending and harvesting. In the last subsection, we use pseudocodes to represent the algorithms of the MAC procedures for devices and a base station and use an example to explain the mechanism of MAC, which eliminates the vain charging problem.

Data Transmission
A broadcast slot is positioned at the beginning of a frame. In the broadcast time slot, a device receives the broadcast information sent from a base station. A device would use the synchronization information in the broadcast information to synchronize with the base station. Following the broadcast time slot is a dedicated slot available for mini-slots. Each device sends its energy information in its corresponding mini-slot to the base station. There are M consecutive time slots following the dedicated time slot. If there is at least one packet in a device's queue, the device will attempt to send a packet in the remaining M time slots. A device would first check the residual energy stored in its battery. If the residual energy is greater than a predetermined threshold, called stop transmission threshold, the device randomly selects one time slot among the M time slots and contends for the time slot to transmit a packet. If the device's residual energy is less than or equal to the stop transmission threshold, the device will not contend for a time slot to send a packet. In order to avoid the vain charging, a device would in advance send its random selection in its corresponding mini-slot to the base station.
A base station listens to packets from devices. If there is merely one device transmitting a packet in a time slot, the base station receives the packet. Then, the base station replies an acknowledgment message to the device in the next broadcast slot. If there are two or more devices transmitting packets in a time slot, the packets will collide with each other. Then, the base station receives corrupted packets. The base station would not send an acknowledgment message. Those devices sending corrupted packets would attempt to re-send the same data packets with a permission probability p, where 0 ≤ p ≤ 1, in the next frame. Such an attempt of packet retransmission would be repeated until the delay of the packet exceeds a predetermined delay deadline. When the packet delay is greater than the delay deadline, the packet is dropped.

RF Energy Sending and Harvesting
In this subsection, we describe the RF energy transfer between a base station and devices.

RF Energy Sending
In a broadcast slot, a base station omnidirectionally sends an RF signal carrying broadcast messages. Except in the broadcast time slot and the dedicated slot for mini-slots, a base station would send an RF charging signal to charge one device in a time slot; thus, a base station should determine which device is selected to be charged. The selection procedure is as follows: During the dedicated slot time for mini-slots, a base station would receive (i) the information of the residual energy of devices and (ii) the random selection of devices. The random selection of a device is the time slot that a device randomly selects at the beginning of the dedicated slot. The base station collects the information of the residual energy and random selection and maintains a table recording the information. At the beginning of a time slot, the base station would first use the residual energy information in the table to select the device whose residual energy is the minimum in the table. If there is a tie, the base station randomly selects one device. Next, the base station checks whether or not the random selection of the selected device is the current time slot. If the random selection of the selected device is the current time slot, the base station gives up the selected device and attempts to select another device from the remaining devices in order to avoid the vain charging. The base station uses the above procedure to select another device whose residual energy is the minimum among the remaining devices until (i) the random selection of the selected device is not the current time slot or (ii) no device can be selected. If the random selection of the selected device is not the current time slot, the selected device is the device to which the base station sends an RF charging signal.

RF Energy Harvesting
A device harvests RF energy in a time slot only when the device does not send a packet in the time slot. It is possible for a device to harvest RF energy in a broadcast slot or other time slots (except in the dedicated slot for mini-slots). Since a base station broadcasts messages omnidirectionally in a broadcast time slot, each device can harvest RF energy in the broadcast time slot. If the battery of a device is not fully charged, the device can use the SWIPT technology to harvest RF energy in the broadcast time slot. For each of the time slots following the group of mini-slots in a frame, when a device does not send a packet in a time slot, the device can harvest RF energy in the time slot if (i) the base station transmits an RF charging signal to the device at the time slot and (ii) the battery of the device is not fully charged.

Pseudocodes and an Example
In this subsection, we first list the pseudocodes for devices and a base station as follows: Then, we give an example to explain the mechanism of the MAC to eliminate the vain charging.
Algorithm 1 shows the pseudocode for the MAC performed in a device D i . At the beginning of a frame, device D i uses the pseudocode to transmit packets and harvest energy. In the pseudocode, time slots that are available for devices to send packets are numbered by S 1 , S 2 , . . . , S M . As device D i has no packet to send, the random selection R i of the device D i is assigned to be S 0 , which is indicated in line 5 in Algorithm 1. Algorithm 2 shows the pseudocode for the MAC used in a base station BS. At the beginning of a frame, BS uses the pseudocode to receive packets and transmit RF energy. if (D m 's random selection is not S j ) then 10 Send an RF charging signal to D m while attempt to receive packets 11 else 12 Attempt to receive packets 13 end 14 end Table 1 shows an example of the information that is maintained in a base station. In this example, there are four devices, D i , where i = 1, 2, 3, 4, and four time slots S j , where j = 1, 2, 3, 4. Table 1 displays the residual energy and the random selection of the four devices. In the beginning, i.e., in slot S 1 , a base station would use a table to select the device whose residual energy is the minimum; the selected device is device D 2 ; however, the random selection of the device D 2 is also slot S 1 . Then, if the base station sends an RF charging signal to device D 2 in slot S 1 , the RF charging is in vain. Therefore, the base station gives up selecting device D 2 and uses the table to select another device whose residual energy is the minimum among the remaining three devices. Then, the selected device is device D 4 . Since the random selection of the device D 4 is slot S 4 , device D 4 can harvest RF energy in slot S 1 . Therefore, the base station sends an RF charging signal to the device D 4 in slot S 1 .

Simulation Results and Discussions
In this section, we examine the performances of the proposed directional wireless power transfer scheme embedded in the MAC. We study three directional wireless power transfer schemes, which in turn are "full-duplex transmission without vain charging", "full-duplex transmission", and "half-duplex transmission". The "full-duplex transmission without vain charging" is the proposed scheme herein. The "full-duplex transmission" herein refers to the full-duplex scheme not eliminating vain charging. The "half-duplex transmission" refers to a scheme in which a base station uses half-duplex communication to send an RF charging signal merely in an idle time slot. Event-driven simulations are conducted to study the performances of the three wireless charging schemes, which are, respectively, labeled as "FD w/o vain charging", "FD", and "HD" in Figures 3-6. To fairly compare the performances of the three schemes, the same simulation scenario is applied in the three systems. In the future, the proposed MAC could be further implemented to study its performances in a real environment.

Performance Measures
The performance metrics used in this paper are duty cycle, collision probability, packet dropping ratio, and throughput, which are, respectively described as follows: For each device, the duty cycle is defined as the ratio of the total time spent in the sending and receiving states to the total operation time. In the simulation, the duty cycle is calculated as the ratio of a device's mean number of slots in transmissions and receptions to the total time slots. The duty cycle could be used to observe the transmission and reception time of devices and the degree of power consumption of devices. The collision probability is defined for a data transmission attempt as the probability that a data transmission would collide with another data transmission. In the simulations, the mean collision probability is calculated as the ratio of the number of collisions to the total number of transmissions. The packet dropping ratio is defined for a data packet as the probability that a data packet is dropped; in the simulations, the packet dropping ratio is calculated as the ratio of the number of the dropped packets to the total packet arrivals. In order to observe the performances in different traffic loads, the mean data arrival is defined as the ratio of the offered traffic to the maximum traffic offered in time slots. The mean data arrival is the x-axis of Figures 3-6. The throughput is defined as the successfully transmitted traffic offered in the simulation. As shown in Figure 6, the throughput is expressed as the successfully transmitted data arrival.

Simulation Parameters and Traffic Mode
An event-driven simulator is used to conduct extensive simulations [41] to compare the performances of the studied schemes. Table 2 lists the values of the system parameters used in the simulations. Packets are generated in devices. A Poisson process is used to generate packet arrivals. The Poisson process has been used in some use cases, for example, next-generation mobile network (NGMN) and event-triggered traffic [42]. In a Poisson process, the packet inter-arrival time is an exponential distribution. For simplicity, mere exponential packet inter-arrival time is considered herein. Thus, for all the three energy harvesting schemes in the simulations, packet inter-arrival time distribution is an exponential distribution. In a device, packets are transmitted in a first-in-first-out manner. A packet is transmitted at the beginning of a time slot. The size of a packet is predefined. A packet usually includes a fixed-length header field containing control information and a payload field containing data. As the size of a packet is longer, the ratio of the header to a packet is lower. Although a device can send one or more packets in a slot time, for simplicity and the reduction in the header overhead, a device herein sends one packet in a slot time.  Devices harvest RF energy at a certain harvesting rate. The energy harvesting rate would be about the order of microwatts, which is sufficient for the low-power devices in IoT [43,44]. According to the characteristics of devices, various devices have different requirements for power consumption. Therefore, for simplicity and ease of presentation, the RF energy harvested by a device in a time slot is denoted by β. The β means that the harvested RF energy provides β times of the energy required to send a packet in a time slot. In the simulations, there are two RF energy harvesting rates in a time slot, 1 and 0.5, used in the three systems. Since devices also harvest RF energy in broadcast slots, the RF energy harvested in a broadcast slot is denoted by γ, which means that the harvested RF energy in a broadcast slot provides γ times of the energy required to send a packet in a time slot.
The event-driven simulation closely simulates the FSA procedure at a MAC level, which benefit is to easy to observe the relation between the performance measures and the FSA operation at a MAC-layer protocol concerned herein. Thus, the simulation uses a number to represent the RF energy harvesting rate in a time slot at a MAC level instead of using the detailed parameters of RF signals at a physical layer, which may be a deficiency from the viewpoint of a physical layer; however, the detailed physical parameters of RF signals applied to the FSA can be discussed in the future from the perspective of a cross-layer protocol between MAC and physical layers. The event-driven simulation has been used herein to yield the maximum throughput of slotted ALOHA in the condition of sufficient energy. The percentage of the difference between the yielded maximum throughput of 0.365 and the theoretical maximum throughput of e −1 ≈ 0.368 in [45] is less than one percent. Figure 3a,b shows the duty cycles of the three systems under different loads when the β value is 1 and 0.5, respectively. From the figures, we can observe a number of phenomena.

•
First, in the light load, the three systems produce similar duty cycles because the energy of the devices in the three systems is sufficient to satisfy the transmission and reception in the light load. • Second, in the middle and heavy loads, the system of base stations with half-duplex communication produces a lower duty cycle than the other two systems because the base station in the former system sends an RF charging signal merely in an idle time slot and then has a lower opportunity to charge devices than that in the latter two systems. The system with less energy satisfies fewer transmissions and receptions under middle and heavy loads, which yields a lower duty cycle. • Third, for the two systems with full-duplex communication, the system without vain charging yields a higher duty cycle than that with vain charging in the middle and heavy loads. The reason is as follows: In the system without vain charging, devices have more energy to transmit and receive. • Fourth, in the light load, the systems with different values of β produce a similar duty cycle. The reason is as follows: Although lower β implies longer charging time and devices have lower energy on average, the energy in devices is sufficient to transmit packets in the light load and then a similar duty cycle is yielded. • Fifth, the system with a lower value of β produces a lower duty cycle in the middle and heavy loads because lower β implies longer charging time, and the devices have insufficient energy to transmit and receive in middle and heavy loads. • Sixth, for the system without vain charging in Figure 3a, the duty cycle is increasing the load because sufficient energy is available for devices to send more traffic. For the remaining systems in Figure 3a,b, the duty cycle is increasing with the increasing load as the load is light. When the load is middle and heavy, the curves of the duty cycles in the remaining systems approach flat because the amount of energy in the devices restricts the time to transmit and receive.
Electronics 2021, 10, x FOR PEER REVIEW 9 of 20 Table 1. Information in a base station's table.

Simulation Results and Discussions
In this section, we examine the performances of the proposed directional wireless power transfer scheme embedded in the MAC. We study three directional wireless power transfer schemes, which in turn are "full-duplex transmission without vain charging", "full-duplex transmission", and "half-duplex transmission". The "full-duplex transmission without vain charging" is the proposed scheme herein. The "full-duplex transmission" herein refers to the full-duplex scheme not eliminating vain charging. The "half-duplex transmission" refers to a scheme in which a base station uses half-duplex communication to send an RF charging signal merely in an idle time slot. Event-driven simulations are conducted to study the performances of the three wireless charging schemes, which are, respectively, labeled as "FD w/o vain charging", "FD", and "HD" in Figures 3-6. To fairly compare the performances of the three schemes, the same simulation scenario is applied in the three systems. In the future, the proposed MAC could be further implemented to study its performances in a real environment. (a)

•
First, in the light load, the three systems produce similar collision probability because the energy of the devices in the three systems is sufficient to transmit packets. Thus, a similar number of data transmission yields similar collision probability. • Second, under middle and heavy loads, the system with half-duplex communication produces lower collision probability than the other two systems. This is because the base station in the former system sends an RF charging signal merely in an idle time slot, and devices in the former system then have lower energy and opportunity to contend time slots, which yields lower collision probability. • Third, for the two systems with full-duplex communication, the system without vain charging yields higher collision probability than that with vain charging in the middle and heavy loads. The reason is as follows: When vain charging is eliminated, devices have higher energy on average and have a higher opportunity to contend for time slots, which causes higher collision probability. • Fourth, in the light load, the systems with different values of β produce similar collision probability. The reason is as follows: Although lower β implies longer charging time, the energy in devices is sufficient to contend for time slots to transmit packets in the light load. • Fifth, the system with a lower value of β produces lower collision probability in the middle and heavy loads because lower β implies less harvested energy, which leads to fewer packet transmission attempts in the middle and heavy loads. Then, the opportunity to contend for time slots is lower, and then collision probability is also lower. • Sixth, for the system without vain charging in Figure 4a, the collision probability is increasing with increasing load because sufficient energy is available for devices to contend time slots. For the remaining systems in Figure 4a,b, the collision probability is increasing with the increasing load as the load is light. When the load is middle and heavy, the curves of the collision probabilities in the remaining systems approach flat. This is because the amount of energy in the devices restricts the opportunity to contend for time slots, which limits the number of contentions and yields a flat collision probability.
(b)    Figure 5a,b show the packet dropping ratios of the three systems under different loads when the β value is 1 and 0.5, respectively. From the figures, we can observe a number of phenomena.

•
First, in the very light load, the three systems produce a similar packet dropping ratio because the devices in the three systems have a similar duty cycle and collision probability. The similar duty cycle implies that packets have a similar situation to be sent; a similar collision probability implies that packets have a similar probability of being collided. Therefore, in the systems, the situation that packets are not sent within a deadline is similar. • Second, under middle and heavy loads, the system with half-duplex communication produces a higher packet dropping ratio than that with full-duplex communication.
The reason is as follows: The base station using half-duplex communication merely sends RF charging signals in idle time slots, and thus, devices have lower energy. Then, more packets are not sent within a deadline, which yields a higher packet dropping ratio. • Third, for the two systems with full-duplex communication, the system without vain charging yields a lower packet dropping ratio than that with vain charging in the middle and heavy loads. The reason is as follows: As vain charging is eliminated, devices would have higher energy on average and have a higher probability to send packets within a deadline, which causes a lower packet dropping ratio. • Fourth, in the very light load, the systems with different values of β produce a similar packet dropping ratio. This is because the systems have a similar duty cycle and collision probability in the light load, which implies that packets have a similar situation to be sent and have a similar probability of being collided. Thus, the systems have a similar packet dropping ratio. • Fifth, with increasing load, packet dropping ratio is also increasing because more traffic packets would cause more serious collisions, and more collisions further prolong packet delay such that the opportunity of packet delay exceeding the delay deadline is increased.

•
First, in the light load, the three systems produce similar throughput because packets in the three systems suffer a similar packet dropping ratio, and then similar throughput is yielded. • Second, under middle and heavy loads, the system with half-duplex communication produces lower throughput than the other two systems. This is because the halfduplex communication-based base station charges devices merely in idle time slots. Then, devices have less energy, and fewer packets are sent successfully. • Third, under middle and heavy loads, the system without vain charging produces higher throughput than that with vain charging. This is because devices in the former system have more wireless charge opportunities than those in the latter system. Devices with higher energy have a higher opportunity to transmit packets successfully. • Fourth, in the middle and heavy loads, the system with a lower β value produces lower throughput than that with a higher β value. This is because a lower β value implies a longer charge time. Devices, on average, have less energy, and fewer packets are sent successfully. • Fifth, throughput is increasing with the increasing load as the load is light. This is because more data packets are sent successfully. Under middle and heavy loads, the throughput curves approach flat because the amount of energy in the devices restricts successful packet transmission. (b)

Performance Measures
The performance metrics used in this paper are duty cycle, collision probability, packet dropping ratio, and throughput, which are, respectively described as follows: For each device, the duty cycle is defined as the ratio of the total time spent in the sending and receiving states to the total operation time. In the simulation, the duty cycle is calculated as the ratio of a device's mean number of slots in transmissions and receptions to the total time slots. The duty cycle could be used to observe the transmission and reception time of devices and the degree of power consumption of devices. The collision probability is defined for a data transmission attempt as the probability that a data

Discussion
In a large-scale IoT network, a large number of devices can be connected based on a hierarchical architecture [46,47]. Moreover, for a base station, in order to accommodate more devices, multiple radio channels can be employed. Devices are distributed to radio channels, each of which the proposed FSA-based MAC performs on.
A device should be allocated a dedicated mini-slot to send its residual energy and its random selection. Thus, the number of mini-slots restricts the number of devices in a frame. Let m denote the number of devices accommodated in a frame time. Let N s denote the maximum number of mini-slots in a slot time. Then, the number of the dedicated slots required by the devices is equal to m/N s . The number of slots in a frame is equal to the ratio of a frame time T f to a slot time T l , i.e., T f /T l . From another viewpoint, the number of slots in a frame is the sum of (i) the number of downlink slots, N b , (ii) the number of the dedicated slots for the mini-slots required by the devices, m/N s , and (iii) the number of uplink data slots, N d . Thus, according to the total number of slots in a frame, we can obtain the following equation: Solving Equation (1), we can obtain the inequality as follows: The maximum number of devices in a frame, m, is the maximum integer m satisfies Equation (2). Given devices are allowed to access slots every α frames, the maximum number of devices in a base station with N c channels is αmN c .

Conclusions
This paper studies a centralized wireless powered communication network in which half-duplex communication-based devices are around a full-duplex communication-based base station. As directional wireless power transfer is applied in a time slot in the FSA that is widely deployed on many IoT networks, it is possible that a base station sends an RF charging signal to a device in a time slot while the device contends for the same time slot to transmit a packet, which causes that the RF charging is in vain and the opportunity to charge other devices is also wasted. To eliminate the vain charging, this paper designs a MAC in which a base station utilizes the information conveyed from devices in advance to arrange the charging order of devices. The novelty is to develop an algorithm to find a charging order of half-duplex devices instead of using full-duplex devices to eliminate the vain charging. Event-driven simulations are conducted to study the performances of the proposed MAC. Simulation results show that the proposed MAC produces better system performances (in terms of lower packet dropping ratio and higher throughput) than the system not eliminating the vain charging. In summary, the application of the proposed MAC yields the benefits of higher throughput and lower packet loss.
In the proposed MAC, with the increasing traffic load, the number of uplink data slots in a frame shall increase to transmit more packets. However, as the number of slots in a frame increases, the response of packet transmission is also increasing. Thus, the limitation of the MAC depends on the requirement of packet delay. For the traffic with a delay constraint, using more radio channels to distribute traffic is a possible way.