CN112040540B - Time synchronization architecture and time synchronization method based on three-level wireless sensor network - Google Patents

Time synchronization architecture and time synchronization method based on three-level wireless sensor network Download PDF

Info

Publication number
CN112040540B
CN112040540B CN202010964076.1A CN202010964076A CN112040540B CN 112040540 B CN112040540 B CN 112040540B CN 202010964076 A CN202010964076 A CN 202010964076A CN 112040540 B CN112040540 B CN 112040540B
Authority
CN
China
Prior art keywords
time synchronization
node
instruction
time
delay
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
CN202010964076.1A
Other languages
Chinese (zh)
Other versions
CN112040540A (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.)
Institute of Electronic Engineering of CAEP
Original Assignee
Institute of Electronic Engineering of CAEP
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 Institute of Electronic Engineering of CAEP filed Critical Institute of Electronic Engineering of CAEP
Priority to CN202010964076.1A priority Critical patent/CN112040540B/en
Publication of CN112040540A publication Critical patent/CN112040540A/en
Application granted granted Critical
Publication of CN112040540B publication Critical patent/CN112040540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention discloses a time synchronization architecture and a time synchronization method based on a three-level wireless sensor network, wherein the time synchronization architecture consists of a reference node, a forwarding node and a collection node; the time synchronization method includes the steps that firstly, a reference node sends a time synchronization instruction, then a forwarding node receives the synchronization time instruction, time delay measurement and frame structure recombination of the time synchronization instruction are carried out, then the time synchronization instruction after a frame is recombined is forwarded, an acquisition node receives the time synchronization instruction, the instruction source is judged, different compensation is carried out on the time synchronization instruction according to different instruction sources, local crystal oscillator clock jitter of the acquisition node is calibrated, and finally high-precision time information is output. The time synchronization architecture disclosed by the invention can meet the requirement of long-distance broadcast time synchronization above kilometer level, has expandability, and the disclosed time synchronization method can realize stable and reliable wireless sensor network time synchronization by using smaller hardware resource overhead.

Description

