CN104333427B - Method for enhancing TTCAN clock synchronization precision - Google Patents
Method for enhancing TTCAN clock synchronization precision Download PDFInfo
- Publication number
- CN104333427B CN104333427B CN201410519345.8A CN201410519345A CN104333427B CN 104333427 B CN104333427 B CN 104333427B CN 201410519345 A CN201410519345 A CN 201410519345A CN 104333427 B CN104333427 B CN 104333427B
- Authority
- CN
- China
- Prior art keywords
- clock
- ttcan
- clock rate
- node
- time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The invention relates to a method for enhancing TTCAN clock synchronization precision. The method is technically characterized by comprising the following steps that an order of differential filer is arranged behind clock rate deviation df of a Level 2 clock synchronization model of a TTCAN network and used for passage of direct current, blocking of alternating current and inhibition of a high-frequency signal. The filtering calculation formula of the order of the differential filer is: (img file='DDA0000581002660000011.TIF' wi='744' he='100' /). The method is reasonable in design. One order of low-pass filter is arranged behind clock rate deviation df of the existing clock synchronization model so that filtering processing can be performed on clock rate deviation of the TTCAN, a clock jitter error can be weakened, the burst error of the clock can be resisted, TTCAN clock synchronization precision can be enhanced and stable work of the TTCAN is guaranteed.
Description
Technical field
The invention belongs to Clock Synchronization Technology field, especially a kind of method of raising TTCAN clock synchronization accuracies.
Background technology
Traditional CAN (Controller Area Network) bus is event triggering, when multiple information occur preferentially
During level conflict, the intrinsic bus arbitration mode of CAN can make system produce very big delay, i.e.,:When in bus quantity of information compared with
When big, CAN is difficult to ensure that the real-time of system.In addition, although CAN reliability for other buses is higher,
But the direct support not to redundancy structure of its bottom, can not meet the requirement of the high reliability of marine navigator.For
Solve the above problems, introduce Time Triggered mechanism, i.e. TTCAN (Time-triggered CAN) to CAN protocol.TTCAN
Network infrastructure is identical with CAN network, simply increased a kind of mechanism of Time Triggered in high level, is touched using the time
The mechanism of sending out can meet the requirement of navigation system high real-time, and meet navigation system height by can reach using redundancy backup scheme
Reliability requirement.
In TTCAN networks, the triggered time and persistent period of all nodes is all to determine that the essence of communication is exactly to circulate
The process of allocating time dispatch list, the activity in all TTCAN networks are occurred according to set time point.It can be seen that, TTCAN
In system, strict time synchronized is the guarantee of TTCAN network normal works.However, the main clock frequency of equipment is different in TTCAN,
And the mechanical property and temperature sensitivity of each equipment clock are also inconsistent, the clock for causing each node in TTCAN is not
Synchronous.Generally in TTCAN network settings time host nodes, by this time host node send specifically with reference to message with it is each
Time synchronized is realized between node.In the 2 level clock synchronizations of Level of traditional TTCAN networks, referred to from node by which
Mark obtains length of a game with comparing for host node reference mark, and each node of TTCAN networks is scheduled based on length of a game.Can
See that the clock jitter and reference mark mutation of each node can all affect the clock synchronization of TTCAN systems.
The content of the invention
It is an object of the invention to overcome the deficiencies in the prior art, there is provided a kind of side of raising TTCAN clock synchronization accuracies
Method, for solving clock jitter and impact of the burst error to system clock synchronization accuracy.
The present invention solves existing technical problem and takes technical scheme below to realize:
A kind of method of raising TTCAN clock synchronization accuracies, in the 2 level clock synchronistic models of Level of TTCAN networks
Clock rate deviations dfFirst-order difference wave filter disposed behind, for lead to direct current, resistance exchange and suppress high-frequency signal, this one
The filtering computing formula of first order difference filter is:
In formula:d'fN clock rate deviations that () is calculated for n-th;
Represent filter value of the n-th to clock rate deviations;
α is filter factor.
Advantages of the present invention and good effect are:
1st, clock rate deviations d of the present invention in existing clock synchronistic modelfBehind place low-pass first order filter,
TTCAN clock rate deviations can be filtered with process, clock jitter error is weakened, while the burst of clock can be resisted
Mistake, improves the synchronous precision of TTCAN clocks, is conducive to ensureing the steady operation of TTCAN.
2nd, the present invention completes the purification to clock signal by introducing lower order filter, theoretically inhibits clock jitter
With impact of the burst error to clock sync signal, it is synchronous that simulation result shows that the algorithm can effectively improve TTCAN clocks
Precision.
Description of the drawings
Fig. 1 is the time filtering synchronized algorithm theory diagram of the present invention;
Theory diagrams of the Fig. 2 for the conventional clock method of synchronization;
The amplitude characteristic of wave filter when Fig. 3 is different filter factors;
Output result schematic diagram when Fig. 4 is different filter factors;
Partial enlargement result schematic diagrams of the Fig. 5 for Fig. 4;
Fig. 6 is the clock rate deviations schematic diagram of different method of synchronization tracking;
Fig. 7 is the synchronous jitter error comparison schematic diagram of two kinds of clocks;
Fig. 8 is two kinds of clock synchronization mode result schematic diagrams when clock rate deviations become big;
Fig. 9 is clock rate deviations change schematic diagram when clock rate deviations become big;
Figure 10 is two kinds of clock synchronization mode result schematic diagrams that clock rate deviations become hour;
Clock rate change of error schematic diagram when Figure 11 diminishes for clock rate deviations.
Specific embodiment
The embodiment of the present invention is further described below in conjunction with accompanying drawing.
To TTCAN networks certain from node for, its length of a game is subject to master node clock, host node reference mark
Transmission and the impact from the multi-party factor such as nodal clock, clock jitter and reference mark transmission or the mistake for resolving all can shadows
The clock synchronization of acoustic system.It is in the clock synchronization of traditional TTCAN networks, no that process is optimized to these factors.
For TTCAN systems, in the case of without clock jitter, the clock rate deviations of main and subordinate node should be one
Fixed value, that is to say, which can regard the direct current signal that frequency is 0 as.There are clock rate deviations during clock jitter
Should be jittering component of this fixed value plus a high frequency.And clock rate deviations are when undergoing mutation, equivalent in this base
A shock response is added on plinth.
Existing clock synchronization mode is as shown in Fig. 2 present invention introduces wave digital lowpass filter is carried out to clock rate deviations
Filtering, so as to remove clock jitter component, purifies clock rate deviations.As shown in figure 1, the present invention adopt concrete grammar for:
The clock rate deviations d of 2 level clock synchronistic models of LevelfBehind increase a low pass filter, as TTCAN is that have
Line Transmission system, noise jamming are relatively small.As low pass filter can lead to direct current resistance exchange, with suppression high-frequency signal
The Main Ingredients and Appearance of system function, high-frequency signal exactly clock jitter and burst error, therefore, the present invention can adopt one-level difference
Wave filter is filtered.The filtering computing formula of the first-order difference wave filter is:
In formula:d'fN clock rate deviations that () is calculated for n-th;
Represent filter value of the n-th to clock rate deviations;
α is filter factor.
The algorithm by introduce denoising filter complete the purification to clock signal, theoretically inhibit clock jitter and
Impact of the burst error to clock sync signal, simulation result show that the algorithm can effectively improve the synchronous essence of TTCAN clocks
Degree.
In order to illustrate to the principle invented, existing 2 level clock synchronizations of TTCAN networks Level are analyzed first
Signal model.
(1) ideally clock rate deviations model
As shown in Fig. 2 in traditional 2 level clock synchronistic models of Level in TTCAN, it is assumed that when master-salve clock is not contained
Clock is shaken.
Its reference mark as length of a game, and is placed on the number with reference to message by the local zone time of oneself by Clock master nodes
Transmit according in byte.Each TTCAN circulates the reference message for including Clock master nodes transmission substantially.Read from node adjacent
Two with reference to message reference mark obtain previously with actual triggering moment t for being currently based on Clock master nodes local zone timempWith
tm, the system cycle time that the difference of the two is as calculated based on Clock master nodes local zone time.For certain is from node, it
Also calculate the cycle time of TTCAN networks simultaneously in the local zone time based on oneself.Recorded from node by lock in time mark
Its local zone time t previously with current triggering momentspAnd ts, the difference of the two be based on what is calculated from node local zone time be
Unite cycle time.In theory, the system cycle time that Clock master nodes are calculated should be consistent with the cycle time calculated from node,
But when network brings into operation, the clock of main and subordinate node is nonsynchronous, there is certain deviation between them.By the two
The business of the system cycle time of calculating can obtain the clock rate deviations d of the twof
It is multiplied by from the previous unit interval ratio (TUR of node with the clock rate deviations:Time Unit Ratio) obtain
Obtain revised current TUR.
TUR=df×TURp………………………………(3)
In formula (3):TUR represents TUR values current from node, TURpRepresent from the previous TUR values of node.
From the TUR and local oscillations clock t of nodesysMultiplication obtains the network time unit (NTU from node:Network
Time Unit),
NTU=TUR × tsys………………………………(4)
In formula:NTU represents the value of network time unit.In Level 2, Local time counter is by 16 integers
Value and (the minimum 3) compositions of N positions fractional value for extending, often increase by 2 through a NTU enumeratorN, that is to say, that enumerator every
2-NIndividual network time unit is carried out plus an operation.Accumulated value of the local zone time for NTU.It can be seen that by from the continuous of node TUR
Correction can complete synchronous with the clock of Clock master nodes from node.
2) actual clock rate deviations model
In practice, the clock of main and subordinate node is due to its mechanical property, and which is affected by temperature etc., unavoidably
There is certain shake, use t'mpAnd t'mWhen there is clock jitter in expression Clock master nodes previously with currently practical triggering moment,
Then
t'mp=tmp+ηm………………………………(5)
t'm=tm+ηm………………………………(6)
In formula:ηmThe shake of the local zone time caused for the clock jitter of host node, it is 0 that it meets average, and variance is σm's
Normal distribution.Based on the previous difference with current triggering moment that Clock master nodes local zone time is calculatedCan be expressed as
In formula:It is 0 to meet average, and variance is 2 σmNormal distribution.With clock when as there is clock jitter
The TTCAN network a cycle times calculated on the basis of the local zone time of host node.There are clock jitter conditions from node in hypothesis
Down previously with current triggering moment be t 'spWith t 's, then have
t′sp=tsp+ηs………………………………(8)
t′s=ts+ηs………………………………(9)
In formula:ηsIt is the shake of the local zone time caused from the clock jitter of node, it is 0 that it meets average, and variance is σs's
Normal distribution.Based on the previous difference with current triggering moment calculated from node local zone timeCan be expressed as
In formula:It is 0 to meet average, and variance is 2 σsNormal distribution.With from node when as there is clock jitter
Local zone time on the basis of TTCAN network a cycle times for calculating.So as to obtain existing clock actual during clock jitter
Rate variance d'f
Contrast (2) and formula (11) understand that actual clock rate deviations are affected by main and subordinate node shake.
Then, the time filtering synchronized algorithm principle of the present invention is illustrated:
For TTCAN systems, in the case of without clock jitter, the clock rate deviations of main and subordinate node should be one
Fixed value, that is to say, which can regard the direct current signal that frequency is 0 as.There are clock rate deviations during clock jitter
Should be jittering component of this fixed value plus a high frequency.Formula (11) is rewritten as:
d'f=d+ η ... ... ... ... ... ... (12)
In formula:D represents the direct current component of clock rate deviations, and η represents the AC portion of clock rate deviations.
Assume that host node reference mark goes out to resolve mistake in the transmission or from node, then formula (12) is rewritten as:
d'f=d+ η+δ ... ... ... ... ... ... (13)
In formula:δ represents the burst error being reflected on clock rate deviations.
First-order difference filter system function H (z) is expressed as
So as to corresponding transfer function
When Fig. 3 gives different α, the amplitude-versus-frequency curve of wave filter.Signal of the frequency for 10Hz, by the wave filter energy
Decay 60%.It may also be seen that filter factor is less, the selectivity of wave filter is better.
The time-domain transmission function of wave filter is represented with h (n), then the clock rate deviations after wave filter can be expressed as:
As η (n) is high fdrequency components, therefore η (n) * h (n) is approximately 0, and formula (16) can be written as
Device after filtering be can be seen that from formula (17), the clock jitter part of high frequency is filtered out.Filter to burst error
The moment that ripple effect is occurred with burst error is relevant.As can be seen from Figure 3, if burst error occurs before clock synchronism stability, meeting
There is certain impact, it will cause initial value to become big, so as to the time for reaching stable is longer;If occurred after system stability,
Can be substantially filtered out.
When Fig. 4 and Fig. 5 give different filter coefficient alphas, the wave filter output result being input into during x (without burst error).From
It can be seen that after tracking a period of time, stable tracking can be realized, filter factor is bigger to be realized needed for tenacious tracking in figure
Time is shorter.In addition it can also be seen that filter factor is bigger, tracking result with actually enter value closer to that is, tracking result is cleverer
It is quick;Filter factor is less, and the smoothness of filter result is better.Due to always being estimated with last clock rate deviations in the system
Clock rate deviations afterwards, therefore it is desirable that system can be stable as early as possible and tracking result is relatively steady, so here
It is 0.07 that we select filter factor.
Below the effect and performance of the present invention are analyzed:
(1) analyze without performance test during burst error
Assume master node clock reference mark in transmitting procedure without error, then the clock between node and host node
What rate variance was mainly caused by the shake of host node system clock and the shake from node system clock.Assume clock synchronization
Before, the clock rate deviations from node acquiescence are 1.It is same from the node conventional clock method of synchronization and time filtering that Fig. 6 gives certain
The clock rate deviations tracking result of step mode.From fig. 6 it can be seen that due to the shake of main and subordinate node clock so that clock
There is shake in rate variance.In TTCAN networks, current TUR is the prediction carried out according to last clock rate deviations, main
Direction from the shake of node crystal oscillator is random, it is likely that the compensation direction of prediction clock rate deviations and present clock shake side
To consistent, i.e. the compensation result of clock rate deviations is the clock rate disparity for increasing main and subordinate node.This is indicated that to clock
The estimated accuracy of rate variance is directly related with the shake of clock rate deviations.The shake of clock rate deviations is less, to clock
The estimation of rate variance is more accurate.Time filtering algorithm is carrying out steady statue after the tracking of about 40 times.In stable
During state, the clock rate deviations fluctuation very little of wave filter output can almost be regarded a stable state output as, also just say that the time filters
The introducing of ripple algorithm effectively weakens jitter error, improves clock synchronization accuracy.
Fig. 7 is given the jitter error of the conventional clock method of synchronization and time filtering clock synchronization mode and is trembled with local zone time
The percentage ratio of dynamic error, it is assumed here that the clock jitter error of main and subordinate node is identical, and simulation result is 104Random simulation result
Averagely.It can be seen from figure 7 that the jitter error of clock rate deviations is less than the jitter error of local zone time.When traditional
The jitter error of the clock method of synchronization is about the 44% of local zone time jitter error, and trembles using time filtering algorithm clock is synchronous
Dynamic error is about the 7% of local zone time jitter error.Thus also know using after time filtering algorithm, the shake of clock rate deviations
Error is reduced to the noise that original 16%, i.e. denoising filter have filtered about 84%.Due to TTCAN networks clock synchronization and when
Clock rate variance is closely related, it is known that the synchronous precision of its clock has also obtained greatly improving.
(2) performance test analysis when having burst error
Fig. 8 give certain from node big is become suddenly to clock reference mark when the conventional clock method of synchronization and time filtering calculate
Tracking result of the method to clock rate deviations.As can be seen from Figure 8, when there is burst error to occur, conventional clock synchronization side
Formula clock rate deviations can be with becoming suddenly big, and this will cause the mutation of TUR, the final length of a game for affecting from node to calculate.
As each node is sent and received according to length of a game according to sytem matrix, therefore this node will be caused in other node
Triggering when transmission sends operation, causes to send collision, causes information send.After using time filtering algorithm, Jing
Filtering Processing is crossed, the clock rate deviations of mutation are smoothed, very little is differed with actual clock rate deviations.
Fig. 9 is given under two kinds of methods of synchronization, the clock rate when clock rate deviations obtained based on accidental data are relatively correct
The percentage ratio of rate deviation, 10 during the data4The meansigma methodss of individual stochastic process.It can be seen in figure 9 that the conventional clock method of synchronization
In the clock rate deviations that obtained based on accidental data be 1.84 times of real clock rate variance, this is local equivalent to real
Time ratio is fast nearly 1 times based on the local zone time that accidental data is obtained, that is to say, that true local zone time is obtained based on accidental data
The twice of the local zone time for arriving, the local zone time of each node for causing to change is lagged behind normal local zone time by this, from
And cause the TTCAN network operations disorderly.And the clock rate deviations obtained based on time filtering algorithm are about actual value
1.05 times, this difference is just smaller.As each time window has certain protection time slot, as long as more than during this protection
Gap, TTCAN networks still being capable of normal works.
Figure 10 gives certain and becomes suddenly hour the conventional clock method of synchronization and a time filtering to clock reference mark from node
Tracking result of the algorithm to clock rate deviations.It can be seen from fig. 10 that the clock rate deviations of the conventional clock method of synchronization
With diminishing, and the tracking result for adopting the clock of time filtering algorithm synchronous is somewhat more a little bit smaller than normal value.This
Show that time filtering algorithm diminishes suddenly clock rate deviations can also smooth.
It can be seen from figure 11 that when clock rate deviations become suddenly hour, calculate under traditional clock synchronization mode when
Clock rate variance for actual value 9%, this difference will cause the serious asynchronous of clock.And adopt time filtering algorithm when
The clock rate deviations that the clock method of synchronization is calculated are 94% of actual clock rate deviations or so, when illustrating time filtering algorithm pair
Also there is good smooth effect when clock rate variance is less than normal.
It is emphasized that embodiment of the present invention is illustrative, rather than it is determinate, therefore present invention bag
The embodiment for being not limited to described in specific embodiment is included, it is every by those skilled in the art's technology according to the present invention scheme
The other embodiment for drawing, also belongs to the scope of protection of the invention.
Claims (1)
1. a kind of method of raising TTCAN clock synchronization accuracies, it is characterised in that:In the Level2 level clocks of TTCAN networks
The clock rate deviations d of synchronistic modelfFirst-order difference wave filter disposed behind, for lead to direct current, resistance exchange and suppress high frequency
Signal, the filtering computing formula of the first-order difference wave filter is:
In formula:dfThe clock rate deviations that ' (n) is calculated for n-th;
Represent filter value of the n-th to clock rate deviations;
α is filter factor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410519345.8A CN104333427B (en) | 2014-09-30 | 2014-09-30 | Method for enhancing TTCAN clock synchronization precision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410519345.8A CN104333427B (en) | 2014-09-30 | 2014-09-30 | Method for enhancing TTCAN clock synchronization precision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104333427A CN104333427A (en) | 2015-02-04 |
CN104333427B true CN104333427B (en) | 2017-04-12 |
Family
ID=52408089
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410519345.8A Active CN104333427B (en) | 2014-09-30 | 2014-09-30 | Method for enhancing TTCAN clock synchronization precision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104333427B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR3089026B1 (en) * | 2018-11-22 | 2022-04-29 | Renault Sas | Clock update system and method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008053277A1 (en) * | 2006-10-31 | 2008-05-08 | Freescale Semiconductor, Inc. | Network and method for setting a time-base of a node in the network |
CN101803268A (en) * | 2007-09-14 | 2010-08-11 | 日本电气株式会社 | Clock synchronization system, its method and program |
-
2014
- 2014-09-30 CN CN201410519345.8A patent/CN104333427B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008053277A1 (en) * | 2006-10-31 | 2008-05-08 | Freescale Semiconductor, Inc. | Network and method for setting a time-base of a node in the network |
CN101803268A (en) * | 2007-09-14 | 2010-08-11 | 日本电气株式会社 | Clock synchronization system, its method and program |
Non-Patent Citations (1)
Title |
---|
CAN与TTCAN通信延迟时间的分析;李佳等;《清华大学学报(自然科学版)》;20060228;第46卷(第2期);261-265 * |
Also Published As
Publication number | Publication date |
---|---|
CN104333427A (en) | 2015-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111416617B (en) | Clock synchronization method and device and electronic equipment | |
JP5161363B2 (en) | Clock synchronization in asynchronous distributed systems | |
CN103888237A (en) | Method and device for achieving clock time synchronization | |
CN108075851B (en) | Device and method for synchronised clock | |
CN103248471B (en) | Clock synchronizing method based on PTP protocol Yu Reflective memory network | |
CN106603183B (en) | A kind of timestamp filter method and device | |
CN107959564A (en) | Control device and communicator | |
DE102013222669A1 (en) | A variation tolerant periodic synchronizer | |
WO2018103391A1 (en) | Clock skew correction method, device and system | |
CN105791144A (en) | Method and apparatus for sharing link traffic | |
KR101716630B1 (en) | Communication device, communication method and computer readable recording medium recording program | |
CN107749788B (en) | A kind of method, device and equipment improving clock synchronization accuracy | |
CN104333427B (en) | Method for enhancing TTCAN clock synchronization precision | |
JP6180371B2 (en) | Topology estimation apparatus and program | |
CN101034950B (en) | Clock synchronization method and device | |
TWI599863B (en) | Time synchronization device, time synchronization system and time synchronization method | |
CN106708431A (en) | Data storage method, data storage device, mainframe equipment and storage equipment | |
CN103905137B (en) | Lock-out pulse jitter suppression method based on FPGA and system | |
CN103888211B (en) | A kind of method and device carried out data transmission between cross chips | |
CN102970092B (en) | Determining a quality of a clock signal | |
JP6880611B2 (en) | Processing equipment, systems, processing methods and processing programs | |
CN100536340C (en) | Frequency division method and frequency division counter | |
US10110371B2 (en) | Phase difference estimation device and communication device having the phase difference estimation device | |
JP2013150045A5 (en) | ||
CN105678072A (en) | Method for reducing error of electronic instrument transformer under influence of message jitter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |