TWI321905B - Clock synchronization in a distributed system - Google Patents

Clock synchronization in a distributed system Download PDF

Info

Publication number
TWI321905B
TWI321905B TW91116714A TW91116714A TWI321905B TW I321905 B TWI321905 B TW I321905B TW 91116714 A TW91116714 A TW 91116714A TW 91116714 A TW91116714 A TW 91116714A TW I321905 B TWI321905 B TW I321905B
Authority
TW
Taiwan
Prior art keywords
timer
time
node
rate
calibration value
Prior art date
Application number
TW91116714A
Other languages
Chinese (zh)
Inventor
Rausch Mathias
Muller Bernd
Schedl Anton
Hedenetz Bernd
Original Assignee
Bosch Gmbh Robert
Bayerische Motoren Werke Ag
Motorola Inc
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
Priority claimed from DE20121466U external-priority patent/DE20121466U1/en
Application filed by Bosch Gmbh Robert, Bayerische Motoren Werke Ag, Motorola Inc filed Critical Bosch Gmbh Robert
Application granted granted Critical
Publication of TWI321905B publication Critical patent/TWI321905B/en

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Description

1321905 六、發明說明: 【發明所屬之技術領域】 本發明係有關一使用於即時應用(real time applications)之分散式系統(distributed system)同步化 (synchronization ),特別是一用以同步化分散式系統中各 具有區域即時計時器(local real time clock )之各節點的 方法與包含在各節點内之同步單元(synchronizing unit)。 【先前技術】 分散式系統一般係由透過通信鏈路(c〇mmunicati〇n hnk)鬆散地連接在—起之複數個節點所構成。分散式即時 系統的各節點均擁有一專屬之區域即時計時器。這些計時 器的精確度係植基於各區域計時器内的石英晶體(qu_ crystal )精確度。分散式系統所控制的即時應用需要這些 節點之區域計時器之簡;查& n i& τπ器之間達㈣同步化。該同步之時間通常稱 為「全域時間(globaltime)」。 分散式系統中,全域時間對於即時應用而言,係一相 當重要之功能。例如,即時任務可能需要依靠從不同節點 =務傳送來之訊息。這些任務的排程要求的不是僅只在 刊資況然而’-個包含不同節點計 二器的系統’不必然顯示-相同的時間。計時器之間通常 二=量Uff_set),且其通常並非使用同—頻率在 執仃。此外,該頻率並非固定不變,而可能受到如溫度之 3 影響而變化。 節點之間的内部同步與參照同一時間來源之外部同步 有所區隔。且不說傳統領域之自動化應用,分散式即時系 統逐漸應用在汽車製造業。目前,車輛中的控制裝置係藉 由CAN匯流排系統(CAN bus system )連接,尤其是用以 控制汽車引擎或自動變速器。結合複數個感應器、促動器 (―)和電子控制單元的控制系統數量大為成長。1321905 VI. Description of the Invention: [Technical Field of the Invention] The present invention relates to a distributed system synchronization for real time applications, in particular for synchronizing decentralized Each method in the system has a node of a local real time clock and a synchronization unit included in each node. [Prior Art] A decentralized system is generally composed of a plurality of nodes that are loosely connected through a communication link (c〇mmunicati〇n hnk). Each node of the distributed real-time system has a dedicated regional instant timer. The accuracy of these timers is based on the accuracy of the quartz crystal (qu_ crystal) in each zone timer. The real-time application controlled by the decentralized system requires the simpleness of the regional timers of these nodes; the synchronization between the & n i& τπ devices is achieved. The time of this synchronization is often referred to as "global time." In a decentralized system, global time is an important function for instant applications. For example, an instant task may need to rely on messages sent from different nodes. The scheduling of these tasks requires not only the status of the magazine, but the system that contains the different nodes does not necessarily show the same time. The timer is usually two = quantity Uff_set), and it is usually not used with the same frequency. In addition, the frequency is not fixed and may be subject to changes such as temperature 3 . Internal synchronization between nodes is distinguished from external synchronization with reference to the same time source. Not to mention the automation of traditional applications, distributed real-time systems are gradually being applied in the automotive industry. Currently, control devices in vehicles are connected by a CAN bus system, especially for controlling an automobile engine or an automatic transmission. The number of control systems combined with a plurality of sensors, actuators (-) and electronic control units has grown tremendously.

相互連接之控制n感應器、促動ϋ和電子控制單元的 持續使用’皆需要藉由通信技術配合,而這部分的技術尚 未被現有通信協定提及。特別是汽車「辅助線路(by_wire)J 系統的導入’更提昇了對未來車内控制應用的需求,尤其 疋可靠度更形重要。這包括適用於安全為關鍵考量之 (safety-critical )控制應用系統的計時器同步化服務。 【發明内容】 一本發明係特別針對稱為FlexRay之先進汽車通信系統 而又°十申印者係一群旨在發展和應用FlexRay技術之產業 協會的會員’該技術旨在^義―創新之車用高速控制標、 準’如 x-by-wire。 八未來之汽車應用要求具有力定性和容錯、且能夠支援 式#制系統的@速匯流排H 通信系統容許 3步與非同步總量資料傳輸達10 Mbit /s的高傳輸速率。此 技術支援全域時間下之冗餘(redundancy)和容錯的計時 器同步化。 現行匯流排系統可依存取匯流排的方式區分為:時間 多工(time multiplex)、頻率多工(frequency则叫⑻) 或編碼多工(code multiplex)。在即時控制系統的領域令, 針對系統活動之控制有兩種基本上截然不同的原理亦 即,時間觸發式(time-triggered)控制或事件觸發式 (event-triggered)控制。在時間觸發式系統中’所有活動 在預設之時間點發生。因此,時間觸發式系統令的所有節 點,基於大致同步之計時器,有一共通之時間基礎。相對 地,事件觸發式系統中的所有活動則係針對相關系統外部 事件予以反應。二系統間的主要差異在於決定性之行為 (deterministie behaviGr )。依預設規則控制匯流排存取的 系統,可保證每一個節點在特定時間内,擁有獨占之匯流 排存取權’以傳送訊息。事件觸發式系統則依預設之優先 權來控制存取,因此,無法保證決定性之行為。 分散式即時系統成敗取決於容錯之計時器同步化。尤 =是在分散式架構中,節點依預設之計晝執行特定活動的 情形。時間觸發式系統主要係使用於安全為關鍵考量之應 计時器同步化乃是時間觸發式架構正常運作之重要 避免:時系統中,可藉由訊息交換來實現同步化, 免=另立之通道(channels)來達到區域計時器的同步 '裎序本身應容忍料H失誤和訊息遺失。 為二:Γ針對時間觸發式架構,其廣泛使用於以安全 為關鍵考量之電子系 、、-工制裝置,且毋須使用機械式備 1321905 伤以及操控、刹車或懸吊控制之辅助線路系、统。在功能 正確之外,應具有高信任度。 計時器同步化是達到所需之即時特性的最基本服務。 一已知之容錯即時通信系統為時間觸發協定 (Time-Triggered Pr0t0C0l,TTP ),一特別適用於安全為 關鍵考量之控制應用的通信協定βΤτρ之同步演算法並未使 用特別之同步訊息以提供一節點計時器讀取值給其他節 點。而是依傳送進來之訊息的延遲(delay),來估計發送 端節點的計時器值。此外,ττρ提供一僅從選取之節點收集 計時資訊的方法,並忽略掉已知具有劣質振㈣之節點的 計時器值。計時器同步化和對應之時間測量係以週期方式 執行。 時間觸發式系統的顯著特性為其所有系統活動皆是依 時間來啟動。τ τ Ρ協錢m式地運作。各節點具有—計時器 和靜態排程表(static schedule)。排程表決定什麼時候必 須執仃哪些仃動’尤其是在特定類型之訊息要由某特定節 點發送時。 排程表包含有共通於所有節點之全域資訊,如一給定 時段(slot)之期間或發送端節點的識別資料。因所意圖之 系統行為被所有節點周,重要資訊亦能從這些訊息間接 地獲悉。 系統匯流排的存取係依預先編譯進排程表中的分時多 重存取(tline-dlvision multiple access,TDMA)計畫 (SChema)來進行。各節點擁有某些時段,以便在匯流排 上發送訊息。所有節點都均存取過匯流排-次的完整週 期,,稱為一個TDMA回合(round)。在一個TDMA回合完 成後,依序存取之模式將再次重複。 k些節點的計時器必須緊密同步,就目前的時段達成 共識,並在適當時間掃描匯流排,讀取到達之訊息。為了 方止節點失序演出,匯流排界面係由匯流排管理員(bus guardian )控制’僅在適當時間給予匯流排存取權^各節點 具有一通常由離散式計數器(discrete c〇unter )構成之物理 "十時器。該汁數器受水晶振i器的觸發,週期性地遞增。 由於k些振盈器未必以一完美、固定之頻率來共振, 计時器因而逐漸偏移了真實時間。計時器同步化的任務即 在反覆計算一節點之物理計時器的校準值,使其保持與其 他節點計時器-致。校準過之物理計時器將為節點在運作 時使用。 校準計時器之最簡單的方式是所謂的一步適應 (_-Stepadaptation),直接將與真實時間之偏移量加至 計時器中。惟此程序亦可能產生一致性(議心叫)的 問題。 在另一種方法t,係使料器的速度加快或減慢,直 到彌補計時器偏差。-正偏移量可藉由減慢計時器來彌 補’而-負偏移量則可藉由加快計時器來彌補。然而,計 時器還是會持續偏移,因此需要不斷地校準。 在TTP系統中,計時器同步化演算法估量其他節點計時 器之讀數,再據以估量區域計時器之校準值。因各節點預 1321905 知某些訊息何時將被發送,因此,一訊息預計收到時間與 實際到達時間之差值,將可用以計算發送方和接收方計時 器之間的偏差值。如此,在TTP中將不需使用到特別之同步 訊息。 TTP協疋中的計時器同步化需要水晶振盪器在幾近完 美、固定的頻率下共振,以使每一個TDMA回合之計時器 最大偏差盡可能的小β 有別於此傳統工藝,本發明即在進一步改善計時器同 步化的㈣’尤其是在降低水晶振i器之f用和減少計時 Is之最大偏差值。 這些將可藉由申請專利範圍第1項之節點同步化方法 與申請專利範圍第19項之同步化單元來達到。 本發明藉由偏移量的校準值與計時器速率⑺心价 权準值來校準區域計時器,避免了昂貴水晶振MU的使用 透過此方式,所有計昧哭认 時器的内。P同步化將可更快速及 以更南的精密度來達成。精 认也士 喷之逮率扠準可保護計時器免 於與時俱增之偏移量,且偏旦 .X g* « 里之杈準將可減少現行節點 "t時器間的偏移。 【實施方式】 依本發明之一 依各節點區域計時 到。 較優具體實施例 器之間的 計時器速率校準值係 一組計時器逮率偏差值計算得 在第一較優具體實施例中 該組計時器速率偏差值係 8 1321905 由節點間區域計時器所決定之兩組時間偏差值計算得到。 在第二較優具體實施例中,該組計時器速率偏差,係 依區域計時器測量所接收到特定節點訊息之時間間隔與預 期間隔的差異來計算。 本發明較宜使用於TDMA系、統,包含分散式系統之節 點存取通錢路之預式㈣4時間觸發式架構適宜 將同步方法應用於安全為關鍵考量之電子系統中。 。在TDMAf、統進行同步化時,在計算校準值與修正計 時器以刖,將藉由兩個TDMA回合或週期以測量偏差值。 當計算校準值時,藉由將特定節點納入考量,將能夠 增加容錯行為,並且減少記憶體投入(价叫。 依本發明更進一步之具體實施例,在依校準值來校準 ,時,前’計算得到之計時器速率校準值將較為減小。此 十時裔速率;^準值的減小,將可提高計時器同步化之穩定 ί·生,防止節點群组(cluster)偏移,以及將整個群組之計 時器頻率極端值朝平均值移動。 ° 本發明其他具體實施例將於相關申請專利範圍中 明〇 接者,本發明具體實施例將配合附圖,詳細說明如下: 圖1所示係一包含複數個節點之分散式系統簡要示竟 圖〇 各筋甲卜目 、 自 ”"有一包含有水晶振盪器2之計時器。在發送訊 自、各節點1須連接至通信鏈路來存取匯流排以收發訊 ^ 通彳α鏈路可進一步包含選擇性冗餘通信頻道,而复 總體資料逮率則可支援至大約1GMbit/see。 、 9 丄 各郎點除配置有各自之計時器外,並提供共通資訊結 其他知點。共通資訊係有關於通信架構,如—給定時段之 ,短’或發送端節點的識別資料。預設之系統行為係所有 郎點所周知’且從收到的訊息可間接地獲得相關重要資 訊。例如’可毋須再發送顯示認可(explicit wledgements ),因為接收端節點能夠在預期到達 間剛過不久,立即判斷訊息是否遺失。 通信鏈路或匯流排3的存取,係依分時多重存取 (TDMA )计畫來決^。各節點在存取計畫内的某些時段 内’容許在匯流排上發送訊息。所有的節點都存取過匯流 排-次的完整週期’稱為—個TDMA回合。圖2所示係單— 通信週期示例’包含有靜態和動態兩部分。在靜態部分, 各節點僅可在適當時間存取匯流排,六個時段中的任一個 時段僅能為所有節點巾的—個特定節點所存取。在動態 部刀去各郎點可依預設以提供無碰( c〇iUsi〇n f…)存取Interconnected control n sensors, actuators, and electronic control unit continued to be used by communication technology, and this part of the technology has not been mentioned in existing communication protocols. In particular, the introduction of the "by-wire" J system of the car has increased the demand for future in-vehicle control applications, especially reliability is more important. This includes safety-critical control applications for safety. The invention relates to an advanced automobile communication system called FlexRay, and a member of a group of industrial associations for developing and applying FlexRay technology. In the Yiyi-Innovative car, the high-speed control standard, such as x-by-wire. Eight future automotive applications require force-defining and fault-tolerant, and can support the # system quick-flow H communication system allows 3 Step and asynchronous total data transmission up to 10 Mbit / s high transmission rate. This technology supports redundancy and fault-tolerant timer synchronization in the global time. The current bus system can be differentiated according to the way of accessing the bus For: time multiplex, frequency multiplex (frequency is called (8)) or code multiplex. In the field of real-time control systems, There are two fundamentally different principles for controlling system activity, namely time-triggered control or event-triggered control. In a time-triggered system, 'all activities are preset. The point in time occurs. Therefore, all nodes of the time-triggered system have a common time base based on the roughly synchronized timer. In contrast, all activities in the event-triggered system are reacted to external events of the relevant system. The main difference between the systems is the decisive behavior (deterministie behaviGr). The system that controls the bus access according to the preset rules can ensure that each node has exclusive bus access rights to transmit messages within a certain time. Triggered systems control access based on preset priorities, so decisive behavior cannot be guaranteed. Decentralized real-time system success or failure depends on fault-tolerant timer synchronization. Especially = in a decentralized architecture, nodes are preset The case of performing a specific activity. The time-triggered system is mainly used for security as a key test. Synchronization of the timer should be an important avoidance of the normal operation of the time-triggered architecture: in the system, synchronization can be achieved by means of message exchange, and the channels can be synchronized to achieve the synchronization of the regional timers. The order itself should be tolerant of material H errors and loss of information. For the second time: Γ for the time-triggered architecture, it is widely used in the safety-critical electronic system, - industrial equipment, and does not require the use of mechanical equipment 1321905 injury and Auxiliary line system for control, braking or suspension control. In addition to functional correctness, it should have high trust. Timer synchronization is the most basic service to achieve the desired instant characteristics. A known fault-tolerant instant messaging system is a time-triggered protocol (Time-Triggered Pr0t0C0l, TTP), a synchronous algorithm for a communication protocol βΤτρ that is particularly suitable for security-critical control applications. No special synchronization messages are used to provide a node. The timer reads the value to other nodes. Instead, the delay value of the transmitted message is used to estimate the timer value of the sending end node. In addition, ττρ provides a method of collecting timing information only from the selected node, and ignoring the timer value of the node known to have a bad quality (4). Timer synchronization and corresponding time measurements are performed in a periodic manner. The salient feature of time-triggered systems is that all system activities are initiated on time. τ τ Ρ Ρ 钱 m m the operation. Each node has a timer and a static schedule. The schedule determines when the incitement must be imposed, especially when a particular type of message is to be sent by a particular node. The schedule contains global information common to all nodes, such as the duration of a given time slot or the identification of the sender node. Important information can also be indirectly learned from these messages because the intended system behavior is shared by all nodes. The access to the system bus is performed in accordance with the tline-dlvision multiple access (TDMA) plan (SChema) pre-compiled into the schedule. Each node has certain time periods to send messages on the bus. All nodes have access to the full cycle of the bus-time, called a TDMA round. After a TDMA round is completed, the sequential access mode will repeat again. The timers of these nodes must be closely synchronized, reach a consensus on the current time period, and scan the bus at the appropriate time to read the arriving message. In order to terminate the node out-of-order performance, the bus interface is controlled by the bus guardian 'only to give bus access rights at the appropriate time ^ each node has a usually composed of discrete counters (discrete c〇unter) Physics " ten hour device. The juice counter is triggered by the crystal oscillator and periodically increments. Since some of the vibrators do not necessarily resonate at a perfect, fixed frequency, the timer is thus gradually offset by the real time. The task of timer synchronization is to repeatedly calculate the calibration value of a node's physical timer so that it keeps the timer of other nodes. The calibrated physical timer will be used when the node is operational. The easiest way to calibrate the timer is the so-called one-step adaptation (_-Stepadaptation), which adds the offset from the real time directly to the timer. However, this procedure may also create a problem of consistency (consultation). In another method t, the speed of the feeder is increased or slowed down to compensate for the timer deviation. - A positive offset can be compensated by slowing down the timer and a negative offset can be compensated by speeding up the timer. However, the timer will continue to shift and therefore needs to be calibrated continuously. In the TTP system, the timer synchronization algorithm estimates the readings of other node timers and then estimates the calibration value of the area timer. Since each node knows when certain messages will be sent, the difference between the expected time of receipt and the actual time of arrival will be used to calculate the deviation between the sender and the receiver. As such, no special sync messages will be needed in the TTP. The synchronization of the timer in the TTP protocol requires the crystal oscillator to resonate at a nearly perfect, fixed frequency, so that the maximum deviation of the timer of each TDMA round is as small as possible. Unlike the conventional process, the present invention In the further improvement of the timer synchronization (four) 'especially in reducing the use of the crystal oscillator and reducing the maximum deviation of the timing Is. These will be achieved by the node synchronization method of claim 1 and the synchronization unit of claim 19th. The present invention calibrates the area timer by offsetting the calibration value and the timer rate (7) heart rate weight value, avoiding the use of the expensive crystal oscillator MU. In this way, all the counts are inside the crying timer. P-synchronization will be achieved faster and with greater south precision. Precise 也 之 之 叉 叉 叉 可 可 可 可 可 可 可 可 可 可 可 可 可 可 可 保护 保护 保护 叉 叉 X X X X X X X X X X X X X X X X X X X X X X . [Embodiment] According to one aspect of the present invention, it is timed according to each node area. The timer rate calibration value between the preferred embodiments is a set of timer rate deviation values calculated in the first preferred embodiment. The group of timer rate deviation values is 8 1321905 by the inter-node area timer. The two sets of time offset values determined are calculated. In a second preferred embodiment, the set of timer rate deviations is calculated by the difference between the time interval at which the region timer measures the received particular node message and the expected interval. The present invention is preferably used in a TDMA system, and a pre-type (four) 4 time-triggered architecture including a node access and money path of a distributed system is suitable for applying the synchronization method to an electronic system in which safety is a key consideration. . When the TDMAf is synchronized, the offset value is measured by two TDMA rounds or cycles after calculating the calibration value and correcting the timer. When calculating the calibration value, by taking into account a particular node, it will be possible to increase the fault tolerance behavior and reduce the memory input (price. According to a further embodiment of the present invention, when calibrated according to the calibration value, the former ' The calculated timer rate calibration value will be reduced. This ten-day rate; the reduction of the quasi-value will improve the stability of the timer synchronization, prevent the node cluster (cluster) offset, and The extreme values of the timer frequency of the entire group are shifted toward the average value. The other specific embodiments of the present invention will be clearly described in the related claims, and the specific embodiments of the present invention will be described in detail with reference to the accompanying drawings: FIG. Shown is a decentralized system consisting of a plurality of nodes. The schematic diagram shows the various ribs, from "" There is a timer containing the crystal oscillator 2. In the transmission, each node 1 must be connected to the communication. The link to access the bus to transmit and receive the communication link can further include a selective redundant communication channel, and the overall data capture rate can be supported to about 1 GMbit/see. The configuration has its own timer and provides common information to other knowledge points. The common information is related to the communication architecture, such as the identification data of a short period of time or the sender node. The default system behavior is all lang. The point is well known' and the relevant information can be obtained indirectly from the received message. For example, 'explicit wledgements need to be sent again, because the receiving end node can judge whether the message is lost immediately after the expected arrival. Access to the communication link or bus 3 is determined by a Time Division Multiple Access (TDMA) plan. Each node is allowed to send messages on the bus during certain time periods within the access plan. The nodes have access to the bus-time full cycle 'called a TDMA round. The system shown in Figure 2 - the communication cycle example' contains both static and dynamic parts. In the static part, each node can only be appropriate Time access bus, any one of the six time periods can only be accessed by a specific node of all node towels. In the dynamic part, each point can be preset to provide no touch (c 〇iUsi〇n f...) access

