# Intelligent Channel Allocation for Age of Information Optimization in Internet of Medical Things

Authors: Kefeng Wei; Lincong Zhang; Shupeng Wang
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Along with the development of realtime applications, the freshness of information becomes significant because the overdue information is worthless and useless and even harmful to the right judgement of system. Therefore, The Age of Information (AoI) used for marking the freshness of information is proposed. In Internet of Medical Things (IoMT), which is derived from the requirement of Internet of Thins (IoT) in medicine, high freshness of medical information should be guaranteed. In this paper, we introduce the AoI of medical information when allocating channels for users in IoMT. Due to the advantages of Deep Q-learning Network (DQN) applied in resource management in wireless network, we propose a novel DQN-based Channel Allocation (DQCA) algorithm to provide the strategy for channel allocation under the optimization of the system cost considering the AoI and energy consumption of coordinator nodes. Unlike the traditional centralized channel allocation methods, the DQCA algorithm is distributed as each user performs the DQN process separately. The simulation results show that our proposed DQCA algorithm is superior to Greedy algorithm and Q-learning algorithm in terms of the average AoI, average energy consumption and system cost.


---

## Body

## 1. Introduction

Corona Virus Disease 2019 (COVID-19) has caused more than 2.32 million deaths worldwide by February 8th, 2021 [1]. People are forced to stay at home, reduce the trip proportion, and avoid to go to crowded places. In this case, both the government, medical staff, or the general public hope to monitor virus infections like COVID-19 and isolate them in time to avoid the spread of the virus on a large scale. Besides, people are more concerned about their health than ever before. More and more chronic patients and even healthy people hope to have long-term effective monitoring of their bodies and obtain important information about their health as soon as possible. The emergence of the Internet of Medical Things (IoMT) has provided the possibility to solve these problems, and its intelligent monitoring function has gained massive demand around the world [2].For the COVID-19 virus, Swati Swayamsiddha et al. proposed a Cognitive Internet of Medical Things (CIoMT), which is a particular case of the IoMT, enabling real-time tracking, remote monitoring of patients, rapid diagnosis, contact tracing and clustering, screening and monitoring, etc., thus reducing the workload of medical staff and preventing and controlling the spread of the virus [3]. RaviPratap Singh et al. discussed the feasibility of using the IoMT to track, monitor, analyze data, and provide treatment plans for orthopedic patients in an environment ravaged by COVID-19 [4]. For COVID-19 management, M.A. Mujawar et al. also proposed a health monitoring system based on wearable devices and artificial intelligence, which continuously monitors the patient’s heartbeat, body temperature, and other parameters through medical sensors and transmits them to cloud storage through WSN. At the same time, these parameters are used to update the user’s health status in real time and then the status will be sent to the medical staff [5].The IoMT is a vast network system with diverse technologies. This paper only studies the channel allocation problems in the monitoring and transmitting human physiological data in the IoMT. During the monitoring and transmission, too old data may cause erroneous analysis and evaluation, reduce the accuracy and reliability of system decision-making, and even threaten the safety of users. Therefore, the freshness of information is crucial, and it also occupies an essential position in the design of 6G systems applied to body area networks [6–10]. To effectively describe the freshness of information, this paper introduces the Age of Information (AoI) [11], and studies the channel allocation problem of IoMT with AoI as the target.In recent years, artificial intelligence has become an effective method to solve the resource allocation problem with many data processing [12]. As the main solution of artificial intelligence, machine learning has also received tremendous attention in recent years. Machine learning uses algorithms to analyze and learn from data to make decisions and predictions about real-world events. Among them, deep learning is the most popular machine learning method at present, which has been well applied in automatic detection [13, 14], case recognition [15–17], environmental monitoring [18], and epidemic prediction [19], etc. In terms of channel allocation, with the rapid growth of network size and data volume, deep learning can significantly improve the processing speed for a large number of nodes [20–23].The research content of this paper is the problem of channel allocation among users oriented to the optimization of the AoI. The AoI of each controller on each user’s body at the gateway is the number of slots experienced by the latest update received from this controller at the end of each slot. In each time slot, the system needs to pay for the AoI. our requirement of timely updating the content received by the gateway is reflected in the minimum payment cost of the whole system. At the same time, this paper adopts a deep learning method to solve the proposed optimization problem. The main contributions of this paper are as follows:(i)
In view of the channel allocation problem of the IoMT, we focus on the timeliness of the information, and at the same time, considering the mobility of nodes. To measure the cost that the system pays for the lack of new information on gateway, we propose a system cost function based on the AoI and the current energy consumption rate of the nodes.(ii)
Based on the cost function, we constructed a mathematical model of the optimization problem that minimizes the average cost for the channel allocation of the IoMT.(iii)
For the problems raised, we propose a Deep Q-Learning Network (DQN) based channel allocation algorithm, named DQCA, which provides channel allocation scheme to minimize the cost on the basis of meeting the requirements of node SNR and residual energy.The rest of the paper is organized as follows. Section2 provides a comprehensive overview about the AoI. Section 3 describes the system model and optimization model of channel allocation problem in IoMT. The proposed DQCA algorithm is illustrated in Section 4. The simulation and performance evaluation is performed in Section 5. Finally, we conclude the paper in Section 6.


