Distributed wireless network time synchronization method and device based on enhanced clock model

By adopting enhanced clock model and Kalman filtering algorithm in distributed wireless networks, the shortcomings of existing time synchronization methods in high precision and anti-interference are solved, and higher precision and stable time synchronization are achieved.

CN120018270AActive Publication Date: 2025-05-16NAT UNIV OF DEFENSE TECH +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510483720.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-05-16
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

The existing time synchronization method based on wireless communication protocol is difficult to achieve the ideal synchronization effect under the background of high-precision requirements, and is susceptible to external interference and channel attenuation.

Method used

The distributed wireless network time synchronization method based on the enhanced clock model is adopted. By constructing a network connection topology diagram, the time difference and frequency difference between each node and adjacent nodes are calculated, and iterative estimation is used to realize clock compensation and frequency compensation, and the time synchronization accuracy is improved.

Benefits of technology

It significantly improves the time synchronization accuracy of distributed wireless networks, enhances anti-interference ability and system stability, and is suitable for complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120018270A_ABST
    Figure CN120018270A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed wireless network time synchronization method and device based on an enhanced clock model. The method comprises the following steps: constructing a network connection topological graph of a distributed wireless network; calculating a time difference and a frequency difference between each node and an adjacent node according to the enhanced clock model, performing state estimation according to the time difference and the frequency difference to obtain a time difference state vector and a frequency difference state vector, and obtaining a joint state vector according to the time difference state vector and the frequency difference state vector; constructing a system state transition equation and a system state observation equation of the combined state vector; performing iteration based on a Kalman filtering algorithm according to the system state transition equation and the system state observation equation to obtain optimal estimation values of time difference and frequency difference between each node and adjacent nodes, performing clock compensation and frequency compensation on the corresponding nodes according to the optimal estimation values, and iteratively updating the optimal estimation value at each moment. And time synchronization of the distributed wireless network is realized. By adopting the method, the time synchronization precision of the distributed wireless network can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communication technology, and in particular to a distributed wireless network time synchronization method and device based on an enhanced clock model. Background Art

[0002] With the rapid development of the Internet of Things (IoT) and the Industrial Internet, more and more applications have put forward higher requirements for time synchronization accuracy. Accurate time synchronization plays an indispensable role in the fields of drone cluster flight control, Internet of Vehicles data synchronization, wireless sensor network positioning, distributed network communication, etc.

[0003] At present, IoT time synchronization technology generally relies on methods based on wireless communication protocols, including Bluetooth, Wi-Fi, Zigbee, etc. Different protocols have their own advantages and are suitable for different scenarios. Bluetooth-based time synchronization is usually achieved through periodic broadcast signals, that is, by sending and receiving timestamps to calculate time differences and correct device clocks. The Wi-Fi time synchronization method mainly relies on the IEEE 802.11 protocol or the timestamp transmission mechanism based on the MAC layer, which can provide higher synchronization accuracy than Bluetooth. By generating and transmitting accurate timestamp information at the MAC layer, Wi-Fi devices can increase the synchronization accuracy to 1 to 10 microseconds. Even in local networks, sub-microsecond synchronization accuracy can be achieved through accurate timestamp recording and high-frequency correction.

[0004] Although the above-mentioned time synchronization method based on wireless communication protocol has a wide range of applications, its synchronization accuracy still has certain limitations. For example: wireless communication is extremely susceptible to external interference and channel attenuation, especially in complex environments, where interference can cause signal loss or delay, thereby reducing the accuracy of time synchronization; IoT devices usually use low-cost crystal oscillators, which have low frequency stability, causing the local clock of the device to drift easily, increasing the time synchronization error; in distributed wireless sensor networks, signals need to be transmitted through multiple hop nodes, and differences in network paths can lead to reduced synchronization accuracy.