问TDMA回合完成後,依序 各通信節點可包含兩個匯流排管After the completion of the TDMA round, each communication node can include two busbars in sequence.

(host) 6中的資訊將傳送與儲存至 理員4和對應之驅動 :。通信 一電源供應器上。匯流排管 】所儲存的發送時間和發送 丨4控制僅在特定時間點開放 ’原本儲存在主控制器 至匯流排管理員。 10 1321905 圖4所示係-在通信鏈路上傳送之訊息格式示例圖。在 TDMA^mt動態部分所發送之所有訊息均使用相 同格式。每一個訊息包含的攔位如下: ID:識別號,1〇個位元(bit),範圍1··Η)23,用以定 義靜態部分中的-個時段位置和動態部”的訊息優先 權。識別號數字越小,其優务笼纽勒古 丹儍无等級越阿。每一個識別號於 系統中最好僅使用一次。每一個銘π & 母個郎點可使用一個或複數個 識別號。 MUX :多工欄位,1個位元,用 1 70用以各許節點使用相同的 ID來發送不同訊息。 SYNC:同步欄位’ !個位元,用以表示該訊息是否使 用於計時器同步化目的。 LEN .長度棚位’ 4個位元,田丨、;主_ 1兀用以表不所使用的資料位 元組(byte)數目(〇·.ΐ2)。 D00..D11 :資料位元組,〇_12個位元組。 CRC. 16個(或15個)位开,田乂七〜m ^ 1疋用作循環冗餘檢查。 計時器同步化演算法之運作係藉 F 1示稭由匯集其他節點之計 時器時間估計值以估算出區域計時 1町益之板準量。各節點預 知何時將有哪些訊息發送,如此,一 訊息預期被卽點收到 的時間與實際到達時間之差異 產呉就可用以計算發送方和接 收方計時器間的偏差。透過這個 々古將不再需要使用到 特別之同步訊息。圖5所示係測量超過兩個TDMA回合之情 形’粗線分別代表二節點或控制器的時間,分別註記為「控 制器U「控制器2」。兩個控制器的時間有歧許的差異, 11 1321905 以偏移量表示’且其值隨著時間而逐漸增加。 在第-個週期中,該兩個節點依所收 本身與另-個節點間之時間“…吐的訊心’決疋 各特定節點的存取模式以f所產生之時間差亦取決於 取模m絡 乂相同的程序施行於有著相同存 取模式之連續週期中。由於計時器頻率不同, 測到的時間差將額外掩‘ ”所伯 估…拉 外增加之差異將可用以評 估兩個s十時器之間的頻率 來校準計時器。 結“出來之共通時間 圖6和7所示係依計時器校準程序所達到的結果。圖6 中,調整不同之計時器速率 點門夕„ 《半使偏移量維持固定’避免節 ’:B 。十時器偏移量隨時間而增加。圖7所示係另一校 ^ ’以权準一偵測到之時間偏移量。這種校準在週期的開 始可使兩個計時器緊密同步,但是,在兩個週期的末尾, 兩個計時器再次呈現一較大之差異。 圖8所示係、—改良式計時器校準程序。在每—次計時器 校準時’ 4時器依據計時器速率和計時器偏移量而調整。 「控制器lj和「控制器2」之計時器時間以虛線表示, 依偏移量校準過之計時器則分別以點線表示,此外,進一 步依計時器速率校準過之計時器則以粗線表示。結果顯 示’兩個計時II緊密保持同步,計時器偏差不 間 增加。 叩 …校準值係從儲存在記憶體中、測量到的計時器差異所 推算出來的。如_ 4相關說明所述,用以測量時間差之節點 以一特殊旗號加以標示。為計算全域時間’各節點都使用 12 1321905 相同的演算法。在一簡單之做法中,各節點計算平均差以 得出一校準值。另一較複雜但更佳的計算程序則使用容錯 平均值演算法(fault_tolerant average alg〇rithm,FTA)。 這個演算法捨棄所偵測到之最大和最小值,依剩餘數值 中、兩具有最大差異之數值的平均值來計算出校準值。 各節點針對每兩個連續時段,執行計時器同步化演 算,依傳入訊息之預期與實際到達時間,算出時間差。 所偵測到之差值被儲存在記憶體中,並在紀錄對應之 第二週期的差值後,計算出速率校準值和偏移量校準值。 如圖9所示,使用於兩連續週期之計時器同步化演算法 包含三個截然不同的階段,亦即測量階段、計算階段 準階段。 义 測置階段又可分細為兩個週期,亦即週期1和週期2。 在每-個週财,測量具有同步位元之所有有效訊息的時 間值,並將其分別儲存在指派給第一週期 分和指派給第二週期之第二記憶體部分中。在第;= 束時’並未對區域計時器進行校準。 在計算階段(較宜在週期2和週期3之間進行),叶算 得到一速率校準值和-偏移量校準值。速率校準值係計算 储存在第-和第二記憶體部分中之測量值差值得到。從該 計算得到之差值,依預設之規則與有效之同步訊息的數字让 選取兩數值。此一預設之規則和容錯中點演算法The information in (host) 6 will be transferred and stored to the administrator 4 and the corresponding driver: . Communication on a power supply. Bus Circulation] The stored transmission time and transmission 丨4 control is only open at a specific point in time ‘originally stored in the main controller to the bus manager. 10 1321905 Figure 4 shows an example of a message format transmitted over a communication link. All messages sent in the TDMA^mt dynamic section use the same format. Each message contains the following blocks: ID: identification number, 1 unit (bit), range 1··Η) 23, used to define the message position of the time period and dynamic part in the static part. The smaller the number of the identification number, the better the cage is. The number of each identification number is preferably used only once in the system. Each π & MUX: multiplex field, 1 bit, with 1 70 for each node to send different messages using the same ID. SYNC: Synchronization field ' ! bits to indicate whether the message is used or not The purpose of the timer synchronization is LEN. The length of the booth is '4 bits, Tian Hao,; the main _ 1兀 is used to indicate the number of data bytes (bytes) (〇·.ΐ2). D00.. D11: data byte, 〇_12 bytes. CRC. 16 (or 15) bits open, 乂7~m^1疋 used as cyclic redundancy check. Operation of timer synchronization algorithm The F1 indicator is used to estimate the timer time of the other nodes to estimate the quasi-quantity of the regional timing 1 When will the message be sent, so that the difference between the time the message is expected to be received by the defect and the actual time of arrival can be used to calculate the deviation between the sender and the receiver timer. A special synchronization message is used. Figure 5 shows the situation where more than two TDMA rounds are measured. The thick lines represent the time of the two nodes or controllers, respectively, and are labeled as "Controller U "Controller 2". There is an unambiguous difference in the timing of the two controllers, 11 1321905 is represented by the offset 'and its value gradually increases with time. In the first cycle, the time difference between the two nodes according to the time between the received itself and the other node, "...the heart of the message," depends on the access mode of each particular node. The same procedure is implemented in a continuous cycle with the same access mode. Since the timer frequency is different, the measured time difference will be additionally masked. The difference between the additions will be used to evaluate the two s. The frequency between the timers is used to calibrate the timer. The common time that comes out is shown in Figures 6 and 7. The results are obtained by the timer calibration procedure. In Figure 6, adjust the different timers to the point „“Half to keep the offset fixed” to avoid the section: B. The ten-hour shift increases with time. Figure 7 shows another school's time offset as a function of the detected time. This calibration allows the two timers to be closely synchronized at the beginning of the cycle, but at the end of the two cycles, the two timers again exhibit a large difference. Figure 8 shows the improved timer calibration procedure. During each-timer calibration, the 4th timer is adjusted according to the timer rate and the timer offset. "The timer time of controller lj and "controller 2" is indicated by a dotted line. The timers calibrated according to the offset are respectively indicated by dotted lines. In addition, the timers that are further calibrated according to the timer rate are thick lines. Said. The results show that the two timings II are closely synchronized and the timer deviation does not increase.叩 ...the calibration value is derived from the difference in the measured timer stored in the memory. As described in the _ 4 related description, the nodes used to measure the time difference are indicated by a special flag. To calculate the global time, each node uses the same algorithm as 12 1321905. In a simple approach, each node calculates the average difference to arrive at a calibration value. Another more complex but better calculation program uses the fault-tolerant average alg〇rithm (FTA). This algorithm discards the detected maximum and minimum values and calculates the calibration value based on the average of the two values with the largest difference between the remaining values. Each node performs a timer synchronization calculation for every two consecutive time periods, and calculates the time difference based on the expected and actual arrival time of the incoming message. The detected difference is stored in the memory, and the rate calibration value and the offset calibration value are calculated after recording the difference of the corresponding second period. As shown in Figure 9, the timer synchronization algorithm used in two consecutive cycles consists of three distinct phases, namely the measurement phase and the calculation phase quasi-phase. The sense measurement phase can be divided into two cycles, namely cycle 1 and cycle 2. At each weekly, the time value of all valid messages having sync bits is measured and stored separately in the second memory portion assigned to the first cycle and assigned to the second cycle. The area timer is not calibrated at the ;= bundle. In the calculation phase (preferably between cycle 2 and cycle 3), the leaf calculation yields a rate calibration value and an offset calibration value. The rate calibration value is calculated by calculating the difference in measured values stored in the first and second memory portions. From the calculated difference, the two values are selected according to the preset rule and the number of valid synchronized messages. This preset rule and fault-tolerant midpoint algorithm

