Abstract:Atomic clocks are core components of satellite navigation and precision timekeeping systems. However, their signal quality is often compromised by anomalies. To address the limited adaptability of the traditional ordinary least squares (OLS) method to complex anomaly patterns in integrity monitoring, this paper proposes an interference-resistant modeling and anomaly repair method based on the random sample consensus (RANSAC) algorithm. This method utilizes RANSAC to construct highly robust phase or frequency prediction models from noisy data. By combining an inlier optimization strategy with a dynamic threshold mechanism based on median absolute deviation (MAD), it achieves precise detection and repair of anomalies. Validation experiments were conducted using real data from hydrogen masers and cesium atomic clocks, employing datasets containing outliers, phase jumps, and compound anomalies. The proposed method was compared with traditional methods, the robust Kalman filter (RKF), and M-estimation methods. Results demonstrate that the proposed method exhibits superior performance across various anomaly scenarios. In the comparison of robust algorithms, the RANSAC method achieved an F1-score of 0.953 8 in hydrogen clock tests, outperforming M-estimation (0.924 7) and the RKF with optimal parameters (0.817 7). Although its F1-score was slightly lower than that of the RKF with optimal parameters in cesium clock tests, the performance of the RKF degraded significantly under non-ideal conditions with parameter mismatch. Convergence analysis indicates that with appropriate minimum subset sizes and iteration counts, the fitting results achieve significant convergence, with the standard deviation of the fitting slope approaching zero. Furthermore, the processing latency for a single sliding window is in the millisecond range. Under a 1 Hz sampling rate, the computational load is less than 1%, meeting the requirements for real-time integrity monitoring. Experimental results validate the adaptability and robustness of the RANSAC algorithm in the absence of precise prior noise information, providing reliable technical support for autonomous integrity monitoring in precision time-frequency systems.