A constant temperature crystal oscillator time-keeping system and method based on a BP neural network

By using a BP neural network-based isothermal crystal oscillator timing system, combined with PID algorithm and Savitzky-Golay filtering technology, the problem of unstable frequency output of isothermal crystal oscillators was solved, achieving high-precision frequency synchronization and long-term stability improvement.

CN116400578BActive Publication Date: 2026-05-05GUILIN UNIV OF ELECTRONIC TECH +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUILIN UNIV OF ELECTRONIC TECH
Filing Date
2023-04-13
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The output frequency stability of a temperature-controlled crystal oscillator is poor and easily affected by ambient temperature and aging factors. Furthermore, the stability of GPS satellite signals during transmission is poor, which affects the long-term stability and accuracy of the frequency source.

Method used

A temperature-controlled crystal oscillator timing system based on a BP neural network is adopted, which combines a GPS receiver, a temperature-controlled crystal oscillator, a time interval measurement module, a processor, an algorithm processing module, a frequency division module, a D/A module, a temperature sensor, and an LCD display module. The BP neural network algorithm is used to predict and compensate the output frequency of the temperature-controlled crystal oscillator, and combined with the PID algorithm and Savitzky-Golay filtering technology, stable frequency synchronization is achieved.

Benefits of technology

It significantly improves the long-term stability and accuracy of the temperature-controlled crystal oscillator, maintaining a frequency accuracy on the order of 10⁻⁹ and a timekeeping accuracy within 1µs even after 1 hour of GPS 1PPS signal failure, thus enhancing the system's frequency stability and anti-interference capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116400578B_ABST
    Figure CN116400578B_ABST
Patent Text Reader

Abstract

This invention relates to the fields of thermostatic crystal oscillator timing algorithms and time synchronization technology, specifically to a thermostatic crystal oscillator timing system and method based on a BP neural network. The system includes a GPS receiver, a thermostatic crystal oscillator, a time interval measurement module, a processor, an algorithm processing module, a frequency division module, a D / A module, a temperature sensor, an LCD display module, and a serial communication module. The GPS receiver outputs a 1PPS signal. The thermostatic crystal oscillator serves as the external input clock for the system, inputting a 10MHz crystal oscillator frequency to the processor. The time interval measurement module measures the phase difference between the local second pulse signal and the 1PPS signal. The processor generates a local second pulse signal and uses the phase difference to discipline the thermostatic crystal oscillator, obtaining a standard 10MHz crystal oscillator frequency. The temperature sensor collects the ambient temperature of the thermostatic crystal oscillator. The algorithm processing module, based on valid historical data and the ambient temperature, uses a BP neural network algorithm to predict and compensate for the output frequency of the thermostatic crystal oscillator, obtaining the standard 10MHz crystal oscillator frequency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of isothermal crystal oscillator timing algorithms and time synchronization technology, and in particular to an isothermal crystal oscillator timing system and method based on a BP neural network. Background Technology

[0002] As a core component of major electronic devices, the high stability and accuracy of frequency sources have always been a pursuit. To meet the needs of technological development, countries worldwide attach great importance to the construction of time and frequency systems, especially in the last 20 years, with time and frequency accuracy improving exponentially, increasing by an order of magnitude approximately every 5-10 years. Among various high-precision frequency sources, cesium atomic clocks and hydrogen atomic clocks, as primary frequency sources, possess high long-term stability and accuracy. However, due to their high cost and strict requirements for external operating environments, they are generally only suitable for national time service laboratories and are difficult to apply in cost-sensitive civilian fields. High-stability temperature-controlled crystal oscillators and rubidium clocks, belonging to secondary frequency sources, are lower in cost, but their long-term stability and accuracy are relatively poor, making them difficult to apply in fields requiring high time synchronization accuracy. Therefore, there is an urgent need to improve secondary frequency sources, enabling them to retain the low-cost advantages of secondary frequency sources while effectively improving their long-term stability and accuracy.

[0003] Oven-Controlled Crystal Oscillators (OCXOs), as secondary frequency standard sources, are widely used in scientific research, metrology, and industrial equipment due to their advantages such as high short-term stability, low cost, and small size. However, the output frequency of OCXOs is easily affected by ambient temperature and aging factors, causing the crystal frequency to gradually drift, thereby reducing its frequency stability and accuracy. Therefore, many researchers have proposed using the high long-term stability of GPS pulse-per-second (1PPS) signals to tame local OCXOs, effectively improving their long-term stability and accuracy. However, because satellite signals are affected by factors such as the ionosphere and troposphere during transmission, the short-term stability of GPS 1PPS signals is poor, and the 1PPS signal is prone to failure under severe interference, thus failing to guarantee stable crystal frequency output. Summary of the Invention

[0004] The purpose of this invention is to provide a timekeeping system and method for a thermostatic crystal oscillator based on a BP neural network, which aims to solve the problem of poor stability of the crystal frequency output of a thermostatic crystal oscillator.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a temperature-controlled crystal oscillator timekeeping system based on a BP neural network, comprising a GPS receiver, a temperature-controlled crystal oscillator, a time interval measurement module, a processor, an algorithm processing module, a frequency division module, a D / A module, a temperature sensor, a liquid crystal display module, and a serial communication module. The GPS receiver, the temperature-controlled crystal oscillator, the time interval measurement module, the frequency division module, the D / A module, the temperature sensor, and the serial communication module are respectively connected to the processor. The algorithm processing module is connected to the serial communication module, and the liquid crystal display module is connected to the algorithm processing module.

[0006] The GPS receiver is used to receive GPS satellite signals, and sequentially filter, amplify, frequency convert, acquire and track the GPS satellite signals to obtain the time information broadcast by the GPS satellites, and output a 1PPS signal to the time interval measurement module and the processor based on the time information.

[0007] The temperature-controlled crystal oscillator is used as an external input clock for the system, inputting a 10MHz crystal frequency to the processor;

[0008] The time interval measurement module is used to measure the phase difference between the local second pulse signal and the 1PPS signal;

[0009] The processor is used to realize the real-time detection and effective judgment of the 1PPS signal in the taming mode, generate the local second pulse signal based on the 10MHz crystal oscillator frequency, filter the phase difference, and use a digital PID algorithm to synchronize the filtered local second pulse signal with the 1PPS signal to complete the taming of the isothermal crystal oscillator.

[0010] The serial communication module is used to enable communication between the processor and the algorithm processing module;

[0011] The temperature sensor is used to collect the ambient temperature of the thermostatic crystal oscillator.

[0012] The algorithm processing module is used to predict and compensate the output frequency of the thermostatic crystal oscillator based on valid historical data and the ambient temperature when in hold mode, using a BP neural network algorithm to obtain a standard 10MHz crystal oscillator frequency.

[0013] The D / A module is used to convert the data processed by the PID algorithm into corresponding analog voltage values ​​and adjust the frequency output of the isothermal crystal oscillator.

[0014] The frequency divider module uses PLL technology to multiply the standard 10MHz crystal oscillator frequency to the system clock.

[0015] The liquid crystal display module is used to display the time interval measurement value and the working status of the entire system.

[0016] The GPS receiver is a ublox receiver.

[0017] The time interval measurement module is a TDC-GPX2 time interval measurement module;

[0018] The processor is an FPGA processor;

[0019] The algorithm processing module is an STM32 algorithm processing module;

[0020] The liquid crystal display module is an LCD liquid crystal display module.

[0021] Secondly, the present invention provides a time-keeping method for a temperature-controlled crystal oscillator based on a BP neural network, comprising the following steps:

[0022] The validity of the 1PPS signal is detected in real time to determine whether the system is currently in docile mode or hold mode;

[0023] In the hold mode, the system detects the 1PPS signal. If the 1PPS signal is invalid, the system outputs historical data within a preset time period after passing through Savitzky-Golay filtering. If the 1PPS signal is valid, the system records the valid historical data during the taming process. When the amount of the recorded valid historical data meets the training data requirement of the BP neural network, the BP neural network is trained.

[0024] When the BP neural network training is completed, if the 1PPS signal is detected as invalid, the system predicts the output frequency of the thermostatic crystal oscillator through the trained BP neural network to obtain the standard 10MHz crystal oscillator frequency. If the 1PPS signal is detected as valid, the system updates the trained BP neural network accordingly.

[0025] The historical data within the preset time period refers to the most recent 50 historical data.