Uault-tolerant midp〇int alg〇rithm,ftn/ft⑷在而吮 13 1321905Uault-tolerant midp〇int alg〇rithm,ftn/ft(4)在吮 13 1321905

Communication」期刊第77捲、第1號、第1-36頁之「A New Fault-Tolerant Algorithm for Clock synchronization」論文 中有普遍性之說明,並列為重要之參考。該二選取值相加 除以2,其結果與之前的計時器速率校準值合併,逐漸改善 計時器速率之校準。 在偏移量的校準部分’再次依有效同步訊息的數字k 選取兩個節點。此項選取與速率校準的選取程序一致,且 同樣參考上述Welch和Lynch所發表的論文。再將儲存在第 一 §己憶體之該二選取之差異值相加除以2。 圖9中’列出各節點之計算值The "A New Fault-Tolerant Algorithm for Clock synchronization" paper in Volume 77, No. 1, and 1-36 of the Journal of Communication has a general description and is listed as an important reference. The two selected values are added and divided by 2, and the result is combined with the previous timer rate calibration value to gradually improve the calibration of the timer rate. In the calibration portion of the offset, 'two nodes are selected again according to the number k of the valid synchronization message. This selection is consistent with the rate calibration selection procedure, as well as the papers published by Welch and Lynch above. The difference values of the two selections stored in the first § memory are then divided by two. Figure 9 shows the calculated values of each node.