## 2. Related Works

With the increasingly developed Internet of Things (IoT), real-time applications are gradually increasing, such as driverless cars, which make decisions and control based on road information detected by sensors, adjust the travel mode of vehicles, avoid collisions, and ensure the safe driving of driverless cars. This type of application requires high timeliness and freshness of data, and outdated data will lead to wrong judgments and decisions. The longer the time, the less important and effective the data will be. In order to measure the freshness and effectiveness of data, scholars put forward the indicator of the AoI in 2011 to quantify the freshness of information on a remote system state [11]. The AoI refers to the time elapsed between the creation of the newly successfully received information and its successful reception. The AoI is different from the transmission delay of information. In a system with multiple source nodes and one destination node, each source node collects information and sends it to the destination node regularly. At the destination node, the AoI of each source node can be calculated [24]. Since the source node is constantly sending information to the destination node, the AoI of each source node refers to the AoI of the latest information received by the destination node from that source node. In other words, the AoI of each source node is not fixed and depends on the sending rate of the source node and the receiving rate of the destination nodes for source node’s information. If the destination node has not received the latest information from a certain source node, then the AoI of the source node will show a linear increase until it gets the newest information from the source node and changes to the AoI of the latest information.As shown in Figure1, tii=0,1,2⋯ is the time that data packet i is generated by node j, ti′ is the time that data packet i is received by the destination. When t =0, the destination node receives a data packet 0 from node j, then Aj0=A0=t0. Then Ajt increases linearly until the destination node receives a latest data packet 1 at t1′. At this time, Ajt is updated as Ajt1′=A1=t1′−t1. Like this, we can deduce that Ajt2′=A2=t2′−t2 when the destination node receives a latest data packet 2 at t2′, and so forth.Figure 1
Age of Information.The Swedish scholar Antzela Kosta et al. published a review paper on the AoI in 2017, introducing the concept of AoI in detail and summarizing the early researches [25]. Jhunjhunwala P R et al. proposes an AoI-aware channel scheduling algorithm for a sensor network with a monitoring station and multiple source nodes. The algorithm proposes that the cost function is a non-declining function, but it does not provide a completely function and optimization model [24].There have been some researches on the AoI in the IoT. Abbas Q et al. studied the importance and optimization of the AoI and energy efficiency in the IoT [26]. Gu Y et al. studied the average peak AoI under two schemes of overlay and underlay in a cognitive radio-based IoT network [27]. Li J et al. studied the average peak AoI of time-limited multicast transmission in the IoT. The author first describes the evolution of the instantaneous AoI and then derives the service time distribution of all possible reception results on IoT devices, and obtains the closed expressions of the average AoI and the average peak AoI [28]. Azarhava H et al. proposed a new protocol based on non-orthogonal multiple-access (NOMA) in a wireless IoT network with energy harvesting sensors and limited battery cells. A closed-form equation of the AoI for the entire network is obtained and the AoI is optimized by power scheduling parameters [29].


