Atomic clock integrity monitoring method based on random sampling consistency and change point detection
By constructing a dynamic threshold and penalty term benchmark based on RANSAC and change point detection, abnormal points and changes in the atomic clock are identified and repaired. This solves the problems of poor anti-interference ability and poor threshold adaptability of the atomic clock during long-term operation, and improves the stability and monitoring accuracy of the atomic clock.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-21
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, atomic clocks are affected by environmental disturbances during long-term operation, resulting in abnormal patterns in their output phase or frequency data. This leads to poor anti-interference ability, poor threshold adaptability, and difficulty in identifying frequency jumps, affecting clock stability and the reliability of performance analysis.
A method based on Random Sample Consistency (RANSAC) and change point detection is adopted. By constructing a temporary trend model, setting a dynamic threshold, and combining the noise median absolute deviation estimate and penalty term benchmark, outliers and change points are identified and repaired. The PELT algorithm is used to determine the location of change points and output the atomic clock integrity monitoring results.
It significantly improves the accuracy and recall of anomaly detection, effectively identifies frequency jumps, enhances the stability and monitoring accuracy of atomic clocks, adapts to dynamic data changes, and reduces the impact of outliers on thresholds.
Smart Images

Figure CN121560129B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of time and frequency measurement and data processing technology, specifically involving a method for monitoring the integrity of atomic clocks based on Random Sample Consensus (RANSAC) and Change Point Detection (CPD). Background Technology
[0002] Atomic clocks are the core components of modern time and frequency reference systems and positioning, navigation, and timing (PNT) systems. The precise timekeeping capability of an atomic clock determines the reliability of the system. However, during long-term operation, atomic clocks are affected by environmental disturbances such as temperature and magnetic field changes, as well as the aging of the equipment itself. This often results in various abnormal patterns in the phase or frequency data output by the atomic clock, primarily including outliers, phase jumps, and frequency jumps. These anomalies significantly compromise the effectiveness of clock error modeling and prediction, affect clock stability assessments, reduce the reliability of performance analysis, and ultimately decrease the stability of the timekeeping system.
[0003] In existing technologies, the preprocessing and anomaly detection of atomic clock data typically employs Ordinary Least Squares (OLS) to establish linear or quadratic models, combined with standard deviation (SD) or median absolute deviation (MAD) for judgment. For example, by fitting the trend term of the entire dataset and calculating the residuals, if the residual deviation exceeds three times the standard deviation (3σ criterion), it is judged as an anomaly.
[0004] However, existing technologies have the following drawbacks:
[0005] 1. Poor anti-interference ability and insufficient robustness: The OLS algorithm is based on the assumption that the error follows a normal distribution and minimizes the sum of squared residuals using all data points. When there are large outliers or non-stationary jumps in the data, outliers will cause the fitted curve to shift significantly, resulting in the residuals of normal points being erroneously amplified or the residuals of outliers being reduced, thus causing missed detections or false detections.
[0006] 2. Poor Threshold Adaptability: Traditional methods typically use fixed thresholds or thresholds based on global statistics. When atomic clock data is non-stationary or exhibits trend changes, fixed thresholds struggle to adapt to dynamic data variations, leading to decreased detection accuracy. Furthermore, threshold calculations based on the residuals after OLS fitting are inaccurate. The mean residual in the standard deviation calculation is affected by outliers, and the median absolute deviation is influenced by data trends. When outliers cause inaccurate OLS fitting, the threshold calculated using the median absolute deviation will also be inaccurate.
[0007] 3. Difficulty in identifying frequency jumps: Conventional methods struggle to effectively distinguish step-like jumps in frequency data. Traditional OLS anomaly detection often misclassifies these jumps as continuous outliers, failing to accurately identify the timing and state changes of the jumps. Existing change point detection algorithms, such as PELT (Pruned Exact Linear Time), rely on the setting of a penalty term. An improperly set penalty term can lead to oversegmentation (detecting too many spurious change points) or undersegmentation (missing genuine change points). Furthermore, fixed parameters are ineffective when atomic clock noise levels vary.
[0008] Therefore, how to provide a high-precision atomic clock integrity monitoring method with strong anti-interference ability, strong threshold adaptability and easy identification of frequency jumps has become an important issue. Summary of the Invention
[0009] To address the aforementioned problems in the existing technology, this invention provides a method for monitoring the integrity of atomic clocks based on random sampling consistency and change point detection.
[0010] The technical problem to be solved by this invention is achieved through the following technical solution:
[0011] In a first aspect, the present invention provides a method for monitoring the integrity of an atomic clock based on random sampling consistency and change point detection, comprising:
[0012] A temporary trend model is constructed using a random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, and a dynamic threshold is set based on the interior point residual statistics corresponding to the temporary trend model.
[0013] The dynamic threshold is used to judge all data points within the current sliding window to identify outliers; and the data values of the outliers are replaced with the predicted values fitted by the temporary trend model.
[0014] The next sliding window is used as the current sliding window, and the process returns to the step of constructing a temporary trend model using the random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, until all sliding windows are traversed, data repair is completed, and the locations of all outliers are output.
[0015] The frequency difference data of the atomic clock is subjected to median filtering, and the median absolute deviation of the noise is estimated based on the filtered frequency difference data.
[0016] A penalty term benchmark is constructed based on the estimated absolute deviation of the noise median and the total number of data points in the current sliding window to generate a penalty value sequence;
[0017] The number of candidate change points is selected using the PELT algorithm based on the penalty value sequence, and the change point positions are determined based on the number of candidate change points.
[0018] The atomic clock integrity monitoring results are output by combining the locations of all anomalies and the locations of the changes.
[0019] Optionally, a temporary trend model is constructed using a random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, including:
[0020] In each iteration, select from the frequency difference data within the current sliding window. A set of candidate samples is constructed from 10 data points to fit the initial provisional trend model;
[0021] Calculate the residuals of all data points outside the candidate sample set within the current sliding window to the initial temporary trend model, and mark data points with residuals less than a preset initial tolerance threshold as inliers;
[0022] After repeating the iteration a preset number of times, the initial temporary trend model with the largest number of inliers or the smallest sum of the absolute values of the inlier residuals is selected as the temporary trend model.
[0023] Optionally, a dynamic threshold is set based on the internal point residual statistics corresponding to the temporary trend model, including:
[0024] Obtain the residual set of all interior points corresponding to the temporary trend model;
[0025] Calculate the standard deviation or MAD based on the residual set;
[0026] Calculate the dynamic threshold based on the standard deviation or the MAD.
[0027] Optionally, the atomic clock integrity monitoring method further includes:
[0028] After the data repair is completed, a predictive RANSAC model is constructed using the repaired frequency difference data, and the predicted RANSAC value at the next time step is inferred.
[0029] Obtain the measured value at the next moment;
[0030] The prediction residual is calculated based on the RANSAC predicted value and the measured value. An alarm is triggered when the residual deviation of the prediction residual is greater than the dynamic threshold, and the measured value is replaced with the RANSAC predicted value.
[0031] Optionally, a penalty term benchmark is constructed based on the estimated absolute deviation of the noise median and the total number of data points within the current sliding window to generate a penalty value sequence, including:
[0032] Convert the absolute deviation estimate of the noise median into a standard deviation estimate;
[0033] The penalty term benchmark is determined based on the aforementioned standard deviation estimate;
[0034] A penalty value sequence is generated using the penalty term benchmark and the set multiplier factor sequence.
[0035] Optionally, determining the location of the variable point based on the number of candidate variable points includes:
[0036] The position of the variable point is determined based on the number of candidate variable points using either the PELT algorithm or the bottom-up algorithm.
[0037] Optionally, the temporary trend model is a linear model or a quadratic polynomial model.
[0038] Secondly, the present invention provides an atomic clock integrity monitoring device based on random sampling consistency and change point detection, comprising:
[0039] The module is used to construct a temporary trend model for the frequency difference data of the atomic clock within the current sliding window using a random sampling consensus algorithm, and to set a dynamic threshold based on the internal point residual statistics corresponding to the temporary trend model.
[0040] The judgment module is used to judge all data points in the current sliding window using the dynamic threshold, identify outliers, and replace the data values of the outliers with the predicted values fitted by the temporary trend model.
[0041] The traversal module is used to take the next sliding window as the current sliding window and return to execute the step of constructing a temporary trend model using the random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, until all sliding windows are traversed, data repair is completed and the positions of all outliers are output;
[0042] The filtering module is used to perform median filtering on the frequency difference data of the atomic clock, and to calculate the median absolute deviation of noise based on the filtered frequency difference data.
[0043] The generation module is used to construct a penalty term benchmark based on the estimated absolute deviation of the noise median and the total number of data points in the current sliding window to generate a penalty value sequence;
[0044] The selection module is used to select the number of candidate change points based on the penalty value sequence using the PELT algorithm, and to determine the change point position based on the number of candidate change points.
[0045] The output module is used to combine the locations of all abnormal points and the locations of the variable points to output the atomic clock integrity monitoring results.
[0046] Thirdly, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0047] Memory, used to store computer programs;
[0048] When a processor executes a computer program stored in memory, it implements the steps described in any of the above-mentioned atomic clock integrity monitoring methods based on random sampling consistency and change point detection.
[0049] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps described in any of the above-mentioned atomic clock integrity monitoring methods based on random sampling consistency and change point detection.
[0050] This invention provides an atomic clock integrity monitoring method based on random sample consensus and change point detection. It combines the strong robustness of a temporary trend model to short-term instabilities such as outliers and phase jumps with the high sensitivity of a change point detection algorithm to structural instabilities such as frequency jumps, and offers broad anomaly coverage. Employing the random sample consensus algorithm, it can effectively extract the true atomic clock operating trend from data containing significant noise and anomalies, unaffected by outlier interference.
[0051] Setting a dynamic threshold based on the in-point residual statistics corresponding to the temporary trend model avoids outlier contamination of the threshold, making the threshold more consistent with the noise level of normal data, and significantly improving the accuracy and recall of anomaly detection.
[0052] By constructing a penalty term benchmark based on the estimated absolute deviation of the noise median and the total number of data points in the current sliding window to generate a penalty value sequence, the optimal number of candidate variable points can be automatically determined without the need for manual specification of the number of jumps, thus solving the uncertainty problem of the Bayesian information criterion under complex noise.
[0053] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description
[0054] Figure 1 This is a flowchart illustrating an atomic clock integrity monitoring method based on random sampling consistency and change point detection provided in an embodiment of the present invention.
[0055] Figure 2 This is a schematic diagram of the process for detecting abnormal point locations provided in an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the process for detecting change point positions provided in an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram comparing the fitting results of OLS and RANSAC.
[0058] Figure 5 This is a schematic diagram of the stability analysis results of the data after detection and repair;
[0059] Figure 6 This is a schematic diagram of the penalty value variable point estimation curve;
[0060] Figure 7 This is a schematic diagram of the results of the change point detection algorithm.
[0061] Figure 8 This is a schematic diagram of the structure of an atomic clock integrity monitoring device based on random sampling consistency and change point detection provided in an embodiment of the present invention;
[0062] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0063] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.
[0064] To address the problems of poor anti-interference capability, poor threshold adaptability, and difficulty in identifying frequency jumps in existing atomic clock integrity monitoring methods, this invention provides an atomic clock integrity monitoring method based on random sampling consistency and change point detection. (See [link to relevant documentation]). Figure 1 , Figure 1 This is a flowchart illustrating an atomic clock integrity monitoring method based on random sampling consistency and change point detection provided by an embodiment of the present invention, specifically including the following steps:
[0065] Step S101: For the frequency difference data of the atomic clock within the current sliding window, a temporary trend model is constructed using a random sampling consensus algorithm, and a dynamic threshold is set based on the internal point residual statistics corresponding to the temporary trend model.
[0066] See Figure 2 , Figure 2This is a schematic flowchart of anomaly location detection provided in an embodiment of the present invention. In this embodiment, the frequency difference data of the atomic clock is first acquired and a sliding window is set. If the initially acquired phase difference data is... Converted to frequency difference data via first-order difference The calculation method is as follows:
[0067] ;
[0068] in, Indicates the sampling interval.
[0069] Then, within the current sliding window, a temporary trend model is constructed using the Random Sample Consensus (RANSAC) algorithm, where the temporary trend model is either a linear model or a quadratic polynomial model.
[0070] In this embodiment of the invention, a temporary trend model is constructed using a random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, including:
[0071] In each iteration, select from the frequency difference data within the current sliding window. A set of candidate samples is constructed from 10 data points to fit the initial provisional trend model;
[0072] Calculate the residuals of all data points outside the candidate sample set within the current sliding window to the initial temporary trend model, and mark data points with residuals less than the preset initial tolerance threshold as inliers;
[0073] After repeating the iteration a preset number of times, the initial temporary trend model with the largest number of inliers or the smallest sum of the absolute values of the inlier residuals is selected as the temporary trend model.
[0074] In this embodiment of the invention, the size of the sliding window can be set to... Then, within the current sliding window, randomly select from the frequency difference data. Using a set of data points as a candidate sample to fit the initial temporary trend model, the size of the candidate sample set can be set to [value missing]. ;
[0075] In this embodiment of the invention, the initial temporary trend model can be a linear model or a polynomial model. When the fitted temporary trend model is a linear model... When the fitted temporary trend model is a linear model, .
[0076] The linear model is:
[0077] ;
[0078] in, Represents the observed value; This represents the intercept, indicating the baseline state at the start time. The slope represents the average rate of change of a physical quantity over time, and is commonly used in atomic clock data to represent frequency deviation. Indicates time;
[0079] The quadratic polynomial model is:
[0080] ;
[0081] in, The coefficient of the quadratic term is used to characterize the curvature change of the trend, which in physics often corresponds to the linear drift of frequency, i.e., the aging rate.
[0082] Then, interior point determination is performed, and the residuals from all data points outside the candidate sample set within the current sliding window to the initial temporary trend model are calculated. ,in Indicates the first One data point;
[0083] Will Data points are marked as interior points. This indicates the preset initial tolerance threshold. To distinguish between inliers and outliers, the threshold can be set according to the data volume or combined with the data characteristics. A multiple of the data MAD can be selected as the preset initial tolerance threshold to ensure that most real inliers are correctly identified.
[0084] Repeat the above steps for a preset number of iterations, and also use the probability formula. Verify the sufficiency of the iterations to ensure confidence probability. The probability of sampling an anomaly-free subset, where This refers to the prior probability that a single data point is an interior point.
[0085] If the preset number of iterations has not been reached, return to the current sliding window and randomly select from the frequency difference data. The step of selecting one data point as the candidate sample set continues.
[0086] When the preset number of iterations is reached, the initial temporary trend model with the largest number of inliers or the smallest sum of the absolute values of the inlier residuals is selected as the temporary trend model.
[0087] In this embodiment of the invention, setting a dynamic threshold based on the internal point residual statistics corresponding to the temporary trend model includes:
[0088] Obtain the residual set of all interior points corresponding to the temporary trend model;
[0089] Calculate the standard deviation or MAD based on the residual set;
[0090] Calculate the dynamic threshold based on standard deviation or MAD.
[0091] In this embodiment of the invention, the residual set of all interior points corresponding to the temporary trend model is obtained. Then, the standard deviation is calculated based on the residual set. Or MAD, as detailed below:
[0092] First, calculate the mean based on the residual set, and then calculate the standard deviation by the deviation of each inlier from the mean; or first, calculate the median based on the residual set, then calculate the absolute deviation of each inlier from the median, and finally calculate the median of these absolute deviations to obtain the MAD.
[0093] In this embodiment of the invention, a dynamic threshold is calculated based on the standard deviation. include:
[0094] ;
[0095] Or calculate dynamic thresholds based on MAD ,include:
[0096] ;
[0097] in, This represents the threshold coefficient.
[0098] Step S102: Use dynamic thresholds to judge all data points in the current sliding window to identify outliers; and replace the data values of outliers with the predicted values fitted by the temporary trend model.
[0099] In this embodiment of the invention, the residual corresponding to each data point is determined by traversing the current sliding window. If there exists a residual... The residuals corresponding to each data point satisfy:
[0100] ;
[0101] If the data point is not an outlier, it is considered an outlier or exhibits a phase jump; otherwise, it is retained as a normal data point. For residual bias, This represents the mean or median calculated based on the residual set.
[0102] Then the predicted values fitted using the aforementioned temporary trend model are used. Replace the data values of the marked outliers to complete the data repair within the current sliding window.
[0103] Step S103: Take the next sliding window as the current sliding window, and return to execute the step of constructing a temporary trend model using the random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, until all sliding windows are traversed, data repair is completed, and the positions of all outliers are output.
[0104] In this embodiment of the invention, the next sliding window is used as the current sliding window, and the new current sliding window is used as input. The process of building a temporary trend model based on the random sampling consensus algorithm is then returned. This loop continues until the entire time series has been traversed, i.e., all sliding windows have been processed. Finally, the repair of all frequency difference data is completed, and the location information of all outliers is output.
[0105] In one implementation, the atomic clock integrity monitoring method also includes:
[0106] After the data repair is completed, a predictive RANSAC model is constructed using the repaired frequency difference data, and the predicted RANSAC value at the next time step is inferred.
[0107] Obtain the measured value at the next moment;
[0108] The prediction residual is calculated based on the RANSAC predicted value and the measured value. An alarm is triggered when the residual deviation of the prediction residual is greater than the dynamic threshold, and the measured value is replaced by the RANSAC predicted value.
[0109] In this embodiment of the invention, the current time is selected. The first historical sliding window data, such as the past 48 hours, is used to perform the aforementioned RANSAC modeling, anomaly detection and repair process to obtain the purified historical data, i.e. the repaired frequency difference data.
[0110] Then, based on the repaired frequency difference data, a RANSAC trend model is constructed. The RANSAC trend model supports linear or quadratic polynomial fitting. For details, please refer to the construction of the temporary trend model in step S101 above to obtain the trend parameters.
[0111] Then, the RANSAC trend model is used to extrapolate and predict the next time step. RANSAC predicted values ;
[0112] Get the next moment The measured value;
[0113] Calculate the prediction residuals based on RANSAC predicted values and measured values. :
[0114] ;
[0115] like If the measured value is not found, an alarm will be triggered, and the measured value will be replaced with the RANSAC predicted value to correct the data. To predict the residual bias of the residuals; The median of the in-point residuals is calculated when constructing a RANSAC trend model for historical frequency difference data.
[0116] This method leverages RANSAC's robust fitting to historical data, avoiding the raising of prediction thresholds by historical outliers, thus enabling it to sensitively capture newly occurring small jumps.
[0117] Step S104: Perform median filtering on the frequency difference data of the atomic clock, and calculate the estimated value of the noise median absolute deviation based on the filtered frequency difference data.
[0118] See Figure 3 , Figure 3 This is a flowchart illustrating the change point position detection process provided in an embodiment of the present invention. In this embodiment, a median filter with a kernel size of 15 can be used to filter the acquired atomic clock frequency difference data to remove residual high-frequency noise. The atomic clock frequency difference data can refer to the initially acquired atomic clock frequency difference data or the frequency difference data repaired in step S103. The filtering formula is:
[0119] ;
[0120] in, Indicates the first One filtered data point; This represents the steps involved in calculating the median, specifically the process of processing the input window sequence of raw data. After sorting from smallest to largest, the value in the middle position is selected as the output. In this formula, the window length is 15 (an odd number), so the 8th value after sorting is selected as the median result of the window.
[0121] By performing median filtering on each data point in the frequency difference data, the filtered frequency difference data is obtained. Then, the robustness estimate of the background noise is calculated using the filtered frequency difference data.
[0122] Calculate the absolute deviation of the noise median based on the filtered frequency difference data. .
[0123] Step S105: Construct a penalty term benchmark based on the estimated absolute deviation of the noise median and the total number of data points in the current sliding window to generate a penalty value sequence.
[0124] In this embodiment of the invention, a penalty term benchmark is constructed based on the estimated absolute deviation of the noise median and the total number of data points within the current sliding window to generate a penalty value sequence, including:
[0125] Convert the absolute deviation estimate of the noise median to a standard deviation estimate;
[0126] The penalty term benchmark is determined based on the standard deviation estimate;
[0127] A penalty value sequence is generated by using the penalty term benchmark and a set multiplier factor sequence.
[0128] First, the absolute deviation estimate of the noise median is converted into a standard deviation estimate. :
[0129] ;
[0130] Determining the penalty benchmark based on the standard deviation estimate :
[0131] ;
[0132] in, The length of the frequency difference data.
[0133] Define a multiple factor sequence ,like This is equal to an arithmetic sequence from 0.5 to 20, and then a penalty value sequence is generated using the penalty term benchmark and a set multiple factor sequence:
[0134] ;
[0135] in, This represents a sequence of penalty values.
[0136] Step S106: Select the number of candidate change points based on the penalty value sequence using the PELT algorithm, and determine the change point positions based on the number of candidate change points.
[0137] In this embodiment of the invention, the process of selecting the number of candidate variable points based on the penalty value sequence using the PELT algorithm is as follows:
[0138] for Each penalty value in Using the filtered frequency difference data as input, the PELT algorithm from the ruptures library (a Python library focused on offline change point detection) is called, with the cost function set to the L1 norm cost function, to perform a complete change point detection calculation. Here, a change point refers to the data point corresponding to the frequency jump.
[0139] The core of the PELT algorithm is dynamic programming, and its goal is to find a set of variable points such that the segment cost, i.e., the sum of L1 errors in all data segments, equals the penalty term. The sum of the penalties multiplied by the number of variables is minimized. For each given penalty value... The algorithm will output a list of indices of the detected change points. Each element in the list Identify a change point in the filtered frequency difference data The corresponding position index in the middle. For example, This indicates a step change occurred after the 150th data point. Record the number of change points detected in this operation. This process... Each penalty value is executed once to obtain the correspondence between the penalty value sequence and the number of variable points, providing a basis for subsequent frequency statistical analysis.
[0140] Count the number of variables obtained under all penalty values. Select the variable with the highest frequency, i.e., the mode, as the optimal number of variables most likely to exist in the data, i.e., the candidate variable number. For example, if the number of detected variable points remains stable at 3 under a wide range of penalty values, then it is determined that... If there are multiple variable points with the same frequency, the one whose corresponding penalty value is closest to the baseline penalty term is selected as the final penalty. .
[0141] In this embodiment of the invention, there are two ways to determine the position of the variable point based on the number of candidate variable points: one is to use the PELT algorithm, and the other is to use the BottomUp algorithm.
[0142] The PELT algorithm is used to determine the location of change points based on the number of candidate change points, including:
[0143] Select the optimal penalty value from the penalty values corresponding to the number of candidate variables. Typically, the number of variable points to be selected is the same as the number of variable points to be selected. Of the corresponding penalty values, the one closest to the baseline penalty term is taken as the optimal penalty value. The PELT algorithm is then run again, this time with the cost function set to the L1 norm cost function, and settings are... The algorithm will output the precise location of the change point, corresponding to the MJD (Simplified Julian Day) time.
[0144] The BottomUp algorithm is used to determine the location of the variable point based on the number of candidate variable points, including:
[0145] Set the target variable number of points as The BottomUp algorithm is run, and the specific process is as follows:
[0146] First of all Divided into a series of short initial segments , This indicates the initial number of segments. Then, the number of adjacent segments is calculated. Merger costs:
[0147] ;
[0148] in, Represents the cost function. Indicates the index of the initial segment.
[0149] The smaller the value, the less the increase in overall fitting cost from merging these two segments. The algorithm iteratively finds the adjacent segment pairs with the lowest current merging cost, merges them into a new segment, and recalculates the merging cost of the new segment with its left and right neighboring segments. This process is repeated until the entire sequence is merged. Section, the time interval between sections The dividing points are recorded as the detected change points.
[0150] Step S107: Combine all abnormal point locations and variable point locations to output the atomic clock integrity monitoring results.
[0151] In this embodiment of the invention, all anomaly points and variable points can be merged to generate a complete monitoring report. The monitoring report may include a list of abnormal events, such as outliers, phase jump points or frequency jump points, and frequency difference data after repair. Then, technicians can perform follow-up processing on the anomalies and variable points based on the monitoring report, thereby realizing the atomic clock integrity monitoring.
[0152] In this embodiment of the invention, a temporary trend model is combined with strong robustness to short-term instability, such as outliers and phase jumps, and a change point detection algorithm with high sensitivity to structural instability, such as frequency jumps, and broad anomaly coverage. The random sample consensus algorithm is employed to effectively extract the true atomic clock operating trend from data containing a large amount of noise and anomalies, unaffected by outlier interference.
[0153] Setting a dynamic threshold based on the in-point residual statistics corresponding to the temporary trend model avoids outlier contamination of the threshold, making the threshold more consistent with the noise level of normal data, and significantly improving the accuracy and recall of anomaly detection.
[0154] The penalty term benchmark is constructed based on the estimated absolute deviation of the noise median and the total number of data points in the current sliding window to generate a penalty value sequence. The optimal number of candidate variable points can be determined automatically without the need to manually specify the number of jumps, thus solving the uncertainty problem of the BIC (Bayesian Information) criterion under complex noise.
[0155] The simulation experiment of an atomic clock integrity monitoring method based on random sampling consistency and change point detection provided by the embodiments of the present invention is as follows:
[0156] See Figure 4 , Figure 4 This is a schematic diagram comparing the fitting results of OLS and RANSAC. The experiment compared the fitting effects of OLS and RANSAC using 179 hours of atomic clock frequency difference simulation data. OLS and RANSAC were used to fit the data respectively, and the slope estimated by OLS was... The slope estimated by RANSAC is A clear difference can be observed: the OLS-fitted curve is significantly affected by outliers, causing it to deviate, while the RANSAC-fitted curve better reflects the trend of normal data. The RMSE (Root Mean Square Error) of RANSAC, calculated using normal data, is [value missing]. Superior to OLS .
[0157] See Figure 5 , Figure 5 This is a schematic diagram illustrating the stability analysis results of the data after detection and repair. Figure 5 (a) in the figure is a schematic diagram comparing the Allen deviation curves of the detected and repaired data. Figure 5 (b) in the figure shows the overlap Hadamard deviation curve of the detected and repaired data. Figure 5 This paper presents the stability analysis results of a hydrogen atomic clock with anomalies, after detection and repair using the RANSAC and OLS methods. Allan variance is the most commonly used time-domain indicator for measuring frequency stability. Overlapping Hadamard variance is insensitive to linear frequency drift and is used for frequency stability analysis in the presence of divergent noise or frequency drift. After detection and repair using the RANSAC method, the stability estimated by both types of variances is significantly better than that of OLS, achieving high daily and five-day stability relative to UTC (NTSC). Magnitude.
[0158] See Figure 6 , Figure 6 This is a schematic diagram of the penalty value variable point estimation curve, illustrating the aforementioned penalty value-variable point estimation steps. It shows the results of using the penalty term-variable point estimation method to determine the optimal penalty term and optimal variable point number on frequency difference data (including frequency jumps) of a hydrogen clock H1. The optimal penalty value estimated from this data is... The optimal number of variable points is 21. These two optimal estimates will be assigned to the PELT and BottomUp methods respectively in the final detection and localization of variable points.
[0159] See Figure 7 , Figure 7This is a schematic diagram of the change point detection algorithm's running results. It shows the change point position results obtained by the PELT and BottomUp algorithms after running the hydrogen clock H1 frequency difference data in the final detection and positioning steps of the aforementioned change point.
[0160] The simulation experiments further illustrate that the atomic clock integrity monitoring method based on random sampling consistency and change point detection provided in this invention combines the strong robustness of RANSAC to short-term instability (outliers, phase jumps) with the high sensitivity of the change point detection algorithm to structural instability (frequency jumps), and has a wide anomaly coverage. Utilizing the random sampling mechanism of the RANSAC algorithm, it supports linear and quadratic polynomial fitting, effectively extracting the true atomic clock operating trend from data containing a large amount of noise and anomalies, unaffected by outliers. Even in the outlier data range, the residual deviation of normal data remains closely distributed. Near the baseline, the fitting accuracy and drift rate estimation based on normal data are accurate and robust. The RANSAC method utilizes interior point statistics to generate dynamic thresholds, avoiding outlier contamination and making the thresholds more consistent with the noise level of normal data, significantly improving the precision and recall of anomaly detection. The change point detection part automatically determines the optimal number of change points through "penalty term scanning," eliminating the need for manual specification of the number of jumps and solving the uncertainty problem of the BIC criterion under complex noise. The repaired atomic clock data significantly outperforms the traditional OLS method in stability metrics such as Allan variance and Hadamard variance. The detection results are highly stable to changes in parameter settings, facilitating engineering implementation. It is suitable for both post-processing batch processing and real-time online monitoring, with single-window processing time in the millisecond range, and can effectively handle various complex anomaly modes such as outliers and phase jumps, improving the long-term stability of the atomic clock timekeeping system.
[0161] Based on the same inventive concept, this invention also provides an atomic clock integrity monitoring device based on random sampling consistency and change point detection, see [link to relevant documentation]. Figure 8 , Figure 8 This is a schematic diagram of the structure of an atomic clock integrity monitoring device based on random sampling consistency and change point detection provided in an embodiment of the present invention, comprising:
[0162] Module 801 is used to construct a temporary trend model for the frequency difference data of the atomic clock within the current sliding window using a random sampling consensus algorithm, and to set a dynamic threshold based on the internal point residual statistics corresponding to the temporary trend model.
[0163] The judgment module 802 is used to judge all data points in the current sliding window using a dynamic threshold, identify outliers, and replace the data values of outliers with the predicted values fitted by the temporary trend model.
[0164] Traversal module 803 is used to take the next sliding window as the current sliding window and return to execute the steps of building a temporary trend model using the random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, until all sliding windows are traversed, data repair is completed and the positions of all outliers are output;
[0165] The filtering module 804 is used to perform median filtering on the frequency difference data of the atomic clock and calculate the noise median absolute deviation estimate based on the filtered frequency difference data.
[0166] The generation module 805 is used to construct a penalty term benchmark based on the noise median absolute deviation estimate and the total number of data points in the current sliding window to generate a penalty value sequence.
[0167] Selection module 806 is used to select the number of candidate variable points based on the penalty value sequence using the PELT algorithm, and to determine the position of the variable points based on the number of candidate variable points;
[0168] Output module 807 is used to combine the locations of all abnormal points and variable points to output the atomic clock integrity monitoring results.
[0169] In this embodiment of the invention, a temporary trend model is combined with strong robustness to short-term instability, such as outliers and phase jumps, and a change point detection algorithm with high sensitivity to structural instability, such as frequency jumps, and broad anomaly coverage. The random sample consensus algorithm is employed to effectively extract the true atomic clock operating trend from data containing a large amount of noise and anomalies, unaffected by outlier interference.
[0170] Setting a dynamic threshold based on the in-point residual statistics corresponding to the temporary trend model avoids outlier contamination of the threshold, making the threshold more consistent with the noise level of normal data, and significantly improving the accuracy and recall of anomaly detection.
[0171] Optionally, module 801 constructs a temporary trend model using a random sampling consensus algorithm for the frequency difference data of the atomic clock within the current sliding window, including:
[0172] In each iteration, select from the frequency difference data within the current sliding window. A set of candidate samples is constructed from 10 data points to fit the initial provisional trend model;
[0173] Calculate the residuals of all data points outside the candidate sample set within the current sliding window to the initial temporary trend model, and mark data points with residuals less than the preset initial tolerance threshold as inliers;
[0174] After repeating the iteration a preset number of times, the initial temporary trend model with the largest number of inliers or the smallest sum of the absolute values of the inlier residuals is selected as the temporary trend model.
[0175] Optionally, module 801 sets a dynamic threshold based on the internal residual statistics corresponding to the temporary trend model, including:
[0176] Obtain the residual set of all interior points corresponding to the temporary trend model;
[0177] Calculate the standard deviation or MAD based on the residual set;
[0178] Calculate the dynamic threshold based on standard deviation or MAD.
[0179] Optionally, the atomic clock integrity monitoring device may also include a prediction module;
[0180] The prediction module is used to construct a predictive RANSAC model using the repaired frequency difference data after data repair is completed, and to infer the RANSAC prediction value at the next time step; to obtain the measured value at the next time step; to calculate the prediction residual based on the RANSAC prediction value and the measured value; to issue an alarm when the residual deviation of the prediction residual is greater than the dynamic threshold; and to replace the measured value with the RANSAC prediction value.
[0181] Optionally, the generation module 805 is specifically used to convert the noise median absolute deviation estimate into a standard deviation estimate; determine the penalty term benchmark based on the standard deviation estimate; and generate a penalty value sequence through the penalty term benchmark and a set multiple factor sequence.
[0182] Optionally, module 806 determines the variable point location based on the number of candidate variable points, including:
[0183] The PELT or BottomUp algorithm is used to determine the location of the variable point based on the number of candidate variable points.
[0184] Optionally, the temporary trend model can be a linear model or a quadratic polynomial model.
[0185] This invention also provides an electronic device, such as... Figure 9 As shown, it includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0186] Memory 903 is used to store computer programs;
[0187] When the processor 901 executes the program stored in the memory 903, it implements the method steps of any of the above-mentioned atomic clock integrity monitoring methods based on random sampling consistency and change point detection.
[0188] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0189] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0190] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0191] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0192] The present invention also provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the method steps of any of the above-described methods for monitoring the integrity of atomic clocks based on random sampling consistency and change point detection.
[0193] Optionally, the computer-readable storage medium may be non-volatile memory (NVM), such as at least one disk storage device.
[0194] Optionally, the aforementioned computer-readable storage medium may also be at least one storage device located remotely from the aforementioned processor.
[0195] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the steps of any of the atomic clock integrity monitoring methods based on random sampling consistency and change point detection described above.
[0196] It should be noted that the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention.
[0197] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0198] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings and the disclosure in carrying out the claimed invention. In the description of the invention, the word "comprising" does not exclude other components or steps, "a" or "an" does not exclude a plurality, and "a plurality" means two or more, unless otherwise explicitly specified. Furthermore, while different embodiments may describe certain measures, this does not mean that these measures cannot be combined to produce good results.
[0199] The method provided in this invention can be applied to electronic devices. Specifically, the electronic device can be a desktop computer, a portable computer, a smart mobile terminal, a server, etc. No limitation is made herein; any electronic device that can implement this invention falls within the protection scope of this invention.
[0200] For the embodiments of the device / electronic device / storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments.
[0201] It should be noted that the device, electronic device, and storage medium in the embodiments of the present invention are respectively devices, electronic devices, and storage media that apply the above-mentioned atomic clock integrity monitoring method based on random sampling consistency and change point detection. Therefore, all embodiments of the above-mentioned atomic clock integrity monitoring method based on random sampling consistency and change point detection are applicable to the device, electronic device, and storage medium, and can achieve the same or similar beneficial effects.
[0202] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for atomic clock integrity monitoring based on random sampling consensus and change point detection, characterized in that, The method comprises the following steps: a random sample consensus (RANSAC) algorithm is used to construct a temporary trend model for frequency difference data of an atomic clock in a current sliding window, and a dynamic threshold is set based on an inner point residual quantity corresponding to the temporary trend model; all data points in the current sliding window are judged using the dynamic threshold to determine abnormal points; a predicted value fitted by the temporary trend model is used to replace data values of the abnormal points; a next sliding window is taken as the current sliding window, and the step of constructing the temporary trend model for the frequency difference data of the atomic clock in the current sliding window is executed until all sliding windows are traversed, data repair is completed, and all abnormal point positions are output; median filtering is performed on the frequency difference data of the atomic clock, and a noise median absolute deviation estimation value is calculated based on the filtered frequency difference data; a penalty item benchmark is constructed based on the noise median absolute deviation estimation value and a total number of data points in the current sliding window to generate a penalty value sequence; a pruning precise linear time (PELT) algorithm is used to select candidate change points based on the penalty value sequence, and a change point position is determined based on the candidate change points; atomic clock integrity monitoring results are output in combination with all abnormal point positions and the change point position; the random sample consensus algorithm is used to construct the temporary trend model for the frequency difference data of the atomic clock in the current sliding window, and comprises the following steps: In each iteration, select from the frequency difference data within the current sliding window. A set of candidate samples is constructed from 10 data points to fit the initial provisional trend model; residuals of all data points except the candidate sample set in the current sliding window to the initial temporary trend model are calculated, and data points with residuals less than a preset initial tolerance threshold are marked as inner points; after repeated iterations for a preset number of times, the initial temporary trend model with the largest number of inner points or the smallest sum of absolute values of inner point residuals is taken as the temporary trend model; the noise median absolute deviation estimation value is converted into a standard deviation estimation value; a penalty item benchmark is determined based on the standard deviation estimation value; a penalty value sequence is generated through the penalty item benchmark and a set multiplier factor sequence. the dynamic threshold is set based on the inner point residual quantity corresponding to the temporary trend model, and comprises the following steps:
2. The atomic clock integrity monitoring method of claim 1, wherein, a residual set of all inner points corresponding to the temporary trend model is obtained; a standard deviation or a median absolute deviation (MAD) is calculated based on the residual set; a dynamic threshold is calculated based on the standard deviation or the median absolute deviation (MAD). The atomic clock integrity monitoring method further comprises the following steps:
3. The atomic clock integrity monitoring method of claim 1, wherein, after data repair is completed, a random sample consensus (RANSAC) prediction model is constructed using the repaired frequency difference data, and a random sample consensus (RANSAC) predicted value at a next time is predicted; a measured value at the next time is obtained; a prediction residual is calculated based on the random sample consensus (RANSAC) predicted value and the measured value, an alarm is given when a residual deviation of the prediction residual is greater than the dynamic threshold, and the random sample consensus (RANSAC) predicted value is used to replace the measured value. the change point position is determined based on the candidate change points, and comprises the following steps:
4. The atomic clock health monitoring method of claim 1, wherein, The pruning precise linear time PELT or bottom-up algorithm is used to determine the variable point position based on the number of candidate variable points.
5. The atomic clock health monitoring method of claim 1, wherein, The temporary trend model is a linear model or a quadratic polynomial model.
6. An atomic clock integrity monitoring device based on random sampling consensus and change point detection, characterized in that, The method comprises the following steps: The construction module is configured to construct a temporary trend model for the frequency difference data of the atomic clock in the current sliding window by using a random sample consensus (RANSAC) algorithm, and set a dynamic threshold based on an inlier residual statistical quantity of the temporary trend model. The judgment module is configured to determine abnormal points by judging all data points in the current sliding window by using the dynamic threshold. The prediction value fitted by the temporary trend model is used to replace the data value of the abnormal point. The traversal module is configured to set a next sliding window as the current sliding window, and return to execute the step of constructing the temporary trend model for the frequency difference data of the atomic clock in the current sliding window by using the RANSAC algorithm until all sliding windows are traversed, data repair is completed, and all abnormal point positions are output. The filtering module is configured to perform median filtering on the frequency difference data of the atomic clock, and calculate a noise median absolute deviation estimation value based on the filtered frequency difference data. The generation module is configured to construct a penalty term reference based on the noise median absolute deviation estimation value and the total number of data points in the current sliding window to generate a penalty value sequence. The selection module is configured to select a number of candidate variable points by using a pruning precise linear time (PELT) algorithm based on the penalty value sequence, and determine a variable point position based on the number of candidate variable points. The output module is configured to output an atomic clock integrity monitoring result in combination with all abnormal point positions and the variable point position. The construction module is configured to construct a temporary trend model for the frequency difference data of the atomic clock in the current sliding window by using a random sample consensus (RANSAC) algorithm, and set a dynamic threshold based on an inlier residual statistical quantity of the temporary trend model. In each iteration, select from the frequency difference data within the current sliding window. A set of candidate samples is constructed from 10 data points to fit the initial provisional trend model; The judgment module is configured to determine abnormal points by judging all data points in the current sliding window by using the dynamic threshold. The prediction value fitted by the temporary trend model is used to replace the data value of the abnormal point. The traversal module is configured to set a next sliding window as the current sliding window, and return to execute the step of constructing the temporary trend model for the frequency difference data of the atomic clock in the current sliding window by using the RANSAC algorithm until all sliding windows are traversed, data repair is completed, and all abnormal point positions are output.
7. An electronic device, comprising: The filtering module is configured to perform median filtering on the frequency difference data of the atomic clock, and calculate a noise median absolute deviation estimation value based on the filtered frequency difference data. The generation module is configured to construct a penalty term reference based on the noise median absolute deviation estimation value and the total number of data points in the current sliding window to generate a penalty value sequence. The processor, the communication interface, and the memory are in communication with each other through the communication bus.
8. A computer-readable storage medium, characterized in that, The memory is configured to store a computer program. The processor is configured to execute the computer program stored in the memory to implement the atomic clock integrity monitoring method based on the random sample consensus and variable point detection. The computer program stored in the computer readable storage medium is executed by the processor to implement the atomic clock integrity monitoring method based on the random sample consensus and variable point detection.