IT rf] 7F 測量結果,第二行所示係第二週期的情形,第三行所示 依所測量到之第-和第二週期的兩偏差值之差值。在這』 方顯不了计算得到之校準值,並應用於區域計時器上 校準1¾ &也區分為兩個步驟,亦即速率校準和偏移 校準。將計算得到之速率妨 迷旱校準值應用於隨後之兩個週 亦即週期3和週期4,校 挽你 筏旱6十時器頻率。偏移量校準值丨 僅應用於後續週期(亦‘ 4 月3)之起始,而不應用於週; 今之起始。 ’ (2 ”程序重複施行於連續之兩個週期,並以週」 (2n-l)及週期(2n)表示。 巧' 圖10詳細顯示使用新 4m Μ ’方去之特別2週期規劃。 就使用於校準值計算 點應用相同的演算法,的…弄法而論’只要是-— 法均可採用所有已知之容錯演算、, 母一區域計時器的料 7 勺了藉由應用複數個已知f 14 能性之一來加以調整,γ π姑丄 例如,可藉由電壓控制頻率之VC〇 (電壓控制震蕩器),其電路兹敕# 、电路藉由調整每一時間單位 時器滴答(ticks)數、旛以,L r 施以小比例之速率校準,控制 器的滴答轉換為計數器值。 接者,將說明本發明一較優具體實施例之同步演算法 操作。 -回合k〇 :在節點j中收隼 果所有“ a己為同步訊息的, J,k〇); c (i ’ j,k)係測得和預期的一 ^ ^ ^ ^ ^ ^ 刃個微滴答(亦即區域微滴 合 C local micro ticks))眸 pq * ^ W )時間差。若k)表節點〗預期 時段1起始的物理時間,s(i,; 冲. J ’ k)表郎點j測得時段丨起始 物理時間,則C(i,j,k)可定義如下: (j ) int ’),k) · t(i,j,k))[微滴答] -回合收集節點』中所㈣步訊息之e , k〇+l) 〇 •在回合(k〇+l)的末尾,節點』在時段i的偏移量輸入為 〇f(i> k0+i) = c(i, js k〇+1) 而速率差為 利]。+1),卜 •依下列公式’為每-個新回合(kQ+2)計算新偏移量值 〇(j,k〇+2)和新速率校準值d(j,k#2): 〇(j^ k〇 + 2) = FT(〇f(i , j , k〇+1)) d(j,k〇+2) = FT^-^k0+i)) + d(j,k〇) -在下-個週期的開始’以〇(j,k〇 + 2)調整計時器頻率。 15 1321905 -連續不斷地在回合(k〇+2)與 來調整計時器頻率。 、 ,k0+2) 如另一具體實施例,兮 A . 值八、 1該兩組計時器速率偏差和時門至 係刀別決定的。計時’ B差 T吁器速丰偏差係由比較 疋,亦即收到兩連續來自同 Η仏而 二預期_隔,之時間間隔,係藉由計數器= 同即點之兩訊息的實際到達時間而得,以微 ^ 預期㈣時間㈣’則係由預知且儲存在各節點 卽點訊息預期接收時間計算 ”、 值,突顯η心 述兩時間間隔之差 大顯了即點間的計時器速率差異,並 器速率校準值。 异時 如上述說明,單—組的拄„* α 值。…… 已足以計算偏移量校準 更適且地,在此一具體實施 ^ Λγ,則係母兩個週期僅 计算一次偏移量校準值和一組時間差。 且、=發明之演算法的特色係·測量和校準間隔未有重疊, 二 =準不受時間錯誤影響。此外,該演算法僅需一個 1:十數以適當地應用於測量、計算和校準步驟。 就記憶體而言,並非所有偵測 僅古一 到之差值都需要記錄, 與谷錯演算法有關部分需要記憶。 依計時器同步化以減少計時器的 扪敢大偏移量可由圖11 3看出。圖11所示係接用值& I 可^ 係制偏移讀準時之計時器偏移量 τ肊達到的最大值,圖12所示則係 π 』ιτ、1之用迷率扠準值時之情 形。如圖12所示,在同步化建立 毋須母個週期使用 率奴準。圖13說明了本發明在大為降低計時器偏移量 16 1321905 最大值方面的優勢。同樣地,在同步化建立以後,校準程 序可毋須如此頻繁地應用。 如另一較優具體實施例,可藉由施行更多的測量,避 免全域時間的偏移達極端值。為達此目的,並不立即施加 所算出之計時器速率校準值,而是先行適度加上一預設偏 移量。最好是少許地減小速率校準值。計時器速率校準值 的這項改變,稍稍降低計時器同步化的品質。相對地,可 避免全域時間逐漸偏移達極端值,且在一段時間後,所有 節點將趨近於同步化之計時器的平均值。 為此目的,計時器速率校準值d(j,k0+2)將以d(j,k0+2) +/- X取代,X表減少量。 此外,系統回合時間錯誤可藉由修改偏移量校準值來 彌補,亦即使㈣移量校準值。(i,k<)+2)_yj,其中,^為 一正值。 圖1 4和1 5所示係在各调& & i $ 社合通期施加計時器速率校準值以建 十時器同步化。圖14所示係未施加速校準值修正量的情 在所舉範例中,所有節點同步於上方節點(未施加固 疋校準’而其他節點則施加約_5〇或,之校準)之區域時 間0 圖15所示係藉由減少計時器速率一個微滴答以減少計 時器速率㈣值時,所得到的結果。全域時間趨近於 同步化之節點的平均值,且無節點未施加校準。 總之’本發明藉由同時在各節點施行偏移量校準和計 時器速率校準,提供使用 使用於即時應用之分散式系統一改良 17IT rf] 7F measurement results, the second row shows the second cycle, and the third row shows the difference between the two deviations of the measured first and second cycles. In this case, the calculated calibration value is not displayed, and it is applied to the area timer. The calibration is also divided into two steps, namely rate calibration and offset calibration. Apply the calculated rate to the drought calibration value for the next two weeks, Cycle 3 and Cycle 4, and check the frequency of your 6-hour drought. The offset calibration value 丨 is only applied to the beginning of the subsequent cycle (also 'April 3'), not to the week; the start of today. The '(2 ” program is repeated for two consecutive cycles and is expressed in weeks (2n-l) and period (2n).] Figure 10 shows in detail the special 2-cycle plan using the new 4m Μ ' square. Applying the same algorithm to the calibration value calculation point, ... can be used as long as it is - the method can use all known fault-tolerant calculus, the mother-area timer material is 7 scoops by applying a plurality of Knowing one of the properties of f 14 to adjust, γ π aunt, for example, can control the frequency of VC 〇 (voltage controlled oscillator), its circuit 敕 #, circuit by adjusting each time unit ticking The (ticks) number, 幡, L r is calibrated at a small rate, and the tick of the controller is converted to a counter value. Next, a synchronous algorithm operation of a preferred embodiment of the present invention will be described. - Round k〇 : In node j, all the "a is a synchronous message, J, k〇"; c (i ' j, k) is a measured and expected ^ ^ ^ ^ ^ ^ blade micro-tick (also That is, regional micro-tit C local micro ticks)) 眸pq * ^ W) time difference. If k) table node is expected 1 starting physical time, s (i,; rush. J ' k) table lang point j measured period 丨 starting physical time, then C (i, j, k) can be defined as follows: (j) int ') , k) · t(i, j, k)) [micro-tap] - round the collection node (4) step message e, k〇 + l) 〇 • at the end of the round (k〇 + l), node 』 The offset input in the period i is 〇f(i> k0+i) = c(i, js k〇+1) and the rate difference is ]]. +1), and the following formula 'for each- The new round (kQ+2) calculates the new offset value 〇(j,k〇+2) and the new rate calibration value d(j,k#2): 〇(j^ k〇+ 2) = FT(〇f (i , j , k〇+1)) d(j,k〇+2) = FT^-^k0+i)) + d(j,k〇) - at the beginning of the next cycle '〇(j , k〇+ 2) Adjust the timer frequency. 15 1321905 - Continuously adjust the timer frequency at round (k〇+2) and ., , k0+2) As another specific example, 兮A. 1, the two sets of timer rate deviation and the time gate to the knife is determined. The timing 'B difference T caller speed abundance deviation is compared by 疋, that is, two consecutively received from the same and the second expected _, Time interval器 = the actual arrival time of the two messages of the same point, in micro ^ expected (four) time (four) 'is predicted and stored in each node 卽 point message expected reception time calculation", value, highlighting η mental two time interval The difference between the points is the difference between the timer rate and the rate calibration value. When the timing is as described above, the 拄„* α value of the single-group is enough to calculate the offset calibration. In this case, 具体γ, the mother only calculates the offset for two cycles. The calibration value and a set of time differences. And, = the characteristics of the algorithm of the invention. The measurement and calibration intervals do not overlap, and the second = is not affected by the time error. In addition, the algorithm only needs a 1:10 to properly It is applied to the measurement, calculation and calibration steps. As far as the memory is concerned, not all the detections only need to be recorded in the first one, and the part related to the valley error algorithm needs to be remembered. The maximum amount of offset can be seen in Figure 11. The value of the tie & I shown in Figure 11 can be used to control the maximum value of the offset τ 偏移 of the offset read-time, as shown in Figure 12 The case where π 』ιτ, 1 is used with the odd value of the fork. As shown in Fig. 12, the synchronization is established without the use of the parent cycle. Figure 13 illustrates that the present invention greatly reduces the timer offset. The amount of 16 1321905 maximum advantage. Similarly, in synchronization Once established, the calibration procedure does not need to be applied as frequently. As another preferred embodiment, more measurements can be taken to avoid global time offsets reaching extreme values. For this purpose, it is not immediately applied. Calculate the timer rate calibration value, but first add a preset offset. It is best to reduce the rate calibration value a little. This change in the timer rate calibration value slightly reduces the quality of the timer synchronization. In contrast, the global time can be avoided to gradually shift to the extreme value, and after a period of time, all nodes will approach the average of the synchronized timer. For this purpose, the timer rate calibration value d (j, k0) +2) will be replaced by d(j,k0+2) +/- X, and the X table is reduced. In addition, the system round time error can be compensated by modifying the offset calibration value, even if the (four) shift calibration value. (i, k <) + 2) _yj, where ^ is a positive value. Figure 1 shows that 4 and 15 are applied to the timer && i $ union period to apply the timer rate calibration value to build ten o'clock Synchronization of the device. Figure 14 shows the situation where the correction value of the speed calibration value is not applied. In the example, all nodes are synchronized to the upper node (no solid calibration is applied and the other nodes apply about _5 〇 or calibrated). The time is 0. Figure 15 shows a decrease in the timer rate by reducing the timer rate. The result of the timer rate (four) value, the global time is closer to the average of the synchronized nodes, and no node is not applied calibration. In summary, the present invention performs offset calibration and timer at each node simultaneously. Rate calibration, providing improved use of a decentralized system for instant applications

