安全关键性分布式系统时钟同步机制及算法研究

VIP免费
3.0 侯斌 2024-11-19 4 4 2.57MB 66 页 15积分
侵权投诉
嵌入式系统在经济和技术方面取得的巨大成功,导致许多应用的计算机系统
部署日趋增多,甚至在计算机失效可能导致严重后果的领域也是如此。FlexRay 线
控转向系统是安全关键性分布式系统,对通信网络要求很高,既要满足常规的控
制要求,又要具有超高可靠性和强实时性。时钟同步作为分布式系统的核心机制
之一,FlexRay 网络的实时性方面扮演重要角色,有关它的研究已经成为安全关
键性分布式系统研究的一个重要组成部分。
本文首先分析了 FlexRay 总线协议及其与时钟同步相关的同步帧、时间层次、
通信循环等概念,然后深入研究了 FlexRay 钟同步过程中在节点间实现本地时间
交换、偏差值计算、收敛函数、相位校正和速率校正的方法。
为了提高时钟同步精度,本文研究了影响分布式时钟同步精度的各种因素,
深入分析了时钟同步过程中的传输延时不确定性和时钟漂移,结合 FlexRay 时钟同
步机制,提出了传输延时测量法和新的速率偏差计算方法。传输延时测量法通过
在节点间互发同步报文,由本地节点获取同步报文到达的时间戳,然后在同步报
文的负载段传输时间戳信息,并给出了 FlexRay 节点根据时间戳计算传输延时的公
式。FlexRay 速率偏差值计算仅依据奇偶循环相位偏差值之差进行计算,具有偶然
性,本文针对这个问题设计了相位偏差趋势方程,其权值即为时钟漂移率,并给
出了利用最小二乘法求解权值的公式和实现程序,以连续时间间隔代替即时时间
间隔,达到提高时钟同步精度的目的。
为了提高 FlexRay 系统的稳定性,本文引入了相位偏差状态图的概念,根据状
态图的权值变化情况,实时、动态地评价同步节点的时钟同步性能及网络的稳定
性,找出性能较差的同步节点,然后对该节点的速率修正值进行调整,使它尽快
与其他同步节点保持同步。
最后,FlexRay 线控转向系统作为平台,本文给出了有效提高 FlexRay 线控
转向系统时钟同步精度的节点配置和网络配置方法及实现流程。
关键词: 时钟同步 FlexRay 时钟漂移 相位偏差状态图
ABSTRACT
With the great success of Embedded systems in in economy and technology, more
and more computer systems are being used for applications, even those field in which if
computer failure occurs, there will lead to serious consequences. Steer-by-wire system
of FlexRay is Safety-Critical systemit has higher requirements on the communication
network. The communication network should not only meet Conventional control
requirements,but also should meet the requirements including high fault-tolerance,
reliability and real-time performance.. Clock synchronization is one of the core
mechanism of Distributed Systems it play an important role in real time system, and
the research on it has already become an important part of research of Safety-Critical
system.
In this paper, the research of FlexRay protocol are the basis of a detailed study
about the FlexRay clock synchronization frametime hierarchy communication and so
on Then This paper introduce the ways of nodes how to exchange local time, how to
calculate deviations, how to use the Convergence function and how to handle the phase
correction and rate correction.
Through the research of the factors which influence the clock synchronization
precision,this paper mainly analysis the uncertainty propagation delay and clock drift.
Then combined FlexRay clock synchronization mechanism, this paper propose two
ways to improve FlexRay clock synchronization , they are transmission delay
measurement method and the improved rate deviation calculation method. The
Propagation delay measurements is : synchronization nodes exchange synchronization
frame, nodes abtain the local timestamps of action points, then send t the corresponding
timestamps throuth payload segment of synchronization frame , also give the formula of
transmission delay of FlexRay node according to the time stamp
FlexRay rate deviation calculation is only based on the difference between the
value of the even cycle phase deviation and odd cycle phase deviation ,in this way there
wll have great fluctuations, in order to solve this problem,this paper establish phase
deviation trend equation,,and its weight is the clock drift rate. Then use the least squares
method for solving equations and give the program of achieving the weitht at last ,this
way use continuous time intervals instead of instantaneous time separations to improve
precision of clock synchronization.
In order to inprove the stability of FlexRay system,this paper introduces the
conception of state diagram based on offset difference, in this way synchronization
performance of sync nodes and stability of network can be evaluated instantaneously
and dynamically according to the change of weight coefficients in state diagram Then
find the poor performance node of the synchronization system and improve node rate
correction value to maintain it synchronization with the other synchronization node
synchronization. as soon as possible.
At last,based on the platform of FlexRay steer-by-wire system,this paper give the
effective configuration of synchronization nodes communication network parameters
and implementation process.
Key words: Clock synchronizationFlexRayClock drift
Phase deviation state diagram
目录
ABSTRACT
第一章 绪论 ........................................................ 1
1.1 研究背景与意义..................................................................................................................... 1
1.1.1 安全关键系统的概念 ...................................................................................................... 1
1.1.2 分布式系统的由来及优点 .............................................................................................. 4
1.1.3 分布式系统的时钟同步 ................................................................................................. 5
1.2 时钟同步研究现状 ................................................................................................................ 5
1.2.1 时钟同步的国外研究现状 ............................................................................................. 5
1.2.2 时钟同步的国内研究现状 ............................................................................................. 7
1.3 安全关键性分布式系统时钟同步研究基础平台 ................................................................ 8
1.4 本论文所做的主要工 ........................................................................................................ 9
第二章 时钟与时钟同步 ............................................. 10
2.1 时钟 ...................................................................................................................................... 10
2.1.1 物理时钟和参考时 ................................................................................................... 10
2.1.2 时钟漂移和时钟失 ................................................................................................... 10
2.1.3 时钟精密度与时钟准确度 ........................................................................................... 12
2.2 时钟同步 .............................................................................................................................. 12
2.2.1 内部时钟同步............................................................................................................... 13
2.2.2 外部时钟同步............................................................................................................... 13
2.2.3 时钟同步方式............................................................................................................... 14
2.2.4 同步条件 ...................................................................................................................... 15
2.3 时钟同步算...................................................................................................................... 16
2.3.1 Lamport 逻辑时钟同步算法 ......................................................................................... 16
2.3.2 Cristian 时钟同步算法 .................................................................................................. 18
2.3.3 中央主节点同步算 ................................................................................................... 19
2.4 时钟同步过...................................................................................................................... 19
2.4.1 读取时间 ...................................................................................................................... 20
2.4.2 收敛函数 ...................................................................................................................... 21
2.4.3 状态修正与速率修 ................................................................................................... 21
2.5 本章小结 ............................................................................................................................. 22
第三章 线控转向系统 FlexRay 时钟同步机制 ........................... 23
3.1 线控转向系统安全关键性设计 .......................................................................................... 23
3.1.1 线控转向系统硬件冗 ................................................................................................ 23
3.1.2 线控转向系统可靠 ................................................................................................... 24
3.2 FlexRay 系统的分布式时钟同步 ........................................................................................ 25
3.2.1 FlexRay 系统的时间等级与时间层次 ......................................................................... 25
3.2.2 FlexRay 系统的全局时间和本地时间 ........................................................................ 26
3.2.3 FlexRay 同步帧配置原则 ............................................................................................ 26
3.3 FlexRay 系统的时钟同 .................................................................................................... 27
3.3.1 FlexRay 时钟同步进 ................................................................................................ 27
3.3.2 FlexRay 时钟偏差值测量 ............................................................................................ 29
3.3.3 FlexRay 时钟修正值计算 ............................................................................................ 29
3.3.4 FlexRay 时钟修正 ......................................................................................................... 32
3.3.5 FlexRay 时钟同步程序 ................................................................................................ 32
3.4 本章小节 ............................................................................................................................. 33
第四章 FlexRay 线控转向系统时钟同步算法改进 ....................... 35
4.1 影响时钟同步精度的因素 .................................................................................................. 35
4.1.1 传输延时不确定性 ....................................................................................................... 35
4.1.2 时钟的不稳定性 ........................................................................................................... 36
4.2 传输延时法 FlexRay 时钟同步算法改进 .......................................................................... 37
4.2.1 FlexRay 传输延时配 ................................................................................................. 37
4.2.2 传输延时改进算法 ....................................................................................................... 39
4.3 时钟漂移率 FlexRay 速率偏差计算改进 .......................................................................... 40
4.4 本章小结 ............................................................................................................................. 43
第五章 FlexRay 时钟同步性能动态检测及实现 ......................... 44
5.1 相位偏差状态图.................................................................................................................. 45
5.1.1 相位偏差曲线............................................................................................................... 45
5.1.2 相位偏差状态图定义 .................................................................................................... 45
5.2 同步节点动态检测法 .......................................................................................................... 46
5.3 线控转向系统时钟同步配置及实 .................................................................................. 50
5.3.1 节点报文传输配置 ....................................................................................................... 50
5.3.2 网络参数配置................................................................................................................ 51
5.3.3 同步报文发送与接 ................................................................................................... 53
5.4 本章小结 ............................................................................................................................. 55
第六章 结论与展望 .................................................. 56
6.1 课题工作总...................................................................................................................... 56
6.2 课题研究展....................................................................................................................... 56
参考文献 ......................................................... 58
在读期间公开发表的论文和承担科研项目及取得成果 .................... 61
致谢 ............................................................ 62
第一章 绪论
1
第一章 绪论
安全关键性分布式系越来越多的被应用到对任务执行时间和失效影响有严
格要求的若干安全关键领域,如航空航天、医疗设备、汽车电子和核电控制等。
这类系统不但要求任务运行的逻辑结果准确,并且对产生结果的物理时间有严格
要求,而分布式系统中的每个节点都有自己的时钟,随着外部环境的变化、电压
的波动、时钟本身性能等因素会使时钟源(如晶振)产生偏差。即使所有节点的
内部时基最初是同步的,经过一段时间的运行后 不同节点内部时基也一定出现
偏离。而时间触发系统一个基本的前提就是系统中各个节点具有大致相同的全局
时间,即任意两个节点的全局时间之差都在规定的偏差范围内。因此,研究分布
式系统的时钟同步具有重要意义[1]
1.1 研究背景与意义
在典型安全关键性分布式系统中,系统同时执行多个不同的功能,如监视
实时实体的值和变化率、检测报警条件、向操作员显示观测结果、执行控制算法
和实现容错处理等。通常这些功能需要系统中各节点间通过相互协作实现,且
这些协作依赖于相同的参考时间标准,才能使分布式系统的行为保持一致性,所
有节点必须以一致的顺序处理全部事件。然而每一个节点都有自己的本地时钟,
所以时钟同步就成为实现安全关键性分布式系统准确运行的必要前提。
1.1.1 安全关键系统的概念
嵌入式系统在经济和技术方面取得的巨成功,导致许多应用增加了计算机
系统的部署 甚至在计算机失效可能导致严重后果的领域也是如此。当计算机系
统失效可能产生灾难性后果(如生命损失、财产损坏或灾难性环境破坏)时,计
算机系统变成了安全关键性(或强实时)系统[1]
对于什么是安全关键系统,不同的学者理解依据
DTI(工业与贸易部)EPSRC(工程与物理科学研究委员会)资助的 SCS 项目的研究
成果[2],给出关键系统的如下定义:
如果系统失效后会导致下列后果,则该系统是关键的:
a. 丧失生命
b. 损伤或疾病
c. 严重的环境破坏
d. 财产的重大破坏
摘要:

摘要嵌入式系统在经济和技术方面取得的巨大成功,导致许多应用的计算机系统部署日趋增多,甚至在计算机失效可能导致严重后果的领域也是如此。FlexRay线控转向系统是安全关键性分布式系统,对通信网络要求很高,既要满足常规的控制要求,又要具有超高可靠性和强实时性。时钟同步作为分布式系统的核心机制之一,在FlexRay网络的实时性方面扮演重要角色,有关它的研究已经成为安全关键性分布式系统研究的一个重要组成部分。本文首先分析了FlexRay总线协议及其与时钟同步相关的同步帧、时间层次、通信循环等概念,然后深入研究了FlexRay时钟同步过程中在节点间实现本地时间交换、偏差值计算、收敛函数、相位校正和速率校...

展开>> 收起<<
安全关键性分布式系统时钟同步机制及算法研究.pdf

共66页,预览7页

还剩页未读, 继续阅读

作者:侯斌 分类:高等教育资料 价格:15积分 属性:66 页 大小:2.57MB 格式:PDF 时间:2024-11-19

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 66
客服
关注