## 3. System Model and Optimization Model

### 3.1. System Model

Figure2 illustrates the topology of the IoMT which is born out of the IoT and wearable devices. Therefore, the core of the IoMT are the users equipped with several wearable devices involving wireless sensors. These wearable devices on user’s body can detect the physiological information (such as the blood pressure, the pulse, the temperature, and the electrocardiogram (ECG), etc.) and mobility information (such as location, move speed and move direction, etc.). In addition, there is a coordinator on user’s body used to collect the information from all the wearable devices on the same body and communicate with the gateway. The physiological information of all users is sent to the gateway and then transmitted to the nurse, doctor or ambulance on demand through the Internet. In this paper, each user selects a channel from a gateway in each time slot. In order to describe the problem more conveniently, we first illustrate the notations.Figure 2
The topology of the IoMT.The AoI of each mobile node is defined as the elapsed time when the latest data of this node is received by the gateway, as shown in Eq. (1).
(1)ljiq+1=tq−tgencur;userjsendsdatatogatewayiintimeslotq;ljiq+1+ts;userjfailstosenddataintimeslotq;t_gen_cur is the generation time of the currently received data frames, ts is the length of each time slot. Here, we represent the AoI by using the specific time other than the time slot, which is more precise. At each time slot, the system pays the cost for AoI, and the cost Ct is defined as a function of the AoI of all mobile nodes. Since Ct is the cost paid by the system for lack of fresh information from the source node, it is a non-descending function, as shown in Eq. (2).
(2)Ct=fLt=fl1t+fl2t+⋯fljt+⋯flMtWherefljt is defined as the cost function of the AoI of node j,
(3)fljt=wjljtwj=Ej/E0 is the weight coefficient, it is determined by the ratio of the consumed energy of node j to the initial energy, Among them, Ej is the energy consumed by the node, εfsdi,j2 is the energy consumption of free space transmission.
(4)Ej=bet+εfsdi,j2,ifdi,j≤dthThe mobile node communication complies with the 802.11 standards and adopts OFDM technology. The signal-to-noise ratio of the mobile node is defined as follows:(5)γj,kit=pi,jthi,j2βj,kitσ2


### 3.2. Optimization Model

(6)objectiveminαj,kit∑j∈M∑i∈Nlimt⟶∞1T∑t=1TCts.t.
(7)∑j=1M∑i=1Nαj,kit=1,∀k∈C(8)∑i=1Mαj,kit=1,∀k∈C,j∈N(9)αj,kit∈0,1,∀k∈C,i∈N,j∈M(10)∑j=1M∑i=1N∑k=1Kαj,kit≤N(11)∑j=1M∑i=1N∑k=1Kαj,kit≤K(12)∑j=1M∑i=1N∑k=1Kαj,kitbk≤B(13)γj,kit≥γ0The formula (7) indicates that in any time slot t, one channel k can only be allocated to one node j. The formula (8) indicates that in the time slot t, a node can only communicate with one gateway. The formula (9) indicates whether the channel k of the gateway i is allocated to the user j in the time slot t, 1 means yes, and 0 means no. Equation Formula (10) indicates that the number of occupied gateways cannot exceed the number of available gateways. Equation Formula (11) indicates that the number of occupied channels cannot exceed the number of available channels. Equation Formula (12) indicates that the occupied channel bandwidth cannot exceed the total channel bandwidth. Equation Equation (13) indicates that the signal-to-noise ratio of a node must be higher than the threshold so as to ensure the transmission rate.For the network with small scale and small total number of channels, the enumeration method is available to calculate the cost of users choosing a subchannel of a gateway, and then find the subchannel with the lowest cost. However, if there are 1000 users, 5 gateways and 64 subchannel in the network, the amount of calculation of payment for AoI by enumeration method is at least 320000 times. Thus, for larger networks, the computational complexity is quite high. It is considerably significant to design a low-complexity algorithm to solve the proposed problem.


## 3.1. System Model