[0026] During the training of the BP neural network, if an invalid 1PPS signal is detected, the output will still be based on the Savitzky-Golay filtering of the most recent 50 historical data.

[0027] The BP neural network is updated every 2 hours.

[0028] This invention provides a temperature-controlled crystal oscillator timekeeping system based on a BP neural network, which, through... Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a flowchart of a timekeeping method for a temperature-controlled crystal oscillator based on a BP neural network provided by the present invention.

[0031] Figure 2 This is a schematic diagram of a temperature-controlled crystal oscillator timekeeping system based on a BP neural network provided by the present invention.

[0032] Figure 3 This is a schematic diagram of the high-resolution measurement principle.

[0033] Figure 4 This is a schematic diagram of the Savitzky-Golay filtering algorithm.

[0034] Figure 5 This is a schematic diagram of the BP neural network topology.

[0035] Figure 6 This is a schematic diagram illustrating the impact of the amount of training data on various errors in a BP network.

[0036] Figure 7 This is a schematic diagram of the BP neural network algorithm.

[0037] Figure 8 This is a flowchart of a timekeeping method for a temperature-controlled crystal oscillator based on a BP neural network provided by the present invention.

[0038] 1-GPS receiver, 2-Thermostatic crystal oscillator, 3-Time interval measurement module, 4-Processor, 5-Algorithm processing module, 6-Frequency divider module, 7-D / A module, 8-Temperature sensor, 9-LCD display module, 10-Serial communication module. Detailed Implementation

[0039] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0040] Please see Figures 1 to 8In a first aspect, the present invention provides a temperature-controlled crystal oscillator timekeeping system based on a BP neural network, comprising a GPS receiver 1, a temperature-controlled crystal oscillator 2, a time interval measurement module 3, a processor 4, an algorithm processing module 5, a frequency division module 6, a D / A module 7, a temperature sensor 8, a liquid crystal display module 9, and a serial communication module 10. The GPS receiver 1, the temperature-controlled crystal oscillator 2, the time interval measurement module 3, the frequency division module 6, the D / A module 7, the temperature sensor 8, and the serial communication module 10 are respectively connected to the processor 4, the algorithm processing module 5 is connected to the serial communication module 10, and the liquid crystal display module 9 is connected to the algorithm processing module 5.

[0041] The GPS receiver 1 is used to receive GPS satellite signals, and sequentially filter, amplify, frequency convert, acquire and track the GPS satellite signals to obtain the time information broadcast by the GPS satellites, and output a 1PPS signal to the time interval measurement module 3 and the processor 4 based on the time information.

[0042] The temperature-controlled crystal oscillator 2 is used as an external input clock for the system, inputting a 10MHz crystal frequency to the processor 4;

[0043] The time interval measurement module 3 is used to measure the phase difference between the local second pulse signal and the 1PPS signal;

[0044] The processor 4 is used to realize the real-time detection and effective judgment of the 1PPS signal in the taming mode, generate the local second pulse signal based on the 10MHz crystal oscillator frequency, filter the phase difference, and use a digital PID algorithm to synchronize the filtered local second pulse signal with the 1PPS signal to complete the taming of the isothermal crystal oscillator 2.

[0045] The serial communication module 10 is used to realize communication between the processor 4 and the algorithm processing module 5;

[0046] The temperature sensor 8 is used to collect the ambient temperature of the thermostatic crystal oscillator 2.

[0047] The algorithm processing module 5 is used to predict and compensate the output frequency of the thermostatic crystal oscillator 2 based on effective historical data and the ambient temperature when maintaining mode, so as to obtain a standard 10MHz crystal oscillator frequency.

[0048] The D / A module 7 is used to convert the data processed by the PID algorithm into corresponding analog voltage values ​​and adjust the frequency output of the thermostatic crystal oscillator 2.

[0049] The frequency divider module 6 uses PLL technology to multiply the standard 10MHz crystal oscillator frequency to the system clock.

[0050] The liquid crystal display module 9 is used to display the time interval measurement value and the working status of the entire system.

[0051] Specifically, the GPS receiver 1 is a ublox receiver, used to output standard second pulses; the time interval measurement module 3 is a TDC-GPX2 time interval measurement module; the processor 4 is an FPGA processor; the algorithm processing module 5 is an STM32 algorithm processing module; and the liquid crystal display module 9 is an LCD liquid crystal display module. The time interval measurement value is mainly used to improve measurement accuracy and make the phase difference measurement value more precise.

