CN104837197A - Method for synchronizing two-way time of wireless sensor network - Google Patents

Method for synchronizing two-way time of wireless sensor network Download PDF

Info

Publication number
CN104837197A
CN104837197A CN201510176407.4A CN201510176407A CN104837197A CN 104837197 A CN104837197 A CN 104837197A CN 201510176407 A CN201510176407 A CN 201510176407A CN 104837197 A CN104837197 A CN 104837197A
Authority
CN
China
Prior art keywords
node
offset
message
time
skew
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.)
Pending
Application number
CN201510176407.4A
Other languages
Chinese (zh)
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.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN201510176407.4A priority Critical patent/CN104837197A/en
Publication of CN104837197A publication Critical patent/CN104837197A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/0055Synchronisation arrangements determining timing error of reception due to propagation delay

Landscapes

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

Abstract

The invention discloses a method for synchronizing two-way time of a wireless sensor network. The method is a two-way synchronizing method based on a transmitter and a receiver. A sensing node is synchronized to a clock of a reference node. Physical layer time scale recording technology and time scale embedding technology are used and the recording, the embedding, and transmitting/receiving of a time scale is completed in the same message. As a result, when a transmitter-receiver two-way synchronizing algorithm is carried out in a network, the influences of six factors, including send time delay, access time delay, transmission time delay, propagation time delay, reception time delay, and receive time delay, are eliminated theoretically in a synchronizing process such that high synchronizing precision is obtained. Further, the method achieves self-adaptive skew compensation on this basis and verifies the algorithm in a ZigBee network experiment test. An acquired result complies with an expectation.

Description