Figure2 illustrates the topology of the IoMT which is born out of the IoT and wearable devices. Therefore, the core of the IoMT are the users equipped with several wearable devices involving wireless sensors. These wearable devices on user’s body can detect the physiological information (such as the blood pressure, the pulse, the temperature, and the electrocardiogram (ECG), etc.) and mobility information (such as location, move speed and move direction, etc.). In addition, there is a coordinator on user’s body used to collect the information from all the wearable devices on the same body and communicate with the gateway. The physiological information of all users is sent to the gateway and then transmitted to the nurse, doctor or ambulance on demand through the Internet. In this paper, each user selects a channel from a gateway in each time slot. In order to describe the problem more conveniently, we first illustrate the notations.Figure 2
The topology of the IoMT.The AoI of each mobile node is defined as the elapsed time when the latest data of this node is received by the gateway, as shown in Eq. (1).
(1)ljiq+1=tq−tgencur;userjsendsdatatogatewayiintimeslotq;ljiq+1+ts;userjfailstosenddataintimeslotq;t_gen_cur is the generation time of the currently received data frames, ts is the length of each time slot. Here, we represent the AoI by using the specific time other than the time slot, which is more precise. At each time slot, the system pays the cost for AoI, and the cost Ct is defined as a function of the AoI of all mobile nodes. Since Ct is the cost paid by the system for lack of fresh information from the source node, it is a non-descending function, as shown in Eq. (2).
(2)Ct=fLt=fl1t+fl2t+⋯fljt+⋯flMtWherefljt is defined as the cost function of the AoI of node j,
(3)fljt=wjljtwj=Ej/E0 is the weight coefficient, it is determined by the ratio of the consumed energy of node j to the initial energy, Among them, Ej is the energy consumed by the node, εfsdi,j2 is the energy consumption of free space transmission.
(4)Ej=bet+εfsdi,j2,ifdi,j≤dthThe mobile node communication complies with the 802.11 standards and adopts OFDM technology. The signal-to-noise ratio of the mobile node is defined as follows:(5)γj,kit=pi,jthi,j2βj,kitσ2


## 3.2. Optimization Model

(6)objectiveminαj,kit∑j∈M∑i∈Nlimt⟶∞1T∑t=1TCts.t.
(7)∑j=1M∑i=1Nαj,kit=1,∀k∈C(8)∑i=1Mαj,kit=1,∀k∈C,j∈N(9)αj,kit∈0,1,∀k∈C,i∈N,j∈M(10)∑j=1M∑i=1N∑k=1Kαj,kit≤N(11)∑j=1M∑i=1N∑k=1Kαj,kit≤K(12)∑j=1M∑i=1N∑k=1Kαj,kitbk≤B(13)γj,kit≥γ0The formula (7) indicates that in any time slot t, one channel k can only be allocated to one node j. The formula (8) indicates that in the time slot t, a node can only communicate with one gateway. The formula (9) indicates whether the channel k of the gateway i is allocated to the user j in the time slot t, 1 means yes, and 0 means no. Equation Formula (10) indicates that the number of occupied gateways cannot exceed the number of available gateways. Equation Formula (11) indicates that the number of occupied channels cannot exceed the number of available channels. Equation Formula (12) indicates that the occupied channel bandwidth cannot exceed the total channel bandwidth. Equation Equation (13) indicates that the signal-to-noise ratio of a node must be higher than the threshold so as to ensure the transmission rate.For the network with small scale and small total number of channels, the enumeration method is available to calculate the cost of users choosing a subchannel of a gateway, and then find the subchannel with the lowest cost. However, if there are 1000 users, 5 gateways and 64 subchannel in the network, the amount of calculation of payment for AoI by enumeration method is at least 320000 times. Thus, for larger networks, the computational complexity is quite high. It is considerably significant to design a low-complexity algorithm to solve the proposed problem.


## 4. DQCA Algorithm Design