[0052] The TDC-GPX2 time interval measurement module is used to measure the digital phase difference between the local second pulse signal and the 1PPS signal. This module integrates a CMOS input and an SPI interface, giving it high measurement performance and data throughput. Furthermore, the TDC-GPX2 contains a set of 17 8-bit registers. By configuring the initial values ​​of these registers, various measurement functions can be flexibly implemented. The lower four bits of the 4th, 5th, and 6th registers form a 20-bit clock divider, which subdivides the system clock cycle, thereby improving measurement resolution and achieving high-precision time interval measurement. Figure 3 As shown.

[0053] The FPGA processor is used to realize real-time detection and effective judgment of the 1PPS signal, and generate a local second pulse signal. Then, Savitzky-Golay filtering is applied to the digital phase difference between the local second pulse signal and the 1PPS signal to eliminate the random jitter error introduced by the 1PPS signal. Finally, a digital PID algorithm is used to achieve high-precision synchronization between the local second pulse signal and the 1PPS signal. Savitzky-Golay filtering, as a low-pass digital filter, is widely used for data smoothing and denoising. Based on the least squares fitting filtering method, it can directly handle data smoothing problems in the time domain. By performing polynomial fitting on data points within a certain sliding window, it ensures that the signal trend and width remain unchanged while filtering out noise, thus improving the accuracy of data processing. Its expression is:

[0054]

[0055] Among them, Z i+1 Z represents the original data value. i ' is the filtered value, a i Let be the filtering coefficient for the i-th data value, n be the width of half of the filtering window, and N be the length of the entire filtering window, with a value of 2n+1.

[0056] After the system was powered on and stabilized, this experiment used the high-precision time interval measurement module 3 to measure the time interval between the local second pulse signal and the 1PPS signal, thereby obtaining the picosecond-level digital phase deviation. To reduce the impact of random jitter in the 1PPS signal on the measurement results, Savitzky-Golay filtering was used to smooth the obtained digital phase deviation, such as... Figure 4 As shown.

[0057] Figure 4 (a) The vertical axis represents the raw data of 1PPS phase deviation, and the horizontal axis represents time. This figure shows that a significant interference error occurs around 500s, and without filtering, the overall fluctuation of the 1PPS phase deviation is within -3 × 10⁻⁶. 4 ~3×10 4 Between ps. Figure 4 (b) Savitzky-Golay filtering was performed. Through multiple adjustments to the filter window length, simulations showed that a window length of 11 yielded the best filtering effect. This algorithm effectively filters out random interference errors, ensuring that the trend and width of the data remain unchanged, and significantly reduces the overall fluctuation range of the data, with an error range of -2 × 10⁻⁶. 4 ~2×10 4 Between ps.

[0058] The STM32 algorithm processing module is mainly used to implement the BP neural network algorithm for the oven-controlled crystal oscillator 2. By receiving effective historical data during the training process, it uses the BP neural network model to predict and compensate for the output frequency of the oven-controlled crystal oscillator 2, thereby improving the long-term stability and accuracy of the crystal oscillator. Figure 5 This is the topology of a BP neural network.

[0059] The process of establishing and implementing the BP neural network model involves the following steps.

[0060] 1. Data partitioning

[0061] During the taming process of the temperature-controlled crystal oscillator 2, it is necessary to record the time, temperature, and pressure control values ​​when the GPS 1PPS is effective. This effective data is then divided into three parts: training data, validation data, and test data. The training data is used to solve the connection weights and thresholds of each neuron in the BP neural network; the validation data is used to prevent the network training from overfitting; and the test data does not participate in the training process but only serves to verify the model's fitting effect.

[0062] 2. Data normalization processing

[0063] To facilitate the training of the BP neural network model and avoid computational discrepancies, the input data needs to be normalized to ensure it falls within the range of -1 to 1. The formula is as follows:

[0064]

[0065] Where X represents the normalized data, x represents the original data, and x0 represents the normalized data. min x is the minimum value in the original data. max This represents the maximum value in the original data.

[0066] 3. Network Model Construction and Transfer Function Selection

