In-situ detection and calibration method and device for timing terminal equipment based on standard time

By calculating the time difference between the local clock and the standard time and adjusting the 1PPS phase, combined with level conditioning and decoding technology, the shortcomings of metrology and verification institutions in calibrating time and frequency terminal equipment have been solved, achieving high-precision time calibration and signal quality improvement.

CN120949533APending Publication Date: 2025-11-14NAT TIME SERVICE CENT CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511321087.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-11-14

Smart Images

  • Figure CN120949533A_ABST
    Figure CN120949533A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of time synchronization capability calibration of timing terminal products and equipment, in particular to a timing terminal equipment in-situ detection calibration method and device based on standard time, and the method comprises the steps: calculating a local clock time difference through clock data in a satellite signal and clock data of a standard time system; and continuously monitoring the time difference in the set time period, if the time difference is not less than or equal to the error threshold value, adjusting the 1PPS phase of the local clock source until reaching the standard, and then entering a calibration mode. In the mode, acquiring a timing pulse signal, a frequency signal, an NTP / PTP signal and a B code signal of terminal equipment to be measured, and respectively carrying out level conditioning on the timing pulse signal, the frequency signal, the NTP / PTP signal and the B code signal; decoding the B code to recover the 1PPS pulse signal, and performing high-precision time difference measurement; and meanwhile, the NTP / PTP signal is calibrated by adopting a set calibration method until the time precision of the local clock is reached, so that the problems of field measurement and calibration of the time frequency terminal equipment are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of time synchronization capability calibration technology for timing terminal products and equipment, and specifically to an in-situ testing and calibration method and apparatus for timing terminal equipment based on standard time. Background Technology

[0002] my country has constructed its time synchronization system primarily based on satellite navigation and secondarily on land-based systems. The development of BeiDou time synchronization technology has driven the widespread application of timing terminal products in defense technology (such as weaponry and aerospace telemetry and control) and the national economy (such as communications, power, and finance). However, some metrology and verification institutions lack standard time systems, making it impossible to conduct metrological calibration of time and frequency terminals. Furthermore, a large number of time and frequency terminal devices located in suburban and remote areas are difficult to use without calibration due to limitations, and cannot be sent to institutions for calibration.

[0003] Currently, metrological verification institutions have significant shortcomings. Some institutions lack a standard time system and therefore do not have the capability to calibrate time and frequency terminals. Furthermore, existing on-site or delivery-for-calibration methods cannot cover time and frequency terminal equipment located in special areas or subject to limitations, making it difficult to meet actual calibration needs and highlighting the necessity of remote metrological calibration. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide an in-situ detection and calibration method and apparatus for timing terminal equipment based on standard time, which addresses the shortcomings in the on-site measurement and calibration of time and frequency terminal equipment.

[0005] The objective of this invention is achieved through the following technical solutions: In a first aspect, the present invention provides an in-situ testing and calibration method for a timing terminal device based on a standard time, comprising: The clock difference between the local clock and the standard time is determined by using clock data from satellite signals and clock data from the standard time system. The system continuously monitors whether the time difference reaches the error threshold within a set time period. When the time difference within the set time period is less than or equal to the error threshold, it enters the calibration mode; otherwise, it adjusts the phase of the local clock source by 1PPS until the time difference is less than or equal to the error threshold. In the calibration mode, the timing pulse signal, frequency signal, NTP / PTP signal, and B code signal of the terminal device to be measured are acquired and level-conditioned respectively; the B code signal is decoded to recover the 1PPS pulse signal for time measurement; the timing pulse signal, frequency signal, and NTP / PTP signal are used as the signals to be measured, and the corresponding calibration methods are used to calibrate the time of the signals to be measured until the time accuracy of the local clock is achieved.

[0006] As a further improvement of the present invention, clock difference calculation is performed on the local clock using clock data in satellite signals and clock data from the standard time system to determine the time difference between the local clock and the standard time, including: The observation data of observable satellites is received by a multi-system full-frequency antenna. The observation data is then fitted with a least-squares second-order nonlinear fit according to a set observation period. The midpoint value of the fitted straight line is used as the clock difference data of the observation period. The clock difference data is the difference between the local clock and the clock signal in the satellite observation data. Based on the clock difference data, observation data that are from the same time period, track the same satellite, and have the same frequency point are selected as standard clock data in the standard time system. The time difference is obtained by comparing the clock difference data with the standard clock data.

[0007] As a further improvement of the present invention, adjusting the phase of the local clock source by 1PPS includes: The time difference is used as a phase adjustment input to the local clock source; The total frequency deviation is obtained based on the time difference and the temperature change of the local clock source; By linearly fitting the total frequency deviation using a clock bias model, the frequency deviation of the next cycle can be predicted. If the difference between the frequency deviation and the actual time difference in the next cycle exceeds a set threshold, then the prediction is re-performed using the clock difference model; otherwise, the relationship between the difference and the second stability of the local clock source is determined. When the difference is less than or equal to the second stability of the local clock source, the phase adjustment amount is maintained; when the difference exceeds the second stability, the time difference is updated.

