Search

CN-121995725-A - Constant-temperature crystal oscillator time keeping method and system based on LSTM neural network

CN121995725ACN 121995725 ACN121995725 ACN 121995725ACN-121995725-A

Abstract

The invention discloses a constant-temperature crystal oscillator time keeping method and a constant-temperature crystal oscillator time keeping system based on an LSTM neural network, wherein the method comprises the steps of collecting clock difference, ambient temperature, time sequence and frequency control quantity data in real time to construct a training sample set; the method comprises the steps of taking historical temperature and time sequence as input and frequency control quantity after filtering as output, training an LSTM neural network to obtain a frequency drift prediction model, utilizing new data to update the model online when satellite signals are available, switching to a time keeping prediction mode when signals are interrupted, inputting real-time temperature and time sequence into the model to predict the frequency control quantity, generating voltage-controlled voltage according to a predicted value to perform frequency compensation on a constant-temperature crystal oscillator, and maintaining the accuracy of a local time reference. According to the invention, model calculation and real-time control decoupling are realized by combining the nonlinear time-varying characteristic of LSTM capture temperature-aging coupling and a dual-core architecture, nanosecond long-term time keeping precision is realized in a satellite rejection environment, and the online self-learning capacity and the mode switching smoothness are realized.

Inventors

  • WANG LU
  • CHEN XIAOYU
  • SHU LEIZHENG

Assignees

  • 中国科学院空间应用工程与技术中心

Dates

Publication Date
20260508
Application Date
20260127

