Crystal oscillator rapid taming and maintaining system and design method thereof

By using ZYNQ SOC and integral-separated PID algorithm in the crystal oscillator discipline and holding system, combined with temperature and aging compensation models, rapid discipline and high-precision holding of the crystal oscillator are achieved, solving the problems of long discipline time and insufficient accuracy in traditional methods, and improving the accuracy and stability of the frequency.

CN121508453APending Publication Date: 2026-02-10CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511738655.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In existing technologies, the discipline and hold algorithms for crystal oscillators are complex, the discipline time is long, the hardware platform is complex, and the discipline and hold accuracy is insufficient. They cannot effectively combine the long-term stability of GNSS signals with the short-term frequency stability of crystal oscillators, resulting in insufficient frequency accuracy and long-term stability.

Method used

Using ZYNQ SOC as the hardware platform, combined with the PL-end time interval measurement module and PS-end filtering and control algorithm, the crystal oscillator is rapidly tamed through an integral separation PID algorithm. Temperature and aging compensation models are pre-established, taming is performed when the GNSS signal is valid, and high-precision frequency maintenance is performed when it is invalid, simplifying the hardware structure and algorithm flow.

Benefits of technology

It effectively shortens the taming time and improves taming and maintenance accuracy. Compared with traditional methods, it shortens the taming time by 20%, improves frequency accuracy by three orders of magnitude, and improves frequency drift performance in the maintenance phase by about three orders of magnitude.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508453A_ABST
    Figure CN121508453A_ABST
Patent Text Reader

Abstract

The invention provides a crystal oscillator rapid taming and maintaining system and a design method thereof. According to the method, in a crystal oscillator taming stage, the corresponding aging frequency drift and the corresponding aging time are recorded while the steady-state precision brought by integral adjustment is kept and the crystal oscillator taming time is effectively shortened; in a crystal oscillator holding stage (when a GNSS signal is invalid), according to a temperature compensation model established in advance and an aging compensation model fitted in a taming stage, the frequency error compensation amount of the crystal oscillator is predicted and compensated, so that the accuracy and the stability of the output frequency of the crystal oscillator are improved. Compared with the traditional method that pure separation of temperature and aging effect cannot be completely realized by using an IIR (Infinite Impulse Response) filter, the method provided by the invention is more accurate in compensation while a compensation algorithm is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of time and frequency technology, and particularly relates to a crystal oscillator fast discipline and hold system and its design method, aiming to simplify the system algorithm structure and improve the discipline speed and hold accuracy of the crystal oscillator. Background Technology

[0002] While oven-controlled crystal oscillators (OCRs) are relatively inexpensive and offer good short-term stability, their long-term stability is poor due to factors such as temperature and aging. Therefore, OCRs are generally not used alone, but rather in conjunction with the second pulse signal broadcast by a GNSS system for time synchronization, achieving high-precision timekeeping. Simultaneously, a compensation model is established to ensure high frequency accuracy and long-term stability even when the system loses its external frequency reference. Combining the long-term stability of the GNSS time signal with the short-term frequency stability of the crystal oscillator enables long-term stability of the crystal oscillator's output frequency and optimizes and improves accuracy.

[0003] Existing technology 1 [1] Frequency calibration is calculated by measuring the frequency difference and the relationship between the DAC voltage control word and the crystal oscillator output frequency to achieve disciplined synchronization. The algorithm is simple but the control accuracy is relatively low. At the same time, the influence of temperature and aging factors is separated by digital filters and they are treated as simple linear models. The least squares method is used to establish a compensation model so that a certain degree of accuracy can still be maintained when the reference signal is lost. However, digital filters cannot completely separate the temperature and aging effects, which leads to interference with the parameters of the compensation model.

[0004] Existing technology 2 [2] The least squares method is used to fit the aging compensation model of the system to implement the hold-up algorithm. The effect of temperature is not considered. The algorithm is simple but the timekeeping accuracy is relatively poor.

