CN104796978A - Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes - Google Patents

Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes Download PDF

Info

Publication number
CN104796978A
CN104796978A CN201410027103.7A CN201410027103A CN104796978A CN 104796978 A CN104796978 A CN 104796978A CN 201410027103 A CN201410027103 A CN 201410027103A CN 104796978 A CN104796978 A CN 104796978A
Authority
CN
China
Prior art keywords
clock
node
calibration
timer
calibration factor
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
CN201410027103.7A
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.)
China Academy of Transportation Sciences
Original Assignee
China Academy of Transportation Sciences
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 China Academy of Transportation Sciences filed Critical China Academy of Transportation Sciences
Priority to CN201410027103.7A priority Critical patent/CN104796978A/en
Publication of CN104796978A publication Critical patent/CN104796978A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

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

Abstract

The invention discloses a synchronous and batch calibration method for the time base of WSN nodes. The method comprises that a main node of the WSN obtains an accurate clock signal from an accurate time service source; the main node broadcasts the accurate clock signal to all auxiliary nodes of the WSN; and the auxiliary nodes calibrate the local clocks according to the received accurate clock signal. Thus, the time base of the nodes can be calibrated and unified synchronously, so that synchronous sleep scheduling of the nodes can be carried out in a longer time, and the performance in accurately synchronizing the network is improved.

Description