We assume that each user selecting the channel is a Markov decision process (MDP) and the policy decision and the AoI just depend on the selection in last time slot. In this network, there are a large number of users and they move randomly. The optimization model mentioned above is difficult to obtain an optimal analytical solution because the result of optimization depends largely on the built model and the computing process rate of the computer. Reinforcement learning is suitable for the channel allocation problem of the network. On the one hand, it can adjust actions through the interaction between the user and the environment and rewards, which can solve the optimization problem that is difficult to obtain analytical solutions; on the other hand, it can be well adapted to a highly dynamic environment and the frequently changing channel. Q-learning and DQN are two typical reinforcement learning algorithms. The algorithm flow diagrams are shown in Figures3 and 4, respectively.Figure 3
The flow chart for Q-learning.Figure 4
The flow chart for DQN.In Q-learning, the agent chooses an action under each state, builds a Q-table and record the Q-value for each pair of state and action. The Q-value is updated by the reward produced by the selected action. However, since all the possible states and actions are enumerated in Q-table, Q-learning is only suitable for the MDP problem with small state space and small action space. When the space becomes large, the storage space of the Q-table will become very large, and the Q-table cannot hold the memory. Meanwhile, the convergence speed of Q-learning will come down.Compared with Q-learning algorithm, DQN uses the artificial neural network (ANN) to approximate the value function, uses target Q network to update the target value and use experience replay to train the learning process of reinforcement learning. DQN just updates the parameterθ of the artificial neural network rather than update the whole Q-table. Therefore, it shortens the convergence time and is more suitable for the problem with large state and action space. Considering a large number of users and channels, we abandon the Q-learning algorithm based on Q-table and choose the DQN to train the network to obtain an approximate optimal solution. Our proposed DQCA algorithm is a channel allocation algorithm based on DQN.Agent: We define the controller node on mobile user as an agent. As an agent, it trains the neural network according to the network status (number of users, user location, moving speed and direction of users, etc.) to obtain reasonable actions.System state: Denoted by s(t), including channel environment and node behavior. The behavior of the node mainly refers to the current position of the node (the mobility of node follows the random walk model [24]), and the nearest gateway is selected for access according to the position of the node. The channel environment can be characterized by the signal-to-noise ratio of the node. If node j selects gateway i for data transmission in time slot t, the signal-to-noise ratio of node i in time slot t is γj,kit, if γj,kit≥γ0, then sjt=1; otherwise sjt=0. That is, sjt=0,1.
(14)st=s1t,s2t⋯sjt⋯sMtSystem action: After the node selects the gateway i, the system action is defined as which channel k of the gateway i is selected by the node j.
(15)ajt=aj,1it,⋯..aj,kit⋯.aj,KitReward: User j uses the immediate reward produced by ajt at the system state sjt, which is defined as Eq. (16). This revenue function can ensure that the cost of AoI is minimized while meeting the channel ratio constraint.
(16)rjt=−fljt,γj,kit≥γ0−∞,otherwiseFor each userj, we define the Q function as Qst,at when take action at at state st, as shown by Eq. (17).
(17)Qst,at=rjst,at+δPst+1∣st,atmaxat∈AQst+1,at+1WherePst+1∣st,at is the transition function from state stto state st+1. δ is a discount factor used to balance the immediate reward and long-term reward. A is the set of feasible actions.Q function and optimal policy: Then the optimal value of Q function and the optimal policy π∗ can be represented as Eq. (18) and Eq. (19), respectively.
(18)Q∗st,at=maxat+1∈AQst,at+1(19)π∗=argmaxat+1∈AQst,at+1Target value: To avoid overestimation brought by only one parameter θ in neural network, we use parameter θ and θ′ to illustrate the predict network and target network, respectively. Then the Q-function can be given by Eq. (20).
(20)y=rt+γmaxat+1Qst+1,at+1∣θ′.Loss function: To approximate the Q-function, we also define the loss function as Eq. (20) to train the weights θ and θ′of ANN.
(21)Lθ=y−Qst,at∣θ2In DQCA, we first get the locations of all nodes and gateways and select a gateway for each node according to the shortest distance. And then we perform the channel allocation algorithm by Algorithm1.Algorithm 1: Channel allocation algorithm for user j based on DQN
Input: Node list, gateway listInitialization:1. Initialize costc and energy e to 0.2. Initialize step to 1.For episode =1 to maximum iteration time T doCount =1;Obtain statest based on the input.1.Repeat:(1) Select actionat=argmaxaQst,a∣θ(2) Output the next statest+1, reward rt, cost c and energy e according to the count and action at(3) Store transition (st, at, rt, st+1) in the replay memory2.If step >200 and step % 5 == 0:Sample random minibatch of transitions (st, at, rt, st+1) from the replay memory pool.Else:Continue3.Update:st⟵st+1;c += c;e +=e;Step + =1;Count + =1;For each node in node listIf packet size <= 0:Break4. Update target valuey=rt+γmaxat+1Qst+1,at+1∣θ′.5. Perform a gradient descent step ony−Qst,at∣θ2.6. Resetθ′=θ for every Z steps.End for


## 5. Simulation and Performance Evaluation

In this section, we first introduce the simulation setup, then show the simulation results and analyze the performance of the proposed algorithm.


### 5.1. Simulation Setup

To testify the effectiveness of our proposed algorithm, the Q-learning algorithm and greedy algorithm are also simulated with the DQCA algorithm for comparison. Q-learning algorithm builds Q-table for each node and finds the maximum Q-value for each node from all available actions. The main idea of the greedy algorithm is to allocate the channel in each time slot with the minimum growth of the cost function in the next slot as the optimization objective [24]. To prove the effectiveness of the proposed algorithm, this paper compares the three algorithms from three aspects: cost, AoI, and energy consumption. Among them, cost refers to the overall cost of the network, calculated according to formula (6), and the average AoI of all nodes is calculated as follows:
(22)AoI=∑j=1MljtMEnergy consumption is the average energy consumption of all nodes, defined as(23)∑j=1MwjtM


### 5.2. Performance Evaluation

To verify the effectiveness and feasibility of the proposed DQCA algorithm, this paper uses three different scenarios. The first one: the average size of data packet is 5 M, and the data packet arrival interval is 50 ms, the number of nodes in the network changes; the second one: the number of nodes is 20, the data packet arrival interval is 50 ms, and the average size of data packet changes; the third one: the number of nodes is 20, the average size of data packet is 5 M, and the data packet arrival interval changes. The simulation program runs on a computer with an Intel Core i7-3520M with 2.90GHz frequency CPU and 8G RAM. The parameters used in the simulation are shown in Table1.Table 1
Simulation parameters.
Simulation parameterSimulation area100×100m2Gateway number1Subchannel number10Gateway bandwidth20 MHzNode power0.1 WTime slot0.1 sAWGN delta-110 dBm/HzSNR channel gain weight-2Node intial energy2 JTransmitter power8×10−8 J/bitFreedom space weight6×10−8 J/bitDistance threshold0.4 mSNR threshold0.5DQN iterations2000DQN steps20000Penalty reward-200Stay reward-150Figures5–7 study the impact of changes in the number of nodes on network performance when the length of the data packet and time slot is fixed as defined in the first scenario. It can be seen from Figures 5 and 6 that the average AoI and average energy consumption of the three algorithms continuously reduce as the number of nodes increases. This is because the AoI and energy consumption increase more slowly than the number of nodes, resulting in a decrease in the average value. At the same time, due to the large state space, Q-learning needs to consume more time and computing resources, and it is necessarily inferior to DQCA in terms of AoI and energy consumption. Especially for energy consumption, compared with the Q-learning algorithm, the average energy consumption of all nodes of the DQCA algorithm is reduced by about 38.56%. It can be seen from Figure 7 that the costs of the three algorithms all increase with the increase of the number of nodes, among which the DQCA algorithm increases slowly and the increment is small. The cost takes into account the AoI and energy consumption of the nodes. The DQCA algorithm has more advantages in these two aspects than the other two algorithms. Therefore, the total cost is significantly lower than the Greedy and Q-learning algorithms and can be reduced by up to 57.3% compared to the Greedy algorithm.Figure 5
Average AoI with different number of nodes (Data = 5 M, slot = 50 ms).Figure 6
Energy with different number of nodes (Data = 5 M, slot = 50 ms).Figure 7
Cost with different number of nodes (Data = 5 M, slot = 50 ms).Figures8–10 shows the fixed number of nodes and packet arrival interval in the second scenario, to study the change of network performance with the size of data packet. It can be seen that as the size of the data packet continues to increase, the AoI and energy consumption of the node is also increasing, so the cost increases accordingly. This is because after the data packet increases, the processing and transmission time of the data packet increases, and it takes longer time for the gateway node to wait for the latest update of the node, and the energy consumption of the transmitter and receiver of the nodes will increase accordingly. Compared with the greedy algorithm and Q-learning algorithm, the DQCA algorithm can reduce the cost by about 62% and 60%.Figure 8
Cost with different average size of packets (N = 20, slot = 50 ms).Figure 9
Cost with different average size of packets (N = 20, slot = 50 ms).Figure 10
Cost with different average size of packets (N = 20, slot = 50 ms).Figures11–13 show the fixed number of nodes and the size of data packet in the third scenario, to study the change of network performance with the packet arrival interval. It can be seen that when the data packet arrival interval increases, the number of data packets in the network decreases, and the data packets sent and received by the node decrease, so the energy consumption of the node is reduced. Due to the increase of the data packet arrival interval, the probability of the node being allocated to the channel at the gateway node also increases, that is, the waiting time for an assigned channel for the node is shortened. As can be seen from Figure 11, overall, the AoI of the node is reduced. From the simulation results in Figure 13, as the packet arrival interval continues to increase, the impact on the average energy consumption and cost of the node gradually decreases, and the curves in Figures 12 and 13 tend to be stable. This is because the packet arrival interval increases to a certain extent, the basic energy consumption of the node accounts for a larger proportion of the total energy consumption, and the energy consumption of the node is less affected by the sending and receiving of data packets.Figure 11
Cost with different packet arrival intervals (N = 20, Data = 5 M).Figure 12
Cost with different packet arrival intervals (N = 20, Data = 5 M).Figure 13
Cost with different packet arrival intervals (N = 20, Data = 5 M).The greedy algorithm only considers the optimal value of the current function, does not consider the previous choice, nor the consequences of the current choice. But in fact, this method often does not have the best results. Therefore, in Figures5–13, the greedy algorithm has the worst performance compared to Q-learning and DQCA.