[0005] Therefore, although time synchronization methods based on wireless communication protocols such as Bluetooth, Wi-Fi, and Zigbee have certain advantages, these methods still find it difficult to achieve ideal synchronization effects under the background of high-precision requirements. Summary of the invention

[0006] Based on this, it is necessary to provide a distributed wireless network time synchronization method and device based on an enhanced clock model to address the above-mentioned technical problems such as low time synchronization accuracy and susceptibility to interference, so as to improve the time synchronization accuracy of time synchronization methods based on wireless communication protocols such as Bluetooth, Wi-Fi, and Zigbee.

[0007] A distributed wireless network time synchronization method based on an enhanced clock model, the method comprising: Constructing a network connection topology diagram of a distributed wireless network; the network connection topology diagram includes nodes and edges, where the nodes are communication devices in the distributed wireless network and the edges represent wireless connection relationships between the nodes; The time difference and frequency difference between each node and the adjacent node are calculated according to the pre-built enhanced clock model, and the state is estimated according to the time difference and frequency difference to obtain the time difference state vector and the frequency difference state vector. The joint state vector is obtained according to the time difference state vector and the frequency difference state vector, and the system state transfer equation and system state observation equation of the joint state vector are constructed; According to the system state transfer equation and the system state observation equation, the Kalman filter algorithm is iterated to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes. According to the optimal estimated values ​​of the time difference and frequency difference, clock compensation and frequency compensation are performed on the corresponding nodes respectively, and the optimal estimated values ​​at each moment are iteratively updated to achieve time synchronization of distributed wireless networks.

[0008] A distributed wireless network time synchronization device based on an enhanced clock model, the device comprising: A topology map construction module is used to construct a network connection topology map of a distributed wireless network; the network connection topology map includes nodes and edges, where the nodes are communication devices in the distributed wireless network and the edges represent wireless connection relationships between the nodes; A state estimation module is used to calculate the time difference and frequency difference between each node and the adjacent node according to the pre-built enhanced clock model, perform state estimation according to the time difference and frequency difference, obtain the time difference state vector and the frequency difference state vector, obtain the joint state vector according to the time difference state vector and the frequency difference state vector, and construct the system state transfer equation and system state observation equation of the joint state vector; The time synchronization module is used to iterate based on the Kalman filter algorithm according to the system state transfer equation and the system state observation equation to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes, perform clock compensation and frequency compensation on the corresponding nodes according to the optimal estimated values ​​of the time difference and frequency difference, iteratively update the optimal estimated value at each moment, and realize time synchronization of distributed wireless networks.

[0009] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: Constructing a network connection topology diagram of a distributed wireless network; the network connection topology diagram includes nodes and edges, where the nodes are communication devices in the distributed wireless network and the edges represent wireless connection relationships between the nodes; The time difference and frequency difference between each node and the adjacent node are calculated according to the pre-built enhanced clock model, and the state is estimated according to the time difference and frequency difference to obtain the time difference state vector and the frequency difference state vector. The joint state vector is obtained according to the time difference state vector and the frequency difference state vector, and the system state transfer equation and system state observation equation of the joint state vector are constructed; According to the system state transfer equation and the system state observation equation, the Kalman filter algorithm is iterated to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes. According to the optimal estimated values ​​of the time difference and frequency difference, clock compensation and frequency compensation are performed on the corresponding nodes respectively, and the optimal estimated values ​​at each moment are iteratively updated to achieve time synchronization of distributed wireless networks.

[0010] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps: Constructing a network connection topology diagram of a distributed wireless network; the network connection topology diagram includes nodes and edges, where the nodes are communication devices in the distributed wireless network and the edges represent wireless connection relationships between the nodes; The time difference and frequency difference between each node and the adjacent node are calculated according to the pre-built enhanced clock model, and the state is estimated according to the time difference and frequency difference to obtain the time difference state vector and the frequency difference state vector. The joint state vector is obtained according to the time difference state vector and the frequency difference state vector, and the system state transfer equation and system state observation equation of the joint state vector are constructed; According to the system state transfer equation and the system state observation equation, the Kalman filter algorithm is iterated to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes. According to the optimal estimated values ​​of the time difference and frequency difference, clock compensation and frequency compensation are performed on the corresponding nodes respectively, and the optimal estimated values ​​at each moment are iteratively updated to achieve time synchronization of distributed wireless networks.