Time synchronization architecture and time synchronization method based on three-level wireless sensor network
Technical Field
The invention belongs to the field of wireless sensor networks, and particularly relates to a time synchronization framework and a time synchronization method based on a three-level wireless sensor network.
Background
Time synchronization is the basis of technologies such as data transmission node synchronous acquisition and network scheduling in a wireless sensor network. Under the premise that the wireless transmission bandwidth, the node computing capacity and the energy are limited, the realization of the time synchronization technology in the wireless sensor network needs to ensure the lower hardware resource overhead and the design complexity as much as possible. As a key technology in the wireless sensor network technology, the time synchronization technology not only needs to improve the time synchronization precision to meet the requirement of high-precision signal synchronous acquisition, but also needs to reduce the time synchronization overhead, prolong the working time of equipment, and ensure the reliability of system operation.
Clock differences among the acquisition nodes in the wireless sensor network mainly come from inconsistency of crystal oscillators of the acquisition nodes. Different time offsets of the node clock are caused by different power-on times of the acquisition nodes, frequency deviation and frequency drift can be generated due to the influence of a crystal oscillator manufacturing process and the working environment of equipment, and further deviation and drift of the output time of the node clock are generated.
No matter the time difference of different acquisition nodes at the same time is estimated, or the time synchronization is realized by establishing a time model for the crystal oscillators of the acquisition nodes, the process of message interaction among the nodes must face the inaccuracy of message delay. The message delay mainly refers to the transmission delay, the channel access delay, the propagation delay, the receiving delay and the receiving processing delay which respectively pass after the synchronous message is transmitted from the node. The transmission delay refers to the time taken by the node to construct a synchronous message and deliver the message to the physical layer. The channel access delay refers to the time taken for the synchronous message to start to send the message from the detection of whether the channel is idle to the physical layer, and the channel access delay has high randomness and is influenced by the current channel idle degree and the network load condition. Propagation delay refers to the time it takes for a node to propagate in the medium from a sending node to a receiving node. The reception delay refers to the time taken by the physical layer of the receiving node to receive the synchronization packet through the antenna. The processing delay refers to the time for the receiving node to process the message. In addition to the above-mentioned sending delay, channel access delay, and processing delay with large randomness, noise existing in the transmission process often introduces a delay partially conforming to gaussian or exponential distribution in the delay of the synchronization packet.
In order to solve the inaccuracy of time synchronization caused by the above various non-ideal factors, most of the prior art solutions are time synchronization mechanisms based on a receiving-receiving mode.
And broadcasting a reference synchronization message which does not carry any time information to acquisition nodes in the broadcasting range of the reference node by the synchronization mechanism based on the receiving-receiving mode. The node receiving the reference synchronization message sends the absolute local time of receiving the reference synchronization message to another node. At this time, the other node can obtain the time difference value of the reference synchronization packet arriving at different nodes, namely the time difference value of the two nodes, according to the received receiving time and the receiving time recorded by the other node.
The synchronization protocol in the receiving-receiving mode takes the same moment as the starting point when the same reference synchronization message reaches different nodes. And obtaining the time difference between the nodes by exchanging the receiving time between the nodes. Compensating the time difference to realize time synchronization between the nodes, wherein the time difference between the node m and the node n in the receiving-receiving mode is as follows:
Figure BDA0002680300800000021
n is the total number of receiving nodes, T mi And T ni Respectively representing the time values of the reference node sending the synchronous messages to reach the nodes m and n.
Although the synchronization protocol under the synchronization mechanism of the receiving-receiving mode can achieve higher synchronization precision, a large amount of reference synchronization messages and interactive messages between nodes are required. The time synchronization method has high hardware resource overhead and high requirement on the deployment of network nodes. As the number of nodes increases, the complexity of the time synchronization calculation will increase by a factor. If the local absolute time of one node is deviated, the synchronization precision of all nodes of the whole wireless sensor network is affected, so that the stability and the reliability are poor. In special application fields, such as the fields of tunnels and underwater monitoring wireless sensor networks, the time synchronization protocol of the mechanism cannot meet the requirement of long-distance broadcast time synchronization of kilometers or more, so that application occasions are limited, and the expansibility is poor.
Therefore, there is a need for a wireless network time synchronization architecture and a time synchronization method, which can meet the requirement of kilometer-level or higher long-distance broadcast time synchronization, have expandability, and can implement stable and reliable wireless sensor network time synchronization with a simple design method and a small hardware resource overhead.
Disclosure of Invention
In view of the above, the present invention provides a time synchronization architecture and a time synchronization method based on a three-level wireless sensor network, where the architecture can meet the requirement of kilometer-level or above remote broadcast time synchronization, and has expandability, and the method can implement stable and reliable wireless sensor network time synchronization by using a simple design method and a small hardware resource overhead.
In order to achieve the purpose, the invention adopts the following technical scheme: a time synchronization architecture based on a three-level wireless sensor network is characterized by comprising: the system comprises a reference node, a forwarding node and a collection node, wherein the forwarding node is positioned between the reference node and the collection node.
Preferably, the reference node comprises an upper computer, a reference time unit and a reference node core unit, and the network ID number of the reference node is assigned to be 0;
the forwarding node comprises a plurality of forwarding relays, each forwarding relay is allocated with a different ID number except 0, and corresponding instruction sending delay is set, and the sending delay of each forwarding relay is as follows: (ID number-1) x fixed delay TI;
the collection node comprises a plurality of terminals, ID area division is carried out on the terminals according to the position relation between the terminals and the forwarding relays, and the terminals in specific areas receive the forwarding relay forwarding instructions with specific ID numbers.
Preferably, the number of forwarding relays and the number of levels of the forwarding nodes can be expanded according to actual needs.
A time synchronization method based on a three-level wireless sensor network is characterized by comprising the following steps:
step 1: the reference node sends a time synchronization instruction according to the time synchronization period T;
step 2: forwarding a relay receiving time synchronization instruction;
and step 3: the forwarding relay carries out DELAY measurement, the DELAY is recorded as DELAY, and the DELAY is used from the time when the forwarding node receives the time synchronization instruction to the time when the forwarding node finishes processing the time synchronization instruction;
and 4, step 4: the forwarding relays respectively recombine the received time synchronization instruction frame structures and forward the time synchronization instructions after frame recombination at the set sending delay time;
and 5: each terminal of the collection node receives a time synchronization instruction;
step 6: each terminal of the collection node carries out delay compensation;
and 7: each terminal of the acquisition node calibrates a local crystal oscillator clock;
and 8: and the acquisition node outputs high-precision time information.
Preferably, the step 1 further comprises:
step 1.1: and setting a sending protection time gap of the reference node channel, wherein the sending protection time gap refers to a time range from 50ms before sending the time synchronization instruction to 50ms after sending the time synchronization instruction.
Step 1.2: judging whether the reference node channel is in a sending protection time gap, if so, executing the step 1.3, if not, the reference node sends other instructions except the time synchronization instruction, and repeating the step 1.2;
step 1.3: the core unit of the reference node sends time synchronization instructions at intervals of a time synchronization period T, wherein the time synchronization period T =2 N Second, N =1,2,3, \8230;.
Preferably, the step 2 further comprises:
step 2.1: judging whether the forwarding relay receives the instruction, and if so, executing the step 2.2; if the instruction is not received, executing the step 2.1;
step 2.2: and judging whether the received command is a time synchronization command, if so, executing the step 3, otherwise, executing the other commands, and executing the step 2.2.
Preferably, the step 5 further comprises:
step 5.1: judging whether each terminal of the acquisition node receives the instruction, if so, executing the step 5.2, and if not, executing the step 5.1;
and step 5.2: judging whether the instruction received by each terminal of the acquisition node is a time synchronization instruction, if so, executing the step 5.3; if not, executing the other instruction and executing the step 5.2;
step 5.3: judging the source of the time synchronization instruction, and executing the step 5.4 when the time synchronization instruction comes from the forwarding node; when the time synchronization instruction comes from the reference node, judging whether each terminal of the acquisition node works in a mode of only receiving the instruction of the reference node, if so, executing the step 6, otherwise, not responding to the instruction, and repeating the step 5.3;
step 5.4: judging whether each terminal of the acquisition node works in a mode of only receiving a forwarding node instruction, if so, executing the step 5.5, if not, not responding to the instruction, and returning to the step 5.3;
step 5.5: and judging whether the time synchronization instruction ID received by each terminal of the acquisition node is consistent with the area ID of the terminal, if so, executing the step 6, otherwise, not responding to the instruction, and executing the step 5.5.
Preferably, the step 7 further comprises:
step 7.1: after receiving the time synchronization instruction, the acquisition node terminal latches a count value CNT of the local crystal oscillator and starts counting again;
step 7.2: calculating the counting deviation TimDiff of each terminal local crystal oscillator when each time synchronization instruction arrives:
TimDiff=CT-CNT,
wherein, CT is an ideal count value in a time synchronization period T under the ideal condition of the local crystal oscillator;
step 7.3: dividing the time synchronization period T into 2m equal parts to obtain T = T/2 m
Step 7.4: compensating the local time in the next time synchronization period at intervals of t once, wherein the time compensation value corresponding to the nth time compensation is as follows: comp = n [ ((TimDiff/2)) m ) Wherein n is more than or equal to 1 and less than or equal to 2 m
Step 7.5: considering various delay compensations, the calibrated local crystal oscillator time of the terminal is as follows:
time_out=syn_time+n*TimDiff/2 m +delay,
syn _ time is a local crystal oscillator count value, delay is the Delay of a time synchronization instruction received by a collection node terminal, and when the time synchronization instruction comes from a reference node, delay = Delay1; when the time synchronization instruction is from a forwarding relay of a forwarding node, delay = Delay2, wherein Delay1 is the sum of the sending Delay of the reference node, the propagation Delay from the reference node to the acquisition node and the processing Delay of the acquisition node; delay2 is the sum of the reference node transmission Delay, the propagation Delay from the reference node to the forwarding node, the processing Delay of the forwarding node, the transmission Delay of the forwarding node, the propagation Delay from the forwarding node to the collection node and the processing Delay of the collection node.
Preferably, the time synchronization instruction in step 1 includes: frame type, synchronization period and synchronization times; the time synchronization instruction after the frame structure is reassembled in the step 4 includes: frame type, synchronization period, number of synchronizations, DELAY, and ID of forwarding relay.
Preferably, the method for performing corresponding delay compensation by the collection node in step 6 includes: and each terminal of the acquisition node determines the sending delay of the forwarding relay corresponding to the ID number according to the ID number in the received time synchronization instruction frame, and then compensates the sending delay into the corresponding time synchronization instruction.
The invention has the beneficial effects that: the time synchronization framework based on the three-level wireless sensor network can meet the requirement of long-distance broadcast time synchronization of kilometer levels or more, has expandability, and can realize stable and reliable time synchronization of the wireless sensor network by using a simple design method and smaller hardware resource overhead, and the time synchronization framework based on the three-level wireless sensor network specifically comprises the following steps:
1. the time synchronization framework based on the three-level wireless sensor network disclosed by the invention is composed of a plurality of levels of network nodes, each level of node has a respective time synchronization frame structure, and the stability and reliability of the system work are ensured through strict work flow connection of each level of node. Meanwhile, the multistage wireless sensor network has expandability, and can be expanded from multistage network nodes to multistage network nodes so as to provide the coverage capability of long-distance broadcast time synchronization of more than 10 kilometers under a special application scene (a wireless sensor monitoring network without GPS receiving conditions such as a tunnel or underwater and the like).
2. The invention discloses a time synchronization method based on a three-level wireless sensor network, which provides a clock frequency deviation and drift calibration algorithm, wherein the algorithm obtains dynamic deviation by periodically and continuously calculating the time difference between a local non-ideal crystal oscillator counting and measuring time synchronization period and an ideal time service period, and then the deviation is equally compensated into the time information of the next time synchronization period in proportion by subdividing time segments. The calibration compensation algorithm generates microsecond-level high-precision time information in the acquisition node of the wireless sensor network with lower hardware resource expense, can effectively eliminate dynamic time deviation introduced by the crystal oscillator, reduces the requirement on the performance of the crystal oscillator,
3. the time synchronization method based on the three-level wireless sensor network can eliminate various delays of time synchronization instructions in the network transmission and processing process through the delay measurement and compensation technology, and the compensation technology has strong flexibility.
Drawings
FIG. 1 is a flow chart of a time synchronization method based on a three-level wireless sensor network according to the present invention;
FIG. 2 is a time synchronization architecture diagram based on a three-level wireless sensor network according to the present invention;
FIG. 3 is a schematic diagram of a synchronous time instruction frame structure of each node of a multi-level wireless sensor network;
FIG. 4 is a diagram illustrating a transmission guard time gap of a reference node;
fig. 5 is a schematic diagram of delay measurement compensation of a multi-stage wireless sensor network.
Detailed Description
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art, having the benefit of this disclosure, may effect numerous modifications thereto and changes may be made without departing from the scope of the invention in its aspects.
The invention is described in detail below with reference to the figures and the specific embodiments.
The time synchronization architecture based on the three-level wireless sensor network as shown in fig. 2 comprises: in the embodiment shown in fig. 2, the forwarding node is provided with 3 forwarding relays, each forwarding relay corresponds to 3 acquisition node terminals, and in actual use, the number of the forwarding relays and the number of the levels of the forwarding nodes can be expanded according to the distance of actual signal transmission.
The reference node comprises an upper computer, a reference time unit and a reference node core unit (marked as RN in figure 2), and the network ID number of the reference node is allocated to be 0. The reference node core unit can not only receive the instruction of an upper computer to carry out the state query and the node control of the whole wireless link, but also receive the time reference signal of the reference time unit and generate the time synchronization instruction of the whole wireless network.
The forwarding node includes multiple forwarding relays (labeled as TN in fig. 2), each forwarding relay allocates a different ID number except 0, and sets a corresponding instruction transmission delay, where the transmission delay of each forwarding relay is: (the corresponding ID number is-1) multiplied by a fixed delay TI which is set according to the requirement, and the forwarding node is responsible for receiving, processing and forwarding the time synchronization instruction of the reference node and other instructions of the upper computer.
The acquisition node (marked as SN in figure 2) comprises a plurality of terminals, ID area division is carried out on the terminals according to the position relation between the terminals and the forwarding relay, the terminals in a specific area receive the forwarding relay forwarding instruction with a specific ID number, and the acquisition node (marked as SN) is a terminal node of the wireless sensor network; and setting a local crystal oscillator clock jitter calibration program for the acquisition node.
As shown in fig. 2, the time synchronization method based on the three-level wireless sensor network includes the following steps:
step 1: the reference node sends a time synchronization instruction according to the time synchronization period T;
step 1.1: setting a transmission guard time gap of a reference node channel as shown in fig. 4, the transmission guard time gap being T before transmission of a time synchronization command pre To T after transmission post Time range in between, typically T pre =T post =50ms。
Step 1.2: judging whether the reference node channel is in the sending protection time gap, if so, executing the step 1.3, if not, the reference node sends other instructions except the time synchronization instruction, and repeating the step 1.2;
step 1.3: the core unit of the reference node sends time synchronization instructions at intervals of a time synchronization period T, wherein the time synchronization period T =2 N Second, N =1,2,3, \8230;, 8230;.
When the sending protection time gap of the reference node channel is not set, the reference node firstly needs to detect whether the channel is idle when sending a synchronization instruction, if the channel is busy, the synchronization instruction needs to wait for the channel to recover to an idle state, so that uncertain delay is introduced to the reference node, and the synchronization time instruction fails, therefore, the sending protection time gap of the reference node is set in the invention, and the upper computer instruction except the time synchronization instruction is not sent in the time gap in a predetermined manner, namely the channel is in a busy state and does not respond to other sending tasks, as shown in fig. 1, if other sending instruction tasks of the upper computer are received in the time gap, the system caches the instruction, and sends the cached upper computer instruction after waiting for the system to leave the protection time gap.
The time synchronization instruction sent by the reference node comprises: frame type, synchronization period and synchronization times, the synchronization times are used for recording the times of sending out synchronization instructions and used for monitoring synchronization continuity.
Step 2: forwarding a relay receiving time synchronization instruction;
step 2.1: judging whether the forwarding relay receives the instruction, and if so, executing the step 2.2; if the instruction is not received, executing the step 2.1;
step 2.2: and judging whether the received command is a time synchronization command, if so, executing the step 3, otherwise, executing the other commands, and executing the step 2.2.
And step 3: the forwarding relay carries out DELAY measurement, the DELAY is recorded as DELAY, and the DELAY is used from the time when the forwarding node receives the time synchronization instruction to the time when the forwarding node finishes processing the time synchronization instruction;
and 4, step 4: the forwarding relays respectively recombine the received time synchronization instruction frame structures and forward the time synchronization instructions after frame recombination at the set sending delay time; the recombined time synchronization instruction comprises: frame type, synchronization period, number of synchronizations, DELAY, and ID of forwarding relay.
And 5: each terminal of the collection node receives a time synchronization instruction;
step 5.1: judging whether each terminal of the acquisition node receives the instruction, if so, executing the step 5.2, and if not, executing the step 5.1;
step 5.2: judging whether the instruction received by each terminal of the acquisition node is a time synchronization instruction, if so, executing the step 5.3; if not, executing the other instruction and executing the step 5.2;
step 5.3: judging the source of the time synchronization instruction, if the ID is 0, the time synchronization instruction comes from the reference node, and if the ID is not 0, the time synchronization instruction comes from the forwarding node; when the time synchronization instruction comes from the forwarding node, executing step 5.4; when the time synchronization instruction comes from the reference node, judging whether each terminal of the acquisition node works in a mode of only receiving the instruction of the reference node, if so, executing the step 6, otherwise, not responding to the instruction, and repeating the step 5.3;
step 5.4: judging whether each terminal of the acquisition node works in a mode of only receiving a forwarding node instruction, if so, executing the step 5.5, if not, not responding to the instruction, and returning to the step 5.3;
step 5.5: and judging whether the time synchronization instruction ID received by each terminal of the acquisition node is consistent with the area ID of the terminal, if so, executing the step 6, otherwise, not responding to the instruction, and executing the step 5.5.
Step 6: each terminal of the collection node carries out delay compensation; and the acquisition node terminal determines the sending delay of the forwarding relay corresponding to the ID number according to the ID number in the received time synchronization instruction frame, and then compensates the sending delay into the corresponding time synchronization instruction.
And 7: each terminal of the acquisition node calibrates a local crystal oscillator clock;
step 7.1: after receiving the time synchronization instruction, the acquisition node terminal latches a count value CNT of the local crystal oscillator and starts counting again;
step 7.2: calculating the counting deviation TimDiff of each terminal local crystal oscillator when each time synchronization instruction arrives:
TimDiff=CT-CNT,
wherein, CT is an ideal count value within a time synchronization period T under the ideal condition of the local crystal oscillator;
step 7.3: dividing the time synchronization period T into 2m equal parts to obtain T = T/2 m
Step 7.4: compensating the local time in the next time synchronization period at intervals of t, wherein the time compensation value corresponding to the nth time compensation is as follows: comp = n [ (. TimDiff/2) ] m ) Wherein n is more than or equal to 1 and less than or equal to 2 m
And 7.5: considering various delay compensations, the calibrated local crystal oscillator time of the terminal is as follows:
time_out=syn_time+n*TimDiff/2 m +delay,
syn _ time is a local crystal oscillator count value, delay is the Delay of a time synchronization instruction received by a collection node terminal, and when the time synchronization instruction comes from a reference node, delay = Delay1; when the time synchronization instruction comes from a forwarding relay of a forwarding node, delay = Delay2, wherein Delay1 is the sum of the sending Delay of the reference node, the propagation Delay from the reference node to the acquisition node and the processing Delay of the acquisition node; delay2 is the sum of the reference node transmission Delay, the propagation Delay from the reference node to the forwarding node, the processing Delay of the forwarding node, the transmission Delay of the forwarding node, the propagation Delay from the forwarding node to the collection node and the processing Delay of the collection node.
The values of Delayl and Delay2 are measured according to actual tests. In the actual implementation process, if the time synchronization instruction is directly from the reference node to the acquisition node, the time delay received by the time synchronization instruction from the reference node to the acquisition node can be obtained through the edge trigger test of an integrated logic analyzer in the FPGA; if the time synchronization instruction is sent to the relay node by the reference node firstly and then is forwarded to the acquisition node by the relay node, the time delay from the time when the reference node starts to send the instruction to the time when the acquisition node receives the instruction and the time delay from the time when the relay node sends the instruction to the time when the acquisition node receives the instruction can be obtained through the edge trigger test of the integrated logic analyzer in the FPGA.
And 8: and the acquisition node outputs high-precision time information.
The time synchronization method of the multistage wireless sensor network based on clock jitter calibration is simple and easy to implement, has low resource overhead, can meet the requirement of long-distance broadcast time synchronization over kilometer level, and has expandability, stability and reliability.

