CN113673110A - Crystal oscillator clock correction method, device, equipment and medium - Google Patents

Crystal oscillator clock correction method, device, equipment and medium Download PDF

Info

Publication number
CN113673110A
CN113673110A CN202110989141.0A CN202110989141A CN113673110A CN 113673110 A CN113673110 A CN 113673110A CN 202110989141 A CN202110989141 A CN 202110989141A CN 113673110 A CN113673110 A CN 113673110A
Authority
CN
China
Prior art keywords
error
clock
crystal oscillator
oscillator clock
satellite
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
CN202110989141.0A
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.)
CSG Electric Power Research Institute
Huizhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
CSG Electric Power Research Institute
Huizhou Power Supply Bureau of Guangdong Power Grid Co Ltd
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 CSG Electric Power Research Institute, Huizhou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical CSG Electric Power Research Institute
Priority to CN202110989141.0A priority Critical patent/CN113673110A/en
Publication of CN113673110A publication Critical patent/CN113673110A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/02Reliability analysis or reliability optimisation; Failure analysis, e.g. worst case scenario performance, failure mode and effects analysis [FMEA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Human Resources & Organizations (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

The application discloses a crystal oscillator clock correction method, a crystal oscillator clock correction device, crystal oscillator clock correction equipment and a crystal oscillator clock correction medium, wherein the crystal oscillator clock correction method comprises the following steps: acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, wherein error data in the error sequence comprises random errors of the satellite clock and accumulated errors of the crystal oscillator clock; filtering the error sequence to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment; inputting the filtered error sequence at the current moment into a preset error prediction model to perform crystal oscillator clock error prediction to obtain an error prediction value of a crystal oscillator clock at the next moment; and correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment, so that the technical problem of low correction accuracy in the prior art for correcting the crystal oscillator frequency through a GPS is solved.

Description

Crystal oscillator clock correction method, device, equipment and medium
Technical Field
The present application relates to the field of clock correction technologies, and in particular, to a method, an apparatus, a device, and a medium for correcting a crystal oscillator clock.
Background
The current electric power system time service source mainly has GPS clock, big dipper clock and crystal oscillator clock, and single clock source time service can appear time service precision not enough, time service poor stability, security not enough scheduling problem, consequently, need combine the advantage of each clock source, mends time service short slab together, finally realizes the time service that the precision is higher, the completeness is stronger, stability is better.
If a GPS or Beidou satellite navigation system is directly adopted as a clock source of the time synchronization network, a high-precision clock needs to be designed because the reliability of satellite signals is poor and the stability of timing is not enough. In general, the second pulse of the satellite clock generates only a single random error, and the error is normally distributed. Statistically, there is no cumulative error. On the contrary, the second clock of the crystal oscillator is very stable in a short time and almost has no single random error, but a large accumulated error is generated due to long-term operation caused by temperature, aging and the like. The characteristic that the satellite clock has no accumulated error and the crystal oscillator clock has no random error can be called as the error complementation characteristic of the satellite clock and the crystal oscillator clock. The traditional method for correcting the crystal oscillator clock has the problem of low correction accuracy in the process of correcting the crystal oscillator frequency through the GPS.
Disclosure of Invention
The application provides a crystal oscillator clock correction method, a crystal oscillator clock correction device, crystal oscillator clock correction equipment and a crystal oscillator clock correction medium, which are used for solving the technical problem that in the prior art, the correction accuracy of the crystal oscillator clock correction through a GPS is not high.
In view of the above, a first aspect of the present application provides a crystal clock correction method, including:
acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, wherein error data in the error sequence comprises random errors of the satellite clock and accumulated errors of the crystal oscillator clock;
filtering the error sequence to filter out random errors of the satellite clock in the error sequence to obtain a filtered error sequence at the current moment;
inputting the filtered error sequence at the current moment into a preset error prediction model to perform crystal oscillator clock error prediction to obtain an error prediction value of a crystal oscillator clock at the next moment;
and correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
Optionally, the obtaining an error sequence of the crystal oscillator clock and the satellite clock at the current time includes:
obtaining a plurality of error values of the crystal oscillator clock closest to the current moment, and calculating the accumulated error of the crystal oscillator clock according to the error values of the crystal oscillator clock;
measuring the phase difference of a plurality of satellite clocks before and after correction which are closest to the current moment through a high-frequency oscillation counting signal, and calculating the error between the crystal oscillator clock closest to the current moment and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase difference;
and combining a plurality of errors of the crystal oscillator clock and the satellite clock which are closest to the current moment to generate an error sequence of the crystal oscillator clock and the satellite clock at the current moment.
Optionally, the filtering the error sequence to filter the random error of the satellite clock in the error sequence to obtain a filtered error sequence at the current time includes:
and filtering the error sequence by adopting wavelet transformation to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment.
Optionally, the wavelet function used in the wavelet transform is a db6 function of order 9.
Optionally, the training process of the preset error prediction model is as follows:
obtaining a training sample according to a historical error sequence of a crystal oscillator clock and a satellite clock, wherein a label of the training sample is an actual frequency error of the training sample at the next moment of the historical error training;
training a radial basis function neural network through the training sample to obtain a frequency error predicted value of the training sample at the next moment;
calculating a loss value according to the frequency error predicted value and the actual frequency error of the training sample at the next moment;
and updating the network parameters of the radial basis function neural network through the loss value until the radial basis function neural network converges, and taking the trained radial basis function neural network as a preset error prediction model.
The second aspect of the present application provides a crystal clock correction apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, and error data in the error sequence comprises a random error of the satellite clock and an accumulated error of the crystal oscillator clock;
the filtering unit is used for filtering the error sequence to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment;
the prediction unit is used for inputting the filtered error sequence at the current moment into a preset error prediction model to carry out crystal oscillator clock error prediction so as to obtain an error prediction value of a crystal oscillator clock at the next moment;
and the correcting unit is used for correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
Optionally, the obtaining unit is specifically configured to:
obtaining a plurality of error values of the crystal oscillator clock closest to the current moment, and calculating the accumulated error of the crystal oscillator clock according to the error values of the crystal oscillator clock;
measuring the phase difference of a plurality of satellite clocks before and after correction which are closest to the current moment through a high-frequency oscillation counting signal, and calculating the error between the crystal oscillator clock closest to the current moment and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase difference;
and combining a plurality of errors of the crystal oscillator clock and the satellite clock which are closest to the current moment to generate an error sequence of the crystal oscillator clock and the satellite clock at the current moment.
Optionally, the filtering unit is specifically configured to:
and filtering the error sequence by adopting wavelet transformation to filter out random errors of the satellite clock in the error sequence to obtain a filtered error sequence.
A third aspect of the present application provides a crystal clock correction apparatus, the apparatus comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the crystal clock correction method according to any one of the first aspect according to instructions in the program code.
A fourth aspect of the present application provides a computer-readable storage medium for storing program code, which when executed by a processor implements the crystal clock correction method of any one of the first aspects.
According to the technical scheme, the method has the following advantages:
the application provides a crystal oscillator clock correction method, which comprises the following steps: acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, wherein error data in the error sequence comprises random errors of the satellite clock and accumulated errors of the crystal oscillator clock; filtering the error sequence to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment; inputting the filtered error sequence at the current moment into a preset error prediction model to perform crystal oscillator clock error prediction to obtain an error prediction value of a crystal oscillator clock at the next moment; and correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
In the method, the random error of the satellite clock is considered, after the error sequence is obtained, filtering processing is carried out on the random error of the satellite clock in the error sequence to filter the random error of the satellite clock in the error sequence, the method is beneficial to improving the accuracy of prediction of a follow-up model on the error of the crystal oscillator clock, after the error sequence after filtering at the current moment is obtained, the error prediction value of the crystal oscillator clock at the next moment is predicted by processing the error sequence after filtering at the current moment through the preset error prediction model, and then the crystal oscillator clock at the next moment is corrected through the error prediction value of the crystal oscillator clock at the next moment, so that the technical problem that the accuracy of correction of the crystal oscillator clock through a GPS in the prior art is not high is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a crystal clock correction method according to an embodiment of the present disclosure;
FIG. 2 is a multi-source time service system according to an embodiment of the present disclosure;
FIG. 3 is a graph of satellite clock error provided in an embodiment of the present application;
fig. 4 is a clock error curve of a crystal oscillator according to an embodiment of the present disclosure;
fig. 5 is an error curve of a combined satellite clock and crystal clock according to an embodiment of the present disclosure;
fig. 6 is a graph of the effect of a 9-step db6 wavelet filter provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a crystal clock correction apparatus according to an embodiment of the present disclosure.
Detailed Description
The application provides a crystal oscillator clock correction method, a crystal oscillator clock correction device, crystal oscillator clock correction equipment and a crystal oscillator clock correction medium, which are used for solving the technical problem that in the prior art, the correction accuracy is not high when a GPS (global positioning system) is used for correcting the crystal oscillator clock.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
For easy understanding, referring to fig. 1, an embodiment of a crystal clock correction method provided in the present application includes:
step 101, obtaining an error sequence of a crystal oscillator clock and a satellite clock at the current moment, wherein error data in the error sequence comprises a random error of the satellite clock and an accumulated error of the crystal oscillator clock.
In the embodiment of the application, the time service system is built based on the Beidou and GPS satellite time service modules, multiple time service sources form mutual backup, the reliable and accurate time service can still be realized when a single time service source fails, the chaos of the time service system is avoided, and reference can be specifically made to figure 2. And phase comparison is carried out on the crystal oscillator clock and the second clock of the satellite clock to obtain corresponding second pulse time interval data, a sequence generated by a plurality of second pulse time interval data is an error sequence of the crystal oscillator clock and the satellite clock, and error data in the error sequence comprises random errors of the satellite clock and accumulated errors of the crystal oscillator clock. The specific acquisition process of the error sequence is as follows:
s1011, obtaining a plurality of error values of the crystal oscillator clock which are nearest to the current moment, and calculating the accumulated error of the crystal oscillator clock according to the error values of the crystal oscillator clock.
After the constant temperature crystal oscillator is processed, a high-frequency counting signal is generated, and the frequency is set to be f0. The counting is more accurate when the frequency is high, and the frequency of 100MHz can be adopted. The signal is counted by a counter, then the signal is compared with a comparison value S by a comparator, when the count value is equal to the comparison value, the corrected second pulse S signal is output, and meanwhile, the counter is cleared. Comparison value S set by CPUnIs (wherein the first comparison value is set to f0):
Sn=f0+cn
In the formula, cnIs the error value of the crystal oscillator clock at the current moment.
Obtaining error values of n crystal oscillator clocks which are stored in the CPU and are nearest to the current moment, and obtaining the error value sequence of the crystal oscillator clocks as c1,c2,c3,...,cx,...,cn
Using the calibrated second clock as a standard, and the cumulative error mu' (x) of the crystal oscillator clock at the x second of the historical time is as follows:
Figure BDA0003231691070000061
s1012, measuring phase differences of a plurality of corrected satellite clocks which are closest to the current time through the high-frequency oscillation counting signals, and calculating the error between the crystal oscillator clock which is closest to the current time and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase differences.
Measuring phase differences phi of a plurality of corrected satellite clocks before and after the satellite clocks are closest to the current moment by adopting a high-frequency oscillation counting signal, reflecting random errors of second pulses of the satellite clocks, reading n random errors closest to the current moment by adopting a CPU (Central processing Unit), and obtaining a random error sequence phi1,φ23,...,φx,...,φn
Calculating the error between the crystal oscillator clock nearest to the current time and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase difference of the satellite clock before and after correction, wherein the error y of the x secondxComprises the following steps:
Figure BDA0003231691070000062
and S1013, combining a plurality of errors of the crystal oscillator clock closest to the current moment and the satellite clock to generate an error sequence of the crystal oscillator clock and the satellite clock at the current moment.
Combining the errors of the n crystal oscillator clocks nearest to the current moment and the satellite clock to obtain an error sequence y1,y2,y3,...,yx,...,yn
And 102, filtering the error sequence to filter out random errors of the satellite clock in the error sequence, so as to obtain a filtered error sequence at the current moment.
Wavelet transform can be adopted to filter the error sequence so as to filter out random errors of the satellite clock in the error sequence, and therefore an approximate curve of the crystal oscillator frequency error characteristic is extracted. dbN functions in wavelet packets can be called in MATLAB software for filtering, the adopted wavelet functions can be used as a main mode for judging the wavelet filtering effect according to minimum Mean Square Error (MSE), and the expression of the MSE is as follows:
Figure BDA0003231691070000063
in the formula, yiFor the ith error value in the actual filtered error sequence,
Figure BDA0003231691070000064
is the ith error value in the filtered error sequence under the ideal state.
When determining the filtering function, selecting an error sequence before filtering and an actual crystal oscillator error sequence without random errors, namely an error sequence after filtering in an ideal state; filtering the error sequence by adopting a plurality of wavelet functions to obtain a plurality of filtered error sequences; calculating the mean square error value of the filtered error sequence corresponding to each error sequence and the filtered error sequence in an ideal state; and selecting the filter function corresponding to the minimum mean square error value as the optimal filter function for carrying out filter processing on the error sequence. The filtering effect of the wavelet function obtained by screening in the embodiment of the application is the best in 9-order db6 function.
The time service system adopted in the embodiment of the application is a multi-source time service system built in a Beidou/GPS satellite time service module, and the Beidou satellite time service system is added on the basis of the traditional GPS satellite time service system, so that the reliable and accurate timing can be still carried out by depending on the Beidou satellite time service system when the GPS system is closed or abnormally operated; and when the error is predicted, a traditional method for correcting the frequency of the crystal oscillator by the satellite clock is abandoned, filtering is firstly carried out, then prediction is carried out, and then the crystal oscillator clock is corrected according to the error predicted value, so that the correction accuracy is improved.
And 103, inputting the filtered error sequence of the current moment into a preset error prediction model to predict the error of the crystal oscillator clock, so as to obtain the error prediction value of the crystal oscillator clock of the next moment.
In the embodiment of the application, the training process of the preset error prediction model is as follows:
acquiring a training sample according to a historical error sequence of a crystal oscillator clock and a satellite clock, wherein the label of the training sample is the actual frequency error of the next moment of the historical error training in the training sample;
training a radial basis function neural network through a training sample to obtain a frequency error predicted value of the training sample at the next moment;
calculating a loss value according to the frequency error predicted value and the actual frequency error of the training sample at the next moment;
and updating network parameters of the radial basis function neural network through the loss value until the radial basis function neural network converges, and taking the trained radial basis function neural network as a preset error prediction model.
In the embodiment of the application, whether the radial basis function neural network is converged or not is judged, whether the radial basis function neural network is converged or not can be determined according to whether the training iteration number reaches the preset maximum iteration number or not, whether the radial basis function neural network is converged or not can be determined according to whether the training error of the radial basis function neural network is smaller than the preset error threshold or not, and whether the radial basis function neural network is converged or not can be determined according to whether the training accuracy of the radial basis function neural network reaches the preset accuracy threshold or not. The convergence condition can be selected by those skilled in the art according to practical situations, and is not particularly limited herein.
And after the preset error prediction model is obtained, inputting the filtered error sequence of the current moment into the preset error prediction model to carry out crystal oscillator clock error prediction, so as to obtain the error prediction value of the crystal oscillator clock of the next moment.
And step 104, correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
After the error prediction value of the crystal oscillator clock at the next moment is obtained, the crystal oscillator clock at the next moment can be corrected on line, and the corrected crystal oscillator clock at the next moment is obtained.
In the embodiment of the application, the random error of the satellite clock is considered, after the error sequence is obtained, the filtering processing is performed on the random error of the satellite clock in the error sequence to filter the random error of the satellite clock in the error sequence, so that the accuracy of prediction of the error of the crystal oscillator clock by a subsequent model is improved, after the error sequence after filtering at the current moment is obtained, the error prediction value of the crystal oscillator clock at the next moment is predicted by processing the error sequence after filtering at the current moment through a preset error prediction model, and then the crystal oscillator clock at the next moment is corrected through the error prediction value of the crystal oscillator clock at the next moment, so that the technical problem that the accuracy of correction of the crystal oscillator clock through a GPS in the prior art is not high is solved.
The above is an embodiment of a crystal clock correction method provided by the present application, and a specific application example of the crystal clock correction method provided by the present application is as follows.
And constructing a satellite clock error curve and a crystal oscillator clock error curve in the MATLAB, and combining the satellite clock error curve and the crystal oscillator clock error curve to obtain an error curve of the crystal oscillator clock and the satellite clock. The generated curve adopts 2000 groups of data, the satellite clock error curve follows the normal distribution rule of N (0, 100), and reference may be made to fig. 3, and the crystal oscillator clock error curve adopts the curve y ═ xaAnd a is 0.5, refer to fig. 4. The two are combined to generate an error curve of the crystal clock and the satellite clock, please refer to fig. 5.
And calling a 9-order db6 function in the wavelet packet in the MATLAB to filter the error curve of the oscillator clock and the satellite clock so as to remove the satellite clock error in the error curve, thereby obtaining a filtered error curve, and referring to fig. 6 for a filtering effect graph of the 9-order db6 function.
And taking the filtered error curve as a training sample of the radial basis function neural network to train the radial basis function neural network, predicting the frequency error of the crystal oscillator at the next moment through the trained radial basis function neural network, and correcting the crystal oscillator clock at the next moment through the predicted frequency error prediction value of the crystal oscillator at the next moment to obtain the corrected crystal oscillator clock at the next moment.
The present invention provides a crystal clock correction method, and a crystal clock correction device using the crystal clock correction method.
Referring to fig. 7, an embodiment of a crystal clock correction apparatus includes:
the acquisition unit is used for acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, wherein error data in the error sequence comprises a random error of the satellite clock and an accumulated error of the crystal oscillator clock;
the filtering unit is used for filtering the error sequence to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment;
the prediction unit is used for inputting the filtered error sequence of the current moment into a preset error prediction model to carry out crystal oscillator clock error prediction so as to obtain an error prediction value of the crystal oscillator clock of the next moment;
and the correcting unit is used for correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
As a further improvement, the obtaining unit is specifically configured to:
obtaining a plurality of error values of the crystal oscillator clock closest to the current moment, and calculating the accumulated error of the crystal oscillator clock according to the error values of the crystal oscillator clock;
measuring the phase difference of a plurality of satellite clocks before and after correction which are closest to the current moment through the high-frequency oscillation counting signal, and calculating the error between the crystal oscillator clock closest to the current moment and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase difference;
and combining a plurality of errors of the crystal oscillator clock and the satellite clock which are closest to the current moment to generate an error sequence of the crystal oscillator clock and the satellite clock at the current moment.
As a further improvement, the filtering unit is specifically configured to:
and filtering the error sequence by adopting wavelet transformation to filter out random errors of the satellite clock in the error sequence to obtain a filtered error sequence.
In the embodiment of the application, the random error of the satellite clock is considered, after the error sequence is obtained, the filtering processing is performed on the random error of the satellite clock in the error sequence to filter the random error of the satellite clock in the error sequence, so that the accuracy of prediction of the error of the crystal oscillator clock by a subsequent model is improved, after the error sequence after filtering at the current moment is obtained, the error prediction value of the crystal oscillator clock at the next moment is predicted by processing the error sequence after filtering at the current moment through a preset error prediction model, and then the crystal oscillator clock at the next moment is corrected through the error prediction value of the crystal oscillator clock at the next moment, so that the technical problem that the accuracy of correction of the crystal oscillator clock through a GPS in the prior art is not high is solved.
The embodiment of the application also provides crystal oscillator clock correction equipment, which comprises a processor and a memory;
the memory is used for storing the program codes and transmitting the program codes to the processor;
the processor is configured to execute the crystal clock correction method of any one of the preceding method embodiments according to instructions in the program code.
The embodiment of the present application further provides a computer-readable storage medium, which is used for storing program codes, and when the program codes are executed by a processor, the crystal oscillator clock correction method in the foregoing method embodiment is implemented.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for executing all or part of the steps of the method described in the embodiments of the present application through a computer device (which may be a personal computer, a server, or a network device). And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A crystal clock correction method, comprising:
acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, wherein error data in the error sequence comprises random errors of the satellite clock and accumulated errors of the crystal oscillator clock;
filtering the error sequence to filter out random errors of the satellite clock in the error sequence to obtain a filtered error sequence at the current moment;
inputting the filtered error sequence at the current moment into a preset error prediction model to perform crystal oscillator clock error prediction to obtain an error prediction value of a crystal oscillator clock at the next moment;
and correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
2. The crystal clock correction method according to claim 1, wherein the obtaining of the error sequence between the crystal clock and the satellite clock at the current time comprises:
obtaining a plurality of error values of the crystal oscillator clock closest to the current moment, and calculating the accumulated error of the crystal oscillator clock according to the error values of the crystal oscillator clock;
measuring the phase difference of a plurality of satellite clocks before and after correction which are closest to the current moment through a high-frequency oscillation counting signal, and calculating the error between the crystal oscillator clock closest to the current moment and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase difference;
and combining a plurality of errors of the crystal oscillator clock and the satellite clock which are closest to the current moment to generate an error sequence of the crystal oscillator clock and the satellite clock at the current moment.
3. The crystal clock correction method according to claim 1, wherein the filtering the error sequence to filter out random errors of the satellite clock in the error sequence to obtain a filtered error sequence at the current time includes:
and filtering the error sequence by adopting wavelet transformation to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment.
4. The crystal clock correction method of claim 3, wherein the wavelet function adopted by the wavelet transform is a db6 function of order 9.
5. The crystal oscillator clock correction method according to claim 1, wherein the preset error prediction model is trained by:
obtaining a training sample according to a historical error sequence of a crystal oscillator clock and a satellite clock, wherein a label of the training sample is an actual frequency error of the training sample at the next moment of the historical error training;
training a radial basis function neural network through the training sample to obtain a frequency error predicted value of the training sample at the next moment;
calculating a loss value according to the frequency error predicted value and the actual frequency error of the training sample at the next moment;
and updating the network parameters of the radial basis function neural network through the loss value until the radial basis function neural network converges, and taking the trained radial basis function neural network as a preset error prediction model.
6. A crystal clock correction apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an error sequence of a crystal oscillator clock and a satellite clock at the current moment, and error data in the error sequence comprises a random error of the satellite clock and an accumulated error of the crystal oscillator clock;
the filtering unit is used for filtering the error sequence to filter out random errors of the satellite clock in the error sequence and obtain a filtered error sequence at the current moment;
the prediction unit is used for inputting the filtered error sequence at the current moment into a preset error prediction model to carry out crystal oscillator clock error prediction so as to obtain an error prediction value of a crystal oscillator clock at the next moment;
and the correcting unit is used for correcting the crystal oscillator clock at the next moment according to the error prediction value of the crystal oscillator clock at the next moment to obtain the corrected crystal oscillator clock at the next moment.
7. The crystal clock correction apparatus according to claim 6, wherein the obtaining unit is specifically configured to:
obtaining a plurality of error values of the crystal oscillator clock closest to the current moment, and calculating the accumulated error of the crystal oscillator clock according to the error values of the crystal oscillator clock;
measuring the phase difference of a plurality of satellite clocks before and after correction which are closest to the current moment through a high-frequency oscillation counting signal, and calculating the error between the crystal oscillator clock closest to the current moment and the satellite clock according to the accumulated error of the crystal oscillator clock and the phase difference;
and combining a plurality of errors of the crystal oscillator clock and the satellite clock which are closest to the current moment to generate an error sequence of the crystal oscillator clock and the satellite clock at the current moment.
8. The crystal clock correction apparatus according to claim 6, wherein the filtering unit is specifically configured to:
and filtering the error sequence by adopting wavelet transformation to filter out random errors of the satellite clock in the error sequence to obtain a filtered error sequence.
9. A crystal clock correction apparatus, comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the crystal clock modification method according to any one of claims 1 to 5 according to instructions in the program code.
10. A computer-readable storage medium for storing program code, the program code implementing the crystal clock correction method according to any one of claims 1 to 5 when executed by a processor.
CN202110989141.0A 2021-08-26 2021-08-26 Crystal oscillator clock correction method, device, equipment and medium Pending CN113673110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110989141.0A CN113673110A (en) 2021-08-26 2021-08-26 Crystal oscillator clock correction method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110989141.0A CN113673110A (en) 2021-08-26 2021-08-26 Crystal oscillator clock correction method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113673110A true CN113673110A (en) 2021-11-19

Family

ID=78546800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110989141.0A Pending CN113673110A (en) 2021-08-26 2021-08-26 Crystal oscillator clock correction method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113673110A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134905A (en) * 2022-06-27 2022-09-30 国网青海省电力公司信息通信公司 Frequency calibration method and device, nonvolatile storage medium and computer equipment
CN116980065A (en) * 2023-08-17 2023-10-31 辽宁天衡智通防务科技有限公司 Clock calibration method, clock calibration device, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299496A (en) * 2018-07-26 2019-02-01 国网湖南省电力有限公司 A kind of high-precise synchronization clock generation method
CN109557371A (en) * 2018-12-19 2019-04-02 清华大学 A kind of punctual method of the sync identification for power distribution network phasor measurement
CN112713881A (en) * 2020-12-10 2021-04-27 国网四川省电力公司电力科学研究院 Synchronous clock maintaining system and method based on edge calculation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299496A (en) * 2018-07-26 2019-02-01 国网湖南省电力有限公司 A kind of high-precise synchronization clock generation method
CN109557371A (en) * 2018-12-19 2019-04-02 清华大学 A kind of punctual method of the sync identification for power distribution network phasor measurement
CN112713881A (en) * 2020-12-10 2021-04-27 国网四川省电力公司电力科学研究院 Synchronous clock maintaining system and method based on edge calculation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曾祥君等: "GPS 时钟在线监测与修正方法", 《中国电机工程学报》, vol. 22, no. 12, pages 41 - 46 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134905A (en) * 2022-06-27 2022-09-30 国网青海省电力公司信息通信公司 Frequency calibration method and device, nonvolatile storage medium and computer equipment
CN115134905B (en) * 2022-06-27 2023-12-01 国网青海省电力公司信息通信公司 Frequency calibration method and device, nonvolatile storage medium and computer equipment
CN116980065A (en) * 2023-08-17 2023-10-31 辽宁天衡智通防务科技有限公司 Clock calibration method, clock calibration device, terminal equipment and storage medium
CN116980065B (en) * 2023-08-17 2024-03-19 辽宁天衡智通防务科技有限公司 Clock calibration method, clock calibration device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106685750B (en) System anomaly detection method and device
CN113673110A (en) Crystal oscillator clock correction method, device, equipment and medium
US7936260B2 (en) Identifying redundant alarms by determining coefficients of correlation between alarm categories
CN109085616B (en) Satellite time service method, device and storage medium
US7583771B2 (en) Systems and methods for resampling unreliable data
US8954294B2 (en) Measuring device and measuring method for continuous physical quantity
CN108696368B (en) Network element health state detection method and equipment
CN1909375A (en) Real-time clock device and current time compensating method
CN109472231B (en) Transformer substation harmonic source positioning method and device and computer readable storage medium
GB2466557A (en) Measuring deviation of a clock frequency
US8294501B1 (en) Multiphase clock generation and calibration
CN102162855B (en) Positioning device and positioning method
CN105026938B (en) Signal processing apparatus
US6958951B2 (en) Adaptive Kalman Filter process for controlling an ensemble clock
CN113588132A (en) Temperature processing method and device
CN112765073A (en) Data sampling method, system, storage medium and computer equipment
CN112422369A (en) Method and device for determining offline time, storage medium and electronic device
CN110245844B (en) Abnormal index detection method and device
CN116980065B (en) Clock calibration method, clock calibration device, terminal equipment and storage medium
CN111141308B (en) Step pitch correction method and device and wearable device
CN108984101B (en) Method and device for determining relationship between events in distributed storage system
JP6244681B2 (en) Compensation method for accumulated time series data loss
CN112445835A (en) Business data processing method and device, network management server and storage medium
CN111897202A (en) RTC (real time clock) calibration circuit and method of smoke detector MCU (microprogrammed control Unit)
CN115442244B (en) Method and device for calibrating communication interval in power real-time simulation and related equipment

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