The balanced wireless sense network route of bidirectional energy method based on LEPS
Technical field:
The present invention relates to the wireless sensor network technology field, be specifically related to the balanced wireless sensor network routing method of a kind of bidirectional energy based on the LEPS agreement.
Background technology:
Wireless sensor network is a kind of system that technology such as detection, radio communication and computer network are combined, and can carry out long-range perception and monitoring to the physical features in certain zone.Because multiple-task such as born detection, processing and communicate by letter, wireless sensor network is faced with the pressure of resources such as bigger energy and bandwidth.Sensor node volume in the wireless sensor network, calculating and storage capacity are limited, usually rely on battery that energy is provided, transmit power limited, generally need multi-hop to transmit and realize that data transmit, the sensor node position may change because of moving, energy also can reduce until the node power down does not in time gradually work, usually each sensor node has terminal and two kinds of functions of router concurrently, need the various user oriented application programs of operation, with corresponding Routing Protocol, and finish the transmission work of packet according to routing policy, therefore require node to adopt appropriate routing protocol.
LEPS(Link Estimation and Parent Selection) agreement is a kind of plane radio sensor network Routing Protocol that data acquisition is used that is suitable for.It is root node with the aggregation node that the LEPS Routing Protocol is set up one based on minimum hop count and link-quality, and ordinary node is the tree topology network of branches and leaves.LEPS Routing Protocol transmission delay is less, and reliability is higher, and realizes that simply it is few to take resource, but because he has only stipulated the up route of transfer of data, can't be applied to the network that aggregation node need have demand for control to the data source node.In addition, because selecting the foundation of father node in the LEPS Routing Protocol is jumping figure and link-quality, do not consider the capacity factor of node, so can cause the unbalanced of load, especially be for the fixing network of node location, this unbalanced will become more apparent, the node that part is served as father node exhausts energy easily prematurely.
Summary of the invention:
Deficiency at the existence of LEPS Routing Protocol, the balanced wireless sensor network routing method of a kind of two-way measurement based on the LEPS Routing Protocol has been proposed, this method increases descending route on the basis of LEPS Routing Protocol, support aggregation node to inquiry and the control of other node, in addition, this method is improved the routing foundation of LEPS Routing Protocol, has introduced dump energy on the basis of jumping figure and data link quality, has improved the load balancing of network.
Concrete technical scheme of the present invention is as follows:
Based on the LEPS Routing Protocol, the present invention realizes two-way choice and the balancing energy of route by the following technical solutions.
At first, in the process that up route is set up, comprise this nodal point separation aggregation node jumping figure, link-quality and dump energy information in the routing state information of node broadcasts.Node is at first selected the candidate parent node according to the minimum hop count principle, and is a plurality of if the candidate parent node has, then according to determining father node by link-quality and the common transmission desired value that determines of dump energy.
Then, after up route is set up, node sends a descending route messages bag after upgrading father node at every turn immediately, the path that descending route messages bag is set up along up route is sent to aggregation node, and on the way record the node address of process, aggregation node is set up descending routing table by source node after receiving descending route messages.
At last, after the up route and the foundation of descending route of network, in order to realize maintenance and the renewal of topology, network access node is still periodically broadcasted routing state information, by the broadcasting routing state information notice current link-quality of neighbor node and dump energy, all nodes can be known current neighbor node topology information and in real time to the link-quality between these neighbor nodes like this.On the basis of having grasped these information, all these nodes all can periodically be selected father node, the foundation of selecting father node also is by link-quality and the common transmission desired value that determines of dump energy, so just can and upgrade network topology when some node failure or link change on the spot, guarantee the self-healing ability with height of network.
The balanced wireless sense network route of bidirectional energy method based on LEPS specifically may further comprise the steps:
1, network establishment stage:
Step 101: after node powers on, carry out netinit.Node is set the routing table parameter according to the identity of oneself.Aggregation node is set to 0 with the jumping figure of oneself, and other its nodes are set to maximum (255) with jumping figure;
Step 102: after initialization is finished, node periodic broadcast state information.State information comprises node serial number, jumping figure, link-quality and dump energy; The neighbor node of node just is deposited into information in the routing table of oneself after receiving state information.
Step 103: the neighbor node of aggregation node is after the broadcasting of receiving aggregation node, select aggregation node as the father node of oneself, and oneself jumping figure is set to 1, form the node of first gradient, and the new state information of next broadcast cycle broadcasting, after other node is received the state information of the first gradient node, the jumping figure that oneself at first is set is 2, form the node of second gradient, and in the new state information of next broadcast cycle broadcasting, this process repeats down, has all upgraded up to all nodes and oneself has arrived the jumping figure of aggregation node.Node is foundation to father node with jumping figure, link-quality and dump energy.Node is at first selected the candidate parent node according to the principle of jumping figure minimum, when a plurality of candidate parent node, node utilizes link-quality and the dump energy in the state information to calculate the transmission desired value, selects father node according to the principle of transmission desired value maximum from the candidate parent node then.The computational methods of wherein transmitting desired value are as follows:
The first step: calculate the link estimated value
Internodal two-way link communication quality is weighed by successful communication rate between the statistics neighbor node.The basic thought that link is estimated is to receive that from certain neighbor node grouping accounts for the proportion that this neighbor node sends to the number of packet of this node in the statistics certain hour.Link estimates to comprise two parts among the LEPS: send cost and estimate and receive cost to estimate that the computing formula of link estimated value is as follows:
Est=SendEst×RcvEst
Wherein, SendEst and RcvEst are respectively to send and receive success rate and accept success rate.In order to reduce link flapping, further adopt exponential weighting displacement average (EWMA) to calculate final link estimated value.Computing formula is:
EstFinal=EstOld×α+EstNew×(1-α)
Wherein, be the link estimation of last one-period (EstOld), occupation ratio is α, (EstNew) is that this cycle link estimates that occupation ratio is (1-α).
Second step: detect dump energy
The detection of dump energy needs the electric weight detection module of physical layer to provide support, and the electric weight detection module calculates dump energy by ADC sampling supply voltage, and computing formula is as follows:
Wherein, n is the precision of ADC, V
RefBe reference voltage, N is the value in the ADC output register.
The 3rd step: link estimated value and dump energy normalization
Because link estimated value and dump energy dimension disunity, directly both values of use are transmitted and are expected that assessment will be very difficult, therefore, for reasonably distribute links quality and dump energy are at first carried out normalization to link estimated value and dump energy to the influence degree of transmission desired value.Computing formula is as follows:
Wherein, MaxEst is the maximum of link-quality, and RatEng is the power supply rated voltage.
The 4th step: determine the transmission desired value
In order when selecting father node, to take all factors into consideration link-quality and dump energy, reach that can guarantee again can be with regard to the purpose of balanced same gradient interior nodes load than low packet loss ratio, transmission desired value (EXT) is represented by the weighted average of link estimated value and dump energy, wherein the former occupation ratio is β, the latter's occupation ratio is (1-β), that is:
EXT=βNormEst+(1-β)NormEst
Step 104: node namely generates a descending route bag after having selected father node, descending route bag comprises a path field, and the length of path field equals the depth of network.Path field is initialized as 0.
Step 105: node sends to father node with descending route bag, after father node is received descending route bag, inserts oneself node serial number in the path field of route bag, is transmitted to the father node of father node then.
Step 106: repeating step 305, be forwarded to aggregation node up to descending route bag, at this moment, recorded the path of node to aggregation node in the descending route bag, aggregation node is deposited into the information in the descending route bag in the routing table of oneself, has namely created the descending route of node.
2, data transfer phae
After a node networks, just the transmission of data can have been carried out.When data need send back aggregation node, node just sent the data to its father node.Father node sends to these data the father node of father node again, till sending it back aggregation node.When aggregation node need send control command to some ordinary nodes of having networked, it just added the path of this node in the order bag, and the node that just wraps on the path of order is forwarded to destination node step by step then.
3, topology is safeguarded and update stage:
Node still can periodically be broadcasted routing iinformation after networking.By routing iinformation notice neighbor node current link quality and dump energy.All nodes can be known current neighbor node topology information and the transmission desired value between these neighbor nodes in real time like this.On the basis of having grasped these information, all ordinary nodes are periodically selected new father node according to the transmission desired value of latest computed.So just can when some node failure or link change, upgrade network topology in time, guarantee the self-healing ability of network height.
Beneficial effect of the present invention:
Compare with the LEPS Routing Protocol, the present invention has following beneficial effect:
1, increases descending route, realized the control of aggregation node to ordinary node, expanded the range of application of Routing Protocol.
2, the realization of descending route realizes simply that based on up route extra control information is few, can effectively economize on resources.
3, jumping figure, link-quality and residue energy of node are combined the foundation that is considered as the father node selection simultaneously, realized the load balancing of same gradient node, avoid individual nodes because of the overweight premature failure of load, the life cycle that has prolonged whole network.
Description of drawings
Fig. 1 is based on the structure chart of the balanced wireless sense network route of bidirectional energy of LEPS.
Fig. 2 is based on the balanced wireless sense network route of the bidirectional energy workflow diagram of LEPS.
Fig. 3 is based on the balanced wireless sense network route of the bidirectional energy father node of LEPS and selects flow chart.
Fig. 4 is based on the descending route of the balanced wireless sense network route of bidirectional energy of LEPS and sets up flow chart.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is done further and to illustrate.
As shown in Figure 1, the workflow of the bidirectional energy route equalization method based on the LEPS agreement disclosed in this invention is: after node powers on, at first judge it oneself is aggregation node or ordinary node.If aggregation node at first will carry out corresponding initialization, begin the periodic broadcast routing state information then, keep simultaneously the intercepting of channel received the routing iinformation from ordinary node, safeguard descending routing table.If ordinary node, node at first carries out corresponding initialization, go on the air then routing state information and intercept channel, in a routing update cycle, node receives the route bag of other node and judges, if what receive is up route bag, then extract routing iinformation, maintaining routing list is if descending route bag, then in the route bag, insert routing information, transmit then.When a routing update cycle arrives, carry out father node again according to jumping figure, link-quality and dump energy and select, father node sends descending routing iinformation to aggregation node after upgrading immediately.
As shown in Figure 2, described network establishment stage specifically may further comprise the steps:
Step 101: after node powers on, at first carry out initialization, in this process, node is set route bag parameter according to the identity of oneself.The root node jumping figure is made as 0, and the jumping figure of ordinary node all is made as maximum (255).
Step 102: after initialization was finished, node began the periodic broadcast routing state information, comprised in the state information that this node is to jumping figure, the link-quality between node and the neighbor node and the dump energy of node of aggregation node.Wherein link-quality uses a link evaluator to calculate, and dump energy information then needs to use the electric weight detection module of physical layer.
Step 103: the neighbor node of aggregation node is made as father node with aggregation node after receiving the routing state information of aggregation node, and oneself jumping figure is made as 1, is the first gradient node.The first gradient node is broadcasted the state information of oneself subsequently, and its neighbor node receives that the jumping figure that a hop node state information arranges oneself is 2, and a hop node is made as the candidate parent node, becomes the second gradient node.When a plurality of candidate parent node, from the candidate parent node, determine a father node according to the size of transmission desired value.After the second gradient node adds network, continue to broadcast own routing state information to neighbor node.And the like, till all nodes all entered network, so just setting up with the aggregation node was root, is the tree network of branches and leaves with other nodes, the node in the network is divided into different gradients by the jumping figure to root node.
As shown in Figure 3, described transmission desired value uses following method to determine:
The first step: calculate the link estimated value
Internodal two-way link communication quality is weighed by successful communication rate between the statistics neighbor node.The basic thought that link is estimated is to receive that from certain neighbor node grouping accounts for the proportion that this neighbor node sends to the number of packet of this node in the statistics certain hour.Link of the present invention estimates to continue to use the method in the LEPS agreement, comprises two parts: send cost and estimate and receive cost to estimate.And represent the two-way communication cost of link with these two values.The estimation of link-quality comprises following concrete steps between any two node A and the B:
At first, computing node A receives the success rate of the grouping of grouping B transmission in a period of time.Formula is as follows:
RcvEst
A/B=RcvCount
A/SendCount
B
Wherein, RcvCount
AInterior nodes A receives the grouping number of Node B, SendCount for a period of time
BSend to the packet count of node A for Node B.Equally, Node B also can calculate recipient node A transmission grouping success rate and in its periodic status broadcasting, comprise the own reception success rate that arrives all neighbor nodes, its neighbor node A is with the reception success rate of the Node B transmission success rate as oneself, and formula is:
SendEst
A/B=RcvEst
B/A
Node is calculating with neighbours' reception success rate and after obtaining sending success rate, can determine and the two-way link estimated value of this neighbor node that computing formula is as follows from the state information of neighbor node:
Est=SendEst×RcvEst
Wherein, SendEst and RcvEst represent to send the reception success rate respectively and receive success rate.In order to reduce link flapping, further adopt exponential weighting displacement average (EWMA) to calculate final link estimated value.
EstFinal=EstOld×α+EstNew×(1-α)
Wherein, α is the occupation ratio that the link of calculating of last one-period is estimated, 1-α is that the link that calculates in this cycle is estimated occupation ratio.
Second step: detect dump energy
The detection of dump energy needs the electric weight detection module of physical layer to provide support, and the electric weight detection module calculates dump energy by ADC sampling supply voltage, and computing formula is:
Wherein, n represents the precision of ADC, V
RefRepresent reference voltage, N represents the value in the ADC output register.
The 3rd step: link estimated value and dump energy normalization
Because link estimated value and dump energy dimension disunity, directly both values of use are transmitted and are expected that assessment will be very difficult, therefore, for reasonably distribute links quality and dump energy are at first carried out normalization to link estimated value and dump energy to the influence degree of transmission desired value.Computing formula is as follows:
Wherein, the maximum that MaxEst represents link-quality is that RatEng represents the power supply rated voltage.
The 4th step: determine the transmission desired value
In order when selecting father node, to take all factors into consideration link-quality and dump energy, reach that can guarantee again can be with regard to the purpose of balanced same gradient interior nodes load than low packet loss ratio, transmission desired value (EXT) represents that by the weighted average of link estimated value and dump energy computing formula is as follows:
EXT=βNormEst+(1-β)NormEst
Wherein, β is the occupation ratio of link-quality, and (1-β) has ratio for occupying of dump energy.
Step 104: node namely generates a descending route bag after having selected father node, descending route bag comprises a path field, and the length of path field equals the depth of network.Path field is initialized as 0.
Step 105: node sends to father node with descending route bag, after father node is received descending route bag, inserts oneself node serial number in the path field of route bag, is transmitted to the father node of father node then.
Step 106: repeating step 305, be forwarded to aggregation node up to descending route bag, at this moment, recorded the path of node to aggregation node in the descending route bag, aggregation node is deposited into the information in the descending route bag in the routing table of oneself, has namely created the descending route of node.
2, data are transmitted
After a node networks, just the transmission of data can have been carried out.When data need send back the control node, node just sent the data to its father node.Father node sends to these data the father node of father node again, till sending it back the control node.Therefore basic LEPS route is a kind of Routing Protocol that is applicable to that information gathering is used.
3, topology is safeguarded and upgraded: node still can periodically be broadcasted routing iinformation after networking.By routing iinformation notice neighbor node current link quality and dump energy.All nodes can be known current neighbor node topology information and the transmission desired value between these neighbor nodes in real time like this.On the basis of having grasped these information, all nodes all can be periodically according to and neighbor node between the transmission desired value reselect father node.So just can when some node failure or link change, upgrade network topology in time, guarantee the self-healing ability of network height.