[0011] The above-mentioned distributed wireless network time synchronization method and device based on the enhanced clock model, by constructing a network connection topology diagram of the distributed wireless network, the network connection topology diagram includes nodes and edges, the nodes are communication devices in the distributed wireless network, and the edges represent the wireless connection relationship between the nodes, accurately calculating the time difference and frequency difference between each node and the adjacent node according to the pre-constructed enhanced clock model, performing state estimation according to the time difference and frequency difference, obtaining the time difference state vector and the frequency difference state vector, obtaining the joint state vector according to the time difference state vector and the frequency difference state vector, constructing the system state transfer equation and the system state observation equation of the joint state vector; performing iteration based on the Kalman filter algorithm according to the system state transfer equation and the system state observation equation, obtaining the optimal estimated value of the time difference and frequency difference between each node and the adjacent node, performing clock compensation and frequency compensation on the corresponding nodes according to the optimal estimated value of the time difference and frequency difference, iteratively updating the optimal estimated value at each moment, and realizing the time synchronization of the distributed wireless network. The embodiment of the present invention can improve the time synchronization accuracy of the distributed wireless network. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram of a flow chart of a time synchronization method for a wireless sensor network based on a consistency strategy in an embodiment; Figure 2 A schematic diagram of filtering operation logic in one embodiment; Figure 3 A schematic diagram of filtering operation effect in a specific embodiment; Figure 4 is a structural block diagram of a distributed wireless network time synchronization device based on an enhanced clock model in one embodiment; Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0013] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0014] In one embodiment, Figure 1 As shown, a distributed wireless network time synchronization method based on an enhanced clock model is provided, comprising the following steps: Step 102: construct a network connection topology diagram of the distributed wireless network.

[0015] First, a distributed system topology model is constructed, including the status of each node and the overall topological connection diagram of the system. This can comprehensively analyze the status of each node and the overall connection status of the system, thereby ensuring the stability of the system structure. The network connection topology diagram includes nodes and edges. Nodes are communication devices in distributed wireless networks, and edges represent wireless connection relationships between nodes. Distributed wireless networks can be wireless sensor networks (WSNs), UAV networks (UAV Networks), vehicle networks (VANETs), and distributed industrial Internet of Things (IIoT).

[0016] Step 104, calculate the time difference and frequency difference between each node and the adjacent node according to the pre-constructed enhanced clock model, perform state estimation based on the time difference and frequency difference to obtain the time difference state vector and the frequency difference state vector, obtain the joint state vector based on the time difference state vector and the frequency difference state vector, and construct the system state transfer equation and system state observation equation of the joint state vector.

[0017] Taking into account the impact of external physical properties such as temperature, pressure, and vibration on clock accuracy, an enhanced clock model is constructed to greatly reduce the time error caused by external factors and improve the accuracy of time synchronization.

[0018] Step 106, iterate based on the Kalman filter algorithm according to the system state transfer equation and the system state observation equation to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes, perform clock compensation and frequency compensation on the corresponding nodes according to the optimal estimated values ​​of the time difference and frequency difference, iteratively update the optimal estimated value at each moment, and realize time synchronization of the distributed wireless network.

[0019] Kalman filtering can dynamically track clock changes, update system state predictions and covariance in real time, and effectively eliminate clock noise and improve the accuracy of time-frequency estimation. The automated adjustment and real-time correction of this process improve synchronization accuracy and system stability. The method of the present invention uses a consistency strategy to achieve multi-node collaborative synchronization. Time synchronization can be achieved when the time difference and frequency difference between the node and the surrounding broadcast nodes are zero. By compensating the optimal estimate of the time difference and frequency difference obtained by the Kalman filter with the average value of the surrounding nodes, the time error between the nodes is gradually eliminated, ensuring the synchronization of all nodes in the distributed system. It can significantly improve the overall synchronization effect of the system, especially in a multi-node environment with high robustness and adaptability.