The two-way method for synchronizing time of a kind of radio sensing network
Technical field
The present invention relates to radio sensing network field, more specifically, relate to the two-way method for synchronizing time of a kind of radio sensing network high accuracy.
Background technology
Time synchronization technique is one of key technology of radio sensing network (Wireless Sensor Network, WSN), and it provides unified time measure standard to the whole network node, is prerequisite and the technical guarantee of the whole network collaborative work.Correct time synchronously ensure that the normal operation of procotol, and the critical effect also played in the application scenarios of its reality, as node locating, dormancy dispatching, data fusion, TDMA scheduling, Routing Protocol, measuring distance, data syn-chronization etc., these application all have clear and definite requirement to the time synchronized of nodes.
The factor that influence time is synchronous: in order to carry out accurate study more to Time synchronization algorithm, needs to carry out labor to the factor of the influence time synchronization accuracy in message transmitting procedure between node, and makes the method avoiding these influencing factors.In current research, six parts can be divided into by from sending node to the critical path delay of receiving node transmission of messages, concrete division as shown in Figure 1:
(1) transmitting time postpones (Send Time): refer generally to message sending node and start to construct a piece of news, reach the time consumed when bottom is carried out and sent and prepare to message, namely produce message and this message is sent to the time needed for MAC layer.The scheduling of the consumption of this time and the current operational circumstances of processor, system is closely bound up, and the time of delay is maximum reaches hundreds of millisecond;
(2) access time postpones (Access Time): wait for transmission channel empty required time, relevant with the current load condition of network with the agreement of MAC layer.Message is from upper layer transfers to MAC layer, but sending node will detect channel, when acknowledgement channel, just message is sent.Therefore, in whole transmission experiment, it is least determined and a uncertain part;
(3) propagation time delay (Transmission Time): the time needed for message sends in physical layer, depend on the size of message and the wireless transmission speed of radio-frequency module, this part time is determined than being easier to by calculating;
(4) propagation time delay (Propagation Time): message is with the propagation time of electromagnetic mode in transmission medium, so the time delay of this part can be regarded as only depend on internodal distance.Because the speed very fast (close to the light velocity) that electromagnetic wave is propagated in atmosphere, so compared with other time delays, propagation delay is negligible;
(5) time of reception postpones (Reception Time): receive time delay and propagation delay time are contrary processes, is that receiving node receives the time delay of information generation in physical layer step-by-step;
(6) receive process time delay (Receive Time): receiving processing delay and transmission delay is contrary process, be receiving node after bottom receives information, up pass to the time that application layer consumes.
In sum, in network, the error of time synchronized is mainly caused by this few fractional transmission delay.If in synchronizing process, can compensate these time delays, or directly eliminate these time delays, so synchronization accuracy will be improved.
Nodal clock model: in radio sensing network, each sensing node has the crystal oscillator (Oscillator) belonging to self, and the clock of node is measured by the step-by-step counting of this crystal oscillator.Along with the change of the frequency of crystal oscillator and increasing of concussion number of times, the local clock of node also can change thereupon.Therefore, can represent with formula (2-1) at the local clock reading of arbitrary node i at physics moment t:
C i ( t ) = 1 f 0 ∫ t 0 t f i ( τ ) dτ + C i ( t 0 ) - - - ( 2 - 1 )
Wherein f 0for the nominal frequency of crystal oscillator; f it () is for node is at the crystal oscillator actual frequency of t; t 0represent moment actual time starting timing; C i(t 0) represent at t 0the local clock reading in moment.
Generally speaking, the frequency meter of crystal oscillator is metastable at short notice, and the crystal oscillator frequency therefore can supposing node remains unchanged in section at this moment.Therefore, nodal clock can be expressed as with formula (2-2) again:
C i(t)=a i(t-t 0)+b i(2-2)
In formula (2-2), b i=C i(t 0) be the nodal clock reading of initial time, be crystal oscillator actual frequency and the ratio of its nominal frequency, be called relative frequency.
In radio sensing network, mainly contain the difference that following two reasons cause the sensor node time:
(1) node starts the initial time difference of timing, and this error is called offset error (offset);
(2) due to the change of the extraneous environmental factor such as the nominal frequency of crystal oscillator and actual frequency exist the variations in temperature of small variations and environment, node is powered spread of voltage, crystal oscillator frequency can be made to occur unstable phenomenon.The error that the change of this clock frequency causes, is called drift error (skew).
In order to by carrying out certain conversion to local clock, to reach synchronous, on the basis of node local clock, can construct logical timer, shown in (2-3), any node i can be expressed as at the logical timer reading of physics moment t:
LC i(t)=la i×C i(t)+lb i(2-3)
Wherein C it () is the reading of t node local clock, la iand lb ibeing called is frequency correction factor and the initial offset correction factor of node i.
The object adopting logical timer carries out time synchronized conversion to arbitrary two sensing node i and j, has following two kinds of methods can realize this conversion:
A kind of method converts according to the relation of the global time reference such as local clock and real clock, can obtain following formula by after formula (2-2) transposition conversion:
t = 1 a i C i ( t ) + ( t 0 - b i a i ) - - - ( 2 - 4 )
According to formula (2-3), only need another the logical timer of node i can be adjusted, reach the effect synchronous with real clock.
Another kind method is using real clock benchmark as bridge, and the relation according to two node local clocks directly converts:
1 a i C i ( t ) + ( t 0 - b i a i ) = 1 a j C j ( t ) ( t 0 - b j a j ) - - - ( 2 - 5 )
Can be obtained by formula (2-5) again:
C j(t)=a ijC i(t)+b ij(2-6)
In formula (2-6), in like manner according to formula (2-3), respectively by la iand lb ibe arranged to this two values, can the local clock of node i realized synchronous with the local clock of node j.
Method for synchronizing time: known cause inter-node times difference because have two: offset error offset and drift error skew.Offset causes because internodal timing initial time is different, and skew is then the error produced because the frequency of crystal oscillator between node is not quite identical.Usually the method for two kinds of time synchronized is had: the synchronous method (Fig. 2) compensated based on offset and the synchronous method (Fig. 3) jointly compensated based on offset and skew.
For the two-way synchronization method compensated based on offset, suppose that node i and node j have all been synchronized to reference node when 0 moment, but due to the nuance of each node crystal oscillator frequency, along with passage of time, internodal time error slowly increases.Arrive synchronization point, node i and node j by respective time synchronized to reference node, but because common synchronous method only compensates the offset of clock between node, so one subsynchronous after, internodal time error still widens gradually according to original trend, until the arriving of next synchronization point, again node i and node j could be synchronized to reference node, and repeat down in this way.
And in the synchronous method jointly compensated based on offset and skew, compared with the former, at synchronization point, all compensation is taken to offset and skew, therefore, node not only with is this moment synchronized to reference node, and the variation tendency of self clock is also consistent with reference node.Compared with the former, As time goes on, the trend that internodal time error increases obviously slows down.
The bi-directional synchronization algorithm of sender-recipient
The synchronized algorithm of conventional sender-recipient can be divided into two classes: one-way synchronization algorithm and bi-directional synchronization algorithm.The factor synchronous according to influence time, for one-way synchronization algorithm, except postponing by transmitting time, the access time postpones and reception processes except the impact of time delay, the node that it also needs to accept message postpones to estimate to propagation time delay, propagation time delay and time of reception, and this can not reach high-precision requirement by what cause one-way synchronization algorithm.
And bi-directional synchronization algorithm takes the mode of duplex/two-way message exchange, in symmetric channel, can eliminate the impact that propagation time delay, propagation time delay and time of reception postpone in theory, thus under the same conditions, bi-directional synchronization algorithm is higher than the synchronization accuracy of one-way synchronization algorithm.
The process of bi-directional synchronization algorithm as shown in Figure 4, by two-way interacting message between node, obtains T1, T2, T3 and T4 tetra-markers, and by calculating internodal time difference Δ, realizes time synchronized finally by the synchronous method compensated based on offset.
S is for synchronously to initiate node, and R responds node for receiving, and d represents the summation that the propagation time delay of message, propagation time delay and time of reception postpone.Because in same environment, wireless channel can be similar to that to be used as be symmetrical, so the d of hypothesis two message is equal at short notice.
Δ represents the side-play amount of two node local clocks, and T1, T2, T3 and T4 are the markers of S and R nodes records, according to the relation of time, can obtain (3-1) and (3-2) two equatioies:
T 2=T 1+d+Δ (3-1)
T 4=T 3+d-Δ (3-2)
Can be released by formula (3-1) and formula (3-2):
Δ = ( T 2 - T 1 ) - ( T 4 - T 3 ) 2 - - - ( 3 - 3 )
Through two-way interacting message, S node can obtain these four markers of T1, T2, T3 and T4, and through type (3-3) calculates Δ, and last offset compensates, and realizes the clock synchronous of S node to R node.
By realizing known to the analysis of influence time zeitgeber and the derivation of algorithm, through type (3-1) and (3-2) poor, obtain (3-3) formula, eliminate d for synchronous impact, relative to one-way synchronization algorithm, bi-directional synchronization algorithm can obtain higher synchronization accuracy.Simultaneously, from formula (3-3), 1) if the time precision of T1 ~ T4 can be improved, or eliminate the delay time error that transmitting time postpones, the access time postpones and reception process time delay causes, then significantly can improve the timing tracking accuracy of bi-directional synchronization algorithm.2) further, do not take the compensation to frequency drift (skew) in general synchronized algorithm, this can cause needing to maintain certain synchronous error shorter synchronizing cycle between node.
In recent years, increasing researcher is absorbed in the research of WSN Time synchronization algorithm, and achieves certain achievement.ZigBee technology, with the simple feature of its low cost, low energy consumption and application, becomes most popular in WSN, most widely used general and most crucial technology.
The factor synchronous according to influence time, the method for synchronization of existing employing and markers recording technique must eliminate the impact of critical path delay completely, and this can not obtain the highest synchronization accuracy by causing them.
Summary of the invention
In order to overcome the weak point of the synchronized algorithm of existing WSN network, the present invention proposes the two-way method for synchronizing time of radio sensing network high accuracy of a kind of physically based deformation layer markers record and embedded technology, and surveying on ZigBee-network platform.
The two-way method for synchronizing time of a kind of radio sensing network, is based on the two-way synchronous method of sender-recipient, sensing node is synchronized to the clock of reference node, comprises the following steps:
A () sends the initial period of synchronization request message SYNC_REQ at sensing node to reference node, when physical layer has transmitted synchronous head (hardware detection is to level conversion), sensing node processes the transmission interrupt event of physical layer at once, and records markers T1;
B markers T1 writes in TXFIFO register by () sensing node, markers embedded in this SYNC_REQ message, then continue this message step-by-step to be sent to reference node; This method is record, embedding in same message, sends T1 markers;
When () reference node receives SYNC_REQ message c, after physical layer receives synchronous head (hardware detection is to level conversion), the receive interruption event of reference node process physical layer, and record markers T2;
D () reference node successfully receives SYNC_REQ message after, the markers T1 in extraction message and the markers T2 of self record, sets up SYNC_ACK message, and T1 and T2 is put into message;
E () same to step (a) and (b), at physical layer record markers T3 when reference node sends SYNC_ACK, and embed this message and be sent to sensing node;
F () same to step (c), at the markers T4 of this message of physical layer record during sensing node reception SYNC_ACK;
So far, the sensing node of initiating synchronization request has got T1, T2, T3 and T4 tetra-markers, and passes through ask for the clock offset Δ of sensing node and reference node,
Suppose when t, the clock of reference node is C j(t), the C during clock of sensing node i( t), then can by the clock offset of Δ value correction sensor node, i.e. C j(t)=C it ()+Δ, namely achieves the synchronous method compensated based on offset.
At the two-way method for synchronizing time of radio sensing network, in ZigBee-network, selection telegon is reference node.
The present invention is on the basis of bi-directional synchronization (eliminating the impact that propagation time delay, propagation time delay and time of reception postpone), realize embedding and recording technique in physical layer markers, at physical layer instead of upper strata mark T1, T2, T3 and T4, then can eliminate the time delay that transmitting time postpones, the access time postpones and reception process time delay causes, greatly improve synchronous precision.
Preferably, described synchronous method also comprises self adaptation crystal oscillator frequency skew skew compensation mechanism, and its detailed process is:
According to formula C j(t)=a ijc i(t)+b ij,
Known, the clock of sensing node i and the clock synchronous of reference node j be made, skew offset a need be calculated ijwith offset offset b ij; Offset offset is Δ;
By adding up the data of synchronization message, calculate a ij, namely complete the compensation to skew.
The present invention realizes the double compensation of offset and skew, extends synchronizing cycle, thus reduces the expense of synchronization message.
Preferably, the described data by adding up synchronization message calculate a ij, be have employed a round-robin queue to deposit the individual current skew offset of N-1, detailed process is:
After 2 synchronizing cycles, sensing node has got two groups of synchrodatas, calculates skew offset a ij, and it to be joined the team, as current skew offset nodal clock is adjusted and realize synchronous;
Complete when between node M subsynchronous time, M<N, will have M-1 offset in queue, the computing formula of skew offset is: using the arithmetic average of element each in current queue as skew offset;
Complete when between node N subsynchronous after, this queue is filled, and skew offset is now: a ij = &Sigma; k = 1 N - 1 a k ij N - 1 ;
After this, complete when between node N+k-1 subsynchronous after, then through a synchronizing cycle, complete N+k synchronous time, now queue header element is gone out team, and a latest computed obtained l+N-1 ijjoin the team, complete the renewal to this round-robin queue, now the computing formula of skew offset is:
So far, the queue of skew offset has realized the operation of renewal.In the periodic synchronous process of this posterior nodal point, skew offset according to up-to-date synchrodata, can upgrade queue, and calculates up-to-date skew offset later often subsynchronous, achieves adaptive skew and compensates synchronized algorithm.
Compared with prior art, the beneficial effect of technical solution of the present invention is: in the present invention, according to the feature of WSN, have devised a kind of high-precision method for synchronizing time, and achieve adaptive skew on this basis and compensate, finally verify this algorithm in the experiment test of ZigBee-network, the test result obtained meets expection imagination.Be embodied in: 1) realize physical layer markers and embed and recording technique, at physical layer instead of upper strata mark T1, T2, T3 and T4, then can eliminate the time delay that transmitting time delay, access time delay and time of reception postpone to cause, greatly improve synchronous precision; 2) realize the double compensation of offset and skew, extend synchronizing cycle, thus reduce the expense of synchronization message.
The further raising of synchronization accuracy of the present invention, has the application of high request to provide better optimized integration for the dormancy dispatching of WSN network, data fusion, TDMA scheduling and safe time slot algorithm etc. are this kind of for time synchronized.In addition, compensate, compared with compensating synchronized algorithm with offset owing to achieving adaptive skew, under identical lock in time error, internodal synchronizing cycle can extend widely, contributes to the energy consumption reducing WSN node, the working life of node is extended.
Accompanying drawing explanation
Fig. 1 divides schematic diagram from sending node to the critical path delay of receiving node transmission of messages.
Fig. 2 is the synchronous method schematic diagram compensated based on offset.
Fig. 3 is be the synchronous method schematic diagram jointly compensated based on offset and skew.
Fig. 4 is the procedure chart of bi-directional synchronization algorithm.
Fig. 5 is the record time chart of markers T1 and T2.
Fig. 6 is the record time chart of markers T3 and T4.
Fig. 7 is the storage node composition of skew offset.
Fig. 8 is the renewal figure of skew offset round-robin queue.
Fig. 9 is synchronization node is adopt the design of experiment based on the wireless ZigBee2007/PRO module of CC2530 chip.
Figure 10 is the accuracy test result figure of synchronous method.
Figure 11 is self adaptation skew compensating test result figure.
Figure 12 is the partial enlarged drawing of Figure 11.
Embodiment
Accompanying drawing, only for exemplary illustration, can not be interpreted as the restriction to this patent;
In order to better the present embodiment is described, some parts of accompanying drawing have omission, zoom in or out, and do not represent the size of actual product;
To those skilled in the art, in accompanying drawing, some known features and explanation thereof may be omitted is understandable.
Embodiment 1
What the present invention proposed is the two-way method for synchronizing time of a kind of high-precision radio sensing network, is a kind of synchronized algorithm based on the two-way method of synchronization of sender-recipient.In ZigBee-network, general selection telegon is reference node, and sensing node is synchronized to the clock of telegon.
Concrete implementation step:
A () sends the initial period of synchronization request message SYNC_REQ at sensing node to telegon, when physical layer has transmitted synchronous head (hardware detection is to level conversion), sensing node processes the transmission interrupt event of physical layer at once, and records markers T1;
B markers T1 writes in TXFIFO register by () sensing node, markers embedded in this SYNC_REQ message, then this message step-by-step is sent to telegon; It is record, embedding in same message, sends T1 markers;
When () telegon receives SYNC_REQ message c, after physical layer receives synchronous head (hardware detection is to level conversion), the receive interruption event of mediators handle physical layer, and record markers T2;
D () telegon successfully receives SYNC_REQ message after, the markers T1 in extraction message and the markers T2 of self record, sets up SYNC_ACK message, and T1 and T2 is put into message;
E () same to step (a) and (b), at physical layer record markers T3 when telegon sends SYNC_ACK, and embed message and be sent to sensing node;
F () same to step (c), records the markers T4 of this message when sensing node receives SYNC_ACK.
So far, the sensing node of initiating synchronization request has got T1, T2, T3 and T4 tetra-markers, and wherein the record moment of markers T1 and T2 as shown in Figure 5, and the record moment of T3 and T4 as shown in Figure 6.
Finally by calculate the clock offset Δ of sensing node and coordinator node.Suppose when t, the clock of telegon is C j(t), the C during clock of sensing node i( t), just by the clock offset of Δ value correction sensor node, i.e. C j(t)=C i(t)+Δ.
Gone out from recording and sending in Fig. 5 and Fig. 6, T1, T2, T3 and T4 tetra-markers within the physical layer same message, therefore can eliminate transmitting time delay, the access time postpones and reception processes time delay to the impact synchronously caused.On the other hand, the impact utilizing two-way synchronization method to eliminate propagation time delay, propagation time delay and time of reception to postpone to bring, therefore the method farthest can improve synchronization accuracy.Ideally, two nodes can reach Complete Synchronization.Experimental data of the present invention describes this result.
Self adaptation skew compensates
According to the analysis Chinese style C to nodal clock model j(t)=a ijc i(t)+b ij, known, the clock of node i (sensing node) be made to realize synchronous with the clock of node j (telegon), only need calculate skew offset a ijwith offset offset b ij.Offset offset has calculated and has obtained in the two-way synchronization method of upper joint, only by adding up the data of synchronization message, need calculate a now ij, the compensation to skew can be completed.
Because the frequency of crystal oscillator can change along with the change of environment (as temperature), so the offset of the skew that needs to upgrade in time, best synchronous effect could be obtained.
For the realization of self adaptation skew backoff algorithm, the present invention devises the storage organization of a skew offset on software, as shown in Figure 7, have employed a round-robin queue and deposits the individual current skew offset of N-1.
Concrete implementation step:
After 2 synchronizing cycles, node has got two groups of synchrodatas, can calculate skew offset a ij, and it to be joined the team, as current skew offset nodal clock is adjusted and realize synchronous;
Complete when between node M (M<N) subsynchronous time, will have M-1 offset in queue, the computing formula of skew offset is: using the arithmetic average of element each in current queue as skew offset;
Complete when between node N subsynchronous after, this queue is filled, and skew offset is now: a ij = &Sigma; k = 1 N - 1 a k ij N - 1 ;
After this, complete when between node N+k-1 subsynchronous after, then through a synchronizing cycle, complete N+k synchronous time, now queue header element is gone out team, and a latest computed obtained l+N-1 ijjoin the team, the renewal to this round-robin queue can be completed, as shown in Figure 8.Now the computing formula of skew offset is: a ij = &Sigma; k = l + 1 l + N - 1 a k ij N - 1 .
So far, the queue of skew offset has realized the operation of renewal.In the periodic synchronous process of this posterior nodal point, skew offset according to up-to-date synchrodata, can upgrade queue, and calculates up-to-date skew offset later often subsynchronous, achieves adaptive skew and compensates synchronized algorithm.
(1) experimental design and test result
In the experiment test of the inventive method, employing synchronization node is the wireless ZigBee2007/PRO module based on CC2530 chip.Experimental design as shown in Figure 9.Be positioned at the synchronization node pair that telegon C in the middle of figure and sensing node R is this time experiment, except synchronization node to except, also introduce the 3rd node---sub-broadcast node E.
The effect of node E is: node R and node C carry out synchronous after, node E broadcasts a RECORD_CLOCK message, node C and node R utilize physical layer receive interruption markers recording technique, record local zone time when receiving this broadcast.Final node C and node R, respectively by serial ports, send this markers to computer end, and the data of generation are by the unified process of computer end and calculate.
To synchronous method accuracy test
In the experiment test of method of measurement precision, random selecting 6 nodes, and be divided into three groups, and every group node has been carried out to the data acquisition of 200 times, after processing data, as shown in Figure 10, in figure, the unit of ordinate is nanosecond (ns) to the synchronization accuracy data obtained.
After statistical disposition is carried out to above-mentioned three groups of data, the results are shown in following table.
(2) self adaptation skew compensating test
In the experiment test that self adaptation skew compensates, random selecting 2 nodes, synchronizing cycle is 150s, from 0 moment, gather a secondary data and time error between computing node every 3s, altogether gathers 900 times.As shown in figure 11, in figure, the unit of ordinate is microsecond (us) to the experimental data obtained.
As can be seen from experimental result, before second time is synchronous, in namely this stage of 0 to 150s, because synchronous number of times is less than twice, so do not draw the offset of skew, As time goes on internodal clocking error increases gradually, this also just the deviation of crystal oscillator frequency cause.
When 150s, carry out synchronously secondary between node, now, node can carry out the calculating of skew offset by the synchrodata of twice, compensate skew when this is subsynchronous, hereafter, internodal synchronization accuracy promotes rapidly.
Data after 150s in experiment again mapped, result as shown in figure 12.As can be seen from the envelope variation in figure, along with increasing of synchronization times, internodal overall clocking error is reducing gradually, and adaptive effect is represented.
Compared with existing algorithm, present invention employs markers recording technique and the markers embedded technology of physical layer, when making the two-way synchronization method implementing sender-recipient in a network, eliminate the transmitting time delay in synchronizing process, access time delay, propagation time delay, propagation time delay, time of reception delay in theory and receive the impact processing these 6 factors of time delay, thus obtain very high synchronization accuracy, can Complete Synchronization be reached in theory.
The CC2530 chip adopted in test process is as the master chip of ZigBee module, and the crystal oscillator cycle is 32MHz, and a crystal oscillator cycle is 31.25ns.By the test of real network node, the mean timing error between synchronous posterior nodal point only has 2-3 crystal oscillator cycle, is about 70ns, and smallest synchronization error can reach 0 crystal oscillator cycle.Compared with obtaining the ZigBee Time synchronization algorithm of Microsecond grade synchronization accuracy at present, synchronization accuracy of the present invention improves 2 orders of magnitude.
WSN node limit due to the manufacturing process of crystal oscillator, and the nominal frequency of dispatching from the factory and actual frequency have tiny difference; Moreover, in the use of reality, due to the change of the extraneous environmental factor such as the spread of voltage that the variations in temperature of environment, node are powered, crystal oscillator frequency will be caused to occur unstable phenomenon.This all will cause the frequency of clock between node inconsistent and can drift about, and As time goes on, internodal time error will significantly increase, and for the synchronized algorithm that required precision is high, the compensation for skew is very necessary and crucial.
Therefore, the invention allows for the synchronized algorithm that self adaptation skew compensates, carry out in the process of cycle synchronisation at node, utilize synchronous data to calculate skew offset, then use a round-robin queue to deposit N-1 currency, finally adopt the arithmetic mean of all queue element (QE)s to do to compensate skew.Make in same accuracy rating, the synchronous cycle can extend widely.
The corresponding same or analogous parts of same or analogous label;
Describe in accompanying drawing position relationship for only for exemplary illustration, the restriction to this patent can not be interpreted as;
Obviously, the above embodiment of the present invention is only for example of the present invention is clearly described, and is not the restriction to embodiments of the present invention.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without the need to also giving all execution modes.All any amendments done within the spirit and principles in the present invention, equivalent to replace and improvement etc., within the protection range that all should be included in the claims in the present invention.