## 5.1. Simulation Setup

To testify the effectiveness of our proposed algorithm, the Q-learning algorithm and greedy algorithm are also simulated with the DQCA algorithm for comparison. Q-learning algorithm builds Q-table for each node and finds the maximum Q-value for each node from all available actions. The main idea of the greedy algorithm is to allocate the channel in each time slot with the minimum growth of the cost function in the next slot as the optimization objective [24]. To prove the effectiveness of the proposed algorithm, this paper compares the three algorithms from three aspects: cost, AoI, and energy consumption. Among them, cost refers to the overall cost of the network, calculated according to formula (6), and the average AoI of all nodes is calculated as follows:
(22)AoI=∑j=1MljtMEnergy consumption is the average energy consumption of all nodes, defined as(23)∑j=1MwjtM


## 5.2. Performance Evaluation

To verify the effectiveness and feasibility of the proposed DQCA algorithm, this paper uses three different scenarios. The first one: the average size of data packet is 5 M, and the data packet arrival interval is 50 ms, the number of nodes in the network changes; the second one: the number of nodes is 20, the data packet arrival interval is 50 ms, and the average size of data packet changes; the third one: the number of nodes is 20, the average size of data packet is 5 M, and the data packet arrival interval changes. The simulation program runs on a computer with an Intel Core i7-3520M with 2.90GHz frequency CPU and 8G RAM. The parameters used in the simulation are shown in Table1.Table 1
Simulation parameters.
Simulation parameterSimulation area100×100m2Gateway number1Subchannel number10Gateway bandwidth20 MHzNode power0.1 WTime slot0.1 sAWGN delta-110 dBm/HzSNR channel gain weight-2Node intial energy2 JTransmitter power8×10−8 J/bitFreedom space weight6×10−8 J/bitDistance threshold0.4 mSNR threshold0.5DQN iterations2000DQN steps20000Penalty reward-200Stay reward-150Figures5–7 study the impact of changes in the number of nodes on network performance when the length of the data packet and time slot is fixed as defined in the first scenario. It can be seen from Figures 5 and 6 that the average AoI and average energy consumption of the three algorithms continuously reduce as the number of nodes increases. This is because the AoI and energy consumption increase more slowly than the number of nodes, resulting in a decrease in the average value. At the same time, due to the large state space, Q-learning needs to consume more time and computing resources, and it is necessarily inferior to DQCA in terms of AoI and energy consumption. Especially for energy consumption, compared with the Q-learning algorithm, the average energy consumption of all nodes of the DQCA algorithm is reduced by about 38.56%. It can be seen from Figure 7 that the costs of the three algorithms all increase with the increase of the number of nodes, among which the DQCA algorithm increases slowly and the increment is small. The cost takes into account the AoI and energy consumption of the nodes. The DQCA algorithm has more advantages in these two aspects than the other two algorithms. Therefore, the total cost is significantly lower than the Greedy and Q-learning algorithms and can be reduced by up to 57.3% compared to the Greedy algorithm.Figure 5
Average AoI with different number of nodes (Data = 5 M, slot = 50 ms).Figure 6
Energy with different number of nodes (Data = 5 M, slot = 50 ms).Figure 7
Cost with different number of nodes (Data = 5 M, slot = 50 ms).Figures8–10 shows the fixed number of nodes and packet arrival interval in the second scenario, to study the change of network performance with the size of data packet. It can be seen that as the size of the data packet continues to increase, the AoI and energy consumption of the node is also increasing, so the cost increases accordingly. This is because after the data packet increases, the processing and transmission time of the data packet increases, and it takes longer time for the gateway node to wait for the latest update of the node, and the energy consumption of the transmitter and receiver of the nodes will increase accordingly. Compared with the greedy algorithm and Q-learning algorithm, the DQCA algorithm can reduce the cost by about 62% and 60%.Figure 8
Cost with different average size of packets (N = 20, slot = 50 ms).Figure 9
Cost with different average size of packets (N = 20, slot = 50 ms).Figure 10
Cost with different average size of packets (N = 20, slot = 50 ms).Figures11–13 show the fixed number of nodes and the size of data packet in the third scenario, to study the change of network performance with the packet arrival interval. It can be seen that when the data packet arrival interval increases, the number of data packets in the network decreases, and the data packets sent and received by the node decrease, so the energy consumption of the node is reduced. Due to the increase of the data packet arrival interval, the probability of the node being allocated to the channel at the gateway node also increases, that is, the waiting time for an assigned channel for the node is shortened. As can be seen from Figure 11, overall, the AoI of the node is reduced. From the simulation results in Figure 13, as the packet arrival interval continues to increase, the impact on the average energy consumption and cost of the node gradually decreases, and the curves in Figures 12 and 13 tend to be stable. This is because the packet arrival interval increases to a certain extent, the basic energy consumption of the node accounts for a larger proportion of the total energy consumption, and the energy consumption of the node is less affected by the sending and receiving of data packets.Figure 11
Cost with different packet arrival intervals (N = 20, Data = 5 M).Figure 12
Cost with different packet arrival intervals (N = 20, Data = 5 M).Figure 13
Cost with different packet arrival intervals (N = 20, Data = 5 M).The greedy algorithm only considers the optimal value of the current function, does not consider the previous choice, nor the consequences of the current choice. But in fact, this method often does not have the best results. Therefore, in Figures5–13, the greedy algorithm has the worst performance compared to Q-learning and DQCA.


## 6. Conclusion

Focused on the freshness of information in IoMT, this paper studied the channel allocation problem oriented to the AoI. In this paper, system cost is defined as a non-descending function about the AoI and energy consumption of nodes. Since the system cost optimization problem is difficult to solve due to the large amount of users and the mobility of users, we adopt a DQN-based method named DQCA algorithm. The simulation compared the proposed DQCA algorithm with Greedy algorithm and Q-learning algorithm in three different cases. The simulation results show the superiority of DQCA algorithm from the aspects of average AoI and average energy consumption of nodes and system cost.



---

*Source: 6645803-2021-08-31.xml*