[0020] The method of the present invention first models the clock synchronization model, and then obtains timestamp data that is closer to the true value by filtering the acquired timestamp data. Finally, consistency synchronization is performed based on the surrounding adjacent timestamp data, so that the clocks of each node in the distributed system are close to each other, and nanosecond synchronization can be achieved. By enhancing the application of clock modeling and Kalman filtering, the method of the present invention effectively resists the influence of external interference and random noise, and improves the stability and anti-interference of clock synchronization. Therefore, the method can also maintain a high synchronization accuracy in a complex network environment, and is suitable for application scenarios with environmental instability, signal interference and large topological changes.

[0021] In the above-mentioned wireless sensor network time synchronization method based on consistency strategy, by constructing a network connection topology diagram of a distributed wireless network, the network connection topology diagram includes nodes and edges, the nodes are communication devices in the distributed wireless network, and the edges represent the wireless connection relationship between the nodes. The time difference and frequency difference between each node and the adjacent node are calculated according to the pre-constructed enhanced clock model, and the state estimation is performed according to the time difference and frequency difference to obtain the time difference state vector and the frequency difference state vector. The joint state vector is obtained according to the time difference state vector and the frequency difference state vector, and the system state transfer equation and the system state observation equation of the joint state vector are constructed; according to the system state transfer equation and the system state observation equation, it is iterated based on the Kalman filter algorithm to obtain the optimal estimated value of the time difference and frequency difference between each node and the adjacent node, and the corresponding nodes are respectively compensated for clock and frequency according to the optimal estimated value of the time difference and frequency difference, and the optimal estimated value at each moment is iteratively updated to achieve time synchronization of the distributed wireless network. The embodiment of the present invention can improve the time synchronization accuracy of the distributed wireless network.

[0022] In one embodiment, the enhanced clock model is: ; in, Indicates that the clock is The readings of the time, represents the clock reading at the initial time, Indicates the current frequency of the clock. is the linear frequency drift, In this embodiment, in order to achieve high-precision clock synchronization, the time-frequency characteristics of the clock are fully considered, including the influence of changes in physical characteristics such as temperature, pressure and vibration, as well as the influence of noise, etc., and an enhanced clock model as shown in the above formula is constructed according to the clock characteristics.

[0023] In one embodiment, the system state transition equation is: ; in, is the state transfer matrix, is the system noise matrix, for The system state prediction vector at time , for The system status at the moment, is the system linear frequency drift error. In this embodiment, the noise covariance is .

[0024] In one embodiment, the system state observation equation is: ; in, is the system state observation value, is the joint state vector, is the observation noise. In this embodiment, is the observation matrix, the observation noise has a mean of 0 and a covariance of Gaussian distribution.

[0025] According to the enhanced clock model, the state transition formula of the time difference and frequency difference between two nodes can be obtained: ; ; Where: Indicates that the distance between two nodes is The clock difference, Indicates that the distance between two nodes is The above variables are combined to form a joint state vector : .

[0026] In one embodiment, an iteration based on a Kalman filter algorithm is performed according to a system state transfer equation and a system state observation equation to obtain the optimal estimate of the time difference and frequency difference between each node and an adjacent node, including: obtaining a system state prediction vector for the next moment according to the system state of each node at the current moment and the system state transfer equation; updating the Kalman gain coefficient according to the current state prediction covariance matrix, and correcting the system state prediction vector according to the Kalman gain coefficient and the system state observation equation to obtain the optimal estimate of the time difference and frequency difference in the current iteration; iteratively updating the covariance matrix until the condition for stopping the iteration is met, stopping the iteration, and outputting the optimal estimate of the time difference and frequency difference between each node and an adjacent node.