^y\JD 式計時器同步化演算法。如此,可省卻昂貴之振盪器,並 且以更快速度和更高精度來達到同步化。 【圖式簡單說明】 圖1所示係一般分散式系統架構之簡要示意圖; 圖2所示係典型存取計晝示例; 圖3所示係節點連接至通信系統之簡要方塊圖; 圖4所示係一在通信系統上傳送之訊息結構示例; 圖5所示係測量到的計時器偏差; 圖6所示係計時器速率校準; 圖7所示係偏移量校準; 圖8所示係一偏移量和計時器速率之综合校準; 圖9所示係一依本發明較優具體實施例之計時器同步 化的示例; 圖10所示係一依本發明較優具體實施例之系列測量與 校準階段示意圖; 圖11所示係使用偏移量校準時之最大計時器偏移量可 能值; 圖12所示係使用速率校準時之最大計時器偏移量可能 值; 圖13所示係依本發明之計時器同步化時之最大計時器 偏移量可能值; ° 圖14所示係未使用速率校準值減量情形下,所需要之 校準;和 圖15所示係-相同於圖14,但依本發明較優具體實 18 1321905 施例,使用計時器速率校準值減量之示例。 【主要元件符號說明】 6..記憶體 1..節點 2 .·區域計時器 3..通信鏈路 19^y\JD-style timer synchronization algorithm. This eliminates the need for expensive oscillators and achieves synchronization at faster speeds and with greater precision. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram of a general distributed system architecture; FIG. 2 is a typical access meter example; FIG. 3 is a schematic block diagram of a node connected to a communication system; An example of the structure of the message transmitted on the communication system; Figure 5 shows the measured timer deviation; Figure 6 shows the timer rate calibration; Figure 7 shows the offset calibration; Figure 8 shows the system A comprehensive calibration of an offset and a timer rate; Figure 9 is an example of a timer synchronization in accordance with a preferred embodiment of the present invention; Figure 10 is a series of preferred embodiments in accordance with the present invention. Schematic diagram of measurement and calibration phase; Figure 11 shows the maximum timer offset possible value when using offset calibration; Figure 12 shows the maximum timer offset possible value when using rate calibration; The maximum timer offset possible value when the timer is synchronized according to the present invention; ° Figure 14 shows the calibration required in the case where the rate calibration value is not used; and the system shown in Figure 15 is the same as the figure 14, but according to the invention is better and more specific 181321905, an example of using a timer decrements the value of the calibration rate embodiment. [Description of main component symbols] 6. Memory 1. Node 2 .· Area timer 3. Communication link 19

Claims (1)

