CN104039006A - Clock synchronization method for wireless sensor network - Google Patents
Clock synchronization method for wireless sensor network Download PDFInfo
- Publication number
- CN104039006A CN104039006A CN201410240816.1A CN201410240816A CN104039006A CN 104039006 A CN104039006 A CN 104039006A CN 201410240816 A CN201410240816 A CN 201410240816A CN 104039006 A CN104039006 A CN 104039006A
- Authority
- CN
- China
- Prior art keywords
- node
- time
- sigma
- reception
- clock
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000001360 synchronised effect Effects 0.000 claims abstract description 9
- 230000005540 biological transmission Effects 0.000 claims description 4
- 238000004891 communication Methods 0.000 claims description 3
- 238000013508 migration Methods 0.000 claims 1
- 230000005012 migration Effects 0.000 claims 1
- 230000001934 delay Effects 0.000 abstract 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种无线传感器网络的时钟同步方法,属于计算机通讯技术领域。The invention relates to a clock synchronization method of a wireless sensor network, which belongs to the technical field of computer communication.
背景技术Background technique
无线传感器网络中时钟同步技术的研究已成为目前业界的热点。在无线传感器网络中,要依赖所有的传感器节点协作来完成系统的功能,例如节点定位、数据融合、TDMA调度、协同睡眠等,其中都以节点精确地时钟同步为基础。对传统网络来说,时钟同步技术得到了广泛的应用,例如时间同步协议NTP和GPS。但是无线传感器网络不同于传统网络,由于复杂度、功耗、成本、尺寸和其它因素的影响,时间同步协议NTP和GPS不能用于无线传感器网络中,要根据无线传感器网络的特点,设计专用于无线传感器网络的时钟同步协议。The research on clock synchronization technology in wireless sensor networks has become a hot spot in the industry. In a wireless sensor network, it depends on the cooperation of all sensor nodes to complete system functions, such as node positioning, data fusion, TDMA scheduling, cooperative sleep, etc., all of which are based on accurate clock synchronization of nodes. For traditional networks, clock synchronization technologies are widely used, such as time synchronization protocols NTP and GPS. However, wireless sensor networks are different from traditional networks. Due to the influence of complexity, power consumption, cost, size and other factors, the time synchronization protocols NTP and GPS cannot be used in wireless sensor networks. A clock synchronization protocol for wireless sensor networks.
现有的无线传感器网络中的时钟同步方法,主要可划分为三大类别:1、基于接收者—接收者的同步方法,其具有代表的方法是RBS(Reference BroadcastSynchronization)方法;2、基于发送者—接收者的双向同步方法,其具有代表性的方法是Ganeriwal等人提出的TPSN(Timing-Sync Protocol for Sensor Networks)方法和M.L.Sichitiu等人提出的TINY-SYNC/MINI-SYNC方法;3、基于发送者—接收者的单向同步方法,其具有代表性的是FTSP(Flooding TimeSynchronization Protocol)。目前的同步方法大多是对以上几种方法的改进,而衡量改进后的时钟同步方法优劣的主要指标是时钟同步精度和网络的能量消耗。然而,在无线传感器网络中,导致时间同步存在误差的两个主要来源是信息传输延迟和晶体振荡器频率的不稳定。而本发明能够很好地解决上面的问题。The existing clock synchronization methods in wireless sensor networks can be mainly divided into three categories: 1. The receiver-receiver-based synchronization method, the representative method of which is the RBS (Reference Broadcast Synchronization) method; 2. The sender-based synchronization method —The two-way synchronization method of the receiver, its representative method is the TPSN (Timing-Sync Protocol for Sensor Networks) method proposed by Ganeriwal et al. and the TINY-SYNC/MINI-SYNC method proposed by M.L.Sichitiu et al.; 3. Based on A sender-receiver one-way synchronization method is typically FTSP (Flooding Time Synchronization Protocol). Most of the current synchronization methods are improvements to the above methods, and the main indicators to measure the advantages and disadvantages of the improved clock synchronization methods are the clock synchronization accuracy and the energy consumption of the network. However, in wireless sensor networks, the two main sources of error in time synchronization are information transmission delay and instability of crystal oscillator frequency. And the present invention can well solve the above problems.
发明内容Contents of the invention
本发明目的在于针对传统时间同步算法的信息传输延迟不确定所来的问题,提出了一种无线传感器网络的时钟同步方法,该方法能够提高时钟同步的精度。The purpose of the present invention is to propose a clock synchronization method for wireless sensor networks aiming at the problem of uncertain information transmission delay in traditional time synchronization algorithms, which can improve the accuracy of clock synchronization.
本发明解决其技术问题所采取的技术方案是:本发明提供了一种无线传感器网络的时钟同步方法(简称,TPSN-B),该方法分为层次发现过程和同步过程,包括如下步骤:The technical scheme that the present invention solves its technical problem is: the present invention provides a kind of clock synchronization method (abbreviation, TPSN-B) of wireless sensor network, and this method is divided into hierarchical discovery process and synchronous process, comprises the following steps:
步骤1:层次发现过程;Step 1: Hierarchy discovery process;
把具有层次的网络结构看成生成树,假设树的根节点担任时钟源节点,设其层次号为0。根节点广播一个信息包,包含根节点的ID以及层次号,一旦通信范围内的节点收到信息包,将自己的层次级别设置为信息包中层次号加1。接着,这些节点广播新的包含自己的ID和层次号的信息包,接收到的节点以同样的方式设置自己的层次号,以此类推下去,直到整个网络中的节点都建立自己的层级级别。已有层次号的节点再次接收到广播的信息包时,做忽略处理。The hierarchical network structure is regarded as a spanning tree, assuming that the root node of the tree is the clock source node, and its hierarchical number is set to 0. The root node broadcasts an information packet, which contains the ID of the root node and the layer number. Once the nodes within the communication range receive the information packet, they set their own layer level to the layer number in the information packet plus 1. Then, these nodes broadcast new information packets containing their own IDs and hierarchy numbers, and the received nodes set their own hierarchy numbers in the same way, and so on, until the nodes in the entire network have established their own hierarchy levels. When a node that already has a layer number receives the broadcast information packet again, it ignores it.
步骤2:同步过程;Step 2: Synchronization process;
从根结点开始,相邻层次的两个节点之间交换包含时间戳的信息包,并且在接收节点处对接收时间进行贝叶斯估计,得到更加准确的接收时间,完成相邻层次的两个节点之间的同步。Starting from the root node, two nodes at adjacent levels exchange information packets containing time stamps, and Bayesian estimation is performed on the receiving time at the receiving node to obtain a more accurate receiving time and complete the two nodes at adjacent levels. synchronization between nodes.
步骤3:重复上述步骤2,直到网络中所有节点完成时钟同步过程。Step 3: Repeat the above step 2 until all nodes in the network complete the clock synchronization process.
本发明所述方法步骤2的同步过程包括如下步骤:The synchronous process of method step 2 of the present invention comprises the following steps:
1)假设节点R和S的层次号分别为第k层和k+1层,同步时,上层节点R广播一个时间同步请求信息包,通知S节点做好时间同步的准备。1) Assuming that the layer numbers of nodes R and S are respectively kth layer and k+1 layer, when synchronizing, the upper layer node R broadcasts a time synchronization request packet to notify S node to prepare for time synchronization.
2)节点S经过一段随机时间的等待后,在T1时刻向节点R发送含有时刻T1的同步信息包。2) Node S sends a synchronization packet containing time T 1 to node R at time T 1 after waiting for a random period of time.
3)节点R接收到信息包后,使用本地时钟来记录接收时间T2,且对接收时间T2行贝叶斯估计,得到更加准确的接收时间T2': 3) After node R receives the information packet, it uses the local clock to record the receiving time T 2 , and performs Bayesian estimation on the receiving time T 2 to obtain a more accurate receiving time T 2 ':
4)然后节点R以同样的方式在时刻T3向节点S发送一个确认消息,该消息中包含(T1、T2、T3)。4) Then node R sends a confirmation message to node S at time T 3 in the same way, the message contains (T 1 , T 2 , T 3 ).
5)节点S在T4时刻用本地时间记录下接收消息的时间T4,并对T4进行贝叶斯估计,得到更加准确的接收时间T4', 5) Node S records the time T 4 of receiving the message with local time at T 4 , and performs Bayesian estimation on T 4 to obtain a more accurate receiving time T 4 ',
6)计算出新的时间偏移Δ': 6) Calculate the new time offset Δ':
本发明所述节点根据Δ来调整自己的本地时钟。The node in the present invention adjusts its own local clock according to Δ.
有益效果:Beneficial effect:
1、本发明很好地解决了同步过程中交换的信息包传输延迟的不确定性问题。1. The present invention well solves the problem of uncertainty in transmission delay of information packets exchanged during the synchronization process.
2、本发明能够更好地提高时钟同步的精度。2. The present invention can better improve the precision of clock synchronization.
附图说明Description of drawings
图1为本发明的节点层次形成过程示意图。FIG. 1 is a schematic diagram of the process of forming a node hierarchy in the present invention.
图2为本发明中相邻层次节点的同步过程示意图。Fig. 2 is a schematic diagram of the synchronization process of adjacent layer nodes in the present invention.
图3为本发明的方法流程图。Fig. 3 is a flow chart of the method of the present invention.
具体实施方式Detailed ways
以下结合说明书附图对本发明创造作进一步的详细说明。The invention will be described in further detail below in conjunction with the accompanying drawings.
如图1、图2和图3所示,本发明提供一种无线传感器网络的时钟同步方法,该方法包括如下步骤:As shown in Fig. 1, Fig. 2 and Fig. 3, the present invention provides a kind of clock synchronization method of wireless sensor network, and this method comprises the following steps:
1)根据本发明上述的层次发现过程,形成节点之间的层次关系,设根结点为层次0,共有K个层次,传感器网络中的所有节点都与根节点(层次0)的时钟同步。1) According to the above-mentioned layer discovery process of the present invention, form the layer relation between nodes, set root node as layer 0, have K layers altogether, all nodes in the sensor network are all synchronized with the clock of root node (layer 0).
2)假设节点R和S的层次号分别为第k层和k+1层,同步时,上层节点R广播一个时间同步请求信息包,通知S节点做好时间同步的准备。2) Assuming that the layer numbers of nodes R and S are respectively kth layer and k+1 layer, when synchronizing, the upper layer node R broadcasts a time synchronization request packet to notify S node to prepare for time synchronization.
3)节点S经过一段随机时间的等待后,在T1时刻向节点R发送同步请求信息,信息包含发送时间T1和T1的标准差σ1。3) Node S sends a synchronization request message to node R at time T 1 after waiting for a random period of time, and the message includes sending time T 1 and standard deviation σ 1 of T 1 .
4)节点R用本地时间记录下收到S发的信息包的时间为T2,而通过贝叶斯估计得到的时间值为T2'。因为TPSN利用消息传递得到的节点时钟值的误差是一个正态分布,即可以从接收到的时间值中计算出σ2的值。根据发送时间T1、接收时间T2、方差和可以得到更加准确的估计的接收时间T2'及其方差 4) The node R uses local time to record the time of receiving the information packet sent by S as T 2 , and the time value obtained through Bayesian estimation is T 2 '. Because the error of the node clock value obtained by TPSN through message passing is a normal distribution, that is The value of σ2 can be calculated from the received time values. According to sending time T 1 , receiving time T 2 , variance and A more accurate estimate of the received time T 2 ' and its variance can be obtained
5)然后节点R以同样的方式在时刻T3向节点S发送一个确认消息,该消息中包含(T1、T2'、T3、σ3)。5) Then node R sends a confirmation message to node S at time T 3 in the same way, the message contains (T 1 , T 2 ′, T 3 , σ 3 ).
6)在T4时刻节点S接收到节点R的确认信息包,采用同样的方法,根据贝叶斯估计得到新的接收时间T4'及其方差 6) Node S receives the acknowledgment packet from node R at time T4 , and uses the same method to obtain the new receiving time T4 ' and its variance according to Bayesian estimation
此时,节点S得到一组时间戳(T1、T2'、T3、T4')。计算对应的新的时间偏移Δ'并根据Δ'调整本地时钟:At this point, node S obtains a set of time stamps (T 1 , T 2 ′, T 3 , T 4 ′). Calculate the corresponding new time offset Δ' and adjust the local clock according to Δ':
7)重复上述步骤直到第K层上的所有节点也完成了同步过程。7) Repeat the above steps until all nodes on the Kth layer have also completed the synchronization process.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410240816.1A CN104039006A (en) | 2014-05-30 | 2014-05-30 | Clock synchronization method for wireless sensor network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410240816.1A CN104039006A (en) | 2014-05-30 | 2014-05-30 | Clock synchronization method for wireless sensor network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104039006A true CN104039006A (en) | 2014-09-10 |
Family
ID=51469552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410240816.1A Pending CN104039006A (en) | 2014-05-30 | 2014-05-30 | Clock synchronization method for wireless sensor network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104039006A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106686715A (en) * | 2015-11-10 | 2017-05-17 | 沈阳中科奥维科技股份有限公司 | Maintenance method of time synchronizing time source of TDMA based wireless sensor network |
CN108243396A (en) * | 2016-12-27 | 2018-07-03 | 普天信息技术有限公司 | A time synchronization processing method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909036A (en) * | 2010-08-13 | 2010-12-08 | 北京交通大学 | Improved cross-correlation timing synchronization method of orthogonal frequency division multiplexing |
CN103124212A (en) * | 2011-11-18 | 2013-05-29 | 中国科学院沈阳计算技术研究所有限公司 | Numerical control system field bus time synchronization method and device based on Bayes principle |
-
2014
- 2014-05-30 CN CN201410240816.1A patent/CN104039006A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909036A (en) * | 2010-08-13 | 2010-12-08 | 北京交通大学 | Improved cross-correlation timing synchronization method of orthogonal frequency division multiplexing |
CN103124212A (en) * | 2011-11-18 | 2013-05-29 | 中国科学院沈阳计算技术研究所有限公司 | Numerical control system field bus time synchronization method and device based on Bayes principle |
Non-Patent Citations (4)
Title |
---|
FUQIANG WANG 等: "The Design and Realization of High-precision Time Synchronization Protocol in Wireless Sensor Networks based on FTSP", 《PROCEEDINGS OF THE 8TH WORLD CONGRESS ON INTELLIGENT CONTROL AND AUTOMATION》 * |
TIAN XIAN-ZHONG 等: "Research on Time Synchronization for Wireless Sensor Networks based on Bayesian Estimation", 《2010 ASIA-PACIFIC CONFERENCE ON WEARABLE COMPUTING SYSTEMS》 * |
夏小凤 等: "无线传感器网络TPSN 的优化算法", 《计算机测量与控制》 * |
江禹生等: "无线传感器网络双向成对时间同步优化方法", 《计算机工程》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106686715A (en) * | 2015-11-10 | 2017-05-17 | 沈阳中科奥维科技股份有限公司 | Maintenance method of time synchronizing time source of TDMA based wireless sensor network |
CN108243396A (en) * | 2016-12-27 | 2018-07-03 | 普天信息技术有限公司 | A time synchronization processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104507156B (en) | For the time synchronization improved method based on IEEE 1588PTP mechanism of wireless network | |
CN101335587B (en) | Accurate time synchronization method for industrial wireless network | |
CN104968043B (en) | A kind of clock synchronizing frequency deviation estimating method suitable for WIA-PA network | |
CN105680975B (en) | A kind of method for synchronizing time of host-guest architecture multinode network | |
CN103812592B (en) | Time Synchronization Protocol System and Synchronization Method Based on Chained Industrial Ethernet | |
CN101951312B (en) | E1 link-based bidirectional time-frequency synchronous transmission method and master-slave device | |
CN103929293B (en) | Asymmetric delay time synchronization method and system | |
CN106452650B (en) | A Clock Synchronization Frequency Offset Estimation Method for Multi-hop Wireless Sensor Networks | |
CN100588147C (en) | Low-overhead high-precision time synchronization method for wireless mesh network for industrial monitoring | |
CN104158647A (en) | Clock synchronizing method for wireless sensing network | |
CN104053223A (en) | A Time Synchronization Method for Low-power Wireless Sensor Networks | |
CN102752843B (en) | A kind of method for synchronizing time | |
CN104601269B (en) | Master-salve clock synchronous method and system | |
CN104519563A (en) | Hierarchical wireless sensor network time synchronization method | |
CN101425887A (en) | Time synchronization method used for wireless sensor network | |
CN111556559B (en) | Hybrid clock synchronization method based on timestamp-free interaction and one-way message propagation | |
CN102315929A (en) | Timing synchronization controller of ground simulation system | |
CN104079401B (en) | A kind of short-period real-time communication system of high accuracy based on chain EPA network | |
CN103178917A (en) | A clock synchronization method, system and information collection node for cooperative communication | |
CN110121208A (en) | Intersection based on more base station locations mutually tests clock synchronizing method and system | |
CN107197514B (en) | Cognitive global clock synchronization method of wireless sensor network and method applied to multi-hop network | |
CN104039006A (en) | Clock synchronization method for wireless sensor network | |
CN104836654A (en) | Clock synchronizing method based on Ethernet POWERLINK | |
CN105245305A (en) | A Lightweight Secure Synchronization Method in Smart Sensor Networks | |
CN106162856A (en) | A kind of node synchronization method in wireless Ad Hoc network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into 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: 20140910 |