Claims (4)

1. the two-way method for synchronizing time of radio sensing network, is based on the two-way synchronous method of sender-recipient, sensing node is synchronized to the clock of reference node, it is characterized in that, comprise the following steps:
A () sends the initial period of synchronization request message SYNC_REQ at sensing node to reference node, when physical layer has transmitted synchronous head, sensing node processes the transmission interrupt event of physical layer at once, and records markers T1;
B markers T1 writes in TXFIFO register by () sensing node, markers embedded in this SYNC_REQ message, then continue this message step-by-step to be sent to reference node;
When () reference node receives SYNC_REQ message c, after physical layer receives synchronous head, the receive interruption event of reference node process physical layer, and record markers T2;
D () reference node successfully receives SYNC_REQ message after, the markers T1 in extraction message and the markers T2 of self record, sets up SYNC_ACK message, and T1 and T2 is put into message;
E () same to step (a) and (b), at physical layer record markers T3 when reference node sends SYNC_ACK, and embed this message and be sent to sensing node;
F () same to step (c), at the markers T4 of this message of physical layer record during sensing node reception SYNC_ACK;
So far, the sensing node of initiating synchronization request has got T1, T2, T3 and T4 tetra-markers, and passes through ask for the clock offset Δ of sensing node and reference node,
Suppose when t, the clock of reference node is C j(t), the C during clock of sensing node it (), then can by the clock offset of Δ value correction sensor node, i.e. C j(t)=C it ()+Δ, namely achieves the synchronous method compensated based on offset.
2. the two-way method for synchronizing time of radio sensing network according to claim 1, is characterized in that, in ZigBee-network, selection telegon is reference node.
3. the two-way method for synchronizing time of radio sensing network according to claim 1 and 2, is characterized in that, described synchronous method also comprises self adaptation crystal oscillator frequency skew skew compensation mechanism, and its detailed process is:
According to formula C j(t)=a ijc i(t)+b ij,
Known, the clock of sensing node i and the clock synchronous of reference node j be made, skew offset a need be calculated ijwith offset offset b ij; Offset offset is Δ;
By adding up the data of synchronization message, calculate a ij, namely complete the compensation to skew.
4. the two-way method for synchronizing time of radio sensing network according to claim 3, is characterized in that, the described data by adding up synchronization message calculate a ij, be have employed a round-robin queue to deposit the individual current skew offset of N-1, detailed process is:
After 2 synchronizing cycles, sensing node has got two groups of synchrodatas, calculates skew offset a ij, and it to be joined the team, as current skew offset nodal clock is adjusted and realize synchronous;
Complete when between node M subsynchronous time, M<N, will have M-1 offset in queue, the computing formula of skew offset is: using the arithmetic average of element each in current queue as skew offset;
Complete when between node N subsynchronous after, this queue is filled, and skew offset is now: a ij = &Sigma; k = 1 N - 1 a k ij N - 1 ;
After this, complete when between node N+k-1 subsynchronous after, then through a synchronizing cycle, complete N+k synchronous time, now queue header element is gone out team, and a latest computed obtained l+N-1 ijjoin the team, complete the renewal to this round-robin queue, now the computing formula of skew offset is:
CN201510176407.4A 2015-04-14 2015-04-14 Method for synchronizing two-way time of wireless sensor network Pending CN104837197A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510176407.4A CN104837197A (en) 2015-04-14 2015-04-14 Method for synchronizing two-way time of wireless sensor network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510176407.4A CN104837197A (en) 2015-04-14 2015-04-14 Method for synchronizing two-way time of wireless sensor network

