Bidirectional clock synchronization method and system based on LQG control strategy

By employing a bidirectional clock synchronization method based on LQG control strategy, a state equation and noise covariance matrix are constructed. Timestamps are used for observation, and control values ​​are calculated to adjust the frequency. This solves the problem of insufficient accuracy in wireless clock synchronization and achieves high-precision and robust clock synchronization.

CN120857245APending Publication Date: 2025-10-28GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511084504.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing wireless clock synchronization methods are difficult to achieve high-precision synchronization in GNSS-restricted environments, and traditional wireless clock synchronization schemes lack sufficient synchronization accuracy, making it difficult to meet the requirements for high-precision and multi-node synchronization.

Method used

A bidirectional clock synchronization method based on LQG control strategy is adopted. By constructing the state equations and process noise covariance matrix of the master and slave clock nodes, the observation equations are constructed based on the timestamps to perform state prediction and update, calculate the control value of the LQR controller, and adjust the frequency of the slave clock node to achieve master-slave clock synchronization.

Benefits of technology

It improves the accuracy and robustness of clock synchronization, meets the synchronization requirements of wireless communication networks, and reduces computing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120857245A_ABST
    Figure CN120857245A_ABST
Patent Text Reader

Abstract

The invention provides a bidirectional clock synchronization method based on an LQG control strategy, and relates to the technical field of wireless communication. Firstly, a state equation of master and slave clock nodes is constructed, clock skew of the master and slave clock nodes is defined, and a process noise covariance matrix of the master and slave clock nodes is established. And obtaining a corresponding timestamp based on bidirectional communication of the master clock node and the slave clock node. And constructing an observation equation of the master and slave clock nodes based on the timestamps. Based on the observation equation, the process noise covariance matrix and the state equation, state prediction and state updating of the master and slave clock nodes are carried out, and the optimal estimation value of the state of the master and slave clock nodes is obtained. And calculating a control value of an LQR controller based on the optimal estimated values of the states of the master and slave clock nodes, and adjusting the frequency of the slave clock nodes based on the control value to realize synchronization of the master clock nodes and the slave clock nodes. According to the clock synchronization method provided by the invention, the precision and robustness of clock synchronization are improved, and the synchronization requirement of a wireless communication network is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of wireless communication, and more specifically, relates to a bidirectional clock synchronization method and system based on LQG control strategy. Background Technology

[0002] Clock synchronization, as a fundamental service in information communication, directly impacts the overall performance of distributed collaborative systems. With the development of the Internet of Things (IoT), high-precision wireless time and frequency synchronization technology for wireless sensor networks has become a research hotspot in the PNT (Positioning, Navigation, and Timing) field. Currently, high-precision wireless time and frequency synchronization schemes still rely on satellite positioning systems (GNSS) for assistance, such as satellite timing and cooperative positioning based on pseudorange information and carrier phase analysis. GNSS-based schemes are technically mature, have stable performance, and have been widely applied. However, GNSS-based wireless clock synchronization methods have inherent limitations: they cannot provide effective synchronization services in environments with limited or denied GNSS coverage. They are difficult to apply in environments without GNSS signal coverage, such as indoors, underground, and in mines, or other scenarios where GNSS signals are denied.

[0003] To address the shortcomings of GNSS-based wireless clock synchronization methods, non-GNSS-assisted clock synchronization methods have been proposed, such as those based on Wi-Fi networks and Bluetooth, achieving microsecond-level synchronization accuracy. However, compared to the 10-20 nanosecond synchronization accuracy of GNSS, the performance of non-GNSS-assisted methods is not high, making it difficult to meet the high-precision synchronization requirements of radar detection and other applications. At the synchronization protocol level, PTP (Precision Time Protocol) has become the mainstream protocol for wired and wireless network synchronization due to its high accuracy and low cost. However, traditional wireless clock synchronization schemes based on the PTP protocol have low synchronization accuracy and only support point-to-point synchronization, making it difficult to meet the requirements of high-precision and multi-node synchronization. Furthermore, process noise exists during clock control, and existing clock synchronization methods lack sufficient synchronization accuracy to meet the long-term synchronization requirements of wireless communication networks. Summary of the Invention

[0004] To address the insufficient synchronization accuracy of existing clock synchronization methods, this invention provides a bidirectional clock synchronization method and system based on LQG control strategy. This method achieves clock synchronization, reduces computational costs, and improves the accuracy and robustness of clock synchronization, thus meeting the synchronization requirements of wireless communication networks.