[0008] As a further improvement of the present invention, the total frequency deviation is obtained based on the time difference and the temperature change of the local clock source, including: The average frequency deviation of the local clock source is calculated based on the frequency deviation formula and the time difference. Based on the temperature of the local clock source, the temperature change of the local clock source is obtained; based on the temperature change, the frequency control value of the local clock source is calculated; after calculating the frequency control value, white noise is eliminated by Kalman filtering algorithm to obtain the second frequency deviation. The sum of the average frequency deviation and the second frequency deviation is taken as the total frequency deviation.

[0009] As a further improvement of the present invention, the frequency deviation formula is as follows:

[0010] The frequency control quantity is:

[0011] In the formula, The frequency of the local clock source, The standard frequency of the standard time system, For the first The time difference between the local clock and standard time. The time interval between two observations. Let be the time difference between the local clock and standard time at time i. For frequency control, For adjustment coefficients, Let i be the temperature change of the local clock source for the i-th time. This represents the total temperature deviation.

[0012] As a further improvement to the present invention, the clock error model is as follows:

[0013] In the formula, This represents the total frequency deviation. Standard time data for a standard time system. Time data from a local clock source. , , These are time parameters.

[0014] As a further improvement of the present invention, the NTP / PTP signal is used as the signal to be measured, and the minimum time divergence analysis method is used to perform time calibration on the signal to be measured, including: The NTP / PTP signal test clock obtains the MAC address of the terminal device under test by sending an Address Resolution Protocol Request message; After obtaining the MAC address of the device under test, the NTP / PTP signal test clock sends a notification unicast request message to the terminal device under test. When the terminal device receives the notification unicast request message during the test, it sends a notification unicast response message to the NTP / PTP test clock. The NTP / PTP test clock sends a synchronization unicast request message to the terminal device to be tested. After receiving the synchronization unicast request message, the terminal device to be tested receives the synchronization message interval setting parameter of the NTP / PTP test clock and sends a synchronization unicast response message to the NTP / PTP test clock. The timestamp information is extracted from the protocol request message, the announcement unicast request message, the announcement unicast response message, and the synchronization unicast response message, respectively. The calibration error is calculated based on the sum of the timestamp information, and the calibration error is corrected by the minimum time divergence analysis method to complete the time calibration.

[0015] Secondly, the present invention provides an in-situ testing and calibration device for a timing terminal device based on standard time, which is connected to the timing terminal device under test and used in the above-mentioned in-situ testing and calibration method for a timing terminal device based on standard time; the device includes a main control module, and a standard time recovery module, a time base signal generation and holding module, a signal conditioning and monitoring module, and a time and frequency signal measurement module connected to the main control module; The standard time recovery module is communicatively connected to the standard time system and to the satellite via an external antenna; it is used to receive clock data from satellite signals and clock data from the standard time system, and after performing common-view processing with the local clock source, obtain the time difference, and send the time difference to the main control module. The time base signal generation and holding module includes a local clock source for providing a local clock; The signal conditioning and monitoring module is used to acquire the timing pulse signal, frequency signal, NTP / PTP signal and B code signal of the terminal device to be measured according to the control command, and send the timing pulse signal, frequency signal, NTP / PTP signal and B code signal of the timing terminal device to the time frequency signal measurement module; The time-frequency signal measurement module is used to perform time calibration on the signals to be measured until the time accuracy of the local clock is achieved. The main control module is used to write the time difference of the standard time recovery module into the local clock source and adjust the phase of the local clock source by 1PPS; it is also used to send control commands to the signal conditioning and monitoring module after calibration mode.

[0016] As a further improvement of the present invention, the main control module is also used to perform the following steps: The time difference is used as a phase adjustment input to the local clock source; The total frequency deviation is obtained based on the time difference and the temperature change of the local clock source; By linearly fitting the total frequency deviation using a clock bias model, the frequency deviation of the next cycle can be predicted. If the difference between the frequency deviation and the actual time difference in the next cycle exceeds a set threshold, then the prediction is re-performed using the clock difference model; otherwise, the relationship between the difference and the second stability of the local clock source is determined. When the difference is less than or equal to the second stability of the local clock source, the phase adjustment amount is maintained; when the difference exceeds the second stability, the time difference is updated.

[0017] As a further improvement of the present invention, it also includes a display and control module connected to the main control module, the display and control module being used to display the time-calibrated data.

