CN113992296A - Clock disciplining method, time code monitoring device and time synchronization system - Google Patents

Clock disciplining method, time code monitoring device and time synchronization system Download PDF

Info

Publication number
CN113992296A
CN113992296A CN202111337307.7A CN202111337307A CN113992296A CN 113992296 A CN113992296 A CN 113992296A CN 202111337307 A CN202111337307 A CN 202111337307A CN 113992296 A CN113992296 A CN 113992296A
Authority
CN
China
Prior art keywords
clock
clock difference
frequency reference
frequency
local
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
CN202111337307.7A
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.)
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
China Electric Power Research Institute Co Ltd CEPRI
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 China Electric Power Research Institute Co Ltd CEPRI filed Critical China Electric Power Research Institute Co Ltd CEPRI
Priority to CN202111337307.7A priority Critical patent/CN113992296A/en
Publication of CN113992296A publication Critical patent/CN113992296A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • 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
    • G04R20/04Tuning or receiving; Circuits therefor
    • 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
    • G04R20/06Decoding time data; Circuits therefor
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R40/00Correcting the clock frequency
    • G04R40/04Correcting the clock frequency by detecting the radio signal frequency

Abstract

A clock disciplining method, a time code monitoring device and a time synchronization system are provided, the clock disciplining method comprises the following steps: acquiring a third clock difference sequence of each sampling moment in a preset time period; removing abnormal values and filtering the third clock difference sequence of each sampling time in a preset time period to obtain clock difference adjustment information; obtaining a frequency deviation amount between a local frequency reference source and a frequency reference center based on the clock difference adjustment information; obtaining a frequency adjustment quantity of a local frequency reference source according to the frequency deviation quantity; and sending the frequency adjustment amount to the local frequency reference source for controlling the local frequency reference source to realize the adjustment of the local reference signal. The clock disciplining method provided by the embodiment of the invention can weaken the influence of a satellite system and environmental multipath, realize the clock discipline of low-jitter and long-interval data, and improve the stability and the accuracy.

Description

