CN116400578A - Constant-temperature crystal oscillator time keeping system and method based on BP neural network - Google Patents

Constant-temperature crystal oscillator time keeping system and method based on BP neural network Download PDF

Info

Publication number
CN116400578A
CN116400578A CN202310394533.1A CN202310394533A CN116400578A CN 116400578 A CN116400578 A CN 116400578A CN 202310394533 A CN202310394533 A CN 202310394533A CN 116400578 A CN116400578 A CN 116400578A
Authority
CN
China
Prior art keywords
crystal oscillator
module
constant
neural network
frequency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310394533.1A
Other languages
Chinese (zh)
Inventor
纪元法
黄圣荣
孙希延
符强
付文涛
梁维彬
白杨
贾西子
李晶晶
李龙
赵松克
严素清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanning Guidian Electronic Technology Research Institute Co ltd
Guilin University of Electronic Technology
Original Assignee
Nanning Guidian Electronic Technology Research Institute Co ltd
Guilin University of Electronic Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanning Guidian Electronic Technology Research Institute Co ltd, Guilin University of Electronic Technology filed Critical Nanning Guidian Electronic Technology Research Institute Co ltd
Priority to CN202310394533.1A priority Critical patent/CN116400578A/en
Publication of CN116400578A publication Critical patent/CN116400578A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • G04G7/005Synchronisation provided with arrangements to prevent synchronisation by interfering signals
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0499Feedforward networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Oscillators With Electromechanical Resonators (AREA)

Abstract

The invention relates to the technical field of constant-temperature crystal oscillator time keeping algorithms and time synchronization, in particular to a constant-temperature crystal oscillator time keeping system and method based on a BP neural network, wherein the constant-temperature crystal oscillator time keeping system comprises a GPS receiver, a constant-temperature crystal oscillator, a time interval measuring module, a processor, an algorithm processing module, a frequency dividing module, a D/A module, a temperature sensor, a liquid crystal display module and a serial port communication module, and the GPS receiver outputs 1PPS signals; the constant-temperature crystal oscillator is used as an external input clock of the system, and the frequency of the 10MHz crystal oscillator is input to the processor; the time interval measurement module is used for measuring the phase difference between the local second pulse signal and the 1PPS signal; the processor generates a local second pulse signal, and tames the constant-temperature crystal oscillator through the phase difference to obtain the standard 10MHz crystal oscillator frequency; the temperature sensor collects the ambient temperature of the constant-temperature crystal oscillator; and the algorithm processing module predicts and compensates the output frequency of the constant-temperature crystal oscillator by utilizing a BP neural network algorithm based on the effective historical data and the ambient temperature to obtain the standard 10MHz crystal oscillator frequency.

Description