[0027] In this embodiment, according to the enhanced clock model and the dynamic change of the clock, the time difference and frequency difference between nodes also change dynamically. In order to improve the estimation performance of the clock-to-clock difference to the time-frequency, the method of the present invention uses a Kalman filter to perform real-time estimation. Figure 2 As shown in the figure, a filtering operation logic diagram is provided. The filtering method will first update the system state prediction vector, and then maintain the system state prediction covariance matrix and the Kalman gain coefficient , the optimal estimate can be obtained based on the above two parameters, namely , and finally update the covariance of the system , waiting to enter the next calculation.

[0028] In one embodiment, clock compensation and frequency compensation are performed on corresponding nodes according to the optimal estimated values ​​of time difference and frequency difference respectively, including: obtaining a clock compensation value according to the average of the optimal estimated values ​​of the time difference between the current node and the adjacent nodes, and performing clock compensation on the current node according to the clock compensation value; obtaining a frequency compensation value according to the average of the optimal estimated values ​​of the frequency difference between the current node and the adjacent nodes, and performing frequency compensation on the current node according to the frequency compensation value.

[0029] In this embodiment, the optimal estimate of the clock parameter difference between the two nodes can be obtained after filtering. According to the idea of ​​average consistency, synchronization can be achieved when the time difference and frequency difference between the node and the surrounding broadcast nodes are 0. The core goal of the consistency theory is to make multiple nodes gradually tend to a consistent state through mutual interaction and information sharing. Average consistency is one of the methods, which emphasizes that through the interactive iteration of local information, the state values ​​of all nodes gradually converge to a certain global average. In the time synchronization problem of the present invention, the state value of the node corresponds to the time difference and frequency difference. When the time difference and frequency difference are both 0, the clock synchronization between the nodes is not only completely consistent in instantaneous time, but also consistent in the subsequent passage of time. The optimal estimate of the clock parameter difference between the node and the surrounding nodes is averaged and compensated. The compensation process is shown in the following formula: ; ; in: and Represents the compensated local clock and frequency, and Indicates the current local clock and frequency of the node, Indicates the number of nodes around the node, and Represents the optimal estimated value of the time difference and frequency difference between two nodes obtained by Kalman filtering.

[0030] In one embodiment, each node in the network connection topology uses a stable clock source as a clock module. In this embodiment, the node uses a relatively stable clock source as the clock module of each node, which can ensure the accuracy of the node clock and reduce the drift of the node clock.

[0031] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0032] In a specific embodiment, the method of the present invention is applied to a local clock noise of 10 -9 The observation error is within 10 -9 In the time synchronization system, the initial range of the clock used by the clock synchronization system is [-5s, 5s], the frequency is [0.99999999, 1.00000001], and the standard deviation of the frequency is There are 50 nodes in total, and the topology between nodes is known during deployment. The node single sampling period is 1s, and the total test duration is 500s. During the operation of the clock synchronization system, 2 nodes were randomly selected to check the filtering effect, such as Figure 3 As shown in the figure, it can be seen that the present invention can effectively eliminate the clock noise between two nodes, avoid abnormal clock values, and effectively avoid clock jitter after filtering, thereby improving the accuracy of time-frequency estimation. After the clock synchronization system has been running for 500s, the average time difference between each node and node 1 is , the average frequency difference is .