Base synchronous batch calibration steps during a kind of wireless sensor network node
Technical field
The present invention relates to wireless sensor network technology field, base synchronous batch calibration program when particularly relating to a kind of wireless sensor network node.
Background technology
Wireless sensor network (Wireless Sensor Networks, WSN) be made up of a large amount of sensor nodes, usually a large amount of self-organizings, the distributed node of multi-hop wireless network is comprised, the network integrating data acquisition, fusion treatment and communicate, it has rapid networking, flexibly, and not by the advantage of cable network constraint, therefore, all show wide application prospect in fields such as national defense and military, environmental monitoring, health care, residential cares.
Time synchronized is the important component part of any distributed system, and be also an important support technology of wireless sensor network, the design and devdlop for wireless sensor network is all crucial.At present, a lot of wireless sensor network application all requires that the clock of sensor node keeps synchronous.At present, generally in wireless sensor network adopt traditional method for synchronizing time, such as, the clock of the sensor node calibrated with is benchmark, and the clock of the sensor node that clock and this of unregulated sensor node are calibrated carries out synchronous.But due to the feature of wireless sensor network self, it has special requirement on locking range, energy ezpenditure and synchronization accuracy, adopt the efficiency of traditional time synchronized calibration steps too low, be not suitable for the calibration in enormous quantities of wireless sensor network node chip.
Summary of the invention
In view of this, base synchronous batch calibration steps and system when the embodiment of the present invention provides a kind of wireless sensor network node, with the problem that the efficiency solving wireless sensor network node clock synchronous calibration in prior art is lower.
According to an aspect of the present invention, when providing a kind of wireless sensor network node, base synchronous batch calibration steps, comprising: the host node of wireless sensor network obtains accurate clock signal from precision time service source; All from accurate clock signal described in node broadcasts to described wireless sensor network of described host node; And describedly to calibrate from node according to the clock of described accurate clock signal to this locality received.
Preferably, describedly to calibrate according to the clock of described accurate clock signal to this locality received from node, comprising: describedly according to described accurate clock signal, the described work clock from node to be calibrated from node; Described described work clock after node utilization calibration is calibrated from elapsed time clock during node sleep described.
Preferably, describedly the described work clock from node to be calibrated from node according to described accurate clock signal, comprise: describedly wait for that the timing edge corresponding with described working clock frequency arrives from node by the described accurate clock signal of inquiry, when described timing edge arrives, described master timer starts counting, the count value of described master timer is read in timing after making a reservation for a pulse period, described count value and theoretical value are compared, obtain the calibration factor of described work clock; The calibration factor of described work clock is utilized to calibrate described work clock.
Preferably, describedly from the described work clock after node utilizes calibration, the described elapsed time clock from node sleep to be calibrated, comprising: shielding described from node except from all interruptions except timer and described master timer; Start master timer and start counting, start simultaneously and count from timer; Adopt inquiry mode, when described to complete predetermined pulse period timing from timer after, read described master timer and the described count value from timer, obtain after the calibration of described work clock with the master timer theoretical value corresponding to the described count value from timer, the described master timer theoretical value of the count value of described master timer and acquisition is compared the calibration factor obtaining described elapsed time clock; The calibration factor of described elapsed time clock is utilized to calibrate described elapsed time clock.
Preferably, utilizing before the calibration factor of described work clock calibrates described work clock, described method also comprises: according to the temperature coefficient K of described work clock 2, time synchronized temperature-compensating is carried out to the calibration factor of described work clock, obtains the calibration factor y1:y1=K that described work clock is final 1+ K 2(T-T 0); Wherein, K 1for described count value and theoretical value being compared the calibration factor of the described work clock obtained, K 2for the temperature coefficient of described work clock, T is current actual temperature, T 0for measuring described temperature coefficient K 2time temperature.
Preferably, utilizing before the calibration factor of described elapsed time clock calibrates described elapsed time clock, described method also comprises: according to the temperature coefficient K of described elapsed time clock 4, time synchronized temperature-compensating is carried out to the calibration factor of described elapsed time clock, obtains the calibration factor y2:y2=K that described elapsed time clock is final 3+ K 4(T-T 0); Wherein, K 3for the count value of just described master timer and the described master timer theoretical value of acquisition compare the calibration factor of the described work clock obtained, K 4for the temperature coefficient of described elapsed time clock, T is current actual temperature, T 0for measuring described temperature coefficient K 4time temperature.
Preferably, in all before accurate clock signal described in node broadcasts to described wireless sensor network of described host node, described method also comprises: all described from nodes broadcast synchronization request to described wireless sensor network of described host node; Described host node receives the described answer signal returned after receiving described synchronization request from node.
According to another aspect of the present invention, base synchronous batch calibration system when providing a kind of wireless sensor network node, comprising: the host node in wireless sensor network and multiple from node; Wherein, host node, for obtaining accurate clock signal from precision time service source, and all from accurate clock signal described in node broadcasts to wireless sensor network; Described from node, for calibrating according to the clock of described accurate clock signal to this locality received.
Preferably, describedly to comprise from node: the first calibration module, for calibrating the described work clock from node according to described accurate clock signal; Second calibration module, calibrates from elapsed time clock during node sleep described for utilizing the described work clock after calibration.
Whether preferably, described first calibration module comprises: the first query unit, arrive for the timing edge inquiring about described accurate clock signal corresponding with described working clock frequency; Master timer, during for inquiring the arrival of described timing edge in described first query unit, starts counting; First comparing unit, for reading the count value of described master timer after make a reservation for pulse period in described master timer timing, comparing described count value and theoretical value, obtaining the calibration factor of described work clock; First alignment unit, calibrates described work clock for using the calibration factor of described work clock.
Preferably, described first calibration module also comprises: the first temperature compensation unit, for the temperature coefficient K according to described work clock 2, time synchronized temperature-compensating is carried out to the calibration factor of described work clock, obtains the calibration factor y1 that described work clock is final:
y1=K 1+K 2·(T-T 0),
Wherein, K 1for the calibration factor of the described work clock that described first comparing unit obtains, K 2for the temperature coefficient of described work clock, T is current actual temperature, T 0for measuring described temperature coefficient K 2time temperature.
Preferably, described second calibration module comprises: screen unit, for shield described from node except from all interruptions except timer and described master timer; Master timer and from timer, for having no progeny in described screen unit shielding is all, starting simultaneously and starting counting; Second comparing unit, for adopting inquiry mode, when described to complete predetermined pulse period timing from timer after, read described master timer and the described count value from timer, obtain after the calibration of described work clock with the master timer theoretical value corresponding to the described count value from timer, the described master timer theoretical value of the count value of described master timer and acquisition is compared the calibration factor obtaining described elapsed time clock; Second alignment unit, calibrates described elapsed time clock for utilizing the calibration factor of described elapsed time clock.
Preferably, described second calibration module also comprises: the second temperature compensation unit, for the temperature coefficient K according to described elapsed time clock 4, time synchronized temperature-compensating is carried out to the calibration factor of described elapsed time clock, obtains the calibration factor y2 that described elapsed time clock is final:
Y2=K 3+ K 4(T-T 0), wherein, K 3for the calibration factor of the described work clock that described second comparing unit obtains, K 4for the temperature coefficient of described elapsed time clock, T is current actual temperature, T 0for measuring described temperature coefficient K 4time temperature.
Preferably, described host node is also for all from before accurate clock signal described in node broadcasts to described wireless sensor network, all described from nodes broadcast synchronization request to described wireless sensor network, start-up time is synchronous, after receiving the described answer signal returned after receiving described synchronization request from node, broadcast described accurate clock signal.
In the embodiment of the present invention, wireless sensor network host node is after obtaining accurate clock signal by precision time service source, in a broadcast manner to all from node broadcasts accurate clock signal, local clock calibration is carried out according to this accurate clock signal from node, when solving existing wireless sensor network node, base cannot the problem of synchronous calibration in enormous quantities, effectively make use of the synchronous coverage property of radio broadcasting, calibrate simultaneously and unified the time base of node, make node can carry out more macrocyclic synchronized sleep scheduling, and promote the performance of precise synchronization networking.
Accompanying drawing explanation
The structural representation of base synchronous batch calibration system when Fig. 1 is wireless sensor network node in the embodiment of the present invention;
The structural representation from node of base synchronous batch calibration system when Fig. 2 is wireless sensor network node in the embodiment of the present invention;
The structural representation of first calibration module from node of base synchronous batch calibration system when Fig. 3 is wireless sensor network node in the embodiment of the present invention;
The structural representation of second calibration module from node of base synchronous batch calibration system when Fig. 4 is wireless sensor network node in the embodiment of the present invention;
The flow chart of base synchronous batch calibration steps when Fig. 5 is wireless sensor network node in the embodiment of the present invention;
The signaling process figure of base synchronous batch calibration steps when Fig. 6 is the wireless sensor network node of the preferred embodiment of the present invention;
Fig. 7 is the schematic diagram that in the preferred embodiment of the present invention, host node obtains accurate clock signal;
Fig. 8 be in the preferred embodiment of the present invention from node 16MHz oikocryst shake calibration flow chart;
Fig. 9 is the flow chart from the calibration of node sleep 32.768kHz crystal oscillator in the preferred embodiment of the present invention.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
According to the embodiment of the present invention, base synchronous batch calibration system when providing a kind of wireless sensor network node, comprise wireless sensor network host node and multiple from node, in this system, accurate clock signal is obtained from precision time service source by host node, what be then broadcast in network is all from node, calibrates from node according to this accurate clock signal.
The structural representation of base synchronous batch calibration system when Fig. 1 is the wireless sensor network node according to the embodiment of the present invention, as shown in Figure 1, during this wireless sensor network node, base synchronous batch calibration system comprises: host node 1 and from node 3 in wireless sensor network.Wherein, host node 1, for obtaining accurate clock signal from precision time service source, and broadcasts described accurate clock signal to all of wireless sensor network from node 3; From node 3, for calibrating according to the clock of described accurate clock signal to this locality received.
In embodiments of the present invention, host node 1 can obtain accurate clock signal by GPS or Big Dipper precision time service chip, is then sent to the accurate clock signal of acquisition from node 3 by broadcast.
In specific implementation process, as shown in Figure 2, can comprise from node 3: the first calibration module 30 and the second calibration module 32.Wherein, the first calibration module 30, for calibrating the work clock from node according to the accurate clock signal received; Second calibration module 32, calibrates from elapsed time clock during node sleep for utilizing the work clock after calibration.
Such as, for have two clock sources and frequency be respectively 16MHz (work clock) and 32.768kHz (sleep clock) clock source from node, first can carry out 16MHz oikocryst according to the accurate clock signal received from the first calibration module 30 of node 3 to shake calibration, the 16MHz oikocryst after then utilizing calibration shakes and to calibrate sleep 32.768kHz crystal oscillator.
Particularly, as shown in Figure 3, the first calibration module 30 can comprise: the first query unit 300, for inquire-receive to the accurate clock signal timing edge corresponding with working clock frequency whether arrive; Master timer 302, is connected with the first query unit 300, during for inquiring the arrival of timing edge in the first query unit 300, starts counting; First comparing unit 304, is connected with master timer 302, for reading the count value of master timer 302 after make a reservation for pulse period in master timer 302 timing, described count value and theoretical value being compared, obtaining the calibration factor of described work clock; First alignment unit 306, calibrates work clock for using the calibration factor of work clock.
Such as, for above-mentioned have two clock sources and frequency be respectively 16MHz (work clock) and 32.768kHz (sleep clock) clock source from node, by inquiry, first query unit 300 waits for that host node 16MHz timing edge arrives, when arriving at timing edge, 16MHz timer (master timer 302) starts counting, timing N number of pulse period (being assumed to be 1s) afterwards the first comparing unit 304 read the count value of master timer 302 (such as, 20ppm representative value is 15.999.680) and theoretical value is (such as, for 16.000.000) compare, obtain oikocryst to shake calibration factor (i.e. the calibration factor of work clock) (then K 1=0.99998), then the first alignment unit 306 utilizes this calibration factor to calibrate work clock.
In a preferred implementation of the embodiment of the present invention, in order to make clock alignment more accurate, obtaining oikocryst at the first comparing unit 304 shakes after calibration factor, can carry out time synchronized temperature-compensating further to the oikocryst calibration factor that shakes, and obtains final oikocryst and to shake calibration factor y1.As shown in Figure 3, in this preferred implementation, the first calibration module 30 can also comprise: the first temperature compensation unit 308, is connected between the first comparing unit 304 and the first alignment unit 306, for the temperature coefficient K according to work clock 2, time synchronized temperature-compensating is carried out to the calibration factor of the work clock that the first comparing unit 304 obtains, obtains the calibration factor y1 that described work clock is final:
y1=K 1+K 2·(T-T 0)
Wherein, K 1be the calibration factor of the work clock from node that the first comparing unit obtains, K 2for temperature coefficient (such as, the k of described work clock 2=-0.33 × 10 -6), T is current actual temperature (such as, T=-10 DEG C), T 0for temperature (such as, T during measuring tempeature coefficient 0=25 DEG C).In the present embodiment, if K 1=0.99998 (20ppm), then can obtain from the final calibration factor y1=0.99999155 of node work clock according to above formula.Finally, the first alignment unit 306 is calibrated the work clock from node according to the calibration factor y1 that work clock is final.
In an embodiment of the embodiment of the present invention, as shown in Figure 4, the second calibration module 32 can comprise: screen unit 320, for shield described from node except from all interruptions except timer 324 and master timer 322; Master timer 322 and from timer 324, for shield at screen unit 320 all in have no progeny, start simultaneously and start counting; Second comparing unit 326, for adopting inquiry mode, when described to complete predetermined pulse period timing from timer 324 after, read master timer 322 and the count value from timer 324, obtain after the calibration of described work clock with the master timer theoretical value corresponding to the described count value from timer 324, the count value of described master timer 322 and the master timer theoretical value of acquisition are compared the calibration factor obtaining described elapsed time clock; Second alignment unit 328, utilizes the calibration factor of described elapsed time clock to calibrate described elapsed time clock.
Such as, for above-mentioned have two clock sources and frequency be respectively 16MHz (work clock) and 32.768kHz (sleep clock) clock source from node, shake (such as utilizing 16MHz oikocryst, 4 frequency divisions can be adopted) when sleep 32.768kHz crystal oscillator is calibrated, first, screen unit 320 shields all interruptions from node; Then master timer 322 and from timer 324 (its count frequency can be 4MHz) is started immediately; Then the second comparing unit 326 adopts inquiry mode, after 32.768K timer (namely from timer 324) completes the timing of N number of 4MHz pulse period, obtain and the master timer theoretical value corresponding to the described count value from timer 324, the count value of described master timer 322 and the master timer theoretical value of acquisition are compared the calibration factor obtaining sleep 32.768kHz clock (i.e. elapsed time clock), and the second alignment unit 328 utilizes the calibration factor of elapsed time clock to calibrate elapsed time clock.
Such as, after complete the timing of N number of pulse period from timer, the count value that typical master timer reads is (40ppm) 49.998, and the theoretical value being the master timer of 100 correspondences from the count value of timer reading is 49.999, then obtain calibration factor K 3=0.99998.
In the above-mentioned preferred implementation of the embodiment of the present invention, the master timer 322 in Fig. 4 is the master timer 302 in Fig. 3.
In a preferred implementation of the embodiment of the present invention, in order to make clock alignment more accurate, obtaining oikocryst at the second comparing unit 326 shakes after calibration factor, can carry out time synchronized temperature-compensating further, obtain final calibration factor y2 to the calibration factor of elapsed time clock.As shown in Figure 4, the second calibration module 32 can also comprise: the second temperature compensation unit 329, for the temperature coefficient K according to elapsed time clock 4, time synchronized temperature-compensating is carried out to the calibration factor that the second comparing unit 306 obtains, obtains the calibration factor y2 that described elapsed time clock is final:
y2=K 3+K 4·(T-T 0)
Wherein, K 3for the calibration factor of the described work clock that described second comparing unit obtains, K 4for the temperature coefficient of described elapsed time clock, T is current actual temperature, T 0for measuring described temperature coefficient K 4time temperature.
Such as, k 4=-0.04 × 10 -6, current actual temperature T 1=15 DEG C, T 0=25 DEG C, if the calibration factor K of the elapsed time clock from node that the second comparing unit 306 obtains 3=0.9998, then can obtain y2=0.9998604.Second alignment unit 328 this calibration factor handy is calibrated the elapsed time clock from node.
In a preferred implementation of the embodiment of the present invention, in order to make the accurate clock signal that can receive host node 1 transmission from node 3, host node 1 is also for before broadcasting described accurate clock signal to wireless sensor network all from node 3, all from the request of node 3 broadcast synchronization to wireless sensor network, start-up time is synchronous, after receiving the answer signal returned after receiving synchronization request from node 3, broadcast accurate clock signal.Namely in this preferred implementation, whether host node 1 is first determined and unobstructed from the link between node 3, then at broadcast accurate clock signal.
According to the embodiment of the present invention, base synchronous batch calibration steps when additionally providing a kind of wireless sensor network node, the method can by the realization of the synchronous batch of base during above-mentioned wireless sensor network calibration system.
Base synchronous batch calibration steps flow chart when Fig. 5 is the wireless sensor network node according to the embodiment of the present invention, as shown in Figure 5, mainly comprises the following steps:
Step S502, the host node of wireless sensor network obtains accurate clock signal from precision time service source;
Such as, host node can obtain accurate clock signal by GPS/ Big Dipper precision time service chip, particularly, host node can pass through precision time service GPS/ Big Dipper chip (such as U-blox6 precision time service GPS chip UBX-G6010-ST-TM), obtains Perfect Time signal.In the present embodiment, U-blox6 precision time service GPS chip UBX-G6010-ST-TM enables user's configuration frequency and time pulse export.By using the granularity error of quantization error compensation time pulse, precision can up to 15ns.
Step S504, all from accurate clock signal described in node broadcasts to described wireless sensor network of host node;
In a preferred implementation of the present embodiment, in order to confirm before broadcast accurate clock signal, host node and unobstructed from the link between node, host node is to before node broadcasts accurate clock signal, can first to from nodes broadcast synchronization request, after receiving the answer signal (i.e. ACK response) of the synchronization request returned from node, then to from node broadcasts accurate clock signal.
Step S506, calibrates from node according to the clock of described accurate clock signal to this locality received.
Such as, for comprise work clock and sleep elapsed time clock from node, can first calibrate the work clock from node according to accurate clock signal from node, the described work clock after then utilizing calibration is calibrated from elapsed time clock during node sleep described.
Particularly, for work clock, wait for that the timing edge corresponding with working clock frequency arrives by inquiry accurate clock signal, when described timing edge arrives, start the master timer corresponding with work clock from node, master timer starts counting, (such as N number of predetermined of timing, can arrange as required in concrete) read the count value of master timer after the pulse period, described count value and theoretical value are compared, obtains the calibration factor K of described work clock 1, then utilize this calibration system K 1work clock is calibrated.
In a preferred implementation of the embodiment of the present invention, in order to make clock alignment more accurate, shake calibration factor (namely from the calibration factor K of node work clock obtaining oikocryst 1) after, time synchronized temperature-compensating can be carried out to the oikocryst calibration factor that shakes further, obtain final oikocryst and to shake calibration factor y1, then utilize this calibration factor to calibrate from node work clock.Therefore, in this embodiment, before calibrating described work clock, described method can also comprise:
According to the temperature coefficient K of described work clock 2, time synchronized temperature-compensating is carried out to the calibration factor of described work clock, obtains the calibration factor y1 that described work clock is final:
y1=K 1+K 2·(T-T 0)
Wherein, K 1for described count value and theoretical value being compared the calibration factor of the described work clock obtained, K 2for the temperature coefficient of described work clock, T is current actual temperature, T 0for measuring described temperature coefficient K 2time temperature.
For the elapsed time clock from node sleep, after work clock is calibrated, first shield from node except from all interruptions except timer and described master timer, then, start master timer and corresponding to elapsed time clock timer simultaneously, then, adopt inquiry mode, after complete predetermined pulse period timing from timer, read master timer and the count value from timer, obtain after the calibration of described work clock with the master timer theoretical value corresponding to the described count value from timer, the master timer theoretical value of the count value of described master timer and acquisition is compared the calibration factor obtaining elapsed time clock, the calibration factor of recycling elapsed time clock is calibrated elapsed time clock.
In a preferred implementation of the embodiment of the present invention, in order to make clock alignment more accurate, obtaining the calibration factor K from node elapsed time clock 3afterwards, time synchronized temperature-compensating can be carried out to the calibration factor of elapsed time clock further, obtain final elapsed time clock calibration factor y2, then utilize this calibration factor to calibrate the elapsed time clock from node.Therefore, in this embodiment, before calibrating described elapsed time clock, described method can also comprise:
According to the temperature coefficient K of described elapsed time clock 4, time synchronized temperature-compensating is carried out to the calibration factor of described elapsed time clock, obtains the calibration factor y2 that described elapsed time clock is final:
y2=K 3+K 4·(T-T 0)
Wherein, K 3for the described master timer theoretical value of the count value of described master timer and acquisition being compared the calibration factor of the described elapsed time clock obtained, K 4for the temperature coefficient of described elapsed time clock, T is current actual temperature, T 0for measuring described temperature coefficient K 4time temperature.
Below by specific embodiment, the technical scheme that the embodiment of the present invention provides is described.
At this specific embodiment, host node is by precision time service GPS/ Big Dipper chip (such as U-blox6 precision time service GPS chip UBX-G6010-ST-TM), obtain Perfect Time signal, by U-blox6 precision time service GPS chip UBX-G6010-ST-TM, user's configuration frequency and time pulse are exported.By using the granularity error of quantization error compensation time pulse, precision can up to 15ns.
The precision time service adopted in the present embodiment has following characteristics:
(1) 2 time pulse exports (can reach 10MHz);
(2) the visible just exportable time pulse of a satellite is had at least;
(3) for improving the static schema of GPS time service precision;
(4) external event markers input.
In this specific embodiment, two: 16MHz and 32.768kHz is had from node (typical SoC chip CC2530) clock source, wherein oikocryst shakes for 16MHz, synchronous with the clock maintenance of host node in order to ensure from the work clock of node, in the present embodiment, the work clock of GPS chip obtained with host node, for benchmark, is calibrated the work clock shaken from node oikocryst (16MHz), with guarantee from node time axle be accurately.32.768kHz clock is from elapsed time clock during node sleep, from only having 32.768kHz clock to be work during node sleep, if 32.768kHz clock exists error, the timing accuracy of sleep can be affected, if error acquires a certain degree, when waking up, the synchronous of same base station can be lost, i.e. step-out.Thus need in the present embodiment to calibrate 32.768kHz clock, its benchmark is that oikocryst after calibration shakes the work clock of 16MHz.
Fig. 6 is in the preferred embodiment of the present invention, and the signaling process figure of the batch calibration steps of wireless sensor network node clock synchronous, as shown in Figure 6, mainly comprises the following steps:
Step 601, GPS chip time pulse-triggered host node, host node obtains time reference signal;
Fig. 7 is that host node obtains the schematic diagram of time reference signal from precise clock source, as shown in Figure 7, GPS chip receives the time pulse of satellite, and host node obtains time reference signal from GPS chip, then by broadcast channel, time reference signal is broadcast to each from node.
Step 602, host node is to from nodes broadcast synchronization request, and start-up time is synchronous;
Step 603, receives synchronization request from node and sends responsion signal Ack;
Step 604, host node to from nodes broadcast synchronization calibration information, i.e. standard clock signal pulse;
Step 605, carries out 16MHz oikocryst from node according to this standard clock signal and to shake calibration;
In the present embodiment, 16MHz oikocryst can be carried out according to the flow process shown in Fig. 8 from node and to shake calibration, as shown in Figure 8, carry out the calibration of shaking of 16MHz oikocryst from node and mainly comprise the following steps (step 801-step 805):
Step 801, receives the triggering signal of host node from node;
Step 802, prepares to start 16MHz timer from node, waits for that host node 16M timing edge arrives by inquiry;
Step 803, after timing edge arrives, main Timer (i.e. 16MHz timer) starts counting, timing N number of pulse period;
Step 804, the count value of master timer is read in timing after N number of pulse period;
Step 805, compares the count value of reading and theoretical value, obtains oikocryst and to shake calibration factor K 1, utilize K 116MHz oikocryst is shaken and calibrates.
Step 606, from node utilize 16MHz oikocryst shake (adopting 4 frequency divisions) sleep 32.768kHz crystal oscillator is calibrated;
In the present embodiment, can calibrate from node according to the flow process shown in Fig. 9 to sleep 32.768kHz crystal oscillator, as shown in Figure 9, carrying out calibration from node to sleep 32.768kHz crystal oscillator can comprise the following steps:
Step 901, shield from node except from all interruptions except timer and described master timer;
Step 902, starts 16MHz timer (i.e. master timer) and 32.768kHz timer (namely from timer) simultaneously;
Step 903, adopts inquiry mode, after 32.768kHz timer completes the timing of N number of 4MHz pulse period, reads master timer and the count value from timer;
Step 904, obtain after described work clock calibration (namely above-mentioned 16MHz oikocryst shakes) with the master timer theoretical value corresponding to the described count value from timer, the master timer theoretical value of the count value of described master timer and acquisition is compared the calibration factor obtaining sleep 32.768kHz clock, utilizes this calibration system to carry out the calibration of sleep 32.768kHz crystal oscillator.
In the flow process shown in above-mentioned Fig. 8 and Fig. 9, obtaining before calibration factor calibrates crystal oscillator, in order to make calibration more accurate, time synchronized compensation schemes can be carried out further to the calibration factor obtained, such as, in step 805, can according to the mode time of implementation pulling temperature compensation scheme in front from node, particularly, from node according to shaking calibration factor K from the oikocryst of node of obtaining 1and the temperature coefficient K of work clock itself 2can carry out K 1carry out time synchronized temperature-compensating, obtain final oikocryst and to shake calibration factor y:
y=K 1+K 2·(T-T 0)
Wherein, K 1for the calibration factor obtained in step 805, K 2for temperature coefficient (such as, the K of work clock itself 2=-0.4 × 10 -6/ DEG C), T is actual temperature, T 0for temperature (T during measuring tempeature coefficient 0=25 DEG C), the oikocryst finally obtained after temperature-compensating shakes calibration factor y, utilizes this calibration factor to calibrate work clock, and alignment time of obtaining from node can be made more accurate.Equally, the calibration factor for the elapsed time clock from node also can take corresponding mode to calibrate, and specifically repeats no more.
By the technique scheme that the embodiment of the present invention provides, wireless sensor network host node is after obtaining accurate clock signal by precision time service source, in a broadcast manner to all from node broadcasts accurate clock signal, local clock calibration is carried out according to this accurate clock signal from node, when solving existing wireless sensor network node, base cannot the problem of synchronous calibration in enormous quantities, effectively make use of the synchronous coverage property of radio broadcasting, calibrate simultaneously and unified the time base of node, make node can carry out more macrocyclic synchronized sleep scheduling, and promote the performance of precise synchronization networking.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (14)