Publications (1)

Publication Number Publication Date
CN104837197A true CN104837197A (en) 2015-08-12

Family

ID=53814766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510176407.4A Pending CN104837197A (en) 2015-04-14 2015-04-14 Method for synchronizing two-way time of wireless sensor network

Country Status (1)

Country Link
CN (1) CN104837197A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017143429A (en) * 2016-02-10 2017-08-17 国立研究開発法人情報通信研究機構 Method for detecting synchronization deviation between communication stations
CN107959968A (en) * 2017-11-02 2018-04-24 中山大学 A kind of clock synchronizing method for wireless sensor network of high accuracy, low overhead
CN108243396A (en) * 2016-12-27 2018-07-03 普天信息技术有限公司 A kind of time synchronizing method and device
CN108474834A (en) * 2016-01-06 2018-08-31 阿尔卡特朗讯美国公司 The method and apparatus synchronized for aerial anchor point-anchor point
CN109194433A (en) * 2018-08-17 2019-01-11 中国航空无线电电子研究所 The implementation method united when based on gigabit AFDX network high-precision time service
CN109788547A (en) * 2018-12-28 2019-05-21 南京华曼吉特信息技术研究院有限公司 A kind of auto-adaptive time synchronous method of the temperature-compensating of low communication load
CN111615185A (en) * 2019-02-22 2020-09-01 电信科学技术研究院有限公司 Time adjustment method for nodes in ad hoc network and network equipment
CN112019291A (en) * 2020-08-31 2020-12-01 合肥富煌君达高科信息技术有限公司 Network equipment timing method
CN113141225A (en) * 2020-01-20 2021-07-20 中国移动通信集团山东有限公司 Time synchronization method, device, storage medium and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697502A (en) * 2009-09-22 2010-04-21 哈尔滨工业大学 Method for precisely synchronizing wireless sensor network under coal mine
CN101917759A (en) * 2010-07-20 2010-12-15 重庆康如来科技有限公司 Wireless sensor network time synchronization method based on linear fit
CN103945525A (en) * 2014-04-30 2014-07-23 国家电网公司 Hierarchical structure based wireless sensor network time synchronization method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697502A (en) * 2009-09-22 2010-04-21 哈尔滨工业大学 Method for precisely synchronizing wireless sensor network under coal mine
CN101917759A (en) * 2010-07-20 2010-12-15 重庆康如来科技有限公司 Wireless sensor network time synchronization method based on linear fit
CN103945525A (en) * 2014-04-30 2014-07-23 国家电网公司 Hierarchical structure based wireless sensor network time synchronization method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄晓,罗树浩: "基于最大互邻集合的无线传感器网络单向时间同步", 《中山大学学报》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108474834A (en) * 2016-01-06 2018-08-31 阿尔卡特朗讯美国公司 The method and apparatus synchronized for aerial anchor point-anchor point
JP2017143429A (en) * 2016-02-10 2017-08-17 国立研究開発法人情報通信研究機構 Method for detecting synchronization deviation between communication stations
CN108243396A (en) * 2016-12-27 2018-07-03 普天信息技术有限公司 A kind of time synchronizing method and device
CN107959968B (en) * 2017-11-02 2021-02-02 中山大学 High-precision low-overhead wireless sensor network clock synchronization method
CN107959968A (en) * 2017-11-02 2018-04-24 中山大学 A kind of clock synchronizing method for wireless sensor network of high accuracy, low overhead
CN109194433A (en) * 2018-08-17 2019-01-11 中国航空无线电电子研究所 The implementation method united when based on gigabit AFDX network high-precision time service
CN109194433B (en) * 2018-08-17 2020-10-09 中国航空无线电电子研究所 High-precision time service method based on gigabit AFDX (avionics full Duplex switched Ethernet) network
CN109788547A (en) * 2018-12-28 2019-05-21 南京华曼吉特信息技术研究院有限公司 A kind of auto-adaptive time synchronous method of the temperature-compensating of low communication load
CN109788547B (en) * 2018-12-28 2021-06-01 南京华曼吉特信息技术研究院有限公司 Adaptive time synchronization method for temperature compensation of low communication load
CN111615185A (en) * 2019-02-22 2020-09-01 电信科学技术研究院有限公司 Time adjustment method for nodes in ad hoc network and network equipment
CN111615185B (en) * 2019-02-22 2022-06-28 大唐移动通信设备有限公司 Time adjustment method for nodes in ad hoc network and network equipment
CN113141225A (en) * 2020-01-20 2021-07-20 中国移动通信集团山东有限公司 Time synchronization method, device, storage medium and terminal
CN112019291A (en) * 2020-08-31 2020-12-01 合肥富煌君达高科信息技术有限公司 Network equipment timing method
CN112019291B (en) * 2020-08-31 2022-12-27 合肥中科君达视界技术股份有限公司 Network equipment timing method

