Local time pulse signal holding method and system under reference lock loss

By establishing a algorithm model for maintaining the relationship between the frequency control word and the drift amount of the digital-to-analog converter, and using the Kalman filter to process the drift amount, the problem of local clock source output frequency drift when the reference signal is lost is solved, and the system maintains high-precision frequency output for a certain period of time.

CN120010220AActive Publication Date: 2025-05-16TENOW INT LTD

Patent Information

Application Number
CN202510473348.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-05-16
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

The compensation method for the output frequency of the existing local clock source is complex and time-consuming, making it difficult to effectively solve the problem of frequency drift when the reference signal is lost.

Method used

Establish a algorithm model for maintaining the relationship between the frequency control word and the drift quantity of the two digital-to-analog converters, filter the drift quantity using the Kalman filter, and adjust the output frequency of the local clock source through the update of the frequency control word.

Benefits of technology

By analyzing the frequency drift characteristics of the local clock source, a relationship model between the frequency control word and the frequency drift amount is established, which effectively improves the frequency drift caused by factors such as temperature and aging, so that the system maintains a high frequency output accuracy within a certain period of time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010220A_ABST
    Figure CN120010220A_ABST
Patent Text Reader

Abstract

The invention discloses a local time pulse signal holding method and system under reference lock loss. The method comprises the following steps: establishing a holding algorithm model of a relationship between frequency control words and drift distances of two digital-to-analog converters; when it is monitored that the second pulse signal of the reference source is in a lock losing state, frequency control words Fw1 and Fw0 of the current round of the two digital-to-analog converters are collected; and inputting the frequency control words Fw1 and Fw0 into the maintenance algorithm model to obtain a new round of frequency control words Fw1 (i) and Fw0 (i) of the two digital-to-analog converters. By compensating the output frequency of the local clock source, the frequency drift of the local clock source caused by factors such as temperature and aging is improved, so that the timing system can still maintain higher frequency output precision within a certain time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of timing systems, and in particular to a method and system for maintaining a local time pulse signal when a reference is lost. Background Art

[0002] A timing card is a hardware device that provides accurate time synchronization services for computer systems, network devices, etc. based on a high-precision clock source and time synchronization protocol. It is usually connected to a computer via interfaces such as PCI, PCIe, and USB. A timing card can receive external high-precision time source signals, such as GPS satellite signals, Beidou satellite signals, and atomic clock signals, and convert these signals into time information that can be recognized and processed by a computer, thereby achieving high-precision synchronization between the computer system and the external standard time, with an accuracy that can usually reach nanoseconds or even higher.

[0003] In order to ensure the accuracy of system time when the external time source signal is interrupted or lost, the timing card is usually equipped with a high-precision local clock source and a timekeeping circuit. During normal operation, the timing card will continuously calibrate the local clock source to keep it synchronized with the external time source. When the external time source signal is interrupted, the local clock source will continue to time by relying on its own high-precision oscillator and fine-tune the clock through the timekeeping circuit to minimize the accumulation of time errors.

[0004] When the reference signal is unlocked, if no compensation measures are taken for the output frequency of the local clock source, the output frequency of the local clock source will drift seriously, which is related to the temperature characteristics and aging characteristics of the clock source itself. To address this problem, frequency-temperature prediction models and frequency-aging prediction models are usually established. This method is relatively mature and effective, but in order to determine the values ​​of the relevant parameters in the model, this requires high experimental equipment, complex experimental operations and is very time-consuming. Summary of the invention

[0005] The main purpose of the present invention is to propose a method and system for maintaining a local time pulse signal under reference loss of lock, aiming to solve the technical problem that the existing method for compensating the output frequency of a local clock source is complex and time-consuming to operate.

[0006] In order to solve the above technical problems, the first aspect of the present invention provides a method for maintaining a local time pulse signal under reference loss of lock, the method comprising: Establish a maintenance algorithm model for the relationship between the frequency control words and drift of two digital-to-analog converters; When it is detected that the pulse per second signal of the reference source is in an unlocked state, the frequency control words of the two digital-to-analog converters are collected; The frequency control words and are input into the hold algorithm model to obtain a new round of frequency control words F for the two digital-to-analog converters.w1 (i) and F w0 (i); The formula of the maintenance algorithm model is as follows: (1) (2) (3) Among them, f(x,y) is the change in frequency, also called drift, f0 is a constant; k1 is the coefficient corresponding to the frequency control word of one of the digital-to-analog converters; k0 is the coefficient corresponding to the frequency control word of the other digital-to-analog converter.