[0033] In one embodiment, Figure 4 As shown, a wireless sensor network time synchronization device based on a consistency strategy is provided, comprising: A topology map construction module 402 is used to construct a network connection topology map of a distributed wireless network; the network connection topology map includes nodes and edges, where a node is a communication device in the distributed wireless network and an edge represents a wireless connection relationship between nodes; A state estimation module 404 is used to calculate the time difference and frequency difference between each node and the adjacent node according to the pre-built enhanced clock model, perform state estimation according to the time difference and frequency difference, obtain a time difference state vector and a frequency difference state vector, obtain a joint state vector according to the time difference state vector and the frequency difference state vector, and construct a system state transfer equation and a system state observation equation of the joint state vector; The time synchronization module 406 is used to perform iteration based on the Kalman filter algorithm according to the system state transfer equation and the system state observation equation to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes, perform clock compensation and frequency compensation on the corresponding nodes according to the optimal estimated values ​​of the time difference and frequency difference, iteratively update the optimal estimated value at each moment, and realize time synchronization of the distributed wireless network.

[0034] In one embodiment, the enhanced clock model is: ; in, Indicates that the clock is The readings of the time, represents the clock reading at the initial time, Indicates the current frequency of the clock. is the linear frequency drift, Represents the random part of the time difference.

[0035] In one embodiment, the system state transition equation is: ; in, is the state transfer matrix, is the system noise matrix, for The system state prediction vector at time , for The system status at the moment, is the system linear frequency drift error.

[0036] In one embodiment, the system state observation equation is: ; in, is the system state observation value, is the joint state vector, is the observation noise.

[0037] In one embodiment, clock compensation and frequency compensation are performed on corresponding nodes according to the optimal estimated values ​​of time difference and frequency difference respectively, including: obtaining a clock compensation value according to the average of the optimal estimated values ​​of the time difference between the current node and the adjacent nodes, and performing clock compensation on the current node according to the clock compensation value; obtaining a frequency compensation value according to the average of the optimal estimated values ​​of the frequency difference between the current node and the adjacent nodes, and performing frequency compensation on the current node according to the frequency compensation value.

[0038] In one embodiment, an iteration based on a Kalman filter algorithm is performed according to a system state transfer equation and a system state observation equation to obtain the optimal estimate of the time difference and frequency difference between each node and an adjacent node, including: obtaining a system state prediction vector for the next moment according to the system state of each node at the current moment and the system state transfer equation; updating the Kalman gain coefficient according to the current state prediction covariance matrix, and correcting the system state prediction vector according to the Kalman gain coefficient and the system state observation equation to obtain the optimal estimate of the time difference and frequency difference in the current iteration; iteratively updating the covariance matrix until the condition for stopping the iteration is met, stopping the iteration, and outputting the optimal estimate of the time difference and frequency difference between each node and an adjacent node.

[0039] In one embodiment, each node in the network connection topology diagram uses a stable clock source as a clock module.

[0040] For the specific definition of the wireless sensor network time synchronization device based on the consistency strategy, please refer to the definition of the wireless sensor network time synchronization method based on the consistency strategy above, which will not be repeated here. Each module in the above-mentioned wireless sensor network time synchronization device based on the consistency strategy can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0041] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a wireless sensor network time synchronization method based on a consistency strategy is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0042] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0043] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.

[0044] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.

[0045] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0046] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0047] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A distributed wireless network time synchronization method based on an enhanced clock model, characterized in that: The method comprises: Constructing a network connection topology diagram of a distributed wireless network; the network connection topology diagram includes nodes and edges, where the nodes are communication devices in the distributed wireless network and the edges represent wireless connection relationships between the nodes; The time difference and frequency difference between each node and the adjacent node are calculated according to the pre-constructed enhanced clock model, and the state is estimated according to the time difference and frequency difference to obtain the time difference state vector and the frequency difference state vector, and the joint state vector is obtained according to the time difference state vector and the frequency difference state vector, and the system state transfer equation and the system state observation equation of the joint state vector are constructed; the enhanced clock model is used to construct the physical real clock reading of the node; According to the system state transfer equation and the system state observation equation, the Kalman filter algorithm is iterated to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes. According to the optimal estimated values ​​of the time difference and frequency difference, clock compensation and frequency compensation are performed on the corresponding nodes respectively, and the optimal estimated values ​​at each moment are iteratively updated to achieve time synchronization of distributed wireless networks.