[0005] To achieve the above-mentioned technical effects, the technical solution of the present invention is as follows: S1: Construct the state equations of the master and slave clock nodes, define the clock skew of the master and slave clock nodes, and establish the process noise covariance matrix of the master and slave clock nodes; S2: Obtain the corresponding timestamp based on bidirectional communication between the master clock node and the slave clock node; S3: Based on the timestamp, construct the observation equations for the master and slave clock nodes; S4: Based on the observation equation, the process noise covariance matrix, and the state equation, perform state prediction and state update of the master and slave clock nodes to obtain the optimal estimate of the master and slave clock node states; S5: Based on the optimal estimate of the master and slave clock node states, calculate the control value of the LQR controller, adjust the slave clock node frequency based on the control value, and realize the synchronization of the master and slave clock nodes.

[0006] Furthermore, the state equation of the master-slave clock node is expressed as follows:

[0007]

[0008] In the formula, This represents the state equation for the (k+1)th round of communication between master and slave clock nodes i. This represents the clock offset of communication between master and slave clock nodes i in the k-th round. This represents the state transition matrix between the master and slave clock nodes. This represents the process noise vector of the master and slave clock nodes. This represents the clock offset of the master-slave clock node i in the k-th round of communication. This represents the clock phase deviation of master-slave clock node i in the k-th round of communication. This represents the clock frequency deviation between master and slave clock nodes i in the k-th round of communication. The noise variance represents the phase deviation. The noise variance represents the frequency deviation. Indicates the time interval of the communication cycle.

[0009] Furthermore, the expression for the process noise covariance matrix of the master and slave clock nodes is as follows:

[0010] In the formula, The process noise variance represents the frequency deviation. The process noise variance represents the clock phase deviation.

[0011] Furthermore, the process of obtaining the corresponding timestamp based on bidirectional communication between the master clock node and the slave clock node is as follows: The master clock node sends a synchronization message and records the timestamp of the message. Receive synchronization messages from the master clock node from the clock node, and record the timestamp of the received synchronization message from the clock node. After a fixed transmission delay, the clock node sends an Ask message to the master clock node, recording the timestamp of the Ask message sent from the clock node. The master clock node receives Ask messages sent by the slave clock node and records the timestamp of the Ask message received by the master clock node. After a fixed transmission delay, the master clock node sends a Final message to the slave clock node, recording the timestamp of the Final message sent by the slave clock node. The master clock node receives the Final message sent by the slave clock node and records the timestamp of the Final message received by the master clock node. The expression for the relationship between the timestamps is:

[0012]

[0013]

[0014] In the formula, Indicates a fixed delay in signal transmission. This indicates that the i-th slave clock node is at its local time. global time, Indicates aggregate random delay, This indicates that the i-th slave clock node is at its local time. global time, Indicates aggregate random delay, This indicates that the i-th slave clock node is at its local time. global time, Indicates the time when the master clock node sends the synchronization message. This indicates the time when the clock node receives the synchronization message sent by the master node. Indicates the time when the Ask message was sent from the clock node. This indicates the time when the master clock node received the Ask message. Indicates the time when the master clock node sends the Final message. This indicates the time when the Final message was received from the clock node.

[0015] Furthermore, the expression for the master-slave clock node observation equation is as follows:

[0016] In the formula, This represents the observation equation for the master-slave clock node i in the k-th round. Represents the observation transition matrix, Represents the current state vector. This indicates observation noise.

[0017] Furthermore, it also includes: introducing a control term to extend the state equation, resulting in an extended state equation, expressed as:

[0018] In the formula, Indicates the control value. This represents the propagation control value.

[0019] Furthermore, based on the observation equation, the process noise covariance matrix, and the state equation, the process of predicting and updating the state of the master and slave clock nodes to obtain the optimal estimates of the master and slave clock node states is as follows: The expression for predicting the current state distribution of the master and slave clock nodes based on the state distribution of the master and slave clock nodes at the previous moment is:

[0020]

[0021] In the formula, This represents the state transition matrix between the master and slave clock nodes. This indicates the current state distribution of the master and slave clock nodes. This represents the state distribution of the master and slave clock nodes at the previous moment. Represents the control matrix. Represents the control vector. Represents the process noise covariance matrix. Represents the prior prediction covariance matrix. This represents the posterior estimate of the covariance; Based on Kalman filtering, the Kalman gain is calculated using the following expression:

[0022] In the formula, Indicates Kalman gain, This represents the transpose of the observation transition matrix. Represents the measurement noise covariance matrix; Based on the Kalman gain and the observation equation, the state distribution of the master and slave clock nodes is updated to obtain the optimal estimate of the master and slave clock node states, expressed as:

[0023]

[0024] In the formula, This represents the state distribution of the master and slave clock nodes after the update, i.e., the optimal estimate. Represent the observation equation, This represents the updated state covariance matrix of the master and slave clock nodes after the update. Let represent the initial state covariance matrix.

[0025] Furthermore, based on the optimal estimates of the master and slave clock node states, the process of calculating the control values ​​of the LQR controller is as follows: Set the cost function of the LQR controller, with the expression:

[0026] In the formula, Represents the cost function, express, Describes a positive semidefinite real symmetric matrix. Represents state variables, express, Describes a positive semidefinite real symmetric matrix. Indicates the control input quantity; Solve the Ricatti equation and calculate the steady-state control gain matrix. The expression is:

[0027] In the formula, Represents the steady-state control gain matrix. Represents the control input matrix. This indicates the positive rotation of the control input matrix; Based on the steady-state control gain matrix, the control gain is calculated using the following expression:

[0028] In the formula, Indicates control gain. The state transition matrix of the clock node, The time interval representing the communication cycle; Based on the control gain, control values ​​are generated, and the cost function of the LQR controller is minimized, expressed as:

[0029] In the formula, Indicates the control value. This represents the optimal estimate.

[0030] Furthermore, it also includes: optimizing the observation equation and the state equation to estimate the distance information between the master and slave clock nodes; The optimized state equation is expressed as follows:

[0031] , ,

[0032] In the formula, This represents the state equation of master-slave clock node i in the (k+1)th round. express, This represents the state equation of master-slave clock node i in the k-th round. Indicates process noise. This indicates the phase deviation between master and slave clock nodes i. This indicates the frequency deviation between master and slave clock node i. Indicates a fixed delay in signal transmission. The time interval representing the communication cycle. The noise representing the phase deviation of the master-slave clock node i. The noise representing the frequency deviation of master-slave clock node i This represents the noise in the distance estimation process; The optimized observation equation is expressed as follows:

[0033] , ,

[0034] In the formula, This represents the extended observation equation. Represents the observation transition matrix, This represents the state equation of clock node i in the k-th round. Indicates observation noise. Indicates aggregate random delay, Indicates aggregate random delay; The expression for the covariance matrix of the extended observation equation is:

[0035] In the formula, This represents the covariance matrix of the expanded observation equation. It represents the variance of the fixed delay in signal transmission.

[0036] This invention also provides a bidirectional clock synchronization system based on an LQG control strategy, comprising: The state equation construction module is used to construct the state equations of the master and slave clock nodes, define the clock skew of the master and slave clock nodes, and establish the process noise covariance matrix of the master and slave clock nodes. A bidirectional communication module is used to obtain the corresponding timestamps through bidirectional communication between the master clock node and the slave clock node. The observation equation construction module is used to construct the observation equations for the master and slave clock nodes based on the timestamp; The optimal estimate calculation module is used to perform state prediction and state update of the master and slave clock nodes based on the observation equation, the process noise covariance matrix and the state equation, so as to obtain the optimal estimate of the state of the master and slave clock nodes. The frequency adjustment module is used to calculate the control value of the LQR controller based on the optimal estimate of the master and slave clock node states, and adjust the frequency of the slave clock node based on the control value to achieve synchronization between the master and slave clock nodes.

[0037] Compared with existing technologies, the beneficial effects of this method are: This invention provides a bidirectional clock synchronization method and system based on an LQG control strategy. First, the state equations of the master and slave clock nodes are constructed, clock deviation is defined, and a process noise covariance matrix is ​​established. Based on the timestamps obtained from bidirectional communication between the master and slave nodes, an observation equation is constructed. Based on the observation equations, the process noise covariance matrix, and the state equations, the states of the master and slave clock nodes are predicted and updated to obtain optimal estimates of their states. Finally, based on the optimal estimates, the control values ​​of the LQG controller are calculated, and the slave clock node frequency is adjusted according to the control values, thereby achieving master-slave clock synchronization. This application combines state estimation and optimal control strategy, which can suppress the interference of random environmental noise on clock synchronization, improve the utilization efficiency of timestamp information, and improve the accuracy and robustness of clock synchronization through precise state estimation and control adjustment, meeting the synchronization requirements of wireless communication networks. Attached Figure Description

[0038] Figure 1 A flowchart illustrating the bidirectional clock synchronization method based on LQG control strategy proposed in this embodiment of the invention; Figure 2 This diagram illustrates the topology of bidirectional communication between the master clock node and the slave clock node as proposed in this embodiment of the invention. Figure 3 This diagram shows a comparison of the variance between the bidirectional clock synchronization method based on LQG control strategy proposed in this invention and the existing synchronization method ALLAN. Figure 4 This diagram illustrates the structure of the bidirectional clock synchronization system based on the LQG control strategy proposed in this embodiment of the invention. Detailed Implementation

[0039] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. To better illustrate this embodiment, some parts of the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions; It is understandable to those skilled in the art that some well-known details may be omitted from the accompanying drawings.

[0040] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0041] The positional relationships depicted in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent. Example 1 This embodiment proposes a bidirectional clock synchronization method based on an LQG control strategy, wherein the clock includes a master clock and a slave clock, such as... Figure 1 The flowchart shown illustrates the method, and the method proposed in this embodiment generally includes the following steps: S1: Construct the state equations of the master and slave clock nodes, define the clock skew of the master and slave clock nodes, and establish the process noise covariance matrix of the master and slave clock nodes; S2: Obtain the corresponding timestamp based on bidirectional communication between the master clock node and the slave clock node; S3: Based on the timestamp, construct the observation equations for the master and slave clock nodes; S4: Based on the observation equation, the process noise covariance matrix, and the state equation, perform state prediction and state update of the master and slave clock nodes to obtain the optimal estimate of the master and slave clock node states; S5: Based on the optimal estimate of the master and slave clock node states, calculate the control value of the LQR controller, adjust the slave clock node frequency based on the control value, and realize the synchronization of the master and slave clock nodes.

[0042] In this embodiment, each sensor operates independently in the network, and the expression for the clock node of each sensor is:

[0043] In the formula, This indicates that the i-th slave clock node is at its local time. global time, This indicates that the i-th slave clock node is at its local time. The cumulative clock offset, This indicates the crystal oscillator frequency of the clock.

[0044] In this embodiment, the state equation of the master and slave clock nodes is expressed as follows:

[0045]

[0046] In the formula, This represents the state equation for the (k+1)th round of communication between master and slave clock nodes i. This represents the clock offset of communication between master and slave clock nodes i in the k-th round. This represents the state transition matrix between the master and slave clock nodes. This represents the process noise vector of the master and slave clock nodes. This represents the clock offset of the master-slave clock node i in the k-th round of communication. This represents the clock phase deviation of master-slave clock node i in the k-th round of communication. This represents the clock frequency deviation between master and slave clock nodes i in the k-th round of communication. The noise variance represents the phase deviation. The noise variance represents the frequency deviation. Indicates the time interval of the communication cycle.

[0047] The expression for the process noise covariance matrix of the master and slave clock nodes is:

[0048] In the formula, The process noise variance represents the frequency deviation. The process noise variance represents the clock phase deviation.

[0049] To improve the performance of distributed collaborative systems, a novel synchronization protocol is proposed by optimizing the PTP message exchange mechanism. This protocol employs a bidirectional synchronization mechanism to accurately estimate message propagation delays and reduces network load and energy consumption by optimizing the number of messages. To further improve synchronization accuracy, the protocol applies an LQG control strategy to adjust the local clock and eliminate frequency deviations. Simultaneously, considering errors caused by environmental noise, the protocol designs a bilateral bidirectional clock synchronization scheme and optimizes the observation equation based on Raman filtering, improving measurement accuracy. Based on these conclusions, it is first assumed that the oscillation frequency of the clock node crystal is the nominal frequency, and the data link layer is symmetrical. Furthermore, during propagation, the message propagation delay is also symmetrical and equal. Assuming the master clock node provides precise time information with no phase or frequency deviation, since the recorded times are all local times, they need to be uniformly converted to global time before clock synchronization can be performed. After the synchronization process is complete, bidirectional communication between the clock node and the slave clock nodes, such as... Figure 2 The topology diagram showing bidirectional communication between the master clock node and the slave clock node illustrates the process of obtaining the corresponding timestamp: the master clock node sends a synchronization message, and the timestamp of the master clock node sending the synchronization message is recorded. Receive synchronization messages from the master clock node from the clock node, and record the timestamp of the received synchronization message from the clock node. After a fixed transmission delay, the clock node sends an Ask message to the master clock node, recording the timestamp of the Ask message sent from the clock node. The master clock node receives Ask messages sent by the slave clock node and records the timestamp of the Ask message received by the master clock node. After a fixed transmission delay, the master clock node sends a Final message to the slave clock node, recording the timestamp of the Final message sent by the slave clock node. The master clock node receives the Final message sent by the slave clock node and records the timestamp of the Final message received by the master clock node. The expression for the relationship between the timestamps is:

[0050]

[0051]

[0052] In the formula, Indicates a fixed delay in signal transmission. This indicates that the i-th slave clock node is at its local time. global time, Indicates aggregate random delay, This indicates that the i-th slave clock node is at its local time. global time, Indicates aggregate random delay, This indicates that the i-th slave clock node is at its local time. global time, Indicates the time when the master clock node sends the synchronization message. This indicates the time when the clock node receives the synchronization message sent by the master node. Indicates the time when the Ask message was sent from the clock node. This indicates the time when the master clock node received the Ask message. Indicates the time when the master clock node sends the Final message. This represents the time it takes to receive the Final message from the clock node. The aggregated random delay can be represented as a value with a mean of 0 and a variance of... It is a Gaussian random distribution.

[0053] In this embodiment, , , This represents a fixed delay from receiving a message to sending it. During this fixed delay, the system needs to perform necessary operations such as synchronization state determination and delayed message encapsulation. The time spent by the processor performing these operations is uncertain. The protocol in this application replaces the operational delay with a fixed delay to eliminate processing delay errors in the system.

[0054] Substituting the expression for the relationship between timestamps into the expression for the state equation of the master and slave clock nodes, we obtain the following expression:

[0055] .

[0056] To estimate propagation delay and clock skew, the clock parameter can be treated as constant within each communication cycle when using a conventional Kalman filter. Based on the state equation and observation equation, the cumulative clock skew can be estimated using a standard Kalman filter. Make an estimate and obtain the estimated result. ,Will Substitute into the calculation of propagation delay Therefore, it can be approximated. The resulting expression is: .

[0057] In practical applications, the accumulated clock skew is constantly changing. The frequency skew for each communication cycle is set. It is a constant. It can be represented by a first-order Taylor series, and the expression is: 。

[0058] Substituting the first-order Taylor series expression into... , superimposed The expression for the master-slave clock node observation equation is obtained as follows:

[0059] In the formula, This represents the observation equation for the master-slave clock node i in the k-th round. Represents the observation transition matrix, Represents the current state vector. This indicates observation noise.

[0060] In the formula, , , .

[0061] In this embodiment, due to the influence of process noise during master-slave clock synchronization, the phase deviation accumulates over time under the influence of white noise and random walk noise. Synchronizing master-slave clock nodes requires not only high control precision but also high robustness and low power consumption due to low computational cost. This invention uses LQG control to reduce the impact of process noise.

[0062] The state equations of the master and slave clock nodes only describe the behavior of the freely operating frequency standard. If control values ​​are applied to the frequency standard, the state equations of the master and slave clock nodes must pass through control terms. Extend.

[0063] By introducing control terms to extend the state equation, we obtain the extended state equation, expressed as:

[0064] In the formula, Indicates the control value. This represents the propagation control value.

[0065] In this embodiment, the process of predicting and updating the state of the master and slave clock nodes based on the observation equation, the process noise covariance matrix, and the state equation, to obtain the optimal estimate of the master and slave clock node states, is as follows: A Kalman filter is configured, and the prediction steps of the Kalman filter are performed based on the observation equation, the process noise covariance matrix, and the state equation. Initial state covariance matrix. The value needs to be assigned based on the deviation between the initial state and the actual state of the clock node. If the deviation is unknown, then... Initialize to identity matrix The Kalman filter's prediction steps include state prediction and state covariance prediction. Its function is to predict the current state distribution based on the state distribution of the previous time step.

[0066] The expression for predicting the current state distribution of the master and slave clock nodes based on the state distribution of the master and slave clock nodes at the previous moment is:

[0067]

[0068] In the formula, This represents the state transition matrix between the master and slave clock nodes. This indicates the current state distribution of the master and slave clock nodes. This represents the state distribution of the master and slave clock nodes at the previous moment. Represents the control matrix. Represents the control vector. Represents the process noise covariance matrix. Represents the prior prediction covariance matrix. This represents the posterior estimate of the covariance; Based on Kalman filtering, the Kalman gain is calculated using the following expression:

[0069] In the formula, Indicates Kalman gain, This represents the transpose of the observation transition matrix. Represents the measurement noise covariance matrix; Based on the Kalman gain and the observation equation, the state distribution of the master and slave clock nodes is updated to obtain the optimal estimate of the master and slave clock node states, expressed as:

[0070]

[0071] In the formula, This represents the state distribution of the master and slave clock nodes after the update, i.e., the optimal estimate. Represent the observation equation, This represents the updated state covariance matrix of the master and slave clock nodes after the update. Let represent the initial state covariance matrix.

[0072] Based on the optimal estimates of the master and slave clock node states, the process of calculating the control values ​​of the LQR controller is as follows: Set the cost function of the LQR controller, with the expression:

[0073] In the formula, Represents the cost function, express, Describes a positive semidefinite real symmetric matrix. Represents state variables, express, Describes a positive semidefinite real symmetric matrix. Indicates the control input quantity; Solve the Ricatti equation and calculate the steady-state control gain matrix. The expression is:

[0074] In the formula, Represents the steady-state control gain matrix. Represents the control input matrix. This indicates the positive rotation of the control input matrix. and Let represent a 3x3 positive semidefinite real symmetric matrix.

[0075] Based on the steady-state control gain matrix, the control gain is calculated using the following expression:

[0076] In the formula, Indicates control gain. The state transition matrix of the clock node, The time interval representing the communication cycle; Based on the control gain, control values ​​are generated, and the cost function of the LQR controller is minimized, expressed as:

[0077] In the formula, Indicates the control value. This represents the optimal estimate.

[0078] like Figure 3 The diagram shows a comparison of the ALLAN variance between the bidirectional clock synchronization method based on the LQG control strategy and existing synchronization methods. The black dashed line represents the ALLAN variance curve of a freely running, uncontrolled clock; the blue dashed crosses represent the ALLAN variance curve using the traditional Kalman model under LQG control; and the red curve represents the ALLAN variance curve using the bidirectional clock synchronization method based on the LQG control strategy. The red curve is significantly superior to both the blue and black curves, indicating that the method proposed in this embodiment can more effectively improve the long-term stability of clock synchronization.

[0079] Example 2 In this embodiment, a bidirectional clock synchronization method based on LQG control strategy is provided, which further includes optimizing the observation equation and the state equation to estimate the distance information between the master and slave clock nodes.

[0080] In traditional Kalman filtering, due to neglect of estimation... Furthermore, when distance information needs to be estimated, it can be extended to jointly estimate clock parameters and relative distance.

[0081] The optimized state equation is expressed as follows:

[0082] , ,

[0083] In the formula, This represents the state equation of master-slave clock node i in the (k+1)th round. express, This represents the state equation of master-slave clock node i in the k-th round. Indicates process noise. This indicates the phase deviation between master and slave clock nodes i. This indicates the frequency deviation between master and slave clock node i. Indicates a fixed delay in signal transmission. The time interval representing the communication cycle. The noise representing the phase deviation of the master-slave clock node i. The noise representing the frequency deviation of master-slave clock node i This represents the noise in the distance estimation process. The mean is 0. The variance is .

[0084] Since propagation delay is independent of clock phase and frequency deviations, process noise The expression for the covariance matrix is:

[0085] The optimized observation equation is expressed as follows:

[0086] , ,

[0087] In the formula, This represents the extended observation equation. Represents the observation transition matrix, This represents the state equation of clock node i in the k-th round. Indicates observation noise. Indicates aggregate random delay, This indicates an aggregated random delay.

[0088] The expression for the covariance matrix of the extended observation equation is:

[0089] In the formula, This represents the covariance matrix of the expanded observation equation. It represents the variance of the fixed delay in signal transmission.

[0090] Example 3 This invention also provides a bidirectional clock synchronization system based on an LQG control strategy, such as... Figure 4 The structural diagram shown includes: The state equation construction module is used to construct the state equations of the master and slave clock nodes, define the clock skew of the master and slave clock nodes, and establish the process noise covariance matrix of the master and slave clock nodes. A bidirectional communication module is used to obtain the corresponding timestamps through bidirectional communication between the master clock node and the slave clock node. The observation equation construction module is used to construct the observation equations for the master and slave clock nodes based on the timestamp; The optimal estimate calculation module is used to perform state prediction and state update of the master and slave clock nodes based on the observation equation, the process noise covariance matrix and the state equation, so as to obtain the optimal estimate of the state of the master and slave clock nodes. The frequency adjustment module is used to calculate the control value of the LQR controller based on the optimal estimate of the master and slave clock node states, and adjust the frequency of the slave clock node based on the control value to achieve synchronization between the master and slave clock nodes.