[0007] Further, the monitoring that the pulse per second signal of the reference source is in an unlocked state specifically includes: It is impossible to obtain a new round of time difference data and frequency data between the second pulse signal of the reference source and the second pulse signal of the local clock source.

[0008] Further, before monitoring that the pulse per second signal of the reference source is in an unlocked state, the method includes: Taking the pulse-per-second signal of the reference source as a reference, a time-to-digital converter is used to measure the time difference data between the pulse-per-second signal of the reference source and the pulse-per-second signal of the local clock source, which is converted into a frequency control word through a corresponding conversion relationship. Two digital-to-analog converters are used to output voltage adjustment amounts respectively, thereby adjusting the output frequency of the local clock source.

[0009] Further, the frequency control word and the input to the holding algorithm model specifically include: Substituting the frequency control words of the two digital-to-analog converters into formula (1) to obtain the drift f(x, y); and filtering the drift f(x, y) using a Kalman filter.

[0010] Furthermore, the frequency control word and are input into the holding algorithm model to obtain a new round of frequency control words F of the two digital-to-analog converters. w1 (i) and F w0 (i) as follows: when ,but , ; when ,but , ; when ,but , ; Repeat the above calculation to continuously update the new frequency control word F of the two digital-to-analog converters. w1 (i) and Fw0 (i) to adjust the output frequency of the local clock source.

[0011] Furthermore, the filtering process of the drift amount f(x, y) by using a Kalman filter includes: Assume that the system is at time k, and let the control matrix B = 0. According to the system prediction model, the prediction value at time k is: (4) Among them, x(k,k-1) is the predicted value at time k, and x(k-1,k-1) is the optimized estimated value at time k-1; The system covariance is expressed as: (5) Where p(k,k-1) is the covariance of x(k,k-1), p(k-1,k-1) is the covariance of x(k-1,k-1), and A T is the transposed matrix of A, Q is the covariance matrix of the system excitation noise; Combining the predicted value and the observed value, we can get the optimal estimate x(k,k) at time k: (6) (7) (8) Where z(k) is the observation value, H is the observation matrix, Kg is the Kalman gain, and E is the unit matrix; Let the state matrix A = 1, the observation matrix H = 1, and ignore the process noise and observation noise, then the above formula is further optimized to: (9) (10) (11) (12) (13) Among them, Q and R are constants, and are the predicted and observed state covariance matrices, respectively; Thus, the values ​​of Q and R are determined, and given the initial state estimate x(0,0) and the initial covariance p(0,0), the predicted value x(k,k-1) and the optimal estimate x(k,k) of the time difference data are obtained.

[0012] Furthermore, before using the Kalman filter to filter the drift amount f(x, y), the method includes: Before the second pulse signal of the reference source is in the unlocked state, the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source is measured by using a time-to-digital converter; let z(k,k) be the observed value at time k, and obtain the initial state estimate x(0,0) and the initial covariance p(0,0): (39) (40) At the same time, determine the ratio of R to Q and set it to 1000-10000.

[0013] Furthermore, before the second pulse signal of the reference source is in an unlocked state, after measuring the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source by using a time-to-digital converter, the method further includes: The time difference data is preprocessed using the Raida rule and sliding mean filtering.

[0014] Based on the same inventive concept, the second aspect of the present invention provides a local time pulse signal maintenance system under reference loss of lock, the system comprising: The compensation algorithm module is used to establish a maintenance algorithm model for the relationship between the frequency control word and the drift amount of the two digital-to-analog converters; when the second pulse signal of the reference source is detected to be in an unlocked state, the frequency control word F of the two digital-to-analog converters is collected. w1 and F w0 ; The frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i); A frequency control quantity generation module is used to establish a relationship model between the frequency difference and the frequency control word, so as to adjust the output frequency of the second pulse signal of the local clock source; A phase control quantity generation module is used to establish a relationship model between the phase difference and the phase control word, so as to adjust the phase of the second pulse signal of the local clock source; A digital-to-analog converter conversion module is used to convert the frequency control word into a voltage adjustment value, thereby adjusting the output frequency of the local clock source; A frequency divider module, used for dividing the system clock frequency to obtain a corresponding second pulse signal according to the phase control word output by the phase control quantity generation module; The selector module is used to select and control the output of 2-bit effective selection signals.