[0018] The beneficial effects of this invention are as follows: This invention provides an in-situ detection and calibration method for timing terminal equipment based on standard time. From the perspective of local clock reference calibration, this invention calculates the clock difference by comparing satellite signals with clock data from the standard time system and determines the time difference between the local clock and the standard time, providing an accurate basis for subsequent calibration. By continuously monitoring the time difference and adjusting the 1PPS phase of the local clock source until the time difference meets the error threshold within a set time period, the deviation between the local clock and the standard time can be effectively controlled within a reasonable range. This lays a stable and reliable time reference for the calibration of the terminal under test and avoids insufficient terminal calibration accuracy due to excessive deviation of the local clock itself. In the processing of the terminal signal under test, level conditioning is performed on the NTP / PTP signal and the B-code signal respectively, which can reduce noise, distortion and other interference introduced during signal transmission, improve signal quality, and ensure the accuracy of subsequent decoding and calibration processing. Decoding the B-code signal to recover the 1PPS pulse signal can convert the encoded time signal into a reference pulse that can be directly used for calibration, providing a basis for unified calibration of multiple types of signals under test. The time deviation between the signal under test and the local clock is accurately corrected to ensure that the time accuracy of the terminal device under test after calibration is consistent with the local clock, realizing high-precision calibration of multiple types of timing signals. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a structural block diagram of an embodiment of the present invention.

[0021] Figure 2 This is the status display and monitoring interface of the present invention.

[0022] Figure 3 This is the test result display interface of the present invention. Detailed Implementation

[0023] To make the objectives and technical solutions of this invention clearer and easier to understand, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0024] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. The described embodiments are only some embodiments of the present invention, and not all embodiments.

[0025] Example 1 This embodiment provides an in-situ detection and calibration method for timing terminal equipment based on standard time.

[0026] The calibration method includes: calculating the clock difference of the local clock using clock data from satellite signals and clock data from the standard time system to determine the time difference between the local clock and the standard time; continuously monitoring whether the time difference reaches the error threshold within a set time period; entering calibration mode when the time difference within the set time period is less than or equal to the error threshold; otherwise, adjusting the 1PPS phase of the local clock source until the time difference is less than or equal to the error threshold; after entering calibration mode, acquiring the timing pulse signal, frequency signal, NTP / PTP signal, and B code signal of the terminal device to be measured, and performing level conditioning on each; decoding the B code signal to recover the 1PPS pulse signal for time measurement; using the timing pulse signal, frequency signal, and NTP / PTP signal as the signals to be measured, and applying corresponding calibration methods to calibrate the time of the signals to be measured until the time accuracy of the local clock is achieved.

[0027] This embodiment first calculates the clock difference of the local clock using clock data from satellite signals and clock data from the standard time system, determining the time difference between the local clock and the standard time. Then, it continuously monitors whether this time difference reaches an error threshold within a set time period. If the time difference is less than or equal to the error threshold within the set time period, it enters calibration mode; otherwise, it adjusts the 1PPS phase of the local clock source until the time difference meets the threshold requirement within that time period. After entering calibration mode, it acquires the timing pulse signal, frequency signal, NTP / PTP signal, and B-code signal of the terminal device to be measured and performs level conditioning on each. The B-code signal is decoded to recover the 1PPS pulse signal. Finally, the timing pulse signal, frequency signal, and NTP / PTP signal are used as the signals to be measured, and corresponding calibration methods are used to calibrate the time of the signals to be measured until the time accuracy of the local clock is achieved. By first calculating the clock difference, monitoring the time difference, and adjusting the 1PPS phase of the local clock, it ensures that the local clock meets the error requirements of the calibration prerequisite. Then, through signal conditioning, B-code decoding, and minimum time divergence analysis calibration, it achieves accurate time matching between the terminal device signal to be measured and the local clock, effectively ensuring the accuracy and stability of time calibration.

[0028] It is worth noting that the time difference in this embodiment is preprocessed data, and the preprocessing process includes removing outlier data using the 3σ elimination method.

[0029] It should be noted that in this embodiment, 1PPS refers to one pulse signal per second, which is the core carrier of high-precision time synchronization. NTP (Network Time Protocol) is a layered time synchronization protocol based on UDP (port 123), achieving global device time synchronization with millisecond-level accuracy through a client-server model. PTP (Precision Time Protocol) is defined as a high-precision synchronization protocol for local area networks based on a master-slave architecture, achieving sub-microsecond (nanosecond to microsecond) synchronization through hardware timestamps and path delay measurements. B-code refers to the time synchronization standard code.