[0005] Existing technology three [3] Similarly, clock discipline and synchronization are achieved by calculating frequency calibration values. A five-fold temperature compensation model is obtained in advance through a temperature-varying chamber. The influence is separated by analyzing the relationship between temperature and aging. An adaptive aging model is established through linear regression analysis for maintenance compensation, ultimately achieving high-precision clock discipline and maintenance. However, the compensation algorithm has a high complexity.

[0006] In addition, existing technologies also have the following drawbacks:

[0007] Traditional taming devices have complex algorithm implementations, long taming times, and complex hardware platform solutions, most of which use a microcontroller + FPGA + dedicated TDC chip. This paper addresses the problems of complex taming and retention algorithms, long taming times, and insufficient taming and retention accuracy of traditional taming and retention devices by simplifying the hardware platform solution.

[0008] References:

[0009] [1] Lu Gang. Research on crystal oscillator discipline and maintenance technology based on GNSS [D]. University of Chinese Academy of Sciences (National Time Service Center of Chinese Academy of Sciences), 2021.

[0010] [2] Liu Zhen, Zhi Shipeng, Ding Xiaoyang. Design of high-stability timekeeping system [J]. Electronic Technology and Software Engineering, 2021, (14): 54-57.

[0011] [3] Zuo Chaoyang. Research on clock discipline and maintenance system based on Beidou time synchronization [D]. Xi'an University of Electronic Science and Technology, 2022. Summary of the Invention

[0012] To overcome the shortcomings of existing technologies, the present invention aims to provide a crystal oscillator rapid discipline and holding system and its design method. In the crystal oscillator discipline phase, while maintaining the steady-state accuracy brought by integral regulation and effectively shortening the discipline time, the corresponding aging frequency drift and the corresponding aging time are recorded. In the crystal oscillator holding phase (when the GNSS signal is invalid), based on the pre-established temperature compensation model and the aging compensation model fitted in the discipline phase, the crystal oscillator frequency error compensation amount is predicted and compensated, thereby improving the accuracy and stability of the crystal oscillator output frequency.

[0013] To achieve the above objectives, one aspect of the present invention provides a method for rapid discipline and hold design of crystal oscillators, comprising the following steps:

[0014] S1, the GPS receiver deck clock outputs a standard second pulse signal and determines its validity; the frequency division module divides the local OCXO crystal oscillator and outputs the local second pulse.

[0015] S2, the local second pulse and the standard second pulse are simultaneously connected to the ZYNQ's PL terminal time interval measurement module for clock difference measurement;

[0016] S3, when the GNSS signal is valid, the raw clock difference data is sent to the PS terminal through the AXI-Lite bus. The PS terminal filters the clock difference through a filtering algorithm, and then implements closed-loop control through a PID algorithm to tame the crystal oscillator and achieve high-precision frequency and local second pulse output.

[0017] S4, during the taming process, based on the pre-established temperature compensation model and the relationship between temperature and aging, performs aging offset separation, records the aging time, and fits the aging compensation model in real time using the least squares method.

[0018] S5, when the GNSS signal is invalid, calculates and compensates for the corresponding frequency deviation based on the pre-established temperature compensation model and aging compensation model to achieve high-precision frequency maintenance.

[0019] Another aspect of the present invention provides a crystal oscillator rapid discipline and hold system, which applies the above method and includes:

[0020] GNSS receiver deck clock, used to output standard second pulse signal;

[0021] OCXO crystal oscillator, used to provide local output frequency;

[0022] The frequency divider module is used to divide the crystal oscillator output frequency to generate a local second pulse;

[0023] Temperature sensor used to measure the ambient temperature of the crystal oscillator in real time;

[0024] ZYNQ, as a processor, includes a PL terminal and a PS terminal; the PL terminal is equipped with a time interval measurement module for measuring the time interval between the local second pulse and the standard second pulse; the PS terminal is equipped with an algorithm module for disciplining and holding the crystal oscillator.