Claims (3)

1. A time synchronization method based on a three-level wireless sensor network is characterized by comprising the following steps:
step 1: the reference node sends a time synchronization instruction according to a time synchronization period T, and the method comprises the following steps:
step 1.1: setting a sending protection time gap of a reference node channel, wherein the sending protection time gap refers to a time range from 50ms before sending a time synchronization command to 50ms after sending the time synchronization command;
step 1.2: judging whether the reference node channel is in the sending protection time gap, if so, executing the step 1.3, if not, the reference node sends other instructions except the time synchronization instruction, and repeating the step 1.2;
step 1.3: the core unit of the reference node sends time synchronization instructions at intervals of a time synchronization period T, wherein the time synchronization period T =2 N Second, N =1,2,3, \8230;
step 2: forwarding a relay receiving time synchronization instruction;
step 2.1: judging whether the forwarding relay receives the instruction, and if so, executing the step 2.2; if no instruction is received, executing the step 2.1;
step 2.2: judging whether the received command is a time synchronization command, if so, executing the step 3, otherwise, executing the other commands, and executing the step 2.2;
and step 3: the forwarding relay carries out DELAY measurement, the DELAY is recorded as DELAY, and the DELAY is the time from when the forwarding node receives the time synchronization instruction to when the forwarding node finishes processing the time synchronization instruction;
and 4, step 4: the forwarding relays respectively recombine the received time synchronization instruction frame structures and forward the time synchronization instructions after frame recombination at the set sending delay time;
and 5: each terminal of the collection node receives a time synchronization instruction;
step 5.1: judging whether each terminal of the acquisition node receives the instruction, if so, executing the step 5.2, and if not, executing the step 5.1;
step 5.2: judging whether the instruction received by each terminal of the acquisition node is a time synchronization instruction, if so, executing the step 5.3; if not, executing the other instruction and executing the step 5.2;
step 5.3: judging the source of the time synchronization instruction, and executing the step 5.4 when the time synchronization instruction comes from the forwarding node; when the time synchronization instruction comes from the reference node, judging whether each terminal of the acquisition node works in a mode of only receiving the instruction of the reference node, if so, executing the step 6, otherwise, not responding to the instruction, and repeating the step 5.3;
step 5.4: judging whether each terminal of the acquisition node works in a mode of only receiving a forwarding node instruction, if so, executing the step 5.5, if not, not responding to the instruction, and returning to the step 5.3;
and step 5.5: judging whether the time synchronization instruction ID received by each terminal of the acquisition node is consistent with the area ID where the time synchronization instruction ID is located, if so, executing the step 6, otherwise, not responding to the instruction, and executing the step 5.5;
step 6: each terminal of the collection node carries out delay compensation;
and 7: each terminal of the acquisition node calibrates a local crystal oscillator clock;
step 7.1: after the acquisition node terminal receives the time synchronization instruction, a count value CNT of the local crystal oscillator is latched and counting is started again;
and 7.2: calculating the counting deviation TimDiff of each terminal local crystal oscillator when each time synchronization instruction arrives:
TimDiff=CT-CNT,
wherein, CT is an ideal count value in a time synchronization period T under the ideal condition of the local crystal oscillator;
step 7.3: dividing the time synchronization period T into 2 m Aliquot, resulting in T = T/2 m
Step 7.4: compensating the local time in the next time synchronization period at intervals of t, wherein the time compensation value corresponding to the nth time compensation is as follows: comp = n [ ((TimDiff/2)) m ) Wherein n is more than or equal to 1 and less than or equal to 2 m
Step 7.5: considering various delay compensations, the calibrated local crystal oscillator time of the terminal is as follows:
time_out=syn_time+n*TimDiff/2 m +delay,
syn _ time is a local crystal oscillator count value, delay is the Delay of a time synchronization instruction received by a collection node terminal, and when the time synchronization instruction comes from a reference node, delay = Delay1; when the time synchronization instruction is from a forwarding relay of a forwarding node, delay = Delay2, wherein Delay1 is the sum of the sending Delay of the reference node, the propagation Delay from the reference node to the acquisition node and the processing Delay of the acquisition node; delay2 is the sum of the reference node sending Delay, the reference node to forwarding node propagation Delay, the forwarding node processing Delay, the forwarding node sending Delay, the forwarding node to acquisition node propagation Delay and the acquisition node processing Delay; and 8: and the acquisition node outputs high-precision time information.
2. The time synchronization method based on the three-level wireless sensor network according to claim 1, wherein the time synchronization instruction in step 1 comprises: frame type, synchronization period and synchronization times; the time synchronization instruction after the frame structure reorganization in the step 4 includes: frame type, synchronization period, number of synchronizations, DELAY, and ID of forwarding relay.
3. The time synchronization method based on the three-level wireless sensor network according to claim 1, wherein the method for performing corresponding delay compensation at the collection node terminal in step 6 comprises: and the acquisition node terminal determines the sending delay of the forwarding relay corresponding to the ID number according to the ID number in the received time synchronization instruction frame, and then compensates the sending delay into the corresponding time synchronization instruction.
CN202010964076.1A 2020-09-14 2020-09-14 Time synchronization architecture and time synchronization method based on three-level wireless sensor network Active CN112040540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010964076.1A CN112040540B (en) 2020-09-14 2020-09-14 Time synchronization architecture and time synchronization method based on three-level wireless sensor network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010964076.1A CN112040540B (en) 2020-09-14 2020-09-14 Time synchronization architecture and time synchronization method based on three-level wireless sensor network

Publications (2)

Publication Number Publication Date
CN112040540A CN112040540A (en) 2020-12-04
CN112040540B true CN112040540B (en) 2023-02-03

Family

ID=73589269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010964076.1A Active CN112040540B (en) 2020-09-14 2020-09-14 Time synchronization architecture and time synchronization method based on three-level wireless sensor network

Country Status (1)

Country Link
CN (1) CN112040540B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113916052B (en) * 2021-08-30 2023-08-29 北京宇航系统工程研究所 Ground wireless monitoring method for carrier rocket

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087219A (en) * 2006-06-09 2007-12-12 中国科学院软件研究所 Wireless sensor network time synchronization method and device based on error statistics
EP2522194A1 (en) * 2010-01-06 2012-11-14 InterDigital Patent Holdings, Inc. Method and apparatus for assisted/coordinated intra-home communications
CN103596222A (en) * 2013-11-29 2014-02-19 河海大学常州校区 Wireless sensor network data acquisition method based on predictable mobile Sink position
CN106604387A (en) * 2016-12-14 2017-04-26 华南理工大学 Wireless sensor time synchronization method based on game theory
CN109460011A (en) * 2018-12-25 2019-03-12 欧瑞传动电气股份有限公司 For the comprehensive performance test device and method of bus type kinetic control system
CN111555835A (en) * 2020-05-07 2020-08-18 广西大学 Time synchronization method, system and medium for medical Internet of things

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9226252B2 (en) * 2013-06-03 2015-12-29 King Fahd University Of Petroleum And Minerals Recursive time synchronization protocol method for wireless sensor networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087219A (en) * 2006-06-09 2007-12-12 中国科学院软件研究所 Wireless sensor network time synchronization method and device based on error statistics
EP2522194A1 (en) * 2010-01-06 2012-11-14 InterDigital Patent Holdings, Inc. Method and apparatus for assisted/coordinated intra-home communications
CN103596222A (en) * 2013-11-29 2014-02-19 河海大学常州校区 Wireless sensor network data acquisition method based on predictable mobile Sink position
CN106604387A (en) * 2016-12-14 2017-04-26 华南理工大学 Wireless sensor time synchronization method based on game theory
CN109460011A (en) * 2018-12-25 2019-03-12 欧瑞传动电气股份有限公司 For the comprehensive performance test device and method of bus type kinetic control system
CN111555835A (en) * 2020-05-07 2020-08-18 广西大学 Time synchronization method, system and medium for medical Internet of things

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种无线传感器网络分布式连续数据采集系统的同步方法;王洋等;《东南大学学报(自然科学版)》;20110120(第01期);全文 *
无线传感器网络中同步补偿机制的研究与应用;陈乔等;《计算机应用》;20100401(第04期);全文 *

Also Published As

Publication number Publication date
CN112040540A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
Noh et al. A new approach for time synchronization in wireless sensor networks: Pairwise broadcast synchronization
CN103814338A (en) Systems and methods of network synchronization
Kerö et al. Performance and reliability aspects of clock synchronization techniques for industrial automation
Pinho et al. A robust gradient clock synchronization algorithm for wireless sensor networks
Shi et al. Novel maximum likelihood estimation of clock skew in one-way broadcast time synchronization
CN112040540B (en) Time synchronization architecture and time synchronization method based on three-level wireless sensor network
Sarvghadi et al. Overview of time synchronization protocols in wireless sensor networks
Freris et al. A model-based approach to clock synchronization
Noh et al. Pairwise broadcast clock synchronization for wireless sensor networks
US8861552B2 (en) Fault-tolerant self-stabilizing distributed clock synchronization protocol for arbitrary digraphs
Phan et al. Enabling rapid time synchronization with slow-flooding in wireless sensor networks
KR100686241B1 (en) Time synchronization method for wireless sensor networks
CN114389735A (en) Clock synchronization method based on IEEE802.1AS redundant master clock
Wang et al. A survey of time synchronization algorithms for wireless sensor networks
Dong et al. Research on fault-tolerant strategy of time synchronization for industrial wireless sensor network
Wang et al. Skew estimation based on weighted median for average consensus time synchronization in the presence of communication delays
Ishikawa et al. Time synchronization of a wired sensor network for structural health monitoring
Peng et al. On the clock offset estimation in an improved IEEE 1588 synchronization scheme
Xu et al. An improved flooding time synchronization protocol for industrial wireless networks
CN116941197A (en) Robust time allocation and synchronization in computer and radio access networks
Li et al. A high-accuracy clock synchronization method in distributed real-time system
Hu et al. A novel energy-balanced time synchronization protocol in wireless sensor networks for bridge structure health monitoring
Brown III et al. Non-hierarchical clock synchronization for wireless sensor networks
KR100999903B1 (en) Time Synchronizing Method in Wireless Sensor Networks
Qi et al. A clock synchronization method for ad hoc networks

Legal Events

Date Code Title Description
PB01 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