Claims (10)

  1. 1. A constant-temperature crystal oscillator time keeping method based on an LSTM neural network is characterized by comprising the following steps of: Step S1, acquiring clock difference data, environment temperature data, time sequence information and frequency control quantity data of a constant-temperature crystal oscillator in real time and preprocessing to obtain a training sample set; S2, using environmental temperature data and time sequence information acquired at historical moments as input features, using filtered frequency control quantity data as a prediction target to construct a long and short memory neural network model, and training according to the training sample set to obtain a frequency drift prediction model; step S3, continuously updating the frequency drift prediction model on line by using the newly acquired data when the satellite signals are available; S4, switching to a time keeping forecast mode when the satellite signal is interrupted, and inputting temperature data and time sequence information acquired in real time into the frequency drift forecast model for forecast so as to obtain a frequency control quantity; And S5, generating voltage-controlled voltage according to the frequency control quantity, and performing frequency compensation on the constant-temperature crystal oscillator to maintain the time keeping precision of the local time reference.
  2. 2. The method of constant temperature crystal oscillator time keeping based on LSTM neural network according to claim 1, wherein the process of step S2 includes: automatically triggering a model training process after the data accumulation reaches the preset window length, constructing a single-layer long-short-term memory network structure and configuring a preset number of hidden layer neurons; The environmental temperature data and time sequence information acquired at the historical moment are used as multidimensional input feature vectors, and the frequency control quantity data subjected to filtering smoothing processing is used as a target output of supervised learning; adopting a self-adaptive moment estimation optimizer and setting an adjustable initial learning rate, and carrying out dynamic exponential decay on the learning rate according to the performance of the verification set in the training process; model parameter optimization is completed through preset training iteration times, and deviation between a predicted value and a true value is measured by using a mean square error function so as to obtain the frequency drift prediction model.
  3. 3. The method for keeping in time constant temperature crystal oscillator based on LSTM neural network as set forth in claim 2, wherein the process of dynamically and exponentially attenuating the learning rate according to the performance of the verification set in the training process comprises: After each training iteration period is finished, dividing the current batch data into a training subset and a verification subset; Updating model parameters through the training subset, and synchronously calculating a prediction error index on the verification subset; automatically executing exponential decay at the end of each epoch, carrying out exponential-level down-regulation on the current learning rate according to a preset decay coefficient, and reconfiguring the learning rate into an optimizer after the down-regulation; and continuing the subsequent iterative training process until all training periods are completed or the learning rate is attenuated to a preset minimum threshold value.
  4. 4. The method of constant temperature crystal oscillator time keeping based on LSTM neural network according to claim 3, wherein the process of step S3 includes: during the available period of satellite signals, the online updating flow of the frequency drift prediction model is started while the operation of the proportional-integral control tame mode is kept; Continuously accumulating the sample training set to a local caching unit; When the accumulated data quantity reaches the preset updating window length, automatically triggering a model updating mechanism, and carrying out parameter fine adjustment or local updating on the frequency drift prediction model by utilizing newly-added data; and after the model updating is completed, the local buffer unit is emptied, and the data acquisition and accumulation process is repeatedly executed, so that the periodic online self-adaptive learning is realized.
  5. 5. The LSTM neural network-based isothermal crystal oscillator time keeping method according to claim 4, wherein the process of performing parameter fine tuning or local updating on the frequency drift prediction model by using the newly added data comprises: After gradient calculation and parameter optimization are completed on the second processing core, pruning and quantization operations are carried out on the updated frequency drift prediction model, and the frequency drift prediction model is converted into a lightweight inference format; Synchronously transmitting the optimized compressed frequency drift prediction result to the first processing core through the shared memory; And when the next control period starts, the first processing core reads a new frequency drift prediction result from the shared memory and executes frequency control, so that seamless connection between a model updating process and a real-time control task is realized.
  6. 6. The method of constant temperature crystal oscillator time keeping based on LSTM neural network according to claim 5, wherein the process of step S4 includes: The first processing core immediately cuts off a proportional integral control tame mode and starts a time keeping forecast mode after detecting a satellite signal interruption triggering condition; the first processing core stops outputting the control quantity calculated in real time to the digital-to-analog converter, and simultaneously asynchronously writes the temperature data and the time sequence information acquired in real time into the shared memory; the second processing core continuously monitors the state of the shared memory, reads and inputs new data after the new data is written in, and performs forward reasoning calculation on the frequency drift prediction model to generate a frequency control quantity predicted value at the current moment; the second processing core writes the predicted value back to the shared memory, and the first processing core reads the predicted value and assigns the predicted value to the digital-to-analog converter module through the programmable logic device to generate corresponding voltage-controlled voltage to perform frequency compensation on the constant-temperature crystal oscillator.
  7. 7. The LSTM neural network based isothermal crystal oscillator time keeping method according to claim 6, wherein the process of performing forward reasoning calculation by the second processing core includes: after reading the temperature data and time sequence information in the shared memory, performing format conversion and dimension reconstruction on the temperature data and the time sequence information to obtain a tensor structure; performing inference calculation on the tensor structure as input of the frequency drift prediction model to generate an initial prediction result; Performing boundary value verification on the initial prediction result, triggering an exception handling mechanism if the prediction value is detected to exceed the range of a preset DAC control word, performing forced truncation and recording an exception event; And performing format conversion on the checked frequency control quantity predicted value and writing the converted frequency control quantity predicted value back into the shared memory.
  8. 8. The LSTM neural network based isothermal crystal oscillator time keeping method according to claim 7, wherein the trigger condition for entering the time keeping forecast mode includes: detecting that the satellite signal strength is lower than a preset threshold value or is completely interrupted; the frequency drift prediction model has completed initial training and reached a convergence state.
  9. 9. The method of constant temperature crystal oscillator time keeping based on LSTM neural network according to claim 8, wherein the process of step S5 includes: the first processing core reads the predicted value of the frequency control quantity from the shared memory, converts the predicted value into a digital control signal through the programmable logic device and assigns the digital control signal to the digital-to-analog converter; the digital-to-analog converter converts the digital control signal into analog voltage-controlled voltage and applies the analog voltage-controlled voltage to the voltage-controlled input end of the constant-temperature crystal oscillator; the constant-temperature crystal oscillator adjusts the internal oscillation frequency according to the voltage-controlled voltage to obtain a frequency output signal; the programmable logic device generates a local second pulse signal based on the frequency output signal and maintains phase continuity through a phase-locked loop mechanism; The first processing core continuously monitors the stability of the frequency output signal and the local second pulse signal, ensuring long-term time keeping accuracy of the time reference during satellite signal interruption.
  10. 10. A LSTM neural network based thermostatted crystal oscillator time keeping system based on the LSTM neural network based thermostatted crystal oscillator time keeping method of any one of claims 1 to 9, comprising: The data acquisition module is used for acquiring clock difference data, environment temperature data, time sequence information and frequency control quantity data of the constant-temperature crystal oscillator in real time and preprocessing the clock difference data, the environment temperature data, the time sequence information and the frequency control quantity data to obtain a training sample set; The model training module is connected with the data acquisition module and is used for constructing a long and short memory neural network model by taking the environmental temperature data and time sequence information acquired at the historical moment as input characteristics and the filtered frequency control quantity data as a prediction target, and training according to the training sample set to obtain a frequency drift prediction model; The online updating module is connected with the model training module and is used for continuously updating the frequency drift prediction model online by using the newly acquired data when satellite signals are available; The time keeping forecasting module is connected with the online updating module and is used for switching to a time keeping forecasting mode when the satellite signal is interrupted, and inputting temperature data and time sequence information acquired in real time into the frequency drift forecasting model for forecasting so as to obtain a frequency control quantity; The frequency compensation module is connected with the timekeeping forecasting module and is used for generating voltage-controlled voltage according to the frequency control quantity, carrying out frequency compensation on the constant-temperature crystal oscillator and maintaining the timekeeping precision of the local time reference.

