In a common clustering route, the cluster head node always reserves time for each node in the cluster to transfer data. For example, for a cluster with n nodes within a cluster, the CH node always allocates a time slot for each of them. In the corresponding time slot, the CM nodes send packets to the CH node. After n slots, the CH node completes the collection of data within the cluster and sends a data packet generated by itself along with other received data packets.
For networks where nodes randomly generate packets, fixed time slots are obviously not appropriate. For example, only m(m < n) nodes generate data packets, but the CH node allocates n time slots for them. This allows the CH node to wake up in n − m time slots without doing anything meaningful, wasting energy.
For such special cases, in order to be suitable for dynamic traffic wireless sensor networks, the DEEDC scheme arranges adaptive transmission times for CM nodes, that is, through the control of the CH node, only the time slots are arranged for the CM nodes that need to transmit data.
Simply put, the CM node that needs to send the data packet wakes up, and the other CM nodes continue to sleep. In the first time slot, the awake CM node sends a request-to-send message (RTS) to the corresponding CH node. In the RTS packet, the ID information of the CM node is mainly included. If the CH node receives a total of x RTS packets within a specified time, it will schedule slots for the corresponding CM nodes in the order in which the RTS packets are received. In detail, the ID information of the CM node is taken out from the received RTS data packet, and then all the ID information and the information of the allocated time slot are placed in one data packet and broadcasted. After receiving the broadcast, the CM node first finds the time slot information corresponding to its own ID, then sets the time of re-awake according to the information, and finally go to the sleep state. The CM node will wake up in the set time slot, sends a packet, and finally enters the sleep state. In particular, if a CM node is ready to send data at the second slot, it will eliminate the process of sleeping first and then waking up. The CH node arranges time slots for the CM node in the first time slot. In the next x time slots, the CH node sequentially receives the packets from corresponding CM node. After successfully receiving x packets, these packets are organized into one large packet. In particular, if the CH node itself also has a data packet, it is also included in the large packet. Through the above process, the node successfully completes the data collection in the cluster, and then, it is the relay process between the cluster heads.
In addition, we learned from the matrix-filling model in Section 3.3 that even if only a part of the data in the network is collected, the unknown data could be recovered. To this end, we have also added restrictions on the number of collected packets.
Assume that collecting x packets per round, the data not collected in the cluster can be completely recovered. Since the nodes in the network generate packets completely irregularly, it is impossible to generate exactly x packets each time, sometimes it may be more, sometimes it may be less. Therefore, for such a special case, the response strategy given by the DEEDC scheme is to make the average number of data packets collected per round greater than or equal to x. That is, a threshold y is found, which represents the threshold of the number of collected packets. Under this constraint, the workflow of the CH node and the CM node also needs to be adjusted accordingly.
The CH node first determines if it has generated a data packet. If so, y′ = y − 1; otherwise, y′ = y. After the CH node completes the reception of the RTS packet, the time slots are arranged for the first y′ corresponding CM nodes in the order of arrival. As for other CM nodes that also sent RTS packets, the CN node schedules the slot to − 1, indicating that the CH node does not intend to receive its data packets in this round. After receiving the broadcast data, the CM node finds that the time slot is scheduled to be − 1, and then it directly discards the data packet to be sent, and turn to the sleep stage.
In Algorithm 1 and Algorithm 2, we respectively show the working process of CH node and CM node in a round of data transmission.
Among them, the symbols appearing respectively indicate:
-
Slot_num: indicates the sequence number of the time slot. Before the start of each round, it will be reset to 0
-
Node_num: indicates the number of CMs inside the cluster that are ready to send packets
-
RTS: request-to-send, which is a request message sent by CM that wants to send a data packet
-
ID[ ]: record the ID of the CM node that is ready to send the packet
-
Node_id: ID of the CM node, obtained from the corresponding RTS packet
-
OP[ ]: a transmission slot assigned to the CM node. If equal to − 1, the CH node in the round does not receive its data packet
-
Max_nodenum: the maximum number of nodes that the CH node can receive its data packets
We assume that there are eight CM nodes in a cluster, which are represented by CM0, CM1,…, CM7. The working process of the CH node and the CMi node (i = 0, 1, 2, … , 7) are as follows.
First, it is first necessary to clarify which CM nodes’ packet the CH node will receive. As shown in Figs. 3 and 4 out of eight CM nodes that generate data packets, all four nodes send RTS to the CH. With the matrix filling theory, all data can be recovered by only receiving three packets. Then, the CH node arranges the transmission time slot for the CM nodes corresponding to the three RTS data packets received first, and as for the fourth CM node, let it directly enter the sleep state until the next data transmission.
The working process of the CM nodes are as follows:
Taking the above example as an example, the working process of the CM node is as shown in Fig. 4.
First, once the CM node wakes up (data is collected), it reports to the CH node (sends the RTS packet). In the next few time slots, the work is started according to the indication sent by the CH node. Assuming that the CH node does not intend to receive a packet from a certain CM node, for example, CM4, it will receive an instruction to go directly to sleep state, and will not wake up after entering the sleep state until the next time data is collected.
Other CM nodes, such as CM1, CM3, and CM7, will wake up in the scheduled time for data packet transmission.
For the convenience of the following description, we will explain the related symbols appearing below as follows:
According to the clustering model in Section 3.2, it is assumed that the network with radius R is divided into h layers by clustering. From the inside to the outside, the cluster head nodes on each layer are called CH0, CH1, … , CHh − 1, and the nodes in the cluster are called CM0, CM1, … , CMh − 1. Among the clusters on the layer i(i = 1, 2 … h − 1), \( {n}_{CM_i} \) CMi and \( {n}_{CH_{i-1}} \) CHi − 1 transmit data packets to CHi.
Specifically, there are \( {n}_{CM_0} \) CM0 and zero CH nodes transmitting data packets to CH0 on the 0th layer.
\( {C}_i^j \) indicates combination. For the sake of convenience, we introduce the symbol \( {A}_i^j \):
$$ {A}_i^j={C}_i^j\ast {p}^i\ast {\left(1-p\right)}^{i-j} $$
(15)
Here, p represents the probability that a node generates a data packet. \( {A}_i^j \) indicates the probability that exactly j nodes in i nodes generate data packets, while other i − j nodes do not generate data packets.
4.1 The maximum value of the collected packets
With the theoretical support of matrix filling, we can reduce the collected data and thus reduce energy consumption. However, be careful; otherwise, it cannot complete data recovery.
Theorem 1 There is a two-dimensional matrix A whose size is N ∗ T. Where N is the total number of nodes (excluding the sink node), T is the round of data transmission. There are ni CM nodes in each cluster on layer i. Then, the number of packets that must be collected by CHi in each round is:
$$ {x}_i=\frac{\left({n}_i+1\right){\left(\max \left(N,T\right)\right)}^{6/5}}{N\ast T} $$
(16)
Proof According to 3.3, we only need max(N, T)6/5 known elements to recover the complete matrix. max(N, T)6/5 elements are generated from N ∗ T corresponding positions. We have ni + 1 nodes in the cluster; it is necessary to acquire xi known elements on average. Therefore, there are the following equations:
$$ \frac{{\left(\max \left(N,T\right)\right)}^{6/5}}{N\ast T}=\frac{x_i}{n_i+1} $$
(17)
By shifting the item, you can finally prove the result in theorem 1.
In the actual situation, the number of packets collected by the CH is random. We specify a threshold. Under the control of the threshold, the average number packets collected per round is exactly xi after rounding down, which satisfies the requirement of restoring the complete matrix in the matrix filling theory.
Theorem 2 Use yi to represent the threshold of packets collected by CHi (i = 0, 1, …h − 1), which is:
$$ {\displaystyle \begin{array}{c}{y}_i=\min \left({j}_i\right)\\ {}s.t.\sum \limits_{j=0}^{j_i}j\ast {P}_{j_i}\ge {x}_i\end{array}} $$
(18)
Where ji indicates that a total of j data packets are generated in the cluster on the layer i, The clusters on layer i generate a total of j packets represented by ji, and \( {P}_{j_i} \) represents the corresponding probability.
Proof The probability that a node has generated a packet is p (0 < p < 1). For a cluster on the layer i, a total of ni + 1 nodes may generate a data packet, that is, the value range of ji is: 0 ≤ ji ≤ ni + 1. In other words, at most ni + 1 packets in the cluster (all CM nodes have generated packet) and at least zero packets (no CM node generates packet) are generated. The corresponding probability is:
$$ {P}_{j_i}={\mathrm{A}}_{n_i+1}^j $$
(19)
If yi packets are from other nodes in the cluster (non-CH), then a total of 1 + yi + 1 slots are needed. The CH node that wants to transfer data sends a RTS, and then the CH nodes allocate time slots to them by broadcasting. In the next yi time slots, the intra-cluster nodes sequentially send packets. Finally, the CH organizes the received data packets and its own generated data packets (if any) into one data packet and sends it out. If the CH node generates a data packet, it needs 1 + (yi − 1) + 1 time slot.
In particular, the last time slot is calculated in the next layer (because in this time slot, the transmission operation of this layer and the reception operation in the next layer are performed sequentially, no need to repeat the calculation).
The probability of including the CH node among the yi nodes that generate the data packet is:
$$ {P}_i^{i- CH}=\frac{C_{n_i}^{y_i-1}}{C_{n_i+1}^{y_i}} $$
(20)
The probability of not including the CH is:
$$ {P}_i^{ni- CH}=\frac{C_{n_i}^{y_i}}{C_{n_i+1}^{y_i}} $$
(21)
Therefore, the average time for the CH node to complete data collection in the cluster is:
$$ {t}_i={P}_i^{i- CH}\ast {y}_i+{P}_i^{ni- CH}\ast \left(1+{y}_i\right) $$
(22)
In particular, if ti ≥ ni, we do not use the above method to allocate time slots for nodes on the layer i, but to fix the time slots. Even if the corresponding intra-cluster node does not transmit data packets in the time slot, other nodes cannot occupy this time slot.
4.2 Number of transmitted packets
The energy consumed to transmit packets is mainly considered: the CM node and the CH node send data packets, and the CH node receives the data packet. In addition, the CM node will also send RTS packets, and the CH node will send a broadcast. Since these data packets are smaller than the foregoing three, both in terms of packet size and number, they are not considered in this paper.
Theorem 3 Use \( {N}_{CM_i}^s \), \( {N}_{CH_i}^s \), and \( {N}_{CH_i}^r \) to represent the number of packets sent by CMi, sent and received by CHi (i = 0, 1, …h − 1).
$$ {\displaystyle \begin{array}{c}{N}_{CM_i}^s={P}_i^{ni- CH}\ast \left[\sum \limits_{k=0}^{y_i-1}k\ast {A}_{n_i}^k+{y}_i\ast \left(1-\sum \limits_{k=0}^{y_i-1}{A}_{n_i}^k\right)\right]\\ {}+{P}_i^{i- CH}\ast \left[\sum \limits_{k=0}^{y_i-1}\left(k-1\right)\ast {A}_{n_i}^{k-1}+\left({y}_i-1\right)\ast \left(1-\sum \limits_{k=0}^{y_i-1}{A}_{n_i}^{k-1}\right)\right]\end{array}} $$
(23)
$$ {N}_{CH_i}^s=\left(1-p\right)\ast {N}_{CH_i}^r+p\ast \left({N}_{CH_i}^r+1\right) $$
(24)
$$ {N}_{CH_i}^r={N}_{CM_i}^s+{N}_{CH_{i-1}}^s $$
(25)
Especially:
$$ {N}_{CH_0}^r={N}_{CM_0}^s $$
(26)
Proof The number of CMi nodes that send metadata packets to CHi is equal to the number of transmitted metadata packets. According to the matrix filling theory, suppose the number of packets generated in the cluster exceeds yi, the CH nodes do not need to collect all. If the CH node generates a data packet, then at most only yi − 1 data packets need to be collected in the cluster. Otherwise, at most yi are collected. Thus, \( {N}_{CM_i}^s \) is equal to:
$$ {\displaystyle \begin{array}{c}{N}_{CM_i}^s={P}_i^{ni- CH}\ast \left[\sum \limits_{k=0}^{y_i-1}k\ast {A}_{n_i}^k+{y}_i\ast \left(1-\sum \limits_{k=0}^{y_i-1}{A}_{n_i}^k\right)\right]\\ {}+{P}_i^{i- CH}\ast \left[\sum \limits_{k=0}^{y_i-1}\left(k-1\right)\ast {A}_{n_i}^{k-1}+\left({y}_i-1\right)\ast \left(1-\sum \limits_{k=0}^{y_i-1}{A}_{n_i}^{k-1}\right)\right]\end{array}} $$
(27)
If the CH node does not generate a packet, then it sends the same number of packets as received. Otherwise, it needs to send one more. Which is:
$$ {N}_{CH_i}^s=\left(1-p\right)\ast {N}_{CH_i}^r+p\ast \left({N}_{CH_i}^r+1\right) $$
(28)
The data packets received by the CHi come from two parts: CMi and CHi − 1. Which is:
$$ {N}_{CH_i}^r={N}_{CM_i}^s+{N}_{CH_{i-1}}^s $$
(29)
In particular, CH0 only needs to receive data from CM0:
$$ {N}_{CH_0}^r={N}_{CM_0}^s $$
(30)
4.3 Delay
In the network model described above, after the CH node receives the data packets of the nodes in the cluster, it may take a while to forward them. For example, the CH node will go to sleep after completing the data collection in the cluster. Wait until the CH node outside it is ready to send packets and then switch to the awake state. After the inter-cluster packet relay is completed, the packet will be sent to the next hop. In this case, the delay under the general definition is not accurate enough.
Therefore, we redefine the delay, that is, the time at which the (CH) node completes all its collection work. For a sink node, that is, when it receives all the packets sent from the network.
Theorem 4 Assuming that the time slots is cleared before the new round starts, the time in which the CHi node (i = 0, 1, …h − 1) completes all collection operations (including collecting data packets sent by CMi and CHi − 1) can be expressed as:
$$ {T}_i=\mathit{\max}\left({T}_{i-1},{T}_i^{CM}\right)+{d}^{CH}\ast {N}_{CH_{i-1}}^s $$
(31)
Where dCH represents the degree between the cluster heads, \( {N}_{CH_{i-1}}^s \) is the amount of data sent by CHi − 1, and \( {T}_i^{CM} \) is the time in which CHi completes the data collection work in the cluster (yi is the threshold of the packet collected by CHi), and:
$$ {T}_i^{CM}=1+{y}_i $$
(32)
Proof The packet collection process in the network can be summarized as follows: first, in the first time slot, the node that wants to send data transmits a RTS to the corresponding CH node, and acquires corresponding time slot information from the broadcast data packet that is sent back. If the CH node decides not to receive the data of node A, then A will directly discard the collected data packet and go to sleep. Instead, to reduce energy consumption, first turn to the sleep state.
For CHi, it may receive k packets from the CMi node, where k = 0, 1, 2, … , yi. k = yi if and only if the CHi does not generate a data packet. Therefore, the average slot in which CHi completes the data collection can be expressed as:
$$ {\displaystyle \begin{array}{c}{T}_i^{CM}=1+\sum \limits_{k=0}^{y_i-1}k\ast {A}_{n_i}^k\\ {}+{y}_i\ast {P}_i^{ni- CH}\ast \left(1-\sum \limits_{k=0}^{y_i-1}{A}_{n_i}^k\right)\end{array}} $$
(33)
The above average time slots do not represent well the time slots in the actual situation. We fixed the number of slots of data collected by CHi to yi which ensures that all CHi can complete data collection as required. If CHi completes its work before the time slot yi, it will go to sleep. Therefore, the time for CHi to complete the data collection in the cluster can be simplified to:
$$ {T}_i^{CM}=1+{y}_i $$
(34)
After the CH node collects the data packets inside the cluster, it also needs to continue to accept the packets from the CH nodes located at upper layer. Since the CH0 does not need to receive packets sent by other CH nodes, therefore:
$$ {T}_0={T}_0^{CM}+0 $$
(35)
For other CHi nodes (i = 1, 2, … , h − 1), the time to start receiving the packets sent by CHi − 1 depends on the time when CHi completes the data collection work in the cluster (\( {T}_i^{CM} \)) and the time when all the data collection work is completed by CHi − 1 (Ti − 1). That is, only after completing the above two parts of work, the CH node can start the relay process between clusters.
The time required for CHi to receive the packets sent by CHi − 1 depends on the number of CHi − 1 nodes (dCH) and the amount of data sent by each CHi − 1 (\( {N}_{CH_{i-1}}^s \)). Thus, the time for CHi to complete all collection work (including collecting data packets among CMi nodes and CHi − 1 nodes) can be expressed as:
$$ {T}_i=\max \left({T}_{i-1},{T}_i^{CM}\right)+{d}^{CH}\ast {N}_{CH_{i-1}}^s $$
(36)
It should be noted that when CHi − 1 sends a packet to CHi, we do not have to send the RTS data packet to allocate the time slot first. There are two main reasons:
First, the packet sent by CHi − 1 is a summary of multiple previous packets and must be accepted.
Secondly, the probability that a CHi − 1 node has a data packet to send is very large, especially as the number of layers increases, the probability approaches infinitely to one.
In this case, the practice of data collection within clusters is always counterproductive, increasing energy consumption and latency. Therefore, the best method is to arrange a fixed time slot directly for each CHi − 1.
4.4 Energy consumption
In our research, the energy consumption mainly comes from three parts (packet transmission, keep listening, as well as switching status). As for other energy consumption, they can be ignored.
Theorem 5 For a node on layer (i = 0, 1, …h − 1), the energy consumed is mainly: the energy consumed to transfer packets (\( {E}_i^T \)), to keep listening (\( {E}_i^{LPL} \)) and by switching state (\( {E}_i^{ats} \)):
$$ {E}_i={E}_i^T+{E}_i^{LPL}+{E}_i^{ats} $$
(37)
Here:
$$ {E}_i^T=\frac{N_{CM_i}^s\ast {E}_{s, CM}+{N}_{CH_i}^s\ast {E}_{s, CH}+{N}_{CH_i}^r\ast {E}_r}{n_i+1} $$
(38)
$$ {E}_i^{LPL}=\frac{\left({N}_{CM_i}^{lpl}+1\right)\ast {E}_l}{n_i+1} $$
(39)
$$ {E}_i^{ats}=\frac{\left({N}_{CM_i}^{sta}\ast {n}_i+{N}_{CH_i}^{sta}\right)\ast {E}_{ats}}{n_i+1} $$
(40)
\( {N}_{CM_i}^{lpl} \) indicates the time the node keeps listening:
$$ {N}_{CM_i}^{lpl}=\sum \limits_{k=0}^{n_i}k\ast {A}_{n_i}^k $$
(41)
\( {N}_{CM_i}^{sta} \) and \( {N}_{CH_i}^{sta} \) indicates how many times the state of the CM node and the CH node switched:
$$ {N}_{CM_i}^{sta}=p\ast \sum \limits_{k=1}^{n_i}{A}_{n_i}^k\ast \left(1\ast \frac{1}{k}+2\ast \frac{k-1}{k}\right) $$
(42)
$$ {N}_{CH_i}^{sta}=\left\{\begin{array}{c}\ 1\kern3.5em \mathrm{when}\kern1em {T}_{i-1}\le {y}_i\ \\ {}2\kern3.5em \mathrm{when}\kern1em {T}_{i-1}>{y}_i\end{array}\right. $$
(43)
Proof According to the Theorem 3 in Section 4.2, the data packets transmitted by nodes are mainly divided into three categories. In the layer i, the packets sent by the CM node is \( {N}_{CM_i}^s \), sent and received by the CH node is \( {N}_{CH_i}^s \) and \( {N}_{CH_i}^r \). So for a node on layer i, the energy consumed for transmission is:
$$ {E}_i^T=\frac{N_{CM_i}^s\ast {E}_{s, CM}+{N}_{CH_i}^s\ast {E}_{s, CH}+{N}_{CH_i}^r\ast {E}_r}{n_i+1} $$
(44)
Because of the two mutually influential processes of listening and state switching, they are discussed together.
In comparison, the process of keeping the CM node listening is much simpler. After sending the RTS packet, it keeps listening until the broadcast data is received. Therefore, the average number of CM nodes that are listening is:
$$ {N}_{CM_i}^{lpl}=\sum \limits_{k=0}^{n_i}k\ast {A}_{n_i}^k $$
(45)
The initial state of the nodes in these clusters is the sleep state, and the nodes with data to be sent will be switched to the awake state in the first time slot. These nodes will then remain in sleep until the corresponding time slot arrives. These nodes will go to sleep again after the data has been transferred. In particular, if a transmission time slot allocated by a CM node happens to be the second time slot, then the node will remain awake in the second slot.
In summary, the number of state transitions has the following possibilities: (1) zero times, that is, no data transmission; (2) once, that is, the assigned time slot is the second time slot; (3) twice, that is, nodes assigned to other time slots. Therefore, the average number of times the node switches states is:
$$ {N}_{CM_i}^{sta}=p\ast \sum \limits_{k=1}^{n_i}{A}_{n_i}^k\ast \left(1\ast \frac{1}{k}+2\ast \frac{k-1}{k}\right) $$
(46)
Where p is the probability of generating a packet.
The CHi node keeps listening for a duration of one slot (used to receive RTS packets in the first slot), which is:
$$ {N}_{CH_i}^{lpl}=1 $$
(47)
The CHi node wakes up at the beginning of each round of data transmission, and then its state switching has two cases. If the CHi completes the in-cluster receipt collection, the CHi − 1 node has not completed the data collection. Then the CHi will switch to sleep state first, and wait until the CHi − 1 starts sending data before it wakes up again. In this case, the state is switched twice. Conversely, the CHi will continue to receive packets from the CHi − 1. In this case, the CHi only needs to switch the state once.
$$ {N}_{CH_i}^{sta}=\left\{\begin{array}{c}\ 1\kern3.5em \mathrm{when}\kern1em {T}_{i-1}\le {y}_i\ \\ {}2\kern3.5em \mathrm{when}\kern1em {T}_{i-1}>{y}_i\end{array}\right. $$
(48)
Where Ti − 1 represents the time when the CHi − 1 (i = 1, 2, … , h − 1) node completes the collection of all data, and yi represents the time when the CHi node completes the data collection in the cluster.
Due to listening, the average energy consumed is expressed as follows:
$$ {E}_i^{LPL}=\frac{\left({N}_{CM_i}^{lpl}+{N}_{CH_i}^{lpl}\right)\ast {E}_l}{n_i+1}=\frac{\left({N}_{CM_i}^{lpl}+1\right)\ast {E}_l}{n_i+1} $$
(49)
Similarly, due to the switching state, the average energy consumed is:
$$ {E}_i^{ats}=\frac{\left({N}_{CM_i}^{sta}\ast {n}_i+{N}_{CH_i}^{sta}\right)\ast {E}_{ats}}{n_i+1} $$
(50)
Thus, by adding the above three energies, the total energy consumed on layer i can be obtained.
$$ {E}_i={E}_i^T+{E}_i^{LPL}+{E}_i^{ats} $$
(51)