Clock disciplining method, time code monitoring device and time synchronization system
Technical Field
The invention relates to the technical field of time service, in particular to a clock taming method, a time code monitoring device and a time synchronization system.
Background
With the popularization of power grid informatization, each service node of a power grid and a service system with a demand on time put higher demands on a clock system, and clock errors of each node in the distributed network need to keep certain accuracy and synchronization. At present, the electric power is with adopting the system and generally adopting big dipper or GPS to tame the clock and provide standard frequency, has following problem:
1. the conventional Beidou or GPS tame clock generally adopts 1 second interval of Beidou or GPS data, the interval time is too short, and the stability is low;
2. the existing Beidou or GPS tame clock has the defects that a model constructed due to the influence on atmospheric transmission, satellite orbits and the like is not complete enough, the data jitter is large, and the accuracy is low.
Disclosure of Invention
In view of this, the invention provides a clock disciplining method, a time code monitoring device and a time synchronization system, aiming to solve the problems of short interval and large jitter of the existing clock disciplining data.
In a first aspect, an embodiment of the present invention provides a clock disciplining method, including: acquiring a third clock difference sequence of each sampling moment in a preset time period, wherein the third clock difference sequence is a time deviation sequence obtained by comparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method; removing abnormal values and filtering the third clock difference sequence of each sampling time in the preset time period to obtain clock difference adjustment information; obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information; obtaining a frequency adjustment quantity of the local frequency reference source according to the frequency deviation quantity; and sending the frequency adjustment amount to the local frequency reference source to control the local frequency reference source to realize adjustment of a local reference signal.
Further, the removing abnormal values and filtering the third clock difference sequence of each sampling time within the preset time period to obtain the clock difference adjustment information includes: removing abnormal values of the third clock difference sequence of each sampling time in the preset time period by adopting an abnormal value removing algorithm; calculating a weighted average value of the third clock difference sequence after the abnormal value of each sampling time in the preset time period is removed, and obtaining a clock difference result of each sampling time in the preset time period; and performing Kalman filtering on the clock error result of each sampling time in the preset time period, and calculating the average value of the clock error results of each sampling time in the preset time period after Kalman filtering to obtain clock error adjustment information.
Further, the removing the abnormal value of the third clock difference sequence at each sampling time within the preset time period by using an abnormal value removing algorithm includes: and performing the following elimination operation on the third clock difference sequence of each sampling moment in the preset time period: selecting a third clock difference sequence (delta T) of the same sampling time1,…ΔTi,…ΔTnWherein i =1,2, …, n, n is the number of common view satellites, n is more than or equal to 4, and the third clock difference is delta TiComparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method to obtain a time deviation relative to the ith common-view satellite; sequentially taking j as an integer from 1 to n, eliminating the jth common-view satellite, and calculating the average value and the standard deviation of the third clock difference sequence of the rest n-1 common-view satellites to obtain n average values AVGiAnd n first standard deviations STDiJ is more than or equal to 1 and less than or equal to n; respectively calculate nThe first standard deviation STDiTo obtain n second standard deviations STD (STD)i) (ii) a Judging each of the second standard deviation STD (STD) separatelyi) Whether it is greater than a first preset threshold, if there is a second standard deviation STD (STD) greater than the first preset thresholdi) Then, the second standard deviation STD (STD) with the largest value is selectedi) Forming a third clock difference sequence { delta T after the abnormal value is removed for the abnormal value and the common view satellite corresponding to the abnormal value is removed1,…ΔTp,…ΔTn-1},p=1,2,…,n-1。
Further, the obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information includes: obtaining clock difference fitting information based on the clock difference adjusting information; and obtaining the frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference fitting information.
Further, obtaining clock error fitting information based on the clock error adjustment information includes: and obtaining clock error fitting information by adopting a historical data fitting algorithm based on the clock error adjusting information.
Further, obtaining the clock error fitting information by using a historical data fitting algorithm based on the clock error adjustment information includes: clock error fitting informationΔT Km The formula is as follows:
Figure 147603DEST_PATH_IMAGE001
wherein m is the total amount of observed values;ΔT Ki variables that affect clock synchronization include: clock difference adjustment information, phase adjustment quantity of a local frequency reference source, clock drift clock difference adjustment information and temperature change clock difference adjustment information, wherein the phase adjustment quantity of the local frequency reference source is obtained by the average value of a third clock difference sequence of the current sampling momentΔT Kt Obtaining the clock drift clock difference adjustment information and the temperature change clock difference adjustment information through historical data fitting,wherein the historical data includes design metrics and actual verification results.
Further, the phase adjustment amount of the local frequency reference source is obtained by averaging the third clock difference sequence of the current sampling timeΔT Kt Obtaining, comprising: judging the average value of the third clock difference sequence of the current sampling momentΔT Kt Whether the current sampling time is larger than a second preset threshold value or not, if so, calculating the average value of a third clock difference sequence of the current sampling time by adopting an integer functionΔT Kt Obtaining a phase adjustment quantity of a local frequency reference source; otherwise, the phase adjustment amount of the local frequency reference source is zero.
Further, the obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference fitting information includes: and calculating to obtain the frequency deviation amount between the local frequency reference source and the frequency reference center by using an incremental PID algorithm based on the clock error fitting information.
Further, the calculating, by using an incremental PID algorithm, a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock error fitting information includes: an amount of frequency deviation between the local frequency reference source and the frequency reference centerΔf(n)The formula is as follows:
Δf(n)=K P ΔT Kt ΔT Km /K I K D [ΔT Kt ΔT K(t-1) ];
wherein the content of the first and second substances,K P K I K D adjusting parameters for PID;ΔT Kt is the average of the third sequence of clock differences at the current sampling instant,Δ T K(t-1) the average value of the third clock difference sequence of the last sampling time adjacent to the current sampling time is obtained;ΔT Km fitting information to the clock error。
Further, the obtaining a frequency adjustment amount of the local frequency reference source according to the frequency deviation amount includes: and calculating the frequency adjustment quantity of the local frequency reference source by adopting a linear function according to the frequency deviation quantity.
Further, the obtaining of the frequency adjustment amount of the local frequency reference source by using a linear function according to the frequency deviation amount includes: calculating the frequency adjustment quantity of the local frequency reference source by adopting the following formulau(n)
u(n)= f(Δf(n))= K A Δf(n)K B
Wherein the content of the first and second substances,K A 、K B is a frequency reference source parameter;Δf(n)is the amount of the frequency deviation.
In a second aspect, an embodiment of the present invention further provides a time code monitoring apparatus, including: the satellite common-view unit is used for receiving a local reference signal sent by the clock taming unit, a satellite signal sent by each common-view satellite and a second clock difference sequence sent by the frequency reference center in real time, calculating to obtain a first clock difference sequence according to the local reference signal and each satellite signal, calculating to obtain a third clock difference sequence according to the first clock difference sequence and the second clock difference sequence, sending the third clock difference sequence to the clock taming unit in real time and sending the first clock difference sequence to the frequency reference center in real time, wherein the second clock difference sequence is a time deviation sequence between the frequency reference center and each common-view satellite; the clock disciplining unit is used for acquiring a third clock difference sequence of each sampling moment in a preset time period, executing the clock disciplining method provided by any one of the above embodiments, receiving a local reference signal sent by a frequency reference source, and respectively sending the local reference signal to the satellite common-view unit, the clock output interface and the time signal measuring unit; the frequency reference source is used for receiving the frequency adjustment quantity sent by the clock taming unit, adjusting the local reference signal according to the frequency adjustment quantity and sending the local reference signal to the clock taming unit; the clock output interface is used for receiving the local reference signal sent by the clock taming unit, converting the local reference signal into a time code signal matched with a local power consumption information acquisition system main station and outputting the converted time code signal; and the time signal measuring unit is used for receiving the local reference signal sent by the clock taming unit and the master station time signal sent by the master station of the local power consumption information acquisition system, converting the master station time signal into a signal consistent with the local reference signal, calculating the time deviation between the local reference signal and the converted master station time signal, and outputting the time deviation.
Further, the apparatus further comprises: and the data transmission unit is used for receiving the first clock difference sequence sent by the satellite common-view unit, encrypting the first clock difference sequence and sending the encrypted first clock difference sequence to the frequency reference center, receiving the second clock difference sequence sent by the frequency reference center, decrypting the second clock difference sequence and sending the decrypted second clock difference sequence to the satellite common-view unit.
Further, the data transmission unit is further configured to: sending a connection request to the frequency reference center, and establishing a TCP connection; acquiring first information and sending the first information to the frequency reference center, wherein the first information comprises: decrypting at least one of a chip serial number, time code monitoring device authentication information and reference center authentication information; acquiring a first random number and first signature information provided by an encryption and decryption chip, and sending the first random number and the first signature information to the frequency reference center, wherein the first random number and the first signature information are obtained by updating an application session negotiation calculator of the encryption and decryption chip; acquiring a second random number and second signature information returned by the frequency reference center, and writing the second random number and the second signature information into the encryption and decryption chip; receiving a first clock difference sequence transmitted by the satellite common view unit or a second clock difference sequence transmitted by the frequency reference center; sending the first clock difference sequence or the second clock difference sequence to an encryption and decryption chip written with the second random number and the second signature information for encryption or decryption to obtain an encrypted first clock difference sequence or a decrypted second clock difference sequence; and sending the encrypted first clock difference sequence or the decrypted second clock difference sequence to the frequency reference center or the satellite common view unit.
Further, the third clock difference calculated according to the first clock difference sequence and the second clock difference sequence includes: calculating a third clock error relative to each common-view satellite to obtain a third clock error sequence (delta T)1, ΔT2,…,ΔTnN is the number of the common view satellites, and n is more than or equal to 4; wherein the third clock difference Δ T relative to the ith co-view satelliteiThe formula is as follows: delta Ti=TUi−TRi(ii) a Wherein, TUiFor a first clock offset, TR, relative to the ith common view satelliteiIs the second clock offset relative to the ith common-view satellite.
Further, the frequency reference source is a rubidium clock or a crystal oscillator.
Further, the encryption and decryption chip is an ESAM chip.
In a third aspect, an embodiment of the present invention further provides a time synchronization system, including: a common view satellite for transmitting satellite signals to a frequency reference center and a frequency application center; the frequency reference center is used for receiving a satellite signal sent by the common-view satellite and a first clock difference sequence sent by the frequency application center, calculating to obtain a second clock difference sequence according to the satellite signal and a reference signal of the frequency reference center, and sending the second clock difference sequence to the frequency application center; the frequency application center comprises a time code monitoring device provided by any one of the above embodiments, and is used for carrying out data interaction with the common-view satellite, the frequency reference center and the electricity consumption information acquisition system main station; the power consumption information acquisition system main station is used for sending a main station time signal to the frequency application center, receiving a time code signal sent by the frequency application center, and calibrating the main station time signal based on the time code signal.
Further, the system further comprises: the collection terminal is used for receiving a master station time signal sent by the master station of the electricity consumption information collection system, calibrating the collection terminal time signal based on the master station time signal and sending the collection terminal time signal to the electric energy meter; and the electric energy meter is used for receiving the acquisition terminal time signal sent by the acquisition terminal and calibrating the time of the electric energy meter based on the acquisition terminal time signal.
In a fourth aspect, an embodiment of the present invention further provides a clock taming apparatus, including: the third clock difference sequence acquisition unit is used for acquiring a third clock difference sequence of each sampling moment in a preset time period, wherein the third clock difference sequence is a time deviation sequence obtained by comparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method; the abnormal value removing and filtering unit is used for removing and filtering the abnormal value of the third clock difference sequence of each sampling time in the preset time period to obtain clock difference adjusting information; a first unit, configured to obtain a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information; a second unit, configured to obtain a frequency adjustment amount of the local frequency reference source according to the frequency deviation amount; and the frequency adjustment quantity sending unit is used for sending the frequency adjustment quantity to the local frequency reference source so as to control the local frequency reference source to realize the adjustment of the local reference signal.
In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the clock disciplining method provided by the embodiments of the present invention.
According to the clock taming method, the time code monitoring device and the time synchronization system provided by the embodiment of the invention, the third clock difference sequence is obtained by adopting a satellite common-view comparison method, and abnormal value elimination and filtering are carried out on the third clock difference sequence, so that the problems of low stability caused by short data interval of the conventional Beidou or GPS, large data jitter and low accuracy caused by imperfect models constructed by influences on atmospheric layer transmission, satellite orbits and the like are solved, the clock taming by low-jitter and long-interval data can be realized, higher stability can be brought, influences caused by satellite systems and environmental multipath can be effectively weakened, and the accuracy is improved.
According to the time code monitoring device and the time synchronization system provided by some embodiments of the invention, the satellite common view and clock taming are combined, so that the problem of online monitoring and real-time tracing of an electric power system is solved, the problems of timeliness and accuracy of time service and measurement are solved, time misalignment and synchronous deviation can be identified in time, and trade settlement fairness and fault analysis and judgment are ensured; in addition, the multi-place deployment can realize the time unification and synchronization of the whole network.
The time code monitoring device and the time synchronization system provided by some embodiments of the invention ensure the integrity, safety and availability of data transmission by encrypting and decrypting data interaction, and meet the requirement of power grid informatization safety.
Drawings
FIG. 1 illustrates an exemplary flow diagram of a clock disciplining method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a time code monitoring apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a time synchronization system according to an embodiment of the present invention;
FIG. 4 illustrates an exemplary flow diagram of a clock disciplining apparatus according to an embodiment of the present invention.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the embodiments described herein, which are provided for complete and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, the same units/elements are denoted by the same reference numerals.
Unless otherwise defined, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
FIG. 1 illustrates an exemplary flow diagram of a clock disciplining method according to an embodiment of the present invention.
As shown in fig. 1, the method includes:
step S101: and acquiring a third clock difference sequence of each sampling moment in a preset time period, wherein the third clock difference sequence is a time deviation sequence obtained by comparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method.
In the embodiment of the invention, the preset time period can be the current sampling time and a period of time before the current sampling time, the specific time period length can be set according to requirements, and by acquiring data in the preset time period, the problem of inaccuracy caused by data deviation at a certain time is avoided, and the comprehensive accuracy of the data is ensured. It should be appreciated that the longer the preset time period, the higher the final clock taming stability and accuracy. Within the preset time period, the third clock difference at each sampling time may be obtained according to a preset sampling time interval. Specifically, the preset sampling time interval may be according to the common-view data CGGTTS format standard. Preferably, the preset sampling time interval is 16 minutes. The local frequency reference source may be a rubidium clock or a crystal oscillator. The common view satellite can comprise satellite systems such as Beidou, GPS, GLONASS, Galileo and the like.
Third clock difference Δ T with respect to common view satellite iiThe following formula can be adopted to calculate:
ΔTi=TUi−TRi
wherein, TUiFor time deviation, TR, between a local frequency reference source and a common view satellite iiIs the time offset between the center of the frequency reference and the satellite of co-view i. The third clock difference relative to each co-view satellite may constitute a third clock difference sequence, i.e., { Δ T }1, ΔT2,…,ΔTnN is the number of the satellites with common vision, and n is more than or equal to 4。
According to the embodiment, the satellite common-view comparison method is adopted, so that the problems that the interval time of the existing Beidou or GPS tame clock is short and the data jitter is large are solved. On one hand, the sampling time interval of the satellite common-view comparison method is long, and the stability of clock taming is improved; on the other hand, by comparing the local frequency reference source time with the frequency reference center time, errors such as atmospheric transmission, satellite orbit and the like can be effectively eliminated (or weakened), data jitter is small, and the clock taming accuracy is improved.
Step S102: and removing abnormal values and filtering the third clock difference sequence of each sampling time in a preset time period to obtain clock difference adjustment information.
Further, step S102 includes:
and removing the abnormal value of the third clock difference sequence of each sampling time in the preset time period by adopting an abnormal value removing algorithm.
Further, the method for removing the abnormal value of the third clock difference sequence of each sampling time in the preset time period by using an abnormal value removing algorithm comprises the following steps:
and performing the following elimination operation on the third clock difference sequence of each sampling moment in a preset time period:
selecting a third clock difference sequence (delta T) of the same sampling time1,…ΔTi,…ΔTnWherein i =1,2, …, n, n is the number of common view satellites, n is more than or equal to 4, and the third clock difference is delta TiComparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method to obtain a time deviation relative to the ith common-view satellite;
sequentially taking j as an integer from 1 to n, eliminating the jth common-view satellite, and calculating the average value and the standard deviation of the third clock difference sequence of the rest n-1 common-view satellites to obtain n average values AVGiAnd n first standard deviations STDi,1≤j≤n;
Respectively calculating n first standard deviations STDiTo obtain n second standard deviations STD (STD)i);
Judging each second standard deviation STD (STD) separatelyi) Whether or not greater thanA first predetermined threshold value, if there is a second standard deviation STD (STD) greater than the first predetermined threshold valuei) Then, the second standard deviation STD (STD) with the largest value is selectedi) Forming a third clock difference sequence { delta T after the abnormal value is removed for the abnormal value and the common view satellite corresponding to the abnormal value is removed1,…ΔTp,…ΔTn-1},p=1,2,…,n-1。
In the embodiment of the invention, any common-view satellite (jth common-view satellite) is removed from the dimension of the common-view satellite, namely the 1 st common-view satellite, the 2 nd common-view satellite and the … are respectively removed, and after the nth common-view satellite is removed, the residual common-view satellites respectively form n common-view satellite combinations; for each co-view satellite combination, calculating the mean value and standard deviation of the time deviation between the local frequency reference source and the frequency reference center relative to the combination, namely calculating the mean value and standard deviation of the third clock difference sequence relative to the combination, and obtaining n mean values and n first standard deviations; and then calculating the standard deviation of the n first standard deviations to obtain n second standard deviations. Comparing the magnitude of each second standard deviation with a first preset threshold value: if the data is smaller than or equal to the first preset threshold, the data consistency is better, and abnormal values are not required to be removed; if the second standard deviation is larger than the first preset threshold, indicating that the data consistency is poor, performing statistical sorting on all second standard deviations larger than the first preset threshold, selecting a maximum value as the abnormal value of the time, and removing the removed common view satellite in the combination corresponding to the maximum value to form n-1 third clock deviations after the abnormal value is removed. It should be understood that if the second standard deviation greater than the first preset threshold is 2 or more, the above steps need to be executed circularly, and all abnormal values are removed in sequence. In the embodiment of the invention, the satellite common-view data at each sampling time within the preset time period, namely the abnormal value in the third clock difference sequence, needs to be removed.
And calculating the weighted average value of the third clock difference sequence after the abnormal value of each sampling time within the preset time period is removed, so as to obtain the clock difference result of each sampling time within the preset time period.
In the embodiment of the invention, for each sampling time in a preset time period, a third clock difference sequence (delta) after removing abnormal values is calculatedT1,…ΔTp,…ΔTn-1The weighted average of which is taken as the clock difference result. And if no abnormal value is eliminated in the previous step, directly performing weighted average calculation on the third clock difference sequence.
And performing Kalman filtering on the clock error result of each sampling moment in a preset time period, and calculating the average value of the clock error results of each sampling moment in the preset time period after Kalman filtering to obtain clock error adjustment information.
In the embodiment of the invention, from the time dimension, Kalman filtering is performed on the clock error result of each sampling time in the preset time period to obtain the optimal estimation value (clock error result of Kalman filtering) of each sampling time in the preset time period, and the average value of the optimal estimation values of each sampling time is calculated to be used as the current clock error adjustment information.
In the embodiment, on one hand, the satellite clock error data at the same moment is removed by comparing the standard deviation, so that the influence of individual satellite data on the clock error mean value can be reduced; on the other hand, Kalman filtering is adopted for clock error sequence data at different moments, so that the influence caused by a satellite system and environmental multipath is effectively weakened, and low data jitter can be realized.
Step S103: and obtaining the frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information.
Further, step S103 includes:
obtaining clock error fitting information based on the clock error adjusting information;
and obtaining the frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock error fitting information.
Further, obtaining clock error fitting information based on the clock error adjustment information, including:
and obtaining clock error fitting information by adopting a historical data fitting algorithm based on the clock error adjusting information.
Further, based on the clock error adjustment information, obtaining clock error fitting information by using a historical data fitting algorithm, including:
clock errorFitting informationΔT Km The formula is as follows:
Figure 480496DEST_PATH_IMAGE001
wherein m is the total amount of observed values;ΔT Ki variables that affect clock synchronization include: clock difference adjustment information, phase adjustment amount of local frequency reference source, clock drift clock difference adjustment information and temperature change clock difference adjustment information, wherein the phase adjustment amount of the local frequency reference source is obtained by the average value of a third clock difference sequence of the current sampling timeΔT Kt And obtaining clock drift clock difference adjustment information and temperature change clock difference adjustment information through historical data fitting, wherein the historical data comprises design indexes and actual verification results.
In the embodiment of the invention, the total amount of the observed values, the clock drift clock difference adjustment information and the temperature change clock difference adjustment information can be obtained by historical data fitting. The historical data comprises design indexes and actual verification results, wherein the design indexes can comprise various design values inherent to the local frequency reference source, and the actual verification results can comprise factory debugging data of the local frequency reference source and verification data generated in the actual use process. The embodiment of the invention only lists four variables which affect clock synchronization, namely clock difference adjustment information, phase adjustment quantity of a local frequency reference source, clock drift clock difference adjustment information and temperature change clock difference adjustment information, and actually can also comprise other variables, such as clock difference adjustment quantity caused by ephemeris error, clock difference adjustment quantity caused by ionospheric delay and the like. By considering a plurality of variables influencing clock synchronization, the clock difference adjustment information, the phase adjustment quantity of the local frequency reference source and the variables obtained by fitting are summed to obtain the clock difference fitting information, so that errors caused by various variables can be eliminated or greatly reduced, and the time precision is improved.
Further, the phase adjustment amount of the local frequency reference source is obtained by averaging the third clock difference sequence of the current sampling timeΔT Kt Obtaining, comprising:
judging the average value of the third clock difference sequence of the current sampling momentΔT Kt Whether the current sampling time is larger than a second preset threshold value or not, if so, calculating the average value of a third clock difference sequence of the current sampling time by adopting an integer functionΔT Kt Obtaining a phase adjustment quantity of a local frequency reference source; otherwise, the phase adjustment amount of the local frequency reference source is zero.
In the embodiment of the invention, the average value delta T of the third clock difference sequence of the current sampling time TKtThe formula is as follows:
Figure 481819DEST_PATH_IMAGE002
wherein, TUitIs the time offset, TR, between the local frequency reference source at the current sampling instant and the ith co-view satelliteitAnd n is the time deviation between the frequency reference center of the current sampling moment and the ith co-view satellite, and n is the number of the co-view satellites and is more than or equal to 4.
Further, obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference fitting information, including:
and calculating to obtain the frequency deviation amount between the local frequency reference source and the frequency reference center by using an incremental PID algorithm based on the clock error fitting information.
Further, based on the clock error fitting information, calculating and obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center by using an incremental PID algorithm, including:
amount of frequency deviation between local frequency reference source and frequency reference centerΔf(n)The formula is as follows:
Δf(n)=K P ΔT Kt ΔT Km /K I K D [ΔT Kt ΔT K(t-1) ];
wherein the content of the first and second substances,K P K I K D adjusting parameters for PID;ΔT Kt is the average of the third sequence of clock differences at the current sampling instant,Δ T K(t-1) the average value of the third clock difference sequence of the last sampling time adjacent to the current sampling time is obtained;ΔT Km the information is fitted to the clock error.
In the embodiment of the present invention, the first and second substrates,K P K I K D the PID adjusting parameters are determined by different types of frequency reference sources, are related to the stability, drift, temperature system and other parameters of the frequency reference sources, and can be obtained through test historical data. By constructing an algorithm, variables such as satellite common view, frequency reference source, environment and the like are considered, the influence of various variables on time is effectively weakened, and the clock taming accuracy is improved.
Step S104: and obtaining the frequency adjustment quantity of the local frequency reference source according to the frequency deviation quantity.
Further, step S104 includes:
and calculating the frequency adjustment quantity of the local frequency reference source by adopting a linear function according to the frequency deviation quantity.
Further, according to the frequency deviation amount, calculating by using a linear function to obtain a frequency adjustment amount of the local frequency reference source, including:
calculating the frequency adjustment quantity of the local frequency reference source by adopting the following formulau(n)
u(n)= f(Δf(n))= K A Δf(n)K B
Wherein the content of the first and second substances,K A 、K B in order to be a frequency reference source parameter,Δf(n)is the amount of frequency deviation.
K A 、K B Determined by different types of frequency reference sources.
Step S105: and sending the frequency adjustment amount to the local frequency reference source for controlling the local frequency reference source to realize the adjustment of the local reference signal.
In the embodiment, the third clock difference sequence is obtained by adopting a satellite common-view comparison method, and abnormal value elimination and filtering are performed on the clock difference sequence, so that the problems of low stability caused by short interval of the existing Beidou or GPS data, large data jitter and low accuracy caused by imperfect models constructed by influences on atmospheric transmission, satellite orbits and the like are solved, the clock can be tamed by low-jitter and long-interval data, higher stability can be brought, influences caused by satellite systems and environmental multipath can be effectively weakened, and the accuracy is improved.
The prior Beidou or GPS disciplined clock generally adopts the interval of 1 second of Beidou or GPS data to perform clock discipline, while the method provided by the invention can adopt the data interval of 16 minutes (according to the common view data CGGTTS format standard) to perform clock discipline; and experiments verify that the stability of the output frequency can reach 5x10-14 (stable in days), and the accuracy of the output time can reach 5ns (95%).
Fig. 2 is a schematic structural diagram of a time code monitoring apparatus according to an embodiment of the present invention.
As shown in fig. 2, the apparatus includes:
the satellite common-view unit 201 is configured to receive a local reference signal sent by the clock taming unit, a satellite signal sent by each common-view satellite, and a second clock difference sequence sent by the frequency reference center in real time, calculate a first clock difference sequence according to the local reference signal and each satellite signal, and send the third clock difference sequence to the clock taming unit and send the first clock difference sequence to the frequency reference center in real time according to a third clock difference sequence calculated by the first clock difference sequence and the second clock difference sequence, where the second clock difference sequence is a time offset sequence between the frequency reference center and each common-view satellite;
the clock disciplining unit 202 is configured to obtain a third clock difference sequence of each sampling time within a preset time period, execute the clock disciplining method provided in any one of the above embodiments, receive a local reference signal sent by a frequency reference source, and send the local reference signal to the satellite common view unit, the clock output interface, and the time signal measurement unit, respectively;
the frequency reference source 203 is used for receiving the frequency adjustment amount sent by the clock taming unit, adjusting the local reference signal according to the frequency adjustment amount and sending the local reference signal to the clock taming unit;
the clock output interface 204 is used for receiving the local reference signal sent by the clock taming unit, converting the local reference signal into a time code signal matched with a local power consumption information acquisition system main station, and outputting the converted time code signal;
and the time signal measuring unit 205 is configured to receive the local reference signal sent by the clock taming unit and the master station time signal sent by the master station of the local power consumption information acquisition system, convert the master station time signal into a signal consistent with the local reference signal, calculate a time deviation between the local reference signal and the converted master station time signal, and output the time deviation.
In the embodiment of the invention, the time of each common-view satellite can be obtained according to each satellite signal. The first clock difference is the time deviation between the local frequency reference source and the common view satellite i, and can be obtained by the local reference signal t1Time t with common view satellite isiThe difference between them is obtained as the first clock difference TUi=t1-tsi(ii) a Since there are multiple common-view satellites, the time offset of the local frequency reference source relative to each common-view satellite forms a first sequence of clock offsets { TU }1,TU2,…,TUnN is the number of the common view satellites, and n is more than or equal to 4. Similarly, the second clock difference is the time offset between the frequency reference center and the common view satellite i, and can be obtained by the reference signal t of the frequency reference center2Time t with common view satellite isiBy a difference between them, i.e. a second clock difference TRi=t2-tsi(ii) a Since there are multiple common-view satellites, the time offset of the frequency reference center with respect to each common-view satellite forms a second sequence of clock offsets { TR }1,TR2,…,TRnN is the number of the common view satellites, and n is more than or equal to 4. The third clock difference is the time deviation between the local frequency reference source and the frequency reference center, and can beBy differencing the first clock difference with the second clock difference, i.e. Δ Ti=TUi−TRi= (t1-tsi)-(t2-tsi) Since there are a plurality of co-view satellites, the time offset between the local frequency reference source and the frequency reference center forms a third sequence of clock differences { Δ T } for each co-view satellite1,ΔT2,…,ΔTnN is the number of the common view satellites, and n is more than or equal to 4. The common view satellite can comprise satellite systems such as Beidou, GPS, GLONASS, Galileo and the like.
And the frequency reference source is used for sending a local reference signal to the clock taming unit in real time, wherein the local reference signal comprises a local reference signal before adjustment and a local reference signal after adjustment. Similarly, in the embodiment of the present invention, the clock output interface and the time signal measurement unit both receive the local reference signal sent by the clock disciplining unit in real time, and include the local reference signal before adjustment and the local reference signal after adjustment.
The clock output interface is used for providing a local reference signal for a main station of the local power consumption information acquisition system, the local power consumption information acquisition system provides various devices in different forms, the output time code signal comprises IRIG-B (DC), IRIG-B (AC), TOD, NTP/PTP and other time code signals except 1PPS pulse signal, and the conversion and output of the different time code signals are performed in parallel.
The time signal measuring unit can receive different types of master station time signals provided by a master station of a local electricity consumption information acquisition system, comprises 1PPS, IRIG-B (DC), IRIG-B (AC), TOD, NTP/PTP and the like, converts the master station time signals into signals consistent with local reference signals, calculates the time deviation between the local reference signals and the converted master station time signals by taking the local reference signals as a reference, can realize precision measurement and evaluation of the master station time signals, and performs the conversion and measurement processes of the different master station time signals in parallel.
Through the clock output interface and the time signal measuring unit, the time code and the measuring function required by the power consumer can be provided, the power system has stronger applicability to the power system user, the requirements of multiple specialties and multiple application scenes can be met, the time service and the time code measurement can be completed by a single device, the resources are saved, and the measuring process is simplified.
In the embodiment, the clock disciplining technology is applied and the time code measurement function is combined, so that the problem of online monitoring and real-time tracing is solved, the problems of timeliness and accuracy of time service and measurement of the power system are solved, time misalignment and synchronous deviation can be identified in time, and trade settlement fairness and fault analysis and judgment are guaranteed; in addition, the multi-place deployment can realize the time unification and synchronization of the whole network.
Further, with continued reference to fig. 2, the apparatus further comprises:
and the data transmission unit 206 is configured to receive the first clock difference sequence sent by the satellite common view unit, encrypt the first clock difference sequence, send the encrypted first clock difference sequence to the frequency reference center, receive the second clock difference sequence sent by the frequency reference center, decrypt the second clock difference sequence, and send the decrypted second clock difference sequence to the satellite common view unit.
The data transmission unit is used for encrypting and decrypting the data generated by the device and the downloaded reference data, so that the integrity, safety and usability of data transmission are ensured, and the requirements of power grid informatization safety are met.
Further, the data transmission unit 206 is further configured to:
sending a connection request to a frequency reference center, and establishing a TCP connection;
acquiring first information and sending the first information to a frequency reference center, wherein the first information comprises: decrypting at least one of a chip serial number, time code monitoring device authentication information and reference center authentication information;
acquiring a first random number and first signature information provided by an encryption and decryption chip, and sending the first random number and the first signature information to a frequency reference center, wherein the first random number and the first signature information are obtained by updating an application session negotiation calculator through the encryption and decryption chip;
acquiring a second random number and second signature information returned by the frequency reference center, and writing the second random number and the second signature information into the encryption and decryption chip;
receiving a first clock difference sequence sent by a satellite common-view receiving unit or a second clock difference sequence sent by a frequency reference center;
sending the first clock difference sequence or the second clock difference sequence to an encryption and decryption chip written with a second random number and second signature information for encryption or decryption to obtain an encrypted first clock difference sequence or a decrypted second clock difference sequence;
and sending the encrypted first clock difference sequence or the decrypted second clock difference sequence to a frequency reference center or a satellite common-view unit.
In the above embodiment, the TCP connection may have a port 61201. Preferably, the encryption and decryption chip is an ESAM chip. When large data volume data interaction is carried out with the reference center, the data segments can be subjected to cycle interaction until the data segments are completely interacted, and the data transmission unit closes the connection with the reference center.
Data are encrypted through the TCP connection and the encryption and decryption chip, and a power system encryption network is adopted, so that data interaction between the reference center and the device can be safer and more reliable.
Further, a third clock difference sequence calculated according to the first clock difference sequence and the second clock difference sequence includes:
calculating a third clock error relative to each common-view satellite to obtain a third clock error sequence (delta T)1, ΔT2,…,ΔTnN is the number of the common view satellites, and n is more than or equal to 4;
wherein the third clock difference Δ T relative to the ith co-view satelliteiThe formula is as follows:
ΔTi=TUi−TRi
wherein, TUiFor a first clock offset, TR, relative to the ith common view satelliteiIs the second clock offset relative to the ith common-view satellite.
Further, the frequency reference source is a rubidium clock or a crystal oscillator.
Fig. 3 shows a schematic structural diagram of a time synchronization system according to an embodiment of the invention.
As shown in fig. 3, the system includes:
a co-view satellite 301 for transmitting satellite signals to a frequency reference center 302 and a frequency application center 303;
the frequency reference center 302 is configured to receive a satellite signal sent by the common view satellite 301 and a first clock difference sequence sent by the frequency application center 303, calculate a second clock difference sequence according to the satellite signal and a reference signal of the frequency reference center, and send the second clock difference sequence to the frequency application center 303;
a frequency application center 303, including a time code monitoring device as provided in any of the above embodiments, for performing data interaction with the co-view satellite 301, the frequency reference center 302 and the electricity consumption information acquisition system main station 304;
and the power consumption information acquisition system master station 304 is used for sending the master station time signal to the frequency application center 303, receiving the time code signal sent by the frequency application center 303, and calibrating the master station time signal based on the time code signal.
In the above embodiment, there may be a plurality of common view satellites, and preferably there are at least 4 common view satellites. The frequency reference center is typically 1. The number of the frequency application centers can be 1, or 2 or more, and each frequency application center independently performs data interaction with the frequency reference center, each common-view satellite and each electricity consumption information acquisition system main station. The electricity consumption information acquisition system main station corresponds to the frequency application center, and can be 1 or 2 or more.
According to the embodiment, the satellite common view and clock taming are combined, so that the problem of online monitoring and real-time tracing of the power system is solved, the problems of timeliness and accuracy of time service and measurement are solved, time misalignment and synchronous deviation can be identified in time, and trade settlement fairness and fault analysis and judgment are guaranteed; in addition, the multi-place deployment can realize the time unification and synchronization of the whole network.
Further, with continued reference to fig. 3, the system further comprises:
the acquisition terminal 305 is configured to receive a master station time signal sent by the master station 304 of the electricity consumption information acquisition system, calibrate the acquisition terminal time signal based on the master station time signal, and send the acquisition terminal time signal to the electric energy meter 306;
and the electric energy meter 306 is configured to receive the acquisition terminal time signal sent by the acquisition terminal 305, and calibrate the time of the electric energy meter based on the acquisition terminal time signal.
FIG. 4 illustrates an exemplary flow diagram of a clock disciplining apparatus according to an embodiment of the present invention.
As shown in fig. 4, the apparatus includes:
a third clock difference sequence obtaining unit 401, configured to obtain a third clock difference sequence at each sampling time in a preset time period, where the third clock difference sequence is a time deviation sequence obtained by comparing a local frequency reference source with a frequency reference center by using a satellite common-view comparison method.
In the embodiment of the invention, the preset time period can be the current sampling time and a period of time before the current sampling time, the specific time period length can be set according to requirements, and by acquiring data in the preset time period, the problem of inaccuracy caused by data deviation at a certain time is avoided, and the comprehensive accuracy of the data is ensured. It should be appreciated that the longer the preset time period, the higher the final clock taming stability and accuracy. Within the preset time period, the third clock difference at each sampling time may be obtained according to a preset sampling time interval. Specifically, the preset sampling time interval may be according to the common-view data CGGTTS format standard. Preferably, the preset sampling time interval is 16 minutes. The local frequency reference source may be a rubidium clock or a crystal oscillator. The common view satellite can comprise satellite systems such as Beidou, GPS, GLONASS, Galileo and the like.
Third clock difference Δ T with respect to common view satellite iiThe following formula can be adopted to calculate:
ΔTi=TUi−TRi
wherein, TUiFor time deviation, TR, between a local frequency reference source and a common view satellite iiIs the time offset between the center of the frequency reference and the satellite of co-view i. The third clock difference relative to each co-view satellite may constitute a third clock difference sequence, i.e., { Δ T }1, ΔT2,…,ΔTnN is the number of the common view satellites, and n is more than or equal to 4.
According to the embodiment, the satellite common-view comparison method is adopted, so that the problems that the interval time of the existing Beidou or GPS tame clock is short and the data jitter is large are solved. On one hand, the sampling time interval of the satellite common-view comparison method is long, and the stability of clock taming is improved; on the other hand, by comparing the local frequency reference source time with the frequency reference center time, errors such as atmospheric transmission, satellite orbit and the like can be effectively eliminated (or weakened), data jitter is small, and the clock taming accuracy is improved.
An abnormal value removing and filtering unit 402, configured to remove and filter an abnormal value of the third clock difference sequence at each sampling time in a preset time period, so as to obtain clock difference adjustment information.
Further, the outlier rejection and filtering unit 402 is further configured to:
and removing the abnormal value of the third clock difference sequence of each sampling time in the preset time period by adopting an abnormal value removing algorithm.
Further, the method for removing the abnormal value of the third clock difference sequence of each sampling time in the preset time period by using an abnormal value removing algorithm comprises the following steps:
and performing the following elimination operation on the third clock difference sequence of each sampling moment in a preset time period:
selecting a third clock difference sequence (delta T) of the same sampling time1,…ΔTi,…ΔTnWherein i =1,2, …, n, n is the number of common view satellites, n is more than or equal to 4, and the third clock difference is delta TiComparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method to obtain a time deviation relative to the ith common-view satellite;
sequentially taking j as an integer from 1 to n, eliminating the jth common-view satellite, and calculating the average value and the standard deviation of the third clock difference sequence of the rest n-1 common-view satellites to obtain n average values AVGiAnd n first standard deviations STDi,1≤j≤n;
Respectively calculating n first standard deviations STDiTo obtain n second standard deviations STD (STD)i);
Judging each second standard deviation STD (STD) separatelyi) Whether it is large or notAt the first predetermined threshold, if there is a second standard deviation STD (STD) greater than the first predetermined thresholdi) Then, the second standard deviation STD (STD) with the largest value is selectedi) Forming a third clock difference sequence { delta T after the abnormal value is removed for the abnormal value and the common view satellite corresponding to the abnormal value is removed1,…ΔTp,…ΔTn-1},p=1,2,…,n-1。
In the embodiment of the invention, any common-view satellite (jth common-view satellite) is removed from the dimension of the common-view satellite, namely the 1 st common-view satellite, the 2 nd common-view satellite and the … are respectively removed, and after the nth common-view satellite is removed, the residual common-view satellites respectively form n common-view satellite combinations; for each co-view satellite combination, calculating the mean value and standard deviation of the time deviation between the local frequency reference source and the frequency reference center relative to the combination, namely calculating the mean value and standard deviation of the third clock difference sequence relative to the combination, and obtaining n mean values and n first standard deviations; and then calculating the standard deviation of the n first standard deviations to obtain n second standard deviations. Comparing the magnitude of each second standard deviation with a first preset threshold value: if the data is smaller than or equal to the first preset threshold, the data consistency is better, and abnormal values are not required to be removed; if the second standard deviation is larger than the first preset threshold, indicating that the data consistency is poor, performing statistical sorting on all second standard deviations larger than the first preset threshold, selecting a maximum value as the abnormal value of the time, and removing the removed common view satellite in the combination corresponding to the maximum value to form n-1 third clock deviations after the abnormal value is removed. It should be understood that if the second standard deviation greater than the first preset threshold is 2 or more, the above steps need to be executed circularly, and all abnormal values are removed in sequence. In the embodiment of the invention, the satellite common-view data at each sampling time within the preset time period, namely the abnormal value in the third clock difference sequence, needs to be removed.
And calculating the weighted average value of the third clock difference sequence after the abnormal value of each sampling time within the preset time period is removed, so as to obtain the clock difference result of each sampling time within the preset time period.
In the embodiment of the invention, for each sampling time in the preset time period, the third clock difference sequence after the abnormal value is removed is calculated{ΔT1,…ΔTp,…ΔTn-1The weighted average of which is taken as the clock difference result. And if no abnormal value is eliminated in the previous step, directly performing weighted average calculation on the third clock difference sequence.
And performing Kalman filtering on the clock error result of each sampling moment in a preset time period, and calculating the average value of the clock error results of each sampling moment in the preset time period after Kalman filtering to obtain clock error adjustment information.
In the embodiment of the invention, from the time dimension, Kalman filtering is performed on the clock error result of each sampling time in the preset time period to obtain the optimal estimation value (clock error result of Kalman filtering) of each sampling time in the preset time period, and the average value of the optimal estimation values of each sampling time is calculated to be used as the current clock error adjustment information.
In the embodiment, on one hand, the satellite clock error data at the same moment is removed by comparing the standard deviation, so that the influence of individual satellite data on the clock error mean value can be reduced; on the other hand, Kalman filtering is adopted for clock error sequence data at different moments, so that the influence caused by a satellite system and environmental multipath is effectively weakened, and low data jitter can be realized.
A first unit 403, configured to obtain a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information.
Further, the first unit 403 is further configured to:
obtaining clock error fitting information based on the clock error adjusting information;
and obtaining the frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock error fitting information.
Further, obtaining clock error fitting information based on the clock error adjustment information, including:
and obtaining clock error fitting information by adopting a historical data fitting algorithm based on the clock error adjusting information.
Further, based on the clock error adjustment information, obtaining clock error fitting information by using a historical data fitting algorithm, including:
clock error fitting informationΔT Km The formula is as follows:
Figure 241964DEST_PATH_IMAGE001
wherein m is the total amount of observed values;ΔT Ki variables that affect clock synchronization include: clock difference adjustment information, phase adjustment amount of local frequency reference source, clock drift clock difference adjustment information and temperature change clock difference adjustment information, wherein the phase adjustment amount of the local frequency reference source is obtained by the average value of a third clock difference sequence of the current sampling timeΔT Kt And obtaining clock drift clock difference adjustment information and temperature change clock difference adjustment information through historical data fitting, wherein the historical data comprises design indexes and actual verification results.
In the embodiment of the invention, the total amount of the observed values, the clock drift clock difference adjustment information and the temperature change clock difference adjustment information can be obtained by historical data fitting. The historical data comprises design indexes and actual verification results, wherein the design indexes can comprise various design values inherent to the local frequency reference source, and the actual verification results can comprise factory debugging data of the local frequency reference source and verification data generated in the actual use process. The embodiment of the invention only lists four variables which affect clock synchronization, namely clock difference adjustment information, phase adjustment quantity of a local frequency reference source, clock drift clock difference adjustment information and temperature change clock difference adjustment information, and actually can also comprise other variables, such as clock difference adjustment quantity caused by ephemeris error, clock difference adjustment quantity caused by ionospheric delay and the like. By considering a plurality of variables influencing clock synchronization, the clock difference adjustment information, the phase adjustment quantity of the local frequency reference source and the variables obtained by fitting are summed to obtain the clock difference fitting information, so that errors caused by various variables can be eliminated or greatly reduced, and the time precision is improved.
Further, the phase adjustment amount of the local frequency reference source is obtained by averaging the third clock difference sequence of the current sampling timeΔT Kt Obtaining, comprising:
judging the average value of the third clock difference sequence of the current sampling momentΔT Kt Whether the current sampling time is larger than a second preset threshold value or not, if so, calculating the average value of a third clock difference sequence of the current sampling time by adopting an integer functionΔT Kt Obtaining a phase adjustment quantity of a local frequency reference source; otherwise, the phase adjustment amount of the local frequency reference source is zero.
In the embodiment of the invention, the average value delta T of the third clock difference sequence of the current sampling time TKtThe formula is as follows:
Figure 197413DEST_PATH_IMAGE002
wherein, TUitIs the time offset, TR, between the local frequency reference source at the current sampling instant and the ith co-view satelliteitAnd n is the time deviation between the frequency reference center of the current sampling moment and the ith co-view satellite, and n is the number of the co-view satellites and is more than or equal to 4.
Further, obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference fitting information, including:
and calculating to obtain the frequency deviation amount between the local frequency reference source and the frequency reference center by using an incremental PID algorithm based on the clock error fitting information.
Further, based on the clock error fitting information, calculating and obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center by using an incremental PID algorithm, including:
amount of frequency deviation between local frequency reference source and frequency reference centerΔf(n)The formula is as follows:
Δf(n)=K P ΔT Kt ΔT Km /K I K D [ΔT Kt ΔT K(t-1) ];
wherein the content of the first and second substances,K P K I K D adjusting parameters for PID;ΔT Kt is the average of the third sequence of clock differences at the current sampling instant,Δ T K(t-1) the average value of the third clock difference sequence of the last sampling time adjacent to the current sampling time is obtained;ΔT Km the information is fitted to the clock error.
In the embodiment of the present invention, the first and second substrates,K P K I K D the PID adjusting parameters are determined by different types of frequency reference sources, are related to the stability, drift, temperature system and other parameters of the frequency reference sources, and can be obtained through test historical data. By constructing an algorithm, variables such as satellite common view, frequency reference source, environment and the like are considered, the influence of various variables on time is effectively weakened, and the clock taming accuracy is improved.
A second unit 404, configured to obtain a frequency adjustment amount of the local frequency reference source according to the frequency deviation amount.
Further, the second unit 404 is further configured to:
and calculating the frequency adjustment quantity of the local frequency reference source by adopting a linear function according to the frequency deviation quantity.
Further, according to the frequency deviation amount, calculating by using a linear function to obtain a frequency adjustment amount of the local frequency reference source, including:
calculating the frequency adjustment quantity of the local frequency reference source by adopting the following formulau(n)
u(n)= f(Δf(n))= K A Δf(n)K B
Wherein the content of the first and second substances,K A 、K B in order to be a frequency reference source parameter,Δf(n)is the amount of frequency deviation.
K A 、K B Determined by different types of frequency reference sources.
A frequency adjustment amount sending unit 405, configured to send the frequency adjustment amount to the local frequency reference source for controlling the local frequency reference source to implement adjustment on the local reference signal.
In the embodiment, the third clock difference sequence is obtained by adopting a satellite common-view comparison method, and abnormal value elimination and filtering are performed on the clock difference sequence, so that the problems of low stability caused by short interval of the existing Beidou or GPS data, large data jitter and low accuracy caused by imperfect models constructed by influences on atmospheric transmission, satellite orbits and the like are solved, the clock can be tamed by low-jitter and long-interval data, higher stability can be brought, influences caused by satellite systems and environmental multipath can be effectively weakened, and the accuracy is improved.
The prior Beidou or GPS disciplined clock generally adopts the interval of 1 second of Beidou or GPS data to perform clock discipline, while the method provided by the invention can adopt the data interval of 16 minutes (according to the common view data CGGTTS format standard) to perform clock discipline; and experiments verify that the stability of the output frequency can reach 5x10-14 (stable in days), and the accuracy of the output time can reach 5ns (95%).
The present invention also provides a computer readable storage medium storing one or more programs which, when executed by one or more processors, perform any of the clock discipline methods described above.
The invention has been described with reference to a few embodiments. However, other embodiments of the invention than the one disclosed above are equally possible within the scope of the invention, as would be apparent to a person skilled in the art from the appended patent claims.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a/an/the [ device, component, etc ]" are to be interpreted openly as referring to at least one instance of said device, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

Claims (21)

1. A clock disciplining method, characterized in that it comprises:
acquiring a third clock difference sequence of each sampling moment in a preset time period, wherein the third clock difference sequence is a time deviation sequence obtained by comparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method;
removing abnormal values and filtering the third clock difference sequence of each sampling time in the preset time period to obtain clock difference adjustment information;
obtaining a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information;
obtaining a frequency adjustment quantity of the local frequency reference source according to the frequency deviation quantity;
and sending the frequency adjustment amount to the local frequency reference source to control the local frequency reference source to realize adjustment of a local reference signal.
2. The method according to claim 1, wherein the performing outlier rejection and filtering on the third clock difference sequence at each sampling time in the preset time period to obtain the clock difference adjustment information comprises:
removing abnormal values of the third clock difference sequence of each sampling time in the preset time period by adopting an abnormal value removing algorithm;
calculating a weighted average value of the third clock difference sequence after the abnormal value of each sampling time in the preset time period is removed, and obtaining a clock difference result of each sampling time in the preset time period;
and performing Kalman filtering on the clock error result of each sampling time in the preset time period, and calculating the average value of the clock error results of each sampling time in the preset time period after Kalman filtering to obtain clock error adjustment information.
3. The method according to claim 2, wherein the step of performing outlier rejection on the third clock difference sequence at each sampling time in the preset time period by using an outlier rejection algorithm comprises:
and performing the following elimination operation on the third clock difference sequence of each sampling moment in the preset time period:
selecting a third clock difference sequence (delta T) of the same sampling time1,…ΔTi,…ΔTnWherein i =1,2, …, n, n is the number of common view satellites, n is more than or equal to 4, and the third clock difference is delta TiComparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method to obtain a time deviation relative to the ith common-view satellite;
sequentially taking j as an integer from 1 to n, eliminating the jth common-view satellite, and calculating the average value and the standard deviation of the third clock difference sequence of the rest n-1 common-view satellites to obtain n average values AVGiAnd n first standard deviations STDi,1≤j≤n;
Calculating n first standard deviations STD respectivelyiTo obtain n second standard deviations STD (STD)i);
Judging each of the second standard deviation STD (STD) separatelyi) Whether it is greater than a first preset threshold, if there is a second standard deviation STD (STD) greater than the first preset thresholdi) Then, the second standard deviation STD (STD) with the largest value is selectedi) Forming a third clock difference sequence { delta T after the abnormal value is removed for the abnormal value and the common view satellite corresponding to the abnormal value is removed1,…ΔTp,…ΔTn-1},p=1,2,…,n-1。
4. The method of claim 1, wherein the deriving an amount of frequency deviation between the local frequency reference source and the frequency reference center based on the clock difference adjustment information comprises:
obtaining clock difference fitting information based on the clock difference adjusting information;
and obtaining the frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference fitting information.
5. The method of claim 4, wherein obtaining clock error fitting information based on the clock error adjustment information comprises:
and obtaining clock error fitting information by adopting a historical data fitting algorithm based on the clock error adjusting information.
6. The method of claim 5, wherein obtaining the clock error fitting information using a historical data fitting algorithm based on the clock error adjustment information comprises:
clock error fitting informationΔT Km The formula is as follows:
Figure DEST_PATH_IMAGE002
wherein m is the total amount of observed values;ΔT Ki variables that affect clock synchronization include: clock difference adjustment information, phase adjustment quantity of a local frequency reference source, clock drift clock difference adjustment information and temperature change clock difference adjustment information, wherein the phase adjustment quantity of the local frequency reference source is obtained by the average value of a third clock difference sequence of the current sampling momentΔT Kt And obtaining the clock drift clock difference adjustment information and the temperature change clock difference adjustment information through historical data fitting, wherein the historical data comprises design indexes and actual verification results.
7. According to claim 6The method is characterized in that the phase adjustment amount of the local frequency reference source is obtained by the average value of the third clock difference sequence of the current sampling timeΔT Kt Obtaining, comprising:
judging the average value of the third clock difference sequence of the current sampling momentΔT Kt Whether the current sampling time is larger than a second preset threshold value or not, if so, calculating the average value of a third clock difference sequence of the current sampling time by adopting an integer functionΔT Kt Obtaining a phase adjustment quantity of a local frequency reference source; otherwise, the phase adjustment amount of the local frequency reference source is zero.
8. The method of claim 4, wherein said deriving an amount of frequency deviation between the local frequency reference source and the frequency reference center based on the clock difference fit information comprises:
and calculating to obtain the frequency deviation amount between the local frequency reference source and the frequency reference center by using an incremental PID algorithm based on the clock error fitting information.
9. The method of claim 8, wherein calculating the frequency deviation between the local frequency reference source and the frequency reference center using an incremental PID algorithm based on the clock error fit information comprises:
an amount of frequency deviation between the local frequency reference source and the frequency reference centerΔf(n)The formula is as follows:
Δf(n)=K P ΔT Kt ΔT Km /K I K D [ΔT Kt ΔT K(t-1) ];
wherein the content of the first and second substances,K P K I K D adjusting parameters for PID;ΔT Kt for the current sampling instantOf the third sequence of clock differences of (a),Δ T K(t-1) the average value of the third clock difference sequence of the last sampling time adjacent to the current sampling time is obtained;ΔT Km fitting information to the clock error.
10. The method according to claim 1, wherein the obtaining the frequency adjustment amount of the local frequency reference source according to the frequency deviation amount comprises:
and calculating the frequency adjustment quantity of the local frequency reference source by adopting a linear function according to the frequency deviation quantity.
11. The method according to claim 10, wherein calculating the frequency adjustment of the local frequency reference source by using a linear function according to the frequency deviation amount comprises:
calculating the frequency adjustment quantity of the local frequency reference source by adopting the following formulau(n)
u(n)= f(Δf(n))= K A Δf(n)K B
Wherein the content of the first and second substances,K A 、K B is a frequency reference source parameter;Δf(n)is the amount of the frequency deviation.
12. A time code monitoring device, the device comprising:
the satellite common-view unit is used for receiving a local reference signal sent by the clock taming unit, a satellite signal sent by each common-view satellite and a second clock difference sequence sent by the frequency reference center in real time, calculating to obtain a first clock difference sequence according to the local reference signal and each satellite signal, calculating to obtain a third clock difference sequence according to the first clock difference sequence and the second clock difference sequence, sending the third clock difference sequence to the clock taming unit in real time and sending the first clock difference sequence to the frequency reference center in real time, wherein the second clock difference sequence is a time deviation sequence between the frequency reference center and each common-view satellite;
a clock disciplining unit, configured to obtain a third clock difference sequence at each sampling time within a preset time period, perform the method according to any one of claims 1 to 11, receive a local reference signal sent by a frequency reference source, and send the local reference signal to the satellite common view unit, the clock output interface, and the time signal measurement unit, respectively;
the frequency reference source is used for receiving the frequency adjustment quantity sent by the clock taming unit, adjusting the local reference signal according to the frequency adjustment quantity and sending the local reference signal to the clock taming unit;
the clock output interface is used for receiving the local reference signal sent by the clock taming unit, converting the local reference signal into a time code signal matched with a local power consumption information acquisition system main station and outputting the converted time code signal;
and the time signal measuring unit is used for receiving the local reference signal sent by the clock taming unit and the master station time signal sent by the master station of the local power consumption information acquisition system, converting the master station time signal into a signal consistent with the local reference signal, calculating the time deviation between the local reference signal and the converted master station time signal, and outputting the time deviation.
13. The apparatus of claim 12, further comprising:
and the data transmission unit is used for receiving the first clock difference sequence sent by the satellite common-view unit, encrypting the first clock difference sequence and sending the encrypted first clock difference sequence to the frequency reference center, receiving the second clock difference sequence sent by the frequency reference center, decrypting the second clock difference sequence and sending the decrypted second clock difference sequence to the satellite common-view unit.
14. The apparatus of claim 13, wherein the data transmission unit is further configured to:
sending a connection request to the frequency reference center, and establishing a TCP connection;
acquiring first information and sending the first information to the frequency reference center, wherein the first information comprises: decrypting at least one of a chip serial number, time code monitoring device authentication information and reference center authentication information;
acquiring a first random number and first signature information provided by an encryption and decryption chip, and sending the first random number and the first signature information to the frequency reference center, wherein the first random number and the first signature information are obtained by updating an application session negotiation calculator of the encryption and decryption chip;
acquiring a second random number and second signature information returned by the frequency reference center, and writing the second random number and the second signature information into the encryption and decryption chip;
receiving a first clock difference sequence transmitted by the satellite common view unit or a second clock difference sequence transmitted by the frequency reference center;
sending the first clock difference sequence or the second clock difference sequence to an encryption and decryption chip written with the second random number and the second signature information for encryption or decryption to obtain an encrypted first clock difference sequence or a decrypted second clock difference sequence;
and sending the encrypted first clock difference sequence or the decrypted second clock difference sequence to the frequency reference center or the satellite common view unit.
15. The apparatus of claim 12, wherein the third sequence of clock differences calculated from the first sequence of clock differences and the second sequence of clock differences comprises:
calculating a third clock error relative to each common-view satellite to obtain a third clock error sequence (delta T)1, ΔT2,…,ΔTnN is the number of the common view satellites, and n is more than or equal to 4;
wherein the third clock difference Δ T relative to the ith co-view satelliteiThe formula is as follows:
ΔTi=TUi−TRi
wherein, TUiFor a first clock offset, TR, relative to the ith common view satelliteiIs the second clock offset relative to the ith common-view satellite.
16. The apparatus of claim 12, wherein the frequency reference source is a rubidium clock or a crystal oscillator.
17. The apparatus according to claim 14, wherein the encryption/decryption chip is an ESAM chip.
18. A time synchronization system, the system comprising:
a common view satellite for transmitting satellite signals to a frequency reference center and a frequency application center;
the frequency reference center is used for receiving a satellite signal sent by the common-view satellite and a first clock difference sequence sent by the frequency application center, calculating to obtain a second clock difference sequence according to the satellite signal and a reference signal of the frequency reference center, and sending the second clock difference sequence to the frequency application center;
the frequency application center comprises a time code monitoring device as claimed in any one of claims 11 to 16, and is used for data interaction with the common-view satellite, the frequency reference center and a power utilization information acquisition system main station;
the power consumption information acquisition system main station is used for sending a main station time signal to the frequency application center, receiving a time code signal sent by the frequency application center, and calibrating the main station time signal based on the time code signal.
19. The system of claim 18, further comprising:
the collection terminal is used for receiving a master station time signal sent by the master station of the electricity consumption information collection system, calibrating the collection terminal time signal based on the master station time signal and sending the collection terminal time signal to the electric energy meter;
and the electric energy meter is used for receiving the acquisition terminal time signal sent by the acquisition terminal and calibrating the time of the electric energy meter based on the acquisition terminal time signal.
20. A clock taming apparatus, the apparatus comprising:
the third clock difference sequence acquisition unit is used for acquiring a third clock difference sequence of each sampling moment in a preset time period, wherein the third clock difference sequence is a time deviation sequence obtained by comparing a local frequency reference source with a frequency reference center by adopting a satellite common-view comparison method;
the abnormal value removing and filtering unit is used for removing and filtering the abnormal value of the third clock difference sequence of each sampling time in the preset time period to obtain clock difference adjusting information;
a first unit, configured to obtain a frequency deviation amount between the local frequency reference source and the frequency reference center based on the clock difference adjustment information;
a second unit, configured to obtain a frequency adjustment amount of the local frequency reference source according to the frequency deviation amount;
and the frequency adjustment quantity sending unit is used for sending the frequency adjustment quantity to the local frequency reference source so as to control the local frequency reference source to realize the adjustment of the local reference signal.
21. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 11.
CN202111337307.7A 2021-11-12 2021-11-12 Clock disciplining method, time code monitoring device and time synchronization system Pending CN113992296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111337307.7A CN113992296A (en) 2021-11-12 2021-11-12 Clock disciplining method, time code monitoring device and time synchronization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111337307.7A CN113992296A (en) 2021-11-12 2021-11-12 Clock disciplining method, time code monitoring device and time synchronization system

Publications (1)

Publication Number Publication Date
CN113992296A true CN113992296A (en) 2022-01-28

Family

ID=79748137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111337307.7A Pending CN113992296A (en) 2021-11-12 2021-11-12 Clock disciplining method, time code monitoring device and time synchronization system

Country Status (1)

Country Link
CN (1) CN113992296A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115657448A (en) * 2022-12-09 2023-01-31 电信科学技术第五研究所有限公司 Frequency offset analysis method for clock discipline
CN115733489A (en) * 2022-11-25 2023-03-03 中科启迪光电子科技(广州)有限公司 Method, device and system for taming chip atomic clock

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012062207A1 (en) * 2010-11-11 2012-05-18 国网电力科学研究院 Standard frequency and time adjusting method based on rubidium oscillator
CN103226324A (en) * 2013-03-06 2013-07-31 中国计量科学研究院 High-precision time-frequency source capable of being tamed to time-frequency standard in real time
CN113514858A (en) * 2021-04-14 2021-10-19 星汉时空科技(长沙)有限公司 Common-view time synchronization method and device based on satellite navigation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012062207A1 (en) * 2010-11-11 2012-05-18 国网电力科学研究院 Standard frequency and time adjusting method based on rubidium oscillator
CN103226324A (en) * 2013-03-06 2013-07-31 中国计量科学研究院 High-precision time-frequency source capable of being tamed to time-frequency standard in real time
CN113514858A (en) * 2021-04-14 2021-10-19 星汉时空科技(长沙)有限公司 Common-view time synchronization method and device based on satellite navigation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115733489A (en) * 2022-11-25 2023-03-03 中科启迪光电子科技(广州)有限公司 Method, device and system for taming chip atomic clock
CN115733489B (en) * 2022-11-25 2024-01-05 中科启迪光电子科技(广州)有限公司 Chip atomic clock taming method, device and system
CN115657448A (en) * 2022-12-09 2023-01-31 电信科学技术第五研究所有限公司 Frequency offset analysis method for clock discipline