> η 七、申請專利範圍·· 冑用於即時應用之分散式系統節點⑴同步化的 ㈣二該分散式系統之節點⑴藉由通信鍵路⑴依—時間觸 發協疋相互通作·久於 一 °,節點(1)包括一區域計時器(2)和用以表 讀時將自其他節點⑴接收訊息之資訊;至少節點⑴中的 器(2)子集之各郎點將執行下列步驟,以同步化其區域計時 (a) 接收來自其他節點⑴的訊息, (b) 決定出-植並Γ9* ^+ ,卫其£域計時器(2)與節點(1)子集中直 他節點間的時間差,哕 '、 域計時器⑺實際測得的時間差, 興其。 ⑷依自節點⑴子集中其他節點連續接收到的兩個訊 心’決定出一組區域計時器⑺與節點⑴子集中其他節點間 的計時器速率偏差, (d)依上述一組時問罢 叶Π差什异侍到一偏移量校準值; 並依上述—組計時器速率偏差,計算得到-計時ϋ速率校 準值,和 ⑷依上述偏移量校準值和計時器速率校準值,調整 區域計時器(2)。 2.如申請專利範圍第丨項所述之方法,其中 該第一決定步驟⑻決定第一和第二組時間差,且 該第二決定步驟⑷依據該第—和第二組時間差,計算 出該組對應之計時器速率偏差。 20 丄321.905 ★ 3. 如申請專利範圍第2項所述之 驟⑷依該第二組時間|,計算出法’其中的計算步 移夏校準值(d)。 4. 如_請專利範圍第丨項所述之 =步驟⑷藉由計算預期時間間格與實二二決 值,得到計時器速率偏差;該預期時間間間間格之差 點兩連續訊息之預期收到時間 為收到特定節 格指依其區域計時器⑺測得之^到1實際測得時間間 貫際收到時間之間隔。 5.如申請專利範圍第4項所述之 定步驟⑷藉由下列步驟決定各計時器速率偏差中的第二決 ⑷)依其區域計時器(2) 定節· 日即‘點(1)子集中的特 :連續收到之訊息實際收到時間之間隔,和 (c2)依自特定節點(1)收 期時間n2 ° α之實際時間間隔與預 吟間間&之差值,計算計時ϋ速率差。 6.如申請專利範圍第1項 系統為-時間觸發式系統。 方法…的分散式 中的^^請專利範園第1項所述之方法,其卜節點⑴ 甲的該資訊定義了分+ ’ 義了刀散式系統中,容許特定節點⑴在該通 九鏈路(3)上發送訊息的時段。 21 8.如申請專利範圍第丨項所述之方法,其中,丨節點(” 該 中所包含之該資訊定義了預設時間間隔内,各節點⑴對 通信鍵路(3)之存取。 重複產生。 9.如申請專利範圍第8項所述之方法,其中,分散式 系統之節點⑴存取通信鍵路(3)的預設模式將連續不斷地 10.如申請專利範圍第8項所述之方法,其中,各節點 ⑴依預設之存取模式,存取該通信鏈路(3),以傳送訊 步 ’由該 時器速 η.如申請專利範圍第i項所述之方法,其中 驟(d) ’依第一預決賴目丨丨(f1r ★ 頂决規則(flrst Predetermined ruie ) 組a十時器速率偏差之雨_性 千偏差之兩计時器速率偏差,計算該 率校準值。 1 2 ·如申請專利範圍第11項~ 1 矛項所述之方法,其中的楚一 預決規則選取具有最大差 叼笫一 八左值的兩计時器速率偏差。 13. 如申請專利範圍第 闲乐11項所述之方法,其中 預決規則係依第二預決痏 的第一 頂决規則排除計時器速率偏差。 14. 如申請專利範圍第1項 吗禾1項所述之方法,豆中的 驟⑷藉由漸増目前之計時器速率校準值至前述調步 22 之計時器逮率校準冑,來計算出上 P年’月7日修正/絲嫩 述計時器速率校準值。 包含 供之叶時器速 i5.如巾請專利範圍第】項所述之方法,更進_ :改變依第三預決規則之計算步驟⑷所提 率校準值的步驟。 16.如申請專利範圍第15項所述之方法 預決規則以一個務^域曰 、的第二 準值 個稍許減篁值取代該計算出之計時器速率校 出之!請專利11圍第1項所述之方法,其中,依計算 時器速率校準值和偏移量校準值以校準區: (2)的校準步驟, — 亏為 門門陪P 疋:人數之時間間隔(用以定義每時 :間…點對通信鏈路⑺之存…,施行該二個校準 w 18·—種電腦可讀取媒體,其儲存—電腦程式,該電 腦程式包含適用於拥> 過用於執仃如申請專利範圍第1至17項中任一 項所述之方法的編碼方式(c〇demeans)。 _ 19:厂種使用於即時應用之分散式系統節點⑴同步化 同步單π該郎點⑴藉由通信鏈路⑺依—時間觸發協定 相互通信,同步單元包含: 一區域計時器(2), 23 1J21905 #年广月y日修正/·祕爾 一記憶體(6),用以儲存何時自待定節點(1)收到訊幸 時間相關資訊, °心之 。偏移债測器(deviati〇n detect〇r),用以決定區域計 夺器(2)和其他即點⑴之間的—組時間差,時間差係藉由測 量訊息預期接收時間與區域計時器(2)實際測得之時間差' 異而付到,並藉由兩連續收到之訊息’決定一組區域計時 器(2)和其他節點⑴之間的計時器速率偏差, 一校準計算單元(correction calculationunit),用以 依該組決定之時間差’計算偏移量校準值;並依該組決定 之计時器速率偏差,計算計時器速率校準值,和 校準單几(adjusting unit ),用以依計算得到之偏 移量校準值和計時器速率校準值,校準區域計時器。 2〇_如申請專利範圍第19項所述之同步單元,其中的 偏移偵測器用以沐& # h ^ 乂决疋第一與第二組時間差,並據以決定該 組計時器速率偏差。 i 21·如申請專利範圍第20項所述之同步單元,其中的 ★準。十算單兀’依該第二組之時間差,計算偏移量校準值。 22.如申清專利範圍第19項所述之同步單元,其中的 偏移偵測器’依計算預期時間間隔與實際時間間隔之差 決& S十時器速率偏移;該預期時間間隔為預期連續收 特又節點之訊息的時間間隔,實際時間間隔為依其區域 24 *· · 。十時器(2)實際測得之訊息接收時間間隔。 23.如申請專利範圍第22項所述之同步單元,其中的 偏移偵測器包含-計數器,用以依其區域計時器(2),計算 連續收到特定節點⑴之訊息的實際時間間隔。 24如申請專利範圍第19項所述之同步單元,其中的記 憶體(6)所儲存之資訊定義了分散式系統各節點⑴的存取 、弋以便特疋節點(1)在該通信鍵路(3)上發送訊息。 ^ 25.如申請專利範圍第19項所述之同步單元,其中, 節’’(1)所包含的该資訊定義了在各節點⑴在預設時間間 隔内對該通信鏈路(3)之存取。 26·如申請專利範圍第19項所述之同步單元,其中的 各節點進-步包含—發送器(加㈣⑽),用以依該預設 之存取模式,在擁有該通信鏈路(3的存取權時發送訊息。 2'如申請專利範圍第19項所述之同步單元,進一步 包3偏差記憶體’用以儲存區域計時器⑺和其他節點⑴ 的計時器(2之時間差。 28·如申凊專利範圍第27項所述之同步單元,其中的 記憶體用以儲存兩組時間差。 25 1321905 29.如申請專利範圍第19至28項任一項所述之同步 單元,進一步包含一偏移保護裝置(drift protection means ),用以改變依該校準計算單元提供之計時器速率校 準值,並將變更後之計時器速率校準值傳送到該校準單元。 26> η VII, the scope of application for patents · 分散 for decentralized system nodes for instant application (1) synchronization of (4) two nodes of the decentralized system (1) by communication key (1) by - time triggering mutual cooperation for long At one°, node (1) includes an area timer (2) and information for receiving messages from other nodes (1) when reading the table; at least the points of the subset of devices (2) in node (1) will perform the following steps To synchronize its regional timing (a) to receive messages from other nodes (1), (b) to determine the out-of-plant 9* ^+, to defend the domain timer (2) and the node (1) subset directly to the node The time difference between the 哕' and the field timer (7) is actually measured by the time difference. (4) The two message cores continuously received by other nodes in the sub-node (1) subset determine the timer rate deviation between a group of regional timers (7) and other nodes in the node (1) subset, (d) according to the above group The difference between the leaves and the singer is an offset calibration value; and the chronograph 速率 rate calibration value is calculated according to the above-mentioned group timer rate deviation, and (4) the offset value and the timer rate calibration value are adjusted according to the above-mentioned offset value Area timer (2). 2. The method of claim 2, wherein the first determining step (8) determines the first and second sets of time differences, and the second determining step (4) calculates the time based on the first and second sets of time differences The corresponding timer rate deviation for the group. 20 丄321.905 ★ 3. Calculate the calculated step shift summer calibration value (d) according to the second set of time |, as described in item 2 of the patent application scope. 4. If _ please refer to the scope of the patent scope, step = (4), by calculating the expected time interval and the real two-two decision, the timer rate deviation is obtained; the difference between the expected time points is expected from two consecutive messages. The time of receipt is the interval between the time when the specific section is received and the time it is received by the area timer (7). 5. The step (4) as described in item 4 of the patent application scope determines the second decision (4) in each of the timer rate deviations by the following steps: according to the area timer (2), the date is the point (1) The characteristics of the subset: the interval between the actual received time of the received message, and (c2) the difference between the actual time interval of the specific node (1) receiving time n2 ° α and the inter-prediction & The timing ϋ rate is poor. 6. If the patent application scope is item 1, the system is a time-triggered system. In the method of decentralization of the method, the method described in the first item of the patent paradigm, the information of the node (1) A defines the sub- + 'is a knife-distributed system, allowing a specific node (1) to pass through the The time period during which the message is sent on link (3). The method of claim 2, wherein the information contained in the node (" defines the access of the node (1) to the communication key (3) within a preset time interval. 9. The method of claim 8, wherein the predetermined mode of accessing the communication key (3) by the node (1) of the distributed system is continuously 10. For example, the eighth item of the patent application scope The method, wherein each node (1) accesses the communication link (3) according to a preset access mode to transmit the step 'from the current device speed η. As described in claim i. The method, wherein the step (d) is calculated according to the first pre-determined 丨丨 丨丨 (f1r ★ top rule (flrst Predetermined ruie) group a ten-time rate deviation rain _ sex thousand deviation two timer rate deviation, calculate The rate calibration value is as follows: 1 2 · As described in the scope of claim 11 to 1 spear, the Chuyi pre-determination rule selects two timer rate deviations with a maximum difference of one-eighth left value. The method described in claim 11 of the patent application, The pre-determination rule excludes the timer rate deviation according to the first decision rule of the second pre-determination. 14. If the method described in item 1 of the patent application, the method in item 1, the step (4) in the bean is gradually reduced. The timer rate calibration value is calibrated to the timer capture rate of the aforementioned step 22 to calculate the calibration value of the last P-year 'month 7 correction/silk tune timer rate. Include the leaf speed i5. Please refer to the method described in the scope of patents, and further _: change the step of the calibration value according to the calculation step (4) of the third pre-determination rule. 16. The method pre-determination rule as described in claim 15 Replace the calculated timer rate with a second threshold value of a certain value, and the method described in Item 1 of the patent, wherein the time rate calibration value is calculated according to the calculation method. And the offset calibration value to the calibration area: (2) the calibration step, — the deficit is the gate with P 疋: the time interval of the number of people (to define the time interval: between... the point to the communication link (7)... The two calibrations w 18 · a computer readable medium, its storage - A computer program comprising a coding method (c〇demeans) suitable for use in a method as claimed in any one of claims 1 to 17. _ 19: Decentralized system nodes for instant application (1) Synchronization synchronization single π The lang point (1) communicates with each other by a communication link (7) according to a time-triggered protocol, the synchronization unit includes: an area timer (2), 23 1J21905 #年广月 y Day correction / · Mier a memory (6), used to store when the information from the pending node (1) received the news, ° heart. The offset detector (deviati〇n detect〇r) is used to determine the time difference between the regional timer (2) and the other point (1). The time difference is determined by measuring the expected reception time and the area timer ( 2) The actual measured time difference 'is paid separately, and the two consecutively received messages' determine the timer rate deviation between a group of regional timers (2) and other nodes (1), a calibration calculation unit (correction) The calculation unit) is configured to calculate an offset calibration value according to the time difference determined by the group; and calculate a timer rate calibration value according to the timer rate deviation determined by the group, and an adjustment unit for Calculate the offset calibration value and the timer rate calibration value, and calibrate the area timer. 2〇_such as the synchronization unit described in claim 19, wherein the offset detector is used to measure the time difference between the first and second groups, and determine the set timer rate accordingly. deviation. i 21· As described in the scope of claim 20, the synchronization unit, which is ★. The calculation of the offset calibration value is based on the time difference of the second group. 22. The synchronization unit according to claim 19, wherein the offset detector 'determines the difference between the expected time interval and the actual time interval and the S-timer rate offset; the expected time interval For the time interval in which the message of the continuous node is expected to be continuously received, the actual time interval is according to its area 24*··. The ten-hour device (2) actually receives the message receiving time interval. 23. The synchronization unit of claim 22, wherein the offset detector comprises a counter for calculating an actual time interval for continuously receiving a message of a specific node (1) according to its area timer (2). . 24. The synchronization unit according to claim 19, wherein the information stored in the memory (6) defines access to each node (1) of the distributed system, so that the special node (1) is at the communication key (3) Send a message. ^ 25. The synchronization unit according to claim 19, wherein the information contained in the section ''(1) defines the communication link (3) at each node (1) within a preset time interval. access. 26. The synchronization unit according to claim 19, wherein each node further includes a transmitter (plus (4) (10)) for possessing the communication link according to the preset access mode (3) Send a message when accessing. 2' Synchronization unit as described in claim 19, further packet 3 offset memory 'storage timer for storing area timer (7) and other nodes (1) (2 time difference. 28 The synchronizing unit according to claim 27, wherein the memory is used to store two sets of time differences. 25 1321905 29. The synchronizing unit according to any one of claims 19 to 28, further comprising A drift protection means for changing the timer rate calibration value provided by the calibration calculation unit and transmitting the changed timer rate calibration value to the calibration unit.
TW91116714A 2001-07-26 2002-07-26 Clock synchronization in a distributed system TWI321905B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE20121466U DE20121466U1 (en) 2001-07-26 2001-07-26 Clock synchronization for FlexRay (RTM) automotive communication system has node subset, message reception, time and clock rate deviation measurement, off-set and clock rate correction value calculation and node clock adjustment

