CN108803300B - Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator - Google Patents

Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator Download PDF

Info

Publication number
CN108803300B
CN108803300B CN201810503127.3A CN201810503127A CN108803300B CN 108803300 B CN108803300 B CN 108803300B CN 201810503127 A CN201810503127 A CN 201810503127A CN 108803300 B CN108803300 B CN 108803300B
Authority
CN
China
Prior art keywords
value
frequency
alpha
time
crystal oscillator
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
Application number
CN201810503127.3A
Other languages
Chinese (zh)
Other versions
CN108803300A (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.)
Xuji Group Co Ltd
XJ Electric Co Ltd
Xuchang XJ Software Technology Co Ltd
Original Assignee
Xuji Group Co Ltd
XJ Electric Co Ltd
Xuchang XJ Software Technology Co Ltd
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 Xuji Group Co Ltd, XJ Electric Co Ltd, Xuchang XJ Software Technology Co Ltd filed Critical Xuji Group Co Ltd
Priority to CN201810503127.3A priority Critical patent/CN108803300B/en
Publication of CN108803300A publication Critical patent/CN108803300A/en
Application granted granted Critical
Publication of CN108803300B publication Critical patent/CN108803300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS

Abstract

The invention relates to a time synchronization device timekeeping method and a time synchronization device based on a constant-temperature crystal oscillator, wherein in timekeeping, the actual frequency of a reference frequency provided by the constant-temperature crystal oscillator and the pulse frequency in each second are obtained under the condition that a synchronous clock source exists; according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, recording the sum as a beta value, and sequentially storing the obtained sums into a buffer queue; then, when the synchronous clock source is lost, correspondingly processing the obtained beta value to obtain a frequency compensation value of the constant-temperature crystal oscillator so as to predict the frequency change of the constant-temperature crystal oscillator; and finally, generating a time-keeping second pulse according to the frequency compensation value to realize the time keeping of the time synchronization device. Therefore, the method can predict and compensate the frequency change caused by insufficient preheating of the constant-temperature crystal oscillator, and reduces the subsequent time keeping error and improves the time keeping accuracy of the synchronous clock.

Description

Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator
Technical Field
The invention relates to a time keeping method and a time synchronization device of a time synchronization device based on a constant temperature crystal oscillator.
Background
With the continuous enlargement of the scale of the power system, the devices, equipment and functions of the transformer substation are continuously enhanced, the system structure is gradually complicated, and the requirement on the time precision is higher and higher. Therefore, clock synchronization techniques are widely used in power. At present, clock synchronization is widely used in protection devices, scheduling systems, fault recorders, EMS energy management systems, distributed RTUs (remote terminals), telemetry, remote signaling data processing, integrated automation systems, and line fault location.
At present, a time synchronization device generally adopts a Beidou satellite and a GPS satellite antenna as synchronization time sources to realize accurate time service, adopts a high-precision constant-temperature crystal oscillator as reference frequency, and provides time keeping frequency after the synchronization time sources are lost. However, the better the constant temperature crystal oscillator performance, the longer the crystal oscillator preheating and taming time. When the crystal oscillator is not sufficiently preheated, the frequency of the crystal oscillator changes greatly. The time synchronizer requires the device to finish the crystal oscillator taming within 2 hours to reach the time keeping precision requirement of 1 us/h. During this time period, the constant temperature crystal oscillator does not warm up sufficiently. Meanwhile, the thermal frequency characteristic change characteristic of the constant-temperature crystal oscillator is obtained according to research and experimental data and basically changes according to a certain rule, so that the time-keeping compensation can be carried out by predicting the crystal oscillator frequency change.
Disclosure of Invention
The invention aims to provide a time keeping method of a time synchronization device based on a constant temperature crystal oscillator, which is used for solving the problem of large time keeping error caused by insufficient preheating of the constant temperature crystal oscillator in the conventional time synchronization device. The invention also provides a time synchronization device based on the constant-temperature crystal oscillator.
In order to achieve the purpose, the scheme of the invention comprises a time keeping method of a time synchronization device based on a constant temperature crystal oscillator, which comprises the following steps:
(1) under the condition of a synchronous clock source, acquiring the actual frequency of a reference frequency provided by a constant-temperature crystal oscillator and the pulse frequency in each second;
(2) according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, recording the sum as a beta value, and sequentially storing the obtained sums into a buffer queue;
(3) when the synchronous clock source is lost, correspondingly processing the obtained beta value to obtain a frequency compensation value of the constant-temperature crystal oscillator so as to predict the change of the frequency of the constant-temperature crystal oscillator;
(4) and generating a time-keeping second pulse according to the frequency compensation value to realize the time keeping of the time synchronization device.
And predicting the frequency change of the constant-temperature crystal oscillator when the constant-temperature crystal oscillator is not fully preheated, and further correspondingly compensating the frequency change. Under the condition of a synchronous clock source, acquiring the actual frequency of a reference frequency provided by a constant-temperature crystal oscillator and the pulse frequency in each second; then according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, and sequentially storing the obtained sums into a buffer queue; and then, when the synchronous clock source is lost, correspondingly processing the obtained sum value to obtain a frequency compensation value of the constant temperature crystal oscillator so as to predict the frequency change of the constant temperature crystal oscillator. By the method, the frequency change caused by insufficient preheating of the constant-temperature crystal oscillator can be predicted and compensated, and the subsequent time-keeping error is reduced. The time-keeping second pulse is generated according to the frequency compensation value, so that the time keeping of the time synchronization device is realized, the time keeping accuracy of the preheating period of the crystal oscillator is ensured, the output stability of the second pulse is ensured, the time keeping accuracy of the synchronous clock is improved, and the frequency error caused by insufficient preheating of the constant-temperature crystal oscillator in the traditional time keeping method can be well eliminated.
When the synchronous clock source is lost, the following processing is carried out on each beta value: according to the sequence of time from back to front, the sum of every M beta values is obtained and recorded as an alpha value, and the time period corresponding to each alpha value is M times of the set seconds; according to the sequence of time from back to front, the sum of every N alpha values is obtained and recorded as
Figure BDA0001671012420000021
Value of each
Figure BDA0001671012420000022
The value corresponds to a time period M x N times the set number of seconds.
The calculation formulas of the frequency compensation values are respectively as follows: delta tick2i+1+ alpha (1) and Δ tick2i+2+ α (2); Δ tick was calculated as:
Figure BDA0001671012420000023
……
Δtick2i+1=Δtick2i+2=Δtick2i-1/2,
wherein, i is 1, 2, … …, and the time period corresponding to Δ tick is equal to the time period corresponding to α value; alpha (1) is the alpha value corresponding to the last time period before the synchronous clock source is lost, and alpha (2) is the alpha value corresponding to the adjacent previous time period of alpha (1).
Delta tick using remainder equitable method2i+1+ alpha (1) and Δ tick2i+2And + alpha (2) are respectively averagely distributed into a plurality of parts, two groups of second pulse counting values are formed, when each counting value reaches, one second pulse output is generated, when the second pulse output formed by the two groups of second pulse counting values is finished, i is added with 1, and delta tick is recalculated2i+1+ alpha (1) and Δ tick2i+2+ α (2) and generate a corresponding pulse-per-second output.
And carrying out monotonicity judgment on the change of the frequency of the constant-temperature crystal oscillator, and predicting the change of the frequency if the frequency is monotonicity change.
The invention also provides a time synchronization device based on the constant-temperature crystal oscillator, which comprises a time keeping module executing the following time keeping strategies:
(1) under the condition of a synchronous clock source, acquiring the actual frequency of a reference frequency provided by a constant-temperature crystal oscillator and the pulse frequency in each second;
(2) according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, recording the sum as a beta value, and sequentially storing the obtained sums into a buffer queue;
(3) when the synchronous clock source is lost, correspondingly processing the obtained beta value to obtain a frequency compensation value of the constant-temperature crystal oscillator so as to predict the change of the frequency of the constant-temperature crystal oscillator;
(4) and generating a time-keeping second pulse according to the frequency compensation value to realize the time keeping of the time synchronization device.
When the synchronous clock source is lost, the following processing is carried out on each beta value: according to the sequence of time from back to front, the sum of every M beta values is obtained and recorded as an alpha value, and the time period corresponding to each alpha value is M times of the set seconds; according to the sequence of time from back to front, the sum of every N alpha values is obtained and recorded as
Figure BDA0001671012420000031
Value of each
Figure BDA0001671012420000032
The value corresponds to a time period M x N times the set number of seconds.
The calculation formulas of the frequency compensation values are respectively as follows: delta tick2i+1+ alpha (1) and Δ tick2i+2+ α (2); Δ tick was calculated as:
Figure BDA0001671012420000041
……
Δtick2i+1=Δtick2i+2=Δtick2i-1/2,
wherein, i is 1, 2, … …, and the time period corresponding to Δ tick is equal to the time period corresponding to α value; alpha (1) is the alpha value corresponding to the last time period before the synchronous clock source is lost, and alpha (2) is the alpha value corresponding to the adjacent previous time period of alpha (1).
Delta tick using remainder equitable method2i+1+ alpha (1) and Δ tick2i+2And + alpha (2) are respectively averagely distributed into a plurality of parts, two groups of second pulse counting values are formed, when each counting value reaches, one second pulse output is generated, when the second pulse output formed by the two groups of second pulse counting values is finished, i is added with 1, and delta tick is recalculated2i+1+ alpha (1) and Δ tick2i+2+ α (2) and generate a corresponding pulse-per-second output.
And carrying out monotonicity judgment on the change of the frequency of the constant-temperature crystal oscillator, and predicting the change of the frequency if the frequency is monotonicity change.
Drawings
FIG. 1 is a schematic diagram of a time synchronization apparatus;
FIG. 2 is a schematic diagram of the frequency variation of a constant temperature crystal oscillator;
FIG. 3 is a graph of alpha values and
Figure BDA0001671012420000042
a schematic diagram of the calculation mode of the value;
FIG. 4 is a flowchart of a time keeping method;
FIG. 5 is a graph comparing an uncompensated and a compensated output PPS.
Detailed Description
The invention provides a time synchronization device time keeping method based on a constant temperature crystal oscillator, which comprises the following steps:
(1) under the condition of a synchronous clock source, acquiring the actual frequency of a reference frequency provided by a constant-temperature crystal oscillator and the pulse frequency in each second;
(2) according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, and sequentially storing the obtained sums into a buffer queue;
(3) when the synchronous clock source is lost, correspondingly processing the obtained sum value to obtain a frequency compensation value of the constant-temperature crystal oscillator so as to predict the frequency change of the constant-temperature crystal oscillator;
(4) and generating a time-keeping second pulse according to the frequency compensation value to realize the time keeping of the time synchronization device.
Based on the basic idea of the time-keeping method, the steps of the method are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the time synchronizer outputs a time-keeping second pulse by using the FPGA, the FPGA is in communication connection with the CPU, and the time-keeping of the time synchronizer is realized by the FPGA and the CPU. Therefore, in this embodiment, the time synchronization apparatus includes an FPGA and a CPU. Since the FPGA and the CPU realize the time-keeping function of the synchronous time device, the FPGA and the CPU can be called time-keeping modules according to the function.
The constant temperature crystal oscillator provides working frequency f, namely provides reference pulse with frequency f, and the FPGA uses the frequency as counting reference to mark tick time mark on the second pulse of the synchronous clock source synchronous signal. If the tick time scale of the second pulse within N seconds is assumed to be C, the actual oscillation frequency of the constant temperature crystal oscillator can be calculated according to the CPU, and is as follows:
f=C/N
then, the number of reference pulses from the oven controlled crystal oscillator between two adjacent second pulses from the synchronous clock source should be the value of the frequency f.
The CPU selects a synchronous time source signal according to the time source logic, and stores a tick time scale corresponding to the effective second pulse, that is, a reference pulse interval value provided by the constant temperature crystal oscillator, into the RAM buffer area in sequence according to the time sequence for facilitating subsequent data processing, where the size of the buffer area is set to 64 in this embodiment.
And when the buffer area is full, performing sum statistics on 64 time intervals of the buffer area to obtain a sum value, wherein one time interval corresponds to 1 second pulse, and the corresponding time is 1 second, so that the 64 time intervals represent the number of reference pulses emitted by the constant temperature crystal oscillator within 64 seconds, namely, the number of reference pulses emitted by the constant temperature crystal oscillator within 64 seconds is added. Then, as the time flows, the sum of the number of reference pulses emitted by the oven controlled crystal within 64 seconds is calculated every 64 seconds, and the sum is recorded as a β value. In addition, since the reference frequency emitted by the constant temperature crystal oscillator is in the order of 100MHz, in order to prevent the value from being too large to be accurately buffered, that is, in order to prevent the CPU from losing valid bits, the β value is calculated in the following way: subtracting a standard value from the number of pulses per second corresponding to the actual frequency sent by the constant-temperature crystal oscillator within each second to obtain a difference value, wherein the standard value is the number of pulses per second corresponding to the nominal frequency of the constant-temperature crystal oscillator, and thus, the numerical value of the difference value corresponding to each second is not very large, so that the loss of the effective bit is prevented, and the calculation formula is as follows:
Figure BDA0001671012420000061
wherein, t0For constant temperature crystal oscillator at nominal frequency f0The following second pulse interval value, i.e. the number of reference pulses per second, for example: value 99999950, tiThe pulse number per second of the constant temperature crystal oscillator under the actual frequency is shown.
And acquiring a beta value every 64 seconds, and then sequentially storing the acquired beta values into a buffer queue, wherein in the embodiment, 512 buffer queues are set and enqueued according to the actual sequence, so that the latest beta value counted every 64 seconds of the crystal oscillator frequency can be acquired from the buffer queue.
Therefore, as can be seen from the above equation, f ═ is (64 β + t)0) Therefore, the beta value can clearly reflect the frequency change of the constant temperature crystal oscillator. The starting-up characteristics of the constant-temperature crystal oscillator are as follows: the frequency value of the constant temperature crystal oscillator in the early stage of preheating changes greatly within a period of time, which is the starting-up characteristic of the constant temperature crystal oscillator, and the frequency output of the constant temperature crystal oscillator is stable along with the lengthening of the starting-up preheating time. For different crystal oscillators, the starting-up characteristics are different, the same crystal oscillator is used in time, and the repeated test results may also be different. When the same crystal oscillator is started, the frequency change trend and the starting characteristic are within a certain range and have small change, and the opportunity is provided for realizing time-keeping compensation.
The obtained beta buffer variables can clearly describe the startup characteristics of the crystal oscillator, as shown in fig. 2, fig. 2 is a beta-t diagram, and is also a schematic diagram of the frequency variation of the constant temperature crystal oscillator. From this figure, the tick counts per 64 seconds of the oven controlled crystal oscillator can be seen as a function of time. Changes were evident over the first 100 cycles (100 × 64 ═ 6400 s). Indicating that the crystal oscillator is not preheated sufficiently at this time. Along with the movement of time, the frequency change of the crystal oscillator tends to be stable, and the change trend tends to be stable. What we want to do is to predict this behavior based on crystal preheating, thus achieving more accurate time keeping performance.
When the external synchronous clock source is lost, the calculation is carried out according to the beta value in the buffer queue from the most recent time to the front, namely according to the sequence of the time from the back to the front: calculate the sum of every 8 beta values, denoted alpha value, and then calculate the sum of every two alpha values, denoted alpha value
Figure BDA0001671012420000071
The value is obtained. Where α (1), α (2), and … … are derived from the time the external synchronizing clock source is lost, α (1) is the sum of the latest 64 × 8 to 512s pulses, α (2) is the sum of the first 64 × 8 to 512s pulses of α (1), and so on. The same thing as the value of alpha is true,
Figure BDA0001671012420000072
… … are also derived forward from the time the external synchronous clock source is lost,
Figure BDA0001671012420000073
is the sum of the most recent 64 x 8 x 2 to 1024s pulses,
Figure BDA0001671012420000074
is that
Figure BDA0001671012420000075
The sum of the first 64 x 8 x 2-1024 s pulses, and so on, i.e.
Figure BDA0001671012420000076
In the present embodiment, 64 α values, α (1), α (2), … …, and α (64), respectively, are obtained from β values, and 32 values are obtained
Figure BDA0001671012420000077
The value of the one or more of,
Figure BDA0001671012420000078
as shown in FIG. 3, from bottom to top, represents the time from the most recent forward, i.e., the time is calculated in order from the back to the front, α (n) and
Figure BDA0001671012420000079
i.e. the tick number in the crystal frequency at the pulse interval of seconds.
In addition, to prevent constant temperature crystallizationThe influence of the random variation randomness of the oscillator needs to judge the stability of the crystal oscillator frequency during preheating, and the frequency is predicted and adjusted only when the crystal oscillator frequency changes monotonously. The monotonicity judgment of the synchronous pulse interval tick is carried out according to the actual performance of the constant-temperature crystal oscillator, and the following judgment mode is given: selecting 4
Figure BDA00016710124200000710
Values of respectively
Figure BDA00016710124200000711
Computing
Figure BDA00016710124200000712
Figure BDA00016710124200000713
If the two inequalities are satisfied simultaneously, the crystal oscillation frequency is considered to be monotonously changed in this period.
In the judgment of monotonicity, only the frequency of the crystal oscillator preheating stage is judged and adjusted, namely synchronous second pulse information of at least 1.5 hours is stored in a buffer area, and the frequency change after timekeeping is predicted. If the monotonicity is established, subsequent frequency prediction and compensation are carried out; if the monotonicity is not established, compensation is not carried out, and the time keeping pulse is generated only according to the 1024-second pulse information stored finally, which is not the invention point of the application and is not described in detail here.
In order to eliminate the normal distribution error of the crystal oscillator, the time synchronization device generates output pulse-per-second buffer queue data after performing crystal oscillator frequency compensation according to the second interval TICK value of the last 1024s, namely the reference samples are alpha (1) and alpha (2), and the compensation method comprises the following steps:
f=(Δticki+α(j))/N+f0
f is the actual output frequency of the crystal oscillator, f0Is the nominal frequency of the constant temperature crystal oscillator. Then:
Δf=f-f0=(Δticki+α(j))/N
therefore, as long as Δ tickiReasonable selection and convenient useAn accurate actual output frequency can be obtained.
According to the compensation value calculation method, the error between the output frequency and the actual output frequency of the constant temperature crystal oscillator can be minimized, and the time keeping accuracy of the time synchronizer can be ensured, i is 1, 2, … …
Figure BDA0001671012420000081
……
Δtick2i+1=Δtick2i+2=Δtick2i-1/2
The time period corresponding to Δ tick is equal to the time period corresponding to the α value, and is 512 seconds each. Delta tick1Is the compensation value, Δ tick, corresponding to the last 512 seconds2Is Δ tick1The first 512 seconds corresponding to the offset value, and so on. In addition, when Δ tick is 1, the compensation is stopped.
After obtaining Δ tick, Δ tick after compensation2i+1+ alpha (1) and Δ tick2i+2The value of + α (2) generates two sets of 512 tick counter intervals and outputs the second pulse in a counter cycle.
In this embodiment, the pulse-per-second output sequence is generated by a remainder sharing method, which is described in patent application No. CN201410689747.2 entitled "a high-efficiency crystal oscillator frequency timekeeping method". The array of second pulses generated using the remainder equity method is more uniform than the originally acquired 512 tick values, but the tick sums are not lost.
Compensating delta tick by using remainder sharing method2i+1+ alpha (1) and Δ tick2i+2+ α (2) was equally divided into 512 parts, respectively, to form 2 sets of relatively uniform 512 second pulse value values.
The FPGA counts the real-time frequency of the crystal oscillator, 2 groups of second pulse value numerical values are sequentially taken out and generated according to a remainder sharing method, and one second pulse output is generated when each counting value is reached. After 2 groups of counting values are output, i is added with 1, and the compensation delta tick is calculated again2i+1+ alpha (1) and Δ tick2i+2+ alpha (2), and alternately generating timekeepingThe pulse per second realizes the aim of keeping time after the synchronous clock source is lost. That is, first, the compensated Δ tick is divided by the remainder sharing method1+ alpha (1) and Δ tick2The + alpha (2) is respectively and averagely distributed into 512 parts to form 2 groups of relatively uniform 512 second pulse value values, and each count value arrives to generate one second pulse output. When the 2 sets of count values are output, the compensation Δ tick is calculated3+ alpha (1) and Δ tick4+ α (2), and then the compensated Δ tick3+ alpha (1) and Δ tick4The + alpha (2) is respectively and averagely distributed into 512 parts to form 2 groups of relatively uniform 512 second pulse value values, and each count value arrives to generate one second pulse output. When the 2 sets of count values are output, the compensation Δ tick is calculated5+ alpha (1) and Δ tick6+ α (2) to generate a second pulse value, each count value arriving, i.e. producing a second pulse output. And by analogy, the punctuality second pulse is alternately generated, and the aim of punctuality after the synchronous clock source is lost is fulfilled.
FIG. 4 is a flow chart diagram of a time keeping method.
FIG. 5 is a graph comparing an uncompensated and a compensated output PPS. As can be seen, the uncompensated PPS sequence and the compensated PPS sum up a deviation Δ tick (as shown by the large shaded portion) among the 512 PPS, which is evenly distributed to the small shaded portion of the single PPS output. The compensation value Δ tick1 corrects the frequency error Δ f due to the crystal frequency variation, so that the time error caused by outputting 512 PPS is reduced.
The specific embodiments are given above, but the present invention is not limited to the described embodiments. The basic idea of the present invention lies in the above basic scheme, and it is obvious to those skilled in the art that no creative effort is needed to design various modified models, formulas and parameters according to the teaching of the present invention. Variations, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention, and still fall within the scope of the invention.

Claims (4)

1. A time synchronization device time keeping method based on a constant temperature crystal oscillator is characterized by comprising the following steps:
(1) under the condition of a synchronous clock source, acquiring the actual frequency of a reference frequency provided by a constant-temperature crystal oscillator and the pulse frequency in each second;
(2) according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, recording the sum as a beta value, and sequentially storing the obtained sums into a buffer queue;
(3) when the synchronous clock source is lost, correspondingly processing the obtained beta value to obtain a frequency compensation value of the constant-temperature crystal oscillator so as to predict the change of the frequency of the constant-temperature crystal oscillator;
(4) generating a time-keeping second pulse according to the frequency compensation value to realize the time keeping of the time synchronization device;
when the synchronous clock source is lost, the following processing is carried out on each beta value: according to the sequence of time from back to front, the sum of every M beta values is obtained and recorded as an alpha value, and the time period corresponding to each alpha value is M times of the set seconds; according to the sequence of time from back to front, the sum of every N alpha values is obtained and recorded as
Figure FDA0002496491520000011
Value of each
Figure FDA0002496491520000012
The time period corresponding to the value is M times N times of the set seconds;
the calculation formulas of the frequency compensation values are respectively as follows: delta tick2i+1+ alpha (1) and Δ tick2i+2+ α (2); Δ tick was calculated as:
Figure FDA0002496491520000013
……
Δtick2i+1=Δtick2i+2=Δtick2i-1/2,
wherein, i is 1, 2, … …, and the time period corresponding to Δ tick is equal to the time period corresponding to α value; alpha (1) is an alpha value corresponding to the last time period before the synchronous clock source is lost, and alpha (2) is an alpha value corresponding to the adjacent previous time period of alpha (1);
delta tick using remainder equitable method2i+1+ alpha (1) and Δ tick2i+2And + alpha (2) are respectively averagely distributed into a plurality of parts, two groups of second pulse counting values are formed, when each counting value reaches, one second pulse output is generated, when the second pulse output formed by the two groups of second pulse counting values is finished, i is added with 1, and delta tick is recalculated2i+1+ alpha (1) and Δ tick2i+2+ α (2) and generate a corresponding pulse-per-second output.
2. The time keeping method for the time synchronization device based on the constant temperature crystal oscillator as claimed in claim 1, wherein monotonicity judgment is performed on the change of the frequency of the constant temperature crystal oscillator, and if the frequency is monotonicity change, the change of the frequency is predicted.
3. A time synchronization device based on a constant temperature crystal oscillator is characterized by comprising a time keeping module executing the following time keeping strategies:
(1) under the condition of a synchronous clock source, acquiring the actual frequency of a reference frequency provided by a constant-temperature crystal oscillator and the pulse frequency in each second;
(2) according to the sequence, calculating the sum of the pulse times within the set seconds every set seconds, recording the sum as a beta value, and sequentially storing the obtained sums into a buffer queue;
(3) when the synchronous clock source is lost, correspondingly processing the obtained beta value to obtain a frequency compensation value of the constant-temperature crystal oscillator so as to predict the change of the frequency of the constant-temperature crystal oscillator;
(4) generating a time-keeping second pulse according to the frequency compensation value to realize the time keeping of the time synchronization device;
when the synchronous clock source is lost, the following processing is carried out on each beta value: according to the sequence of time from back to front, the sum of every M beta values is obtained and recorded as an alpha value, and the time period corresponding to each alpha value is M times of the set seconds; according to the sequence of time from back to front, the sum of every N alpha values is obtained and recorded as
Figure FDA0002496491520000021
Value of each
Figure FDA0002496491520000022
The time period corresponding to the value is M times N times of the set seconds;
the calculation formulas of the frequency compensation values are respectively as follows: delta tick2i+1+ alpha (1) and Δ tick2i+2+α(2);
Figure FDA0002496491520000024
The calculation method is as follows:
Figure FDA0002496491520000023
……
Δtick2i+1=Δtick2i+2=Δtick2i-1/2,
wherein, i is 1, 2, … …, and the time period corresponding to Δ tick is equal to the time period corresponding to α value; alpha (1) is an alpha value corresponding to the last time period before the synchronous clock source is lost, and alpha (2) is an alpha value corresponding to the adjacent previous time period of alpha (1);
delta tick using remainder equitable method2i+1+ alpha (1) and Δ tick2i+2And + alpha (2) are respectively averagely distributed into a plurality of parts, two groups of second pulse counting values are formed, when each counting value reaches, one second pulse output is generated, when the second pulse output formed by the two groups of second pulse counting values is finished, i is added with 1, and delta tick is recalculated2i+1+ alpha (1) and Δ tick2i+2+ α (2) and generate a corresponding pulse-per-second output.
4. The apparatus according to claim 3, wherein the variation of the frequency of the oven controlled crystal oscillator is evaluated monotonously, and if the frequency varies monotonously, the variation of the frequency is predicted.
CN201810503127.3A 2018-05-23 2018-05-23 Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator Active CN108803300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810503127.3A CN108803300B (en) 2018-05-23 2018-05-23 Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810503127.3A CN108803300B (en) 2018-05-23 2018-05-23 Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator

Publications (2)

Publication Number Publication Date
CN108803300A CN108803300A (en) 2018-11-13
CN108803300B true CN108803300B (en) 2020-11-17

Family

ID=64092811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810503127.3A Active CN108803300B (en) 2018-05-23 2018-05-23 Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator

Country Status (1)

Country Link
CN (1) CN108803300B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597297B (en) * 2018-12-11 2020-09-08 烟台持久钟表有限公司 Crystal oscillator compensation method and device
CN110908272B (en) * 2019-12-20 2021-04-13 昆明理工大学 1pps pulse signal timing method
CN111817714B (en) * 2020-07-14 2024-01-26 积成电子股份有限公司 Electronic equipment time synchronization and time keeping method based on crystal oscillator second pulse synchronization technology
CN113419286B (en) * 2021-06-21 2022-01-14 中国科学院地质与地球物理研究所 High-precision frequency synthesis compensation method for complementation of satellite and constant-temperature crystal oscillator
CN116938380B (en) * 2023-09-18 2024-01-23 南方电网数字电网研究院有限公司 Time scale management method, device, computer equipment and time scale manager

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11271476A (en) * 1998-01-22 1999-10-08 Advantest Corp Reference frequency generating device
CN102004441B (en) * 2010-12-15 2012-07-04 许继集团有限公司 Adaptive crystal oscillator frequency timekeeping method
CN103427793B (en) * 2013-07-29 2016-01-20 国电南瑞科技股份有限公司 Based on temperature-compensating pair time Time keeping system and method
CN103970008B (en) * 2014-05-06 2017-02-15 积成电子股份有限公司 Timekeeping method based on crystal oscillator error compensation
CN104536285B (en) * 2014-11-25 2017-08-08 许继电气股份有限公司 A kind of efficient crystal oscillator frequency timekeeping method
CN106877963B (en) * 2016-12-29 2018-10-09 河北远东通信系统工程有限公司 A kind of synchronised clock holding system and method with learning functionality
CN107026702A (en) * 2017-04-20 2017-08-08 中国南方电网有限责任公司电网技术研究中心 The punctual method and apparatus of high accuracy

Also Published As

Publication number Publication date
CN108803300A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108803300B (en) Time synchronization device timekeeping method and time synchronization device based on constant-temperature crystal oscillator
KR101340752B1 (en) High-precision synchronisation method and system
CN109428598B (en) Calibration method and system for data sampling
CN109150351B (en) UTC time implementation method and system applied to transformer substation
CN109581856A (en) A kind of punctual method of clock synchronization based on the calibration of high-performance crystal oscillator frequency
CN102253643A (en) High-precision time measuring circuit and method
CN103269262A (en) Time-keeping method of time synchronization device
US8224606B2 (en) Measuring clock jitter
CN106383438B (en) One kind taming and dociling clock method based on sliding window time extension high-precision
CN112236942B (en) Method and apparatus for digital quartz temperature and drift compensation for sleep timers of NB-IoT devices
CN105026938B (en) Signal processing apparatus
CN109100927A (en) Without timing system time autonomous synchronous method under reference conditions of tracing to the source
CN110928177B (en) Clock synchronization system and method
KR101731698B1 (en) Time base including an oscillator, a frequency divider circuit and clocking pulse inhibition circuit
CN114047684B (en) Atomic clock joint time keeping method and device
CN106444966A (en) Device and method for adjusting real time clock (RTC)
CN114172607B (en) Synchronization device and synchronization method between main clock and standby clock
CN110618604A (en) Method and device for improving time keeping precision by using NTP auxiliary source
CN104316047A (en) Method for automatically improving time mark precision of sensor data by utilizing GPS (global positioning system)
CN112082607B (en) Time measurement device and method
CN105591632B (en) Real-time clock generation method and device
RU161053U1 (en) SYSTEM OF NETWORK SYNCHRONIZATION OF SIGNALS OF GENERATORS OF TIME TIME
CN116614129A (en) Rubidium atomic clock time domain signal stability optimization method and device
CN109039310A (en) The method and device of adaptive adjustment phase place delay
Manandhar et al. Study on the Effect of using Different Weighting Techniques in a Time Scale Algorithm to Generate an Ensemble Time

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant