Network delay compensation method based on time synchronization
By acquiring historical clock data and using Kalman filter and LSTM nonlinear compensation model, the problems of insufficient time synchronization accuracy and network delay uncertainty in the prior art are solved, and the time synchronization effect in nanoseconds is achieved.
Patent Information
- Application Number
- CN202510587218.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-08
AI Technical Summary
In the prior art, machine time alignment using NTP can only achieve millisecond accuracy, and there is uncertainty in network transmission delay, and the frequency error caused by crystal oscillator temperature in satellite state and period prediction adaptive problems of network delay are not considered.
By obtaining the historical clock data of local timing, using Kalman filters for integration processing, generating state prediction values and observation models, combining LSTM nonlinear compensation model, predicting the network delay compensation amount, taking into account the influence of temperature and crystal oscillator frequency, nonlinear data prediction is achieved.
It realizes the nanosecond-level time synchronization accuracy, solves the problems of network delay uncertainty and frequency error, and improves the accuracy and adaptability of time synchronization.
Smart Images

Figure CN120378038A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of time synchronization, and particularly to a network delay compensation method based on time synchronization. Background Art
[0002] With the development of industrial Internet of Things, 5G communication, smart grid, autonomous driving and financial transactions, in modern distributed systems, the further development of these fields has brought great challenges to the stability and security of satellite time signal, and also brought great potential safety hazards to the safe production of industries with strict time synchronization requirements such as electric power, chemical industry and rail transit. However, the ground wired time source signal system has great restrictions in the actual application process due to problems such as the bondage of connecting wires and complex layout. Especially for the key nodes in the time synchronization network, the transmission delay of the ground wired time source signal cannot be ignored for the time synchronization network. With the development of integrated circuits and wireless technologies, modern distributed systems strongly rely on accurate time reference sources and reliable communication media for data exchange. The key to the synchronous acquisition system lies in maintaining highly accurate universal time.
[0003] In 2002, J. Elson and K. Romer first proposed the concept of time synchronization for wireless sensor networks. After that, Wang Peng et al. gave the LVC joint simulation time synchronization technology system composed of three parts: cooperative advancement of simulation nodes, machine clock alignment and network delay compensation. However, the machine time alignment using NTP can only achieve millisecond-level accuracy, and there is still uncertainty in network transmission delay. Hu Anyi et al. implemented an architecture design of a radiation source positioning system based on TDOA, which focused on solving two difficulties: high-precision clock synchronization and time difference measurement. In theory, it can achieve high-precision timekeeping at the nanosecond level, but it did not consider the frequency error caused by the drift of the crystal oscillator temperature under satellite conditions. Shi Fanrong et al. proposed a maximum likelihood estimation method for clock offset with dual information exchange in the study of two-way timekeeping communication, and designed a TDC-RMTS delay processing scheme, which solved the time synchronization performance of frequency correction and delay compensation, but did not consider the problem of cycle adaptability. Summary of the Invention
[0004] The technical problems solved by the present invention are as follows: Using NTP for machine time alignment can only achieve millisecond-level accuracy, there is time uncertainty in network transmission delay, the frequency error caused by the drift of the crystal oscillator temperature under satellite conditions is not considered, and the problem of cycle prediction adaptability of network delay is not considered.
[0005] To solve the above technical problems, the present invention provides the following technical solutions: In the first aspect, a network delay compensation method based on time synchronization includes:
[0006] Step S100, obtain historical clock data of local time synchronization, where 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 a state vector, and based on the Kalman filter, perform integration processing on the historical clock data to obtain a state prediction value and an observation model;
[0008] Step S300, use the Kalman filter to calculate the residuals of the state prediction value and the observation model to obtain a Kalman wave residual sequence;
[0009] Step S400, correspond the Kalman wave residual sequence and the historical data one by one to form a non-linear data set, and use the LSTM non-linear compensation model to predict the non-linear data set to predict and generate a network delay compensation amount.
[0010] Preferably, step S100 specifically includes:
[0011] Step S101, collect picosecond-level timestamps according to the master-slave real-time clock and the photon detector device, and calculate the clock deviation, clock drift, and network symmetry 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 per unit time, obtain temperature data, and the range of the temperature data is between plus and minus 0.5 degrees Celsius;
[0014] Step S104, save the clock deviation, clock drift, network symmetry delay, crystal oscillator frequency, and temperature data as historical clock data;
[0015] The timestamps include T1, T2, T3, T4:
[0016] T1 is the time when the master station sends the laser, T2 is the time when the slave station receives the laser, T3 is the time when the slave station reflects the laser, and T4 is the time when the master station receives the reflected laser.
[0017] Preferably, step S200 specifically includes:
[0018] Extract the clock deviation, clock drift, and network symmetry delay of the historical clock data as the state vector, based on the Kalman filter, construct a state transition model, predict the state vector to obtain a state prediction value, and draw the natural change process of the clock deviation and network delay according to the state vector to generate an observation model.
[0019] Preferably, step S300 specifically includes:
[0020] Based on the observation model, using a Kalman filter, the state vector is observed to obtain a state observation value, and the difference between the state observation value and the state prediction value is calculated to obtain a 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 non-linear data set, substitute the non-linear data set into the LSTM non-linear compensation model, predict the future network delay compensation amount, and compensate and correct the current time.
[0023] Preferably, the LASeR timestamp exchange protocol includes: calculating clock deviation, clock drift, and network symmetric delay;
[0024] According to the collected timestamps, calculate the clock deviation θ, and the calculation expression of the clock deviation θ is:
[0025]
[0026] where θ is the clock deviation, T1 is the absolute timestamp when the master node emits a laser pulse, T2 is the absolute timestamp when the slave node receives the laser pulse, T3 is the absolute timestamp when the slave node reflects the laser pulse, T4 is the absolute timestamp when the master node receives the reflected pulse, and τ cal is the inherent delay calibration amount of the detection device;
[0027] Calculate the clock drift by calculating the change in the time deviation θ twice continuously, and the calculation expression of the clock drift is:
[0028]
[0029] where Drift is the clock drift, θ n is the clock deviation at the nth time, θ n-1 is the clock deviation at the (n - 1)th time, and T sync is the synchronization period.
[0030] The calculation expression of the network symmetric delay is:
[0031]
[0032] where D symmetric is the network symmetric delay, T1 is the absolute timestamp when the master node emits a laser pulse, T2 is the absolute timestamp when the slave node receives the laser pulse, T3 is the absolute timestamp when the slave node reflects the laser pulse, and T4 is the absolute timestamp when the master node receives the reflected pulse.
[0033] Preferably, the state transition model includes: setting a state transition matrix, calculating the state transition matrix and the state vector by using a state equation to obtain a state prediction value, and the calculation expression of the state equation is:
[0034]
[0035] Wherein, is the state prediction value at the k-th moment, F k is the state transition matrix at the k-th moment, x k is the state vector at the k-th moment, ω k is the process noise.
[0036] Preferably, the observation model includes: setting an observation matrix, calculating the observation matrix and the state vector by using an observation equation to obtain a state observation value, and the calculation expression of the observation equation is:
[0037] z k = H k x k + v k ;
[0038] Wherein, z k is the state observation value at the k-th moment, H k is the observation matrix at the k-th moment, x k is the state vector at the k-th moment, v k is the observation noise.
[0039] Preferably, the LSTM non-linear compensation model includes: based on the non-linear data set, training the LSTM non-linear compensation model, setting the feature dimension n of the training data model, the number of training epochs epoch and the number of training samples batch_size, inputting the latest T time steps into the LSTM non-linear compensation model, outputting the network delay compensation amount, and correcting the local time.
[0040] In a second aspect, an implementation of 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;
[0041] The data acquisition module is used to collect the master-slave station clock data, obtain the clock deviation, clock drift, network symmetric delay, crystal oscillator frequency and temperature data by using a photon detector device and a high-precision crystal oscillator sensor, and save them as historical clock data;
[0042] The data prediction module is used to predict the state, construct a state transition model based on the Kalman filter, predict the clock deviation, clock drift, and network symmetry delay as a state vector to generate a state prediction value, 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 to generate the Kalman wave residual sequence;
[0044] The network compensation module is used to predict the network delay compensation amount, combine the Kalman wave residual sequence and historical clock data to form a non-linear data set, and use the LSTM non-linear compensation model to predict the non-linear data set to obtain the network delay compensation amount for correcting the time
[0045] The beneficial effects of the present invention: By collecting multi-source historical clock data, establishing a connection between the clock data and non-linearly related data, considering the influencing factors of temperature and crystal oscillator frequency on network delay, and using the Kalman wave for linear estimation, establishing a multi-dimensional relationship between the evaluated residual sequence result and historical data, and then importing it into LSTM to establish a non-linear compensation model to predict the residual sequence, fully considering the influence of non-linear relationship data and linear relationship data on the prediction result, obtaining the optimal network delay compensation amount, and achieving the effect of time synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 FIG. is a schematic flow chart of a network delay compensation method based on time synchronization provided by an embodiment of the present invention.
[0047] Figure 2 FIG. is a schematic diagram of the module distribution of a network delay compensation system based on time synchronization provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given in conjunction with the accompanying drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments.
[0049] Example 1, referring to Figure 1 , which is an embodiment of the present invention, provides a method including:
[0050] Step S100, obtaining historical clock data of local time service, where the historical clock data includes clock deviation, clock drift, network symmetry delay, crystal oscillator frequency, and temperature data;
[0051] Step S200: Extract historical clock data to obtain a state vector. Based on the Kalman filter, integrate and process the historical clock data to obtain a state prediction value and an observation model.
[0052] Step S300: Use the Kalman filter to calculate the residuals of the state prediction value and the observation model to obtain a Kalman wave residual sequence.
[0053] Step S400: One-to-one correspond the Kalman wave residual sequence with historical data to form a non-linear data set. Use the LSTM non-linear compensation model to predict the non-linear data set and predict and generate a network delay compensation amount.
[0054] In this embodiment, through the collected local timing historical clock data, multi-dimensional clock and environmental data can be obtained. This data is more reliable compared with past linear data, and takes into account the influence of temperature and crystal oscillator frequency on network delay. Use the Kalman filter for linear estimation to obtain the state prediction value and the state observation value, and subtract the two to obtain the residual sequence. Through the established LSTM non-linear compensation model, predict the residual sequence to generate a network delay compensation amount, thereby achieving the time synchronization effect.
[0055] Step S100 specifically includes:
[0056] Step S101: According to the master-slave real-time clocks and photon detector devices, collect picosecond-level timestamps, and calculate the 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 within a unit time.
[0058] Step S103: Based on the temperature sensor within a unit time, obtain temperature data, and the range of the temperature data is between plus and minus 0.5 degrees Celsius.
[0059] Step S104: Save the clock deviation, clock drift, network symmetric delay, crystal oscillator frequency, and temperature data as historical clock data.
[0060] The timestamps include T1, T2, T3, T4:
[0061] T1 is the time when the master station sends the laser, T2 is the time when the slave station receives the laser, T3 is the time when the slave station reflects the laser, and T4 is the time when the master station receives the reflected laser.
[0062] In this embodiment, through laser timing multi-sensor fusion, picosecond-level raw data is collected, and error source data is captured according to crystal oscillator and temperature monitoring to form non-linear historical clock data, providing multi-dimensional reference factors for the subsequent prediction of network delay compensation.
[0063] Step S200 specifically includes:
[0064] Extract the clock deviation, clock drift, and network symmetric delay of historical clock data as the state vector. Based on the Kalman filter, construct a state transition model, predict the state vector to obtain the state prediction value, and draw the natural change process of the clock deviation and network delay according to the state vector to generate the observation model.
[0065] In this embodiment, the original measurement data is converted into a high-confidence state estimate through Kalman filtering, and an observation model is generated for system monitoring, reducing the impact of noise on the synchronization accuracy, predicting the future state based on the state trend, and discovering potential problems in advance.
[0066] Step S300 specifically includes:
[0067] Based on the observation model, use the Kalman filter to observe the state vector to obtain the state observation value, and calculate the difference between the state observation value and the state prediction value to obtain the Kalman wave residual sequence.
[0068] In this embodiment, the obtained Kalman wave residual sequence is essentially to reflect the error unexplained by the model and provide the observation value for the subsequent LSTM model prediction, ultimately achieving robust high-precision time synchronization.
[0069] Step S400 specifically includes:
[0070] Align the Kalman wave residual sequence with the historical clock data to form a non-linear data set. Substitute the non-linear data set into the LSTM non-linear compensation model to predict the future network delay compensation amount and compensate and correct the current time.
[0071] In this embodiment, the Kalman wave residual sequence is combined with the historical clock data. According to the combined non-linear data set, an LSTM non-linear compensation model is established, which solves the limitation that the Kalman filter only depends on linear data, makes up for the linear hypothesis defect of the Kalman filter. The temperature data and crystal oscillator frequency contained in the non-linear data set can comprehensively analyze the interference of these factors on the network delay and make a suitable network delay compensation prediction to generate the optimal network delay compensation amount.
[0072] The LASeR timestamp exchange protocol includes: calculating the clock deviation, clock drift, and network symmetric delay;
[0073] According to the collected timestamps, calculate the clock deviation θ. The calculation expression of the clock deviation θ is:
[0074]
[0075] Wherein, θ is the clock deviation, T1 is the absolute timestamp when the master node emits a laser pulse, T2 is the absolute timestamp when the slave node receives the laser pulse, T3 is the absolute timestamp when the slave node reflects the laser pulse, T4 is the absolute timestamp when the master node receives the reflected pulse, and τ cal is the inherent delay calibration amount of the detection device;
[0076] The clock drift is calculated by continuously calculating the change in the time deviation θ twice. The calculation expression for the clock drift is:
[0077]
[0078] Wherein, Drift is the clock drift, and θ n is the clock deviation at the nth time, and θ n-1 is the clock deviation at the (n - 1)th time, and T sync is the synchronization period.
[0079] The calculation expression for the network symmetric delay is:
[0080]
[0081] Wherein, D symmetric is the network symmetric delay, T1 is the absolute timestamp when the master node emits a laser pulse, T2 is the absolute timestamp when the slave node receives the laser pulse, T3 is the absolute timestamp when the slave node reflects the laser pulse, and T4 is the absolute timestamp when the master node receives the reflected pulse.
[0082] In this embodiment, the one-way network delay asymmetry is eliminated through the bidirectional optical time-of-flight difference, so as to obtain the true clock deviation between the master and slave clocks. The purpose of dynamically monitoring the clock drift is to warn of crystal oscillator anomalies and interference from temperature factors. The network symmetric delay reflects the physical link quality for network performance evaluation.
[0083] The state transition model includes:
[0084] Set the state transition matrix, and calculate the state transition matrix and the state vector using the state equation to obtain the state prediction value. The calculation expression of the state equation is:
[0085]
[0086] Wherein, is the state prediction value at the kth moment, F k is the state transition matrix at the kth moment, x k is the state vector at the kth moment, and ω k is the process noise.
[0087] In this embodiment, the state transition matrix The state vector If Δt = 1s, the predicted value for the next moment is (Note: 0.1pps = 0.1us / s = 100ps / s). The vector predicted value in this embodiment uses physical laws to recursively infer future states, achieving the effect of dynamic prediction, providing a prior estimate for Kalman filtering, and realizing high-precision synchronization.
[0088] The observation model includes:
[0089] Set the observation matrix, and use the observation equation to calculate the observation matrix and the state vector to obtain the state observation value. The calculation expression of the observation equation is:
[0090] z k =H k x k +v k ;
[0091] Among them, z k is the state observation value at the k-th moment, H k is the observation matrix at the k-th moment, x k is the state vector at the k-th moment, and v k is the observation noise.
[0092] In this embodiment, the observation model converts the original timestamp into deviation and delay estimates, controls the error within the nanosecond level, associates physical measurements with state variables, supports data fusion, increases redundant observations, and provides reliable observation input for Kalman filtering.
[0093] The LSTM non-linear compensation model includes:
[0094] Based on the non-linear data set, train the LSTM non-linear compensation model, set the feature dimension n of the training data model, the number of training epochs epoch, and the number of training samples batch_size. Input the latest T time steps into the LSTM non-linear compensation model, output the network delay compensation amount, and correct the local time.
[0095] In this embodiment, the training parameters are T = 10, n = 6, epoch = 50, batch_size = 32. The LSTM non-linear compensation model in this embodiment can compensate for non-linear errors that Kalman filtering cannot handle. LSTM predicts the errors not captured by Kalman filtering by learning the complex mapping of historical residuals and related environmental data, achieving the effect of long-term time series dependence.
[0096] Example 2, refer to Figure 2This is another embodiment of the present invention. Different from the first embodiment, a network delay compensation system based on time synchronization is provided. To verify and illustrate the technical effects adopted in this method, in this embodiment, a traditional technical solution is compared with the method of the present invention through a comparative test, and the experimental results are compared by means of scientific demonstration to verify the real effects of this 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 the master-slave station clock data, obtain clock deviation, clock drift, network symmetric delay, crystal oscillator frequency, and temperature data by using a photon detector device and a high-precision crystal oscillator sensor, and save them as historical clock data;
[0099] The data prediction module is used to predict the state. Based on the Kalman filter, a state transition model is constructed, and the clock deviation, clock drift, and network symmetric delay are used as the state vector for prediction to generate a state prediction value, and an observation model is established;
[0100] The residual calculation module is used to obtain the Kalman wave residual sequence. Based on the observation model, the state observation value is calculated, and the state observation value and the state prediction value are subjected to residual calculation to generate the Kalman wave residual sequence;
[0101] The network compensation module is used to predict the network delay compensation amount. By combining the Kalman wave residual sequence and the historical clock data, a non-linear data set is formed, and the LSTM non-linear compensation model is used to predict the non-linear data set, so as to obtain the network delay compensation amount for correcting the time.
[0102] In this embodiment, by sorting out the process of the network delay compensation system based on time synchronization, the entire implementation process is divided into four modules, which more clearly shows the specific methods and functions of each module. The data acquisition module is an important part of this embodiment. Considering the influence of various non-linear data on network delay, the data prediction module prepares the data in advance for the subsequent generation of the Kalman wave residual sequence, generates the state vector and the state prediction value. The residual calculation module takes the difference between the observed value and the predicted value as the residual sequence. The final network compensation module combines the residual sequence with the collected historical clock data and predicts the network delay compensation amount to compensate the network delay and achieve the time synchronization effect.
[0103] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, 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. Among them, 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 read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, and the instruction device implements the functions specified in one process Figure 1 one process or multiple processes and / or Figure 1 boxes specified in multiple boxes.
[0104] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A network delay compensation method based on time synchronization, characterized in that, Including: Step S100: Obtain historical clock data of local time synchronization. The historical clock data includes clock deviation, clock drift, network symmetric delay, crystal oscillator frequency, and temperature data. Step S200: Extract the historical clock data to obtain a state vector. According to the Kalman filter, integrate and process the historical clock data to obtain a state prediction value and an observation model. Step S300: Use the Kalman filter to calculate the residuals of the state prediction value and the observation model to obtain a Kalman wave residual sequence. Step S400: One-to-one correspond the Kalman wave residual sequence and the historical clock data to form a non-linear data set. Use the LSTM non-linear compensation model to predict the non-linear data set and predict and generate a network delay compensation amount.
2. The network delay compensation method based on time synchronization according to claim 1, characterized in that: Step S100 specifically includes: Step S101: According to the master-slave real-time clock and the photon detector device, collect picosecond-level timestamps, and calculate the 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 within a unit time. Step S103: Based on the temperature sensor within a unit time, obtain temperature data, and the range of the temperature data is between plus and minus 0.5 degrees Celsius. Step S104: Save the clock deviation, clock drift, network symmetric delay, crystal oscillator frequency, and temperature data as historical clock data. The timestamps include T1, T2, T3, T4: T1 is the time when the master station sends laser, T2 is the time when the slave station receives laser, T3 is the time when the slave station reflects laser, and T4 is the time when the master station receives the reflected laser.
3. A network delay compensation method based on time synchronization according to claim 1, characterized in that: Step S200 specifically includes: Extract the clock deviation, clock drift, and network symmetric delay of the historical clock data as the state vector. Based on the Kalman filter, construct a state transition model, predict the state vector to obtain a state prediction value, and draw the natural change process of the clock deviation and network delay according to the state vector to generate an observation model.
4. A network delay compensation method based on time synchronization according to claim 1, characterized in that: Step S300 specifically includes: Based on the observation model, use the Kalman filter to observe the state vector to obtain a state observation value, and calculate the difference between the state observation value and the state prediction value to obtain a Kalman wave residual sequence.
5. A network delay compensation method based on time synchronization according to claim 1, characterized in that: Step S400 specifically includes: Align the Kalman wave residual sequence with the historical clock data to form a non-linear data set. Substitute the non-linear data set into the LSTM non-linear compensation model to predict the future network delay compensation amount and compensate and correct the current time.
6. The network delay compensation method based on time synchronization according to claim 2, characterized in that: The LASeR timestamp exchange protocol includes: calculating the clock deviation, clock drift, and network symmetric delay; According to the collected timestamps, calculate the clock deviation θ, and the calculation expression of the clock deviation θ is: where θ is the clock deviation, T1 is the absolute timestamp when the master node emits a laser pulse, T2 is the absolute timestamp when the slave node receives the laser pulse, T3 is the absolute timestamp when the slave node reflects the laser pulse, T4 is the absolute timestamp when the master node receives the reflected pulse, and τ cal is the calibration amount of the inherent delay of the detection device; Calculate the clock drift through the change of the time deviation θ twice continuously. The calculation expression of the clock drift is: Among them, Drift is the clock drift, and θ n is the nth clock deviation, and θ n-1 is the (n - 1)th clock deviation, and T sync is the synchronization period; The calculation expression of the network symmetric delay is: where D symmetric is the network symmetric delay, T1 is the absolute timestamp when the master node emits a laser pulse, T2 is the absolute timestamp when the slave node receives the laser pulse, T3 is the absolute timestamp when the slave node reflects the laser pulse, and T4 is the absolute timestamp when the master node receives the reflected pulse.
7. A network delay compensation method based on time synchronization according to claim 3, wherein: 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 state prediction value, and the calculation expression of the state equation is: Among them, is the state prediction value at the k-th moment, F k is the state transition matrix at the k-th moment, x k is the state vector at the k-th moment, ω k is the process noise.
8. A network delay compensation method based on time synchronization according to claim 1, wherein: The observation model includes: setting an observation matrix, calculating the observation matrix and state vector using an observation equation to obtain a state observation value, and the calculation expression of the observation equation is: z k = H k x k + v k ; where, z k is the state observation value at the k-th moment, H k is the observation matrix at the k-th moment, x k is the state vector at the k-th moment, v k is the observation noise.
9. A network delay compensation method based on time synchronization according to claim 1, wherein: The LSTM non-linear compensation model includes: training an LSTM non-linear compensation model based on the non-linear data set, setting the feature dimension n, the number of training epochs epoch, and the number of training samples batch_size of the training data model, inputting the latest T time steps into the LSTM non-linear compensation model, outputting a network delay compensation amount, and correcting the local time.
10. A network delay compensation system based on time synchronization, which is implemented based on the network delay compensation method 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 the master-slave station clock data, obtain clock deviation, clock drift, network symmetric delay, crystal oscillator frequency, and temperature data using a photon detector device and a high-precision crystal oscillator sensor, and save 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, predict the clock deviation, clock drift, and network symmetric delay as state vectors to generate a state prediction value, and establish an observation model; The residual calculation module is used to obtain a Kalman wave residual sequence, calculate the state observation value based on the observation model, perform a residual calculation on the state observation value and the state prediction value to generate the Kalman wave residual sequence; The network compensation module is used to predict the network delay compensation amount, combine the Kalman wave residual sequence and historical clock data to form a non-linear data set, and use an LSTM non-linear compensation model to predict the non-linear data set to obtain the network delay compensation amount for correcting the time.
Citation Information
Patent Citations
Power system time synchronization monitoring device
CN118282554A
Cross-network time synchronization method for fusion of AUTBUS and TSN
CN119402122A
Method and devices for synchronization
WO2015049478A1