2. The method according to claim 1, characterized in that The enhanced clock model is: ; in, Indicates that the clock is The readings of the time, represents the clock reading at the initial time, Indicates the current frequency of the clock. is the linear frequency drift, Represents the random part of the time difference.

3. The method according to claim 1, characterized in that: The system state transfer equation is: ; in, is the state transfer matrix, is the system noise matrix, for The system state prediction vector at time , The system status at the moment, is the system linear frequency drift error.

4. The method according to claim 1, characterized in that The system state observation equation is: ; in, is the system state observation value, is the joint state vector, is the observation noise.

5. The method according to claim 1, characterized in that The performing clock compensation and frequency compensation on the corresponding nodes respectively according to the optimal estimated values ​​of the time difference and the frequency difference comprises: A clock compensation value is obtained according to an average of the optimal estimated values ​​of the time difference between the current node and the adjacent nodes, and clock compensation is performed on the current node according to the clock compensation value; A frequency compensation value is obtained according to an average value of the optimal estimated value of the frequency difference between the current node and the adjacent nodes, and frequency compensation is performed on the current node according to the frequency compensation value.

6. The method according to claim 1, characterized in that According to the system state transfer equation and the system state observation equation, the Kalman filter algorithm is iterated to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes, including: According to the system state of each node at the current moment and the system state transfer equation, the system state prediction vector at the next moment is obtained; Update the Kalman gain coefficient according to the current state prediction covariance matrix, and correct the system state prediction vector according to the Kalman gain coefficient and the system state observation equation to obtain the optimal estimated values ​​of the time difference and frequency difference in the current iteration; The covariance matrix is ​​updated iteratively until the conditions for stopping the iteration are met, at which point the iteration is stopped and the optimal estimated values ​​of the time difference and frequency difference between each node and its adjacent nodes are output.

7. The method according to claim 1, characterized in that Each node in the network connection topology diagram uses a stable clock source as a clock module.

8. A wireless sensor network time synchronization device based on consistency strategy, characterized in that: The device comprises: A topology map construction module is used to construct a network connection topology map of a distributed wireless network; the network connection topology map includes nodes and edges, where the nodes are communication devices in the distributed wireless network and the edges represent wireless connection relationships between the nodes; A state estimation module is used to calculate the time difference and frequency difference between each node and the adjacent node according to the pre-built enhanced clock model, perform state estimation according to the time difference and frequency difference, obtain the time difference state vector and the frequency difference state vector, obtain the joint state vector according to the time difference state vector and the frequency difference state vector, and construct the system state transfer equation and system state observation equation of the joint state vector; The time synchronization module is used to iterate based on the Kalman filter algorithm according to the system state transfer equation and the system state observation equation to obtain the optimal estimated values ​​of the time difference and frequency difference between each node and the adjacent nodes, perform clock compensation and frequency compensation on the corresponding nodes according to the optimal estimated values ​​of the time difference and frequency difference, iteratively update the optimal estimated value at each moment, and realize time synchronization of distributed wireless networks.

9. The device according to claim 8, characterized in that The enhanced clock model is: ; in, Indicates that the clock is The readings of the time, represents the clock reading at the initial time, Indicates the current frequency of the clock. is the linear frequency drift, Represents the random part of the time difference.

10. The device according to claim 8, characterized in that The system state transfer equation is: ; in, is the state transfer matrix, is the system noise matrix, for The system state prediction vector at time , for The system status at the moment, is the system linear frequency drift error.

Citation Information

Patent Citations

  • Method and system used for time difference estimation and multi-station clock error correction

    CN103760522A

  • Consistent clock synchronization frequency offset estimation method based on sequence least square

    CN113207167A

  • Computer system and device based on time synchronization model and readable storage medium

    CN117880954A

  • Sequential least squares-based consistent clock synchronization frequency deviation estimation method

    WO2022236916A1