[0030] Furthermore, this embodiment provides an explanation of how to calculate the clock difference between the local clock and standard time by using clock data from satellite signals and clock data from the standard time system. First, observation data from observable satellites is received via a multi-system full-frequency antenna. This observation data is then fitted with a least-squares second-order nonlinear system according to a set observation period. The midpoint of the fitted line is used as the clock difference data, reflecting the difference between the local clock and the clock signal in the satellite observation data. Based on this clock difference data, observation data from the same time period, tracking the same satellite, and using the same frequency signal in the standard time system is selected as the standard clock data. Finally, the clock difference data is compared with the standard clock data to determine the time difference between the local clock and standard time. In this embodiment, multi-system full-frequency reception ensures comprehensive coverage of the observation data, least-squares second-order nonlinear fitting improves the calculation accuracy of the clock difference data, and the selection of standard clock data with matching conditions ensures the consistency of the comparison benchmark, ultimately effectively improving the accuracy and reliability of determining the time difference between the local clock and standard time.

[0031] Furthermore, in this embodiment, the time difference is input as a phase adjustment quantity to the local clock source. The total frequency deviation is then obtained based on this time difference and the temperature change of the local clock source. A clock bias model is used to linearly fit the total frequency deviation to predict the frequency deviation for the next cycle. When the difference between the predicted frequency deviation and the actual time difference for the next cycle exceeds a set threshold, the clock bias model is used to re-predict. If the threshold is not exceeded, the relationship between this difference and the second stability of the local clock source is determined. When the difference is less than or equal to the second stability, the phase adjustment quantity is maintained; when the difference exceeds the second stability, the time difference is updated. Therefore, this embodiment provides a basis for clock source adjustment by using the time difference as a phase adjustment quantity. The calculation of the total frequency deviation by combining temperature change takes into account the impact of temperature on the clock. The linear fitting prediction by the clock bias model enables early prediction of frequency deviation. Based on the relationship between the difference, threshold, and second stability, re-predicting or adjusting the phase adjustment quantity and updating the time difference can dynamically optimize the operating state of the local clock source, effectively improving the stability and accuracy of the local clock.

[0032] The total frequency deviation is obtained based on the time difference and the temperature change of the local clock source, including: calculating the average frequency deviation of the local clock source according to the frequency deviation formula and the time difference; obtaining the temperature change of the local clock source according to the temperature of the local clock source; calculating the frequency control quantity of the local clock source according to the temperature change; eliminating white noise through the Kalman filter algorithm after calculating the frequency control quantity to obtain the second frequency deviation; and using the sum of the average frequency deviation and the second frequency deviation as the total frequency deviation.

[0033] Furthermore, the frequency deviation formula is:

[0034] The frequency control quantity is:

[0035] In the formula, The frequency of the local clock source, The standard frequency of the standard time system, For the first The time difference between the local clock and standard time. The time interval between two observations. Let be the time difference between the local clock and standard time at time i. For frequency control, For adjustment coefficients, Let i be the temperature change of the local clock source for the i-th time. This represents the total temperature deviation.

[0036] In addition, the clock bias model in this embodiment is:

[0037] In the formula, This represents the total frequency deviation. Standard time data for a standard time system. Time data from a local clock source. , , These are time parameters.

[0038] Furthermore, when using the minimum time divergence analysis method to calibrate the NTP / PTP signal as the signal under test, the NTP / PTP signal test clock first sends an Address Resolution Protocol (ARP) request message to obtain the MAC address of the terminal device under test. After obtaining the MAC address, the NTP / PTP signal test clock sends an Advertisement Unicast Request message to the terminal device under test, and the terminal device under test returns an Advertisement Unicast Response message after receiving it. The NTP / PTP signal test clock then sends a Synchronization Unicast Request message, and the terminal device under test receives it, obtains the synchronization message interval setting parameter, and returns a Synchronization Unicast Response message. Finally, the protocol request message and the Advertisement Request message are extracted. The timestamp information in unicast request messages, announcement unicast response messages, and synchronous unicast response messages is used to calculate the calibration error based on the sum of these timestamps. Then, the minimum time divergence analysis method is used to correct the calibration error, thereby completing the time calibration. In this embodiment, the MAC address is obtained through the Address Resolution Protocol request message to ensure the accuracy of communication between devices. The interaction between announcement unicast and synchronous unicast messages enables effective information exchange and parameter configuration between the test clock and the terminal device under test. The calculation of the calibration error based on the sum of timestamp information of multiple types of messages ensures the comprehensiveness of the error sources. Combined with the minimum time divergence analysis method to correct the error, the accuracy of time calibration is effectively improved.

[0039] Example 2 This embodiment provides an in-situ detection and calibration device for timing terminal equipment based on standard time, such as... Figure 1 As shown, it includes a standard time recovery module, a time base signal generation and holding module, a signal conditioning and monitoring module, a time and frequency signal measurement module, a main control module, and a display and control module.