[0091] This embodiment provides a bidirectional clock synchronization system based on an LQG control strategy. It utilizes timestamp information to improve the synchronization accuracy of master and slave clock nodes and supports joint estimation of clock parameters and relative distance. Using the LQG control strategy reduces the impact of random environmental noise on the clock synchronization process and achieves a better trade-off between synchronization accuracy and system resource consumption, making the entire network containing multiple clocks more efficient and energy-saving.

[0092] The embodiments described are merely examples to clearly illustrate the present invention and are not intended to limit the implementation of the invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively describe all possible implementations. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A bidirectional clock synchronization method based on an LQG control strategy, wherein the clock includes a master clock and a slave clock, characterized in that, Includes the following steps: S1: Construct the state equations of the master and slave clock nodes, define the clock skew of the master and slave clock nodes, and establish the process noise covariance matrix of the master and slave clock nodes; S2: Obtain the corresponding timestamp based on bidirectional communication between the master clock node and the slave clock node; S3: Based on the timestamp, construct the observation equations for the master and slave clock nodes; S4: Based on the observation equation, the process noise covariance matrix, and the state equation, perform state prediction and state update of the master and slave clock nodes to obtain the optimal estimate of the master and slave clock node states; S5: Based on the optimal estimate of the master and slave clock node states, calculate the control value of the LQR controller, adjust the slave clock node frequency based on the control value, and realize the synchronization of the master and slave clock nodes.

2. The bidirectional clock synchronization method based on LQG control strategy according to claim 1, characterized in that, The state equation of the master and slave clock nodes is expressed as follows: In the formula, This represents the state equation for the (k+1)th round of communication between master and slave clock nodes i. This represents the clock offset of communication between master and slave clock nodes i in the k-th round. This represents the state transition matrix between the master and slave clock nodes. This represents the process noise vector of the master and slave clock nodes. This represents the clock offset of the master-slave clock node i in the k-th round of communication. This represents the clock phase deviation of master-slave clock node i in the k-th round of communication. This represents the clock frequency deviation between master and slave clock nodes i in the k-th round of communication. The noise variance represents the phase deviation. The noise variance represents the frequency deviation. Indicates the time interval of the communication cycle.

3. The bidirectional clock synchronization method based on LQG control strategy according to claim 1, characterized in that, The expression for the process noise covariance matrix of the master and slave clock nodes is: In the formula, The process noise variance represents the frequency deviation. The process noise variance represents the clock phase deviation.

4. The bidirectional clock synchronization method based on LQG control strategy according to claim 1, characterized in that, The process of obtaining the corresponding timestamp based on bidirectional communication between the master clock node and the slave clock node is as follows: The master clock node sends a synchronization message and records the timestamp of the message. Receive synchronization messages from the master clock node from the clock node, and record the timestamp of the received synchronization message from the clock node. After a fixed transmission delay, the clock node sends an Ask message to the master clock node, recording the timestamp of the Ask message sent from the clock node. The master clock node receives Ask messages sent by the slave clock node and records the timestamp of the Ask message received by the master clock node. After a fixed transmission delay, the master clock node sends a Final message to the slave clock node and records the timestamp of the Final message sent by the slave clock node. The master clock node receives the Final message sent by the slave clock node and records the timestamp of the Final message received by the master clock node. The expression for the relationship between the timestamps is: In the formula, Indicates a fixed delay in signal transmission. This indicates that the i-th slave clock node is at its local time. global time, Indicates aggregate random delay, This indicates that the i-th slave clock node is at its local time. global time, Indicates aggregate random delay, This indicates that the i-th slave clock node is at its local time. global time, Indicates the time when the master clock node sends the synchronization message. This indicates the time when the clock node receives the synchronization message sent by the master node. Indicates the time when the Ask message was sent from the clock node. This indicates the time when the master clock node received the Ask message. Indicates the time when the master clock node sends the Final message. This indicates the time when the Final message was received from the clock node.

5. A bidirectional clock synchronization method based on LQG control strategy according to claim 1, characterized in that, The expression for the master-slave clock node observation equation is as follows: In the formula, This represents the observation equation for the master-slave clock node i in the k-th round. Represents the observation transition matrix, Represents the current state vector. This indicates observation noise.

6. A bidirectional clock synchronization method based on LQG control strategy according to claim 2, characterized in that, It also includes: introducing control terms to extend the state equation, resulting in an extended state equation, expressed as: In the formula, Indicates the control value. This represents the propagation control value.

7. A bidirectional clock synchronization method based on LQG control strategy according to claim 6, characterized in that, Based on the observation equation, the process noise covariance matrix, and the state equation, the process of predicting and updating the state of the master and slave clock nodes to obtain the optimal estimates of their states is as follows: The expression for predicting the current state distribution of the master and slave clock nodes based on the state distribution of the master and slave clock nodes at the previous moment is: In the formula, This represents the state transition matrix between the master and slave clock nodes. This indicates the current state distribution of the master and slave clock nodes. This represents the state distribution of the master and slave clock nodes at the previous moment. Represents the control matrix. Represents the control vector. Represents the process noise covariance matrix. Represents the prior prediction covariance matrix. This represents the posterior estimate of the covariance; Based on Kalman filtering, the Kalman gain is calculated using the following expression: In the formula, Indicates Kalman gain, This represents the transpose of the observation transition matrix. Represents the measurement noise covariance matrix; Based on the Kalman gain and the observation equation, the state distribution of the master and slave clock nodes is updated to obtain the optimal estimate of the master and slave clock node states, expressed as: In the formula, This represents the state distribution of the master and slave clock nodes after the update, i.e., the optimal estimate. Represent the observation equation, This represents the updated state covariance matrix of the master and slave clock nodes after the update. Let represent the initial state covariance matrix.

8. A bidirectional clock synchronization method based on LQG control strategy according to claim 6, characterized in that, Based on the optimal estimates of the master and slave clock node states, the process of calculating the control values ​​of the LQR controller is as follows: Set the cost function of the LQR controller, with the expression: In the formula, Represents the cost function, express, Describes a positive semidefinite real symmetric matrix. Represents state variables, express, Describes a positive semidefinite real symmetric matrix. Indicates the control input quantity; Solve the Ricatti equation and calculate the steady-state control gain matrix. The expression is: In the formula, Represents the steady-state control gain matrix. Represents the control input matrix. This indicates the positive rotation of the control input matrix; Based on the steady-state control gain matrix, the control gain is calculated using the following expression: In the formula, Indicates control gain. The state transition matrix of the clock node, The time interval that indicates the communication cycle; Based on the control gain, control values ​​are generated, and the cost function of the LQR controller is minimized, expressed as: In the formula, Indicates the control value. This represents the optimal estimate.

9. A bidirectional clock synchronization method based on LQG control strategy according to claim 1, characterized in that, Also includes: The observation equation and the state equation are optimized to estimate the distance information between the master and slave clock nodes; The optimized state equation is expressed as follows: , , In the formula, This represents the state equation of master-slave clock node i in the (k+1)th round. express, This represents the state equation of master-slave clock node i in the k-th round. Indicates process noise. This indicates the phase deviation between master and slave clock nodes i. This indicates the frequency deviation between master and slave clock node i. Indicates a fixed delay in signal transmission. The time interval representing the communication cycle. The noise representing the phase deviation of the master-slave clock node i. The noise representing the frequency deviation of master-slave clock node i This represents the noise in the distance estimation process; The optimized observation equation is expressed as follows: , , In the formula, This represents the extended observation equation. Represents the observation transition matrix, This represents the state equation of clock node i in the k-th round. Indicates observation noise. Indicates aggregate random delay, Indicates aggregate random delay, The expression for the covariance matrix of the extended observation equation is: In the formula, This represents the covariance matrix of the expanded observation equation. It represents the variance of the fixed delay in signal transmission.

10. A bidirectional clock synchronization system based on an LQG control strategy, used to implement the bidirectional clock synchronization method based on an LQG control strategy as described in any one of claims 1-9, characterized in that, include: The state equation construction module is used to construct the state equations of the master and slave clock nodes, define the clock skew of the master and slave clock nodes, and establish the process noise covariance matrix of the master and slave clock nodes. A bidirectional communication module is used to obtain the corresponding timestamps through bidirectional communication between the master clock node and the slave clock node. The observation equation construction module is used to construct the observation equations for the master and slave clock nodes based on the timestamp; The optimal estimate calculation module is used to predict and update the state of the clock node based on the observation equation, the process noise covariance matrix and the state equation, so as to obtain the optimal estimate of the state of the master and slave clock nodes. The frequency adjustment module is used to calculate the control value of the LQR controller based on the optimal estimate of the master and slave clock node states, and adjust the frequency of the slave clock node based on the control value to achieve synchronization between the master and slave clock nodes.