Constant-temperature crystal oscillator time keeping system and method based on BP neural network
Technical Field
The invention relates to the technical field of constant-temperature crystal oscillator time keeping algorithms and time synchronization, in particular to a constant-temperature crystal oscillator time keeping system and method based on a BP neural network.
Background
As a core component of each large electronic device, a high stability and accuracy of the frequency thereof have been a constantly pursued goal. In order to meet the requirements of technological development, the construction of time frequency and time frequency service systems is very important in all countries of the world, and particularly, the improvement of time frequency precision is in an exponentially developing situation in the last 20 years, and is improved by an order of magnitude every 5-10 years. Among various high-precision frequency sources, cesium atomic clocks and hydrogen atomic clocks which are used as primary frequency sources have very high long-term stability and accuracy, but are very expensive, have strict requirements on the external use environment, are generally only suitable for national time service laboratories, and are difficult to apply to civil fields with high requirements on cost. For the high-stability constant-temperature crystal oscillator and the rubidium clock, the high-stability constant-temperature crystal oscillator and the rubidium clock belong to secondary frequency sources, are low in cost, but are relatively poor in long-term stability and accuracy, and are difficult to apply to the field with high requirements on time synchronization precision. Therefore, improvement of the secondary frequency source is highly desired, so that the secondary frequency source has low cost and long-term stability and accuracy.
The constant temperature crystal oscillator (OCXO, oven Controlled Crystal Oscillator) is used as a secondary frequency standard source, and is widely applied to the fields of scientific research metering, industrial equipment and the like due to the advantages of high short-term stability, low price, small volume and the like. However, the constant-temperature crystal oscillator output frequency is easily affected by the environmental temperature and aging factors, so that the crystal oscillator frequency gradually drifts, and the frequency stability and accuracy of the constant-temperature crystal oscillator are reduced. Therefore, many scholars propose to use the advantage of high long-term stability of the GPS pulse-second signal (1Pulse Per Second,1PPS) to tame the local constant-temperature crystal oscillator, so that the long-term stability and accuracy of the local crystal oscillator are effectively improved. However, the satellite signals are affected by factors such as an ionosphere and a troposphere in the transmission process, so that the short-term stability of the GPS 1PPS signals is poor, and the 1PPS signals are easy to lose effectiveness when the interference is serious, so that the stable output of the crystal oscillator frequency cannot be ensured.
Disclosure of Invention
The invention aims to provide a constant-temperature crystal oscillator time keeping system and a constant-temperature crystal oscillator time keeping method based on a BP neural network, and aims to solve the problem of poor stability of crystal oscillator frequency output of a constant-temperature crystal oscillator.
In order to achieve the above objective, in a first aspect, the present invention provides a constant-temperature crystal oscillator time keeping system based on a BP neural network, which includes a GPS receiver, a constant-temperature 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 port communication module, where the GPS receiver, the constant-temperature crystal oscillator, the time interval measurement module, the frequency division module, the D/a module, the temperature sensor, and the serial port communication module are respectively connected with the processor, the algorithm processing module is connected with the serial port communication module, and the liquid crystal display module is connected with the algorithm processing module;
the GPS receiver is used for receiving GPS satellite signals, sequentially carrying out filtering, amplifying, frequency conversion, capturing and tracking processing on the GPS satellite signals to obtain time information broadcast by GPS satellites, and outputting 1PPS signals to the time interval measuring module and the processor based on the time information;
the constant-temperature crystal oscillator is used as an external input clock of the system and is used for inputting the frequency of the 10MHz crystal oscillator to the processor;
the time interval measuring module is used for measuring the phase difference between the local second pulse signal and the 1PPS signal;
the processor is used for realizing real-time detection and effective judgment of the 1PPS signal in a tame mode, generating the local second pulse signal based on the 10MHz crystal oscillator frequency, filtering the phase difference, and synchronizing the filtered local second pulse signal with the 1PPS signal by utilizing a digital PID algorithm to tame the constant-temperature crystal oscillator;
the serial port communication module is used for realizing communication between the processor and the algorithm processing module;
the temperature sensor is used for collecting the ambient temperature of the constant-temperature crystal oscillator;
the algorithm processing module is used for predicting and compensating the output frequency of the constant-temperature crystal oscillator by utilizing a BP neural network algorithm based on effective historical data and the ambient temperature in a hold mode to obtain a standard 10MHz crystal oscillator frequency;
the D/A module is used for converting the data processed by the PID algorithm into corresponding analog voltage values and adjusting the constant-temperature crystal oscillator frequency output;
the frequency division module multiplies the standard 10MHz crystal oscillator frequency to a system clock by using a PLL (phase locked loop) technology;
the liquid crystal display module is used for displaying the time interval measurement value and the working state of the whole system.
Wherein the GPS receiver is a ublox receiver;
the time interval measuring module is a TDC-GPX2 time interval measuring 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.
In a second aspect, the invention provides a constant-temperature crystal oscillator time keeping method based on a BP neural network, which comprises the following steps:
detecting the validity of a 1PPS signal in real time, and determining whether the system is currently in a tame mode or a hold mode;
in the hold mode, the system detects the 1PPS signal, and if the 1PPS signal is invalid, the system outputs the historical data in a preset time period after the historical data is filtered by Savitzky-Golay; if the 1PPS signal is effective, recording effective historical data in the taming process, and training the BP neural network when the recorded data volume of the effective historical data meets the training data volume of the BP neural network;
when the BP neural network training is finished, if the 1PPS signal is detected to be invalid, the system predicts the output frequency of the constant-temperature crystal oscillator through the BP neural network after the training is finished to obtain the standard 10MHz crystal oscillator frequency, and if the 1PPS signal is detected to be valid, the system judges the updating of the BP neural network after the training is finished.
The historical data in the preset time period is the last 50 times of historical data.
In the training process of the BP neural network, if 1PPS signals are detected to be invalid, savitzky-Golay filtering is still carried out on the latest 50 times of historical data, and then the data are output.
Wherein the BP neural network is updated with network training every 2 hours.
The invention relates to a constant-temperature crystal oscillator time keeping system based on BP neural network, which is characterized in that by the following steps,
drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a working flow chart of a constant temperature crystal oscillator time keeping method based on a BP neural network.
Fig. 2 is a schematic structural diagram of a constant temperature crystal oscillator time keeping system based on a BP neural network.
Fig. 3 is a schematic diagram of the high resolution measurement principle.
FIG. 4 is a schematic diagram of the Savitzky-Golay filter algorithm process.
Fig. 5 is a schematic diagram of a BP neural network topology.
Fig. 6 is a schematic diagram of the effect of the amount of training data on the various errors in the BP network.
Fig. 7 is a schematic diagram of a BP neural network algorithm process.
Fig. 8 is a flowchart of a constant temperature crystal oscillator time keeping method based on a BP neural network.
The system comprises a 1-GPS receiver, a 2-constant temperature crystal oscillator, a 3-time interval measuring module, a 4-processor, a 5-algorithm processing module, a 6-frequency dividing module, a 7-D/A module, an 8-temperature sensor, a 9-liquid crystal display module and a 10-serial port communication module.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
Referring to fig. 1 to 8, in a first aspect, the present invention provides a constant-temperature crystal oscillator time keeping system based on a BP neural network, which includes a GPS receiver 1, a constant-temperature 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 port communication module 10, wherein the GPS receiver 1, the constant-temperature 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 port communication module 10 are respectively connected with the processor 4, the algorithm processing module 5 is connected with the serial port communication module 10, and the liquid crystal display module 9 is connected with the algorithm processing module 5;
the GPS receiver 1 is configured to receive GPS satellite signals, sequentially perform filtering, amplifying, frequency conversion, capturing and tracking processing on the GPS satellite signals, obtain time information broadcast by GPS satellites, and output 1PPS signals to the time interval measurement module 3 and the processor 4 based on the time information;
the constant-temperature crystal oscillator 2 is used as an external input clock of the system and is used for inputting the frequency of the 10MHz crystal oscillator to the processor 4;
the time interval measuring module 3 is used for measuring the phase difference between a local second pulse signal and the 1PPS signal;
the processor 4 is configured to implement real-time detection and effective judgment of the 1PPS signal in a tame mode, generate the local second pulse signal based on the 10MHz crystal oscillator frequency, perform filtering processing on the phase difference, and synchronize the filtered local second pulse signal with the 1PPS signal by using a digital PID algorithm, thereby performing tame on the constant temperature crystal oscillator 2;
the serial port communication module 10 is configured to implement communication between the processor 4 and the algorithm processing module 5;
the temperature sensor 8 is used for collecting the ambient temperature of the constant-temperature crystal oscillator 2;
the algorithm processing module 5 is used for predicting and compensating the output frequency of the constant-temperature crystal oscillator 2 by utilizing a BP neural network algorithm based on the effective historical data and the ambient temperature in the maintenance mode to obtain the standard 10MHz crystal oscillator frequency;
the D/A module 7 is used for converting the data processed by the PID algorithm into corresponding analog voltage values and adjusting the frequency output of the constant-temperature crystal oscillator 2;
the frequency division module 6 multiplies the standard 10MHz crystal oscillator frequency to a system clock by using a PLL technology;
the liquid crystal display module 9 is used for displaying the time interval measurement value and the working state of the whole system.
Specifically, the GPS receiver 1 is a ublox receiver, and is configured to output standard second pulses; the time interval measuring module 3 is a TDC-GPX2 time interval measuring module; the processor 4 is an FPGA processor; the algorithm processing module 5 is an STM32 algorithm processing module; the liquid crystal display module 9 is an LCD liquid crystal display module. The time interval measurement value is mainly used for improving the measurement precision, so that the phase difference measurement value is more accurate.
The TDC-GPX2 time interval measuring module is used for measuring the digital phase difference between the local second pulse signal and the 1PPS signal. The module integrates the CMOS input and SPI interface, so that the module has high measurement performance and data throughput rate. In addition, the TDC-GPX2 contains a group of 17 8-bit registers, various measurement functions can be flexibly realized by configuring initial values of the related registers, wherein the lower four bits of the 4 th, 5 th and 6 th registers form a 20-bit clock frequency division coefficient, and the measurement resolution is improved by subdividing the time of one period of a system clock, so that high-precision time interval measurement is realized, as shown in fig. 3.
The FPGA processor is used for realizing real-time detection and effective judgment of the 1PPS signal, generating a local second pulse signal, then carrying out Savitzky-Golay filtering processing on the digital phase difference between the local second pulse signal and the 1PPS signal, eliminating random jitter errors introduced by the 1PPS signal, and finally realizing high-precision synchronization of the local second pulse signal and the 1PPS signal by utilizing a digital PID algorithm. The Savitzky-Golay filtering is widely applied to data smoothing denoising as a low-pass digital filter, can directly process the data smoothing problem in a time domain based on a least square fitting filtering method, and ensures that the trend and the width of a signal are not changed and the accuracy of processing data is improved while noise is filtered by realizing polynomial fitting on data points in a sliding window with a certain length, wherein the expression is as follows:
Figure BDA0004177183870000061
wherein Z is i+1 Z is the original data value i ' is a filtered value, a i For the filter coefficient of the ith data value, N is the width of half the filter window, N is the length of the entire filter window, and its value is 2n+1.
After the system is electrified and stable, the high-precision time interval measuring module 3 is utilized to measure the time interval between the local second pulse signal and the 1PPS signal, so that the picosecond digital phase deviation is obtained. To reduce the effect of 1PPS signal random jitter on the measurement results, the resulting digital phase deviations were smoothed using Savitzky-Golay filtering, as shown in fig. 4.
Fig. 4 (a) shows raw data of 1PPS phase deviation on the ordinate and time on the abscissa. As can be seen from the figure, a large interference error occurs near 500s, and the 1PPS phase deviation overall fluctuates by-3×10 when not subjected to the filtering process 4 ~3×10 4 ps. FIG. 4 (b) shows a Savitzky-Golay filtering process, in which the filtering window length is adjusted multiple times, and the simulation shows that the filtering effect is best when the window length is 11, the algorithm can effectively filter accidental interference errors, ensure that the trend and width of data are unchanged, greatly reduce the overall fluctuation range of the data, and the error range is-2×10 4 ~2×10 4 ps.
The STM32 algorithm processing module is mainly used for realizing a BP neural network algorithm of the constant-temperature crystal oscillator 2, and by receiving effective historical data in the taming process, the BP neural network model is utilized for predicting and compensating the output frequency of the constant-temperature crystal oscillator 2, so that the long-term stability and accuracy of the crystal oscillator are improved. Fig. 5 shows a BP neural network topology.
The BP neural network model building and realizing process comprises the following steps.
1. Data partitioning
In the process of taming the constant-temperature crystal oscillator 2, the time, temperature and voltage control value data when the GPS 1PPS is effective are recorded, and the effective data are divided into three parts, namely training data, verification data and test data. The training data are used for solving the connection weight and the threshold value of each neuron in the BP neural network; the verification data are used for preventing the network training from going to the fitting problem; the test data do not participate in the training process, and only play a role in fitting the test model.
2. Data normalization
In order to facilitate BP neural network model training and avoid the problem of magnitude difference in calculation, input data needs to be normalized, so that the input data is in the range of-1 to 1, and the formula is as follows:
Figure BDA0004177183870000071
wherein X is normalized data, X is original data, X min Is the minimum value in the original data, x max Is the maximum value in the original data.
3. Network model construction and transfer function selection
In order to solve the problem of constant-temperature crystal oscillator 2 frequency drift, the model selects a 3-layer network structure, and the number of neurons of an input layer, an hidden layer and an output layer of the model is 3,5 and 1 respectively. In the selection of the transfer function, the implicit layer adopts a tan sig function, the output layer adopts a purelin linear function, and the formulas are respectively as follows:
Figure BDA0004177183870000072
y=x (1-4)
4. model-related data initialization
The model is mainly realized by a C language algorithm, and the random function of rand in a header file stslib.h is called to enable the weight value and the threshold value of each neuron to be distributed into random values within the range of-1 to 1.
5. Calculating hidden layer output
Figure BDA0004177183870000073
Wherein n is the number of neurons in the hidden layer; a, a k And Z k The threshold and output, X, respectively expressed as the kth neuron of the hidden layer i Output data for the ith neuron of the input layer, w ik For the connection weight of each neuron between the input layer and the hidden layer, f 1 (x) Is a hidden layer neuron transfer function.
6. Calculate output layer output
Figure BDA0004177183870000074
Wherein m is the number of neurons of the output layer; b j And Y j The threshold and output, Z, respectively, of the jth neuron of the output layer k Output data of kth neuron as hidden layer, w jk For the connection weight of each neuron between the hidden layer and the output layer, f 2 (x) Is the output layer neuron transfer function.
7. Calculating network errors
The sum of squares of errors of actual output values and expected values of the network is taken as the calculation error of the whole network, and the formula is as follows:
Figure BDA0004177183870000075
wherein E is network calculation error, Y' j For the expected value, Y j And outputting the value for the network.
8. Updating weights and thresholds
And repeatedly updating the weights and the thresholds of the neurons in the network by adopting a gradient descent method according to the calculated network error until the error is reduced to meet the design requirement. The following will take the output layer neuron threshold update as an example, and derive its formula:
Figure BDA0004177183870000081
wherein Δb j In order to output the updated variation of the neuron threshold value of the layer, the value range of eta is between 0 and 1, and the learning rate is called.
Converting the formula (3-24) into:
Figure BDA0004177183870000082
wherein f 2 ' is the partial derivative of the output layer neuron transfer function.
After finishing, the neuron threshold value of the output layer is updated as follows:
Figure BDA0004177183870000083
the derivation of the output layer neuron weight update, hidden layer neuron threshold and weight update formula is similar to the above output layer neuron threshold update, and will not be described in detail here, and the update formulas are respectively:
Figure BDA0004177183870000084
Figure BDA0004177183870000085
Figure BDA0004177183870000086
9. data inverse normalization processing
Because the network model is operated on normalized data, when the network model is trained, the output value of the network model needs to be subjected to inverse normalization processing to obtain a final network prediction result, and an inverse normalization formula is as follows:
Figure BDA0004177183870000087
wherein Y is network output data, Y is inverse normalized network prediction result, Y min ,y max And x in the formula (1-2) min ,x max The formula is inversely related to the formula (1-14).
10. Model fitting test
After the network model is trained, the predicted value output by the model is compared with the test data, and the average absolute error, the mean square error and the root mean square error of the model prediction are calculated, so that the fitting performance of the model is judged.
Fig. 6 shows the influence of the training data amount on various errors in the BP network, in the process of training the constant-temperature crystal oscillator 2, by recording 2000 groups of effective sample data, 500, 1000 and 1500 groups are respectively selected as BP network model training samples, and the last 200 groups of data are subjected to pre-estimation comparison. As can be seen from fig. 6, as the number of training samples increases, the errors of the BP neural network model of the constant-temperature crystal oscillator 2 in fitting the test voltage-controlled values gradually decrease, and when the training samples are in 1500 groups, the fitting effect of the model is the best. When the number of training samples is small, the weights and threshold values of all neurons in the model are not sufficiently updated, so that the fitting effect of the model is poor.
The experiment is carried out under the normal temperature condition, after the system is electrified and stable, the output frequency of the crystal oscillator per minute is measured by utilizing a frequency meter, the average of the instantaneous frequency values acquired for 10 times is taken as the actual output frequency, the recorded data is imported into Matlab for processing, and the change curve of the crystal oscillator frequency along with time is drawn, as shown in the following figure 7.
As can be seen from fig. 7 (a), the constant temperature crystal oscillator 2 has a smaller output frequency with time without any treatment, and the crystal oscillator frequency has a drift phenomenon, which has poor long-term stability and accuracy. Fig. 7 (b) shows that after the BP neural network training is completed, the 1PPS signal is disconnected, so that the system enters the data result obtained in the hold mode, and after the prediction compensation of the BP neural network, the output frequency of the constant-temperature crystal oscillator 2 is stabilized near 10MHz, so that the long-term stability and accuracy of the crystal oscillator are remarkably improved. Fig. 7 (c) is a digital phase difference between the local second pulse signal and the 1PPS signal, the system is in a tame mode before 3600s, and tame is performed on the constant-temperature crystal oscillator 2 by taking the 1PPS signal as a standard frequency source, so that the overall deviation amplitude of the local second pulse signal and the 1PPS signal is about 10ns, the tame effect is good, and high-precision pulse synchronization can be kept all the time. The system is in a holding mode after 3600s, effective historical data before taming is recorded for BP neural network model training of the constant-temperature crystal oscillator 2, and output frequency of the constant-temperature crystal oscillator 2 is predicted and compensated, so that the system can still maintain synchronization precision of a local second pulse signal and a 1PPS signal within 1us under the condition that a reference signal is lost for 1 hour, and timekeeping capacity of the system is improved.
The frequency division module 6 multiplies the frequency of the standard 10MHz crystal oscillator after the tame to a system clock by utilizing the phase-locked loop principle;
the D/A module 7 is used for converting the digital signal predicted by the BP network into corresponding analog voltage so that the crystal oscillator frequency can be stably output;
the temperature sensor 8 is used for collecting the ambient temperature of the constant-temperature crystal oscillator 2 and is used as an input reference quantity of the BP neural network;
the LCD liquid crystal display module is used for displaying the time interval measurement value and the working state of the system, namely the display of the tame mode or the holding mode;
the serial port communication module 10 is used for performing data interaction of temperature, voltage control value and the like on the FPGA and the STM32, and realizing BP neural network training.
Referring to fig. 2 to 7, in a second aspect, the present invention provides a constant temperature crystal oscillator time keeping method based on a BP neural network, which includes the following steps:
s1, detecting the validity of a 1PPS signal in real time, and determining whether the system is in a tame mode or a hold mode currently;
specifically, when the system detects that the 1PPS signal is effective three times in succession, the system is considered to be in a tame mode and a crystal oscillator tame process is started. When the system is in the tame mode, by detecting the processed 1PPS signal in real time, the system is switched to the hold mode if the signal is not detected within 2 seconds.
S2, in the holding mode, detecting the 1PPS signal by the system, and if the 1PPS signal is invalid, outputting the historical data in a preset time period after being filtered by Savitzky-Golay; if the 1PPS signal is effective, recording effective historical data in the taming process, and training the BP neural network when the recorded data volume of the effective historical data meets the training data volume of the BP neural network;
specifically, the historical data in the preset time period is the last 50 times of historical data. In the training process of the BP neural network, if the 1PPS signal is detected to be invalid, the latest 50 times of historical data are still subjected to Savitzky-Golay filtering and then output.
And S3, when the BP neural network training is finished, if the 1PPS signal is detected to be invalid, the system predicts the output frequency of the constant-temperature crystal oscillator 2 through the BP neural network after the training is finished to obtain the standard 10MHz crystal oscillator frequency, and if the 1PPS signal is detected to be valid, the system judges the updating of the BP neural network after the training is finished.
Specifically, the BP neural network is updated with network training every 2 hours.
Advantageous effects
1. According to the constant-temperature crystal oscillator time keeping method based on the BP neural network, the BP neural network model of the constant-temperature crystal oscillator 2 is established, and according to the data recorded in the system taming process, the crystal oscillator output frequency is predicted and compensated, so that the system time keeping capability is improved. In the case of 1 hour of failure of the GPS 1PPS signal, the control system time keeping accuracy is better than 1us.
2. The constant-temperature crystal oscillator time keeping method based on BP neural network of the invention uses Savitzky-Golay filtering algorithm,the accidental interference error is effectively filtered, the trend and the width of the data are ensured to be unchanged, the overall fluctuation range of the data is greatly reduced, and the error range is-2 multiplied by 10 4 ps~2×10 4 ps.
3. According to the constant-temperature crystal oscillator time keeping method based on the BP neural network, after 1PPS signal fails for 1 hour, the accuracy of crystal oscillator frequency can still be kept at 10-9 orders of magnitude, and the long-term stability and accuracy of crystal oscillator are remarkably improved.
The above disclosure is only a preferred embodiment of a constant temperature crystal oscillator time keeping system and method based on a BP neural network, and certainly should not be taken as limiting the scope of the invention, and those skilled in the art will appreciate that all or part of the procedures for implementing the above embodiments are equivalent and still fall within the scope of the invention as defined in the claims.