[0015] Furthermore, the system also includes: The GPS receiver module is used to receive GPS satellite signals through the GPS receiver antenna, decode and process the GPS satellite signals, and output telegram information, 10MHz signals and second pulse signals; A monitoring module, used for monitoring the 10 MHz and pulse-per-second signals output by the GPS receiver module; The local clock source module is used to provide a 10MHz frequency signal to the hardware of the maintenance system; A time interval measurement module, used to measure the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source; The filter module is used to filter the time difference data output by the time interval measurement module, thereby removing wild values ​​of the time difference data and reducing jitter of the time difference data.

[0016] Beneficial effects of the technical solution of the present invention: The method and system for maintaining a local time pulse signal when a reference is lost in an embodiment of the present invention, when the reference signal is lost, a new round of time difference data and frequency data between the second pulse signal of the reference source and the second pulse signal of the local clock source cannot be obtained, the system is in a holding mode, and a Kalman filter method is used to reduce data jitter. By analyzing the frequency drift characteristics of the local clock source, a relationship model between the frequency control word of the dual digital-to-analog converter and the frequency drift amount, and a frequency compensation model are established. By compensating for the output frequency of the local clock source, the frequency drift of the local clock source caused by factors such as temperature and aging is improved, so that the system can still maintain a high frequency output accuracy within a certain period of time. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings.

[0018] Figure 1 It is a flowchart of a method for maintaining a local time pulse signal under reference loss of lock according to an embodiment of the present invention; Figure 2 It is a Kalman filter prediction graph (R=0.001, Q=1) of an embodiment of the present invention; Figure 3 It is a Kalman filter prediction graph (R=1, Q=0.001) of an embodiment of the present invention; Figure 4 It is a Kalman filter prediction graph (R=1, Q=1) of an embodiment of the present invention; Figure 5 is a flow chart of a retention algorithm according to an embodiment of the present invention; Figure 6 It is a structural block diagram of a local time pulse signal maintaining system under reference loss of lock according to an embodiment of the present invention; Figure 7 This is a time difference data diagram before filtering according to an embodiment of the present invention; Figure 8 This is a time difference data diagram after filtering by Laida's law according to an embodiment of the present invention; Fig. 9 This is a time difference data diagram after sliding mean filtering according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0020] Example 1

[0021] like Figure 1 As shown, an embodiment of the present invention provides a method for maintaining a local time pulse signal under reference loss of lock, the method comprising: S101, establishing a maintenance algorithm model for the relationship between the frequency control words and the drift amount of two digital-to-analog converters DAC; S102, when it is detected that the second pulse signal of the reference source is in an unlocked state, the frequency control word F of the current round of the two digital-to-analog converters DAC is collected. w1 and F w0 ; S103, the frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i); The formula of the maintenance algorithm model is as follows: (1) (2) (3) Among them, f(x,y) is the frequency change, also called drift, f0 is a constant; k1 is the coefficient corresponding to the frequency control word of one of the digital-to-analog converters; k0 is the coefficient corresponding to the frequency control word of the other digital-to-analog converter. In addition, the above constants or coefficients can be obtained through testing.

[0022] Specifically, the monitoring that the pulse per second signal of the reference source is in an unlocked state specifically includes: It is impossible to obtain a new round of time difference data and frequency data between the second pulse signal 1PPS of the reference source and the second pulse signal 1PPS of the local clock source.

[0023] Optionally, before monitoring that the pulse per second signal of the reference source is in an unlocked state, the method includes: Taking the second pulse signal of the reference source as the reference, the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source is measured by using a time-to-digital converter TDC, which is converted into a frequency control word through a corresponding conversion relationship, and two digital-to-analog converters are used to output voltage adjustment values ​​respectively, thereby adjusting the output frequency of the local clock source. Figure 5 As shown, the frequency control word F w1 and F w0 The input to the retention algorithm model specifically includes: The frequency control word F of the two digital-to-analog converters is w1 and F w0 Substitute into formula (1) to obtain the drift f(x, y); use a Kalman filter to filter the drift f(x, y).

[0024] Specifically, the frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i) include: when ,but , ; when ,but , ; when ,but , ; Repeat the above calculation to continuously update the new frequency control word F of the two digital-to-analog converters. w1 (i) and F w0 (i) to adjust the output frequency of the local clock source.

[0025] Specifically, the filtering process of the drift amount f(x, y) by using a Kalman filter includes: Assume that the system is at time k, and let the control matrix B = 0. According to the system prediction model, the prediction value at time k is: (4) Among them, x(k,k-1) is the predicted value at time k, and x(k-1,k-1) is the optimized estimated value at time k-1; The system covariance is expressed as: (5) Where p(k,k-1) is the covariance of x(k,k-1), p(k-1,k-1) is the covariance of x(k-1,k-1), and A T is the transposed matrix of A, Q is the covariance matrix of the system excitation noise; Combining the predicted value and the observed value, we can get the optimal estimate x(k,k) at time k: (6) (7) (8) Where z(k) is the observation value, H is the observation matrix, Kg is the Kalman gain, and E is the unit matrix; Let the state matrix A = 1, the observation matrix H = 1, and ignore the process noise and observation noise, then the above formula is further optimized to: (9) (10) (11) (12) (13) Among them, Q and R are constants, and are the predicted and observed state covariance matrices, respectively; Thus, the values ​​of Q and R are determined, and given the initial state estimate x(0,0) and the initial covariance p(0,0), the predicted value x(k,k-1) and the optimal estimate x(k,k) of the time difference data are obtained.

[0026] Among them, the Kalman filter completes the optimal estimation of the system state through two stages: state and prediction. The basic model of the system prediction of the Kalman filter is as follows: Assume that the model of discrete linear system is as shown in equation (14) and equation (15): (14) (15) Among them, X k is the system state matrix at time k; Z k is the observed value of the state matrix at time k; A is the state transfer matrix; B is the control input matrix; H is the state observation matrix, which indicates the linear relationship between the state matrix and the observation matrix; ω k-1 is the process noise, V k is the system noise, both noises are Gaussian white noise; assuming the covariances are Q and R respectively, then: ; The Kalman filter formula is derived through the established discrete linear system model: Assume is the state prediction value, is the optimal estimate, X k is the true value, and the state estimation covariance matrix is ​​u k , the Kalman gain is K: The predicted value of the state can be obtained from formula (14) : (16) From formula (15), we can get the optimal estimated value of the state: : (17) From the above formula, we can see that the Kalman gain K represents the ratio of the model prediction error to the measurement error, so the value range of K is [0,1]; the prediction error is recorded as K err , the measurement error is denoted as M err ; K can be expressed as follows: (18) When K=0, the state of the system is determined by the predicted value, and when K=1, the state of the system is determined by the observed value; and suppose: (19) (20) (twenty one) (twenty two) in, is the error between the true value and the predicted value; e k is the error between the true value and the optimal estimate; is the covariance between the true value and the predicted value; P k is the covariance between the true value and the best estimate; From equation (15) and equation (17), we can get: (twenty three) (twenty four) By performing polynomial operations on the above two equations, we can obtain: (25) From formula (19) and formula (20), we can get: (26) Substituting the above formula into formula (22) yields formula (27), which can be expanded to yield formula (28): (27) (28) The above formula is the formula for the optimal state estimation covariance, and the estimation principle of the Kalman filter is to minimize the covariance of the optimal state estimation, so the objective function can be expressed as: (29) Taking partial derivative of Kalman gain matrix K, we can get: (30) From the above formula, the Kalman gain matrix K under the most estimated condition is: (31) Combining equation (25) and equation (28) we can get the covariance of the optimal state estimate: (32) From formula (19), we can know that: (33) Simplifying the above formula, we can get: (34) From formula (21), we can deduce: (35) (36) The prediction covariance matrix obtained from the above formula is: (37) In order to unify the moment of the formula, the above formula is rewritten as: (38) The above equations (16), (17), (31), (32) and (38) are five important formulas of the basic system prediction model of Kalman filtering.

[0027] Specifically, before using the Kalman filter to filter the drift f(x, y), the method includes: Before the second pulse signal of the reference source is in the unlocked state, the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source is measured by using a time digital converter TDC and input, and z(k,k) is set as the observed value at time k, and the initial state estimate x(0,0) and the initial covariance p(0,0) are obtained: (39) (40) At the same time, determine the ratio of R to Q and set it to 1000-10000.

[0028] Specifically, the process of determining the values ​​of R and Q is as follows: Take three sets of values: R=0.001, Q=1, R=1, Q=0.001, and R=1, Q=1, and observe the impact of different R / Q values ​​on the Kalman filter.

[0029] Depend on Figure 2 It can be seen that when R=0.001 and Q=1, the prediction noise is large, causing the observed value to be submerged. Therefore, at this time, the observed value should be trusted more.

[0030] Depend on Figure 3 It can be seen that when R=1 and Q=0.001, the data filtering effect is significant and the predicted value is smoother. Therefore, the data should be more trustworthy in the predicted value at this time.

[0031] Depend on Figure 4 It can be seen that when R=1 and Q=1, the predicted value is not much different from the observed value.

[0032] Therefore, when using Kalman filtering, the R / Q value is slightly larger. If the R / Q value is too small, the filtering effect will not be achieved; if the R / Q value is too large, the data will lose its original change characteristics. Therefore, usually the ratio of R to Q is set to 1000-10000, which can effectively filter out jitter and make the data smoother.

[0033] Optionally, before the pulse-per-second signal of the reference source is in an unlocked state, after measuring the time difference data between the pulse-per-second signal of the reference source and the pulse-per-second signal of the local clock source by using a time-to-digital converter TDC, the method further includes: The time difference data is preprocessed using the Raida rule and sliding mean filtering.

[0034] (1) Sliding mean filtering method The sliding mean filter takes the average of the sampled values ​​within a period of time and uses the average value as the output value at the current moment. The average value can be calculated by arithmetic mean, weighted mean or exponential mean. The window size of the sliding mean filter determines the length of time for averaging. The larger the window, the smoother the filtered signal, but the slower the response speed to signal changes, and vice versa.

[0035] When programming with FPGA (Field-Programmable Gate Array), the value of N is generally 2 to the power of n. For example, when N=8, the sliding mean filter expression is as follows: (41) (42).

[0036] (2) Raida’s Law The Raida rule is also known as the 3δ de-outlier method. It takes 3 times the mean of a set of data as the standard. When the next value comes, it is compared with the 3 times mean. If it is larger than the 3 times mean, the data is discarded, otherwise it is retained, and then the data mean is recalculated, and the above rules are continued to be used for judgment. The confidence probability given by this criterion is 99.73%, which is suitable for the case where the number of data measurements is greater than 50 times. The formula is expressed as: If , then Xi is a gross error value and should be discarded; if , then Xi is a normal value and should be retained. Where X is the arithmetic mean of the data, Xi is the new data, and δ is the standard deviation.

[0037] Example 2

[0038] like Figure 6 As shown, the embodiment of the present invention further provides a local time pulse signal maintenance system 100 under reference loss of lock, the system 100 comprising: The compensation algorithm module 110 is used to establish a maintenance algorithm model for the relationship between the frequency control word and the drift amount of the two digital-to-analog converters DAC; when the second pulse signal of the reference source is detected to be in an unlocked state, the frequency control word F of the two digital-to-analog converters is collected. w1 and F w0 ; The frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i); The frequency control amount generating module 120 is used to establish a relationship model between the frequency difference and the frequency control word, so as to adjust the output frequency of the second pulse signal of the local clock source; The phase control quantity generating module 130 is used to establish a relationship model between the phase difference and the phase control word, so as to adjust the phase of the second pulse signal of the local clock source; A digital-to-analog converter DAC conversion module 140 is used to convert the frequency control word into a voltage adjustment value, thereby adjusting the output frequency of the local clock source; The frequency divider module 150 is used to divide the system clock frequency to obtain the corresponding second pulse signal according to the phase control word output by the phase control quantity generation module; The selector module 160 is used for selecting and controlling the output of a 2-bit effective selection signal.

[0039] Specifically, the selection signal is composed of "monitoring signal + channel signal", which is provided by the monitoring module 170 and the host computer respectively. When the selection signal is "10", the reference source output channel is turned on; when the selection signal is "11", the reference source and local clock source output channels are both turned on; when the selection signal is "01", the local clock source output channel is turned on; when the selection signal is "00", the reference source and local clock source output channels are both turned off.

[0040] The system further comprises: The GPS receiver module 180 is used to receive GPS satellite signals through the GPS receiver antenna, decode the GPS satellite signals, and then output telegram information, 10MHz signals, 1PPS signals, etc.; usually, the 1PPS signal output by the GPS receiver module contains noise.

[0041] The monitoring module 170 is used to monitor the 10MHz and 1PPS signals output by the GPS receiver module 180. If the GPS signal is locked, the monitoring signal outputs "1", otherwise, the monitoring signal outputs "0".

[0042] The local clock source module 190 is used to provide a 10 MHz frequency signal to the hardware of the maintenance system; The time interval measurement module 1100 is used to measure the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source; The filter module 1110 is used to filter the time difference data output by the time interval measurement module 1100, so as to remove outliers in the time difference data and reduce jitter in the time difference data.