Publications (1)

Publication Number Publication Date
TWI321905B true TWI321905B (en) 2010-03-11

Family

ID=45073894

Family Applications (1)

Application Number Title Priority Date Filing Date
TW91116714A TWI321905B (en) 2001-07-26 2002-07-26 Clock synchronization in a distributed system

Country Status (1)

Country Link
TW (1) TWI321905B (en)

Similar Documents

Publication Publication Date Title
JP3902592B2 (en) Node synchronization method and synchronization unit for distributed system for real-time processing
CN110113242B (en) Multi-node synchronous sampling and data transmission method in ring communication network
CA2767499C (en) A method of time synchronization of free running nodes in an avionics network
TWI309120B (en) Time slot protocol
US8180940B2 (en) Method and system for transmission of cyclic and acyclic data over a transmission channel that takes into account real-time capability
US6959017B2 (en) Synchronizing system using IEEE 1394 serial bus standard
JP4824662B2 (en) Method and apparatus for synchronizing cycle times of multiple buses and corresponding bus system
EP2064822B1 (en) Network and method for clock synchronization of clusters in a time triggered network
JP2003523130A (en) Clock synchronization method between nodes in packet network
US20080198868A1 (en) Method For Establishing a Global Time Base in a Time-Controlled Communications System and Communications System
US7596153B2 (en) Clock-state correction and/or clock-rate correction using relative drift-rate measurements
US20130290580A1 (en) Method and device for serial data transmission at a switchable data rate
JP5804086B2 (en) Node device and time synchronization method
US20220029724A1 (en) A tsn enabled controller
CN101960771A (en) Communication system comprising a data bus and several subscriber nodes connected thereto and method for operating such a communication system
KR100655625B1 (en) Wireless network with user clock synchronization
CN112751641B (en) TSN network time synchronization method, equipment and storage medium
Akpinar et al. Improved clock synchronization algorithms for the controller area network (CAN)
TWI321905B (en) Clock synchronization in a distributed system
Steinhammer et al. Hardware implementation of the Time-Triggered Ethernet controller
KR100597436B1 (en) Cycle time synchronization appparatus for wireless 1394 system and method therefor
CN114375552B (en) Method for time synchronization in Ethernet-based network
RU2575687C2 (en) Method and apparatus for serial transmission of data with switched data rate
CN117597908A (en) Deterministic stream transmission method, system and electronic equipment
JPH09162861A (en) Communication controller

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees