分布式虚拟现实仿真系统的时间同步研究

合集下载

分布式仿真中基于GNSS的同步控制系统设计与实现

分布式仿真中基于GNSS的同步控制系统设计与实现
对于大型分布式仿真系统,时序同步和时间管
问题 [1-3]。
理是实现正确仿真逻辑的关键和难点,尤其对组网
目前,为了解决各仿真节点的同步推进,主要有
条件下的飞行模拟训练实时仿真系统来说,必须保
3 种解决方案:一是软件同步方法,完全利用软件完
证各仿真节点计算时序的同步性和时间的一致性,
成分布式仿真系统中各时钟的同步 [4-6],但这种软件
结构设计
同 步 控 制 系 统 的 电 路 结 构 划 分 如 图 2 所 示 ,主
要包括 GNSS 模块、微处理器模块、同步信号选择模
块、同步信号输出模块、外同步信号调理模块、级联
产生的同步信号输出给其他的控制器,实现多台计
模块、网络通信模块、工作模式配置模块、编程模块
算机同步仿真计算。
和电源模块等。
统,其仿真周期一般在 10 ms 左右,模拟机传输延迟
同步信号选择模块则根据工作模式配置和上位
可满足要求 [7]。因此,为了实现异地组网条件下的分
准的网络时间同步,完成远程网络管理功能。
机的网络管理,完成卫星同步、从同步、外同步和定
时同步 4 种同步信号的四选一输出。同步信号输出
模块负责完成串口 C 输出授时数据和选中同步信号
整个同步控制系统的连接方案如图 1 所示。采用网
口的形式进行同步信号的传送。
并在时间管理主机上引入一个 GNSS 接收机,在不同
局域网中的时间管理主机就可以通过 GNSS 的时间
信号实现同步,在每一个局域网内部,各节点通过软
件实现与该局域网中的时间管理主机同步。
文献[5]就是通过未引入 GNSS 接收机的心跳服
Send Ready)或 RLSD(Received Line Signal Detector)

探索分布仿真应用中广义时空域层级一致性