[0043] Specifically, the local clock source module 190 of the system uses an oven controlled crystal oscillator (OCXO), which can minimize the influence of ambient temperature and has better performance than other quartz crystal oscillators. The frequency drift of the crystal oscillator is mainly caused by aging characteristics, and within a certain period of time, there is a linear relationship between the crystal oscillator frequency and the aging characteristics, and the compensation amount of the crystal oscillator frequency is determined by the frequency control word.

[0044] The system uses the GPS 1PPS signal output by the GPS timing receiver chip as a benchmark, uses the time to digital converter TDC (Time to Digital Convertor) module to measure the time difference between GPS 1PPS and local OCXO 1PPS, converts it into a frequency control word through the corresponding conversion relationship, and uses the digital to analog converter DAC (Digital to Analog Convertor) module to output the voltage adjustment value, thereby adjusting the output frequency of the local crystal oscillator.

[0045] In order to improve the accuracy of the time difference data, the Raida rule, sliding mean filter and Kalman filter are used for data processing, mainly to remove data wild values ​​and reduce data jitter; when the reference signal is locked, a frequency modulation and phase modulation hold algorithm model is established. Since the signal output by GPS has long-term stability, but its short-term effect is average, the short-term stability of the crystal oscillator is better, especially the oven controlled crystal oscillator (OCXO), the short-term stability can reach 10 -7 -10 -9 , and considering its low cost, high precision and good stability, the system adopts the combination of "FPGA+host computer", which is mainly divided into FPGA hardware part and host computer program part. The hardware part is mainly responsible for time difference measurement, data processing, taming algorithm and implementation of holding algorithm, while the host computer program part is mainly responsible for telegram analysis and display, data storage and positioning display, etc. When the reference signal is locked, the system is in taming mode, and the local OCXO is tamed with the GPS 1PPS signal to output 1PPS and 10MHz signals with the same frequency and phase as GPS; when the reference signal is lost, the system is in holding mode, and the output frequency of the local OCXO is continued to be tamed by holding the model and compensation algorithm, thereby ensuring the high precision and high stability of the local OCXO output.

[0046] The rising edge of the GPS 1PPS signal is often used as a trigger to generate a local 1PPS signal, thereby controlling the initial time difference between the two to about 1 clock cycle. The higher the local OCXO frequency, the smaller the initial time difference between the two. However, a higher crystal oscillator frequency will increase the circuit burden and power consumption. In addition, when measuring the time difference between the GPS 1PPS signal and the local 1PPS signal, the rising edge of the GPS 1PPS signal is often used as the opening signal, and the rising edge of the local 1PPS signal is used as the closing signal. However, the signal jitter of the GPS 1PPS may be about 5ns-8ns, which will cause the opening signal and the closing signal to be constantly changing, increasing the burden on the time difference measurement module. Therefore, in this embodiment, the system clock of the FPGA is 100MHz after the clock source is multiplied. The rising edge of the GPS 1PPS signal is used as a trigger, and after waiting for 100ms, the local 1PPS signal is regenerated. This not only avoids the above problems, but also facilitates subsequent test observations. If the initial time difference between the reference 1PPS signal and the local 1PPS signal is found to be about 100ms during the test, it proves that the measurement module of the system is working normally. Otherwise, each module needs to be rechecked.

[0047] It can be seen that the accuracy of the time difference data directly affects the accuracy of the maintenance, so it is necessary to pre-process the time difference data. Considering that the data pre-processing is mainly implemented in FPGA, the Raida rule and sliding mean filtering methods are selected.

[0048] The specific implementation is: when the GPS 1PPS signal and the local OCXO 1PPS signal enter the time digital converter TDC measurement module, the time difference data of the two can be obtained after processing, where the time difference data is divided into the time difference data during frequency modulation and the time difference data during phase modulation. For the time difference data during frequency modulation, since the local OCXO 1PPS signal is triggered by the rising edge of the GPS 1PPS signal and generated after waiting for 100ms, the time difference data is an unsigned number, that is, the data is a non-negative number.

[0049] When the time difference data is negative, it means that the count value exceeds the measurement bit width of the time digital converter TDC, and 224 needs to be added to the count value. Thus, the gate threshold is established: the maximum value is 300ms and the minimum value is 0s.

[0050] For the time difference data during phase modulation, because the data is a signed number, that is, it can be positive or negative, but the initial time difference before adjustment is about 100ms, the gate threshold is set: the maximum value is 300ms and the minimum value is -300ms. The gate threshold method can first filter out some gross errors during measurement, and then input the time difference data after gate threshold filtering into the filter module for data preprocessing.

[0051] It should be noted that when using Raida's rule for signed numbers, it is necessary to first take the absolute value of the data, and then calculate the mean and compare.

[0052] like Figure 7 , 8 As shown, the horizontal axis is time (in seconds) and the vertical axis is time difference data (in ps). Figure 7 is the time difference data without Laida's law filtering. Figure 7 It can be seen that there are some outliers in the time difference data, which leads to the mean of the whole set of time difference data being: 1.0011×1011ps and the standard deviation being: 6.4752×109ps. After being filtered by the Raida rule, the time difference data is as follows Figure 8 As shown. Figure 8 It can be seen that the wild values ​​in the data are filtered out, so that the mean of the entire set of time difference data is reduced to: 1.00002427×1011ps, and the standard deviation is: 2.1278×103ps. It can be seen that the Laida rule is effective in removing wild values, but the jitter of the data is still large, which is not conducive to the subsequent taming and maintenance processing. Therefore, the time difference data after Laida rule filtering is further subjected to sliding mean filtering, and the sliding window is generally taken as 2 to the power of n. In this embodiment, the window of the sliding mean filter is selected as 8, and the time difference after sliding filtering is as follows Fig. 9 shown.

[0053] Fig. 9The horizontal axis is time, in seconds, and the vertical axis is the time difference data, in ps. Compared with the data without sliding filtering, the mean of the time difference data after filtering is reduced to: 1.00002425×1011ps, and the standard deviation is reduced to: 1.5856×103ps. It can be seen that after sliding mean filtering, although the mean of the time difference data does not change much, the time difference data is much smoother, which is conducive to the subsequent taming and adjustment.

[0054] The method and system for maintaining a local time pulse signal when a reference is lost in an embodiment of the present invention, when the reference signal is lost, a new round of time difference data and frequency data between the second pulse signal of the reference source and the second pulse signal of the local clock source cannot be obtained, the system is in a holding mode, and a Kalman filter method is used to reduce data jitter. By analyzing the frequency drift characteristics of the local clock source, a relationship model between the frequency control word of the dual digital-to-analog converter and the frequency drift amount, and a frequency compensation model are established. By compensating for the output frequency of the local clock source, the frequency drift of the local clock source caused by factors such as temperature and aging is improved, so that the system can still maintain a high frequency output accuracy within a certain period of time.

[0055] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for maintaining a local time pulse signal under reference loss of lock, characterized in that: The method comprises: Establish a maintenance algorithm model for the relationship between the frequency control words and drift of two digital-to-analog converters; When the second pulse signal of the reference source is detected to be in the unlocked state, the frequency control word F of the current round of the two digital-to-analog converters is collected. w1 and F w0 ; The frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i); The formula of the maintenance algorithm model is as follows: (1) (2) (3) Among them, f(x,y) is the change in frequency, also called drift, f0 is a constant; k1 is the coefficient corresponding to the frequency control word of one of the digital-to-analog converters; k0 is the coefficient corresponding to the frequency control word of the other digital-to-analog converter.

2. The method for maintaining a local time pulse signal under reference loss of lock according to claim 1, characterized in that: The monitoring that the pulse per second signal of the reference source is in an unlocked state specifically includes: It is impossible to obtain a new round of time difference data and frequency data between the second pulse signal of the reference source and the second pulse signal of the local clock source.

3. The method for maintaining a local time pulse signal under reference unlocking according to claim 1, characterized in that: When it is detected that the pulse per second signal of the reference source is in an unlocked state, the method comprises: Taking the pulse-per-second signal of the reference source as a reference, a time-to-digital converter is used to measure the time difference data between the pulse-per-second signal of the reference source and the pulse-per-second signal of the local clock source, which is converted into a frequency control word through a corresponding conversion relationship. Two digital-to-analog converters are used to output voltage adjustment amounts respectively, thereby adjusting the output frequency of the local clock source.

4. The method for maintaining a local time pulse signal under reference loss of lock according to claim 1, characterized in that: The frequency control word F w1 and F w0 The input to the retention algorithm model specifically includes: The frequency control word F of the two digital-to-analog converters is w1 and F w0 Substituting into formula (1), the drift f(x, y) is obtained; the drift f(x, y) is filtered using a Kalman filter.

5. The method for maintaining a local time pulse signal under reference loss of lock according to claim 1, characterized in that: The frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i) as follows: when ,but , ; when ,but , ; when ,but , ; Repeat the above calculation to continuously update the new frequency control word F of the two digital-to-analog converters. w1 (i) and F w0 (i) to adjust the output frequency of the local clock source.