[0067] To address the frequency drift issue of the cryogenic crystal oscillator, this model employs a three-layer network structure with 3, 5, and 1 neurons in the input, hidden, and output layers, respectively. The tansig function is used for the hidden layer, and the purelin linear function is used for the output layer. The formulas are as follows:

[0068]

[0069] y = x (1-4)

[0070] 4. Initialization of model-related data

[0071] The model is mainly implemented in C language. By calling the rand random function in the header file stslib.h, the weights and thresholds of each neuron are assigned random values ​​in the range of -1 to 1.

[0072] 5. Calculate the hidden layer output

[0073]

[0074] Where n is the number of neurons in the hidden layer; a k and Z k Let X represent the threshold and output of the k-th neuron in the hidden layer, respectively. i For the output data of the i-th neuron in the input layer, w ik f1(x) represents the connection weights of each neuron between the input layer and the hidden layer, and f1(x) represents the transfer function of the hidden layer neurons.

[0075] 6. Calculate the output of the output layer.

[0076]

[0077] Where m is the number of neurons in the output layer; b j and Y j Z represents the threshold and output of the j-th neuron in the output layer, respectively.k For the output data of the k-th neuron in the hidden layer, w jk f1 represents the connection weights of each neuron between the hidden layer and the output layer, and f2(x) represents the transfer function of the output layer neuron.

[0078] 7. Calculate network error

[0079] This paper uses the sum of squared errors between the actual output value and the expected value of the network as the computational error of the entire network, and its formula is as follows:

[0080]

[0081] Where E is the network calculation error, Y′ j Y is the expected value. j This is the network output value.

[0082] 8. Update weights and thresholds

[0083] Based on the calculated network error, the gradient descent method is used to repeatedly update the weights and thresholds of each neuron in the network until the error is reduced to meet the design requirements. The following will derive the formula using the threshold update of the output layer neurons as an example:

[0084]

[0085] Where, Δb j The value of η is the change in the threshold of the output layer neurons, ranging from 0 to 1, and is referred to as the learning rate.

[0086] According to the chain theorem, equation (3-24) can be transformed into:

[0087]

[0088] Where f2' is the partial derivative of the transfer function of the output layer neuron.

[0089] After processing, the threshold of the output layer neurons is updated as follows:

[0090]

[0091] The derivation of the formulas for updating the weights of the output layer neurons, the thresholds of the hidden layer neurons, and their weight updates is similar to that of updating the thresholds of the output layer neurons, and will not be repeated here. Their update formulas are as follows:

[0092]

[0093]

[0094]

[0095] 9. Data denormalization processing

[0096] Since this network model operates on normalized data, its output values ​​need to be denormalized after training to obtain the final network prediction results. The denormalization formula is as follows:

[0097]

[0098] Where Y represents the network output data, y represents the inverse normalized network prediction result, and y min ,y max With equation (1-2) x min ,x max The values ​​are consistent, and this expression is an inverse function of expression (1-14).

[0099] 10. Model Fit Test

[0100] Once the network model is trained, the predicted values ​​output by the model are compared with the test data. The mean absolute error, mean square error, and root mean square error of the model's predictions are calculated to determine the model's fitting performance.

[0101] Figure 6 To investigate the impact of training data volume on various errors in the BP network, during the training process of the isothermal crystal oscillator 2, 2000 sets of valid sample data were recorded. 500, 1000, and 1500 sets were selected as training samples for the BP network model, respectively, and the predictions of the last 200 sets of data were compared. Observation Figure 6 It can be observed that as the number of training samples increases, the errors of the BP neural network model of the isothermal crystal oscillator 2 in fitting the test pressure control value gradually decrease. The model achieves the best fitting effect when there are 1500 training samples. When the number of training samples is small, the weights and thresholds of each neuron in the model are not updated sufficiently, resulting in a poor fitting effect.

[0102] This experiment was conducted at room temperature. After the system was powered on and stabilized, the output frequency of the crystal oscillator was measured per minute using a frequency meter. The average of 10 instantaneous frequency values ​​was taken as the actual output frequency. The recorded data was imported into Matlab for processing, and the curve of the crystal oscillator frequency changing over time was plotted as follows. Figure 7 As shown.