Similar Documents

Publication Publication Date Title
CN104837197A (en) Method for synchronizing two-way time of wireless sensor network
CN103281772B (en) A kind of method for synchronizing time of wireless sensor network and system
Chirdchoo et al. MU-Sync: a time synchronization protocol for underwater mobile networks
US8355476B2 (en) Timestamping method and apparatus for precise network synchronization
US8139489B2 (en) Robust jitter-free remote clock offset measuring method
CN103248471B (en) Clock synchronizing method based on PTP protocol Yu Reflective memory network
CN104113517A (en) Timestamp generation method, device and system
EP2434673A2 (en) Network synchronization method and apparatus for performing time synchronization between nodes
CN112616181B (en) Current differential protection data synchronization method and system adaptive to 5G communication
JP2013501433A (en) Method and system for optical transmission network carrying time synchronization protocol
Resner et al. Speculative Precision Time Protocol: submicrosecond clock synchronization for the IoT
CN111385051B (en) Clock synchronization method, device and storage medium
CN101262330A (en) A quick high-precision time synchronization method for wireless sensor network with belt feature
CN101902370A (en) Device, system and method for measuring frame delay
JPWO2019003320A1 (en) Communication system and slave device
WO2019169820A1 (en) High-precision time synchronization method
EP2599247B1 (en) Method and device for processing data on a connection between two nodes of a communication network
Kim et al. Synchronized sensing for wireless monitoring of large structures
CN102638339B (en) Method and device for realizing precision time synchronization
CN102710359B (en) Accurate clock frequency synchronizing method and device based on IEEE1588 (institute of electrical and electronics engineers)
CN113163485B (en) Method for accurately positioning in large-range complex indoor environment
CN112272403B (en) UWB-based positioning clock error resolving method
CN117320144A (en) Primary and secondary clock time synchronization method and system based on wireless communication
CN102142954A (en) Time synchronization method and equipment in rack
CN113141225A (en) Time synchronization method, device, storage medium and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150812

RJ01 Rejection of invention patent application after publication