CN101252429B - Method for enhancing clock synchronization accuracy in distributed network system - Google Patents

Method for enhancing clock synchronization accuracy in distributed network system Download PDF

Info

Publication number
CN101252429B
CN101252429B CN2008100598607A CN200810059860A CN101252429B CN 101252429 B CN101252429 B CN 101252429B CN 2008100598607 A CN2008100598607 A CN 2008100598607A CN 200810059860 A CN200810059860 A CN 200810059860A CN 101252429 B CN101252429 B CN 101252429B
Authority
CN
China
Prior art keywords
clock
time
interval
local
master clock
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.)
Expired - Fee Related
Application number
CN2008100598607A
Other languages
Chinese (zh)
Other versions
CN101252429A (en
Inventor
韩晓霞
张艳
陈金龙
廉玉平
霍明旭
韩雁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN2008100598607A priority Critical patent/CN101252429B/en
Publication of CN101252429A publication Critical patent/CN101252429A/en
Application granted granted Critical
Publication of CN101252429B publication Critical patent/CN101252429B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method for improving the clock synchronization precision in a distributed network system. At present, the synchronized precision is relatively lower. Aiming at uncertainty and large disturbance, the invention only makes adjustment when the time offset between a local slave clock and a master clock is less than or equal to the offset value set through a register by the user; if the adjacent twice time offset is still more than the offset value, the invention adjusts the time of the local slave clock according to the time offset value. As the speed of a clock crystal oscillator is deviated, the time interval at which the local slave clock continuously twice sends sync synchronous messages to the master clock and the time interval at which the local slave clock continuously twice receives the sync synchronous messages from the master clock are compared, and then the difference between the two time intervals is evenly distributed within the synchronization interval. The method of the invention solves the problem of the decreasing of the clock synchronization precision to ensure the clock synchronization precision to reach microsecond level, through a filtering algorithm and the even adjustment of the offset of the crystal oscillator of the slave and the master clocks within the synchronization interval.

Description

A kind of method that improves clock synchronization accuracy in the distributed network system (DNS)
Technical field
The invention belongs to technical field of integrated circuits, relate to real-time synchronous method in the distributed network system (DNS), relate in particular to a kind of method that improves clock synchronization accuracy in the distributed network system (DNS) based on the IEEE1588 agreement.
Background technology
The IEEE1588 standard agreement has defined a clock synchronization protocol in measurement and automated system, be accurate clock synchronization protocol PTP (Precision Time Protocol), this agreement is suitable for distributed network system (DNS), can realize that microsecond level high accuracy clock is synchronous, make when distributing Control work, to need not to carry out again special synchronous communication, thereby reached the effect that call duration time pattern and application program time of implementation pattern are separated.Because high precision synchronous work, make ethernet technology intrinsic data transmission period fluctuation be reduced to acceptable, do not influence the scope of control precision.In all Network Synchronization algorithms, all will consider the influence that circuit delay causes synchro system, thereby the accuracy of circuit delay calculating has directly influenced the precision of synchro system.Circuit delay mainly is made up of the transmission delay on communication stack time-delay and the physical network, when data communicate in a network of not storing forwarding capability, by the circuit delay that physical network produced generally is stable, and communication stack software has very big uncertainty in the process of implementation, makes the time-delay of communication stack can produce bigger shake.There is deviation in speed owing to each equipment clock crystal oscillator in network in addition, and it is inaccurate to make that circuit delay also can cause in computational process, and these two kinds of reasons can cause real-time synchronization accuracy to reduce greatly.
Summary of the invention
The objective of the invention is at the deficiencies in the prior art, provide a kind of and improve the method for clock synchronization accuracy based on the IEEE1588 agreement, thus the consequence that the speed of the above-mentioned big perturbed problem that produces owing to network is uncertain and each equipment clock crystal oscillator of solving exists deviation to cause.
Particular content of the present invention comprises:
1. be directed to the uncertain big disturbance that produces of network, the inventive method has adopted following steps:
1-1. the deviate size of register configuration is passed through in this locality from time deviation between clock and the master clock and user relatively for the first time, if local from the time deviation between clock and the master clock greater than the deviate of user by register configuration, then do not consider as once the crossing large disturbance of chance in the network, promptly filtered deviation this time, this locality had not been adjusted from the time of clock; If this locality is less than or equal to the deviate of user by register configuration from the time deviation between clock and the master clock, adjust local time from clock according to this time deviation value;
If 1-2. the adjacent second time this locality from the time deviation between clock and the master clock still greater than the deviate of user by register configuration, judge that then present interference is not accidental the existence, record is this time local from the time deviation value between clock and the master clock, adjust local time according to this time deviation value, can improve local precision from the clock synchronization to the master clock from clock.Adjust local time method according to the time deviation value and adopt existing mature technology from clock.
2. there is deviation in the speed that is directed to each equipment clock crystal oscillator, and the present invention has adopted following steps:
2-1. local compare to time interval of the double transmission of master clock Sync sync message with from the double time interval that receives the Sync sync message that master clock sends of clock from clock, if both equate, then think and the crystal oscillator speed unanimity of two equipment do not have deviation; If the double transmission of master clock Sync sync message interval greater than from the double time interval that receives the Sync sync message that master clock sends of clock, then think local fast than master clock from the clock crystal oscillator operation, need slow down from the timing of clock system time, forward step 2-2 then to; If less than, then think local slow than master clock from the clock crystal oscillator operation, need accelerate timing from the clock system time, forward step 2-2 then to;
2-2., promptly on each point of mean allocation, adjust local system time from clock with time interval of the double transmission of master clock Sync sync message with within from the difference mean allocation at the interval in the double time interval that receives the Sync sync message that master clock sends of clock to sync interval.So promptly can guarantee to regulate the speed evenly, can also guarantee simultaneously this locality to be finished from the crystal oscillator compensation of clock within interval in synchronizing cycle.
Related operation (as register configuration, subtraction etc.) among the present invention is a basic fundamental general knowledge, adopts the routine techniques means.Inventive point of the present invention is to provide a kind of comparatively advanced real-time synchronization method.
The present invention is based on the IEEE1588 agreement and proposed a kind of method that improves the real-time synchronization accuracy of each equipment in the distributed network, this method has solved big disturbance and each the equipment crystal oscillator speed that the network uncertainty causes and has had the problem of deviation, thereby makes synchronization accuracy reach the microsecond level.
Description of drawings
Fig. 1 is the flow chart of adjusting at large disturbance in the inventive method;
Fig. 2 is the flow chart of adjusting at the crystal oscillator velocity deviation in the inventive method.
Embodiment:
The invention will be further described below in conjunction with accompanying drawing and embodiment.
As Fig. 1, the inventive method may further comprise the steps at the uncertain big perturbed problem embodiment that produces of network:
1, local from clock calculation go out and master clock between time deviation;
2, according to the time deviation in the above-mentioned steps 1, it is compared by the deviate of register configuration with the user, if greater than the deviate of user, then give up to fall the time deviation that is calculated specifically by register configuration, the while is the deviation-rectifying system time not.Simultaneously we can to analyze and draw this be because the once accidental big disturbance in the network causes such result.If be less than or equal to the deviate of user, then adjust local time from clock according to this time deviation value by register configuration;
3, adjacent second time this locality from the time deviation between clock and the master clock still greater than the deviate of user by register configuration, judge that then present interference is not accidental the existence, record is this time local from the time deviation value between clock and the master clock, adjust local time according to this time deviation value, can improve local precision from the clock synchronization to the master clock from clock.
As Fig. 2, the inventive method exists deviation to compensate embodiment at the speed of each equipment clock crystal oscillator to may further comprise the steps:
1, local from time interval that clock calculation goes out the double transmission sync message of master clock;
2, locally go out the double time interval that receives the sync message that master clock sends from clock calculation;
3, according to two time intervals that calculate in above-mentioned steps 1 and 2, deduct the double time interval that receives the sync message that master clock sends with time interval of double transmission sync message, if subtracting each other the result is 0, then show the crystal oscillator speed unanimity of two equipment, there is not deviation; If subtract each other the result greater than 0, then explanation is local very fast from the operation of clock crystal oscillator speed, and the timing of the system time that need slow down promptly reduces the frequency of timing enable signal, also promptly increases divide ratio, forwards step 4 simultaneously to; If subtract each other the result less than 0, then explanation is local slower from the operation of clock crystal oscillator speed, needs to accelerate the timing of system time, promptly the frequency of timing enable signal is increased, and also promptly reduces divide ratio, forwards step 4 simultaneously to;
4, poor according to the double transmission time interval that calculates in the above-mentioned steps 3 and double time of reception interval at interval, this difference mean allocation at interval within the sync interval, promptly only on each point of mean allocation, adjust local system time from clock, this improve one's methods promptly can guarantee to regulate the speed evenly, feasible adjustment is more stable, can also guarantee simultaneously this locality to be finished from the crystal oscillator compensation of clock within the interval in synchronizing cycle;
Method according to above-mentioned steps 4 is adopted specifically comprises:
4-1. at interval difference mean allocation within the sync interval, promptly on each point of mean allocation, adjust local system time from clock, then at first should calculate the time of each adjustment one-period and need adjust how many times;
4-2. according to the adjustment number of times that above-mentioned steps 4-1 calculates, calculate synchronizing cycle at interval in each point of mean allocation, promptly after the adjustment algorithm startup, every through how long adjusting once.

Claims (1)

1. method that improves clock synchronization accuracy in the distributed network system (DNS) comprises at the adjustment of the uncertain big disturbance that produces of network with at the speed of each equipment clock crystal oscillator having the adjustment of deviation, it is characterized in that:
The method of adjustment that is directed to the uncertain big disturbance that produces of network comprises the steps:
A. the relatively for the first time more local deviate size of passing through register configuration from the time deviation between clock and the master clock and user, if local from the time deviation between clock and the master clock greater than the deviate of user by register configuration, then once cross large disturbance and do not consider, this locality was not adjusted from the time of clock as accidental in the network; If this locality is less than or equal to the deviate of user by register configuration from the time deviation between clock and the master clock, adjust local time from clock according to this time deviation value;
If the b. adjacent second time this locality from the time deviation between clock and the master clock still greater than the deviate of user by register configuration, judge that then present interference is not accidental the existence, record is this time local from the time deviation value between clock and the master clock, adjusts the local time from clock according to this time deviation value;
Speed at each equipment clock crystal oscillator exists the method for adjustment of deviation to comprise the steps:
C. locally compare to time interval of the double transmission of master clock Sync sync message with from the double time interval that receives the Sync sync message that master clock sends of clock from clock, if both equate, then think and the crystal oscillator speed unanimity of two equipment do not have deviation; If the double transmission of master clock Sync sync message interval greater than from the double time interval that receives the Sync sync message that master clock sends of clock, then think local fast than master clock from the clock crystal oscillator operation, need slow down from the timing of clock system time, forward steps d then to; If less than, then think local slow than master clock from the clock crystal oscillator operation, need accelerate timing from the clock system time, forward steps d then to;
D. with time interval of the double transmission of master clock Sync sync message with within, promptly on each point of mean allocation, adjust local system time from clock from the difference mean allocation at the interval in the double time interval that receives the Sync sync message that master clock sends of clock to sync interval; Specifically: the time that at first calculates each adjustment one-period need be adjusted how many times; Then according to the adjustment number of times that calculates, calculate synchronizing cycle at interval in each point of mean allocation, promptly after the adjustment algorithm startup, every through how long adjusting once.
CN2008100598607A 2008-02-22 2008-02-22 Method for enhancing clock synchronization accuracy in distributed network system Expired - Fee Related CN101252429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100598607A CN101252429B (en) 2008-02-22 2008-02-22 Method for enhancing clock synchronization accuracy in distributed network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100598607A CN101252429B (en) 2008-02-22 2008-02-22 Method for enhancing clock synchronization accuracy in distributed network system

Publications (2)

Publication Number Publication Date
CN101252429A CN101252429A (en) 2008-08-27
CN101252429B true CN101252429B (en) 2010-09-22

Family

ID=39955627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100598607A Expired - Fee Related CN101252429B (en) 2008-02-22 2008-02-22 Method for enhancing clock synchronization accuracy in distributed network system

Country Status (1)

Country Link
CN (1) CN101252429B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104977978A (en) * 2015-07-17 2015-10-14 上海无线电设备研究所 Acquiring and processing method for non-synchronizing signals of system clock

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834712B (en) * 2010-04-19 2012-11-14 浙江大学 Method for realizing accurate time synchronization by utilizing IEEE1588 protocol
EP2568631B1 (en) * 2011-09-09 2018-04-25 Siemens Aktiengesellschaft Method for transmitting synchronisation messages in a communications network
CN103999387B (en) * 2011-11-11 2017-05-17 爱立信(中国)通信有限公司 Sync interval determination
CN103368721A (en) * 2013-07-23 2013-10-23 电子科技大学 Computing method for transparent clock in time-triggered Ethernet
CN103546269B (en) * 2013-10-16 2016-12-07 瑞斯康达科技发展股份有限公司 A kind of lock in time message screening technique and device
CN104184535B (en) * 2014-09-12 2017-04-12 四川九洲电器集团有限责任公司 Clock synchronization method and clock synchronization device
CN105515704A (en) * 2014-09-23 2016-04-20 深圳市中兴微电子技术有限公司 Clock synchronization method and optical network unit
CN105680969A (en) * 2015-12-31 2016-06-15 浙江中控技术股份有限公司 Clock synchronization method and device
CN105790920B (en) * 2016-02-24 2018-09-14 华东交通大学 Distribution node clock synchronizing method in network system
CN106027191B (en) * 2016-05-23 2018-09-21 北京小米移动软件有限公司 Update method, device and the terminal device of time
CN106301653B (en) * 2016-08-17 2019-05-14 中国航空工业集团公司西安飞行自动控制研究所 A kind of distribution node clock correcting method of Distributed real-time tasks
CN106454473B (en) * 2016-10-08 2019-12-03 Oppo广东移动通信有限公司 Clock adjustment, device, terminal and play system
CN112217588B (en) * 2019-07-10 2021-11-16 烽火通信科技股份有限公司 Timestamp jitter compensation method and system
CN110953682B (en) * 2019-12-17 2021-05-11 珠海格力电器股份有限公司 Air conditioning system and time correction method of GPRS module thereof
CN113098646B (en) * 2020-01-08 2022-08-05 大唐移动通信设备有限公司 Time synchronization method and device, electronic equipment and storage medium
CN112235068A (en) * 2020-10-14 2021-01-15 许继集团有限公司 Master-slave machine synchronization method and device for distributed power system
CN114089258B (en) * 2021-11-10 2023-12-26 河南源网荷储电气研究院有限公司 Clock acceleration simulation operation method and system for intelligent electric energy meter
CN116436555B (en) * 2023-06-09 2023-08-18 新华三技术有限公司 Time synchronization method and device and distributed network equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845546A (en) * 2006-03-15 2006-10-11 重庆邮电学院 Accurate time synchronization method and system facing measurement and control
CN101068128A (en) * 2006-05-02 2007-11-07 三星电子株式会社 Method for time synchronization in distributed control system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845546A (en) * 2006-03-15 2006-10-11 重庆邮电学院 Accurate time synchronization method and system facing measurement and control
CN101068128A (en) * 2006-05-02 2007-11-07 三星电子株式会社 Method for time synchronization in distributed control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104977978A (en) * 2015-07-17 2015-10-14 上海无线电设备研究所 Acquiring and processing method for non-synchronizing signals of system clock
CN104977978B (en) * 2015-07-17 2018-04-17 上海无线电设备研究所 A kind of collection and processing method for the asynchronous signal of system clock

Also Published As

Publication number Publication date
CN101252429A (en) 2008-08-27

Similar Documents

Publication Publication Date Title
CN101252429B (en) Method for enhancing clock synchronization accuracy in distributed network system
CN103532652B (en) A kind of time synchronism apparatus and method
CN106603183B (en) A kind of timestamp filter method and device
CN105743598B (en) A kind of Industrial Ethernet clock synchronizing method and system
CN102769504B (en) A kind of 1588 systems and realize synchronous method
CN102412957B (en) High-precision synchronous clock adjusting method
CN107786294B (en) A kind of centralized 1588 realization system and method
CN102082653B (en) Method, system and device for clock synchronization
CN102301639B (en) Method and device for correcting clock jitter
CN103995471A (en) Clock synchronization method of distributed control system
CN103532693B (en) Time synchronizing device and method
CN106160914B (en) A kind of IEEE1588 clock synchronizing methods based on disturbance-observer feedback control technology
CN104468014A (en) Method for improving time synchronization precision under complex network environment
CN106559157A (en) A kind of clock synchronizing method, device and communication equipment
CN104184534A (en) Method for achieving accuracy of transparent clock path delay of IEEE1588 protocol
CN105634641A (en) Precise timing system and method based on cascade network communication of switching architecture
CN108134644B (en) Synchronous method, device, synchronizer and system
CN101778468A (en) Base station synchronizing method and device
CN101686093A (en) Transmission network clock synchronizing method, equipment and system
CN103117829A (en) Method or device for time synchronization and compensation between asymmetrical networks
CN106100783A (en) The synchronous method of a kind of Intelligent substation merging unit data acquisition and device
CN107181553A (en) A kind of method that exact time synchronization is carried out inside servo-driver
CN104486058A (en) PTP system time synchronization method and device
CN201557117U (en) GPS and nanosecond NTP two-way inputted synchronous networking clock
CN102571253B (en) Method and equipment for implementing precise time synchronization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100922

Termination date: 20130222