[0025] The D / A conversion module is used to convert the output of the algorithm module into an analog voltage for the crystal oscillator voltage control terminal.

[0026] Based on the above technical content, the present invention has the following advantages compared with traditional methods:

[0027] 1. This invention uses ZYNQ SOC as the hardware platform, sets up a time interval measurement module on the PL end of ZYNQ, writes filtering, control and hold algorithms on the PS end, and realizes data interaction through AXI-lite, avoiding the complex hardware structure of traditional microcontroller + FPGA + dedicated TDC chip.

[0028] 2. Compared with traditional PID and ping-pong algorithms, the integral separation PID used in this invention effectively avoids the integral saturation phenomenon in traditional PID control algorithms, while maintaining the steady-state accuracy brought by integral regulation, effectively shortening the training time, and having higher control accuracy than the ping-pong algorithm.

[0029] 3. In the taming stage, this invention uses clock bias as the control variable. Compared to using frequency deviation as the control variable, the outliers in the clock bias data correspond to the peaks in the frequency deviation data, which are easier to detect. Therefore, before removing outliers from the clock bias, the clock bias is first converted into frequency deviation data. After removing outliers, the frequency deviation data is then converted back into clock bias, resulting in smoother filtering and higher control accuracy. In the holding stage, the temperature and aging models are simplified, and the temperature compensation model is measured in advance. The compensation algorithm is simplified by directly using frequency deviation as the control variable. Furthermore, compared to the traditional method of using IIR filters, which cannot completely separate temperature and aging effects, this invention provides more accurate compensation. Attached Figure Description

[0030] The accompanying drawings are provided to further understand the invention and constitute a part of this invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0031] Figure 1 This is a system architecture diagram of an embodiment of the present invention;

[0032] Figure 2 This is a diagram illustrating the Kalman filter effect of an embodiment of the present invention.

[0033] Figure 3 This is a block diagram of the integral separation PID principle according to an embodiment of the present invention;

[0034] Figure 4 This is a diagram of the fitted temperature compensation model according to an embodiment of the present invention;

[0035] Figure 5 This is a diagram showing the relationship between the crystal oscillator output frequency and the voltage-controlled terminal control word in an embodiment of the present invention.

[0036] Figure 6 This is a comparison chart of the taming test results in an embodiment of the present invention. Detailed Implementation

[0037] To better explain and facilitate understanding of the present invention, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0038] like Figure 1 As shown in the figure, this application provides a crystal oscillator fast discipline and hold system, including:

[0039] GNSS receiver deck clock, used to output standard second pulse signal;

[0040] OCXO crystal oscillator, used to provide local output frequency;

[0041] The frequency divider module is used to divide the local OCXO crystal oscillator to generate a local second pulse.

[0042] The temperature sensor, DS18B20, is used to measure the ambient temperature of the crystal oscillator in real time.

[0043] The ZYNQ processor, specifically the ZYNQ7010, includes a PL (Programmable Logic) terminal and a PS (Processing System) terminal. The PL terminal houses a time interval measurement module for measuring the time interval between the local second pulse and the standard second pulse. The PS terminal contains an algorithm module (including Kalman filtering, PID control algorithm, and model compensation hold algorithm) for disciplining and holding the crystal oscillator.

[0044] The D / A conversion module, using DAC1220, is used to convert the output of the PID control algorithm into an analog voltage to the crystal oscillator voltage control terminal.

[0045] like Figures 2-6 As shown in the embodiments of this application, a design method for a crystal oscillator fast discipline and hold system is also provided, applied to the above-mentioned system, including two working stages: a lock-on discipline stage and a unlock-and-hold stage, specifically:

[0046] S1, the GPS receiver deck clock outputs a standard second pulse signal, and the validity of the GNSS signal is determined by analyzing the message keywords output by the deck clock; the system enters the lock-on discipline phase, and the frequency division module divides the local OCXO crystal oscillator to output the local second pulse.

[0047] S2, simultaneously connect the local second pulse and the standard second pulse to the time interval measurement module to perform clock difference measurement.

[0048] Furthermore, both the local second pulse and the standard second pulse are connected to the clock pin of the PL terminal, and the clock difference between the standard second pulse (i.e., 1PPS) signal and the local 1PPS signal is measured using a high-precision time measurement method based on tap delay.

[0049] S3, when the GNSS signal is valid, the raw clock difference data is sent to the PS terminal through the AXI-Lite bus. The PS terminal filters the clock difference through a filtering algorithm, and then implements closed-loop control through a PID algorithm to tame the crystal oscillator and achieve high-precision frequency and local second pulse output.

[0050] Furthermore, the specific steps of S3 include:

[0051] S31, when the GNSS signal is valid, the raw clock difference data is sent to the PS terminal through the AXI-Lite bus, and the PS terminal reads the raw data through a timer interrupt.

[0052] S32, Removing Gross Errors from Original Data: Since outliers in clock error data correspond to peaks in frequency deviation data, and these peaks are relatively easy to detect, the original clock error data is first converted into frequency deviation data before removing gross errors. After the gross errors are removed, the frequency deviation data is then converted back into clock errors, while retaining both the frequency deviation and clock error after removing the gross errors. Specifically:

[0053] The raw clock bias data is converted into frequency deviation data: Where Δf is the OCXO crystal frequency deviation, f0 is the OCXO crystal nominal frequency, ΔT is the original clock error data, and τ is the sampling interval of the time interval measurement module.

[0054] Calculate the median of the frequency deviation data, m = Median{Δf}, and further obtain the median of the absolute value of the deviation. .

[0055] when When n is the set multiple, it is considered a gross error and recorded as 0; then the frequency deviation data is converted into clock error, while retaining the frequency deviation and clock error after removing the gross error.

[0056] S33. Perform Kalman filtering on the clock error after gross error removal to obtain the effective clock error, and record the corresponding effective frequency deviation.

[0057] Specifically, the Kalman filtering includes two main steps:

[0058] First, state prediction is performed based on the system's state model:

[0059]

[0060]

[0061] Secondly, the measured data are compared with the predicted results, and the state estimate is updated using the new measured values:

[0062]

[0063]

[0064]

[0065] Where k is the discrete time; A is the system state transition matrix, determined according to the system model and sampling interval; H is the system state measurement matrix, and since this system only observes the clock difference, i.e., the first term of X(k), H = (1 0 0); x(k,k-1) is the prior state estimate, and x(k-1,k-1) is the posterior estimate; p(k,k-1) is the prior state covariance matrix, and p(k-1,k-1) is the posterior state covariance matrix; R is the measurement noise covariance matrix; and Q is the system noise covariance matrix. The resulting Kalman filter effect diagram is shown below. Figure 2 As shown, the horizontal axis represents time in seconds (s), and the vertical axis represents clock error in nanoseconds (ns).

[0066] Specifically, the system uses clock difference as the control variable for synchronization control during the taming phase and frequency deviation as the control variable for timekeeping control during the holding phase.

[0067] S34 converts the effective clock difference of the filtered OCXO crystal oscillator into a digital value of the crystal oscillator control voltage using a PID algorithm, and then obtains the crystal oscillator control voltage through a D / A conversion module to calibrate the OCXO crystal oscillator output frequency in real time. Specifically:

[0068] Using clock difference as the controlled object and setting the ideal target to 0, the original error data e(t) enters the PID controller, where the feedback control voltage u(t) is calculated using the PID algorithm. This feedback control voltage acts on the voltage-controlled pin of the crystal oscillator, causing a linear change in the output frequency, which indirectly affects the time difference, generating a new error e(t), thus achieving closed-loop control. The specific algorithm expression is as follows:

[0069]

[0070] like Figure 3 As shown, to achieve rapid taming and synchronization, this embodiment of the application uses an integral-separated PID algorithm to adjust the voltage control value of the local isothermal crystal oscillator. This effectively avoids the integral saturation phenomenon in traditional PID control algorithms while maintaining the steady-state accuracy brought by integral regulation. This can effectively shorten the taming time of the crystal oscillator. The above formula can be further optimized as follows:

[0071]

[0072] In the formula, For proportional gain, The integral time constant is... Here, T is the differential time constant, and T is the sampling time. , which is the switching coefficient of the integral term; This is the set error threshold.

[0073] S4. During the taming process, a temperature compensation model is pre-established, and the aging compensation model is fitted in real time by combining the recorded aging time.

[0074] Furthermore, the specific steps of S4 include:

[0075] S41, Pre-establish a temperature compensation model: Place the thermostatic crystal oscillator in a thermostatic chamber and connect an external frequency meter. Raise the temperature of the chamber from 15 degrees to 60 degrees in 5-degree intervals. Correspond each temperature to the frequency value displayed on the frequency meter at that time. Use the least squares method to fit the curve to obtain the temperature compensation model.

[0076] Where A0 is the initial frequency. Let B be the real-time frequency of the crystal oscillator at temperature T, B be the temperature frequency coefficient of the crystal oscillator, and T be the temperature. The results are as follows: Figure 4 As shown in the figure, the horizontal axis represents the current temperature, and the vertical axis represents the crystal oscillator output frequency.

[0077] S42, based on the relationship between temperature and aging, separate the aging frequency drift and record the corresponding aging time.

[0078] S43, based on the pre-established temperature compensation model and aging time, fits the aging compensation model in real time using the least squares method.

[0079] S5, when the system enters the unlocking phase where the GNSS signal is invalid, the corresponding frequency deviation is calculated and compensated based on the pre-established temperature compensation model and aging compensation model to achieve high-precision frequency maintenance. Specifically:

[0080] Before compensation, the initial voltage control word is set to 0. After each control cycle, the control word is incremented by 1000. The crystal oscillator frequency output frequency is measured using an SR620. The relationship between the frequency and the control word under voltage-controlled voltage is as follows: Figure 5 As shown, the horizontal axis represents the frequency control word, and the vertical axis represents the crystal oscillator frequency.

[0081] Finally, the algorithm calculates the frequency value to be compensated based on the pre-established temperature compensation model and aging compensation model. Based on the relationship between frequency and control word, it calculates the corresponding control word and controls the crystal oscillator through the D / A conversion module, thus achieving accurate compensation and maintaining the high-precision frequency output of the crystal oscillator.

[0082] like Figure 6 As shown in the embodiment of this application, the discipline and hold modes of the crystal oscillator were tested by building a test platform, and the discipline test results were obtained: with a clock difference of 20 ns and a frequency accuracy of 10... -10 From the perspective of taming synchronization standards, compared to the traditional PID taming method which requires 320 seconds, the integral-separated PID taming time of this application is only 260 seconds, reducing the time by approximately 20%. As time increases, the frequency accuracy of the crystal oscillator increases from 8.6 × 10⁻⁶. -8 Ultimately increased to 5.87×10 -11 This represents an improvement of nearly three orders of magnitude. After the GNSS signal was disconnected, the phase drift of the crystal oscillator was approximately 4.5 µs over 12 hours, compared to 5.6 ms in the free state, representing a performance improvement of about three orders of magnitude.

[0083] The above description discloses only one preferred embodiment of the present invention, and should not be construed as limiting the scope of the present invention. Those skilled in the art will understand that all or part of the processes of the above embodiments can be implemented, and equivalent changes made in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A method for rapid discipline and hold design of crystal oscillators, characterized in that, Includes the following steps: S1, the GPS receiver deck clock outputs a standard second pulse signal and performs a validity check; the system enters the lock-and-discipline phase, and the frequency divider module divides the local OCXO crystal oscillator to output the local second pulse; S2, simultaneously connect the local second pulse and the standard second pulse to the time interval measurement module to perform clock difference measurement; S3, When the GNSS signal is valid, the raw clock bias data is sent to the algorithm module; the algorithm module filters the clock bias through a filtering algorithm, and then performs closed-loop control through a PID algorithm to achieve the taming of the crystal oscillator; S4, during the taming process, the aging compensation model is fitted in real time by combining the pre-established temperature compensation model with the recorded aging time. S5. When the system enters the unlocking and holding phase where the GNSS signal is invalid, the corresponding frequency deviation is calculated and compensated according to the pre-established temperature compensation model and aging compensation model to achieve frequency holding.

