A method for time synchronization of a nanosecond-level point-to-point wireless communication device clock.
By constructing and predicting the synchronization and temperature drift deviation sequences of nanosecond-level point-to-point wireless communication devices, the timing of the timing command issuance is dynamically adjusted, solving the problems of clock synchronization lag and resource waste in the existing technology, and improving the stability and efficiency of timing.
Patent Information
- Application Number
- CN202511113171.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-11
AI Technical Summary
In existing nanosecond-level point-to-point wireless communication devices, clock synchronization relies on a static timing rhythm, which cannot perceive the dynamic changes in synchronization error over time. This results in low resource scheduling efficiency and delayed timing response, especially when the synchronization deviation changes drastically due to crystal oscillator temperature drift, making it difficult to identify and compensate in a timely manner.
By constructing historical synchronization deviation and temperature drift deviation sequences of master and slave devices, a double-deviation prediction model is pre-trained to obtain the net synchronization deviation in the future time interval. The first-order difference is used for threshold comparison to dynamically adjust the frequency modulation control at the time point of the synchronization command issuance.
It enables dynamic sensing and adaptive adjustment of the clock of nanosecond-level point-to-point wireless communication devices, significantly improving time synchronization stability and resource utilization efficiency, and is particularly suitable for high-precision wireless communication scenarios.
Smart Images

Figure CN120614075B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clock synchronization, specifically to a method for synchronizing the clock of a nanosecond-level point-to-point wireless communication device. Background Technology
[0002] In point-to-point wireless communication devices requiring nanosecond-level precision, clock synchronization between master and slave devices typically relies on a fixed-period time synchronization command triggering mechanism, and is corrected and controlled by synchronization deviations calculated at several key time points. Patent publication CN117354914A discloses a method and system for implementing a precise time synchronization protocol based on accurate distance measurement mapping, which utilizes ranging and timestamp acquisition functions to achieve more accurate time synchronization. However, existing methods similar to the aforementioned patent generally employ a static time synchronization rhythm, failing to perceive the dynamic changes in synchronization errors over time, leading to low resource scheduling efficiency and delayed time synchronization response. Especially under the influence of crystal oscillator temperature drift, the original synchronization deviation may change drastically in a short period, but such changes often lag behind traditional deviation threshold judgment mechanisms, making it difficult to promptly identify trends in deteriorating time synchronization stability. This results in significant lag as compensation is only initiated after the deviation accumulates to a critical state. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method for time synchronization of a nanosecond-level point-to-point wireless communication device clock, which solves the technical problems mentioned in the background by comparing the threshold of the first-order difference between adjacent net synchronization deviations.
[0004] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0005] A method for time synchronization of a nanosecond-level point-to-point wireless communication device clock, comprising:
[0006] S1, marking the master and slave devices in a wireless communication device;
[0007] S2. Based on the historical time synchronization events of the master device and the slave device, obtain the historical synchronization deviation sequence and the historical temperature drift deviation sequence between the master device and the slave device;
[0008] S3. Based on the synchronization deviation sequence and the temperature drift deviation sequence, a dual deviation prediction model is pre-trained.
[0009] S4. Based on the pre-trained double-bias prediction model, obtain the first-order difference between adjacent net synchronization deviations within the rated future time interval.
[0010] S5. Perform threshold comparison on the first-order difference between adjacent net synchronization deviations to determine whether to perform frequency modulation control at the time point when the next synchronization command is issued.
[0011] In some specific embodiments, based on the historical time synchronization events of the master and slave devices, the historical synchronization deviation sequence and historical temperature drift deviation sequence between the master and slave devices are obtained, including:
[0012] S2-1. Obtain the time synchronization command transmission and reception database between the master device and the slave device; wherein, the time synchronization command transmission and reception database stores several historical time synchronization events in chronological order;
[0013] S2-2. In the time synchronization command transmission and reception database, a historical interval is anchored and assigned an independent time sequence number;
[0014] The two ends of the historical interval are the time point T1 when the master device sends the time synchronization command and the time point T4 when the time synchronization response returns. The middle interval includes the time point T2 when the slave device receives the time synchronization command and the planned response time point T3 predefined according to the protocol.
[0015] S2-3. Based on the master device's time synchronization command issuance time T1, the slave device's time synchronization command reception time T2, the slave device's planned response time T3, and the time synchronization response return time T4 within the historical interval, calculate the synchronization deviation for the corresponding time sequence number. ;
[0016] S2-4. In the time synchronization command transmission and reception database, obtain the synchronization deviation and temperature drift deviation corresponding to N historical intervals, and sort them based on the time sequence number of the historical intervals to construct a synchronization deviation sequence and a temperature drift deviation sequence that shares the time sequence number with it.
[0017] In some specific embodiments, the synchronization deviation for the corresponding time sequence number is calculated based on the master device's time synchronization command issuance time T1, the slave device's time synchronization command reception time T2, the slave device's planned response time T3, and the time synchronization response return time T4 within the historical interval. This includes:
[0018] S2-3-1. Between the master device and the slave device that establish a wireless communication channel, the master device periodically triggers a time synchronization command;
[0019] S2-3-2, Record the time point T1 when the master device issues the time synchronization command under the local clock;
[0020] S2-3-3: Receive the time synchronization command and generate a response, and record the time point T2 when the device receives the time synchronization command under the local clock.
[0021] S2-3-4. Mark the planned response time point T3 in advance using the local clock of the slave device;
[0022] S2-3-5. Send the response back to the master device and record the time point T4 of the time synchronization response return under the local clock of the master device;
[0023] S2-3-6. Substitute the time point T1 when the time synchronization command is issued, the time point T2 when the time synchronization command is received from the device, the planned response time point T3 from the device, and the time synchronization response return time point T4 into the time deviation calculation formula to obtain the time correction value used for time synchronization with the local clock of the device.
[0024] In some specific embodiments, the steps for constructing the temperature drift deviation sequence include:
[0025] S2-4-1. Collect the average crystal oscillator temperature within the corresponding historical interval based on the time sequence number;
[0026] S2-4-2. Based on the average crystal temperature, look up the corresponding frequency drift ppm value in the table;
[0027] S2-4-3. Multiply the frequency drift ppm value by the duration of the corresponding historical interval to obtain the temperature drift deviation within the corresponding historical interval.
[0028] S2-4-4: Traverse N historical intervals and obtain N temperature drift deviations in sequence;
[0029] S2-4-5. Sort the N temperature drift deviations according to their time sequence numbers to construct the temperature drift deviation sequence.
[0030] In some specific embodiments, a dual-bias prediction model is pre-trained based on the synchronization bias sequence and the temperature drift bias sequence, including:
[0031] S3-1. Cut the synchronization deviation sequence and temperature drift deviation sequence according to the time window to form several double deviation samples with time sequence numbers.
[0032] S3-2. Use several double-biased samples as input features of the time series model to pre-train the double-biased prediction model.
[0033] In some specific embodiments, the synchronization deviation sequence and the temperature drift deviation sequence are segmented according to a time window to form several double-deviation samples with time sequence numbers, including:
[0034] S3-1-1, Set the length K and step size S of the sliding time window;
[0035] S3-1-2. Traverse the synchronization deviation sequence and temperature drift deviation sequence, and perform sliding cutting according to the set time window to generate several synchronization deviation subsequences and several temperature drift deviation subsequences.
[0036] S3-1-3, Mark the end time points of the synchronization deviation subsequence and the temperature drift deviation subsequence, and select the synchronization deviation and temperature drift deviation corresponding to the end time points as the dual target labels for supervised learning;
[0037] S3-1-4. Concatenate the synchronization deviation subsequence and the temperature drift deviation subsequence into the joint feature variables of the time series model;
[0038] S3-1-5. Combine the joint feature variables with the dual target labels at the final time point to obtain the dual-biased sample.
[0039] In some specific embodiments, several double-biased samples are used as input features of the time series model to pre-train the double-biased prediction model, including:
[0040] S3-2-1. Extract double-biased samples from the current batch;
[0041] S3-2-2, Perform forward propagation on the joint feature variables in the double-biased samples to generate dual target variables;
[0042] S3-2-3, Calculate the error loss between the two target variables and the two target labels;
[0043] S3-2-4. Update time series model parameters based on error loss;
[0044] S3-2-5. Extract the next batch of double-biased samples and perform forward propagation based on the updated time series model parameters;
[0045] S3-2-6. Repeat the above pre-training steps until the time series model converges to the double-bias prediction model.
[0046] In some specific embodiments, based on a pre-trained double-bias prediction model, the first-order difference between adjacent net synchronization deviations within a nominal future time interval is obtained, including:
[0047] S4-1. Obtain the real-time synchronization deviation and real-time temperature drift deviation at the current time point;
[0048] S4-2. Input the real-time synchronization deviation and real-time temperature drift deviation at the current time point into the dual-deviation prediction model to output the synchronization prediction deviation and temperature drift prediction deviation at any time point within the rated future time interval; wherein, the rated future time interval contains M future time points;
[0049] S4-3. Align the synchronization prediction deviation and temperature drift prediction deviation at any time point, and take the difference as the net synchronization deviation at future time points.
[0050] S4-4. Iterate through M future time points until you obtain M corresponding net synchronization deviations;
[0051] S4-5. Sort the M net synchronization deviations according to the time order of future time points to generate a net synchronization deviation sequence.
[0052] S4-6. In the net synchronization deviation sequence, calculate the first-order difference between adjacent net synchronization deviations in turn.
[0053] In some specific embodiments, a threshold comparison is performed on the first-order difference between adjacent net synchronization deviations to determine whether frequency modulation control should be applied to the time point of the next time synchronization command, including:
[0054] S5-1. If any first-order difference is greater than a set threshold, then the adjacent future time point corresponding to that first-order difference is anchored.
[0055] S5-2. Starting from the anchored adjacent future time point, find the time point along the time axis where the next time synchronization command is issued with the shortest duration.
[0056] S5-3. Delay the time of the next time synchronization command issuance by Q defined standard frequency modulation intervals;
[0057] S5-4. If any first-order difference is less than the set threshold, the time of the next time synchronization command will be advanced by Q defined standard frequency modulation intervals.
[0058] This invention provides a time synchronization method for a nanosecond-level point-to-point wireless communication device clock, which has the following beneficial effects:
[0059] This invention provides a method for implementing a clock synchronization protocol for nanosecond-level point-to-point wireless communication devices. By constructing historical sequences of synchronization deviation and temperature drift deviation, and based on a dual-deviation prediction model, it outputs the predicted synchronization deviation and temperature drift deviation for future time periods, using these differences to obtain a net synchronization deviation sequence. Furthermore, by calculating the first-order difference of the net synchronization deviation, it accurately reflects the changing trend of future synchronization states, and uses this first-order difference as a basis for threshold comparison to achieve dynamic frequency modulation control of the timing of the next synchronization command. Compared with static threshold judgment based on the absolute value of synchronization deviation, this invention proactively identifies the deterioration trend of the synchronization state and adjusts the synchronization frequency in a timely manner before the deviation accumulates to an irreversible state, effectively reducing response lag and improving synchronization stability and resource utilization efficiency. By introducing the first-order difference of the net synchronization deviation, this invention achieves dynamic perception and adaptive adjustment of the clock synchronization trend of master and slave devices, significantly improving the frequency modulation accuracy of master and slave devices under crystal oscillator temperature drift interference, and is particularly suitable for nanosecond-level wireless communication scenarios with high requirements for time synchronization accuracy. Attached Figure Description
[0060] Figure 1 This is a flowchart illustrating a method for time synchronization of a nanosecond-level point-to-point wireless communication device clock according to the present invention.
[0061] Figure 2 This is a schematic diagram illustrating the construction process of the synchronization deviation sequence and temperature drift deviation sequence described in this invention;
[0062] Figure 3 This is a schematic diagram of the combination process of the dual-biased samples described in this invention;
[0063] Figure 4 This is a schematic diagram illustrating the calculation process of the time correction value described in this invention. Detailed Implementation
[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0065] Please see Figures 1 to 4 This invention provides a method for time synchronization of a nanosecond-level point-to-point wireless communication device clock, comprising the following steps:
[0066] S1, marking the master and slave devices in a wireless communication device;
[0067] Specifically, the master device refers to a device in a point-to-point wireless communication link that has the ability to periodically send time synchronization commands, receive responses from slave devices, and perform synchronization difference calculations and clock control based on timing data.
[0068] The slave device refers to a device that, after establishing a wireless connection with the master device, passively receives time synchronization commands and returns a response according to protocol requirements.
[0069] For example, the master device and the slave device include:
[0070] In a high-precision radar array, the central controller is the master device, and the front-end detection unit is the slave device.
[0071] In vehicle-mounted / ground-based radar systems, ground base stations are the master equipment, and vehicle-mounted equipment is the slave equipment.
[0072] In a wearable device synchronization system, the main control terminal, such as a mobile phone, is the master device, and the wearable sensors are the slave devices.
[0073] S2. Based on the historical time synchronization events of the master device and the slave device, obtain the historical synchronization deviation sequence and the historical temperature drift deviation sequence between the master device and the slave device;
[0074] S3. Based on the synchronization deviation sequence and the temperature drift deviation sequence, a dual deviation prediction model is pre-trained.
[0075] S4. Based on the pre-trained double-bias prediction model, obtain the first-order difference between adjacent net synchronization deviations within the rated future time interval.
[0076] S5. Perform threshold comparison on the first-order difference between adjacent net synchronization deviations to determine whether to perform frequency modulation control at the time point when the next synchronization command is issued.
[0077] In this embodiment, synchronization deviation and temperature drift deviation sequences are extracted from historical time synchronization events, and a dual-deviation prediction model is jointly trained to achieve joint modeling of synchronization and crystal oscillator temperature effects. This allows for the prediction of the timing error change trend at multiple future time points. Based on the first-order difference analysis results of the net synchronization deviation, the triggering rhythm of the time synchronization command is dynamically adjusted to improve the clock synchronization adaptive capability and effectively suppress the risk of loss of synchronization caused by the accumulation of nanosecond-level deviations.
[0078] In this embodiment, step S2 specifically includes:
[0079] S2-1. Obtain the time synchronization command transmission and reception database between the master device and the slave device; wherein, the time synchronization command transmission and reception database stores several historical time synchronization events in chronological order;
[0080] Furthermore, the time synchronization command transmission and reception database is a database constructed based on multiple rounds of time synchronization event records generated during the historical communication process between the master and slave devices. This database is sorted according to the chronological order of the time synchronization operations and indexed by timestamps, recording key interactive events such as the sending, receiving, and response of time synchronization commands between the master and slave devices. Specifically, each record unit in the database contains a time point and its corresponding function label.
[0081] Simultaneously, in this embodiment, the time synchronization command transmission and reception database also records the real-time crystal oscillator temperature corresponding to each interaction time, as well as the temperature drift deviation determined based on the real-time crystal oscillator temperature.
[0082] S2-2. In the time synchronization command transmission and reception database, a historical interval is anchored and assigned an independent time sequence number;
[0083] The two ends of the historical interval are the time point T1 when the master device sends the time synchronization command and the time point T4 when the time synchronization response returns. The middle interval includes the time point T2 when the slave device receives the time synchronization command and the planned response time point T3 predefined according to the protocol.
[0084] Specifically, the time sequence number can be generated by encoding based on the midpoint timestamp of the historical interval, thereby ensuring that each time sequence number has the characteristics of monotonically increasing and being uniquely indexable on the time axis.
[0085] S2-3. Based on the master device's time synchronization command issuance time T1, the slave device's time synchronization command reception time T2, the slave device's planned response time T3, and the time synchronization response return time T4 within the historical interval, calculate the synchronization deviation for the corresponding time sequence number. It should be noted that by mapping the above four time points to the same historical interval and generating a unique time series number based on the midpoint of that time interval, a one-to-one mapping relationship between the historical interval and its corresponding synchronization deviation is established. This mapping relationship constitutes the time series deviation index.
[0086] S2-4. In the time synchronization command transmission and reception database, obtain the synchronization deviation and temperature drift deviation corresponding to N historical intervals, and sort them based on the time sequence number of the historical intervals to construct a synchronization deviation sequence and a temperature drift deviation sequence that shares the time sequence number with it.
[0087] In this embodiment, by constructing and traversing the time synchronization command transmission and reception database between master and slave devices, and taking the historical interval formed by four time points from T1 to T4 as the unit, the corresponding synchronization deviation and temperature drift deviation are extracted and calculated respectively. A mapping relationship is established through time sequence number, thus realizing the structured deviation data of time sequence consistency.
[0088] Furthermore, steps S2-3 specifically include:
[0089] S2-3-1. Between the master device and the slave device that establish a wireless communication channel, the master device periodically triggers a time synchronization command;
[0090] S2-3-2, Record the time point T1 when the master device issues the time synchronization command under the local clock;
[0091] S2-3-3: Receive the time synchronization command and generate a response, and record the time point T2 when the device receives the time synchronization command under the local clock.
[0092] S2-3-4. Mark the planned response time point T3 in advance using the local clock of the slave device;
[0093] Wherein, the planned response time point T3 represents the target response time set by shifting a certain delay time backward on the time axis based on the time point T2 when the slave device receives the time synchronization command from the master device, according to a preset response delay strategy. Specifically, the delay offset time refers to a fixed response delay intentionally introduced by the slave device after receiving the time synchronization command to ensure response stability.
[0094] S2-3-5. Send the response back to the master device and record the time point T4 of the time synchronization response return under the local clock of the master device;
[0095] S2-3-6. Substitute the time point T1 when the time synchronization command is issued, the time point T2 when the time synchronization command is received from the device, the planned response time point T3 from the device, and the time synchronization response return time point T4 into the time deviation calculation formula to obtain the time correction value used for time synchronization with the local clock of the device.
[0096] The formula for calculating the time deviation is:
[0097] ;
[0098] in, Time correction value, The ideal response midpoint is represented by the local clock of the master device as the anchor point. Specifically, in this embodiment of the invention, the ideal response midpoint is obtained by averaging the time point T1 when the master device sends the time synchronization command and the time point T4 when the time synchronization response returns. The slave device delays the response by a fixed period based on the time point T2 when it receives the time synchronization command, and plans to send the response at the time point T3 under the slave device's local clock, i.e., the planned response time point.
[0099] In this embodiment, the ideal response midpoint is calculated using the time point T1 recorded by the master device when the time synchronization command is issued and the time point T4 when the time synchronization response is returned. Combined with the time point T2 recorded by the slave device when receiving the command and the planned response time point T3, the synchronization deviation is calculated, thus achieving the quantification of the time synchronization deviation with the master device's clock as the anchor reference. This synchronization deviation accurately reflects the actual time deviation between the master and slave devices in a single time synchronization interaction, which helps in adjusting the slave device's local clock.
[0100] Furthermore, steps S2-4 specifically include:
[0101] S2-4-1. Collect the average crystal oscillator temperature within the corresponding historical interval based on the time sequence number;
[0102] The average crystal oscillator temperature can be obtained by sampling multiple times within a time interval using a temperature sensor and calculating the average value.
[0103] S2-4-2. Based on the average crystal temperature, look up the corresponding frequency drift ppm value in the table;
[0104] Among them, the frequency drift ppm value refers to the relative deviation of the crystal oscillator from the nominal frequency per unit time under specific temperature conditions, and the unit is one part per million;
[0105] S2-4-3. Multiply the frequency drift ppm value by the duration of the corresponding historical interval to obtain the temperature drift deviation within the corresponding historical interval.
[0106] Specifically, temperature drift deviation = frequency drift ppm value × time synchronization period, which gives the time offset caused by temperature drift within the time interval, in nanoseconds or microseconds.
[0107] S2-4-4: Traverse N historical intervals and obtain N temperature drift deviations in sequence;
[0108] S2-4-5. Sort the N temperature drift deviations according to their time sequence numbers to construct the temperature drift deviation sequence.
[0109] In this embodiment, by collecting the average crystal oscillator temperature within each historical interval and combining it with the temperature frequency deviation relationship obtained from a lookup table, the time drift of the crystal oscillator under different temperature conditions is quantified, and then the temperature drift deviation value corresponding to the synchronization period is calculated. By traversing all historical intervals and sorting them by time sequence number, a temperature drift deviation sequence with time continuity is constructed, characterizing the systematic impact of temperature changes on clock stability.
[0110] In this embodiment, step S3 specifically includes:
[0111] S3-1. Cut the synchronization deviation sequence and temperature drift deviation sequence according to the time window to form several double deviation samples with time sequence numbers.
[0112] S3-2. Use several double-biased samples as input features of the time series model to pre-train the double-biased prediction model.
[0113] Specifically, step S3-1 includes:
[0114] S3-1-1, Set the length K and step size S of the sliding time window;
[0115] This is used to control the time span contained in each time series sample; where K represents that each sample contains K consecutive time points, and S represents the sliding step of the time window on the sequence.
[0116] S3-1-2. Traverse the synchronization deviation sequence and temperature drift deviation sequence, and perform sliding cutting according to the set time window to generate several synchronization deviation subsequences and several temperature drift deviation subsequences.
[0117] Each synchronization deviation subsequence consists of K consecutive synchronization deviation values, and each temperature drift deviation subsequence shares the same timing number as the corresponding synchronization deviation subsequence.
[0118] S3-1-3, Mark the end time points of the synchronization deviation subsequence and the temperature drift deviation subsequence, and select the synchronization deviation and temperature drift deviation corresponding to the end time points as the dual target labels for supervised learning;
[0119] S3-1-4. Concatenate the synchronization deviation subsequence and the temperature drift deviation subsequence into the joint feature variables of the time series model;
[0120] S3-1-5. Combine the joint feature variables with the dual target labels at the final time point to obtain the dual-biased sample.
[0121] In this embodiment, the synchronization deviation sequence and temperature drift deviation sequence are segmented by setting a sliding time window to construct a dual-deviation sample containing historical evolution characteristics. This provides a time-correlated input structure for the clock synchronization protocol of nanosecond-level point-to-point wireless communication devices. This method not only preserves the dynamic trend of deviation changes over time but also explicitly defines the synchronization state at the target prediction time, which helps improve the accuracy of the dual-deviation prediction model in nanosecond-level time synchronization scenarios.
[0122] Furthermore, step S3-2 specifically includes:
[0123] S3-2-1. Extract double-biased samples from the current batch;
[0124] S3-2-2, Perform forward propagation on the joint feature variables in the double-biased samples to generate dual target variables;
[0125] S3-2-3, Calculate the error loss between the two target variables and the two target labels;
[0126] S3-2-4. Update time series model parameters based on error loss;
[0127] Specifically, the error is reflected to the parameters of each layer of the model through the backpropagation mechanism, and the parameters are iteratively updated using optimization algorithms (such as Adam, SGD, etc.) to minimize the global prediction error.
[0128] S3-2-5. Extract the next batch of double-biased samples and perform forward propagation based on the updated time series model parameters;
[0129] S3-2-6. Repeat the above pre-training steps until the time series model converges to the double-bias prediction model.
[0130] In this embodiment, by introducing joint historical samples composed of synchronization deviation and temperature drift deviation, a dual-objective prediction model is iteratively trained, which significantly improves the responsiveness of the clock synchronization protocol in nanosecond-level point-to-point wireless communication devices to future synchronization state change trends.
[0131] In this embodiment, step S4 specifically includes:
[0132] S4-1. Obtain the real-time synchronization deviation and real-time temperature drift deviation at the current time point;
[0133] S4-2. Input the real-time synchronization deviation and real-time temperature drift deviation at the current time point into the dual-deviation prediction model to output the synchronization prediction deviation and temperature drift prediction deviation at any time point within the rated future time interval; wherein, the rated future time interval contains M future time points;
[0134] S4-3. Align the synchronization prediction deviation and temperature drift prediction deviation at any time point, and take the difference as the net synchronization deviation at future time points.
[0135] It should be noted that in this embodiment, the temperature drift prediction bias is obtained directly from the pre-trained double-bias prediction model, rather than by predicting future temperatures and then calculating using lookup table logic. The reason for this is:
[0136] If we first predict the temperature and then look up the temperature drift deviation in the table, it is equivalent to introducing two sources of error (prediction error + table value error). However, by directly using the temperature drift deviation as the output variable, we can significantly reduce error propagation.
[0137] S4-4. Iterate through M future time points until you obtain M corresponding net synchronization deviations;
[0138] S4-5. Sort the M net synchronization deviations according to the time order of future time points to generate a net synchronization deviation sequence.
[0139] S4-6. In the net synchronization deviation sequence, calculate the first-order difference between adjacent net synchronization deviations in turn.
[0140] The first-order difference calculation can reflect the rate of change of net synchronization deviation between consecutive future time points, reflecting the dynamic stability of the timing state in future periods. If a certain difference value changes abruptly (i.e., its absolute value exceeds a threshold), it indicates that there is a risk of a sharp increase or decrease in synchronization deviation in a certain future period, thereby triggering adaptive adjustment of the timing frequency.
[0141] In this embodiment, by calling the pre-trained dual-bias prediction model, the synchronization prediction deviation and temperature drift prediction deviation at each time point in the future time period are directly output, and then the net synchronization deviation is calculated. The trend of its change is characterized in the form of first-order difference, which avoids the error accumulation under the traditional temperature lookup table path, realizes the quantification of future time synchronization stability, provides a decision basis for the dynamic adjustment of the time synchronization frequency, and improves the response of nanosecond-level clock synchronization control.
[0142] In this embodiment, step S5 specifically includes:
[0143] S5-1. If any first-order difference is greater than a set threshold, then the adjacent future time point corresponding to that first-order difference is anchored.
[0144] S5-2. Starting from the anchored adjacent future time point, find the time point along the time axis where the next time synchronization command is issued with the shortest duration.
[0145] S5-3. Delay the issuance time of the next time synchronization command by Q defined standard frequency modulation intervals; this is used to dynamically reduce the time synchronization frequency, extend the distance between two time synchronizations, and reduce resource waste.
[0146] S5-4. If any first-order difference is less than the set threshold, the time of the next timing command will be advanced by Q defined standard frequency modulation intervals to synchronize the clocks between the master and slave devices and intervene in advance to prevent potential clock synchronization issues, thereby enhancing the timing stability of the wireless communication device during the nanosecond-level deviation accumulation stage.
[0147] In this embodiment, for the clock synchronization protocol of nanosecond-level point-to-point wireless communication devices, a dynamic frequency modulation control mechanism is implemented at the time of timing command issuance by comparing the first-order difference of the net synchronization deviation with a threshold. This method flexibly adjusts the timing frequency based on real-time prediction of future changes in timing stability. It extends the timing period to save resources when the synchronization state tends to be stable, and actively shortens the timing period to suppress clock synchronization failure before fluctuations in the synchronization trend occur, significantly enhancing the adaptability of the timing protocol in nanosecond-level timing control scenarios.
[0148] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means.
[0149] The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g.,...), etc. DVD ( ), or semiconductor media. Semiconductor media can be solid-state drives (SSDs).
[0150] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Furthermore, the mutual couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0151] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A method for time synchronization of a nanosecond-level point-to-point wireless communication device clock, characterized in that, include: S1, marking the master and slave devices in a wireless communication device; S2. Based on the historical time synchronization events of the master device and the slave device, obtain the historical synchronization deviation sequence and the historical temperature drift deviation sequence between the master device and the slave device; S3. Based on the synchronization deviation sequence and the temperature drift deviation sequence, a dual deviation prediction model is pre-trained. S4. Based on the pre-trained double-bias prediction model, obtain the first-order difference between adjacent net synchronization deviations within the rated future time interval. The step of obtaining the first-order difference between adjacent net synchronization deviations within the rated future time interval based on the pre-trained double-bias prediction model includes: S4-1. Obtain the real-time synchronization deviation and real-time temperature drift deviation at the current time point; S4-2. Input the real-time synchronization deviation and real-time temperature drift deviation at the current time point into the dual-deviation prediction model to output the synchronization prediction deviation and temperature drift prediction deviation at any time point within the rated future time interval; wherein, the rated future time interval contains M future time points; S4-3. Align the synchronization prediction deviation and temperature drift prediction deviation at any time point, and take the difference as the net synchronization deviation at future time points. S4-4. Iterate through M future time points until you obtain M corresponding net synchronization deviations; S4-5. Sort the M net synchronization deviations according to the time order of future time points to generate a net synchronization deviation sequence. S4-6. In the net synchronization deviation sequence, calculate the first-order difference between adjacent net synchronization deviations in turn. S5. Perform threshold comparison on the first-order difference between adjacent net synchronization deviations to determine whether to perform frequency modulation control at the time point when the next synchronization command is issued.
2. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 1, characterized in that, Based on the historical time synchronization events between the master and slave devices, obtain the historical synchronization deviation sequence and historical temperature drift deviation sequence between the master and slave devices, including: S2-1. Obtain the time synchronization command transmission and reception database between the master device and the slave device; wherein, the time synchronization command transmission and reception database stores several historical time synchronization events in chronological order; S2-2. In the time synchronization command transmission and reception database, a historical interval is anchored and assigned an independent time sequence number; The two ends of the historical interval are the time point T1 when the master device sends the time synchronization command and the time point T4 when the time synchronization response returns. The middle interval includes the time point T2 when the slave device receives the time synchronization command and the planned response time point T3 predefined according to the protocol. S2-3. Based on the master device's time synchronization command issuance time T1, the slave device's time synchronization command reception time T2, the slave device's planned response time T3, and the time synchronization response return time T4 within the historical interval, calculate the synchronization deviation for the corresponding time sequence number. ; S2-4. In the time synchronization command transmission and reception database, obtain the synchronization deviation and temperature drift deviation corresponding to N historical intervals, and sort them based on the time sequence number of the historical intervals to construct a synchronization deviation sequence and a temperature drift deviation sequence that shares the time sequence number with it.
3. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 2, characterized in that, Based on the master device's time synchronization command issuance time T1, the slave device's time synchronization command reception time T2, the slave device's planned response time T3, and the time synchronization response return time T4 within the historical interval, calculate the synchronization deviation for the corresponding time sequence number, including: S2-3-1. Between the master device and the slave device that establish a wireless communication channel, the master device periodically triggers a time synchronization command; S2-3-2, Record the time point T1 when the master device issues the time synchronization command under the local clock; S2-3-3: Receive the time synchronization command and generate a response, and record the time point T2 when the device receives the time synchronization command under the local clock. S2-3-4. Mark the planned response time point T3 in advance using the local clock of the slave device; S2-3-5. Send the response back to the master device and record the time point T4 of the time synchronization response return under the local clock of the master device; S2-3-6. Substitute the time point T1 when the time synchronization command is issued, the time point T2 when the time synchronization command is received from the device, the planned response time point T3 from the device, and the time synchronization response return time point T4 into the time deviation calculation formula to obtain the time correction value used for time synchronization with the local clock of the device.
4. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 2, characterized in that, The steps for constructing the temperature drift deviation sequence include: S2-4-1. Collect the average crystal oscillator temperature within the corresponding historical interval based on the time sequence number; S2-4-2. Based on the average crystal temperature, look up the corresponding frequency drift ppm value in the table; S2-4-3. Multiply the frequency drift ppm value by the duration of the corresponding historical interval to obtain the temperature drift deviation within the corresponding historical interval. S2-4-4: Traverse N historical intervals and obtain N temperature drift deviations in sequence; S2-4-5. Sort the N temperature drift deviations according to their time sequence numbers to construct the temperature drift deviation sequence.
5. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 1, characterized in that, Based on the synchronization deviation sequence and the temperature drift deviation sequence, a dual deviation prediction model is pre-trained, including: S3-1. Cut the synchronization deviation sequence and temperature drift deviation sequence according to the time window to form several double deviation samples with time sequence numbers. S3-2. Use several double-biased samples as input features of the time series model to pre-train the double-biased prediction model.
6. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 5, characterized in that, The synchronization deviation sequence and temperature drift deviation sequence are divided into several double-deviation samples with time series numbers, according to time windows, including: S3-1-1, Set the length K and step size S of the sliding time window; S3-1-2. Traverse the synchronization deviation sequence and temperature drift deviation sequence, and perform sliding cutting according to the set time window to generate several synchronization deviation subsequences and several temperature drift deviation subsequences. S3-1-3, Mark the end time points of the synchronization deviation subsequence and the temperature drift deviation subsequence, and select the synchronization deviation and temperature drift deviation corresponding to the end time points as the dual target labels for supervised learning; S3-1-4. Concatenate the synchronization deviation subsequence and the temperature drift deviation subsequence into the joint feature variables of the time series model; S3-1-5. Combine the joint feature variables with the dual target labels at the final time point to obtain the dual-biased sample.
7. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 5, characterized in that, Using several double-biased samples as input features for a time-series model, a double-biased prediction model is pre-trained, including: S3-2-1. Extract double-biased samples from the current batch; S3-2-2, Perform forward propagation on the joint feature variables in the double-biased samples to generate dual target variables; S3-2-3, Calculate the error loss between the two target variables and the two target labels; S3-2-4. Update time series model parameters based on error loss; S3-2-5. Extract the next batch of double-biased samples and perform forward propagation based on the updated time series model parameters; S3-2-6. Repeat the above pre-training steps until the time series model converges to the double-bias prediction model.
8. The time synchronization method for a nanosecond-level point-to-point wireless communication device clock according to claim 1, characterized in that, A threshold comparison is performed on the first-order difference between adjacent net synchronization deviations to determine whether frequency modulation control should be applied to the time point of the next time synchronization command, including: S5-1. If any first-order difference is greater than a set threshold, then the adjacent future time point corresponding to that first-order difference is anchored. S5-2. Starting from the anchored adjacent future time point, find the time point along the time axis where the next time synchronization command is issued with the shortest duration. S5-3. Delay the time of the next time synchronization command issuance by Q defined standard frequency modulation intervals; S5-4. If any first-order difference is less than the set threshold, the time of the next time synchronization command will be advanced by Q defined standard frequency modulation intervals.
Citation Information
Patent Citations
Implementation method and system of precise time synchronization protocol based on precise distance measurement mapping
CN117354914A
TTE network clock calibration method and system
CN114205045A
Temperature sensing assisted time synchronization maintaining method
CN119483805A