[0103] from Figure 7 As can be seen in (a), without any processing, the output frequency of the thermostatic crystal oscillator 2 gradually decreases over time, and the crystal frequency drifts, resulting in poor long-term stability and accuracy. Figure 7(b) is the data result obtained after the BP neural network training is completed, the 1PPS signal is disconnected, and the system enters the hold mode. After the prediction compensation of the BP neural network, the output frequency of the isothermal crystal oscillator 2 is stabilized at around 10MHz, which significantly improves the long-term stability and accuracy of the crystal oscillator. Figure 7 (c) represents the digital phase difference between the local second pulse signal and the 1PPS signal. Before 3600 seconds, the system was in disciplined mode, using the 1PPS signal as the standard frequency source to discipline the oven-controlled crystal oscillator 2. This resulted in an overall deviation of approximately 10ns between the local second pulse signal and the 1PPS signal, demonstrating good discipline and maintaining high-precision pulse synchronization. After 3600 seconds, the system entered hold mode. Effective historical data from before discipline was recorded and used to train the BP neural network model of the oven-controlled crystal oscillator 2. This allowed for prediction and compensation of the output frequency of the oven-controlled crystal oscillator 2, enabling the system to maintain synchronization accuracy within 1µs even after losing the reference signal for one hour, thus improving the system's timekeeping capability.

[0104] The frequency division module 6 uses the phase-locked loop principle to multiply the docile standard 10MHz crystal oscillator frequency to the system clock.

[0105] The D / A module 7 is used to convert the digital signal predicted by the BP network into a corresponding analog voltage, so that the crystal oscillator frequency can be output stably.

[0106] The temperature sensor 8 is used to collect the ambient temperature around the thermostatic crystal oscillator 2 and use it as the input reference for the BP neural network.

[0107] The LCD liquid crystal display module is used to display the time interval measurement value and the system's operating status, i.e., the display of the disciplined mode or the hold mode;

[0108] The serial communication module 10 is used for data exchange between the FPGA and the STM32, such as temperature and pressure control values, to achieve BP neural network training.

[0109] Please see Figures 2 to 7 Secondly, the present invention provides a method for maintaining the time of a temperature-controlled crystal oscillator based on a BP neural network, comprising the following steps:

[0110] S1 detects the validity of the 1PPS signal in real time and determines whether the system is currently in docile mode or hold mode;

[0111] Specifically, when the system detects a valid 1PPS signal three times consecutively, it considers the system to be in disciplined mode and initiates the crystal oscillator discipline process. When the system is in disciplined mode, it monitors the processed 1PPS signal in real time. If the signal is not detected within 2 seconds, the system switches to hold mode.

[0112] In the hold mode, the system detects the 1PPS signal. If the 1PPS signal is invalid, the system outputs historical data within a preset time period after passing through Savitzky-Golay filtering. If the 1PPS signal is valid, the system records the valid historical data during the taming process. When the amount of the recorded valid historical data meets the training data requirement of the BP neural network, the system trains the BP neural network.

[0113] Specifically, the historical data within the preset time period consists of the most recent 50 historical data points. During the training of the BP neural network, if an invalid 1PPS signal is detected, the output will still be based on the most recent 50 historical data points after Savitzky-Golay filtering.

[0114] When the BP neural network training is completed, if the 1PPS signal is detected as invalid, the system predicts the output frequency of the constant temperature crystal oscillator 2 through the trained BP neural network to obtain the standard 10MHz crystal oscillator frequency. If the 1PPS signal is detected as valid, the system updates the trained BP neural network.

[0115] Specifically, the BP neural network is updated every 2 hours.

[0116] Beneficial effects

[0117] 1. This invention relates to a timekeeping method based on a BP neural network for a temperature-controlled crystal oscillator. By establishing a BP neural network model of the temperature-controlled crystal oscillator 2, and using data recorded during the system training process, the output frequency of the crystal oscillator is predicted and compensated, thereby improving the system's timekeeping capability. Even with a 1-hour GPS 1PPS signal failure, the control system maintains a timekeeping accuracy better than 1µs.

[0118] 2. This invention presents a temperature-controlled crystal oscillator timekeeping method based on a BP neural network. By utilizing the Savitzky-Golay filtering algorithm, it effectively filters out random interference errors, ensuring that the trend and width of the data remain unchanged, and significantly reducing the overall fluctuation range of the data. Its error range is within -2 × 10⁻⁶. 4 ps~2×10 4 Between ps.