Description

Constant-temperature crystal oscillator time keeping method and system based on LSTM neural network Technical Field The invention relates to the technical field of precise time frequency, in particular to a constant-temperature crystal oscillator time keeping method and system based on an LSTM neural network. Background In the fields of modern communication, electric power, finance, national defense and the like, high-precision time synchronization is a key basis for ensuring the collaborative operation of the system. Constant temperature crystal oscillators (OCXOs) are used as timekeeping core components that rely on frequency compensation techniques to maintain long term stability in satellite rejection environments. The traditional time keeping method mainly adopts a least square fitting, a table look-up method or a Kalman filtering model and the like, and realizes frequency prediction and compensation by establishing a linear or low-dimensional mapping relation of temperature-frequency or time-frequency. However, the constant temperature crystal oscillator has remarkable nonlinear and time-varying characteristics in actual work, and the frequency drift of the constant temperature crystal oscillator has complex dynamic rules under the combined action of multiple physical field coupling factors such as temperature fluctuation, long-term aging, internal stress release and the like. The prior art scheme is based on a fixed parameter model, is difficult to accurately represent the high-dimensional nonlinear time-varying characteristic of aging-temperature coupling, and lacks the self-adaptive capability on individual characteristic differences of crystal oscillators. Once the working scene is shifted or the crystal oscillator enters different aging stages, the preset model cannot track the drift trend, so that the timekeeping precision is rapidly deteriorated. Especially in the refusing environment of satellite signal long-term interruption, the time keeping error of the traditional method in 30 days can reach microsecond or even millisecond level, and the harsh requirements of modern systems on nanosecond precision can not be met. Therefore, a frequency prediction method capable of deeply mining a multi-dimensional time sequence coupling relation and having online self-learning capability is needed to break through the bottleneck of the traditional model in terms of precision and adaptability. Disclosure of Invention Therefore, the invention provides a constant-temperature crystal oscillator time keeping method and system based on an LSTM neural network, which are used for solving the problems in the prior art. In order to achieve the above purpose, the invention provides a constant temperature crystal oscillator time keeping method based on an LSTM neural network, comprising the following steps: Step S1, acquiring clock difference data, environment temperature data, time sequence information and frequency control quantity data of a constant-temperature crystal oscillator in real time and preprocessing to obtain a training sample set; S2, using environmental temperature data and time sequence information acquired at historical moments as input features, using filtered frequency control quantity data as a prediction target to construct a long and short memory neural network model, and training according to the training sample set to obtain a frequency drift prediction model; step S3, continuously updating the frequency drift prediction model on line by using the newly acquired data when the satellite signals are available; S4, switching to a time keeping forecast mode when the satellite signal is interrupted, and inputting temperature data and time sequence information acquired in real time into the frequency drift forecast model for forecast so as to obtain a frequency control quantity; And S5, generating voltage-controlled voltage according to the frequency control quantity, and performing frequency compensation on the constant-temperature crystal oscillator to maintain the time keeping precision of the local time reference. Further, the process of step S2 includes: automatically triggering a model training process after the data accumulation reaches the preset window length, constructing a single-layer long-short-term memory network structure and configuring a preset number of hidden layer neurons; The environmental temperature data and time sequence information acquired at the historical moment are used as multidimensional input feature vectors, and the frequency control quantity data subjected to filtering smoothing processing is used as a target output of supervised learning; adopting a self-adaptive moment estimation optimizer and setting an adjustable initial learning rate, and carrying out dynamic exponential decay on the learning rate according to the performance of the verification set in the training process; model parameter optimization is completed through preset training iteration times, and d