Disclosure of Invention
The invention aims to provide a data collection method based on constructive interference in an asynchronous low-duty ratio WSN (wireless sensor network), which can effectively reduce the control overhead in a network, improve the data packet receiving rate and reduce the end-to-end delay and the network energy consumption, and adopts the following technical effects in order to realize the aim:
according to one aspect of the present invention, there is provided a constructive interference based data collection method in an asynchronous low duty cycle WSN, the data collection method comprising the steps of: the method comprises the steps that n sensor nodes are randomly distributed in an area with the area of M multiplied by M square meters to form a wireless sensor network, wherein n is an integer larger than 1, the sensor nodes at least comprise a Source node, a forwarding node and 1 Sink node, except the Sink node, other sensor nodes in the wireless sensor network adopt an asynchronous LPP mechanism to carry out sleep scheduling, in the network initialization process, the sensor nodes can carry out hierarchical selection to obtain the hop count from the sensor nodes to the Sink node, when data needs to be sent, the Source node selects the forwarding node which wakes up in the network to carry out data forwarding, the forwarding node receives a data packet sent by the Source node and transmits the data packet to the Sink node in parallel, and after the data transmission is finished, the Source node and the forwarding node return to an LPP sleep scheduling state.
Preferably, in the network initialization process, the hierarchical selection performed by the sensor node includes the following steps:
step 21: the Sink node broadcasts a Packet (hop ═ 0) data Packet, wherein the hop represents the hop count from the Sink node;
step 22: any sensor node v in the networki(i e n) receiving neighbor node vj(j belongs to n, j is not equal to i) broadcasted data Packet(vjHop) if vi.hop<=vjHop-1 then connects node viIs set to vi.hop=vjHop +1, then continue broadcasting Packet (v)iHop) data packets are continuously transmitted until all nodes in the network hop to the Sink node, a node with hop being k is named as a k-layer node, wherein k is an integer greater than or equal to 1, and the k-layer node only needs to store hop information and does not need to store any information about adjacent-layer nodes.
Preferably, in the network initialization process, the sensor node only needs to perform level selection once, and after the network initialization is completed, the sensor node performs sleep scheduling according to an LPP mechanism.
Preferably, when data needs to be sent by a Source node on the k layer, the Source node monitors a network channel for a period of time, waits for a neighbor node to wake up and send a probe data packet to establish connection, and after the connection is established, receives an awake data packet sent by the Source node by a neighbor node to prolong the wake-up time of the neighbor node; the Source node sends an awake data packet to the Sink node finally, and the Sink node receives the awake data packet and then passes through TbackoffAfter waiting for time, the Sink node sends a feedback packet to the Source node, TbackoffThe waiting time ensures that the distance between all probe data packets and awake data packets being transmitted is at least two hops, and when receiving the awake packets, the Sink node in the network can process the awake packets according to the following three conditions:
case 41: the nodes with the k being more than or equal to the hop layer are directly discarded and enter a sleeping state, so that the nodes with the k being more than or equal to the hop layer are prevented from participating in the concurrent transmission, and the network energy consumption is reduced;
case 42: when the adjacent node of the k-1 layer forwards the awake data packet, the adjacent node of the hop (k-1) layer with the hop (k-1) information k > hop (k-1) is added to directly discard the awake data packet and enter a sleep state; after receiving the awake data packet, the k-2 layer node overwrites the hop (k-1) with the hop (k-2) before forwarding, and the k-2 layer node continues to perform the same operation as the hop (k-1) node;
case 43: the forwarding node which has processed the awake data packet and keeps awake is not influenced by the awake packet sent by the upper node;
preferably, after receiving the awake packet, the Sink node sends a feedback packet to the Source node, and a forwarding node, which receives the feedback packet, of the Source node processes the feedback packet according to the following three conditions:
case 51: the Source node receives the feedback data packet but does not receive the awake data packet, and discards the feedback data packet and enters a sleep state;
case 52: the forwarding nodes with k being more than or equal to the hop level directly discard the feedback packet and enter a sleep state;
case 53: and the forwarding nodes in the same level receive the feedback data packet sent by the node in the previous level at the same time, the forwarding nodes directly copy the data from the receiving queue to the sending queue without any processing for sending, and finally the feedback data packet is transmitted to the Source node in a concurrent mode and generates constructive interference at the Source node.
Preferably, through TbackoffAfter waiting for time, the Sink node sends a feedback packet to the Source node, and when the feedback packet reaches the Source node, the Source node is at TwaitAfter the waiting time, the initiation interval is TcountThe data packets collected by the sensor nodes are transmitted at the moment; after the forwarding nodes in the same level receive the data packet at the same time, there is a fixed waiting time T before sending the data packetprocessTherefore, the condition of constructive interference is met, and at the moment, the forwarding node on the path from the Source node to the Sink node cannot initiate a probe data packet or an awake data packet, so that the condition of T is metwait<Tbackoff;
After the Source node starts concurrent transmission, if the concurrent transmission is at 2 xTprocessIf the node does not hear that the k ═ hop-1 layer node forwards the data packet, then retransmission is carried out to increase the reliability of transmission; if the node is sensed and data Source nodes are still in the cache queue, the node is at Tcount=2×TprocessAnd continuing to transmit data.
Preferably, after the concurrent transmission is completed, the forwarding node returns to the LPP sleep scheduling state, and after the data transmission is completed, the forwarding node on the transmission path is notified through an implicit termination method or a display termination method that the transmission is completed, and then enters the sleep state, and thereafter, the forwarding node performs the sleep scheduling according to the LPP.
Preferably, in the implicit termination mode, the forwarding nodes participating in the concurrent transmission acquire the number of data packets from the awake packet, and the forwarding nodes go to sleep after the forwarding of the last data packet is completed; in the display termination mode, after receiving all count data packets, the Sink node sends an acknowledgement ACK, otherwise sends a negative acknowledgement NACK, and after forwarding the ACK or the NACK, the forwarding nodes participating in the concurrent transmission terminate the concurrent transmission stage and enter the sleep.
By adopting the technical scheme, the invention has the following technical effects:
(1) the invention can effectively reduce the control overhead in the network, improve the data packet receiving rate, reduce the end-to-end delay and the network energy consumption, and is particularly suitable for the field of sensor monitoring application based on event drive.
(2) The Sink node does not need to store and maintain neighbor information and routing state information, end-to-end delay and network energy consumption can be greatly reduced, and data is quickly and reliably transmitted to the Sink node by using concurrent transmission based on constructive interference only when data is transmitted, so that the data packet receiving rate is improved; the invention combines a low duty ratio mechanism, only part of nodes are needed to participate in concurrent transmission, and the nodes which do not need to participate are not required to sleep, thereby reducing the energy consumption of the network.
(3) In the low-duty-ratio wireless sensor network, an asynchronous duty ratio mechanism is adopted, clock synchronization is not needed, the sleep scheduling of neighbor nodes is not needed, and the life cycle of the network can be prolonged more effectively.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings by way of examples of preferred embodiments. It should be noted, however, that the numerous details set forth in the description are merely for the purpose of providing the reader with a thorough understanding of one or more aspects of the present invention, which may be practiced without these specific details.
As shown in fig. 1, the data collection method based on constructive interference in the asynchronous low duty cycle WSN according to the present invention comprises the following steps: the method comprises the steps that n sensor network nodes are randomly distributed in an area with the area of M multiplied by M square meters, wherein n is an integer larger than 1, the sensor nodes at least comprise a Source node, a forwarding node and 1 Sink node, except the Sink node, other sensor nodes in the wireless sensor network adopt an asynchronous LPP mechanism to carry out sleep scheduling, the sensor nodes carry out hierarchical selection in the network initialization process so as to obtain the hop count from the sensor nodes to the Sink node, when data need to be sent, the Source node selects the waking forwarding node in the network to carry out data forwarding, the forwarding node receives a data packet sent by the Source node and transmits the data packet to the Sink node in parallel, and after the data transmission is finished, the Source node and the forwarding node return to an LPP sleep scheduling state. When the sensor Node collects data and needs to send the data to the Sink Node, the Node is called a Source Node (Source Node), and in the sensor network, the sensor Node which helps the Source Node send the data to the Sink Node is called a forwarding Node (Node).
(1) And when the Source node needs to send data, the channel is monitored all the time, a neighbor node is waited to wake up to send a probe data packet, the Source node sends ACK to establish connection after receiving the probe data packet, and the Source node sends an awake data packet to the Sink node at the moment.
(2) And after receiving the awake data packet, the Sink node returns a feedback data packet (feedback packet) after waiting for a period of time (avoiding collision with the probe data packet and the awake data packet). The forwarding Node1 and the forwarding Node2 are in the same hop, as shown in fig. 1, fig. 2 and fig. 3, so both will receive the feedback packet at the same time. The forwarding Node1 and the forwarding Node2 will not directly send the feedback packet by any processing, and the feedback packet will arrive at the Source Node at the same time and generate constructive interference.
(3) And after the source node receives the feedback packet, the source node considers that the nodes on the path of the Sink node are ready for concurrent transmission. After the Source Node waits for a period of time (collision with a feedback packet of the Sink is avoided), the Node1 forwarding Node and the Node2 forwarding Node send data, receive packets at the same time, and then directly send the packets, and constructive interference is generated at the Sink Node.
(4) And finally, the network can adopt explicit termination or implicit termination to finish data transmission, and the Source Node, the Node1 forwarding Node and the Node2 forwarding Node go to sleep and then carry out sleep scheduling according to the LPP.
In the network initialization process, the hierarchy selection of the Sink node comprises the following steps:
step 21: the Sink node broadcasts a Packet (hop ═ 0) data Packet, wherein the hop represents the hop count from the Sink node; therefore, the Source node acquires the hop count from the Source node to the Sink node;
step 22: any sensor node v in the networki(i e n) receiving neighbor node vj(j belongs to n, j is not equal to i) broadcasted data Packet (v)jHop) if vi.hop<=vjHop-1 then connects node viIs set to vi.hop=vjHop +1, then continue broadcasting Packet (v)iHop) data packets are continuously transmitted until all nodes in the network hop to the Sink node, a node with hop being k is named as a k-layer node, wherein k is an integer greater than or equal to 1, and the k-layer node only needs to store hop information and does not need to store any information about adjacent-layer nodes. In the network initialization process, that is, in the network life cycle, the sensor node only needs to perform one-time hierarchical selection, and after the network initialization is completed, the sensor node performs sleep scheduling according to the LPP mechanism, and in the present invention, in combination with fig. 1, fig. 2, fig. 3, and fig. 4, the LPP mechanism performs sleep scheduling according to the following manner:
when a Source node of a k hop layer has data to send, the Source node monitors a network channel for a period of time TlistenWaiting for the awakening of the neighbor node to send a probe data packet to establish connection, and after the connection is established, receiving an awake data packet sent by the Source node by the neighbor node to prolong the awakening time of the neighbor node; the Source node sends an awake data packet to the Sink node finally, and the Sink node receives the awake data packet and then passes through TbackoffAfter waiting for time, the Sink node sends a feedback packet to the Source node, TbackoffThe waiting time ensures that all probe packets and awake packets being transmitted are at least two hops away from Sink.
When passing TbackoffAfter waiting for time, the Sink node sends a feedback packet to the Source node, and when the feedback packet reaches the Source node, the Source node is at TwaitAfter the waiting time, the initiation interval is TcountThe data packets collected by the sensor nodes are transmitted at the moment; after the forwarding nodes in the same level receive the data packet at the same time, there is a fixed waiting time T before sending the data packetprocessThus satisfying the condition of constructive interference, in which case the sourceThe forwarding node on the path from the ce node to the Sink node cannot initiate a probe data packet or an awake data packet, so that the condition of T is metwait<Tbackoff(ii) a After the Source node starts concurrent transmission, if the concurrent transmission is at 2 xTprocessIf the node does not hear that the k ═ hop-1 layer node forwards the data packet, then retransmission is carried out to increase the reliability of transmission; if the node is sensed and data Source nodes are still in the cache queue, the node is at Tcount=2×TprocessAnd continuing to transmit data. In the invention, when a Sink node in a sensor network receives an awake packet, the Sink node processes the awake packet according to the following three conditions:
case 41: the nodes with the k being more than or equal to the hop layer are directly discarded and enter a sleeping state, so that the nodes with the k being more than or equal to the hop layer are prevented from participating in the concurrent transmission, and the network energy consumption is reduced;
case 42: when the wake data packet is forwarded, the neighbor nodes of the k-1 layer add own hop (k-1) information; after receiving the awake data packet, the neighbor nodes of the k > hop (k-1) layer directly discard and enter a sleep state; after receiving the awake data packet, the k-2 layer node overwrites the hop (k-1) with the hop (k-2) before forwarding, and continues to perform the same operation as the hop (k-1) node;
case 43: the forwarding node which has processed the awake packet and keeps awake is not influenced by the awake packet sent by the upper node; after receiving the awake data packet, the Sink node sends a feedback data packet to the Source node, and the forwarding node, which receives the feedback data packet, of the Source node processes the feedback data packet according to the following three conditions:
case 51: the node receives the feedback data packet but does not receive the awake data packet, and the Source node discards the feedback data packet and enters a sleep state;
case 52: and the forwarding nodes with k being more than or equal to the hop level directly discard the feedback data packet and enter a sleep state.
Case 53: the forwarding nodes in the same level receive the feedback data packets sent by the nodes in the previous level at the same time, the forwarding nodes directly copy the data from the receiving queue to the sending queue without any processing for sending, and finally the feedback data packets are transmitted to the Source node in a concurrent mode and generate constructive interference at the Source node;
in the invention, a forwarding node receives a Source node data packet and transmits the data packet to a Sink node in parallel, and after the parallel transmission is finished, the Sink node transmits a feedback data packet to the Source node; when the feedback data packet arrives at the Source node, the waiting time of the Source node (Source node) is Twait(to avoid collisions with ongoing feedback packet transmissions) followed by an initiation interval of TcountAfter the forwarding nodes in the same layer receive the data packets at the same time, there will be a fixed waiting time T before sending the data packetsprocessThe waiting time generated by the process from the receiving of the data packet to the sending of the data packet by the sensor node is defined as Tprocess. Therefore, the nodes on the same level meet the condition of constructive interference, the end-to-end reliability is increased, and when k is equal to 1 level of nodes, the same data is simultaneously sent to the Sink node, constructive interference is generated, and the successful receiving probability of the data packet is further improved.
The forwarding node records the Metadata (Metadata) of the forwarded data packet, so the data packet is not retransmitted, and the problem of cyclic forwarding is prevented. At this stage, the source node starts to perform concurrent transmission and a node on the path to the Sink does not initiate a probe packet or an awake packet, so T is setwait<Tbackoff。
After the source node initiates the concurrent transmission, if at 2 × TprocessThen, if the forwarding data packet of the k ═ hop-1 layer node is not heard, retransmission is carried out, and the reliability of transmission is increased; if the source node senses that the data is heard and still exists in the buffer queue, the source node is at Tcount=2×TprocessAnd continuing to transmit data.
After the concurrent transmission is finished, the forwarding node returns to the LPP sleep scheduling state, and after the data transmission is finished, the forwarding node on the transmission path is informed of finishing the transmission through an implicit termination mode or a display termination mode, and then enters the sleep state. Then, the nodes perform dormancy scheduling according to LPP, in the implicit termination mode, forwarding nodes participating in concurrent transmission acquire the number of data packets from awake data packets, and the nodes go to sleep after the last data packet is forwarded; the implicit termination mode is simple in transmission, but the forwarding node will always listen to the channel after the data packet is lost, so that the node is set in the adici protocol to exit the concurrent transmission stage and go to sleep after Timeout (tx (h)).
In the display termination mode, after receiving all count data packets, the Sink node sends an acknowledgement ACK, otherwise sends a negative acknowledgement NACK, and after forwarding the ACK or the NACK, the forwarding nodes participating in the concurrent transmission terminate the concurrent transmission stage and enter the sleep. Although the explicit termination method generates extra time for transmitting ACK or NACK, the explicit termination method can reduce Timeout time Timeout (tx (h)) of a node in a network with high packet loss rate.
In the present invention, one is selected to be 100X 100m2The square area of the network is provided with 50 nodes, the Sink node is positioned in the center of the area, and each node generates a data packet (20Bytes) in a data packet generation interval and routes the packet to the Sink node through multiple hops. In this example, the ADCCI employs an explicit termination scheme. In the ADCCI protocol, basic parameter settings are shown in Table 1
Table 1: ADCCI parameter settings
In the invention, by using a Data Collection protocol Tree-based Hop-by-hopeliable Data Collection (THRDC) on Contiki as a comparison protocol, the protocol is the realization of the Collection TreeProcot (CTP) on the Contiki, the performance of the CTP in an LPL mode is better than that in an LPP mode, therefore, an X-MAC protocol is used for providing sleep scheduling for the THRDC, and as shown in figure 4, the T of the X-MAC is setwakeupConsistent with the values of ADCCI. Parameters such as link quality are defaulted according to the system. In this chapter we mean the time interval between two events, denoted by the packet generation interval, and define the duty cycle as: t (time of average radio on per node within packet generation interval)/T (packet generation interval), as shown in fig. 5 and 6, fromAs can be seen in fig. 5, the packet reception rate of adici is close to 100%, while the packet reception rate of THRDC is around 94%. Because in the ADCCI, due to constructive interference, the reliability between the node layers is higher, and a plurality of paths exist in the network to transmit data simultaneously, and finally, the constructive interference is generated at the Sink node, so that the receiving probability is further increased. When the THRDC transmits data, each hop is a node with the smallest ETX (Expected Transmission Count) value. And when the data transmission fails, updating the ETX and then waiting for the node with the minimum ETX value to wake up again. If the ETX value changes greatly, the sending node also broadcasts to inform other nodes to update the route, thereby increasing the transmission delay and the wakeup time of the node. It is also evident from the duty cycle in fig. 6 that the THRDC protocol radio is on for a longer period of time during the same packet generation interval. It can therefore be concluded from fig. 6 that the adici improves the packet reception rate by 5.8% while reducing the duty cycle by 24.6% relative to the THRDC.
In the present invention, as shown in fig. 7, the average end-to-end delay and the concurrent transmission delay are shown, and as can be seen from fig. 7, the average end-to-end delay of THRDC is 12.78s and that of adici is 9.95s at different packet generation intervals. Thus the adici can reduce the end-to-end delay by 22.1% relative to the THRDC. As can be seen from fig. 8, the delay incurred by the concurrent transmission phase is 8.9% proportional to the adici average end-to-end delay (average 0.89s), while 91.1% of the time is in preparation for the concurrent transmission phase. The delay generated by the concurrent transmission phase does not vary much, so the proportion of the concurrent transmission phase becomes smaller as the average end-to-end delay increases, and thus two minima are generated when the packet generation interval is equal to 1200s and 2400 s. It can be seen from fig. 7 and 8 that the concurrent transmission based on constructive interference is a low-delay data transmission method.
The control overhead is controlled, and experiments compare the number of control packets required by average transmission of each data packet under different data packet generation intervals in the whole data transmission process of ADCCI and THRDC, wherein the smaller the overhead of each data packet is, the smaller the energy consumed by the whole network for transmitting each data packet is, the higher the energy utilization rate is, in an X-MAC protocol, a node continuously transmits beacon frames before a next hop node starts to receive the data packet, and the number of the continuously transmitted beacon frames is recorded as 1.
The number of control packets required for the THRDC is small when the packet generation interval is small, but this overhead increases rapidly as the packet generation interval increases because the THRDC protocol requires regular maintenance of the routing state and generates control packet overhead although there is no data to be transmitted in the network. Since the node generates the control packet only when there is a data packet to be sent, the required control packet for each data packet does not change significantly as the data packet generation interval increases, which illustrates that the duty cycle of THRDC does not decrease further and the duty cycle of adici tends to decrease in fig. 7 when the data packet generation interval is equal to 1800 s.
Network energy consumption for ADCCI and THRDC was analyzed in conjunction with FIGS. 6 and 9. The radio in the sensor node is the most energy consuming unit and figure 6 shows that the adici radio is turned on 24.6% less than the THRDC during the same packet generation interval. Fig. 9 shows that the control packet overhead required for averaging each data in the adici protocol hardly varies in different packet generation intervals, so that the adici can effectively reduce the network power consumption relative to the THRDC.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be construed as the protection scope of the present invention.