[0119] 3. The isothermal crystal oscillator timing method based on BP neural network of the present invention can still maintain the accuracy of the crystal oscillator frequency at the order of 10-9 after 1 hour of 1PPS signal failure, which significantly improves the long-term stability and accuracy of the crystal oscillator.

[0120] The above-disclosed embodiments are merely preferred embodiments of the temperature-controlled crystal oscillator timing system and method based on BP neural network of the present invention. Of course, they should not be construed as limiting the scope of the present invention. Those skilled in the art can 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 temperature-controlled crystal oscillator timekeeping system based on a BP neural network, characterized in that, The device includes a GPS receiver, a temperature-controlled crystal oscillator, a time interval measurement module, a processor, an algorithm processing module, a frequency divider module, a D / A module, a temperature sensor, an LCD display module, and a serial communication module. The GPS receiver, the temperature-controlled crystal oscillator, the time interval measurement module, the frequency divider module, the D / A module, the temperature sensor, and the serial communication module are respectively connected to the processor. The algorithm processing module is connected to the serial communication module, and the LCD display module is connected to the algorithm processing module. The GPS receiver is used to receive GPS satellite signals, and sequentially filter, amplify, frequency convert, acquire and track the GPS satellite signals to obtain the time information broadcast by the GPS satellites, and output a 1PPS signal to the time interval measurement module and the processor based on the time information. The temperature-controlled crystal oscillator is used as an external input clock for the system, inputting a 10MHz crystal frequency to the processor; The time interval measurement module is used to measure the phase difference between the local second pulse signal and the 1PPS signal; The processor is used to realize the real-time detection and effective judgment of the 1PPS signal in the taming mode, generate the local second pulse signal based on the 10MHz crystal oscillator frequency, filter the phase difference, and use a digital PID algorithm to synchronize the filtered local second pulse signal with the 1PPS signal to complete the taming of the isothermal crystal oscillator. The serial communication module is used to enable communication between the processor and the algorithm processing module; The temperature sensor is used to collect the ambient temperature of the thermostatic crystal oscillator. The algorithm processing module is used to predict and compensate the output frequency of the thermostatic crystal oscillator based on valid historical data and the ambient temperature when in hold mode, using a BP neural network algorithm to obtain a standard 10MHz crystal oscillator frequency. The D / A module is used to convert the data processed by the PID algorithm into corresponding analog voltage values ​​and adjust the frequency output of the isothermal crystal oscillator. The frequency divider module uses PLL technology to multiply the standard 10MHz crystal oscillator frequency to the system clock. The liquid crystal display module is used to display the time interval measurement value and the working status of the entire system; The timekeeping method applied to the aforementioned temperature-controlled crystal oscillator timekeeping system based on a BP neural network includes the following steps: The validity of the 1PPS signal is detected in real time to determine whether the system is currently in docile mode or hold mode; In the hold mode, the system detects the 1PPS signal. If the 1PPS signal is invalid, the system outputs historical data within a preset time period after passing through Savitzky-Golay filtering. If the 1PPS signal is valid, the system records the valid historical data during the taming process. When the amount of the recorded valid historical data meets the training data requirement of the BP neural network, the BP neural network is trained. When the BP neural network training is completed, if the 1PPS signal is detected as invalid, the system predicts the output frequency of the thermostatic crystal oscillator through the trained BP neural network to obtain the standard 10MHz crystal oscillator frequency. If the 1PPS signal is detected as valid, the system updates the trained BP neural network. The historical data within the preset time period refers to the most recent 50 historical data entries. If an invalid 1PPS signal is detected during the training of the BP neural network, the output will still be based on the Savitzky-Golay filtering of the most recent 50 historical data. The system makes judgments on the BP neural network update, including: The BP neural network is updated every 2 hours.

2. The isothermal crystal oscillator timekeeping system based on a BP neural network as described in claim 1, characterized in that, The GPS receiver is a ublox receiver; The time interval measurement module is a TDC-GPX2 time interval measurement module; The processor is an FPGA processor; The algorithm processing module is an STM32 algorithm processing module; The liquid crystal display module is an LCD liquid crystal display module.

Citation Information

Patent Citations

  • Counter-based crystal oscillator time-keeping method

    CN110262210A