6. The method for maintaining a local time pulse signal under reference loss of lock according to claim 4, characterized in that: The filtering process of the drift amount f(x, y) by using a Kalman filter includes: Assume that the system is at time k, and let the control matrix B = 0. According to the system prediction model, the prediction value at time k is: (4) Among them, x(k,k-1) is the predicted value at time k, and x(k-1,k-1) is the optimized estimated value at time k-1; The system covariance is expressed as: (5) Where p(k,k-1) is the covariance of x(k,k-1), p(k-1,k-1) is the covariance of x(k-1,k-1), and A T is the transposed matrix of A, Q is the covariance matrix of the system excitation noise; Combining the predicted value and the observed value, we can get the optimal estimate x(k,k) at time k: (6) (7) (8) Where z(k) is the observation value, H is the observation matrix, Kg is the Kalman gain, and E is the unit matrix; Let the state matrix A = 1, the observation matrix H = 1, and ignore the process noise and observation noise, then the above formula is further optimized to: (9) (10) (11) (12) (13) Among them, Q and R are constants, and are the predicted and observed state covariance matrices, respectively; Thus, the values ​​of Q and R are determined, and given the initial state estimate x(0,0) and the initial covariance p(0,0), the predicted value x(k,k-1) and the optimal estimate x(k,k) of the time difference data are obtained.

7. The method for maintaining a local time pulse signal under reference loss of lock according to claim 6, characterized in that: Before filtering the drift amount f(x, y) using a Kalman filter, the method includes: Before the second pulse signal of the reference source is in the unlocked state, the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source is measured by using a time-to-digital converter; let z(k,k) be the observed value at time k, and obtain the initial state estimate x(0,0) and the initial covariance p(0,0): (39) (40) At the same time, determine the ratio of R to Q and set it to 1000-10000.

8. The method for maintaining a local time pulse signal under reference loss of lock according to claim 3, characterized in that: Before the second pulse signal of the reference source is in an unlocked state, after using a time-to-digital converter to measure the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source, the method further includes: The time difference data is preprocessed using the Raida rule and sliding mean filtering.

9. A local time pulse signal maintenance system under reference loss of lock, characterized in that: The system comprises: The compensation algorithm module is used to establish a maintenance algorithm model for the relationship between the frequency control word and the drift amount of the two digital-to-analog converters; when the second pulse signal of the reference source is detected to be in an unlocked state, the frequency control word F of the two digital-to-analog converters is collected. w1 and F w0 ; The frequency control word F w1 and F w0 Input into the hold algorithm model to obtain a new frequency control word F for the two digital-to-analog converters. w1 (i) and F w0 (i); A frequency control quantity generation module is used to establish a relationship model between the frequency difference and the frequency control word, so as to adjust the output frequency of the second pulse signal of the local clock source; A phase control quantity generation module is used to establish a relationship model between the phase difference and the phase control word, so as to adjust the phase of the second pulse signal of the local clock source; A digital-to-analog converter conversion module is used to convert the frequency control word into a voltage adjustment value, thereby adjusting the output frequency of the local clock source; A frequency divider module, used for dividing the system clock frequency to obtain a corresponding second pulse signal according to the phase control word output by the phase control quantity generation module; The selector module is used to select and control the output of 2-bit effective selection signals.

10. The local time pulse signal holding system under reference loss of lock according to claim 9, characterized in that: The system further comprises: The GPS receiver module is used to receive GPS satellite signals through the GPS receiver antenna, decode and process the GPS satellite signals, and output telegram information, 10MHz signals and second pulse signals; A monitoring module, used for monitoring the 10 MHz and pulse-per-second signals output by the GPS receiver module; The local clock source module is used to provide a 10MHz frequency signal to the hardware of the maintenance system; A time interval measurement module, used to measure the time difference data between the second pulse signal of the reference source and the second pulse signal of the local clock source; The filter module is used to filter the time difference data output by the time interval measurement module.

Citation Information

Patent Citations

  • Backup clock calibrated by GPS

    CN101799658A

  • Satellite receiver second pulse signal frequency stabilization and phase correction device and method

    CN106209338A

  • Second pulse stable control device based on phase-locked loop and method

    CN106547001A

  • Clock Synchronization in Shared Baseband Deployments

    US20130107998A1

  • Maintaining Repeater Accuracy for Satellite Signal Delivery Systems

    US20200052875A1

Cited By

  • Time signal control system and method based on atomic clock timekeeping and modular hot standby

    CN122093003A