探索分布仿真应用中广义时空域层级一致性
3 1 8
J o u r n a l o f S o f t w a r e软件 学报 V o 1 . 2 4 , No . 2 , F e b r u a r y 2 0 1 3
当前, 面 向服 务 仿 真 和 组 合 仿 真 已成 为 复 杂 系 统 仿 真 与分 布 仿 真 领 域 的研 究 热 点E l 1 . 分 布 仿 真 应 用 ( d i s t r i b u t e d s i mu l a t i o n a p p l i c a t i o n , 简称 DS A ) 的大规 模趋势『 2 ] 、融合服务 的分布架 构环境p 】 、模 型和服 务的动态
组 装与重用 [ 4 , 5 1 等使 得仿真系统 的不确 定性 、不一致 问题更 为突 出. T S C问题是 DS A 系统 中一个 经典 的、 目前 仍 具挑战性 的技术难 题『 6 1 . 系统力 求时空一 致, 其根 本 目的在于获得 逼真( 可 信) 的虚拟 现实环境 及正确 的仿真结 果, 这不仅 需要 系统 内保 持一致 的时 间顺 序关系【 , 更 需要确保模 型与服 务组件 的一致性状 态 ( 包 括组件 的实

致性 构想, 包括 一致性相 关定 义、 一致性 四域模 型、 一致性 时空成 熟度和 一致性层 级框 架, 全面而 系统地 阐
述了 S ODS A 中广义时空层 级一致性 的 内涵, 为 DS A 时空一致性 量化评价 奠定 了基础.
பைடு நூலகம்
1 广义 时 空一 致 性 需求 分析
面 向服 务架 构( s e r v i c e . o r i e n t e d a r c h i t e c t u r e , 简称 S O A) 为 DS A 提供 了全 新的模 式, 当前 不乏关 于面 向服 务 的分布建 模仿真 框架( s e r v i c e . o r i e n t e d d i s t r i b u t e d M&S f r a me wo r k , 简称 S O DMS F ) 与平 台的研究【 l , j 0 0 . T S C问 题 也是 S O DMS F需重 点关注与解 决的基本 问题. 从上述研 究可 以看 出, S ODS A 体系 结构大致分 为支撑平 台层 、 资源层 、模 型层 、仿真服务 层、仿真 应用层和 用户层 等, 而任 何 DS A都 是在 特定 的时 间和 空问 内进行 , 可 以预 知, 分 布式仿真 系统 的设计 、开发 、运行等 各个阶段 都始 终贯穿 时空主线, 有狭义 时空 一致性要 求, 也有广义 时 空一 致 性 约束 , 时空 不 一 致 问题 或 仿真 不 一 致 问题 遍 布 于 整个 DS A 层次 结 构 . 我们 用 一 条 时 空轴 来 描 绘 S O DS A架构 下最底层 的支撑平 台f 时钟) 、仿 真模型 、服务组件 到最 上层的用户 认知层 的全局广 义时空一 致性 需求, 如图 1 所示 . 本文所述 时空应包含 狭义和广 义两个层面 .

在1PPS信号下基于分布式实时仿真系统的时间同步(IJISA-V2-N2-7)

在1PPS信号下基于分布式实时仿真系统的时间同步(IJISA-V2-N2-7)

I.J. Intelligent Systems and Applications, 2010, 2, 48-55Published Online December 2010 in MECS (/)Time Synchronization under 1PPS Signal inDistributed Real-time Simulation SystemYao, XinyuInstitute of Automation, College of Mechatronic Engineering and Automation, National University of DefenseTechnology,ChangSha, Hunan, 410073, P.R.ChinaEmail: sim001@Abstract—Time synchronization is one of the key points in distributed of a real-time simulation system. At first, a distributed simulation system is introduced. Secondly, time synchronization method under 1PPS signal is put forth. Thirdly, the relevant technology of time synchronization are studied, including system structure, SNTP, 1PPS signal and control logic. Vxworks watch dog timer mode and timecard counter mode under this method are also analyzed in detail and the precision is presented. Fourthly, Arena software is chosen to model and simulate the time synchronization procedure. At last, the whole simulation model is constructed and the experiment results are given out to prove the efficiency of the synchronization method.Index Terms—synchronization, 1PPS, real-time, SNTP, Arena, disturbanceI.I NTRODUCTIONSatellite navigation is widely used in many application fields since GPS system came forth in the early 1970s. By now, many similar systems like GLONASS in Russia, GALILEO in Europe are developed. Simulation of these satellite navigation systems, especially of the radio navigation signal in laboratory is valuable in many engineering research fields, such as aviation and vehicle. In order to produce the radio signal, several special physical equipments are evolved in the simulation, so the simulation is a kind of hardware in the loop simulation (HILS). Since there are usually several isolated components, including computers and equipments, in the system, distributed structure is adopted. Above all, production of the radio signal with high precision is a strict real-time task, and so the system is identified as a distributed real-time simulation system.One of the key points of the distributed real-time simulation system is the time synchronization. This paper studies a time synchronization method based on the simulation system of satellite navigation signal. System structure is illustrated briefly at first. And then, the time synchronization structure is put forward in detail, at the same time, 1PPS signals, and synthetic disturbances in the procedure are analyzed. Thirdly, several synchronization methods are studied under the structure. Since the physical experiment to study the time synchronization method under 1PPS signal is not easy to do. A method of simulation with Arena software is put forth in this paper, which is much more convenient in practice. At the end, some experiments are carried out to prove the efficiency of the time synchronization method.II.HILS SYSTEM STRUCTUREA Components of the SystemFig.1 illustrates the system structure of the HILS simulation system of satellite navigation signal. It is composed of four parts: a simulation manager, a real-time model subsystem, a signal production subsystem and a time server.Simulation manager is the interface computer with the whole system, where the man operates, controls and monitors the simulation procedure.Real-time model subsystem is one of the key components of the simulation system. For a high precise radio frequency navigation signal production, the arithmetic simulation models are complex and the calculation of them is time consuming. Satellite constellation,navigation data coding and pseudo range calculation would exceed the ability of one single computer, so more than one computer must be gathered together to do the calculation concurrently. All these calculations must be done in real-time, so we call these computers simulating arithmetic models "real-time model subsystem". The subsystem is a distributed system byFigure1 HILS system structureitself, composed of industry computers from Advantech Corporation.Signal production subsystem is another key component of the simulation system. Since the physical radio frequency signal production is acquired, the processing such as base band processing, code modulation, D/A and up-converting and so on, must be done, some specific equipments are indispensable. High precision is required, for example, the precision of carrier wave of the navigation radio signal to produce is within 5 millimeters. So, the processing to produce the navigation radio signal is much more critical in time than those arithmetic model calculations in “real-time model subsystem”. In fact, it is usually called rigorous real-time system compared with ordinary real-time simulation system, such as HILS of industry pipelining. Commercial industry computers can’t satisfied with the critical time requirements and the tremendous data processing of the radio signal production, specific boards built with DSP and FPGA are needed. VXI bus is chosen to integrate these boards and we named it as “signal production subsystem” in our system. Time server is the absolute time source of the system. It is composed of precise atomic clock synchronized with UTC and acts as the server for time synchronization. Multiple time signals are sent out from the server as the standard clock. At the same time, time server provides SNTP services as well. All the multiple time signals and SNTP services must be coherent all the time.B Connections of theComponentsBesides these four components, there are three kinds of “network” to connect the distributed components. One is the signal coaxial cable, (identified as thick dark line in Fig1.), which is used to transfer the physical time signals to the distributed equipments. The detail of time signals will be described in the next section.Another network is GE Reflective Memory (RM), which is a typical real-time network in the distributed system. The newest and highest performance RM product offered by VMIC(GE) is the 5565 series. This series operates at 2.1 gigabaud and transport data up to 174 M byte/s. RM network consists of three parts: node cards, hub and multimode fiber. There are two kinds of node card, VMIPCI5565 for PCI industry computers in real-time model subsystem and VMIPMC5565 for VXI computer in signal production subsystem. Since RM is a fiber-optic daisy-chain ring, it’s not convenient to connect fiber. VMIACC 5595 is the managed hub designed to operate with the VMIC’s VMIxxx-5565 family of RM real-time network products. The RM hub can automatically bypass ports when it detects a loss of signal or the loss of valid synchronization patterns, allowing the other nodes in the network to remain operational. RM network serves an important role in real-time communication in the distributed simulation system. The third network is the normal Ethernet network, which is used to connect all the distributed computers, providing a convenient communication method for those data not so time critical as those sent by RM network.So the whole system is a distributed hardware in the loop simulation system, and time synchronization must be carried out among these components and equipments.ⅢTIME SYNCHRONIZATIONA Time Synchronization with 1PPSFrom Fig.1, we know that time server must provide time source for both real-time model subsystem and signal processing subsystem. Signal processing subsystem is time critical, because it produces the physical radio frequency signal. Signal processing needs to use the external standard clock instead of its own crystal oscillator, so time server must transfer physical sin wave signal of 10MHZ. The sine wave signal is converted to some other signals of different frequency as needed. Except for the sine wave signal, 1PPS signal is also sent from time server as the reference point of time. Both sine wave signal and 1PPS come from the same single crystal oscillator and are transferred by coaxial cable (Thick dark line in Fig.1). The signal processing subsystem is composed of DSP and FPGA cards, and processes the input clock signals by hardware chips, which is not the purpose of this paper.We concentrate the other part of the system, such as real-time model subsystem, composed of common computers. Time synchronization carried out by computer is much more widely used. Although many time synchronization methods based on Ethernet communication are studied abroad, the synchronization accuracy is approximate milliseconds in the LAN system, which can not satisfied the requirement of navigation signal simulation. What is more, in order to improve the synchronization accuracy, much more packets are to be transported through the Ethernet, which decreases the performance of the network. And the simulation computers have to do some extra programming work to cooperate, which would depress some of its calculation ability of simulation models. Introduction of 1PPS, on the contrary, would eliminate these disadvantages and get much more accuracy, less communication packets and less load of simulation computer.1PPS signals play an important role in time synchronization, so, an extra PCI card needs to be taken to process the 1PPS signal. When a 1PPS signal arrives, the time card must trigger a PCI interrupt, and an interrupt service routine (ISR) is called to run. Since most work of time synchronization logic is done in host by the ISR, capturing the 1PPS and trigger a PCI interrupt is enough for the time card. So we have a lot of choices to select the card and choose the PCI-1780 from Advantech Corporation in our system.To synchronize with the time server, the first thing is to capture the pulse signal and initialize with the coming 1PPS signals. One of the most important things is to check the correctness of the signals, which means the signal pulses are sent exactly one per second. If the time intervals are not stable, we can't capture the signal and can't accomplish the time initialization, and an error message must be reported.So the intervals between the 1PPS signals must be measured in order to check the correctness. The measure may be done by the local crystal oscillator, which may contain error by itself. That is a dilemma, how can we distinguish the error between the input signal and the local timer? An admissible error ε is chosen to cope with the problem. If the error from the intervals of the input pulses exceeds ε measured by local timer, the 1PPS signals are assumed to have error and time synchronization can't be done. If the error, on the other hand, is less than ε, the 1PPS signals are confirmed. The error between the 1PPS signal and the local timer is assumed to belong to local timer, and then the error is used to adjust the local timer.Another point in the capture is that the 1PPS signals must be stable and contain no noise pulses. If a false pulse signal is checked during the capture procedure, it is assumed to be a valid one. Since the interval between the valid 1PPS signal and a false one is of error larger than ε, it is assumed that the 1PPS signals are not stable and will stop the procedure. Several seconds later, capture procedure is resumed again.From the description of synchronization logic, we know that an interrupt is assigned to the PCI1780 card on the computer, and it is triggered on each coming pulse. So, the interrupt latency is added to the time delay of the 1PPS signal, it is crucial to the time synchronization. Different interrupt latencies exist in various operating systems. In order to have better accuracy, a professional real-time operating system, Vxworks, is adopted, which is widely used in real-time application field. So the capture procedure is carried out under Vxworks, and the interrupt delay of the ISR is about 2 microseconds [1]. This precision is much better than in ordinary windowsXP operating system. The ISR supported by Vxworks is designed to process the interrupt as below: a) For the first interrupt triggered by pulse signal, record the local time as variable "t1" and then return;b) For the second interrupt, record the time as variable "t2", and return;c) For the third interrupt, record the time as "t3", and check if the logic expression "(|t2-t1-1|<ε)&&( |t3-t2-1|<ε)" is TRUE. Capture procedure is completed on TRUE, and the time frequency error of local crystal oscillator is assumed as "(t3-t1)/2". Rewind and repeat the operation from a) on the condition of FALSE.From our measurements, the error of the local crystal oscillator is less than 0.7 milliseconds per second, and the interrupt latency of Vxworks is less than 2 microseconds, so we set two milliseconds to the value ε in our project.B Time Synchronization with SNTPTo do time synchronization in distributed system, 1PPS signal is helpful but not enough; since the simulation time not the physical time is to be synchronized. Software has to be engaged in this task. So, time server must provide "soft" time service except for the physical signal. In our system, SNTP (Simple Network Time Protocol) is adopted by time server, and so Ethernet connection is applied in the system.SNTP is a simplified copy of NTP (Network Time Protocol), which is widely used to provide the mechanisms to synchronize time and coordinate time distribution in a large, diverse internet. Rfc documents [2, 3] give a detailed description of NTP and SNTP, so this paper just put forward the structure of the net packet in Fig.2. This packet is adopted to help synchronization between the time server and real-time target subsystem through Ethernet by TCP/IP protocol. Time server works under server mode, while the real-time target node sends request to it as a client. The schedule of synchronization is left to the client to simplify the realization of the time server. Since the 1PPS signals is coherent with NTP service on the time server, the client simply sends an Ethernet request to the time server on receiving a 1PPS signal. The returning time packet from the time server contains the current simulation time. Only the integer of seconds in time packet is used to tag the 1PPS signal, and the fraction is discarded. Because the latency of the SNTP service is usually within a few milliseconds, the integer of seconds in the time packet can precisely tagged the 1PPS signal. Tagging the 1PPS signal is done only once at the initialization period of simulation experiment. The time maintenance is left to the client through 1PPS signal, and SNTP service needs not to be used anymore, unless another simulation experiment starts.C Time Maintenance with 1PPS Signals.Once the 1PPS signal is captured and tagged with simulation time at the beginning, simulation time must be kept synchronized all along with the 1PPS signals. Another task of the maintenance procedure is to create a sub step timer. Since the real-time operation done by the real-time model subsystem is on the step much less than one second, as the interrupt by 1PPS signals. In our project, the sub step is 20 milliseconds.Two methods can be adopted to set the sub step timer, first is the watch dog timer from Vxworks and the other is the counter interrupt from PCI1780.Watch dog timer is more convenient than the latter. A " wdFunc()" procedure is created first, user codes handling the 1PPS interruption are put into the procedure, and a system function " wdCreate() " is used to create watch dog timer, and the timer is triggered by system function " wdStart ()". There are some key points to use these watch dog timer functions:Figure 2 SNTP time packeta) The resolution of the timer is dependent of the tick period set by the Vxworks system, which is 1/60 second by default. This resolution is obviously not satisfied for a 20 milliseconds timer usage, so we use "sysClkRateSet()" to reset the frequency of time ticks to 500, which means the resolution of the watch dog timer equals 2 milliseconds.b) The watch dog timer does not work in a cycle, which means it can't work repeatedly and just triggers once. That is not what we want. For our system, the sub step is 20 milliseconds, which means the watch dog timer must trigger forty nine times periodically between the 1PPS signal. In order to make the watch dog work repeatedly, the function of wdStart () must be called periodically on every watch dog timer fired until counting to forty nine times (Fig. 3).c) Since the watch dog timer is triggered by the local crystal oscillator, which is different from the time server sending 1PPS signals, the sub step time T of the watch dog timer is not exactly equal to the 20 milliseconds at the angle of the time server. Fig.5 show that the sub step T is a bit shorter than that of the time server, so all the error from forty nine watch dog timer's sub step are cumulated together, which lead to the last sub step time T' is much larger than that of the previous forty nine sub steps. The error between T and T' is equal to the error between local crystal oscillator and the time server in one second, which is about 0.7 millisecond in our project. It is a pity that no actions been taken can reduce this error in this case of watch dog timer mode.d) A detailed study show that it is not the worst thing which induced by watch dog timer mode. Watch dogtimer must start at the time when time ticks are triggered in Vxworks. That is, we can see from Fig.4, although theprogram start a watchdog at time t1, it doesn't start exactly at t1, it starts actually at the previous tick time instead (The short arrowheads indicate the ticks inVxworks). The result is that the real step time of the first watch dog timer contains an error of τ (Fig.4), this error τ can't be corrected at the next 1PPS interruption procedure, and the error would be cumulated to the tick period of Vxworks system. That is because of that the watch dog timer can only be started at the tick points, shown as the short arrowhead in Fig.4. In our project, the frequency of time ticks is set to 500, and so the error can only be corrected while it is cumulated to 2 milliseconds.A much better resolution can be achieved by setting a higher frequency of the time ticks in Vxworks. But the system would be unstable and ineffective with too much frequently time tick interrupts. The frequency of time ticks is below 1KHZ under Vxworks systems usually, so the error can't be less than 1 ms.A set of experiment data from watch dog mode is shown in Fig. 5. The sub step is set to 20 milliseconds here, and the points in figure indicate intervals measured for each sub step. Since the time measure function is from Vxworks with local crystal oscillator, the majorities are stable and equals to 20 milliseconds as assumed. The key point is when 1PPS signals arrive, the error between the local crystal oscillator and time server emerges. The local crystal oscillator is "faster" than the time server in our project, which means that real time of each sub step is actually a bit shorter. While the forty nine watch dog timers finish, 0.7 millisecond is added to the last sub step controlled by external 1PPS signal from the time server. That is why there is a value much larger than the majority every fifty points in Fig.5. The first watch dog timer stared by the 1PPS interruption procedure, as analyzed before, starts 0.7 milliseconds ahead of the programming time(0.7 is less than 2 millisecond and can't be adjusted), which induces that 0.7 millisecond is subtracted from the next sub step. The error is cumulated to about 1.3 millisecond on the next 1PPS signal shown in the figure, since it is also less than 2, the error can't be adjusted. When the error exceeds 2 milliseconds on the forth 1PPS signal's arriving, the time error of the first watch dog timer started by the forth 1PPS interruption procedure is reduced by a tick time (2 milliseconds).Figure 5 sub step times' variety under 1PPS signalFigure 3 watch dog timer in repeated modeFigure 4 watch dog timer ~ time ticksSince the error cumulates to 2 milliseconds, that is not satisfied for real-time simulation of navigation signal, the second method of PCI1780 counter mode is adopted. In this method, a counter on PCI card is used instead of the watch dog timer. For PCI1780, the clock onboard can be set with arbitrary frequency as needed (no more than 10MHZ). 50KHZ is chosen in our project, which means a much high resolution of 20 microseconds can be achieved. Comparing the 500HZ of the watch dog timer, it is much better and acceptable in our project.D Time Synchronizat iin real-time model subsysteThere is only one computer in the real-time model subsystem that is installed with the PCI1780 card to synchronize with time server. This special computer is called as time router in real-time model subsystem. The other computers in the subsystem are synchronized with time router.Simulation engine is designed to support parallel simulation of models and runs on each computer, including model computer and time router. Time synchronization is also done by the simulation engine, because simulation time’s advance is coherent with the simulation procedure. Since all the computers in real-time model subsystem are installed with RM 5565 node cards, time synchronization can be done through RM network: Time router is first triggered by the interrupt from PCI1780 at each simulation step, and then sends an special RM event through RM network to all the node cards. The other model computers are waiting for the event in the procedure of time synchronization, and continue to finish the work left in current simulation step on receiving the synchronization event from the time router, and then come to the waiting mode again for the next event. Because of the fast transportation and deterministic latency, time event sent by the time router can be checked within several microseconds, that is much better than time synchronization done by Ethernet, and is enough for real-time simulation with step of 20milliseconds.E Time Synchronization Logic under Disturbance Besides the elements mentioned in the previous section, another factor may affect the effect of time synchronization. That is synthetic disturbance, which cost by circumstance and signal transportation.The first type of disturbance is signal’s lost. It is assumed that the 1PPS signals are sent exactly one per second. But for some reasons such as attenuation and disturbance or jamming from the environment, it is not always the case. Fig.6 zooms in and demonstrates the ascending part of the curve from the pulse signal, while Fig.7 gives the overall view of the 1PPS signals. Fig.6 (a) is a perfect waveform of the ascending curve, which trigger just one interrupt at each ascending moment.(3.3V is the typical TTL high level of input voltage). Waveform of Fig.6 (b), on the contrary, goes up slowly for the attenuation, and can not rise to the high level voltage of 2.4V. So no interrupt is triggered, which may slow down the time advancement of the simulation computer. Fig.7 (a, b) present a bird's-eye view of the twokind of waveforms. Fig.7(c) illustratesanother phenomenon which is brought by the jamming noise from the environment, and these noisesmay cause chaos in 1PPS signals.Lostof signal andjamming noise signal, these two kinds of disturbance must be done with to get successful synchronization.To cope with the lost of signal, a watching timer is created at each 1PPS signal by ISR. The interval of the timer is one second plus δT1. If the next 1PPS signal comes on time, the ISR kills the previous watching timer and creates a new one; if the next 1PPS signal is lost on the contrary, the watching timer would be triggered at the time δT1past one second to give alarm. The interval of the watching timer, δT1 should be chosen carefully. If it is too small, the timer would be triggered before the correct 1PPS signal, and it would bring much larger error while it is too large. The choice of the interval is depend of the local timer’s precision, for common computer, one(a)(b)Figure 6 ascending curve of 1PPS signal(a)(b)(c)Figure 7 overall view of IPPS signalsmillisecond would be a reasonable choice.Fig.8 illustrates the logic method to handle with the lost 1PPS signal:i) A watching timer is created at each 1PPS signal (A),and the time interval is a bit longer than one second (B).ii) If the next 1PPS signal comes at time, it woulddelete the previous timer (B), and create a new timer(C).iii) If the next 1PPS signal is lost (D), the watchingtimer would not be deleted and fire at time δT 1 past onesecond (E), and a simulated interrupt is triggered (F),which calls the ISR as a normal interrupt. A newwatching timer is created as normal (G).As to the second type of disturbance, jamming noisesignal, a check procedure is adopted. While a signal(noise or 1PPS) comes, an interrupt is triggered as the standard 1PPS signal, the ISR measures the interval between it and the previous 1PPS signal. If the interval is within one second minus δT 2, it is considered as a noise signal and is ignored. Fig.9 gives an overall view of the logic: P is the standard 1PPS signal, while P 1 and P 2 represent the lost signal checking and noise signal checking points respectively, and the short arrows represent the noise signals. δT 1 is the lost signal checking boundary and δT 2 is the noise checking boundary. If the noise signal comes between P 2 and P, it would be considered as a valid 1PPS signal. If the noise signal comes before P2, it is treated asnoise and abandoned. δT 2, like δT 1, must be also chosen carefully. If it is too small, a valid 1PPS signal would be treated as noise signal because of the time error between the local crystal oscillator and the standard one, and if it is too large, it would increase the probability which noise signal is confused with standard 1PPS signal. In our system, one millisecond is chosen as δT 2.Although it is seldom that the noise signal comesbetween P 2 and P, it is occurred by chance, and the logicmethod must think of it and adjust to it. Another checkingroutine is created to measure each “noise” signal, if the intervals of three adjacent “noise” signals are approximately equal to one second, these series signals are admitted as valid standard 1PPS signals and the logic is adjusted.There are so many elements in the time synchronization, which bring time synchronization error: The latency of the interrupt service routine, the local timer granularity and error, the software programming and the synthetic disturbance are all combined together.How do these elements influence the time error? It’s hardto give a precisely analytic answer, so an useful method to study this issue is simulation. Ⅳ CONSTRUCTING OF SIMULATION MODELS In order to study the time synchronization method,simulation method is considered as a valid tool, andArena simulation software is adopted.Arena is developed from the early SIMAN/CINEMAsimulation software by Rockwell Software, Inc. It is aneasy-to-use, powerful tool that allows you to create andrun experiments on models of your systems.In order to simulate the time synchronization in Arena,some models need to be constructed at first.A Time Source Model Time source is the basic element in time synchronization system. There are two kinds of time source in our system, one is the standard time source and the other is the local time source. For standard time source, there are also two kinds: The first is 1PPS signal source and the other is sub-step time source with step of 20 milliseconds. Since there are no signal components in Arena, we use the “Create” component instead. 1PPS signal is sent from the time source, it is simulated as an entity, so “Entity” component is adopted in model.It is the same for the local time source model, but the time interval parameter is different: a value of g_ticksDelt is introduced as the time error with the standard time source. In our system the time source is considered as constant in the simulation, so a constant value is used in the model.B Signal Transportation Model 1PPS signals are transferred through physical linkcable. It is simulated by “delay” component in Arena, andnamed as “Environment”. Assuming signal is transportedby cable with length of 30 meters, transport delay is about 0.1 microseconds. The 1PPS signal entity is sent into the Environment component and delayed about 0.1 us, and then sent out to the next component.C Software Delay Model1PPS signal is sent to the time card installed on time router, and it would rely on the software routine to handle with this signal. The software routine must cost time to process the logic and bring error to the time synchronization obviously. So the software delay must beFigure 9 checking logic according disturbanceFigure 8 Lost 1PPS signal checking。

时间同步技术在分布式姿态基准系统中的实现

时间同步技术在分布式姿态基准系统中的实现

时间同步技术在分布式姿态基准系统中的实现日期:2005-10-29 人气:0 查看:[大字体中字体小字体]分布式姿态基准系统中时间同步技术的实现冯海强,徐晓苏(东南大学仪器科学与工程系江苏南京210096)摘要:首先分析比较了两种重要的时间同步技术-网络时间协议(NTP)和直接连接时间传输技术,然后提出了一个基于W indows 2000的高精度的时间同步方案,并给出了该方案的软硬件的实现,且已成功地应用于分布式姿态基准系统。

关键词:时间同步;分布式姿态基准系统;Windows 2000;驱动程序;ISA随着现代舰载设备的精度和可靠性等要求的不断提高,采用局部基准技术以消除甲板因各种原因产生的变形已得到普遍应用。

传统的方法是在每一个需要测量点处安装一台局部基准,当所需提供测量的点数较多时,一方面因局部基准的数量增多,使成本较高;另一方面在同一系统中使用多个局部基准时,各局部基准之间的差异,会造成在不同设备上的测量数值在进行坐标转换时带来较大的误差,影响系统的精度。

因此,建立全舰统一基准势在必行。

通过建立一个分布式姿态基准系统可以实现这一目标。

系统工作时,分布安装在载体各个部位的分布式姿态基准通过网络以一定的频率向中心计算机输出测量的姿态角等数据,在载体动态运动的环境下保证各分布式姿态基准的数据都是对应于绝对时刻的同一个点,由此保证系统进行信息融合处理的同步要求,以达到系统高精度、高可靠性的目的。

时间同步技术是该系统的重要关键技术之一。

分布在舰艇上的各个分布式姿态基准对其惯性传感器的同步采样才能保证中央计算机进行的信息融合处理的同步要求。

1 时间同步技术的现状在分布式姿态基准系统中,要想保证每台基准系统的计算机上的晶体以完全相同的频率振荡是不可能的,这就会导致各个单机时钟逐渐不同步,即产生时钟偏移(ClockSkew)。

这就必须通过时间同步技术来解决这一问题。

目前,有两种重要的时间同步技术,即NTP协议和直接连接时间传输。

远程时间同步在分布式测控与实时仿真系统应用

远程时间同步在分布式测控与实时仿真系统应用

远程时间同步在分布式测控与实时仿真系统应⽤远程时间同步在分布式测控与实时仿真系统应⽤远程时间同步在分布式测控与实时仿真系统应⽤⼀、分布式测控系统和实时仿真系统简介分布式测控系统通常由多个⼦系统组成,他们之间协调⼯作,共同完成测控任务,分布式测控系统可缓解单机测控系统的负担。

随着测控技术的⽇益发展和成熟,现代⼯程试验,尤其是⼤型军⼯试验中,需要测试、控制的项⽬种类越来越多,对各种测控项⽬的实时性、同步性和测控精度等都提出了更⾼的要求。

分步式实时仿真系统采⽤⼀致的结构、标准和算法,通过⽹络将分散在不同地理位置的不同类型的仿真应⽤和真实世界互联,⽀持异地分布的真实的、虚拟的和异构的平台级仿真应⽤之间的数据交换和互操作,建⽴⼀种⼈可以参与交互的综合仿真环境。

由于试验场地⾯积有限,各⼤型仿真⾮标设备常分布于不同楼宇的试验室内,完成仿真试验需要多楼宇、多试验室跨域联合进⾏。

这对多试验室远程互连及并⾏试验提出了迫切的需求,⽽远程协同仿真技术中的数据实时交互技术是解决上述问题的关键。

⼆、分布式实时仿真系统对远程时间同步的需求分布式仿真技术结合了计算机⽹络技术与虚拟现实技术,采⽤协调⼀致的结构、标准、协议和数据库,通过局域⽹/⼴域⽹将各个仿真节点的软件、硬件和仿真环境整合为⼀体,共同完成仿真任务。

随着虚拟现实技术的不断发展和完善,分布式仿真技术对连接各仿真节点的通信⽹络在实时性、传输速率、传输数据多样性等⽅⾯提出了更⾼的要求。

1、系统时间同步在分布式实时仿真系统中,系统的各部分之间的远程时间同步⾮常重要。

例如图形⼯作站、驱动控制系统、仿真机、主控机、转台控制计算机等设备之间的时间同步,以及如何确定仿真开始时间、如何确定图形⽣成开始时间、如何确定数据传输时间、如何及时读取数据等都是需要⾯临的问题。

2、仿真时间同步统⼀的时间周期起始点是保证仿真正常推进,数据真实可靠的基础。

仿真同步性要求仿真各个节点在统⼀的时间周期起始点,并且按照规定的仿真步长向前推进。

基于分布式计算的虚拟仿真技术研究

基于分布式计算的虚拟仿真技术研究

基于分布式计算的虚拟仿真技术研究一、引言随着科技的发展和计算机技术的飞速发展,虚拟仿真技术在各个领域得到了广泛的应用。

为了提高虚拟仿真技术的效率和准确性,分布式计算是一个不可或缺的部分。

本文旨在研究基于分布式计算的虚拟仿真技术,对分布式计算在虚拟仿真技术中的应用进行探讨。

二、分布式计算的概念分布式计算是将一个大的计算任务分解为多个小的计算任务,由多台计算机完成,并将它们之间的计算结果整合在一起的计算模式。

分布式计算可以大大提高计算机的计算效率和处理速度。

三、虚拟仿真技术的概念虚拟仿真技术是用计算机模拟和再现一个现实环境或过程的技术。

虚拟仿真技术可以用于模拟各种场景,如航空、汽车、医疗、游戏等领域。

四、基于分布式计算的虚拟仿真技术的优势4.1 提高计算效率基于分布式计算的虚拟仿真技术可以将一个大的计算任务分解为多个小的计算任务,由多台计算机完成,可以大大提高计算效率和处理速度。

4.2 支持更高的并发数分布式计算可以支持更高的并发数,使更多的用户同时使用虚拟仿真技术,从而提高了虚拟仿真技术的使用效率。

4.3 提高可靠性分布式计算可以通过备份和冗余的技术,提高虚拟仿真技术的可靠性。

4.4 技术整合分布式计算可以将不同的技术整合在一起,从而提高虚拟仿真技术的功能和性能。

五、虚拟仿真技术的基本原理虚拟仿真技术的基本原理是将现实世界的场景和过程用数学模型表示出来,然后通过计算机程序进行运算和模拟,再将运算结果渲染成3D环境,从而实现虚拟仿真的过程。

六、基于分布式计算的虚拟仿真技术的实现6.1 数据划分将大的计算任务分解为多个小的计算任务,并将其分配给不同的计算机进行计算。

6.2 任务协调不同的计算机完成不同的计算任务后,需要将各自的计算结果整合起来,进行协调。

6.3 数据通信在分布式计算中,不同的计算机需要进行数据通信,将计算结果传输给其他计算机或主控端。

6.4 任务调度在分布式计算中,需要对不同计算机上的任务进行调度和管理,从而提高整个计算系统的效率和稳定性。

基于PTP的无线分布式测试系统时钟同步研究(1)

基于PTP的无线分布式测试系统时钟同步研究(1)
Abstract The precision time protocol (PTP) improves the clock synchronization accuracy greatly and makes sensors, actuators and other terminals share unique time reference, which assures clock synchronization quality of different terminals. This paper puts forward a typical network topology in wireless distributed measurement system, and introduces the work process of PTP. The improvement of PTP clock synchronization adjust algorithm is analyzed. The clock synchronization accuracy of tree network topology is presented through simulation in MATLAB. The PTP clock synchronization offset can be reduced significantly with the implementation of drift estimation and skew compensation in tree network topology.
时钟同步的精度性能,引入偏移估计和斜率补偿,进一步提高了时钟同步的精度。
关 键 词 时钟同步; 分布式测试系统; 精确时钟协议; 无线

并行与分布式仿真系统中的时间管理技术研究

并行与分布式仿真系统中的时间管理技术研究

近年来,分布式仿真运行支撑平台的发展迅速,广泛应用于军事、工业、科研 等领域。然而,随着系统规模的扩大和复杂性的增加,时间管理服务也面临着 越来越多的挑战。例如,如何确保仿真时间的同步精度、如何处理节点之间的 通信延迟、如何提高时间管理服务的可扩展性等。
本次演示采用文献调研、技术分析和系统设计等方法,对分布式仿真运行支撑 平台中时间管理服务进行深入研究。首先,我们对时间管理服务的相关理论进 行研究,建立相应的数学模型,以提高时间同步精度和分配的效率。其次,我 们分析现有时间管理服务的优缺点,针对不足之处提出改进措施。最后,我们 设计并实现了一个高效的时间管理服务系统,并在实际应用中进行了验证。
2、存储策略:对于海量空间数据,需要制定合适的存储策略,以满足其对存 储容量、查询速度和数据安全等方面的需求。例如,可以采用分布式哈希表 (DHT)或基于冗余的分布,管理机制至关重要。需要实现包括数据复制、 数据迁移、数据备份和恢复等在内的多种管理任务,以保证数据的可靠性和一 致性。
2、任务完成率:任务完成率是指仿真系统中完成任务的数量占任务总数的比 例。这个指标可以用来衡量时间管理技术的有效性。
3、任务执行顺序:任务执行顺序是指任务在仿真系统中的执行顺序。这个指 标可以用来衡量时间管理技术的合理性和准确性。
在评估时间管理技术时,可以通过真实数据采集和模拟实验的方式进行。真实 数据采集可以直接在真实系统中采集实际运行数据,但需要考虑实验环境和实 验条件的影响。模拟实验可以在模拟环境中模拟各种实际情况,但需要设计合 理的模拟实验方案。
二、并行处理技术
并行处理技术是一种可以提高数据处理速度和效率的技术。在并行处理中,通 过将任务分解为多个子任务,并分配给多个处理器同时处理,可以大大提高处 理速度和处理效率。

实时分布式仿真测试平台时钟同步算法

实时分布式仿真测试平台时钟同步算法
操 作 者 定期 手 工 完成 。
经 研究分析 ,得 出 C i in算法和 B re y算法存在以 rt sa ekl e
下 三 方面 不 足 :
定同步时钟功能 的综合体 ,是在通信 系统 中控 制定时的时问
基准设备 ,并不是指 日常生活 中的钟表 。 单个 节点( 如单 台 P ) C 通过 同一个定 时器来 定时 ,例如
1 概 述
同步是指 时标 或信号在频率和相位上保持某种 严格 的特 定关系。时钟是 由产 生基准频率 的信号 发生器 中某种频率源 以及 配套 的输 入输 出接 口和控制 电路 等所组成 的一 个具 有特
动的 ,它定期地 询问每台机器的时间 ,根据回答计算出一 个 平均值 ,并告诉所有其他 机器。时间服 务器 上的时问必须 由
ag ih p o o e a i h rt c u a y. l ort m r p s d h sh g e i me a c r c
[ ywo d ]ds iue ytm; lc y crnz t n t cuay Ke r s itb tdss r e co ksnho iai :i acrc o me
图 1 从一个时 问服务器得刭 当前 时间的过程
() 种算法对于 时钟 的修 正周期只要求 不大于 a 2 ( 32 /1 a 为每 2个时钟最大差值 ,f 为最大偏 移率 ) ,这个周期 时间只
是 一 个 大 概 范 围 ,并 不 确 切 。
作者简介 :朱 宝( 8 一) 1 3 ,男, 士 , 9 硕 主研方 向:实时分布式仿真 E ma :z k l @h t a . I - i b ie om iC I l lr lO I
标签 ;T 为收到包含 CU C消息包时的时间标签 。 、7 使 1 T ' l 用同一个 时钟测量 的时间,如 图 1所示 ,若按 照 C i in所 rt sa 假设的 “ 操作时问可以忽略” ,就得不到精确的延迟 ,从而影

分布式虚拟现实及其在仿真中的应用

分布式虚拟现实及其在仿真中的应用

收稿日期:2001-10-10第19卷第1期计算机仿真2002年1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!月文章编号:1006-9348(2002)01-0009-05分布式虚拟现实及其在仿真中的应用陈谊1,3,赵敏哲2,梁炳成3(1.北京工商大学信息工程学院,100037;2.北京达泰克科技发展有限公司,100085;3.北京仿真中心,100854)摘要:分布式虚拟现实技术是虚拟现实和计算机网络技术相结合的产物,其可以突破时空限制的显著特点,为人们分析问题、解决问题、以及协同工作提供了崭新的手段,是目前倍受国际科学界和工程界关注的前沿技术。

它已非常成功地应用于军事、航天、医疗和娱乐领域,并在教育培训、工程设计与制造、电子商务等方面显示出了良好的应用前景。

该文介绍了分布式虚拟现实的概念、特征、涉及的关键技术和应用领域,综述了它的产生、发展及存在的问题,最后对其进一步发展提出了几点思考。

关键词:分布式虚拟现实;网络通信;仿真中图分类号:TP393文献标识码:A1分布式虚拟现实的概念及特征从本质上说虚拟现实(VirtuaI ReaIity ,简称VR )是用计算机仿真的方式生成一种虚拟环境(VirtuaI Environment ,简称VE ),通过各种传感设备,将用户“投入”到该环境中,实现用户与该环境直接进行自然交互的技术,它具有沉浸———交互-构想(Immer-sion -Interaction -Imagination )三个基本特征[1]。

近年来,在许多应用场合,并不特别强调沉浸感,出现了桌面虚拟现实系统,从而使“虚拟”的概念和技术得到了更广泛的应用。

分布式虚拟现实(Distributed VirtuaI ReaIity ,简称DVR )又称网络虚拟现实(Networked VirtuaI ReaIity ,简称NVR ),其目标是建立一个可供异地多用户同时参与的分布式虚拟环境(Distributed VirtuaI Environment ,简称DVE ),在这个环境中,位于不同物理位置的多台计算机及其用户,可以不受其各自的时空限制,在一个共享虚拟环境中实时交互、协同工作,共同完成某一复杂产品的设计、制造、销售全过程的模拟或某一艰难任务的演练。

分布式交互仿真中的异步时钟一致性控制方法

分布式交互仿真中的异步时钟一致性控制方法

分布式交互仿真中的异步时钟一致性控制方法
张伟;周航军;彭宇行;李思昆
【摘要】提出了在分布式交互仿真中基于回拨时钟的异步时钟一致性控制模型,利用节点间时钟的异步性对系统时间资源进行重新分配,达到了在保证原有系统功能正确性的前提下有效提高系统整体性能的目的.根据上述模型,首先提出了基于全局信息的快速拟合法,并证明了该算法的有效性;之后又根据实际网络情况提出了基于局部延迟信息的逐步逼近法;最后通过实验分析了上述方法的静态和动态性能.实验结果表明,异步时钟方法对系统的交互性能有显著提高.
【期刊名称】《软件学报》
【年(卷),期】2010(021)006
【总页数】12页(P1208-1219)
【关键词】分布式交互仿真;连续模型;异步时钟;一致性;交互效率
【作者】张伟;周航军;彭宇行;李思昆
【作者单位】国防科学技术大学,并行与分布处理国家重点实验室,湖南,长
沙,410073;国防科学技术大学,并行与分布处理国家重点实验室,湖南,长沙,410073;国防科学技术大学,并行与分布处理国家重点实验室,湖南,长沙,410073;国防科学技术大学,计算机学院,湖南,长沙,410073
【正文语种】中文
【中图分类】TP391。

一种分布式交互作战模拟的保守时间同步算法

一种分布式交互作战模拟的保守时间同步算法

一种分布式交互作战模拟的保守时间同步算法
曹裕华;江敬灼;马利辉
【期刊名称】《计算机仿真》
【年(卷),期】2004(21)4
【摘要】该文从算法思想、算法流程和算法分析三方面介绍了一种用于分布式交互作战模拟的时间同步算法.通过综合考虑所有模拟节点的请求推进时间和TSO消息的时间邮戳,该算法可以计算出最大的共同推进时间.所有节点都自主处理时间早于该时间的事件和TSO消息,不受其它节点影响.该算法并发处理事件和TSO消息,时间推进效率较高,解决了分布式交互作战模拟的时空一致性问题,加快了模拟速度,在一定程度上保证了模拟结果的正确性.
【总页数】4页(P19-21,24)
【作者】曹裕华;江敬灼;马利辉
【作者单位】军事科学院研究生队,北京,100091;军事科学院研究生队,北
京,100091;军事科学院研究生队,北京,100091
【正文语种】中文
【中图分类】TP3016
【相关文献】
1.分布式交互仿真与作战模拟是武器装备研究和军事训练方法的一场革命 [J], 陈滇民
2.一种等级化分布式时间同步算法 [J], 杨勇
3.创新的分布式交互作战模拟 [J], 孙柏林
4.一种适用于分布式MIMO-OFDM系统的时间同步算法 [J], 施冠超;邓单;朱近康
5.基于保守时间窗的交通分布式仿真同步算法研究与实现 [J], 隽志才;孙剑
因版权原因,仅展示原文概要,查看原文内容请购买。

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