Claims (6)

1. A constant temperature crystal oscillator time keeping system based on BP neural network is characterized in that,
the device comprises a GPS receiver, a constant temperature 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 port communication module, wherein the GPS receiver, the constant temperature crystal oscillator, the time interval measurement module, the frequency division module, the D/A module, the temperature sensor and the serial port communication module are respectively connected with the processor, the algorithm processing module is connected with the serial port communication module, and the liquid crystal display module is connected with the algorithm processing module;
the GPS receiver is used for receiving GPS satellite signals, sequentially carrying out filtering, amplifying, frequency conversion, capturing and tracking processing on the GPS satellite signals to obtain time information broadcast by GPS satellites, and outputting 1PPS signals to the time interval measuring module and the processor based on the time information;
the constant-temperature crystal oscillator is used as an external input clock of the system and is used for inputting the frequency of the 10MHz crystal oscillator to the processor;
the time interval measuring module is used for measuring the phase difference between the local second pulse signal and the 1PPS signal;
the processor is used for realizing real-time detection and effective judgment of the 1PPS signal in a tame mode, generating the local second pulse signal based on the 10MHz crystal oscillator frequency, filtering the phase difference, and synchronizing the filtered local second pulse signal with the 1PPS signal by utilizing a digital PID algorithm to tame the constant-temperature crystal oscillator;
the serial port communication module is used for realizing communication between the processor and the algorithm processing module;
the temperature sensor is used for collecting the ambient temperature of the constant-temperature crystal oscillator;
the algorithm processing module is used for predicting and compensating the output frequency of the constant-temperature crystal oscillator by utilizing a BP neural network algorithm based on effective historical data and the ambient temperature in a hold mode to obtain a standard 10MHz crystal oscillator frequency;
the D/A module is used for converting the data processed by the PID algorithm into corresponding analog voltage values and adjusting the constant-temperature crystal oscillator frequency output;
the frequency division module multiplies the standard 10MHz crystal oscillator frequency to a system clock by using a PLL (phase locked loop) technology;
the liquid crystal display module is used for displaying the time interval measurement value and the working state of the whole system.
2. The constant temperature crystal oscillator time keeping system and method based on BP neural network as set forth in claim 1, wherein,
the GPS receiver is a ublox receiver;
the time interval measuring module is a TDC-GPX2 time interval measuring 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.
3. The constant-temperature crystal oscillator time keeping method based on the BP neural network is characterized by comprising the following steps of:
detecting the validity of a 1PPS signal in real time, and determining whether the system is currently in a tame mode or a hold mode;
in the hold mode, the system detects the 1PPS signal, and if the 1PPS signal is invalid, the system outputs the historical data in a preset time period after the historical data is filtered by Savitzky-Golay; if the 1PPS signal is effective, recording effective historical data in the taming process, and training the BP neural network when the recorded data volume of the effective historical data meets the training data volume of the BP neural network;
when the BP neural network training is finished, if the 1PPS signal is detected to be invalid, the system predicts the output frequency of the constant-temperature crystal oscillator through the BP neural network after the training is finished to obtain the standard 10MHz crystal oscillator frequency, and if the 1PPS signal is detected to be valid, the system judges the updating of the BP neural network after the training is finished.
4. The constant temperature crystal oscillator time keeping system and method based on BP neural network as set forth in claim 3, characterized in that,
the historical data in the preset time period is the last 50 times of historical data.
5. The constant temperature crystal oscillator time keeping system and method based on BP neural network as set forth in claim 4, wherein,
in the training process of the BP neural network, if the 1PPS signal is detected to be invalid, the latest 50 times of historical data are still subjected to Savitzky-Golay filtering and then output.
6. The constant temperature crystal oscillator time keeping system and method based on BP neural network as set forth in claim 5, wherein,
the system judges the update of the BP neural network, and comprises the following steps:
the BP neural network is updated with network training every 2 hours.
CN202310394533.1A 2023-04-13 2023-04-13 Constant-temperature crystal oscillator time keeping system and method based on BP neural network Pending CN116400578A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310394533.1A CN116400578A (en) 2023-04-13 2023-04-13 Constant-temperature crystal oscillator time keeping system and method based on BP neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310394533.1A CN116400578A (en) 2023-04-13 2023-04-13 Constant-temperature crystal oscillator time keeping system and method based on BP neural network

Publications (1)

Publication Number Publication Date
CN116400578A true CN116400578A (en) 2023-07-07

Family

ID=87015709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310394533.1A Pending CN116400578A (en) 2023-04-13 2023-04-13 Constant-temperature crystal oscillator time keeping system and method based on BP neural network

Country Status (1)

Country Link
CN (1) CN116400578A (en)

Similar Documents

Publication Publication Date Title
CN1904642B (en) Apparatus and method for compensating the drift of a local clock used as sampling frequency
CN109581856B (en) Time synchronization and time keeping method based on high-performance crystal oscillator frequency calibration
CN111565084B (en) Satellite time service time keeping system and method based on frequency estimation
CN112433235B (en) Method, system and medium for determining time reference
CN109299496B (en) High-precision synchronous clock generation method
CN110554597B (en) Hydrogen cesium time scale fusion method based on Vondark-Cepek filtering
CN107086901B (en) A kind of BDT method for building up and UTC (NTSC) method for building up
CN102023567A (en) High-precision time service method for multi-time-source comprehensive calculation
CN107525968B (en) Frequency measurement system based on voltage-controlled crystal oscillator
CN109975834B (en) Satellite-borne computer on-orbit clock drift accurate measurement system and measurement method
CN103699001B (en) Utilize clocking method and system that constant-temperature crystal oscillator realizes
CN114205045B (en) TTE network clock calibration method and system
CN112636857A (en) High-precision time-frequency signal dynamic driving method based on residual error correction
CN114578679B (en) Time synchronization method applied to tunnel based on time service voltage control technology
CN108209936A (en) A kind of adaptive calibration algorithm of Endermic implantating blood glucose meter
CN116980065B (en) Clock calibration method, clock calibration device, terminal equipment and storage medium
CN110138491B (en) GPS clock compensation method based on generalized weighted least square method
EP2990832A1 (en) Data acquisition apparatus using one single local clock
CN113359191B (en) Real-time correction method of constant-temperature crystal oscillator and electromagnetic receiver
CN116400578A (en) Constant-temperature crystal oscillator time keeping system and method based on BP neural network
CN110677144B (en) Crystal oscillator calibration method and system
Tamura et al. Scale factor calibration of a superconducting gravimeter at Esashi Station, Japan, using absolute gravity measurements
CN114047684B (en) Atomic clock joint time keeping method and device
CN108599915A (en) Based on number between the send-receive clock of closed loop phase ambiguity estimation and compensation method
Zhang et al. Study on the stability and accuracy of baseline values measured during the calibrating time intervals

Legal Events

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