2. The method according to claim 1, characterized in that, In step S1, the validity of the GNSS signal is determined by analyzing the output message keywords of the deck clock.

3. The method according to claim 1 or 2, characterized in that, The clock difference measurement adopts a time measurement method based on tap delay.

4. The method according to claim 3, characterized in that, S3 includes the following steps: S31, When the GNSS signal is valid, the raw clock difference data is sent to the algorithm module, and the algorithm module reads the raw data through a timed interrupt; S32, Perform gross error removal on the original clock difference data; S33, perform Kalman filtering on the clock error after gross error removal to obtain the effective clock error, and record the corresponding effective frequency deviation; S34 converts the filtered effective clock difference into a digital quantity of crystal oscillator control voltage using a PID algorithm, and then obtains the crystal oscillator control voltage through a D / A conversion module to calibrate the OCXO crystal oscillator output frequency in real time.

5. The method according to claim 4, characterized in that, Specifically, S32 is as follows: First, the original clock bias data is converted into frequency deviation data Δf, the median m of the frequency deviation data is calculated, and then the median absolute value of the deviation MAD is obtained. when When n is a set multiple, gross error elimination is performed; The frequency deviation data is then converted into clock bias, while retaining both the frequency deviation and clock bias after removing gross errors.

6. The method according to claim 5, characterized in that, Specifically, S34 is: With clock error as the controlled object and the ideal target set to 0, the original error data enters the PID controller and the feedback control voltage is calculated by the PID algorithm. The feedback control voltage is applied to the voltage-controlled pin of the crystal oscillator, causing a linear change in the output frequency and generating a new error, thus achieving closed-loop control.

7. The method according to claim 1, characterized in that, S4 includes the following steps: S41, Place the thermostatic crystal oscillator in a thermostatic chamber and connect an external frequency meter to measure the frequency at the set temperature intervals, use the least squares method to fit the curve, and pre-establish a temperature compensation model. S42, based on the relationship between temperature and aging, separate the aging frequency drift and record the corresponding aging time; S43, based on the pre-established temperature compensation model and aging time, fits the aging compensation model in real time using the least squares method.

8. The method according to claim 1, characterized in that, Specifically, S5 is: Before compensation, an initial voltage control word is set. After each control cycle, the corresponding control word is added. The output frequency of the crystal oscillator is measured to obtain the relationship between the frequency and the control word when there is voltage control. The algorithm calculates the frequency value to be compensated based on the pre-established temperature compensation model and aging compensation model. Based on the relationship between frequency and control word, it calculates the corresponding control word and controls the crystal oscillator through the D / A conversion module to achieve compensation and maintain the crystal oscillator frequency output.

9. A crystal oscillator rapid discipline and hold system, using the method as described in any one of claims 1-8, characterized in that, include: GNSS receiver deck clock, used to output standard second pulse signal; OCXO crystal oscillator, used to provide local output frequency; The frequency divider module is used to divide the local OCXO crystal oscillator to generate a local second pulse. Temperature sensor used to measure the ambient temperature of the crystal oscillator in real time.

10. The system according to claim 9, characterized in that, Also includes: ZYNQ, as a processor, includes a PL terminal and a PS terminal; the PL terminal is equipped with a time interval measurement module for measuring the time interval between the local second pulse and the standard second pulse; the PS terminal is equipped with an algorithm module for disciplining and holding the crystal oscillator. The D / A conversion module is used to convert the output of the algorithm module into an analog voltage for the crystal oscillator voltage control terminal.