The balanced wireless sense network route of bidirectional energy method based on LEPS agreement
Technical field:
The present invention relates to wireless sensor network technology field, be specifically related to the balanced wireless sensor network routing method of a kind of bidirectional energy based on LEPS agreement.
Background technology:
Wireless sensor network is a kind of system that the 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 area.Because the multiple-task such as born detection, processing and communicate by letter, wireless sensor network is faced with the pressure of the larger resource such as energy and bandwidth.Sensor node volume in wireless sensor network, calculating and storage capacity are limited, conventionally rely on battery that energy is provided, transmit power limited, generally need multi-hop to forward and realize data transmission, sensor node position may change because of moving, energy also can reduce in time gradually until node power down is not worked, common each sensor node has terminal and two kinds of functions of router concurrently, need to move various user oriented application programs, with corresponding Routing Protocol, and complete the transmission work of packet according to routing policy, therefore require node to adopt suitable Routing Protocol.
LEPS(Link Estimation and Parent Selection) agreement is a kind of plane radio several routing protocols for wireless sensors networks that is suitable for data acquisition application.LEPS Routing Protocol is set up one take aggregation node as root node based on minimum hop count and link-quality, the tree topology network that ordinary node is branches and leaves.LEPS Routing Protocol transmission delay is less, and reliability is higher, and realizes simply, takies resource few, has still only stipulated the up route of transfer of data due to him, and cannot be applied to aggregation node need to have to data source nodes the network of demand for control.In addition, due in LEPS Routing Protocol, select father node according to being jumping figure and link-quality, do not consider the capacity factor of node, so can cause the unbalanced of load, especially be the network fixing for node location, this unbalanced will become more apparent, the node that part is served as father node easily exhausts energy prematurely.
Summary of the invention:
The deficiency existing for LEPS Routing Protocol, the balanced wireless sensor network routing method of a kind of two-way measurement based on LEPS Routing Protocol has been proposed, the method increases downstream routing on the basis of LEPS Routing Protocol, support inquiry and the control of aggregation node to other node, in addition, the method according to improving, has been introduced dump energy to the routing of LEPS Routing Protocol 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 LEPS Routing Protocol, the present invention realizes two-way choice and the balancing energy of route by the following technical solutions.Wherein LEPS agreement is that link is estimated to select Routing Protocol with father node
First,, in the process of up Route establishment, the routing state information of node broadcasts comprises this nodal point separation aggregation node jumping figure, link-quality and dump energy information.First node selects candidate parent node according to minimum hop count principle, multiple if candidate parent node has, according to determining father node by link-quality and the common transmission desired value determining of dump energy.
Then, after up Route establishment, node sends a downstream routing message bag after upgrading father node at every turn immediately, downstream routing message bag is sent to aggregation node along the path of up Route establishment, and on the way record the node address of process, aggregation node is set up downstream routing table by source node after receiving downstream routing message.
Finally, after the up route and downstream routing foundation of network, in order to realize topological maintenance and renewal, still broadcast state information periodically of network access node, by the current link-quality of broadcast state information notification neighbor node and dump energy, all like this nodes can be known in real time current neighbor node topology information and arrive the link-quality between these neighbor nodes.Grasping on the basis of these information, all these nodes all can periodically be selected father node, select father node according to being also by the common transmission desired value determining of link-quality and dump energy, so just can and upgrade network topology in the time of 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 comprises the following steps:
1, network establishment stage:
Step 101: after node powers on, carry out netinit.Node is set routing table parameter according to the identity of oneself.Aggregation node is set to 0 by the jumping figure of oneself, and jumping figure is set to maximum (255) by other its nodes;
Step 102: after initialization completes, node periodic broadcast state information.State information comprises node serial number, jumping figure, link-quality and dump energy; The neighbor node of node is just deposited into information in the routing table of oneself after receiving state information.
Step 103: the neighbor node of aggregation node is after the broadcast of receiving aggregation node, select the father node of aggregation node as oneself, and the jumping figure of oneself is set to 1, form the node of the first gradient, and next broadcast cycle is broadcasted new state information, other node is received after the state information of the first gradient node, the jumping figure that first oneself is set is 2, form the node of the second gradient, and broadcast new state information in next broadcast cycle, this process repeats down, until all nodes have all upgraded the jumping figure that oneself arrives aggregation node.Node to father node take jumping figure, link-quality and dump energy as foundation.First node selects candidate parent node according to the principle of jumping figure minimum, in the time having multiple candidate parent node, node utilizes link-quality and the dump energy in state information to calculate transmission desired value, then from candidate parent node, selects father node according to the principle of transmission desired value maximum.The computational methods of wherein transmitting desired value are as follows:
The first step: calculate link estimated value
Internodal two-way link communication quality is that the success rate by communicating by letter between statistics neighbor node is weighed.The basic thought that link is estimated is to receive that from certain neighbor node grouping accounts for this neighbor node and send to the proportion of the number of packet of this node in statistics certain hour.LEPS link estimates to comprise two parts: send cost and estimate and receive cost to estimate, the computing formula of link estimated value is as follows:
Est=SendEst×RcvEst
Wherein, SendEst and RcvEst are respectively and send success rate and successful receiving rate.In order to reduce link flapping, further adopt the exponential weighting displacement method of average (EWMA) to calculate final link estimated value.Computing formula is:
EstFinal=EstOld×α+EstNew×(1-α)
Wherein, EstOld was the link estimated value in a upper cycle, and occupation ratio is α, and EstNew is that this cycle link is estimated, 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 electric weight detection module calculates dump energy by the ADC supply voltage of sampling, and computing formula is as follows:
Wherein, the precision that n is ADC, V
reffor reference voltage, N is the value in ADC output register.
The 3rd step: link estimated value and dump energy normalization
Due to 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 the dump energy influence degree to transmission desired value, first link estimated value and dump energy are normalized, i.e. normalization link estimated value (NormEst) and normalization dump energy (NormEng).Computing formula is as follows:
Wherein, the maximum that MaxEst is link-quality, RatEng is power supply rated voltage.
The 4th step: determine transmission desired value
In order to consider link-quality and dump energy in the time selecting father node, reach that can guarantee again can be with regard to the object of balanced same gradient interior nodes load compared with 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-β)NormEng
Step 104: node, after having selected father node, generates a downstream routing bag, and downstream routing bag comprises a path field, and the length of path field equals the depth of network.Path field is initialized as 0.
Step 105: downstream routing bag is sent to father node by node, father node is received after downstream routing bag, inserts the node serial number of oneself in the path field of route bag, is then transmitted to the father node of father node.
Step 106: repeating step 305, until downstream routing bag is forwarded to aggregation node, now, in downstream routing bag, record the path of node to aggregation node, aggregation node is deposited into the information in downstream routing bag in the routing table of oneself, has created the downstream routing of node.
2, data transfer phae
After a node networks, just the transmission of data can be carried out.In the time having data to send back aggregation node, node just sends the data to its father node.Father node sends to these data the father node of father node again, until send it back aggregation node.In the time that aggregation node need to send control command to some ordinary nodes of having networked, it just adds the path of this node in order bag, and then order is just wrapped along the node on path and is forwarded to step by step destination node.
3, topology maintenance and more new stage:
Node broadcast information periodically still after networking.Notify the current link-quality of neighbor node and dump energy by routing iinformation.All like this nodes can be known the transmission desired value between current neighbor node topology information and these neighbor nodes in real time.Grasping on the basis of these information, all ordinary nodes are periodically selected new father node according to the transmission desired value of latest computed.So just can in the time that some node failure or link change, upgrade in time network topology, guarantee the self-healing ability of network height.
Beneficial effect of the present invention:
Compared with LEPS Routing Protocol, the present invention has following beneficial effect:
1, increase downstream routing, realized the control of aggregation node to ordinary node, expanded the range of application of Routing Protocol.
2, the realization of downstream routing, based on up route, realizes simply, and extra control information is few, can effectively economize on resources.
3, jumping figure, link-quality and residue energy of node are combined and be considered as the foundation that father node is selected simultaneously, realized the load balancing of same gradient node, avoid indivedual nodes because of the overweight premature failure of load, the life cycle that has extended whole network.
Accompanying drawing explanation
1, the structure chart of the balanced wireless sense network route of the bidirectional energy based on LEPS.
2, the balanced wireless sense network route of the bidirectional energy based on LEPS workflow diagram.
3, the balanced wireless sense network route of the bidirectional energy based on LEPS father node is selected flow chart.
4, the balanced wireless sense network route of the bidirectional energy based on LEPS downstream routing Establishing process figure.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is done further and illustrated.
As shown in Figure 1, the workflow of the bidirectional energy route equalization method based on LEPS agreement disclosed in this invention is: after node powers on, first judge it oneself is aggregation node or ordinary node.If first aggregation node will carry out corresponding initialization, then start periodic broadcast routing state information, keep, to the intercepting of channel, receiving the routing iinformation from ordinary node simultaneously, safeguard downstream routing table.If ordinary node, first node carries out corresponding initialization, then go on the air routing state information intercept channel, within a routing update cycle, node receives the route bag of other node and judges, if what receive is up route bag, extract routing iinformation, maintaining routing list, if downstream routing bag, in route bag, insert routing information, then forward.In the time that a routing update cycle arrives, re-start father node according to jumping figure, link-quality and dump energy and select, after father node upgrades, send downstream routing information to aggregation node immediately.
As shown in Figure 2, described network establishment stage specifically comprises the following steps:
Step 101: after node powers on, first carry out initialization, in this process, node is set route bag parameter according to the identity of oneself.Root node jumping figure is made as 0, and the jumping figure of ordinary node is all made as maximum (255).
Step 102: after initialization completes, node starts periodic broadcast routing state information, state information comprises jumping figure, link-quality node and neighbor node between and the dump energy of node of this node to aggregation node.Wherein link-quality calculates by a link evaluator, and dump energy information needs to use the electric weight detection module of physical layer.
Step 103: the neighbor node of aggregation node is received after the routing state information of aggregation node, and aggregation node is made as to father node, and the jumping figure of oneself is made as to 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 to candidate parent node, becomes the second gradient node.In the time having multiple candidate parent node, from candidate parent node, determine a father node according to the size of transmission desired value.The second gradient node adds after network, continues to broadcast own routing state information to neighbor node.The like, until all nodes all enter network, so just set up take aggregation node as root, the tree network take other nodes as branches and leaves, the node in network is by being divided into different gradients to the jumping figure of root node.
As shown in Figure 3, described transmission desired value is used following methods to determine:
The first step: calculate link estimated value
Internodal two-way link communication quality is that the success rate by communicating by letter between statistics neighbor node is weighed.The basic thought that link is estimated is to receive that from certain neighbor node grouping accounts for this neighbor node and send to the proportion of the number of packet of this node in statistics certain hour.Link of the present invention is estimated to continue to use the method in LEPS agreement, comprises two parts: send cost and estimate and receive cost to estimate.And represent the two-way communication cost of link by these two values.Between any two node A and B, the estimation of link-quality comprises following concrete steps:
First, computing node A receives the success rate of the grouping of grouping B transmission within a period of time.Formula is as follows:
RcvEst
A/B=RcvCount
A/SendCount
B
Wherein, RcvCount
afor a period of time, interior nodes A receives the grouping number of Node B, SendCount
bfor Node B sends to the packet count of node A.Equally, Node B also can calculate recipient node A transmission grouping success rate and in its periodic status broadcast, comprise the own successful receiving rate that arrives all neighbor nodes, the transmission success rate of its neighbor node A using the successful receiving rate of Node B as oneself, formula is:
SendEst
A/B=RcvEst
B/A
Node obtains sending after success rate calculating with neighbours' successful receiving rate and from the state information of neighbor node, can determine and the two-way link estimated value of this neighbor node, and computing formula is as follows:
Est=SendEst×RcvEst
Wherein, SendEst and RcvEst represent respectively to send success rate and successful receiving rate.In order to reduce link flapping, further adopt exponential weighting displacement method of average EWMA to calculate final link estimated value.
EstFinal=EstOld×α+EstNew×(1-α)
Wherein, α is the occupation ratio of the link estimated value of a upper computation of Period, and the link that 1-α is this computation of Period 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 electric weight detection module calculates dump energy by the ADC supply voltage of sampling, and computing formula is:
Wherein, n represents the precision of ADC, V
refrepresent reference voltage, N represents the value in ADC output register.
The 3rd step: link estimated value and dump energy normalization
Due to 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 the dump energy influence degree to transmission desired value, first link estimated value and dump energy are normalized, i.e. normalization link estimated value (NormEst) and normalization dump energy (NormEng).Computing formula is as follows:
Wherein, MaxEst represents that the maximum of link-quality is that RatEng represents power supply rated voltage.
The 4th step: determine transmission desired value
In order to consider link-quality and dump energy in the time selecting father node, reach that can guarantee again can be with regard to the object of balanced same gradient interior nodes load compared with low packet loss ratio, transmit desired value (EXT) and represented by the weighted average of link estimated value and dump energy, computing formula is as follows:
EXT=βNormEst+(1-β)NormEng
Wherein, the occupation ratio that β is link-quality, (1-β) is the occupation ratio of dump energy.
Step 104: node, after having selected father node, generates a downstream routing bag, and downstream routing bag comprises a path field, and the length of path field equals the depth of network.Path field is initialized as 0.
Step 105: downstream routing bag is sent to father node by node, father node is received after downstream routing bag, inserts the node serial number of oneself in the path field of route bag, is then transmitted to the father node of father node.
Step 106: repeating step 305, until downstream routing bag is forwarded to aggregation node, now, in downstream routing bag, record the path of node to aggregation node, aggregation node is deposited into the information in downstream routing bag in the routing table of oneself, has created the downstream routing of node.
2, data retransmission
After a node networks, just the transmission of data can be carried out.In the time having data need to send back control node, node just sends the data to its father node.Father node sends to these data the father node of father node again, controls node until send it back.Therefore basic LEPS route is a kind of Routing Protocol that is applicable to information gathering application.
3, topology is safeguarded and is upgraded: node broadcast information periodically still after networking.Notify the current link-quality of neighbor node and dump energy by routing iinformation.All like this nodes can be known the transmission desired value between current neighbor node topology information and these neighbor nodes in real time.Grasping on the basis of these information, all nodes all can be periodically according to and neighbor node between transmission desired value reselect father node.So just can in the time that some node failure or link change, upgrade in time network topology, guarantee the self-healing ability of network height.