Similar Documents

Publication Publication Date Title
CN113992296A (en) Clock disciplining method, time code monitoring device and time synchronization system
CN108196279B (en) Satellite clock error calculating and forecasting method based on real-time data flow
CN1918940B (en) System and method for maintaining a common sense of time on a network segment
US10958367B2 (en) Network apparatus and clock synchronization method
US9425652B2 (en) Adaptive holdover timing error estimation and correction
Cena et al. Synchronize your watches: Part I: General-purpose solutions for distributed real-time control
CN109299496B (en) High-precision synchronous clock generation method
Whibberley et al. Local representations of UTC in national laboratories
CN105158771B (en) A kind of model parameter production method of tracing to the source in satellite navigation system
EP2811672A1 (en) Communication apparatus, communication system, and communication method for time synchronization
US20200021443A1 (en) Method and timer for providing security-protected time information
US20110222561A1 (en) Systems and methods for providing time synchronization
CN109302255B (en) Time synchronization control method, device and system and computer readable storage medium
US20150098492A1 (en) Method and Master Clock for Generating Fail-Silent Synchronization Messages
CN112543078A (en) Network time server calibration method and device based on satellite common view
CN116125512B (en) PPP self-adaptive clock difference model estimation method considering clock frequency time-varying characteristics
US9003063B2 (en) Systems, methods, and apparatus for estimating power time of use
CN113110016A (en) Common-view data generation method, receiver and time calibration system
Idehen et al. An emulation environment for prototyping PMU data errors
JP5372315B2 (en) Telemeter system slave station equipment
CN113341686B (en) Single-satellite multi-calendar timing method and device, computer equipment and storage medium
JP2005269759A (en) Sampling synchronization system and time management system
JP6196765B2 (en) Communication device, time control method, and program
CN113514858A (en) Common-view time synchronization method and device based on satellite navigation
Zanello et al. The Galileo precise timing facility

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