CN103596261B - A kind of clock synchronizing method of vehicle detecting system - Google Patents

A kind of clock synchronizing method of vehicle detecting system Download PDF

Info

Publication number
CN103596261B
CN103596261B CN201310539703.7A CN201310539703A CN103596261B CN 103596261 B CN103596261 B CN 103596261B CN 201310539703 A CN201310539703 A CN 201310539703A CN 103596261 B CN103596261 B CN 103596261B
Authority
CN
China
Prior art keywords
clock
current period
period
node
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310539703.7A
Other languages
Chinese (zh)
Other versions
CN103596261A (en
Inventor
刘向东
何赐文
王焱桥
张大伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mai Rui Data (beijing) Co Ltd
Original Assignee
Mai Rui Data (beijing) Co Ltd
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 Mai Rui Data (beijing) Co Ltd filed Critical Mai Rui Data (beijing) Co Ltd
Priority to CN201310539703.7A priority Critical patent/CN103596261B/en
Publication of CN103596261A publication Critical patent/CN103596261A/en
Application granted granted Critical
Publication of CN103596261B publication Critical patent/CN103596261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a kind of clock synchronizing method of vehicle detecting system, when the clock offset of node and gateway node is no more than the first allowable error when this method is each subsynchronous in preset time, increase synchronizing cycle;When there is the clock offset more than the first allowable error in each hyposynchronous clock offset in preset time, reduce synchronizing cycle;The synchronous energy expense of clock can be reduced on the premise of clock synchronization accuracy is not sacrificed using the present invention.

Description

A kind of clock synchronizing method of vehicle detecting system
Technical field
The present invention relates to wireless sensor network(WSN, Wireless Sensor Network)Technology, it is especially a kind of The clock synchronizing method of vehicle detecting system.
Background technology
The WSN for having merged sensor technology, the information processing technology and the network communications technology is big by being distributed in physical space Quantity sensor node constitutes network by way of MANET, by different around the dissimilar sensor detection built in node Environment includes numerous material phenomenons such as temperature, humidity, direction of moving target and speed.Clock is synchronously the important of WSN applications Part, data fusion that sensor node is detected and its own positioning etc. require the clock between sensor node Keep synchronous.
Being widely used in the synchronous method of network clocking mainly has global positioning system(GPS, Global Positioning System)And NTP(NTP, Net-work Time Protoco1).GPS has at a relatively high synchronization accuracy, but Its cost is high and energy consumption is larger, and can be greatly affected in the context synchronization precision for having the obstacles such as building.NTP is The synchronous agreement of the enterprising row clocks of Internet, when it can realize high-precision computer school on network, but it is computation-intensive Type, computing cost is very big.And in WSN applications, it is desirable to sensor node profile is as small as possible, again difficult in maintenance after deployment, And then also have strict requirements to energy consumption, and require that cheap cost can be disposed largely, it is clear that GPS and NTP is used In WSN clock be synchronously worthless.Synchronously also there are numerous studies to clock in distributed system, but these methods are same The characteristics of not accounting for wireless sensor network is, it is necessary to larger resource overhead, so the clock for being also not suitable for WSN is synchronous.
It can be divided into three classes currently for the WSN clock synchronization algorithms proposed:Based on recipient and recipient(receiver- receiver)Synchronized algorithm, based on sender and recipient(sender-receiver)Between carry out it is synchronous paired in pairs Synchronous (Pair-Wise Synchronization) algorithm and unidirectional (one-way) synchronously calculation based on sender-receiver Method.Wherein, one-way synchronized algorithms need the number of tranmitting data register synchronization message minimum in above-mentioned three classes method, send section As long as the clock that a point clock synchronization message of transmission can be completed between sending node and receiving node is synchronous, with relatively low net Network traffic overhead and computation complexity, thus with relatively low energy consumption.
Vehicle detecting system is a kind of typical WSN, and because the environment of its node setting is to volume, the weight of node etc. Limitation is more harsh, for example, geomagnetism detecting device is arranged under road surface, the damage of road pavement is reduced as far as possible, then requires node Volume it is as small as possible, and repeater is hung on by road on original facility, as few as possible to give existing facility increase load-bearing, It is required that the weight of node is as light as possible;Also, vehicle detecting system also needs to its composition node can be long lasting for work.Cause And, the requirement in terms of vehicle detecting system constitutes the energy-conservation of node to it is higher.Certainly, vehicle detecting system is to clock synchronization Required precision is also higher.It can be seen that, compared with the existing clock synchronization algorithm proposed for WSN, one kind disclosure satisfy that vehicle is examined The synchronization accuracy of examining system is required and the less clock synchronizing method of power consumption is that vehicle detecting system is badly in need of.
The content of the invention
In view of this, can it is a primary object of the present invention to provide a kind of clock synchronizing method of vehicle detecting system The synchronous energy expense of clock is reduced on the premise of clock synchronization accuracy is not sacrificed.
To reach above-mentioned purpose, technical scheme is as follows:
A kind of clock synchronizing method of vehicle detecting system, this method includes:
It is synchronous that A, node enter row clock by synchronizing cycle of current period with gateway node;When current preset time expires, Perform step B;
Node and the clock offset of gateway node and first allow to miss when each subsynchronous in B, the current preset time of comparison The size of difference, if there is no the clock offset more than the first allowable error, performs step C;Otherwise, step D is performed;
C, increase current period, using the cycle after increase as current period, and using next preset time as current Preset time, return to step A;
D, reduce current period, using the cycle after reduction as current period, and using next preset time as current Preset time, return to step A.
Preferably, the current period is:Initial period or second round, second round are more than the initial period;
When current period is the initial period, the cycle after increase is by the increase current period as current period:Will Second round is used as current period;The reduction current period, be as current period using the cycle after reduction:By the initial period It is used as current period;
When current period is second round, the cycle after increase is by the increase current period as current period:Will Second round is used as current period;The reduction current period, be as current period using the cycle after reduction:By the initial period It is used as current period.
Preferably, the current period is:Initial period or second round or period 3, the period 3 are more than the Two cycles, second round is more than the initial period;
When current period is the initial period, the cycle after increase is by the increase current period as current period:Will Second round is used as current period;The reduction current period, be as current period using the cycle after reduction:By the initial period It is used as current period;
When current period is second round, the cycle after increase is by the increase current period as current period:Will Period 3 is used as current period;The reduction current period, be as current period using the cycle after reduction:By the initial period It is used as current period;
When current period is the period 3, the cycle after increase is by the increase current period as current period:Will Period 3 is used as current period;The reduction current period, be as current period using the cycle after reduction:By second round It is used as current period.
Preferably, the value of first allowable error is 1 clock ticktack of local clock.
Preferably, it is characterised in that the span in the initial period is:[1s,5s];The value of the second round Scope is:[3s,20s];The span of the period 3 is:[20s,30s].
Preferably, this method also includes initial synchronisation when node starts, and process is as follows:
The synchronous package that a1, reception gateway node are issued;
B1, the shift time carried according to synchronous package draw the reception time of integral point synchronous package, according to the reception time The integral point synchronous package that gateway node is issued is received, when calculating the time for being an actually-received the integral point synchronous package and the reception drawn Between difference, obtain node and the current clock offset of gateway node;
C1, judge the current clock offset whether be less than the second allowable error, if it is, when knot adjustment is local Clock is synchronous with gateway node clock, performs step A;Otherwise, in next minute, return to step a1.
Preferably, judge that the method that the preset time expires is as follows:
The maximum count value for setting counter is fixed duration set in advance, is reset again when counting up to maximum count value Count;
The node completion adjustment local clock is synchronous with gateway node clock, and while performing step A, counter starts Count, during every rolling counters forward to maximum count value, when as preset time expires;Or,
First counter and the second counter are set;
When node starts, the first counter is started counting up;
The node completion adjustment local clock is synchronous with gateway node clock, while performing step A, the second counter Started counting up using the count value that the first counter is current as starting counter value;When the count value of the second counter is equal to the school of node Be when on schedule preset time at the expiration when, the second counter O reset is counted again.
Preferably, when node continuously loses the number of times of synchronous package more than packet loss number of times is allowed, the node performs Fast synchronization, Comprise the following steps that:
The synchronous package that a2, reception gateway node are issued;
B2, the shift time carried according to synchronous package draw the reception time of integral point synchronous package, according to the reception time The integral point synchronous package that gateway node is issued is received, the time and the reception time for being an actually-received the integral point synchronous package is calculated Difference, obtains node and the current clock offset of gateway node;
C2, judge the current clock offset whether be less than the second allowable error, if it is, when knot adjustment is local Clock is synchronous with gateway node clock, performs step A;Otherwise, in next N seconds, return to step a2;
Wherein, N span is [5,16].
Preferably, the value of second allowable error is the 1 clock ticktack and 2 ticking clock ticktacks of local clock In one.
Preferably, the node is geomagnetism detecting device, and gateway node is access point, and the synchronous package that access point is issued is in Geomagnetism detecting device is transmitted to after device, is specially:
Repeater receives the synchronous package that access point is issued;
Repeater adds the new timestamp obtained after path offset amount in the timestamp of the synchronous package received, and turns Send out the synchronous package of the new timestamp of the carrying;Wherein,
The path offset amount is that repeater receives synchronous package to the time for forwarding the synchronous package.
Based on above-mentioned, a kind of clock synchronizing method for vehicle detecting system that the present invention is provided has advantages below and spy Point:
1st, when each hyposynchronous clock offset is no more than the first allowable error in preset time, increase synchronous week Phase, so not only reduce synchronization times but also do not influenceed synchronization accuracy, and reach the purpose for reducing the synchronous energy expense of clock;Enter One step, when there is the clock offset for being more than the first allowable error in each hyposynchronous clock offset in preset time, Reduce synchronizing cycle, it is ensured that the synchronous precision of clock.In addition, also causing clock synchronous dynamic to adapt to wireless network transmissions shape Condition, increases synchronization times, synchronization times is reduced when signal is good when network signal is bad so that by respective between each equipment of system Time point be that can accurately exchange data;
2nd, repeater adds path offset amount in the timestamp of the synchronous package of forwarding, so, take a fancy in node after Device is transparent, and the synchronous package that node is received is that gateway node is directly issued or forwarded by repeater, can be used Identical algorithm realizes that clock is synchronous, enhances the scalability of vehicle detecting system;
3rd, there is provided fast synchronization method so that after node off-grid during re-accessing network, can quickly with gateway node when Clock is synchronous.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the clock synchronizing method of vehicle detecting system of the embodiment of the present invention.
Fig. 2 is geomagnetism detecting device of the embodiment of the present invention schematic flow sheet synchronous with access Dot Clock.
Fig. 3 is repeater of the embodiment of the present invention schematic flow sheet synchronous with access Dot Clock.
Embodiment
Specifically, the implementation process of the clock synchronizing method of vehicle detecting system of the embodiment of the present invention is as shown in figure 1, bag Include:
Step 101:It is synchronous that node enters row clock by synchronizing cycle of current period with gateway node;Current preset time Man Shi, performs step 102;
Step 102:Node and the clock offset of gateway node and first when comparing each subsynchronous in current preset time The size of allowable error, if there is no the clock offset more than the first allowable error, performs step 103;Otherwise, step is performed Rapid 104;
Step 103:Increase current period, using the cycle after increase as current period, and next preset time is made For current preset time, return to step 101;
Step 104:Reduce current period, using the cycle after reduction as current period, and next preset time is made For current preset time, return to step 101.
In step 101,
The node refers to remaining node in vehicle detecting system in addition to gateway node.
The node and gateway node enter row clock synchronously be specially:
Step a11, node receive the synchronous package that gateway node is issued;
Step b11, node obtain egress and net according to the time of synchronous package and the timestamp of the synchronous package is an actually-received The clock offset of artis;
Step c11, local clock is adjusted to drawn clock offset, make local clock and gateway node clock same Step.Wherein,
The node is that geomagnetism detecting device, gateway node are access point(AP, Access Point)When, issued for AP Synchronous package is transmitted to the transmission means of geomagnetism detecting device by repeater, and step a11 is specially:
Repeater receives the synchronous package that AP is issued;
Repeater adds the new timestamp obtained after path offset amount in the timestamp of the synchronous package received, and turns Send out the synchronous package of the new timestamp of the carrying;Wherein, the path offset amount is that repeater receives synchronous package to forwarding the synchronization The time of bag;
Node receives the synchronous package of repeater forwarding.
Step b11 is specially:
The sum of the time delay of the timestamp and synchronous package of synchronous package from gateway node to node is calculated, in theory should be obtained Receive the time of the synchronous package;
The time for calculating the synchronous package being an actually-received and the difference for the time that should receive the synchronous package in theory, are saved The clock offset of point and gateway node;I.e.:
Timestamp+synchronous package of time=synchronous package of the synchronous package in theory should be received from gateway node to node Time delay
The synchronous package for clock offset=be an actually-received when m- should receive the time of the synchronous package in theory
The node and gateway node enter that row clock is synchronous also can also be synchronous by the existing clock proposed for WSN Algorithm is realized.
The preset time can be fixed duration set in advance.
In step 102,
The value of first allowable error is 1 clock ticktack of local clock(tick).
In step 103 and 104,
The current period is:Initial period or second round, second round are more than the initial period;
Accordingly, the increase/reduction current period, be as current period using the cycle after increase/reduction:Correspond to The operation for current period increase/reduce, is assigned to current period, specifically by initial period or second round:
Current period is the initial period, the increase current period, is as current period using the cycle after increase:By Two cycles are used as current period;The reduction current period, be as current period using the cycle after reduction:It will make in the initial period For current period;
Current period is second round, the increase current period, is as current period using the cycle after increase:By Two cycles are used as current period;The reduction current period, be as current period using the cycle after reduction:It will make in the initial period For current period.
The current period can also be:Initial period or second round or period 3, the period 3 are more than the Two cycles, second round is more than the initial period;
Accordingly, the increase/reduction current period, be as current period using the cycle after increase/reduction:Correspond to The operation for current period increase/reduce, current period is assigned to by initial period, second round or period 3, is had Body:
Current period is the initial period, the increase current period, is as current period using the cycle after increase:By Two cycles are used as current period;The reduction current period, be as current period using the cycle after reduction:It will make in the initial period For current period;
Current period is second round, the increase current period, is as current period using the cycle after increase:By Three cycles were used as current period;The reduction current period, be as current period using the cycle after reduction:It will make in the initial period For current period;
Current period is the period 3, the increase current period, is as current period using the cycle after increase:By Three cycles were used as current period;The reduction current period, be as current period using the cycle after reduction:It will make second round For current period.
Here, the span in the initial period is:[1s,5s];The span of the second round is:[3s, 20s];The span of the period 3 is:[20s,30s].When the current period is initial period or second round Or during the period 3, it is preferred that the value in initial period is 1s, 3s or 5s, and the value of second round is 3s, 10s or 20s, The value of period 3 is 20s, 25s or 30s;When the current period is initial period or second round, it is preferred that just The value in cycle beginning is 1s, 3s or 5s, and the value of second round is 3s, 5s or 20s.
When node starts, before step 101, the embodiment of the present invention also includes initial synchronisation, and process is as follows:
Step a12:Receive the synchronous package that gateway node is issued;
Step b12:The shift time carried according to synchronous package draws the reception time of integral point synchronous package, is received according to described Time receives the integral point synchronous package that gateway node is issued, and calculating is an actually-received the time of the integral point synchronous package and connecing for being drawn Difference between time receiving, obtains node and the current clock offset of gateway node;
Step c12:Judge whether the current clock offset is less than the second allowable error, if it is, knot adjustment Local clock is synchronous with gateway node clock, performs step 101;Otherwise, in next minute, return and perform step a12.
In step b12,
The shift time that the synchronous package is carried refers to the time of the transmission previous whole second point of time migration of synchronous package;
The shift time carried according to synchronous package show that the reception time of integral point synchronous package can be by below equation Realize:
Reception time=detector of integral point synchronous package receive time of the synchronous package+(1s- shift times).
In step c12,
The value of second allowable error can be one in the 1 clock ticktack and 2 clock ticktacks of local clock It is individual;It is preferred that, 2 clock ticktacks for taking local clock of second allowable error.
The embodiment of the present invention also includes determining whether the method that the current preset time in step 101 expires, and is specially:
Step a13:The maximum count value for setting counter is fixed duration set in advance, when counting up to maximum count value Clearing is counted again;Wherein, the span of the fixed duration is [1s, 60s], it is preferred that fixed duration take 1s, 30s or 60s;
Step b13:Adjustment local clock described in node completion step c12 is synchronous with gateway node clock, performs step A's Meanwhile, counter is started counting up, be during rolling counters forward to maximum count value preset time at the expiration when;Or,
Step a14:First counter and the second counter are set;
Step b14:When node starts, the first counter is started counting up;
Step c14:Adjustment local clock described in node completion step c12 is synchronous with gateway node clock, performs step A's Meanwhile, the second counter is started counting up using the current count value of the first counter as starting counter value;When the meter of the second counter Numerical value be equal to node calibration point when be preset time at the expiration when, the second counter O reset is counted again;
In step a14, the maximum count value of the first counter is 30s, resets, counts again when counting down to 30s.
In step c14, the calibration point is that node device is intrinsic.
When the number of times that node off-grid, i.e. node continuously lose synchronous package is more than permission packet loss number of times, the embodiment of the present invention is also It is specific as follows with the method for gateway node Fast synchronization during including node re-accessing network:
Step a15:Receive the synchronous package that gateway node is issued;
Step b15:The shift time carried according to synchronous package draws the reception time of integral point synchronous package, is received according to described Time receives the integral point synchronous package that gateway node is issued, when calculating the time for being an actually-received the integral point synchronous package with the reception Between difference, obtain node and the current clock offset of gateway node;
Step c15:Judge whether the current clock offset is less than the second allowable error, if it is, knot adjustment Local clock is synchronous with gateway node clock, performs step A;Otherwise, in next N seconds, return execution step a15;
Wherein, N span is [5,16], it is preferred that N takes 5,8 or 16.
The span of the permission packet loss number of times is [8 times, 16 times], it is preferred that allow packet loss number of times to take 8 times, 10 times Or 16 times.
As shown in Fig. 2 node is geomagnetism detecting device, gateway node when being AP, vehicle detecting system of the embodiment of the present invention The synchronous implementation process of clock is as follows:
Step 201:It is synchronous that geomagnetism detecting device enters row clock by synchronizing cycle of the initial period with AP;Current preset time Man Shi, performs step 202;
Step 202:Geomagnetism detecting device and AP clock are inclined when each subsynchronous in the more current preset time of geomagnetism detecting device Shifting amount and the size of the first allowable error, will be next preset if there is no the clock offset more than the first allowable error Time, as current preset time, performs step 203;Otherwise, using next preset time as current preset time, step is returned Rapid 201;
Step 203:It is synchronous that geomagnetism detecting device enters row clock by synchronizing cycle of second round with AP;Current preset time Man Shi, performs step 204;
Step 204:Geomagnetism detecting device and AP clock are inclined when each subsynchronous in the more current preset time of geomagnetism detecting device Shifting amount and the size of the first allowable error, will be next preset if there is no the clock offset more than the first allowable error Time, as current preset time, performs step 205;Otherwise, using next preset time as current preset time, step is returned Rapid 201;
Step 205:It is synchronous that geomagnetism detecting device enters row clock by synchronizing cycle of the period 3 with AP;Current preset time Man Shi, performs step 206;
Step 206:Geomagnetism detecting device and AP clock are inclined when each subsynchronous in the more current preset time of geomagnetism detecting device Shifting amount and the size of the first allowable error, will be next preset if there is no the clock offset more than the first allowable error Time is used as current preset time, return to step 205;Otherwise, using next preset time as current preset time, step is returned Rapid 203.
As shown in figure 3, node is repeater, gateway node when being AP, the clock of vehicle detecting system of the embodiment of the present invention Synchronous implementation process is as follows:
Step 301:It is synchronous that repeater enters row clock by synchronizing cycle of the initial period with AP;Current preset time expires When, perform step 302;
Step 302:Repeater and AP clock offset and when each subsynchronous in the more current preset time of repeater The size of one allowable error, if there is no the clock offset more than the first allowable error, using next preset time as Current preset time, performs step 303;Otherwise, it regard next preset time as current preset time, return to step 301;
Step 303:It is synchronous that repeater enters row clock by synchronizing cycle of second round with AP;Current preset time expires When, perform step 304;
Step 304:Repeater and AP clock offset and when each subsynchronous in the more current preset time of repeater The size of one allowable error, if there is no the clock offset more than the first allowable error, using next preset time as Current preset time, return to step 303;Otherwise, it regard next preset time as current preset time, return to step 301.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.

Claims (9)

1. a kind of clock synchronizing method of vehicle detecting system, it is characterised in that this method includes:
It is synchronous that A, node enter row clock by synchronizing cycle of current period with gateway node;When current preset time expires, perform Step B;
The clock offset and the first allowable error of node and gateway node when each subsynchronous in B, the current preset time of comparison Size, if there is no the clock offset more than the first allowable error, performs step C;Otherwise, step D is performed;
C, increase current period, using the cycle after increase as current period, and using next preset time as current preset Time, return to step A;
D, reduce current period, using the cycle after reduction as current period, and using next preset time as current preset Time, return to step A;
The node and gateway node enter row clock synchronously be specially:
Step a11, node receive the synchronous package that gateway node is issued;
Step b11, node obtain egress and gateway section according to the time of synchronous package and the timestamp of the synchronous package is an actually-received The clock offset of point;
Step c11, local clock is adjusted to drawn clock offset, make local clock synchronous with gateway node clock;
When the number of times that node continuously loses synchronous package is more than permission packet loss number of times, the node performs Fast synchronization, and specific steps are such as Under:
The synchronous package that a2, reception gateway node are issued;
B2, the shift time carried according to synchronous package draw the reception time of integral point synchronous package, are received according to the reception time The integral point synchronous package that gateway node is issued, calculates the difference of the time with the reception time that are an actually-received the integral point synchronous package, Obtain node and the current clock offset of gateway node;
C2, judge the current clock offset whether be less than the second allowable error, if it is, knot adjustment local clock with Gateway node clock is synchronous, performs step A;Otherwise, in next N seconds, return to step a2;
Wherein, N span is [5,16].
2. the clock synchronizing method of vehicle detecting system according to claim 1, it is characterised in that the current period For:Initial period or second round, second round are more than the initial period;
When current period is the initial period, the cycle after increase is by the increase current period as current period:By second Cycle is used as current period;The reduction current period, be as current period using the cycle after reduction:Will initial period conduct Current period;
When current period is second round, the cycle after increase is by the increase current period as current period:By second Cycle is used as current period;The reduction current period, be as current period using the cycle after reduction:Will initial period conduct Current period.
3. the clock synchronizing method of vehicle detecting system according to claim 2, it is characterised in that the current period For:Initial period or second round or period 3, the period 3 are more than second round, and second round is more than initial week Phase;
When current period is the initial period, the cycle after increase is by the increase current period as current period:By second Cycle is used as current period;The reduction current period, be as current period using the cycle after reduction:Will initial period conduct Current period;
When current period is second round, the cycle after increase is by the increase current period as current period:By the 3rd Cycle is used as current period;The reduction current period, be as current period using the cycle after reduction:Will initial period conduct Current period;
When current period is the period 3, the cycle after increase is by the increase current period as current period:By the 3rd Cycle is used as current period;The reduction current period, be as current period using the cycle after reduction:Will second round conduct Current period.
4. the clock synchronizing method of vehicle detecting system according to claim 3, it is characterised in that described first allows to miss The value of difference is 1 clock ticktack of local clock.
5. the clock synchronizing method of vehicle detecting system according to claim 4, it is characterised in that the initial period Span is:[1s,5s];The span of the second round is:[3s,20s];The span of the period 3 For:[20s,30s].
6. the clock synchronizing method of vehicle detecting system according to claim 1, it is characterised in that party when node starts Method also includes initial synchronisation, and process is as follows:
The synchronous package that a1, reception gateway node are issued;
B1, the shift time carried according to synchronous package draw the reception time of integral point synchronous package, are received according to the reception time Integral point synchronous package that gateway node is issued, the reception time for calculating the time for being an actually-received the integral point synchronous package and being drawn Difference, obtains node and the current clock offset of gateway node;
C1, judge the current clock offset whether be less than the second allowable error, if it is, knot adjustment local clock with Gateway node clock is synchronous, performs step A;Otherwise, in next minute, return to step a1.
7. the clock synchronizing method of vehicle detecting system according to claim 6, it is characterised in that when judging described preset Between at the expiration method it is as follows:
The maximum count value for setting counter is fixed duration set in advance, resets and counts again when counting up to maximum count value Number;
The node completion adjustment local clock is synchronous with gateway node clock, while performing step A, and counter starts meter Number, during every rolling counters forward to maximum count value, when as preset time expires;Or,
First counter and the second counter are set;
When node starts, the first counter is started counting up;
Node completes that the adjustment local clock is synchronous with gateway node clock, and while execution step A, the second counter is with the The current count value of one counter starts counting up for starting counter value;When the count value of the second counter is equal to the calibration point of node When be preset time at the expiration when, the second counter O reset is counted again.
8. the clock synchronizing method of the vehicle detecting system according to claim 6 or 7, it is characterised in that described second permits Perhaps the value of error is one in the 1 clock ticktack and 2 ticking clock ticktacks of local clock.
9. the clock synchronizing method of the vehicle detecting system according to claim 1,2 or 3, it is characterised in that the node For geomagnetism detecting device, gateway node is access point, and the synchronous package that access point is issued is transmitted to geomagnetism detecting device by repeater, tool Body is:
Repeater receives the synchronous package that access point is issued;
Repeater adds the new timestamp obtained after path offset amount in the timestamp of the synchronous package received, and forwarding should Carry the synchronous package of new timestamp;Wherein,
The path offset amount is that repeater receives synchronous package to the time for forwarding the synchronous package.
CN201310539703.7A 2013-11-05 2013-11-05 A kind of clock synchronizing method of vehicle detecting system Active CN103596261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310539703.7A CN103596261B (en) 2013-11-05 2013-11-05 A kind of clock synchronizing method of vehicle detecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310539703.7A CN103596261B (en) 2013-11-05 2013-11-05 A kind of clock synchronizing method of vehicle detecting system

Publications (2)

Publication Number Publication Date
CN103596261A CN103596261A (en) 2014-02-19
CN103596261B true CN103596261B (en) 2017-11-07

Family

ID=50086193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310539703.7A Active CN103596261B (en) 2013-11-05 2013-11-05 A kind of clock synchronizing method of vehicle detecting system

Country Status (1)

Country Link
CN (1) CN103596261B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301988B (en) * 2014-08-17 2018-10-12 宿迁学院 A kind of clock synchronizing method of the earth induction Vehicular system based on Sensor Network
CN104811988B (en) * 2015-04-24 2019-02-22 迈锐数据(北京)有限公司 A kind of quick method of network entry of wireless sensor network node
CN105722207A (en) * 2016-01-28 2016-06-29 武汉慧联无限科技有限公司 Self-adaptive clock synchronization method for wireless network at low transmission speeds
CN109640287A (en) * 2018-12-11 2019-04-16 西安理工大学 A kind of clock skew method for early warning based on RSSP-II agreement

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202617A (en) * 2006-12-12 2008-06-18 北京三星通信技术研究有限公司 Method for time synchronism compensation among multi-stage equipments
CN101478358B (en) * 2008-01-02 2013-01-23 中兴通讯股份有限公司 Method and device for optimized time synchronization correction
CN103999387B (en) * 2011-11-11 2017-05-17 爱立信(中国)通信有限公司 Sync interval determination

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
实时分布系统中自适应的时钟同步算法;张海辉等;《计算机工程》;20040930;第30卷(第17期);标题1和2 *

Also Published As

Publication number Publication date
CN103596261A (en) 2014-02-19

Similar Documents

Publication Publication Date Title
CN103596261B (en) A kind of clock synchronizing method of vehicle detecting system
EP3564921B1 (en) Sensing system and time synchronization method
CN104737490B (en) Communicator, communication system and method for synchronizing time
CN102547969B (en) High-accuracy wireless clock synchronization system for power system
CN103404054B (en) For the method and apparatus of the Annual distribution in communication network
CN106452645B (en) A kind of group of stars method for synchronizing network time based on cross layer design
CN105959914B (en) Sensor Network time synchronization and positioning combination treatment method based on time difference measurements
CN105472722B (en) A kind of clock synchronizing method and device
US8891716B2 (en) Node device and method for synchronizing clock times
CN104054298B (en) Method and device for determining transit time of packet on communication network
CN102983927B (en) Time compensation method for master-slave clock timing based on IEEE 1588 protocol
CN103747516B (en) Event time tag later time synchronization method in wireless sensor network
CN109996325A (en) A kind of clock system and method for wireless sensor network
CN104079401B (en) A kind of short-period real-time communication system of high accuracy based on chain EPA network
CN106851551A (en) A kind of location information acquisition method and device
Asgarian et al. Time synchronization in a network of bluetooth low energy beacons
CN106455042B (en) A kind of time synchronization between nodes method, wireless sensor network and its node
CN104918317A (en) Inter-base station interface delay compensation method, device and system
CN101257361B (en) Method and net element for performing accurate time transmission through synchronous digital system network
CN104601269B (en) Master-salve clock synchronous method and system
Huan et al. A One-Way Time Synchronization Scheme for Practical Energy-Efficient LoRa Network Based on Reverse Asymmetric Framework
CN102638339A (en) Method and device for realizing precision time synchronization
CN104378818A (en) Clock synchronization method and device and base station subsystem
CN104301988B (en) A kind of clock synchronizing method of the earth induction Vehicular system based on Sensor Network
Kumar et al. Time synchronization in wireless sensor networks: Estimating packet delay

Legal Events

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