1. base synchronous batch calibration steps during wireless sensor network node, is characterized in that, comprising:
The host node of wireless sensor network obtains accurate clock signal from precision time service source;
All from accurate clock signal described in node broadcasts to described wireless sensor network of described host node; And
Describedly to calibrate from node according to the clock of described accurate clock signal to this locality received.
2. method according to claim 1, is characterized in that, describedly calibrates from node according to the clock of described accurate clock signal to this locality received, and comprising:
Describedly the described work clock from node to be calibrated from node according to described accurate clock signal;
Described described work clock after node utilization calibration is calibrated from elapsed time clock during node sleep described.
3. method according to claim 2, is characterized in that, describedly calibrates the described work clock from node from node according to described accurate clock signal, comprising:
Describedly wait for that the timing edge corresponding with described working clock frequency arrives from node by the described accurate clock signal of inquiry, when described timing edge arrives, described master timer starts counting, the count value of described master timer is read in timing after making a reservation for a pulse period, described count value and theoretical value are compared, obtains the calibration factor of described work clock;
The calibration factor of described work clock is utilized to calibrate described work clock.
4. method according to claim 3, is characterized in that, described described work clock after node utilization calibration is calibrated the described elapsed time clock from node sleep, comprising:
Shielding described from node except from all interruptions except timer and described master timer;
Start described master timer and start counting, from timer count described in starting simultaneously;
Adopt inquiry mode, when described to complete predetermined pulse period timing from timer after, read described master timer and the described count value from timer, obtain after the calibration of described work clock with the master timer theoretical value corresponding to the described count value from timer, the described master timer theoretical value of the count value of described master timer and acquisition is compared the calibration factor obtaining described elapsed time clock;
The calibration factor of described elapsed time clock is utilized to calibrate described elapsed time clock.
5. method according to claim 3, is characterized in that, utilizing before the calibration factor of described work clock calibrates described work clock, described method also comprises:
According to the temperature coefficient K of described work clock 2, time synchronized temperature-compensating is carried out to the calibration factor of described work clock, obtains the calibration factor y1 that described work clock is final:
y1=K 1+K 2·(T-T 0);
Wherein, K 1for described count value and theoretical value being compared the calibration factor of the described work clock obtained, K 2for the temperature coefficient of described work clock, T is current actual temperature, T 0for measuring described temperature coefficient K 2time temperature.
6. method according to claim 4, is characterized in that, utilizing before the calibration factor of described elapsed time clock calibrates described elapsed time clock, described method also comprises:
According to the temperature coefficient K of described elapsed time clock 4, time synchronized temperature-compensating is carried out to the calibration factor of described elapsed time clock, obtains the calibration factor y2 that described elapsed time clock is final:
y2=K 3+K 4·(T-T 0)
Wherein, K 3for the described master timer theoretical value of the count value of described master timer and acquisition being compared the calibration factor of the described elapsed time clock obtained, K 4for the temperature coefficient of described elapsed time clock, T is current actual temperature, T 0for measuring described temperature coefficient K 4time temperature.
7. method according to any one of claim 1 to 6, is characterized in that, in all before accurate clock signal described in node broadcasts to described wireless sensor network of described host node, described method also comprises:
All described from nodes broadcast synchronization request to described wireless sensor network of described host node;
Described host node receives the described answer signal returned after receiving described synchronization request from node.
8. base synchronous batch calibration system during wireless sensor network node, is characterized in that, comprising: the host node in wireless sensor network and multiple from node; Wherein,
Described host node, for obtaining accurate clock signal from precision time service source, and all described from accurate clock signal described in node broadcasts to wireless sensor network;
Described from node, for calibrating according to the clock of described accurate clock signal to this locality received.
9. system according to claim 8, is characterized in that, describedly comprises from node:
First calibration module, for calibrating the described work clock from node according to described accurate clock signal;
Second calibration module, calibrates from elapsed time clock during node sleep described for utilizing the described work clock after calibration.
10. system according to claim 9, is characterized in that, described first calibration module comprises:
Whether the first query unit, arrive for the timing edge inquiring about described accurate clock signal corresponding with described working clock frequency;
Master timer, during for inquiring the arrival of described timing edge in described first query unit, starts counting;
First comparing unit, for reading the count value of described master timer after make a reservation for pulse period in described master timer timing, comparing described count value and theoretical value, obtaining the calibration factor of described work clock;
First alignment unit, calibrates described work clock for using the calibration factor of described work clock.
11. systems according to claim 10, is characterized in that, described first calibration module also comprises:
First temperature compensation unit, for the temperature coefficient K according to described work clock 2, time synchronized temperature-compensating is carried out to the calibration factor of described work clock, obtains the calibration factor y1 that described work clock is final:
y1=K 1+K 2·(T-T 0)
Wherein, K 1for the calibration factor of the described work clock that described first comparing unit obtains, K 2for the temperature coefficient of described work clock, T is current actual temperature, T 0for measuring described temperature coefficient K 2time temperature.
12. systems according to claim 10, is characterized in that, described second calibration module comprises:
Screen unit, for shield described from node except from all interruptions except timer and described master timer;
Described master timer and described from timer, for having no progeny in described screen unit shielding is all, starting simultaneously and starting counting;
Second comparing unit, for adopting inquiry mode, when described to complete predetermined pulse period timing from timer after, read described master timer and the described count value from timer, obtain after the calibration of described work clock with the master timer theoretical value corresponding to the described count value from timer, the described master timer theoretical value of the count value of described master timer and acquisition is compared the calibration factor obtaining described elapsed time clock;
Second alignment unit, calibrates described elapsed time clock for utilizing the calibration factor of described elapsed time clock.
13. systems according to claim 12, is characterized in that, described second calibration module also comprises:
Second temperature compensation unit, for the temperature coefficient K according to described elapsed time clock 4, time synchronized temperature-compensating is carried out to the calibration factor of described elapsed time clock, obtains the calibration factor y2 that described elapsed time clock is final:
y2=K 3+K 4·(T-T 0)
Wherein, K 3for the calibration factor of the described work clock that described second comparing unit obtains, K 4for the temperature coefficient of described elapsed time clock, T is current actual temperature, T 0for measuring described temperature coefficient K 4time temperature.
System according to any one of 14. according to Claim 8 to 13, is characterized in that, described host node also for:
All from before accurate clock signal described in node broadcasts to described wireless sensor network, all described from nodes broadcast synchronization request to described wireless sensor network, start-up time is synchronous, after receiving the described answer signal returned after receiving described synchronization request from node, broadcast described accurate clock signal.
CN201410027103.7A 2014-01-18 2014-01-18 Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes Pending CN104796978A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410027103.7A CN104796978A (en) 2014-01-18 2014-01-18 Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410027103.7A CN104796978A (en) 2014-01-18 2014-01-18 Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes

Publications (1)

Publication Number Publication Date
CN104796978A true CN104796978A (en) 2015-07-22

Family

ID=53561384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410027103.7A Pending CN104796978A (en) 2014-01-18 2014-01-18 Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes

Country Status (1)

Country Link
CN (1) CN104796978A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110876178A (en) * 2018-08-31 2020-03-10 展讯通信(上海)有限公司 Calibration method and device for 32K clock
CN112672415A (en) * 2020-12-25 2021-04-16 之江实验室 Multi-sensor time synchronization method, device, system, electronic device and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1168635A1 (en) * 2000-06-30 2002-01-02 Texas Instruments France Method of maintaining mobile terminal synchronization during idle communication periods
CN101763028A (en) * 2009-12-31 2010-06-30 北京飞天诚信科技有限公司 Method for calibrating time and device thereof
CN101959298A (en) * 2009-07-17 2011-01-26 联芯科技有限公司 Method and device for calibrating slow timing clock and terminal
CN102435975A (en) * 2011-11-07 2012-05-02 中国电力科学研究院 Intelligent cost control electric energy meter and clock calibration method
CN103052150A (en) * 2012-11-19 2013-04-17 安徽工程大学 Wireless sensor network time synchronization method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1168635A1 (en) * 2000-06-30 2002-01-02 Texas Instruments France Method of maintaining mobile terminal synchronization during idle communication periods
CN101959298A (en) * 2009-07-17 2011-01-26 联芯科技有限公司 Method and device for calibrating slow timing clock and terminal
CN101763028A (en) * 2009-12-31 2010-06-30 北京飞天诚信科技有限公司 Method for calibrating time and device thereof
CN102435975A (en) * 2011-11-07 2012-05-02 中国电力科学研究院 Intelligent cost control electric energy meter and clock calibration method
CN103052150A (en) * 2012-11-19 2013-04-17 安徽工程大学 Wireless sensor network time synchronization method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
田晓红: "基于I¬2C总线的数字温度补偿实时时钟芯片设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110876178A (en) * 2018-08-31 2020-03-10 展讯通信(上海)有限公司 Calibration method and device for 32K clock
CN112672415A (en) * 2020-12-25 2021-04-16 之江实验室 Multi-sensor time synchronization method, device, system, electronic device and medium
CN112672415B (en) * 2020-12-25 2022-04-26 之江实验室 Multi-sensor time synchronization method, device, system, electronic device and medium

Similar Documents

Publication Publication Date Title
Li et al. Exploiting FM radio data system for adaptive clock calibration in sensor networks
CN105099649B (en) A kind of method and system of network time synchronization insertion
CN102291169B (en) Onboard high-accuracy time synchronization method for satellite
US20090238154A1 (en) Method for Synchronization of Assemblies in a Base Station
Chen et al. Ultra-low power time synchronization using passive radio receivers
US8737378B2 (en) Synchronization of nodes in a network
Ferrigno et al. Experimental characterization of synchronization protocols for instrument wireless interface
CN103078401B (en) The system and method for transformer station's time synchronized and sample-synchronous
CN104796978A (en) Synchronous and batch calibration method for time base of WSN (Wireless Sensor Networks) nodes
CN108738127A (en) Remote Radio Unit, baseband processing unit, distributed base station and its synchronous method
CN109714125B (en) Method and system for synchronizing wireless time between satellite cabins and satellite
US10506537B2 (en) Transceiver device with real-time clock
CN107483136A (en) A kind of clock synchronizing method between fixed communication apparatus
CN104869587B (en) Time Synchronization for Wireless Sensor Networks error assay method
CN201732514U (en) Networked automatic timing high-precision digital permanent calendar with mutual-assistance sharing protocol
CN102142954A (en) Time synchronization method and equipment in rack
CN1964352B (en) A method and device to improve clock precision
US20130182699A1 (en) Wireless communication device and wireless communication method
CN103096458A (en) Energy conservation time synchronization method of wireless temperature detecting net
Li et al. Flight: Clock calibration and context recognition using fluorescent lighting
CN109067496A (en) Wireless clock synchronous method, system and the medium of non-stop layer base station
AU2012333231B2 (en) Synchronization of nodes in a network
CN113259037B (en) Time synchronization method, medium, and apparatus based on sensor time synchronization system
CN105406933A (en) Time synchronization method and synchronization system
US20220269223A1 (en) Wireless time servicing method, device, and system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20150722