A time keeping method to tame local clock
By obtaining the clock difference and temperature coefficient and using the Gauss-Seidel iterative algorithm to adjust the local clock frequency, the frequency offset and aging problems of the local clock in a temperature-changing environment are solved, achieving high-precision time maintenance and fast synchronization.
Patent Information
- Application Number
- CN202510599772.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-05-12
AI Technical Summary
In the existing technology, the frequency offset and aging problems of local clocks in temperature-changing environments have not been effectively solved, resulting in insufficient accuracy, large computational complexity, high cost, and a small scope of application.
By obtaining the clock difference between the reference signal and the local clock signal, the temperature coefficient and aging coefficient are solved using a temperature sensor and the Gauss-Seidel iterative algorithm, and the frequency of the local clock is adjusted to achieve synchronization, avoiding the use of an incubator.
Accurately tame the local clock in a temperature-changing environment, reduce costs, expand the scope of application, achieve fast time synchronization, small calculation amount and accurate results.
Smart Images

Figure CN120128165B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of time and frequency technology, and in particular to a time keeping method for taming a local clock. Background Art
[0002] With the development of atomic frequency standard technology, the application of large-scale time and frequency systems in various fields, both domestically and internationally, has been limited in recent years by their high cost and demanding operating environments. Comparatively, local clocks, with their competitive price, have become the preferred choice. However, local clocks suffer from frequency drift and aging, failing to meet the accuracy requirements of the system. Therefore, it is necessary to tame the local clocks to maintain high accuracy over time.
[0003] Currently, the timing and frequency standard synchronization methods are evolving from shortwave, longwave, and television technologies to navigation satellites. The primary principle of using navigation satellites for timing synchronization is to receive satellite signals through a navigation satellite signal receiving module and synchronize system timing and network clocks based on the 1PPS (pulse per second) signal within the received navigation satellite signals. Because navigation satellite timing requires extremely high precision, and the circuits in navigation satellite timing systems are directly exposed to the external environment, their parameters are easily affected by ambient temperature, resulting in timing unreliability, which is critical to high-precision timing systems.
[0004] The existing methods for taming local clocks often have the following disadvantages:
[0005] 1) When estimating the aging coefficient of the crystal oscillator, the influence of temperature is ignored, resulting in inaccurate aging coefficient;
[0006] 2) Using temperature control equipment such as thermostats to maintain a constant temperature results in high costs;
[0007] 3) The influence of temperature is not considered, so it is only suitable for constant temperature environment and has a small scope of application;
[0008] 4) The BP neural network model is used, which has a large amount of calculation and is not suitable for local clocks with weak computing power.
[0009] Therefore, there is an urgent need for a time keeping method that can tame a local clock in an environment with changing temperature without using an incubator. Summary of the Invention
[0010] In view of the above problems, the purpose of the present invention is to provide a time keeping method for taming a local clock, which solves the temperature coefficient and aging coefficient through Gauss-Seidel iteration to achieve taming of the local clock in a temperature-changing environment.
[0011] The present invention provides a time keeping method for taming a local clock, comprising:
[0012] Obtaining a reference signal and a clock signal of a local clock;
[0013] When the reference signal is locked, determining the clock difference between the clock signal at room temperature and the reference signal using a time interval counter;
[0014] adjusting a control voltage of the local clock according to the clock difference to change the frequency of the local clock so that the clock signal is synchronized with the reference signal;
[0015] Get the temperature through the temperature sensor;
[0016] When the reference signal loses lock, the aging coefficient and temperature coefficient of the local clock are solved by Gauss-Seidel iteration of the temperature and the clock difference, so as to adjust the clock signal according to the aging coefficient, temperature coefficient and the real-time temperature obtained by the temperature sensor.
[0017] In a possible implementation, solving the aging coefficient and the temperature coefficient of the local clock by using Gauss-Seidel iteration on the temperature and the clock difference includes:
[0018] Obtaining a preset first coefficient matrix, a preset second coefficient matrix, a clock difference, and a frequency difference;
[0019] According to the preset first coefficient matrix, the clock difference, the The temperature clock difference caused by temperature in the first iteration is solved. The aging coefficient of the iterations; where, is a positive integer;
[0020] According to the preset first coefficient matrix and the The aging coefficient of the first iteration is determined The aging clock error of iterations;
[0021] According to the said The aging clock error of the first iteration and the preset value determine the The aging frequency difference of the iteration;
[0022] According to the preset second coefficient matrix, the The aging frequency difference of the iteration is used to solve the temperature coefficient;
[0023] Calculating the temperature frequency difference and the temperature clock difference caused by the temperature according to the temperature coefficient;
[0024] Subtracting the aging clock difference and the temperature clock difference from the clock difference to obtain a test value;
[0025] When the test value is less than a preset threshold, outputting the aging coefficient and temperature coefficient;
[0026] When the test value is greater than or equal to the preset threshold, the aging coefficient and the temperature coefficient are re-solved.
[0027] In one possible implementation, the clock error of the local clock is calculated according to the following formula: :
[0028] ;
[0029] Where, for The clock difference, for Aging clock error caused by time aging, for Temperature clock difference caused by time temperature.
[0030] In one possible implementation, the following formula is used to calculate Aging clock error caused by moment aging:
[0031] ;
[0032] Where, for Aging clock error caused by time aging, is the error of the initial time, represents the relative frequency deviation, is the frequency aging rate.
[0033] In one possible implementation, the temperature frequency difference caused by temperature is calculated according to the following formula:
[0034] ;
[0035] Where, for The temperature frequency difference caused by the temperature at each moment, is the frequency error caused by the initial temperature, Represents the temperature coefficient.
[0036] In one possible implementation, the aging coefficient and temperature coefficient of the local clock are calculated according to the following formula:
[0037] ;
[0038] Where, To preset the first coefficient matrix, To preset the second coefficient matrix, is the number of iterations, For the clock difference, is the frequency difference, Indicates the The aging coefficient of the sub-Gauss-Seidel iteration, Indicates the The temperature coefficient of the sub-Gauss-Seidel iteration, For the The temperature clock difference caused by the temperature of the iteration, For the The frequency difference vector caused by aging is the first iteration.
[0039] In a possible implementation, the preset first coefficient matrix is determined according to the following formula: :
[0040] ;
[0041] Where, is the sampling time, , Is a positive integer.
[0042] In a possible implementation, the preset second coefficient matrix is determined according to the following formula: :
[0043] ;
[0044] Where, for The temperature of the moment, , Is a positive integer.
[0045] In a possible implementation, the local clock is an oven-controlled crystal oscillator, a voltage-controlled crystal oscillator, or an atomic clock.
[0046] In a possible implementation, the reference signal is a global navigation satellite system GNSS signal, a base station signal, a long-wave timing signal, or a short-wave timing signal.
[0047] The time keeping method for taming a local clock provided by the present invention has the following technical effects:
[0048] 1) It can maintain the time of the local clock in an environment with fluctuating temperature without using an incubator; using it at room temperature can reduce the cost of time maintenance, the quality and volume of the local clock, and expand the scope of application;
[0049] 2) Through simple Gauss-Seidel iteration, the temperature coefficient and aging coefficient are obtained more accurately and the separation of the two is achieved with less computational effort;
[0050] 3) Time retention is achieved. When the reference signal loses lock, the local clock can continue to synchronize with the reference signal in a short period of time.
[0051] 4) Compared with ignoring the influence of temperature and directly calculating the aging coefficient, the result is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of a flow chart of a time keeping method provided by an embodiment of the present invention;
[0053] Figure 2 This is an algorithm flow chart of the time keeping method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following detailed description of the embodiments of the present invention is provided in conjunction with the accompanying drawings and examples. The following detailed description of the embodiments and the accompanying drawings are intended to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention. That is, the present invention is not limited to the preferred embodiments described, and the scope of the present invention is defined by the claims.
[0055] In the description of the present invention, it should be noted that, unless otherwise specified, “plurality” means two or more; the terms “first”, “second”, etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance; for ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0056] Figure 1 A flow chart of a time keeping method provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the time keeping method for taming a local clock provided by the present invention includes:
[0057] Step S1, obtaining a reference signal and a clock signal of a local clock;
[0058] In a possible implementation, the local clock is an oven-controlled crystal oscillator, a voltage-controlled crystal oscillator, or an atomic clock.
[0059] In a possible implementation, the reference signal is a global navigation satellite system GNSS signal, a base station signal, a long-wave timing signal, or a short-wave timing signal.
[0060] Step S2, when the reference signal is locked, using a time interval counter to determine the clock difference between the clock signal at room temperature and the reference signal;
[0061] Step S3, adjusting the control voltage of the local clock according to the clock error to change the frequency of the local clock so that the clock signal is synchronized with the reference signal;
[0062] Step S4, obtaining the temperature through a temperature sensor;
[0063] Step S5: When the reference signal is unlocked, the aging coefficient and temperature coefficient of the local clock are solved by Gauss-Seidel iteration of temperature and clock error, so as to adjust the clock signal according to the aging coefficient, temperature coefficient and real-time temperature obtained by the temperature sensor.
[0064] In one possible implementation, solving the aging coefficient and temperature coefficient of the local clock by using Gauss-Seidel iteration of temperature and clock error includes:
[0065] Obtaining a preset first coefficient matrix, a preset second coefficient matrix, a clock difference, and a frequency difference;
[0066] According to the preset first coefficient matrix, clock difference, The temperature clock difference caused by temperature in the first iteration is solved. The aging coefficient of the iterations; where, is a positive integer;
[0067] According to the preset first coefficient matrix and the The aging coefficient of the first iteration is determined The aging clock error of iterations;
[0068] According to The aging clock error of the first iteration and the preset value determine the The aging frequency difference of the iteration;
[0069] According to the preset second coefficient matrix, The aging frequency difference of the iteration and the temperature coefficient of the frequency difference solution;
[0070] Calculate the temperature frequency difference and temperature clock difference caused by temperature based on the temperature coefficient;
[0071] Subtract the aging clock error and the temperature clock error from the clock error to obtain the test value;
[0072] When the test value is less than the preset threshold, the aging coefficient and temperature coefficient are output;
[0073] When the test value is greater than or equal to the preset threshold, the aging coefficient and temperature coefficient are re-solved.
[0074] In a possible implementation, in addition to using the least squares method to solve the temperature coefficient and the aging coefficient in the iterative process, the present invention can also use gradient descent, machine learning and other methods to solve the temperature coefficient and the aging coefficient.
[0075] In one possible implementation, the clock error of the local clock is calculated according to the following formula: :
[0076] ;
[0077] Where, for The clock difference, for Aging clock error caused by time aging, for Temperature clock difference caused by time temperature.
[0078] In one possible implementation, the local clock has good short-term frequency stability, has obvious frequency drift, and the reference signal does not lose lock for too long. A quadratic polynomial is used to fit the clock error under constant temperature conditions, and the calculation is based on the following formula: Aging clock error caused by moment aging:
[0079] ;
[0080] Where, for Aging clock error caused by time aging, is the error of the initial time, represents the relative frequency deviation, is the frequency aging rate.
[0081] In one possible implementation, the frequency-temperature curve is considered linear, and the temperature-frequency difference caused by temperature is calculated according to the following formula:
[0082] ;
[0083] Where, for The temperature frequency difference caused by the temperature at each moment, is the frequency error caused by the initial temperature, Represents the temperature coefficient.
[0084] The data that can be directly obtained in reality is discrete clock error. The relationship between clock error and frequency error is as follows:
[0085] ;
[0086] ;
[0087] Where, For the The clock difference of one hour, For the The frequency difference at each moment, is the sampling time interval;
[0088] In a possible implementation, based on the obtained n sets of discrete data ( , , ), , solve the aging coefficient and temperature coefficient of the local clock according to the following formula:
[0089] ;
[0090] Where, To preset the first coefficient matrix, To preset the second coefficient matrix, is the number of iterations, For the clock difference, For the The clock difference of one hour, is the frequency difference, For the The frequency difference at each moment, Indicates the The aging coefficient of the sub-Gauss-Seidel iteration, Indicates the Temperature coefficient of the sub-Gauss-Seidel iteration.
[0091] For the The temperature clock difference caused by temperature is the iteration, where , For the The frequency difference vector caused by aging is the first iteration.
[0092] In one possible implementation, the preset first coefficient matrix is determined according to the following formula: :
[0093] ;
[0094] Where, is the sampling time, , Is a positive integer.
[0095] In a possible implementation, the preset second coefficient matrix is determined according to the following formula: :
[0096] ;
[0097] Where, for The temperature of the moment, , Is a positive integer.
[0098] Figure 2 The algorithm flow chart of the time keeping method provided by the embodiment of the present invention is as follows: Figure 2 As shown, the present invention solves the problem according to the following algorithm.
[0099] 1) Initialize the data, let =0;
[0100] 2) Input historical data. Input clock error , frequency difference , preset the first coefficient matrix and preset the second coefficient matrix ;
[0101] 3) Solve the aging coefficient Using the formula Solution ;
[0102] 4) Calculation . Using the aging factor Calculating clock errors due to aging Sum Frequency Difference ;
[0103] 5) Solve for the temperature coefficient Using the formula Solution ;
[0104] 6) Calculation . Using the temperature coefficient Calculate the frequency difference caused by temperature and clock error vector ;
[0105] 7) Determine whether to terminate. If not satisfied and ,but , and return to step 3); otherwise, end the loop and output the aging coefficient and temperature coefficient.
[0106] The time keeping method for taming a local clock provided by the present invention has the following technical effects:
[0107] 1) It can maintain the time of the local clock in an environment with fluctuating temperature without using an incubator; using it at room temperature can reduce the cost of time maintenance, the quality and volume of the local clock, and expand the scope of application;
[0108] 2) Through simple Gauss-Seidel iteration, the temperature coefficient and aging coefficient are obtained more accurately and the separation of the two is achieved with less computational effort;
[0109] 3) Time retention is achieved. When the reference signal loses lock, the local clock can continue to synchronize with the reference signal in a short period of time.
[0110] 4) Compared with ignoring the influence of temperature and directly calculating the aging coefficient, the result is more accurate.
[0111] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A time keeping method for taming a local clock, characterized in that: include: Obtaining a reference signal and a clock signal of a local clock; When the reference signal is locked, determining the clock difference between the clock signal at room temperature and the reference signal using a time interval counter; adjusting a control voltage of the local clock according to the clock difference to change the frequency of the local clock so that the clock signal is synchronized with the reference signal; Get the temperature through the temperature sensor; When the reference signal is unlocked, solving the aging coefficient and the temperature coefficient of the local clock by Gauss-Seidel iteration of the temperature and the clock difference, so as to adjust the clock signal according to the aging coefficient, the temperature coefficient and the real-time temperature obtained by the temperature sensor; The step of solving the aging coefficient and the temperature coefficient of the local clock by using Gauss-Seidel iteration of the temperature and the clock difference includes: Obtaining a preset first coefficient matrix, a preset second coefficient matrix, a clock difference, and a frequency difference; Solving the aging coefficient of the kth iteration according to the preset first coefficient matrix, the clock difference, and the temperature clock difference caused by temperature of the k-1th iteration; wherein k is a positive integer; Determine the aging clock error of the kth iteration according to the preset first coefficient matrix and the aging coefficient of the kth iteration; Determining an aging frequency difference of the kth iteration according to the aging clock difference of the kth iteration and a preset value; Solving the temperature coefficient according to a preset second coefficient matrix, the aging frequency difference of the kth iteration, and the frequency difference; Calculating the temperature frequency difference and the temperature clock difference caused by the temperature according to the temperature coefficient; Subtracting the aging clock difference and the temperature clock difference from the clock difference to obtain a test value; When the test value is less than a preset threshold, outputting the aging coefficient and temperature coefficient; When the test value is greater than or equal to the preset threshold, re-solving the aging coefficient and the temperature coefficient; The preset first coefficient matrix A is determined according to the following formula: Where, t i is the sampling time, i=1,2,…,n, n is a positive integer; The preset second coefficient matrix B is determined according to the following formula: Where temp i t i The temperature at the moment, i = 1, 2,…, n, where n is a positive integer.
2. The time keeping method according to claim 1, characterized in that: The clock error x(t) of the local clock is calculated according to the following formula: x(t)=x t (t)+x temp (t) Where x(t) is the clock difference at time t, x t (t) is the aging clock error caused by aging at time t, x temp (t) is the temperature clock difference caused by the temperature at time t.
3. The time keeping method according to claim 2, characterized in that: The aging clock error caused by aging at time t is calculated according to the following formula: xt(t)=a0+a1t+a2t 2 Where xt(t) is the aging clock error caused by aging at time t, a0 is the error of the initial time, a1 represents the relative frequency deviation, and a2 is the frequency aging rate.
4. The time keeping method according to claim 1, characterized in that: The temperature frequency difference caused by temperature is calculated according to the following formula: ytemp(t)=b0+b1temp(t) Where ytemp(t) is the temperature-frequency difference caused by the temperature at time t, b0 is the frequency error caused by the initial temperature, and b1 represents the temperature coefficient.
5. The time keeping method according to claim 1, characterized in that: The aging coefficient and temperature coefficient of the local clock are solved according to the following formula: Where A is the preset first coefficient matrix, B is the preset second coefficient matrix, k is the number of iterations, x is the clock difference, y is the frequency difference, a(k) represents the aging coefficient of the k-th Gauss-Seidel iteration, b(k) represents the temperature coefficient of the k-th Gauss-Seidel iteration, xtemp(k-1) is the temperature clock difference caused by temperature in the k-1-th iteration, and yt(k) is the frequency difference vector caused by aging in the k-th iteration.
6. The time keeping method according to claim 1, characterized in that: The local clock is an oven-controlled crystal oscillator, a voltage-controlled crystal oscillator or an atomic clock.
7. The time keeping method according to claim 1, characterized in that: The reference signal is a global navigation satellite system GNSS signal, a base station signal, a long-wave timing signal or a short-wave timing signal.
Citation Information
Patent Citations
Clock frequency calibration method and system, computer equipment and storage medium
CN113364451A
Clock taming method, time code monitoring device and time synchronization system
CN113992296A