无线传感器网络时钟同步技术

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

外同步与内同步
参考源不同,前者参考源为网络外部,如GPS。后 者参考源为网络内部某个节点的时钟
局部同步与全网同步
同步对象的范围不同
时间同步技术的应用场合
多传感器数据压缩与融合
邻近传感节点对相同事件的感知数据需要融合,基于时间戳 判断是否同一事件,需要时钟同步
低功耗MAC协议、路由协议
不精确的原因
Nodes are switched on at random times, phases θi hence can be random随机打开的节点的相位也是随机的 Actual oscillators have random deviations from nominal frequency (drift, skew)实际的振荡器与标准的频率之间有一定 的随机偏差
Node i’s register value at real time t is Hi(t)
• Convention: small letters (like t, t’) denote real physical times, capital letters denote timestamps or anything else visible to nodes
Absolute vs. relative time Hardware vs. software-based mechanisms
A GPS receiver would be a hardware solution, but often too heavyweight/costly/energy-consuming in WSN nodes, and in addition a lineof-sight to at least four satellites is required
Oscillator frequency depends on time (oscillator aging) and environment (temperature, pressure, supply voltage, ...)振荡 器的频率会随着使用期限、温度等因素而出现偏差
Especially the time-dependent drift rates call for frequent resynchronization, as one-time synchronization is not sufficient However, stability over tens of minutes is often a reasonable assumption
同步精确性
外部同步
与外部的时间表(如UTC )同步 Nodes i=1, ..., n are accurate at time t within bound d when |Li(t) – t|<d for all i
• 因此,至少有一个节点具有外部的时间表
ຫໍສະໝຸດ Baidu内部同步
无外部的时间表, 所有节点具有公共时间表 Nodes i=1, ..., n agree on time within bound d when |Li(t) – Lj(t)|<d for all i,j
Should backward jumps of local clocks be avoided? (Users of make say yes here ....) Avoid sudden jumps?
时间同步算法的性能和功能模块
Metrics: 性能度量
Precision: maximum synchronization error for deterministic algorithms, error mean / stddev / quantiles for stochastic ones Energy costs, e.g. # of exchanged packets, computational costs Memory requirements Fault tolerance: what happens when nodes die?
速率恒定模型
该模型认为频率保持恒定不变,最常用,但不适应环境变化剧烈的场 合
飘移有界模型
常用于确定同步误差上下界,频率稳定度常用ppm(百万分之一)
飘移变化有界模型
时钟的漂移变化率是有限的。
软件时钟模型
软件虚拟时钟 一般是个分段连续、严格单调的函
时间同步的不同目的
第一种是最简单的一种,要求也最低,它只需 要保证节点之间事件发生的相对顺序,这样就 不需要节点具有相等的本地时间; 第二种时钟同步问题是保证节点之间的相对时 钟,在需要的时候,节点的本地时间可以与其 他节点的本地时间相互转换,目前大多数时钟 同步算法 , 都是针对该种同步问题; 第三种即最高要求的同步就是全网同步,全网 所有节点随时都要与网络中的一个参考时钟同 步,这就需要在网络中传播公共的时间标记。
节点上的时钟
hardware clock
振荡器以固定频率产生脉冲 每隔一定脉冲后计数寄存器增加1
• Only register content is available to software • Register change rate gives achievable time resolution
Deviations are specified in ppm (pulses per million), the ppm value counts the additional pulses or lost pulses over the time of one million pulses at nominal rate The cheaper the oscillators, the larger the average deviation
硬件时钟模型
基本名词
时间、晶振、时钟(RTC) 时钟偏移(clock offset):是指两个时钟瞬时读数的差。晶振计时的 时刻与实际时刻的差值,反映计时的准确性 Clock Skew:是指两个时钟的频率差。它可以看作是Clock offset的 一阶导数。 时间漂移(Clock Drift):是指时钟频率的变化,反映晶振的稳定性。 实际晶振的频率有可能随着外界环境温度、湿度的变化而有所改变。 Clock Drift可以看作是Clock offset的二阶导数。
时间同步算法
Physical time vs. logical time External vs. internal synchronization Global vs. local algorithms
Keep all nodes of a WSN synchronized or only a local neighbourhood?
Fundamental building blocks of time synchronization algorithms:
Resynchronization event detection block: when to trigger a time synchronization round? Periodically? After external event? Remote clock estimation block: figuring out the other nodes clocks with the help of exchanging packets Clock correction block: compute adjustments for own local clock based on estimated clocks of other nodes Synchronization mesh setup block: figure out which node synchronizes with which other nodes
不发送数据时,节点处于休眠状态,网络节点的同步休眠需 要时钟同步
测距、定位(位置相关报务,LBS)
距离测量和定位是基于无线电信号的传输时间,时间同步越 准确,距离测量也越准确
分布式系统的传统要求
分布式系统的数据库查询,状态等一致性的要求
协作传输、处理的要求
协作传输是基于电磁波的能量累加效应,多个节点以相同的 调制解调方式同时发送信号,使得远处的汇集节点能接收到 信号
A-priori vs. a-posteriori synchronization
Is time synchronization achieved before or after an interesting event?
Post-facto synchronization
Deterministic vs. stochastic precision bounds Local clock update discipline
同步协议需要解决的问题
同步精度 功耗 可扩展性
时间同步技术的分类
排序、相对同步与绝对同步
递进关系
• • • • 排序只能区分事件发生的先后 相对同步:维持本地时钟的运行,定期获取其他节点的时钟偏 移和飘移,经过换算达到同步的目的。如RBS协议 绝对同步:本地时钟和参考时钟保持一致,修改本地时钟。如 TPSN协议
基于多信道的MAC层技术
时间同步
由于物理上的分散性,网络无法为彼此间相互独立的节点提供一 个统一的全局时钟,每个节点各自维护它们的本地时钟。 由于这些本地时钟的计时速率、运行环境存在不一致性,因此即 使所有的本地时钟在某一时刻都被校准,一段时间后,这些本地 时钟间也会出现失步。为了让这些本地时钟再次达到相同的时间 值,必须进行时间同步操作。 时间同步就是通过对本地时钟的某些操作,达到为分布式系统提 供一个统一时间标度的过程。 传感器网络自身协议的运行及基于其上的应用,如标记数据采集 时间、时分多址接入、协同休眠、定位、数据融合等都需要网络 中节点的时钟保持同步。 时间同步算法设计必须考虑到两方面的因素:
A (node-local) software clock is usually derived as follows:
Li(t) = qi Hi(t) + fi (没有考虑计数寄存器的益处) qi is the (drift) rate, fi the phase shift 时间同步就是要修正 qi 和 fi, 而不是计数寄存器
无线传感器网络时钟同步技术
Time Synchronization in Wireless Sensor Network System 张书钦
zsqheu@yahoo.com.cn
Zhongyuan University of Technology
提 纲
一 二 三 四 概述
MAC层避免信道冲突技术 MAC层协议分类
• For sensor nodes values between 1 ppm (one second every 11 days) and 100 ppm (one second every 2.8 hours) are assumed, Berkeley motes have an average drift of 40 ppm
传统同步:NTP与GPS
NTP
NTP不适合于WSN 体积、计算能力和存储空间存在限制
GPS
每颗卫星上配备有高精度的铷、铯原子钟,并不断发射其时间信息 地面接收装置同时接收4颗卫星的时间信息,采用伪距测量定位方法 可计算出时间和位置信息 缺点(室内、功耗、安全性、分布式)
1) 减少时间同步自身带来的能量消耗; 2)提供较高时间同步精度以有效减少其它关键技术带来的能量消耗。
WSN时间同步技术背景
集中式系统与分布式系统
集中式:事件间有着明确的时间先后关系,不存在 同步问题 分布式:同步是必需的,只是对同步的要求程度不 同
无线传感器网络时间同步
典型的分布式系统 是无线传感器网络应用的基础
相关文档
最新文档