A network delay compensation method based on time synchronization
By acquiring local time synchronization historical clock data and utilizing Kalman filters and LSTM nonlinear compensation models, the problems of network delay uncertainty and frequency error in existing technologies are solved, achieving high-precision time synchronization.
Patent Information
- Application Number
- CN202510587218.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-05-08
AI Technical Summary
In existing technologies, NTP machine time alignment can only achieve millisecond-level accuracy, network transmission delay is uncertain, and it fails to consider frequency errors caused by crystal oscillator temperature under satellite conditions and the periodic prediction and adaptive problem of network delay.
By acquiring historical clock data from the local time synchronization system, integrating it using a Kalman filter, and combining it with an LSTM nonlinear compensation model, the network delay compensation amount is predicted. Taking into account the effects of temperature and crystal oscillator frequency, high-precision network delay compensation is achieved.
It achieves picosecond-level time synchronization accuracy, solves the problems of network latency uncertainty and frequency error, and achieves nanosecond-level time synchronization effect.
Smart Images

Figure CN120378038B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time synchronization technology, and in particular to a network latency compensation method based on time synchronization. Background Technology
[0002] With the development of the Industrial Internet of Things (IIoT), 5G communication, smart grids, autonomous driving, and financial transactions, the further development of these fields in modern distributed systems has brought enormous challenges to the stability and security of satellite timing signals. It has also posed significant hidden dangers to the safe production of industries with strict time synchronization requirements, such as power, chemical, and rail transportation. However, terrestrial wired time source signal systems face significant limitations in practical applications due to the constraints of connecting wires and complex layout. This is especially true for critical nodes in time synchronization networks, where the transmission delay of terrestrial wired time source signals cannot be ignored. With the development of integrated circuits and wireless technology, modern distributed systems heavily rely on accurate time reference sources and reliable communication media for data exchange. The key to synchronous acquisition systems lies in maintaining highly accurate universal time.
[0003] In 2002, J. Elson and K. Romer first proposed the concept of time synchronization in wireless sensor networks. Later, Wang Peng et al. presented an LVC co-simulation time synchronization technology system consisting of three parts: collaborative advancement of simulation nodes, machine clock alignment, and network delay compensation. However, this system used NTP machine time alignment, achieving only millisecond-level accuracy, and network transmission delay remained uncertain. Hu Anyi et al. implemented a radiation source positioning system architecture design based on TDOA, focusing on solving the two major challenges of high-precision clock synchronization and time difference measurement. Theoretically, it could achieve nanosecond-level high-precision time synchronization, but it did not consider the frequency error caused by crystal oscillator temperature drift under satellite conditions. Shi Fanrong et al., in their research on two-way time communication, proposed a maximum likelihood estimation method for clock offset in dual information exchange and designed a TDC-RMTS delay processing scheme, solving the time synchronization performance issues of frequency correction and delay compensation, but did not consider the periodic adaptation aspect. Summary of the Invention
[0004] The technical problem solved by this invention is that machine time alignment using NTP can only achieve millisecond-level accuracy, network transmission delay has time uncertainty, frequency error caused by crystal oscillator temperature drift under satellite status has not been considered, and the problem of adaptive period prediction of network delay has not been considered.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: Firstly, a network delay compensation method based on time synchronization, comprising:
[0006] Step S100: Obtain historical clock data for local time synchronization. The historical clock data includes clock deviation, clock drift, network symmetry delay, crystal oscillator frequency, and temperature data.
[0007] Step S200: Extract the historical clock data to obtain the state vector; integrate the historical clock data according to the Kalman filter to obtain the state prediction value and the observation model.
[0008] Step S300: Use a Kalman filter to calculate the residuals of the predicted state values and the observation model to obtain the Kalman wave residual sequence;
[0009] Step S400: The Kalman wave residual sequence and the historical data are matched one-to-one to form a nonlinear dataset. The nonlinear dataset is then predicted using an LSTM nonlinear compensation model to generate the network delay compensation amount.
[0010] Preferably, step S100 specifically includes:
[0011] Step S101: Based on the real-time clocks of the master and slave stations and the photon detector equipment, collect picosecond-level timestamps, and calculate clock deviation, clock drift and network symmetric delay according to the LASeR timestamp exchange protocol.
[0012] Step S102: Use a high-precision crystal oscillator sensor to collect the crystal oscillator frequency per unit time.
[0013] Step S103: Based on the temperature sensor within a unit time, acquire temperature data, wherein the temperature data is within the range of ±0.5 degrees Celsius.
[0014] Step S104: Save the clock skew, clock drift, network symmetry delay, crystal frequency and temperature data as historical clock data;
[0015] The timestamp includes :
[0016] The time when the main station sends the laser. The time it takes for the slave station to receive the laser. The time it takes for the laser to be reflected from the station. The time it takes for the main station to receive reflected laser light.
[0017] Preferably, step S200 specifically includes:
[0018] The clock deviation, clock drift, and network symmetric delay of the historical clock data are extracted as state vectors. A state transition model is constructed based on a Kalman filter. The state vectors are predicted to obtain state prediction values. The natural change process of the clock deviation and network delay is plotted based on the state vectors to generate an observation model.
[0019] Preferably, step S300 specifically includes:
[0020] Based on the observation model, the state vector is observed using a Kalman filter to obtain state observation values, and the difference between the state observation values and the state prediction values is calculated to obtain the Kalman wave residual sequence.
[0021] Preferably, step S400 specifically includes:
[0022] Align the Kalman wave residual sequence with the historical clock data to form a nonlinear dataset. Substitute the nonlinear dataset into the LSTM nonlinear compensation model to predict the future network delay compensation amount and perform compensation correction on the current time.
[0023] Preferably, the LASeR timestamp exchange protocol includes: calculating clock skew, clock drift, and network symmetric delay;
[0024] Calculate the clock deviation based on the collected timestamps. The clock deviation The calculation expression is:
[0025] ;
[0026] in, The clock offset is... The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node. This is the inherent delay calibration amount for the detection equipment;
[0027] By two consecutive time deviations The clock drift is calculated by changing the expression, which is:
[0028] ;
[0029] in, For the clock drift, For the first Secondary clock deviation. For the first -1 clock deviation, For synchronization period.
[0030] The expression for calculating the network's symmetric delay is:
[0031] ;
[0032] in, The network's symmetric delay, The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node.
[0033] Preferably, the state transition model includes: setting a state transition matrix, calculating the state transition matrix and state vector using a state equation to obtain a predicted state value, wherein the calculation expression of the state equation is:
[0034] ;
[0035] in, For the first The predicted state value at time [time]. For the first The state transition matrix at time t, For the first The state vector at time t, This is process noise.
[0036] Preferably, the observation model includes: setting an observation matrix, calculating the observation matrix and state vector using an observation equation to obtain state observation values, wherein the calculation expression of the observation equation is:
[0037] ;
[0038] in, For the first The state observation value at time [time], For the first The observation matrix at time [time], For the first The state vector at time t, To observe noise.
[0039] Preferably, the LSTM nonlinear compensation model includes: training an LSTM nonlinear compensation model based on the nonlinear dataset, setting the feature dimension n, the number of training epochs, and the number of training samples batch_size of the training data model, inputting the latest T time steps into the LSTM nonlinear compensation model, outputting the network latency compensation amount, and correcting the local time.
[0040] Secondly, a network delay compensation system based on time synchronization is implemented, including a data acquisition module, a data prediction module, a residual calculation module, and a network compensation module.
[0041] The data acquisition module is used to collect clock data from master and slave stations. It uses photon detector equipment and high-precision crystal oscillator sensors to obtain clock deviation, clock drift, network symmetry delay, crystal oscillator frequency and temperature data, and saves them as historical clock data.
[0042] The data prediction module is used to predict the state, construct a state transition model based on a Kalman filter, use the clock skew, clock drift and network symmetric delay as state vectors for prediction, generate state prediction values, and establish an observation model.
[0043] The residual calculation module is used to obtain the Kalman wave residual sequence, calculate the state observation value based on the observation model, perform residual calculation on the state observation value and the state prediction value, and generate the Kalman wave residual sequence.
[0044] The network compensation module is used to predict the network delay compensation amount. It combines the Kalman wave residual sequence and historical clock data to form a nonlinear dataset, and then uses an LSTM nonlinear compensation model to predict the nonlinear dataset, thereby obtaining the network delay compensation amount for time correction.
[0045] The beneficial effects of this invention are as follows: By collecting multi-source historical clock data, the clock data is linked with nonlinearly related data, taking into account the influence of temperature and crystal frequency on network delay, and using Kalman wave for linear estimation, a multidimensional relationship is established between the evaluated residual sequence results and historical data. Then, it is imported into LSTM to establish a nonlinear compensation model to predict the residual sequence. The influence of nonlinear and linear relational data on the prediction results is fully considered, and the optimal network delay compensation amount is obtained, achieving the effect of time synchronization. Attached Figure Description
[0046] Figure 1 This is a basic flowchart of a network delay compensation method based on time synchronization, provided as an embodiment of the present invention.
[0047] Figure 2This is a schematic diagram of the module distribution of a network delay compensation system based on time synchronization, provided as an embodiment of the present invention. Detailed Implementation
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0049] Example 1, referring to Figure 1 As one embodiment of the present invention, a method comprising:
[0050] Step S100: Obtain historical clock data for local time synchronization. The historical clock data includes clock skew, clock drift, network symmetry delay, crystal oscillator frequency, and temperature data.
[0051] Step S200: Extract historical clock data to obtain state vectors. Based on the Kalman filter, integrate the historical clock data to obtain state prediction values and observation models.
[0052] Step S300: Use a Kalman filter to calculate the residuals of the state prediction values and the observation model to obtain the Kalman wave residual sequence;
[0053] Step S400: The Kalman wave residual sequence is matched one-to-one with historical data to form a nonlinear dataset. The LSTM nonlinear compensation model is used to predict the nonlinear dataset and generate the network delay compensation amount.
[0054] In this embodiment, multi-dimensional clock and environmental data can be obtained by collecting local time synchronization historical clock data. This data is more reliable than the past linear data and takes into account the impact of temperature and crystal frequency on network latency. Kalman filtering is used for linear estimation to obtain state prediction values and state observation values. The two are then subtracted to obtain a residual sequence. The residual sequence is predicted by a well-established LSTM nonlinear compensation model to generate network latency compensation, thereby achieving time synchronization.
[0055] Step S100 specifically includes:
[0056] Step S101: Based on the real-time clocks of the master and slave stations and the photon detector equipment, collect picosecond-level timestamps, and calculate clock deviation, clock drift and network symmetric delay according to the LASeR timestamp exchange protocol.
[0057] Step S102: Use a high-precision crystal oscillator sensor to collect the crystal oscillator frequency per unit time.
[0058] Step S103: Based on the temperature sensor within a unit time, acquire temperature data, wherein the temperature data is within the range of ±0.5 degrees Celsius.
[0059] Step S104: Save the clock skew, clock drift, network symmetry delay, crystal frequency and temperature data as historical clock data;
[0060] The timestamp includes :
[0061] The time when the main station sends the laser. The time it takes for the slave station to receive the laser. The time it takes for the laser to be reflected from the station. The time it takes for the main station to receive reflected laser light.
[0062] In this embodiment, picosecond-level raw data was collected through multi-sensor fusion of laser timing, and error source data was captured based on crystal oscillator and temperature monitoring to form nonlinear historical clock data, providing multi-dimensional reference factors for subsequent network latency compensation prediction.
[0063] Step S200 specifically includes:
[0064] The clock bias, clock drift, and network symmetric delay from historical clock data are extracted as state vectors. A state transition model is constructed based on a Kalman filter to predict the state vectors and obtain the predicted state values. The natural variation process of clock bias and network delay is plotted based on the state vectors to generate an observation model.
[0065] In this embodiment, the original measurement data is transformed into a high-confidence state estimate through Kalman filtering, and an observation model is generated for system monitoring. This reduces the impact of noise on synchronization accuracy, predicts future states based on state trends, and identifies potential problems in advance.
[0066] Step S300 specifically includes:
[0067] Based on the observation model, the state vector is observed using a Kalman filter to obtain the observed state values, and the difference between the observed state values and the predicted state values is calculated to obtain the Kalman wave residual sequence.
[0068] In this embodiment, the obtained Kalman wave residual sequence is essentially used to reflect the unexplained errors of the model and to provide observations for subsequent LSTM model predictions, ultimately achieving robust and high-precision time synchronization.
[0069] Step S400 specifically includes:
[0070] Align the Kalman wave residual sequence with historical clock data to form a nonlinear dataset. Substitute the nonlinear dataset into the LSTM nonlinear compensation model to predict the future network delay compensation amount and make compensation corrections for the current time.
[0071] In this embodiment, the Kalman wave residual sequence is combined with historical clock data. Based on the nonlinear dataset obtained by the combination, an LSTM nonlinear compensation model is established. This solves the limitation of Kalman filtering relying only on linear data and makes up for the linear assumption of Kalman filtering. The temperature data and crystal oscillator frequency contained in the nonlinear dataset can comprehensively analyze the interference of these factors on network delay and make appropriate network delay compensation predictions to generate the optimal network delay compensation amount.
[0072] The LASeR timestamp exchange protocol includes: calculating clock skew, clock drift, and network symmetric delay;
[0073] Calculate the clock offset based on the collected timestamps. Clock deviation The calculation expression is:
[0074] ;
[0075] in, Due to clock skew, The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node. This is the inherent delay calibration amount for the detection equipment;
[0076] By two consecutive time deviations The clock drift is calculated using the following expression:
[0077] ;
[0078] in, For clock drift, For the first Secondary clock deviation. For the first -1 clock deviation, For synchronization period.
[0079] The expression for calculating the network symmetric delay is:
[0080] ;
[0081] in, For network symmetric delay, The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node.
[0082] In this embodiment, the one-way network delay asymmetry is eliminated by using the bidirectional optical time-of-flight difference, thereby obtaining the true clock deviation between the master and slave clocks. The purpose of dynamic monitoring of clock drift is to provide early warning of crystal oscillator abnormalities and temperature interference. The network symmetry delay reflects the physical link quality and enables network performance evaluation.
[0083] State transition models include:
[0084] Set the state transition matrix, and use the state equation to calculate the state transition matrix and state vector to obtain the state prediction value. The calculation expression of the state equation is as follows:
[0085] ;
[0086] in, For the first The predicted state value at time 10:00. For the first The state transition matrix at time t, For the first The state vector at time t, This is process noise.
[0087] In this embodiment, the state transition matrix State vector , If = 1s, then the predicted value for the next moment is (Note: 0.1pps=0.1us / s=100ps / s) In this embodiment, the vector prediction value is used to recursively deduce the future state using physical laws, thereby achieving the effect of dynamic prediction, providing prior estimates for Kalman filtering, and realizing high-precision synchronization.
[0088] The observation models include:
[0089] Set up the observation matrix, and use the observation equation to calculate the observation matrix and state vector to obtain the state observation values. The calculation expression of the observation equation is as follows:
[0090] ;
[0091] in, For the first State observations at time 10:00 For the first The observation matrix at time, For the first The state vector at time t, To observe noise.
[0092] In this embodiment, the observation model converts the original timestamps into bias and delay estimates, controls the error to the nanosecond level, and associates physical measurements with state variables, supports data fusion, increases redundant observations, and provides reliable observation inputs for Kalman filtering.
[0093] LSTM nonlinear compensation models include:
[0094] Based on a nonlinear dataset, an LSTM nonlinear compensation model is trained. The feature dimension n, the number of training epochs, and the number of training samples batch_size are set for the training data model. The latest T time steps are input into the LSTM nonlinear compensation model, and the network latency compensation amount is output and the local time is corrected.
[0095] In this embodiment, the training parameters are T=10, n=6, epoch=50, and batch_size=32. The LSTM nonlinear compensation model in this embodiment can compensate for nonlinear errors that Kalman filtering cannot handle. By learning the complex mapping between historical residuals and related environmental data, LSTM predicts errors that Kalman filtering does not capture, thus achieving long-term time-dependent effects.
[0096] Example 2, refer to Figure 2 In another embodiment of the present invention, which differs from the first embodiment, a network delay compensation system based on time synchronization is provided. To verify and illustrate the technical effects of the method, this embodiment compares the traditional technical solution with the method of the present invention through comparative testing. The experimental results are compared using scientific demonstration methods to verify the real effect of the method.
[0097] A network delay compensation system based on time synchronization includes a data acquisition module, a data prediction module, a residual calculation module, and a network compensation module.
[0098] The data acquisition module is used to collect clock data from master and slave stations. It uses photon detector equipment and high-precision crystal oscillator sensors to obtain clock deviation, clock drift, network symmetry delay, crystal oscillator frequency and temperature data, and saves them as historical clock data.
[0099] The data prediction module is used to predict the state. It constructs a state transition model based on a Kalman filter, uses clock skew, clock drift, and network symmetric delay as state vectors for prediction, generates state prediction values, and establishes an observation model.
[0100] The residual calculation module is used to obtain the Kalman wave residual sequence, calculate the state observation value based on the observation model, perform residual calculation on the state observation value and the state prediction value, and generate the Kalman wave residual sequence.
[0101] The network compensation module is used to predict the amount of network delay compensation. It combines the Kalman wave residual sequence and historical clock data to form a nonlinear dataset, and uses the LSTM nonlinear compensation model to predict the nonlinear dataset, thereby obtaining the amount of network delay compensation for time correction.
[0102] In this embodiment, the entire implementation process of the time synchronization network delay compensation system is divided into four modules by outlining the process. This more clearly demonstrates the specific methods and functions of each module. The data acquisition module plays a crucial role in this embodiment, taking into account the impact of various nonlinear data on network delay. The data prediction module prepares the data in advance for the subsequent generation of the Kalman wave residual sequence, generating state vectors and state prediction values. The residual calculation module uses the difference between the observed value and the predicted value as the residual sequence. Finally, the network compensation module combines the residual sequence with the acquired historical clock data and predicts the network delay compensation amount to compensate for the network delay and achieve time synchronization.
[0103] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A network latency compensation method based on time synchronization, characterized in that, include: Step S100: Obtain historical clock data for local time synchronization. The historical clock data includes clock deviation, clock drift, network symmetry delay, crystal oscillator frequency, and temperature data. Step S200: Extract the historical clock data to obtain the state vector; integrate the historical clock data according to the Kalman filter to obtain the state prediction value and the observation model. Step S300: Use a Kalman filter to calculate the residuals of the predicted state values and the observation model to obtain the Kalman wave residual sequence; Step S400: The Kalman wave residual sequence and the historical clock data are matched one-to-one to form a nonlinear dataset. The nonlinear dataset is then predicted using an LSTM nonlinear compensation model to generate the network delay compensation amount.
2. The network latency compensation method based on time synchronization as described in claim 1, characterized in that: Step S100 specifically includes: Step S101: Based on the real-time clocks of the master and slave stations and the photon detector equipment, collect picosecond-level timestamps, and calculate clock deviation, clock drift and network symmetric delay according to the LASeR timestamp exchange protocol. Step S102: Use a high-precision crystal oscillator sensor to collect the crystal oscillator frequency per unit time. Step S103: Based on the temperature sensor within a unit time, acquire temperature data, wherein the temperature data is within the range of ±0.5 degrees Celsius. Step S104: Save the clock skew, clock drift, network symmetry delay, crystal frequency and temperature data as historical clock data; The timestamp includes : The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node.
3. The network latency compensation method based on time synchronization as described in claim 1, characterized in that: Step S200 specifically includes: The clock deviation, clock drift, and network symmetric delay of the historical clock data are extracted as state vectors. A state transition model is constructed based on a Kalman filter. The state vectors are predicted to obtain state prediction values. The natural change process of the clock deviation and network delay is plotted based on the state vectors to generate an observation model.
4. The network latency compensation method based on time synchronization as described in claim 1, characterized in that: Step S300 specifically includes: Based on the observation model, the state vector is observed using a Kalman filter to obtain state observation values, and the difference between the state observation values and the state prediction values is calculated to obtain the Kalman wave residual sequence.
5. The network latency compensation method based on time synchronization as described in claim 1, characterized in that: Step S400 specifically includes: Align the Kalman wave residual sequence with the historical clock data to form a nonlinear dataset. Substitute the nonlinear dataset into the LSTM nonlinear compensation model to predict the future network delay compensation amount and perform compensation correction on the current time.
6. The network delay compensation method based on time synchronization as described in claim 2, characterized in that: The LASeR timestamp exchange protocol includes: calculating clock skew, clock drift, and network symmetric delay; Calculate the clock deviation based on the collected timestamps. The clock deviation The calculation expression is: ; in, The clock offset, The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node. This is the inherent delay calibration amount for the detection equipment; By two consecutive clock deviations The clock drift is calculated by changing the expression, which is: ; in, For the clock drift, For the first Secondary clock skew. For the first -1 clock deviation For synchronization period; The expression for calculating the network's symmetric delay is: ; in, The network's symmetric delay, The absolute timestamp of the laser pulse emitted by the master node. For the absolute timestamp of the laser pulse received from the node, For the absolute timestamp of the laser pulse reflected from the node, The absolute timestamp of the reflected pulse received by the master node.
7. The network delay compensation method based on time synchronization as described in claim 3, characterized in that: The state transition model includes: setting a state transition matrix, calculating the state transition matrix and state vector using a state equation, and obtaining the predicted state value. The calculation expression of the state equation is as follows: ; in, For the first The predicted state value at time [time]. For the first The state transition matrix at time t, For the first The state vector at time t, This is process noise.
8. The network latency compensation method based on time synchronization as described in claim 1, characterized in that: The observation model includes: setting an observation matrix, calculating the observation matrix and state vector using an observation equation to obtain state observation values, wherein the calculation expression of the observation equation is: ; in, For the first The state observation value at time [time], For the first The observation matrix at time [time], For the first The state vector at time t, To observe noise.
9. A network latency compensation method based on time synchronization as described in claim 1, characterized in that: The LSTM nonlinear compensation model includes: training an LSTM nonlinear compensation model based on the nonlinear dataset, setting the feature dimension n, the number of training epochs and the number of training samples batch_size of the training data model, inputting the latest T time steps into the LSTM nonlinear compensation model, outputting the network latency compensation amount, and correcting the local time.
10. A network delay compensation system based on time synchronization, implemented based on the network delay compensation method based on time synchronization according to any one of claims 1-9, characterized in that, It includes a data acquisition module, a data prediction module, a residual calculation module, and a network compensation module; The data acquisition module is used to collect clock data from master and slave stations. It uses photon detector equipment and high-precision crystal oscillator sensors to obtain clock deviation, clock drift, network symmetry delay, crystal oscillator frequency and temperature data, and saves them as historical clock data. The data prediction module is used to predict the state, construct a state transition model based on a Kalman filter, use the clock skew, clock drift and network symmetric delay as state vectors for prediction, generate state prediction values, and establish an observation model. The residual calculation module is used to obtain the Kalman wave residual sequence, calculate the state observation value based on the observation model, perform residual calculation on the state observation value and the state prediction value, and generate the Kalman wave residual sequence. The network compensation module is used to predict the amount of network delay compensation. It combines the Kalman wave residual sequence and historical clock data to form a nonlinear dataset, and uses an LSTM nonlinear compensation model to predict the nonlinear dataset, thereby obtaining the amount of network delay compensation for time correction.
Citation Information
Patent Citations
Power system time synchronization monitoring device
CN118282554A
Cross-network time synchronization method for fusion of AUTBUS and TSN
CN119402122A