[0040] The standard time recovery module, using the 10MHz and 1PPS signals output by the time base signal generation and holding module as references, receives GNSS satellite signals through an external antenna and performs common-view processing on the received ephemeris and time difference data. According to the specified information format, the standard time recovery module splices and packages the time difference data, standard time information, and station information, and exchanges and transmits data with the standard time system through the 4G mobile communication network according to the system's agreed communication rate and data exchange frequency. After common-view comparison, it obtains the standard time information and the clock difference between the local system and the standard time system, and sends the standard time information and clock difference to the main control module. The standard time recovery module supports BeiDou B1I, B1C, B2I, B2a, B2b, and B3I frequency bands, and GPS L1C / A, L2C, L2P, L3, and L5 frequency points, supports 555 tracking channels, a maximum data update rate of 100Hz, and a maximum data transmission rate of 460800bps.

[0041] The time base signal generation and holding module consists of a local clock source and a temperature sensing unit. The local clock source is a ruthenium clock that receives frequency and phase modulation commands from the main control module, generating an adjustable local 10MHz signal and a 1PPS signal to provide reference frequency and synchronization signals for other modules. The temperature sensing unit collects temperature data around the local ruthenium clock and sends it to the main control module. The time base signal generation and holding module has discipline and hold functions, and its strategy is to improve the accuracy and long-term stability of the local clock source while ensuring that short-term stability remains unchanged.

[0042] The signal conditioning and monitoring module consists of three circuits: level detection, signal amplification, and filtering. The level detection circuit detects the input signal, performs impedance matching, and sorts the signal. The signal amplification section uses a low-noise, low-temperature-drift broadband amplifier. It utilizes negative feedback to stabilize the operating point of the amplifier circuit, reduce nonlinear distortion, suppress circuit noise, and ensure that the amplifier output still has power back-off from the 1dB compression point even with the maximum input signal. The filtering circuit selects in-band phase parameters that are relatively insensitive to the filter's discreteness, increasing the phase margin.

[0043] The time-frequency signal measurement module consists of three parts: high-precision time difference measurement, phase difference measurement, and network measurement. The time-frequency signal measurement module uses the 10MHz signal output from the time base signal generation and holding module as the frequency reference, the 1PPS signal as the synchronization reference, and the standard time information sent by the main control module as the time reference. It employs dual-delay interpolation technology to achieve high-precision time difference measurement of pulse signals with a measurement resolution of 10ps. It uses digital down-conversion technology to achieve high-precision phase difference measurement of the 10MHz signal, with an additional frequency stability of 1E-13 per second. Finally, it uses network precision measurement technology to measure NTP / PTP signals with a measurement resolution of 8ns.

[0044] The main control module is connected to the standard time recovery module, the time base signal generation and holding module, the signal conditioning and monitoring module, the time and frequency signal measurement module, and the display and control module. It sorts and processes query, configuration, and status information from other modules, sends control commands, and completes corresponding calculations. The main control module receives standard time information and the time difference with the standard time system from the standard time recovery module, converting the time difference into the average frequency deviation of the local reference clock relative to the standard time system over a certain period. It receives local clock source ambient temperature data from the time base signal generation and holding module, calculates the local clock source temperature drift based on the temperature value, calculates the compensation amount based on the temperature drift, and compensates for the local clock source temperature drift. It receives measurement results from the time and frequency signal measurement module and sends them to the display and control module. It receives test and control commands from the display and control module, sends information format, communication rate, and data exchange frequency control commands to the standard time recovery module, sends measurement signal selection commands to the signal conditioning and monitoring module, and sends measurement control commands to the time and frequency signal measurement module.

[0045] It should be noted that temperature drift refers to the drift of physical dimensions (such as thermal expansion and contraction) or electronic parameters (such as resistance, current amplification factor, and sensor sensitivity) caused by temperature changes.

[0046] The display and control module consists of two parts: control and display, integrating control and signal input / output. The control part uses an industrial control computer module with a Win7 operating system for data collection, processing, calculation, storage, and control command issuance; the display part uses a 12.1-inch touch-screen industrial LCD module for displaying device status, data and calculation results, and interactive operation.

[0047] The specific implementation process of the device in this embodiment is as follows: Place the calibration device in this embodiment next to the time and frequency terminal equipment that needs to be calibrated, connect the multi-system full-frequency antenna to the antenna input port of the device, connect the test signal of the device to be calibrated to the corresponding test port, and power on the device.

[0048] After power-on, the device enters a preheating mode. It receives data from all currently observable satellites via a multi-system full-frequency antenna, retaining only those meeting the requirements based on set thresholds. This is done according to the observation cycle. t (1, 5, or 10 minutes can be selected) Perform least-squares second-order nonlinear fitting on the observation data, and use the midpoint value of the fitted line as the clock difference data for this observation period.

[0049] The device of this invention transmits clock difference data to the standard time transfer terminal of the standard time system via a network. The standard time transfer terminal selects observation data from the same time period, tracking the same satellite, and using the same frequency, and performs integrity checks on the clock difference data format. The clock difference data that passes the integrity check is compared with the clock difference of the commonly visible satellite of the standard time transfer terminal in the standard time system. Abnormal data is then removed using the 3σ elimination method to obtain the time difference between the device and the standard time system. Δt i A positive time difference result indicates that the local second signal leads the standard second signal; a negative time difference result indicates that the local second signal lags behind the standard second signal. Time Difference Δt i The standard time transmission terminal of the standard time system sends the data to the device of this invention via the network, and then forwards it to the main control module within the device.

[0050] Upon initial startup, the device's local clock source is in an initialization state, and the main control module directly transmits the received time difference between the device and the standard time system. Δt i This phase adjustment is written to the local clock source, adjusting the phase of the local clock source output by 1 PPS. If the observation period... t Take 1 minute and adjust for 20 consecutive observation cycles; if the observation cyclet Take 5 minutes and adjust for 4 consecutive observation periods; if the observation period t Take a 10-minute interval and adjust for two consecutive observation periods. At this point, the main control module determines the time difference. Δt i If the time difference is greater than 50ns, continue adjusting the phase of the local clock source output by 1PPS until the time difference is reached. Δ t i Initialization is completed in less than 50ns. After initialization, the main control module receives more than three sets of system time differences. Δt i At that time, calculate the total frequency deviation. .

[0051] The main control module according to the formula time difference Δt i Converted to the average frequency deviation of the local reference clock relative to the standard time system over time τ. ,in It is the standard frequency of the standard time system.

[0052] The temperature sensing unit in the time base signal generation and holding module monitors the temperature of the local clock source in real time to obtain the change in the ambient temperature of the local clock source. This information is then sent to the main control module. The main control module will then process the temperature deviation. r i Frequency control quantity converted to local frequency P The relationship between the two can be expressed as Adjustment coefficient This is an empirical value, related to the type of local frequency; in this device, the adjustment coefficient is taken as 0.5. To maintain the short-term stability of the local clock source, the frequency control quantity is calculated. P White noise is then eliminated using a Kalman filter algorithm, resulting in an output frequency deviation. .

[0053] Then, based on the clock difference model For total frequency deviation Perform linear fitting to obtain parameters , and The system calculates the value of the time difference between the device and the standard time system and predicts the frequency deviation for the next cycle. If the difference between the predicted value and the system time difference for the next cycle exceeds a threshold, the system recalculates and makes a prediction; if the difference does not exceed the threshold, and is less than or equal to the second stability of the local clock source, the previous adjustment is kept unchanged; if the difference exceeds the second stability of the local clock source, it is converted into a frequency adjustment command and sent to the time base signal generation and holding module. This process is repeated once per observation cycle until the measured time difference between the device and the standard time system is determined. Δt i Less than 5ns. When five consecutive time differences are less than 5ns, the device exits the warm-up mode and enters the calibration mode, allowing measurement and calibration of the signals output by the time and frequency user terminal equipment.

[0054] After entering calibration mode, the main control module sends control commands to the signal conditioning and monitoring module based on the measurement instructions sent by the display and control module. The signal conditioning and monitoring module performs level conditioning on the input frequency signal, pulse signal, NTP / PTP signal, and B-code signal, and decodes the B-code signal to recover the 1PPS pulse signal. Then, the frequency signal, pulse signal, and NTP / PTP signal are sent as the signals to be measured to the time-frequency signal measurement module. In the time-frequency signal measurement module: High-precision time difference measurement is achieved using a 32-bit cyclic counter and an 8-bit delay chain counter. First, the local 10MHz clock signal is multiplied to a 400MHz reference frequency signal. The 32-bit cyclic counter continuously counts the 400MHz signal, achieving a measurement resolution of 2.5ns and a period of 2.5ns × 2^32 = 10.73741824 seconds. The delay chain counter measures the remaining time of the 32-bit cyclic counter from 0 to 2.5ns. The delay chain counter is implemented using an internal delay chain interpolation method within the FPGA, with a total of 256 stages. Each delay chain stage has a nominal delay of 9.8ps, and with wiring errors, a measurement resolution of 10ps can be achieved. During measurement, multiple measurements are taken, and the arithmetic mean is used as a reference correction value for normal measurements. A positive time difference result indicates that the local second signal leads the measured signal; a negative time difference result indicates that the local second signal lags the measured signal.

[0055] High-precision phase difference measurement employs direct digital frequency synthesis (DDS) technology, converting one analog reference signal into two mutually orthogonal sinusoidal local oscillator (LO) signals: a sine LO signal and a cosine LO signal. The measured frequency signal is then split and mixed with the sine and cosine LO signals respectively. The mixed signals are then subjected to half-band decimation and low-pass filtering to obtain Q(n) and I(n). Using Q(n) as the reference signal, a coordinate rotation digital algorithm is employed to calculate the phase difference. I(n) is selected as the reference signal, and the phase difference is calculated using a coordinate rotation digital algorithm. , and The difference is the phase difference between the reference signal and the measured signal. .right The data is extracted 10 times sequentially according to a 1ms bandwidth to obtain the phase difference data required for 10ms, 100ms and 1s bandwidths. Then, the stability result of the frequency signal is calculated and output using Allan variance.

[0056] NTP / PTP signal measurement uses the standard time information sent by the main control module as a time reference, and acquires four timestamps locally for calculation and analysis, realizing event message timestamp capture and synchronous second signal recovery output. Taking PTP testing as an example, the time-frequency signal measurement module generates a PTP test clock with a base frequency of 125MHz based on a 10MHz reference frequency signal, and the test timestamp accuracy is 8ns. 1) The PTP test clock obtains the MAC address of the device under test by sending an Address Resolution Protocol Request message (containing the first timestamp t1); 2) After obtaining the MAC address of the device under test, the PTP test clock sends a notification unicast request message (containing the second timestamp t2) to the device under test; 3) After receiving the notification unicast request message, the device under test sends a notification unicast response message (including the third timestamp t3) to the PTP test clock. 4) The PTP test clock sends a synchronization unicast request message to the device under test. After receiving the synchronization unicast request message, the device under test receives the synchronization message interval setting and other parameters of the PTP test clock, and then sends a synchronization unicast response message (including the fourth timestamp t4) to the PTP test clock. 5) Extract the timestamp information from the above four messages and calculate the calibration error. The calibration error is corrected using the minimum time divergence analysis method and output as the test result.

[0057] The display and control module receives measurement data sent by the main control module and saves it in a data file. Simultaneously, the module displays the data in real-time as curves, calculates the average, standard deviation, maximum, minimum, frequency, frequency accuracy, and ADEV (Allan variance) of the test data, and provides functions for saving screenshots, generating and saving test reports, and outputting PDF format. Users can set the measurement parameters of the test object through the display and control module, including the test start time, end time, sampling duration, sampling frequency, and confidence interval values, such as... Figure 2 , Figure 3 The image shows the display interface of the display and control module and the corresponding test results.

[0058] The above description represents preferred embodiments of the present invention; any parts not described in detail are common knowledge to those skilled in the art.

Claims

1. A method for in-situ testing and calibration of a timing terminal device based on standard time, characterized in that, include: The clock difference between the local clock and the standard time is determined by using clock data from satellite signals and clock data from the standard time system. The system continuously monitors whether the time difference reaches the error threshold within a set time period. When the time difference within the set time period is less than or equal to the error threshold, it enters the calibration mode; otherwise, it adjusts the phase of the local clock source by 1PPS until the time difference is less than or equal to the error threshold. In the calibration mode, the timing pulse signal, frequency signal, NTP / PTP signal, and B code signal of the terminal device to be measured are acquired and level-conditioned respectively; the B code signal is decoded to recover the 1PPS pulse signal for time measurement; the timing pulse signal, frequency signal, and NTP / PTP signal are used as the signals to be measured, and the corresponding calibration methods are used to calibrate the time of the signals to be measured until the time accuracy of the local clock is achieved.

2. The in-situ detection and calibration method for timing terminal equipment based on standard time according to claim 1, characterized in that, The clock difference between the local clock and the standard time is calculated using clock data from satellite signals and clock data from the standard time system. This includes: The observation data of observable satellites is received by a multi-system full-frequency antenna. The observation data is then fitted with a least-squares second-order nonlinear fit according to a set observation period. The midpoint value of the fitted straight line is used as the clock difference data of the observation period. The clock difference data is the difference between the local clock and the clock signal in the satellite observation data. Based on the clock difference data, observation data that are from the same time period, track the same satellite, and have the same frequency point are selected as standard clock data in the standard time system. The time difference is obtained by comparing the clock difference data with the standard clock data.

3. The in-situ detection and calibration method for timing terminal equipment based on standard time according to claim 2, characterized in that, The adjustment of the phase of the local clock source by 1PPS includes: The time difference is used as a phase adjustment input to the local clock source; The total frequency deviation is obtained based on the time difference and the temperature change of the local clock source; By linearly fitting the total frequency deviation using a clock bias model, the frequency deviation of the next cycle can be predicted. If the difference between the frequency deviation and the actual time difference in the next cycle exceeds a set threshold, then the prediction is re-performed using the clock difference model; otherwise, the relationship between the difference and the second stability of the local clock source is determined. When the difference is less than or equal to the second stability of the local clock source, the phase adjustment amount is maintained; when the difference exceeds the second stability, the time difference is updated.

4. The in-situ detection and calibration method for timing terminal equipment based on standard time according to claim 3, characterized in that, The total frequency deviation is obtained based on the time difference and the temperature change of the local clock source, including: The average frequency deviation of the local clock source is calculated based on the frequency deviation formula and the time difference. Based on the temperature of the local clock source, the temperature change of the local clock source is obtained; based on the temperature change, the frequency control value of the local clock source is calculated; after calculating the frequency control value, white noise is eliminated by Kalman filtering algorithm to obtain the second frequency deviation. The sum of the average frequency deviation and the second frequency deviation is taken as the total frequency deviation.

5. The in-situ testing and calibration method for timing terminal equipment based on standard time according to claim 4, characterized in that, The frequency deviation formula is: The frequency control quantity is: In the formula, The frequency of the local clock source, The standard frequency of the standard time system, For the first The time difference between the local clock and standard time. The time interval between two observations. Let be the time difference between the local clock and standard time at time i. For frequency control, For adjustment coefficients, Let i be the temperature change of the local clock source for the i-th time. This represents the total temperature deviation.

6. The in-situ detection and calibration method for timing terminal equipment based on standard time according to claim 3, characterized in that, The clock bias model is as follows: In the formula, This represents the total frequency deviation. Standard time data for a standard time system. Time data from a local clock source. , , These are time parameters.

7. The in-situ detection and calibration method for timing terminal equipment based on standard time according to claim 1, characterized in that, Using the NTP / PTP signal as the signal to be measured, the minimum time divergence analysis method is employed to perform time calibration on the signal to be measured, including: The NTP / PTP signal test clock obtains the MAC address of the terminal device under test by sending an Address Resolution Protocol Request message; After obtaining the MAC address of the device under test, the NTP / PTP signal test clock sends a notification unicast request message to the terminal device under test. When the terminal device receives the notification unicast request message during the test, it sends a notification unicast response message to the NTP / PTP test clock. The NTP / PTP test clock sends a synchronization unicast request message to the terminal device to be tested. After receiving the synchronization unicast request message, the terminal device to be tested receives the synchronization message interval setting parameter of the NTP / PTP test clock and sends a synchronization unicast response message to the NTP / PTP test clock. The timestamp information is extracted from the protocol request message, the announcement unicast request message, the announcement unicast response message, and the synchronization unicast response message, respectively. The calibration error is calculated based on the sum of the timestamp information, and the calibration error is corrected by the minimum time divergence analysis method to complete the time calibration.

8. An in-situ testing and calibration device for a timing terminal equipment based on standard time, characterized in that, The device is connected to the timing terminal equipment under test and is used to implement the in-situ detection and calibration method for timing terminal equipment based on standard time as described in any one of claims 1 to 7; the device includes a main control module, and a standard time recovery module, a time base signal generation and holding module, a signal conditioning and monitoring module, and a time and frequency signal measurement module connected to the main control module; The standard time recovery module is communicatively connected to the standard time system and to the satellite via an external antenna; it is used to receive clock data from satellite signals and clock data from the standard time system, and after performing common-view processing with the local clock source, obtain the time difference, and send the time difference to the main control module. The time base signal generation and holding module includes a local clock source for providing a local clock; The signal conditioning and monitoring module is used to acquire the timing pulse signal, frequency signal, NTP / PTP signal and B code signal of the terminal device to be measured according to the control command, and send the timing pulse signal, frequency signal, NTP / PTP signal and B code signal of the timing terminal device to the time frequency signal measurement module; The time-frequency signal measurement module is used to perform time calibration on the signals to be measured until the time accuracy of the local clock is achieved. The main control module is used to write the time difference of the standard time recovery module into the local clock source and adjust the phase of the local clock source by 1PPS; it is also used to send control commands to the signal conditioning and monitoring module after calibration mode.

9. The in-situ detection and calibration device for a timing terminal based on standard time according to claim 8, characterized in that, The main control module is also used to execute the following steps: The time difference is used as a phase adjustment input to the local clock source; The total frequency deviation is obtained based on the time difference and the temperature change of the local clock source; By linearly fitting the total frequency deviation using a clock bias model, the frequency deviation of the next cycle can be predicted. If the difference between the frequency deviation and the actual time difference in the next cycle exceeds the set threshold, then the prediction will be made again using the clock difference model. Otherwise, determine the relationship between the difference and the second stability of the local clock source; When the difference is less than or equal to the second stability of the local clock source, the phase adjustment amount is maintained; when the difference exceeds the second stability, the time difference is updated.

10. The in-situ detection and calibration device for a timing terminal based on standard time according to claim 8, characterized in that, It also includes a display and control module connected to the main control module, which is used to display the time-calibrated data.