CN105933935B - A kind of method for synchronizing time for wireless sensor network - Google Patents

A kind of method for synchronizing time for wireless sensor network Download PDF

Info

Publication number
CN105933935B
CN105933935B CN201610221092.5A CN201610221092A CN105933935B CN 105933935 B CN105933935 B CN 105933935B CN 201610221092 A CN201610221092 A CN 201610221092A CN 105933935 B CN105933935 B CN 105933935B
Authority
CN
China
Prior art keywords
node
message
type
time
synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610221092.5A
Other languages
Chinese (zh)
Other versions
CN105933935A (en
Inventor
邱铁
宁兆龙
张玉爽
李明楚
陈宁
李晓芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN201610221092.5A priority Critical patent/CN105933935B/en
Publication of CN105933935A publication Critical patent/CN105933935A/en
Application granted granted Critical
Publication of CN105933935B publication Critical patent/CN105933935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • H04W40/10Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources based on available power or energy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The present invention relates to communication control fields, a kind of method for synchronizing time for wireless sensor network is provided, when including: topology initialization, a message is broadcasted since root node, all neighbor nodes for receiving message open synchronization request timer, and message is constantly forwarded until making all nodes all start the timer;In earlier synchronous phase, by message exchange, most of node, which is realized, to be synchronized;Node after synchronizing can cancel synchronization request timer, until Network Synchronization stops;In the repetitive requests stage, when the synchronization request timer of a non-synchronization node is to the time, it sends the synchronous message of request and reopens synchro timer if do not replied;And if the message is received by some slave node, the slave node for receiving message starts to execute message exchange synchronized algorithm;This process is performed repeatedly until that all nodes are synchronous.The present invention can be such that all node deadlines in network synchronize, and keep network energy balanced, extend Network morals.

Description

A kind of method for synchronizing time for wireless sensor network
Technical field
The present invention relates to communication control field more particularly to a kind of method for synchronizing time for wireless sensor network.
Background technique
In recent years, in wireless sense network, a critically important problem is exactly to realize time synchronization.It is same in many applications Step is very crucial, such as wireless sensor network is realized in the fields such as synchronous, secure synchronization and positioning synchronous under water It is particularly important.Time synchronization, which refers to the process of, provides a common time for distributed system.And a large amount of wireless sensor network Node of the network application requirement in some region safeguards a time shaft jointly, completes common task to cooperate with.Therefore right Become particularly significant in the research of time synchronization.
In broadcasted in the method synchronized in pairs using more cluster Sensor Networks, pairs of broadcast coherency protocol is given (PBS) two kinds of networking modes (GPA, NPA), pairs of broadcast coherency protocol are that a kind of net synchronization capability is preferable, and can effectively drop The agreement of low synchronizing process power consumption.Especially in dense network, it can greatly reduce the function of entire synchronizing process It is synchronous to reach the whole network finally under conditions of not losing synchronization accuracy for consumption.But GPA and NPA both networking modes, building Still many energy are consumed during network.In the low-power consumption method for synchronizing time based on Embedded Network Device, purpose It is to reduce whole network as far as possible to synchronize required power consumption, it makes full use of RRP model and SRP model, it guarantees that Sufficiently high synchronization accuracy.Especially in denser network, the power consumption of network becomes very few.But pass through theory analysis And emulation experiment, in some cases, which can not make all nodes in network range synchronous.Main cause is algorithm Slave node in design can not send any message, this results in the part neighbours of slave node to have certain probability complete At synchronization.
Summary of the invention
Present invention mainly solves energy consumption in prior art building network development process is more, and cannot make in network range It the technical issues of all nodes reach time synchronization proposes a kind of method for synchronizing time for wireless sensor network, can make All nodes are fully synchronized in network and keep low-power consumption, and the balancing energy of root node selection strategy.
The present invention provides a kind of method for synchronizing time for wireless sensor network, including following procedure:
Step 100, it determines root node, and opens the synchronization request timer of each node;
Step 200, the node in wireless sensor network is synchronized in advance, including following sub-step:
Step 201, the message of one I type of root node broadcast, wherein the message of the I type is that notice initialization is same The message of step process;
Step 202, for receiving the nodes of all undefined types of I message, synchronization request timer is closed simultaneously Open synchro timer;After the synchro timer of undefined type node is to the time, the node type of node becomes backbone section Point, while broadcasting the message of S type, wherein the message of the S type is synchronous message, and destination address is its father node, and Carry the first local time stamp T 1;
Step 203, for receiving all nodes of S message, if being matched with the destination address of S message and being Backbone type node then recording the second local time stamp T2, and replys the message of a type-A, and when sending, record is sent Time stamp T 3, wherein the message of the type-A is the synchronous message of confirmation, comprising the second local time stamp T2 and sends type-A The sending time of message stabs T3;If the destination address of S message mismatch and synchro timer be in operating status, Third local time stamp T5 is recorded, and stops synchro timer, marking the type of the node is slave node;
Step 204, for receiving all nodes of the message of type-A, the matched node of destination address with type-A, note The 4th local time stamp T4 is recorded, formula is utilizedDetermine time offset, wherein △ (α, β) indicates time offset, and using determining time offset, carries out time synchronization to node;With the mesh of type-A message The unmatched node in address, read type-A message in the second local time stamp, it is true using formula △ (alpha, gamma)=T2-T5 It fixes time offset, wherein △ (alpha, gamma) indicates time offset, and using determining time offset, when carrying out to node Between it is synchronous;
Step 205, the node after time synchronization makes surrounding undefined section to the message of surroundings nodes broadcast initialization Point successively executes step 202 to 204, so that entire wireless sensor network be made to carry out earlier time synchronization;Until in network no longer There are broadcast message, the earlier synchronization of Stop node;
Step 300, using synchronization request timer, the non-synchronization node in wireless sense network is synchronized, including with Lower sub-step:
Step 301, after the synchronization request timer of undefined type node is to the time, which sends disappearing for R type Breath;
Step 302, the type of the node is become if it is slave node for receiving all nodes of R message Backbone node, and broadcast the message of I type, wherein the message of R type is the synchronous message of repetitive requests, and the message of I type is The message of the synchronous process of notice initialization;
Step 303, for receiving all nodes of I message, step 202 is successively executed to 204 and carries out time synchronizations;
Step 304, step 301 is repeated in 303, is synchronized until the node deadlines all in wireless sensor network.
Further, in step 100, the mode of root node is determined are as follows:
First it is subsynchronous when, root node random selection, the start node as time synchronization process;
When synchronizing again, the node for selecting the energy residual in the last round of neighbours for synchronizing middle root node most is as new one The root node of wheel.
Further, in step 100, it determines root node, and opens the synchronization request timer of each node, comprising:
Since root node, in the form of flooding, to the message of surroundings nodes broadcast Z type, wherein the Z type Message is the message of notice setting synchronization request timer;
The node of Z message is received, synchronization request timer is set, and continues to broadcast the Z type to surroundings nodes Message.
A kind of method for synchronizing time for wireless sensor network provided by the invention is low in a kind of wireless sense network The method for synchronizing time of power consumption is arranged a synchronization to each node and is asked in the whole network incipient stage with the sequence of spanning tree It seeks timer, in synchronizing process, the two kinds of method of SRP and RRP is combined, because PN node does not need to send out in RRP method Any message is sent, so, this method can still keep the characteristic of low-power consumption.And when network node density is bigger, it is this excellent Gesture becomes apparent from.Synchronizing process does not need to be grouped, not additional energy consumption expense.Invention increases multiple timers to come Request synchronizes, so that all nodes can be completed to synchronize, when node cannot synchronize, timer can be overtime, thus to neighbours In slave node initiate request so that all nodes can be completed to synchronize, realize that the whole network is synchronous.In addition, this method provides A kind of root node selection strategy selects dump energy is most in the adjacent node of root node node as new root node, Energy can be made more balanced.The present invention uses the form of timer request, it is ensured that all nodes of whole network are realized It is synchronous, any node is not omitted, and the power consumption of synchronizing process keeps very low, which can also protect in mostly wheel synchronizing process The node load balance in network is held, to extend Network morals.
Detailed description of the invention
Fig. 1 is implementation flow chart of the present invention for the method for synchronizing time of wireless sensor network;
Fig. 2 is the schematic diagram of the original state of network;
Fig. 3 is the schematic diagram that synchronization request timer is arranged;
Fig. 4 is the schematic diagram of earlier synchronous phase;
Fig. 5 is the schematic diagram in repetitive requests stage;
Fig. 6 is the schematic diagram for completing the repetitive requests stage;
Fig. 7 is the schematic diagram for selecting next round root node;
Fig. 8 is the schematic diagram of SRP method and RRP method.
Specific embodiment
To keep the technical problems solved, the adopted technical scheme and the technical effect achieved by the invention clearer, below The present invention is described in further detail in conjunction with the accompanying drawings and embodiments.It is understood that specific implementation described herein Example is used only for explaining the present invention rather than limiting the invention.It also should be noted that for ease of description, attached drawing In only some but not all of the content related to the present invention is shown.
For some Time synchronization algorithms based on spanning tree, the node in network is divided into 3 seed types: (1) undefined section Point: being the original state of all nodes, i.e., non-synchronous regime;(2) slave node: being that synchronous node is completed with RRP algorithm, together Broadcast message is not sent during step.(3) backbone node: it is the node synchronous using SRP algorithm, constitutes the core section of spanning tree Point.All nodes of original state are all undefined nodes, i.e., are all non-synchronization nodes.Due to algorithm or signal problem, After the completion of common synchronization algorithm, does not complete and synchronize there are also part of nodes in network.The present invention proposes what a kind of repetitive requests synchronized Scheme, the method by the way that initialization timer is arranged.
Fig. 1 is implementation flow chart of the present invention for the method for synchronizing time of wireless sensor network.As shown in Figure 1, this hair The method for synchronizing time for wireless sensor network that bright embodiment provides includes:
Step 100, it determines root node, and opens the synchronization request timer of each node.
The targeted wireless sensor network of the present embodiment is the distributed network as made of multiple sensors combination of nodes, respectively A node operates on different chips, possesses oneself clock, so the time is nonsynchronous.Fig. 2 is the original state of network. In the present embodiment, the mode of root node is determined are as follows: randomly choose for the first time, start to save as time synchronization process of the present invention Point.When building topology again later, the node for selecting the energy residual in the last round of neighbours for synchronizing middle root node most is as new The root node of one wheel.
After determining root node, whole network is since root node, in the form of flooding, is to surroundings nodes broadcast type The data packet of Z, the node for receiving data packet is checked if the type of data packet is Z, synchronization request timer is just arranged, and continue The message is broadcasted, so that all nodes in network are switched on synchronization request timer, at this point, other sections in addition to root node Point all sets undefined node type for node type.As all nodes in addition to node A in Fig. 3 have been switched on synchronization Request timer.
Wherein, timer is a tool critically important in the present invention, for assisting completing timer task.In general nothing In wire module, there is the design of timer.Each timer includes an initial value, for indicate timer timing when Between, when a timer fires, timing is since 0, when timer timing is equal to the initial value of setting, i.e. timer to time ?.The synchronization request timer in the present embodiment, is switched in the incipient stage, and realization is closed after synchronizing;If formerly After phase synchronously completes, after synchronization request timer to time, node is not synchronized also, then synchronizes request.Its initial value etc. In the period (obtaining an average value by experiment) synchronous in advance.
The data usually carried in the data packet (broadcast message) that the present invention uses include: destination address, source address, message Type, father node, grade and timestamp, wherein destination address is the destination address of broadcast data packet;Source address is to send message Node address;Type of message indicates the type of the message, used in the different phase of time synchronization process, shares 6 kinds of message classes Type, specifically, C indicates that the message of synchronization request timer is arranged in message, Z expression notice for selecting root node, I indicates logical Know that the message of the synchronous process of initialization, S indicate that the message of synchronization, A indicate that the synchronous message of confirmation, R indicate that repetitive requests are same The message of step;Father node is the parent node address for recording sending node;Grade is the grade (default is -1) of sending node, is used to Indicate level of the node in spanning tree;Timestamp can be multiple, such as sending time stamp and local time stamp etc..
Step 200, the node in wireless sensor network is synchronized in advance, including following procedure:
Step 201, one initial message of root node broadcast (I type).Referring to Fig. 3, for example, node A is chosen as root section Point, root node A broadcast the message that a type is I.
Step 202, for receiving the nodes of all undefined types of I message, by the node of transmission types I message Labeled as the father node of oneself, the grade that the grade of oneself is set as sending information node is added 1, closes synchronization request timing Device, while opening synchro timer.Later, if after the synchro timer to time of the node of any one undefined type, The node of synchro timer to time can become the node type of oneself backbone node, while broadcasting a type is disappearing for S It ceases (synchronization message), wherein type is that the message destination address of S is the father node just recorded, and carries the first local zone time Stab T1;If synchro timer not timed out of the node of any one undefined type, closing the synchronization request timer. In practical applications, the state that can check a timer illustrates also to be less than the time if timer is in operating status, such as Fruit timer is in idle condition, and illustrates that time is up.
The synchro timer in the present embodiment, for selecting backbone node, all undefined nodes receive backbone When node sends the message of I type (message of initialization procedure), synchro timer is opened, and realizes the node after synchronizing and closes Synchro timer.If time is up for synchro timer when not synchronous, which is just converted to backbone node for oneself. In order to avoid multiple node conflicts, the initial value of synchro timer is a random value.
For example, Fig. 3 interior joint E, B, C, G are the sections for receiving the undefined type of message (i.e. initial message) of I type The node A for sending initial message is labeled as the father node of oneself, the grade of oneself is set as saving by point, node E, B, C, G The grade of point A adds 1, while opening synchro timer.Later, if node E, C synchro timer are to the time, node E, C can be The node type of oneself becomes backbone node, while broadcasting a synchronization message (message that type is S), the synchronization message purpose Address is the father node A just recorded, records local zone time T1 (timestamp is retained in local, does not put in the message) at this time, If synchronization request timer is in operating status, the synchronization request timer is closed.
Step 203, for receiving all nodes that type is S (i.e. synchronization message), if the purpose with the synchronization message The node of address matching and the node are backbone type node, then recording the second local time stamp is that T2 (receives S type to disappear The time of breath), and the message (i.e. confirmation message) of a type-A is replied, when sending, record sending time stabs T3, the A class Sending time stamp in the message of type comprising the second local time stamp and reply type-A message;If the purpose of the synchronization message The synchro timer of the unmatched node in address and the node is in operating status, then record third local time stamp is T5 (no need to send go out the timestamp), and stop synchro timer, marking the type of the node is slave node;If discontented The node of sufficient two above condition ignores this message.
For example, node A, B, G receive the synchronization message of node E or C broadcast, if the type is the mesh of the synchronization message of S Address be node A and node A be backbone type node, then it is T2 that node A, which records the second local time stamp, reply one Type is the confirmation message of A, wherein comprising receiving the time T2 of synchronization message and sending the hair of type-A message in confirmation message Send time stamp T 3;If the synchro timer that the destination address of B, G message is not node B, G and node B, G is in operation shape State then record third local time stamp is T5, and stops synchro timer, and the type of flag node B, G is slave node.No The node for meeting two above condition ignores this message.
Step 204, for receiving a type for all nodes of the message (i.e. confirmation message) of A, with confirmation message The matched node of destination address, the 4th local time stamp of record are T4, and using carrying in T1, T4 and the confirmation message This 4 timestamps of T2, T3 carry out time offset estimation using SRP method, after determining time offset and father node Carry out time synchronization;With the unmatched node of destination address of confirmation message, the T2 value in confirmation message is read, according to remembering before The time stamp T 5 of record and this T2 can carry out time offset estimation using RRP method to oneself and father node, thus with Father node is synchronous.
Be illustrated referring to Fig. 8 to SRP method and RRP method: Fig. 8 interior joint α is synchronized node, and Node β It is the pre- node synchronized with γ.What solid line and dotted line indicated in Fig. 8 is all broadcast message, the number for the message that solid line indicates It is oneself according to destination address in content, dotted line indicates that the destination address is not directed to oneself.
SRP method: Node β is the synchronization completed using SRP, and at a time, it is S that Node β, which broadcasts a type of message, The message of (synchronization message type) simultaneously records the local time stamp T 1 of transmission first.Receive the node alpha that this type is S message, note The second local time stamp T2 is recorded, sending time is then recorded and stabs T3, and broadcasts and replys a type disappearing for A (confirmation type) It ceases, the value of T2 and T3 is carried in the message.It receives the Node β replied message and records the 4th local zone time T4.At this point, Node β The calculating of time offset is just carried out according to the value of T1, T2, T3, T4, the calculation formula of time offset is as follows:
Wherein, △ (α, β) indicates the time offset of any synchronization node α and any presynchronization Node β, further The local zone time of oneself is added the time offset by Node β, is considered as Node β and is had been completed time synchronization.
RRP method: the synchronization that node γ utilizes RRP to complete, after the message that the type of message for receiving Node β broadcast is S, Record third local zone time T5.When node alpha broadcast type is the message of A (confirmation type), node γ also has received the message, And the second time stamp T 2 is also obtained.Using the calculating of T2 and T5 deadline offset, calculation formula is as follows:
△ (α, γ)=T2-T5
Wherein, △ (alpha, gamma) indicates the time offset of any synchronization node α and any presynchronization node γ, into one It walks node B and the local zone time of oneself is added into △ (alpha, gamma), be considered as completing with node γ synchronous.
For example, if the destination address of the confirmation message is directed to the (destination of node E, C and confirmation message node E, C Location matching), then record local time stamp is T4, then the node can be with carrying in T1, T4 and the confirmation message This 4 timestamps of T2, T3 carry out time deviation estimation with SRP, thus synchronous with father node.If the mesh of the confirmation message Address be not directed to node B, G (such as node B, G and the destination address of confirmation message mismatch), then reading the T2 in message Value, according to the time stamp T 5 that records before and this T2 can to oneself and father node using RRP progress time deviation estimation, To synchronous with father node.The node for being unsatisfactory for two above condition ignores the message.
Step 205, the node after time synchronization makes surrounding undefined section to the message of surroundings nodes broadcast initialization Point successively executes step 202 to 204, so that entire wireless sensor network be made to carry out earlier time synchronization.
Then step 202- step 204 starts constantly to execute, and time synchronization process is made to continue to extend, until in network not There is broadcast message again, synchronizing can not continue at this time, and the feature of the slave node defined according to us, such section Point cannot broadcast the message, so earlier synchronizing process cannot be guaranteed that the node of slave node surrounding neighbours can also synchronize, pass through Experiment discovery, has quite a few node that cannot synchronize (particular number is related with topology), synchronize stopped at this time.
This step is synchronous with RRP progress message exchange using SRP since root node, completes earlier synchronous phase.It should Process can make most of node complete to synchronize, and there is backbone node and slave node now in network, due to signal problem or Starting causes the reason of losing message and algorithm itself more slowly, there is likely to be the node of undefined type in network, fails Disposably synchronize in step 200.As shown in figure 4, wherein realize that the node in circle is the node that the process is synchronized, and circle The node (K, R, O in such as Fig. 5) of outside is all not synchronous.Synchronization so in order to synchronize these nodes, in step 100 Request timer just plays a role.
Step 300, using synchronization request timer, the non-synchronization node in wireless sense network is synchronized, including with Lower process:
Step 301, after the synchronization request timer of the node of undefined type is to the time, which sends out to surroundings nodes Sending type is the message (i.e. synchronization request message) of R, such as node K and R in Fig. 5.
Step 302, if the node for receiving synchronization request message is slave node (node G, J in such as Fig. 5), then will The type of the node becomes backbone node, and broadcast type is the initial message of I.
Step 303, for receiving all nodes of I message, step 202 is triggered execution, has started a synchronization Process successively executes step 202 to 204 progress time synchronizations.Other types node ignores the message.
Step 304, step 301 is repeated in 303, is synchronized until the node deadlines all in wireless sensor network.
For example, the node M in Fig. 5 is the node of undefined type, after the synchronization request timer of node M is to the time, The message that the node is R to surroundings nodes transmission types, since its surroundings nodes K, N are also the node of undefined type, so If can not receive any reply (this refers to the message that type is I) in specified time, synchronization request message is sent again, Until receiving I message, step 301 is further repeated in 303 progress time synchronizations.
Referring to Fig. 5, for example, node M sends synchronization after the synchronization request timer of undefined type node M is to the time Request message.If can not receive any reply in node M 10s, synchronization request message is sent again.When undefined type section After the synchronization request timer to time of point K and R, the message (synchronization request message) of R type is sent, synchronization request message is received Node G, J be slave node, then the node type of oneself is become backbone node by node G, J, and send initialization and disappear Breath.Then step 202- step 204 is triggered execution;Other types node ignores the message.
In order to keep the energy of each root node of wireless sensor network more balanced, the present invention may be selected different root nodes and carry out The multiple network optimization (time synchronization).The mode of root node selection in the present embodiment are as follows: randomly choose for the first time, as this hair The start node of bright time synchronization process.When building topology again later, the energy in the last round of neighbours for synchronizing middle root node is selected Root node of the remaining most node of amount as a new round.Originally the node type for the root node selected become backbone node, it is specified that Its grade is 0.Such as the A in Fig. 3 is chosen as root node in the first round.And for the second wheel, as shown in fig. 7, all neighbours of A It occupies in node, the dump energy of B is most, is chosen as the root node of next round.
After completing the aforementioned steps, all nodes in whole network all realize time synchronization.Synchronous state is such as Shown in Fig. 6.All nodes are all backbone node or slave node.
Provided by the present invention for the method for synchronizing time of wireless sensor network, (1) in topology initialization, from root node Start to broadcast a message, all neighbor nodes for receiving message open synchronization request timer, and message is constantly forwarded until making All nodes all start the timer;(2) in earlier synchronous phase, by message exchange, most of node, which is realized, to be synchronized;It is synchronous Node afterwards can cancel synchronization request timer, until Network Synchronization stops;(3) the repetitive requests stage, when a non-synchronization node Synchronization request timer to the time when, it sends the synchronous message of request and reopens synchronization timing if do not replied Device;And if the message is received by some slave node, the slave node for receiving message starts execution message exchange and synchronizes Algorithm;This process is performed repeatedly until that all nodes are synchronous.The present invention is a kind of time of the low-power consumption in wireless sense network Synchronous method, with the sequence of spanning tree, is provided with a synchronization request timing to each node in the whole network incipient stage Device combines the two kinds of method of SRP and RRP and carries out time synchronization, can make whole nodes in region that can synchronize, Corresponding adjustment is had also been made to the timing of synchronizing process, ensure that synchronous correctness.Root node selection strategy is increased, can be made The balancing energy of whole network extends Network morals.Since in RRP method, slave node disappears no need to send any Breath, so the present invention can keep the characteristic of low-power consumption.And when network node density is bigger, this advantage becomes very bright It is aobvious.Synchronizing process does not need to be grouped, not additional energy consumption expense.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, those skilled in the art should understand that: its is right Technical solution documented by foregoing embodiments is modified, or is equally replaced to some or all of the technical features It changes, the range for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (3)

1. a kind of method for synchronizing time for wireless sensor network, which is characterized in that including following procedure:
Step 100, it determines root node, and opens the synchronization request timer of each node;
Step 200, the node in wireless sensor network is synchronized in advance, including following sub-step:
Step 201, the message of one I type of root node broadcast, wherein the message of the I type is that notice initialization synchronized The message of journey;
Step 202, it for receiving the nodes of all undefined types of I message, closes synchronization request timer and simultaneously opens Synchro timer;After the synchro timer of undefined type node is to the time, the node type of node becomes backbone node, together When broadcast S type message, wherein the message of the S type is synchronous message, and destination address is its father node, and is carried First local time stamp T 1;
Step 203, for receiving all nodes of S message, if being matched with the destination address of S message and being backbone Type node then recording the second local time stamp T2, and replys the message of a type-A, records sending time when sending Stab T3, wherein the message of the type-A is the synchronous message of confirmation, comprising the second local time stamp T2 and sends type-A message Sending time stab T3;If the destination address of S message mismatches and synchro timer is recorded in operating status Third local time stamp T5, and stop synchro timer, marking the type of the node is slave node;
Step 204, for receiving all nodes of the message of type-A, the matched node of destination address with type-A, record the Four local time stamp T4, utilize formulaDetermine time offset, wherein △ (α, It β) indicates time offset, and using determining time offset, time synchronization is carried out to node;With the purpose of type-A message The unmatched node in address reads the second local time stamp in type-A message, is determined using formula △ (alpha, gamma)=T2-T5 Time offset, wherein △ (alpha, gamma) indicates time offset, and using determining time offset, carries out the time to node It is synchronous;
Step 205, the node after time synchronization makes surrounding undefined node to the message of surroundings nodes broadcast initialization, Step 202 is successively executed to 204, so that entire wireless sensor network be made to carry out earlier time synchronization;Until in network there is no Broadcast message, the earlier synchronization of Stop node;
Step 300, using synchronization request timer, the non-synchronization node in wireless sense network is synchronized, including following son Step:
Step 301, after the synchronization request timer of undefined type node is to the time, which sends the message of R type;
Step 302, the type of the node is become into backbone if it is slave node for receiving all nodes of R message Node, and broadcast the message of I type, wherein the message of R type is the synchronous message of repetitive requests, and the message of I type is notice Initialize the message of synchronous process;
Step 303, for receiving all nodes of I message, step 202 is successively executed to 204 and carries out time synchronizations;
Step 304, step 301 is repeated in 303, is synchronized until the node deadlines all in wireless sensor network.
2. the method for synchronizing time according to claim 1 for wireless sensor network, which is characterized in that in step 100 In, determine the mode of root node are as follows:
First it is subsynchronous when, root node random selection, the start node as time synchronization process;
When synchronizing again, the node for selecting the energy residual in the last round of neighbours for synchronizing middle root node most is as a new round Root node.
3. the method for synchronizing time according to claim 1 or 2 for wireless sensor network, which is characterized in that in step In 100, root node is determined, and open the synchronization request timer of each node, comprising:
Since root node, in the form of flooding, to the message of surroundings nodes broadcast Z type, wherein the message of the Z type For the message of notice setting synchronization request timer;
The node of Z message is received, synchronization request timer is set, and continues to broadcast disappearing for the Z type to surroundings nodes Breath.
CN201610221092.5A 2016-04-08 2016-04-08 A kind of method for synchronizing time for wireless sensor network Active CN105933935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610221092.5A CN105933935B (en) 2016-04-08 2016-04-08 A kind of method for synchronizing time for wireless sensor network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610221092.5A CN105933935B (en) 2016-04-08 2016-04-08 A kind of method for synchronizing time for wireless sensor network

Publications (2)

Publication Number Publication Date
CN105933935A CN105933935A (en) 2016-09-07
CN105933935B true CN105933935B (en) 2019-03-05

Family

ID=56840245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610221092.5A Active CN105933935B (en) 2016-04-08 2016-04-08 A kind of method for synchronizing time for wireless sensor network

Country Status (1)

Country Link
CN (1) CN105933935B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106507424A (en) * 2016-10-25 2017-03-15 南京大学 Based on the tree construction building method for giving optimization data fusion reliability after network lifecycle in wireless sensor network
CN107197514B (en) * 2017-04-27 2020-10-16 上海大学 Cognitive global clock synchronization method of wireless sensor network and method applied to multi-hop network
CN107040988A (en) * 2017-05-31 2017-08-11 徐州雷奥医疗设备有限公司 A kind of wireless medical equipment disturbance restraining method monitored based on synchronous regime
CN114364011A (en) * 2021-12-27 2022-04-15 浪潮通信技术有限公司 Wireless synchronization method and device of ultra-wideband base station

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588628A (en) * 2009-06-19 2009-11-25 山东省计算中心 Clock synchronizing method for wireless sensor network
CN103402236A (en) * 2013-06-28 2013-11-20 南京邮电大学 Constructive interference based wireless sensor network flooding mechanism
CN104320844A (en) * 2014-10-27 2015-01-28 浙江科技学院 Communication method for time synchronization of whole network of dormant wireless sensing network
CN104519563A (en) * 2015-01-12 2015-04-15 中国矿业大学 Hierarchical wireless sensor network time synchronization method
US9226252B2 (en) * 2013-06-03 2015-12-29 King Fahd University Of Petroleum And Minerals Recursive time synchronization protocol method for wireless sensor networks

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080170592A1 (en) * 2007-01-11 2008-07-17 International Business Machines Corporation Almost peer-to-peer clock synchronization
TWI383301B (en) * 2008-11-19 2013-01-21 Inst Information Industry Method and system for network synchronization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588628A (en) * 2009-06-19 2009-11-25 山东省计算中心 Clock synchronizing method for wireless sensor network
US9226252B2 (en) * 2013-06-03 2015-12-29 King Fahd University Of Petroleum And Minerals Recursive time synchronization protocol method for wireless sensor networks
CN103402236A (en) * 2013-06-28 2013-11-20 南京邮电大学 Constructive interference based wireless sensor network flooding mechanism
CN104320844A (en) * 2014-10-27 2015-01-28 浙江科技学院 Communication method for time synchronization of whole network of dormant wireless sensing network
CN104519563A (en) * 2015-01-12 2015-04-15 中国矿业大学 Hierarchical wireless sensor network time synchronization method

Also Published As

Publication number Publication date
CN105933935A (en) 2016-09-07

Similar Documents

Publication Publication Date Title
CN105933935B (en) A kind of method for synchronizing time for wireless sensor network
CN101340379B (en) Wireless communication apparatus and wireless communication method
CN105723780B (en) Remote Wake Up for WI-FI equipment
CN103916950B (en) Method for synchronizing time and system
CN105407537A (en) Techniques For Generation Of A Frequency Hopping Sequence
ATE426289T1 (en) METHOD FOR SYNCHRONIZATION AND DATA TRANSFER
RU2669012C2 (en) Method of synchronization in the data collection system
Sarvghadi et al. Message passing based time synchronization in wireless sensor networks: A survey
CN107949047A (en) Reduce the wireless sensor network uniformity method for synchronizing time of Internet traffic
JP6223625B1 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
RU2012151959A (en) NODE AND SYSTEM FOR SYNCHRONOUS NETWORK
CN105246137B (en) A kind of micropower wireless network data transmission method and system
CN107222923A (en) Clock synchronizing method and device
CN102883466A (en) Data dissemination method in wireless sensor network
CN105959977B (en) Without the hybrid synchronous one step process containing support node in D2D Mesh network under honeycomb covering scene
CN108605300A (en) A kind of method and apparatus that NAN equipment sends sync beacon message
CN103957591A (en) Node pair based wireless sensor network time synchronization method
CN104994567B (en) Method and system for low-power-consumption wireless networking communication
US20080212564A1 (en) Clock Synchronization Method For Wireless 1394 Heterogeneous Networks
CN102263631B (en) Method and clock node for determining master clock within 1588 clock domain
CN107197514B (en) Cognitive global clock synchronization method of wireless sensor network and method applied to multi-hop network
Wang et al. Random time source protocol in wireless sensor networks and synchronization in industrial environments
CN109194435A (en) A kind of method avoiding digital synchronous network clock cyclization, system and terminal
CN102076079A (en) Double bounce time slot allocation method of randomly-deployed sensor node without identification (ID)
CN107071857B (en) A kind of underwater wireless multihop network initial method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant