A centralized time synchronization method suitable for a drone swarm
By introducing flooding pseudorange and adaptive Kalman filtering time synchronization methods, the problems of time synchronization accuracy and anti-interference of UAV swarms in high dynamic scenarios are solved, achieving high-precision, fast-convergence and strong robust time synchronization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2026-04-02
- Publication Date
- 2026-06-19
AI Technical Summary
The problems of low time synchronization accuracy, slow convergence speed and poor anti-interference ability of drone swarms in high dynamic scenarios, especially in high-maneuver flight and complex communication environments, are that existing technologies are difficult to achieve real-time tracking and compensation of crystal oscillator frequency offset, and lack the ability to intercept and defend against malicious information.
A time synchronization method based on flooding pseudorange and adaptive Kalman filtering is adopted, combined with direct sequence spread spectrum technology. The autocorrelation characteristics of pseudo-random codes are used to reduce the impact of multipath and co-frequency interference, and AKF filtering is used to track frequency offset changes to enhance anti-interference capability.
It achieves high-precision time synchronization, with synchronization accuracy improved to 20% and convergence speed increased by 60%. It also has strong robustness and security, and can track frequency offset changes in real time and defend against malicious attacks.
Smart Images

Figure CN122248525A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of wireless communication and UAV swarm cooperative control technology, specifically to a high-precision centralized time synchronization method for UAV swarms that is highly dynamic and resistant to interference in organized formation mission scenarios. Background Technology
[0002] With the development of Unmanned Aerial Vehicle (UAV) technology, large-scale UAV swarms are increasingly being used in fields such as collaborative detection, distributed beamforming, and electronic warfare. In these applications, maintaining a unified and highly accurate time reference among all UAV nodes within the swarm is crucial for mission success.
[0003] However, due to the high mobility of drone swarms and the frequent changes in the topology of their underlying communication networks caused by complex flight environments, achieving high-precision and robust time synchronization faces the following severe challenges.
[0004] First, the time-varying asymmetric propagation delay introduced by high-maneuverability flight is difficult to eliminate. The high-speed movement of UAV swarms leads to severe asymmetry in the uplink and downlink of traditional Two-Way Time Transfer (TWTT), introducing a non-negligible asymmetric propagation delay. Especially in high-dynamic or cold-start scenarios, there are often large initial frequency and phase deviations between nodes, which directly violates the symmetry assumption based on Two-Way Ranging (TWR), making it difficult for subsequent high-precision parameter estimation algorithms to converge, and greatly affecting the final accuracy of time synchronization.
[0005] Currently, parameter estimation algorithms such as Kalman filtering are widely used in existing UAV swarm time synchronization schemes. To cope with complex dynamic communication environments, some existing technologies have introduced Extended Kalman Filter (EKF) or Adaptive Kalman Filter (AKF) mechanisms to improve clock parameter tracking accuracy in highly dynamic UAV swarm communication networks. However, under extreme flight conditions and strong adversarial network threats, the aforementioned existing technologies still reveal the following two technical shortcomings:
[0006] On the one hand, existing technologies struggle to achieve agile tracking and compensation for transient nonlinear frequency shifts in crystal oscillators. Current algorithms typically assume that the frequency drift of a node crystal oscillator is linear or slowly changing. However, in practical applications, when UAVs perform high-maneuvering flight (such as high-G turns, rapid acceleration, etc.), changes in physical acceleration and temperature can easily cause nonlinear transient changes in the crystal oscillator frequency. In such cases, traditional linear Kalman filters (LKF), due to their fixed process noise matrix, cannot track these rapid changes in a timely manner, leading to severe hysteresis and overshoot in synchronization errors. Furthermore, most existing adaptive Kalman filter (AKF) schemes focus only on optimizing timestamp measurement noise, lacking a real-time tracking and adaptive compensation mechanism for state shifts (i.e., sudden frequency shifts) caused by high maneuvers.
[0007] On the other hand, existing technologies lack the ability to intercept and defend against malicious information. Most existing time synchronization protocols are based on the ideal assumption that drone nodes are completely trustworthy. In highly adversarial environments, once a swarm communication network is injected with forged timestamp messages by malicious nodes, existing filtering algorithms often lack the ability to distinguish them, directly using them as valid observations. This leads to the continuous amplification of erroneous states, ultimately polluting and completely destroying the global time reference of the entire drone swarm, posing a significant security risk to the system.
[0008] This invention addresses the problems of low synchronization accuracy, convergence difficulties, and poor anti-interference capabilities in high-dynamic UAV swarm scenarios by providing a high-precision time synchronization method based on flooding pseudorange and adaptive filtering (Flooding Pseudorange Time Synchronization, FPTS). Specifically, this invention introduces Direct Sequence Spread Spectrum (DSSS) and adaptive Kalman filtering, achieving high-precision time synchronization in complex network environments with multipath fading, co-channel interference, and asymmetric delays. It also exhibits good tracking performance for frequency shifts in the crystal oscillator caused by environmental factors and demonstrates robustness against malicious attacks such as spoofed timestamps. Summary of the Invention
[0009] Technical problem: The centralized time synchronization method for UAV swarms proposed in this invention is mainly used to solve the problems of low time synchronization accuracy, slow convergence speed and poor anti-interference ability in high dynamic scenarios of UAV swarms.
[0010] Technical Solution: This method introduces a pseudo-random code (Kasami sequence) ranging and flooding synchronization framework. Utilizing the autocorrelation properties of the pseudo-random code, it reduces the impact of multipath and co-channel interference on signal arrival time. A centralized synchronization framework based on flooding adapts to the dynamic characteristics of UAV swarms while significantly accelerating synchronization convergence. Furthermore, it leverages the filtering and tracking characteristics of the AKF (Kasami sequence) to mitigate the impact of measurement errors and random delays on synchronization accuracy. By adaptively selecting the process noise Q-matrix and filtering outomaly data, it achieves the effects of tracking frequency offset changes and countering malicious attacks.
[0011] The UAV node clock model is explained below: A UAV node is typically equipped with a hardware clock, which consists of a crystal oscillator and a counter. The crystal oscillator, based on the piezoelectric effect, continuously outputs a reference pulse signal at a fixed frequency. The counter detects the rising edge of the signal, accumulates the pulse, and outputs a step trigger signal. The hardware clock register responds to the step signal, updating its internal second, minute, and hour values sequentially according to the set carry modulus, thereby driving the linear increase of the system's hardware clock. Each node... In real time Hardware clock Typically modeled as follows:
[0012] (1),
[0013] in, , This represents the set of all node numbers in a drone swarm. Represents a node The nominal frequency of a crystal oscillator. This indicates the drone node. exist The actual frequency of the crystal oscillator at any given time. Indicates the actual time at which the timing begins. The hardware time that indicates when the timing begins. and The value of is determined by the physical characteristics and manufacturing process of the crystal oscillator.
[0014] Since the frequency of a crystal oscillator changes very little in a short period of time, we can assume that the frequency remains constant during synchronization, thus obtaining a linear model of the hardware clock:
[0015] (2),
[0016] in, Represents a node Frequency shift (skew), Represents a node Phase offset. The value is determined by the node. The crystal oscillator itself has physical characteristics and the hardware clock value at the start of synchronization.
[0017] In time synchronization, the hardware time cannot usually be changed directly, so a logical time is typically maintained. Compensation for hardware time:
[0018] (3),
[0019] in, Representing nodes respectively The frequency compensation value and phase compensation value can be calculated using a time synchronization algorithm.
[0020] The purpose of time synchronization is to ensure that the logical clocks of different nodes have a consistent clock rate and logical clock value after compensation.
[0021] The technical solution of the present invention includes the following steps:
[0022] Step 1: Coarse synchronization based on the Maximum Time Synchronization (MTS) method.
[0023] In the MTS method, each node communicates only with its own neighbors. By adjusting its own frequency compensation and phase compensation values, the final logical clock rate and logical clock value are adjusted to the maximum value among all neighbors, ultimately achieving coarse time synchronization of the entire drone swarm. The period during which nodes send synchronization messages. The value of is determined by both the size of the drone swarm and the synchronization time required, and is positively correlated with both. In this method, a value of 1 second is recommended. Each node sends a synchronization message based on its own hardware clock. If all nodes simultaneously initiate synchronization broadcasts, it will trigger a severe broadcast storm, leading to channel collapse. Considering any node... Initial phase shift To approximate a uniform distribution of physical properties, an interleaved startup strategy based on unique node numbers is introduced. Node Initial transmission time The result is obtained from formula (4):
[0024] (4),
[0025] in, Indicates the synchronization period. Represents a node Unique number, .
[0026] With nodes Taking synchronous communication with its neighbors as an example, this step includes the following process:
[0027] (1) Node The hardware clock satisfies At that time, broadcast a synchronized message to the surrounding neighbors. Indicates when initiating a broadcast The actual time value of the node. This is a positive integer representing the number of times the current node has initiated synchronization since the start of synchronization, i.e., the synchronization round. Synchronization messages include: the node's own node ID. The hardware time of the sending moment Frequency compensation value Phase compensation value .
[0028] (2) To ,node Receive neighbor nodes Synchronization messages. The coarse synchronization process ignores signal propagation delay; if the node... In real time Received from neighboring nodes Synchronization messages, nodes Record the local hardware time of the received message And store the synchronization information sequence. .like Node Existence and Node's historical communication records Continue with the following process; otherwise, re-receive neighbor messages.
[0029] (3) Let , ,in This indicates the MTS synchronization update threshold, determined by the timestamp measurement noise; the greater the noise, the higher the threshold. The larger the value, the better. This method recommends a range of values of [value range missing]. The unit is .
[0030] (a) When the condition is met At that time, update sequentially according to formula (5). and Value:
[0031] (5),
[0032] (b) When the condition is met Update according to equation (6) Value:
[0033] (6),
[0034] (4) After completing synchronization communication with all neighbors, the node In the next Within a given time period, it receives synchronization broadcasts from its neighboring nodes, and after the synchronization period ends, it calculates the current synchronization period. Variance of the difference between its own and its neighbor's logic clocks Used to represent nodes The synchronization status of the local network. If and All are not greater than the set maximum coarse synchronization error Then determine the node If the network in the area achieves the required precision for coarse synchronization, proceed to the next step of the central node election process; otherwise, repeat step one. The value is determined by the maximum allowable time synchronization error for coarse synchronization, and the two are positively correlated. The recommended value range in this method is [range to be specified]. ,unit .
[0035] Step 2: Central Node Election
[0036] Nodes that achieve coarse synchronization accuracy enter the central node election process. In subsequent coarse synchronization time information exchanges, the current node's participation in the central node election is evaluated, with the aim of electing a node with high crystal oscillator stability and relatively central location within the drone swarm as the central node for subsequent flood synchronization. Synchronization accuracy is further improved by selecting highly stable crystal oscillators and reducing multi-hop accumulated errors.
[0037] For any node Each hive will maintain an additional table to record the scores of all nodes within the hive. . It contains the node numbers and corresponding scores for all nodes, with each node's score initialized to 0. When a node... of When there are nodes with a non-zero score, the node It will be added in the next round of coarse synchronization information exchange Information.
[0038] This step includes the following process:
[0039] (1) For nodes that enter the master node election process It will record the time interval between the last time synchronization was initiated and the current time, and the relationship between the node and the time interval. The set of neighbor node numbers for synchronous communication If the node rating table is maintained by itself... In the middle, node If the corresponding score is 0, then the self-score is calculated using equation (7). And update the table. :
[0040] (7),
[0041] in, Represents a node The Allen variance of a self-contained crystal oscillator can be obtained by consulting the device datasheet. Indicates the relationship with the node in the previous synchronization cycle. The set of neighbor node numbers for synchronous communication The number of elements in and These are stability weights and coverage weights, respectively, satisfying... If high stability of the master node crystal oscillator is required, then the corresponding... The larger the value; if the master node is required to be located as centrally as possible in the network, then the corresponding value is... The larger the value, the better. In this method, it is recommended... .
[0042] After the update is complete, the node Information from its own rating table will be added in the next coarse synchronization broadcast.
[0043] (2) Node neighboring nodes Upon receiving the broadcast message, the synchronization information sequence is obtained, and coarse synchronization is performed while utilizing... Update your own rating form Update the rules to utilize Update the table with non-zero data Data with a score of 0.
[0044] (3) If node After performing a coarse synchronization update, the self-rating table was found. All nodes in the array have non-zero scores, and each node has its own score. If the maximum value of all nodes is found, then the node... Declaring itself as the master node, and using the node The flood pseudorange synchronization is performed around the center, and all nodes end the coarse synchronization process when they receive the flood synchronization message.
[0045] Step 3: Synchronize the flood pseudodistance.
[0046] If node Declaring itself a central node, it will act as a node Perform flood pseudorange synchronization centered on the node. Maintenance of flooding cycles and flood level Two parameters are used to determine whether to accept flooding messages, among which It is a non-negative integer. (Center node) With flood cycle Periodic synchronization is performed. Non-central nodes synchronize with the next lower level after receiving flooding messages from the previous level. The flooding period is specified in the original text. The value is determined by the size of the drone swarm; the larger the swarm, the larger the flooding period value. In this method, a recommended value range is [range to be specified]. .
[0047] This step includes the following process.
[0048] (1) Initialization of flooding parameters. For the central node Initialize flooding cycles and levels as follows: For the remaining nodes that are not the central node, the flooding round is initialized to 0, and the flooding level is initialized to 99.
[0049] (2) Central node When its own hardware clock reaches the flood synchronization period When the value is an integer multiple of its own, a bidirectional pseudorange synchronization process is performed sequentially with its neighbors, which includes the following operations:
[0050] (a) The central node will send a synchronization request to its neighbors, which includes its current flooding cycle. Its own flood level and the agreed-upon joint sending time .
[0051] (b) After receiving confirmation from its neighbor, the node... Will be local hardware time Send synchronization messages, simultaneously receive synchronization messages from neighboring nodes, and record the arrival time of each message. .
[0052] (c) After the two-way information exchange is completed, the node The pseudorange measurement value Pass it to the neighboring nodes.
[0053] (3) When a non-central node receives a synchronization request, it uses the node as the synchronization mechanism. To the node Taking sending a synchronization request as an example. When the condition is met... or At that time, node Reply to confirm the synchronization message and set the local hardware time. To the node Send a synchronization message, in which They are nodes The flooding cycles and flooding levels are recorded. Nodes are also recorded. Synchronization message arrival time And calculate the local pseudorange value. Received from node The amount of pseudorange information transmitted After that, node Update its own flooding parameters to .
[0054] (4) After completing the bidirectional pseudorange synchronization process, the node In the integer interval Generate a random integer that follows a discrete uniform distribution. ,in This represents a fixed contention window, the value of which is determined by the network size and is positively correlated with it. This method recommends a value between 1 and 10. Subsequently, the nodes calculate the actual backoff time. :
[0055] (8),
[0056] in, This represents the basic time slot, and its value is determined by the physical layer data transmission rate and processing latency. It is typically set to 1. Up to 10 . an integer range The integers within the set follow a discrete uniform distribution.
[0057] After the retreat time is reached, the node It will perform flood pseudorange synchronization to its neighboring nodes as the master node, and the synchronization process is consistent with the operation in (2). When the central node When the hardware time reaches another integer multiple of the flooding cycle, a new round of flooding will be initiated, and the flooding cycle will be updated accordingly. .
[0058] Step 4: AKF parameter estimation and data processing.
[0059] After obtaining the physical layer bidirectional ranging observations and time information in step three, in order to address the problem of nonlinear abrupt changes in the crystal oscillator frequency of the UAV in highly dynamic scenarios or under environmental changes, while also considering the filtering of measurement noise and the defense against malicious interference, this step adopts an adaptive Kalman filter algorithm to estimate and track the synchronization parameters.
[0060] With nodes As master node and node Taking the bidirectional pseudorange synchronization process as an example, an adaptive Kalman filter model is established:
[0061] definition State vector at time step :
[0062] (9),
[0063] in, Indicates in Nodes waiting to be synchronized local time With the master node local time Hardware clock skew between (i.e.) ); express Nodes waiting to be synchronized With reference node The hardware clock frequency ratio.
[0064] Based on the posterior state estimate from the previous time step Calculate the predicted prior state value at the current time. Its state equation is as follows:
[0065] (10),
[0066] in, The driving term represents the master node. The local hardware clock in Time to The measurement increment between time points is calculated using the following formula: ; The process noise vector follows a Gaussian distribution, and its value is determined by the stability of the crystal oscillator. The more stable the crystal oscillator, the smaller the value of the process noise vector.
[0067] Establish the observation equation:
[0068] (11),
[0069] Among them, the observation matrix ; Measurement value , It was obtained in step three. Two pseudorange values at time 1; The measurement noise matrix represents a Gaussian distribution. This represents the quantization noise variance, which is determined by the crystal oscillator frequency. The higher the crystal oscillator frequency, the smaller the quantization noise variance.
[0070] Covariance matrix of the measurement noise vector .
[0071] Covariance matrix of process noise vector Discretization modeling based on the power-law spectral density of quartz crystal oscillators:
[0072] (12),
[0073] in, The phase white noise spectral density, The values of the random walk spectral density and the frequency random walk spectral density are determined by the physical characteristics of the crystal oscillator and can be obtained from the device manual. Indicates the master node The local hardware clock in Time to The measurement increment between time points is calculated using the following formula: .
[0074] This step includes the following process:
[0075] (1) AKF parameter initialization. When the node to be synchronized... With the master node When the number of synchronization message rounds is equal to 2, the Kalman filter parameters are initialized.
[0076] State vector The initial value is represented as:
[0077] (13),
[0078] Initial error covariance matrix satisfy:
[0079] (14),
[0080] in, This represents the latest wheel pseudodistance measurement value obtained during the flood synchronization process. This indicates the timestamp information obtained in step three. and These represent the initial phase variance and the initial frequency ratio variance, respectively, and their values are determined by the physical characteristics of the crystal oscillator. The more stable the crystal oscillator, the smaller these values will be.
[0081] (2) State prediction. In At each moment, the predicted value of the prior state is obtained through state prediction. With the prior error covariance matrix The specific prediction calculation is as follows:
[0082] (15),
[0083] in, express The posterior state estimate at time t, matrix express The posterior error covariance matrix at time step [time].
[0084] ,
[0085] Represents the state transition matrix. Represents the affine control vector, and the discretization process noise covariance matrix. It is calculated using formula (12).
[0086] (3) Calculate the innovation and decision statistics. Based on the observation equation established by formula (11), calculate the innovation vector of the Kalman filter. and its corresponding theoretical information covariance :
[0087] (16),
[0088] in, This represents the measured value of the two-way ranging observation deviation at the current moment. The measurement noise matrix is represented by the observation matrix, whose values are determined by the timestamp measurement accuracy. .
[0089] To quantify the deviation between observed values and the prediction model, Normalized Innovation Squared (NIS) is constructed as the decision statistic for adaptive filtering. :
[0090] (17),
[0091] in, This represents the innovation vector of the Kalman filter. The new information covariance is represented by the values of both, which are calculated by formula (16).
[0092] (4) Adaptive decision. A preset first decision threshold is used. Second Decision Threshold , The value is determined by the frequency drift range of the crystal oscillator caused by environmental factors such as temperature. The more stable the crystal oscillator, the lower the corresponding frequency drift range. The smaller the value, the better. The system uses the current statistic. The numerical value determines the automatic selection of one of the following three processing modes to balance high dynamic tracking capability and anti-interference capability:
[0093] (a) Mode 1: Steady-state tracking mode (when (Time). Maintain the current process noise matrix. With measurement noise matrix If unchanged, proceed directly to (5) to update the execution standard.
[0094] (b) Mode 2: Frequency Offset Tracking Mode (when (Time). The system determines when the drone experiences a sharp turn, acceleration, or a sudden change in ambient temperature, causing a nonlinear drift in the crystal oscillator frequency, and then executes a tracking process. The prior error covariance matrix... An expansion injection process is performed to increase the filter gain, forcing the system to quickly correct the frequency ratio estimate. The corrected formula is:
[0095] (18),
[0096] in, The preset adaptive noise matrix is significantly larger than that under steady-state conditions. The specific value is determined by the temperature characteristics of the crystal oscillator, and is usually taken as 4 to 8 times the steady-state process noise matrix.
[0097] (c) Mode 3: Abnormal Suppression Mode (when (Time). Determine the current observation value. If severely contaminated by non-line-of-sight (NLOS) multipath effects or subjected to malicious forged timestamp attacks, refuse to perform measurement updates. Set the posterior state estimate equal to the prior prediction ( ), and keep the covariance matrix unchanged ( At this point, the system relies entirely on the inertia of the affine model for time recursion, skipping (5) and directly proceeding to (6).
[0098] (5) State update. Calculate the optimal Kalman gain. and utilize new information Posterior corrections are made to the state vector and covariance matrix:
[0099] (19),
[0100] in, This is the identity matrix. Therefore, the optimal state estimate for the current time step is obtained. .
[0101] (6) Logic clock parameter update. Based on the state estimation results of the filtered output, the logic clock adjustment parameters of the node to be synchronized are updated.
[0102] (a) Node Logic clock frequency adjustment parameters renew:
[0103] (20),
[0104] in, Indicates the master node Logic clock frequency adjustment parameters This represents the optimal relative offset estimate obtained through Kalman filtering.
[0105] (b) Node Logic clock phase adjustment parameters renew:
[0106] (twenty one),
[0107] in, Indicates the master node Logic clock frequency adjustment parameters Indicates the master node Logic clock phase adjustment parameters Indicates the node to be synchronized Logic clock frequency adjustment parameters Indicates the master node exist The hardware clock value at any given moment. This represents the estimated optimal clock difference for the Kalman filter.
[0108] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects:
[0109] High precision and fast convergence. This invention provides real-time compensation for the asymmetric time delay caused by high-speed motion and applies Kalman filtering to process the time delay and noise generated during communication. Compared with traditional distributed time synchronization methods applied to UAV swarms, this invention can achieve 20... The synchronization accuracy is high. Furthermore, due to the application of a flooding synchronization framework, this invention also achieves faster synchronization speed, 60% faster than distributed algorithms.
[0110] Real-time tracking of frequency offset changes. Unlike existing synchronization methods that assume the crystal oscillator is stable for a short period of time, this invention uses adaptive Kalman filtering to track frequency offset changes in real time. When the crystal oscillator frequency of the UAV swarm changes due to factors such as temperature and motion, this invention can re-track the frequency offset within 5 rounds of synchronization.
[0111] Strong robustness and security. Addressing the problem of malicious nodes forging time information and interfering with the synchronization process, this invention incorporates a malicious node detection component into the filtering process. Compared to existing least-squares linear regression methods and low-pass filtering-based methods, this invention can effectively identify and filter conventional time information forgery attacks, thereby preventing malicious attacks from disrupting synchronization. Attached Figure Description
[0112] Figure 1This is a flowchart of the coarse synchronization and master node election process;
[0113] Figure 2 This is a schematic diagram of information exchange in two-way pseudorange measurement;
[0114] Figure 3 This is a flowchart of the adaptive Kalman filter's working process. Detailed Implementation
[0115] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0116] This embodiment constructs a... A swarm network of high-performance tactical drones can operate in complex electromagnetic environments. Distributed collaborative detection missions are conducted within the airspace. Each UAV node is equipped with a nominal frequency. A high-frequency oven-controlled crystal oscillator (OCXO) serves as the local clock reference. For any node... Its hardware clock has an initial frequency offset that conforms to a uniform distribution between -50 and 50, expressed in ppm (parts per million). The phase offset conforms to a uniform distribution between -1 and 1, expressed in seconds.
[0117] The specific implementation includes the following steps:
[0118] Step 1: Coarse synchronization based on the Maximum Time Synchronization (MTS) method.
[0119] make The period for nodes to send synchronization messages is defined, with each node sending synchronization messages based on its own hardware clock. The value of is determined by both the size of the drone swarm and the time required for synchronization, and is positively correlated with both.
[0120] With nodes Taking synchronous communication with its neighbors as an example, this step includes the following process:
[0121] (1) Node The hardware clock satisfies At that time, broadcast a synchronized message to the surrounding neighbors. Indicates when initiating a broadcast The actual time value of the node. This is a positive integer representing the number of times the current node has initiated synchronization since the start of synchronization, i.e., the synchronization round. Synchronization messages include: the node's own node number. The hardware time of the sending moment Frequency compensation value Phase compensation value .
[0122] (2) To ,node Receive neighbor nodes Synchronization messages. The coarse synchronization process ignores signal propagation delay; if the node... In real time Received from neighboring nodes Synchronization messages, nodes Record the local hardware time of the received message And store the synchronization information sequence. .like Node Existence and Node's historical communication records Continue with the following process; otherwise, re-receive neighbor messages.
[0123] (3) Let , ,in This indicates the MTS synchronization update threshold, determined by the timestamp measurement noise; the greater the noise, the higher the threshold. The larger the value, the better.
[0124] (a) When the condition is met At that time, update sequentially according to formula (22). and Value:
[0125] (twenty two),
[0126] (b) When the condition is met Update according to equation (23) Value:
[0127] (twenty three),
[0128] (4) When the update is completed and the next broadcast time has not yet arrived, the node Receive messages from neighboring nodes by repeating process (2) and (3), and update its own logical clock frequency adjustment value. and logic clock phase adjustment value .when At that time, node Calculate in the current synchronization period Within, the variance of the clock difference between itself and its neighbors .like and All are not greater than the set maximum coarse synchronization error Then determine the node If the network in the area achieves the required precision for coarse synchronization, proceed to the next step of the central node election process; otherwise, repeat step one.
[0129] in, The value is determined by the maximum time synchronization error allowed by coarse synchronization, and the two are positively correlated.
[0130] The steps described above are explained in detail below: In the example, the synchronization period... Each node broadcasts its own time information when its local clock reaches an integer multiple of the synchronization period, and updates its own logical clock frequency compensation parameters and phase compensation parameters using formulas (22) and (23) when it receives neighbor information. MTS synchronization update threshold Before the next broadcast time, each node calculates the variance of its own clock difference with its neighbors within the current period to characterize its synchronization status. When the synchronization variance is less than a set threshold for two consecutive times, the node enters the master node election process. In this example, .
[0131] Step 2: Central Node Election
[0132] For any node Each node will maintain an additional table to record the scores of all nodes in the network. .in This represents the set of all node numbers of the drone. It contains the node numbers and corresponding scores for all nodes, with each node's score initialized to 0. When a node... of When there are nodes with a non-zero score, the node It will be added in the next round of coarse synchronization information exchange Information.
[0133] This step includes the following process:
[0134] (1) For nodes that enter the master node election process It will record the time interval between the last time synchronization was initiated and the current time, and the relationship with the node. The set of neighbor node numbers for synchronous communication If the node rating table is maintained by itself... In the middle, node If the corresponding score is 0, then the self-score is calculated using equation (24). And update the table. :
[0135] (twenty four),
[0136] in, Represents a node The Allen variance of a self-contained crystal oscillator can be obtained by consulting the device datasheet. Indicates the relationship with the node in the previous synchronization cycle. The set of neighbor node numbers for synchronous communication The number of elements in and These are stability weights and coverage weights, respectively, satisfying... If high stability of the master node crystal oscillator is required, then the corresponding... The larger the value; if the master node is required to be located as centrally as possible in the network, then the corresponding value is... The larger the value, the better.
[0137] After the update is complete, the node Information from its own rating table will be added in the next coarse synchronization broadcast.
[0138] (2) Node neighboring nodes Upon receiving the broadcast message, the synchronization information sequence is obtained, and coarse synchronization is performed while utilizing... Update your own rating form Update the rules to utilize Update the table with non-zero data Data with a score of 0.
[0139] (3) If node After performing a coarse synchronization update, the self-rating table was found. All nodes in the array have non-zero scores, and each node has its own score. If the maximum value of all nodes is found, then the node... Declaring itself as the master node, and using the node The flood pseudorange synchronization is performed around the center, and all nodes end the coarse synchronization process when they receive the flood synchronization message.
[0140] The steps described above are explained in detail below: In the example, the drone node uses a high-stability temperature-controlled crystal oscillator (OCXC), whose Allen variance... The typical value is When calculating the score for each node, the stability weight and coverage weight are set as follows: Once a node completes its score calculation and update, finds that the score table is complete and its own score is the highest, it will declare itself the central node and begin the flooding process. All nodes that receive the flooding message will immediately stop their coarse synchronization and election processes and join the flooding synchronization process.
[0141] Step 3: Synchronize the flood pseudodistance.
[0142] If node Declaring itself a central node, it will act as a node Synchronization of flooding pseudo-distance is performed around the center.
[0143] This step includes the following process.
[0144] (1) Initialization of flooding parameters. For the central node Initialize flooding cycles and levels as follows: For the remaining nodes that are not the central node, the flooding round is initialized to 0, and the flooding level is initialized to 99.
[0145] (2) Central node When its own hardware clock reaches the flood synchronization period When the value is an integer multiple of the range, a two-way pseudorange synchronization process is performed sequentially with its neighbors. The flooding cycle is... The value is determined by the size of the drone swarm; the larger the swarm, the larger the flooding cycle value. It includes the following operations:
[0146] (a) The central node will send a synchronization request to its neighbors, which includes its current flooding cycle. Its own flood level and the agreed-upon joint sending time .
[0147] (b) After receiving confirmation from its neighbor, the node... Will be local hardware time Send synchronization messages, simultaneously receive synchronization messages from neighboring nodes, and record the arrival time of each message. .
[0148] (c) After the two-way information exchange is completed, the node The pseudorange measurement value Pass it to the neighboring nodes.
[0149] (3) When a non-central node receives a synchronization request, it uses the node as the synchronization mechanism. To the node Taking sending a synchronization request as an example. Node Obtain request information by demodulating the synchronization request. When satisfied or At that time, node Reply to confirm the synchronization message and set the local hardware time. To the node Send a synchronization message. Simultaneously record the node. Synchronization message arrival time And calculate the local pseudorange value. Received from node The amount of pseudorange information transmitted After that, node Update its own flooding parameters to .
[0150] (4) After completing the bidirectional pseudorange synchronization process, the node In the integer interval Generate a random integer that follows a discrete uniform distribution. ,in This represents a fixed contention window, the value of which is determined by the network size and is positively correlated with it. Subsequently, the nodes calculate the actual backoff time. :
[0151] (25),
[0152] in, This represents the basic time slot, and its value is determined by the physical layer data transmission rate and processing latency. It is typically set to 1. Up to 10 .
[0153] After the retreat time is reached, the node It will perform flood pseudorange synchronization to its neighboring nodes as the master node, and the synchronization process is consistent with the operation in (2). When the central node When the hardware time reaches another integer multiple of the flooding cycle, a new round of flooding will be initiated, and the flooding cycle will be updated accordingly. .
[0154] The steps described above are explained in detail below: In this example, a fixed contention window is established based on the drone swarm size and network status. The value is 5, which is the basic time slot. Values The master node's clock information is propagated layer by layer to the entire network through flooding, and the random backoff mechanism also prevents nodes from flooding from one flooding level to the next level at the same time, reducing the probability of message collisions.
[0155] Step 4: AKF parameter estimation and data processing.
[0156] This step includes the following process:
[0157] (1) AKF parameter initialization. When the node to be synchronized... With the master node When the number of synchronization message rounds is equal to 2, the Kalman filter parameters are initialized.
[0158] State vector The initial value is represented as:
[0159] (26),
[0160] Initial error covariance matrix satisfy:
[0161] (27),
[0162] in, This represents the latest wheel pseudodistance measurement value obtained during the flood synchronization process. This indicates the timestamp information obtained in step three. and These represent the initial phase variance and the initial frequency ratio variance, respectively. In this embodiment, the physical characteristics of the crystal oscillator are considered. and The values are respectively and .
[0163] (2) State prediction. In At each moment, the predicted value of the prior state is obtained through state prediction. With the prior error covariance matrix The specific prediction calculation is as follows:
[0164] (28),
[0165] in, express The posterior state estimate at time t, matrix express The posterior error covariance matrix at time step [time].
[0166] ,
[0167] Represents the state transition matrix. Represents the affine control vector, and the discretization process noise covariance matrix. It is calculated using formula (12).
[0168] In this embodiment, the correlation constant in the covariance matrix takes the value of .
[0169] (3) Calculate the innovation and decision statistics. Based on the observation equation established by formula (11), calculate the innovation vector of the Kalman filter. and its corresponding theoretical information covariance :
[0170] (29),
[0171] in, This represents the measured value of the two-way ranging observation deviation at the current moment; The measurement noise matrix is represented by the timestamp measurement accuracy; the higher the timestamp measurement accuracy, the smaller the measurement noise matrix. The observation matrix... In this embodiment, Values .
[0172] To quantify the deviation between observed values and the prediction model, a normalized squared innovation is constructed as the decision statistic for adaptive filtering. :
[0173] (30),
[0174] in, This represents the innovation vector of the Kalman filter. The new information covariance is represented by the values of both, which are calculated by formula (29).
[0175] (4) Adaptive decision. A preset first decision threshold is used. Second Decision Threshold , The value is determined by the frequency drift range of the crystal oscillator caused by environmental factors such as temperature. The more stable the crystal oscillator, the lower the corresponding frequency drift range. The smaller the value, the better. The system uses the current statistic. The numerical value determines the automatic selection of one of the following three processing modes to balance high dynamic tracking capability and anti-interference capability:
[0176] (a) Mode 1: Steady-state tracking mode (when (Time). Maintain the current process noise matrix. With measurement noise matrix If unchanged, proceed directly to (5) to update the execution standard.
[0177] (b) Mode 2: Frequency Offset Tracking Mode (when (Time). The system determines when the drone experiences a sharp turn, acceleration, or a sudden change in ambient temperature, causing a nonlinear drift in the crystal oscillator frequency, and then executes a tracking process. The prior error covariance matrix... An expansion injection process is performed to increase the filter gain, forcing the system to quickly correct the frequency ratio estimate. The corrected formula is:
[0178] (31),
[0179] in, The preset adaptive noise matrix is significantly larger than that under steady-state conditions. The specific value is determined by the temperature characteristics of the crystal oscillator.
[0180] (c) Mode 3: Abnormal Suppression Mode (when (Time). Determine the current observation value. If severely contaminated by non-line-of-sight (NLOS) multipath effects or subjected to malicious forged timestamp attacks, refuse to perform measurement updates. Set the posterior state estimate equal to the prior prediction ( ), and keep the covariance matrix unchanged ( At this point, the system relies entirely on the inertia of the affine model for time recursion, skipping (5) and directly proceeding to (6).
[0181] In this embodiment, considering the physical characteristics of the crystal oscillator and the flight environment of the UAV swarm, the threshold for mode control is set to... The inflation value of the covariance matrix The possible values are:
[0182] (32),
[0183] in, .
[0184] (5) State update. Calculate the optimal Kalman gain. and utilize new information Posterior corrections are made to the state vector and covariance matrix:
[0185] (33),
[0186] in, This is the identity matrix. Therefore, the optimal state estimate for the current time step is obtained. .
[0187] (6) Logic clock parameter update. Based on the state estimation results of the filtered output, the logic clock adjustment parameters of the node to be synchronized are updated.
[0188] (a) Node Logic clock frequency adjustment parameters renew:
[0189] (34),
[0190] in, Indicates the master node Logic clock frequency adjustment parameters This represents the optimal relative offset estimate obtained through Kalman filtering.
[0191] (b) Node Logic clock phase adjustment parameters renew:
[0192] (35),
[0193] in, Indicates the master node Logic clock frequency adjustment parameters Indicates the master node Logic clock phase adjustment parameters Indicates the node to be synchronized Logic clock frequency adjustment parameters Indicates the master node exist The hardware clock value at any given moment. This represents the estimated optimal clock difference for the Kalman filter.
[0194] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. A centralized time synchronization method suitable for unmanned aerial vehicle (UAV) swarms, characterized in that, This method introduces a pseudo-random code Kasami sequence ranging and flooding synchronization framework. It utilizes the autocorrelation characteristics of the pseudo-random code to reduce the impact of multipath and co-channel interference on signal arrival time. It also uses a flooding-based centralized synchronization framework to adapt to the dynamic characteristics of UAV swarms while greatly accelerating the convergence speed of synchronization. Furthermore, it utilizes adaptive Kalman filtering (AKF) and tracking characteristics to reduce the impact of measurement errors and random delays on synchronization accuracy. By adaptively selecting the process noise Q matrix and filtering abnormal data, it achieves the effects of tracking frequency offset changes and responding to malicious attacks.
2. The centralized time synchronization method for UAV swarms according to claim 1, characterized in that, The synchronization method includes the following steps: Step 1: Coarse synchronization based on the Maximum Consistency Time Synchronization (MTS) method. In the MTS method, each node communicates only with its own neighbors. By adjusting its own frequency compensation and phase compensation values, the final logical clock rate and logical clock value are adjusted to the maximum value among all neighbors, ultimately achieving coarse time synchronization of the entire drone swarm. The period during which nodes send synchronization messages. The value of is determined by both the size of the drone swarm and the time required for synchronization, and is positively correlated with both. Each node sends synchronization messages based on its own hardware clock; if all nodes simultaneously initiate synchronization broadcasts, it will trigger a severe broadcast storm, causing channel collapse; considering any node Initial phase shift To approximate the physical characteristics of a uniform distribution, an interleaved startup strategy based on unique node numbers is introduced. Initial transmission time The result is obtained from formula (4): (4), in, Indicates the synchronization period. Represents a node Unique number, ; Step 2: Central node election Nodes that achieve coarse synchronization accuracy enter the central node election process. In subsequent coarse synchronization time information exchange, the current node's participation in the central node election is evaluated. The goal is to elect a node with high crystal oscillator stability and relatively located at the center of the drone swarm as the central node for subsequent flood synchronization. Synchronization accuracy is further improved by selecting a highly stable crystal oscillator and reducing multi-hop accumulated errors. For any node Each hive will maintain an additional table to record the scores of all nodes within the hive. ; It contains the node numbers and corresponding scores of all nodes, with each node's score initialized to 0. When a node... of When there are nodes with a non-zero score, the node It will be added in the next round of coarse synchronization information exchange Information; Step 3: Flooding pseudo-distance synchronization If node Declaring itself a central node, it will act as a node Perform flood pseudorange synchronization around the center; for any node Maintenance of flooding cycles and flood level Two parameters are used to determine whether to accept flooding messages, among which It is a non-negative integer; the central node With flood cycle Periodic synchronization is performed. Non-central nodes synchronize with the next lower level after receiving flooding messages from the previous level. The flooding period is specified in the original text. The value is determined by the size of the drone swarm; the larger the swarm size, the larger the flooding cycle value. Step 4: AKF parameter estimation and data processing After obtaining the observation values and time information of the physical layer two-way ranging through step three, in order to solve the problem of nonlinear abrupt changes in the crystal oscillator frequency of the UAV in high dynamic scenarios or environmental changes, and at the same time to filter out measurement noise and defend against malicious interference, this step adopts an adaptive Kalman filter algorithm to estimate and track the synchronization parameters. With nodes As master node and node To perform bidirectional pseudorange synchronization, an adaptive Kalman filter model is established: definition State vector at time step : (9), in, Indicates in Nodes waiting to be synchronized local time With the master node local time The hardware clock skew between them, i.e. ; express Nodes waiting to be synchronized With reference node The hardware clock frequency ratio; Based on the posterior state estimate from the previous time step Calculate the predicted prior state value at the current time. Its state equation is as follows: (10), in, The driving term represents the master node. The local hardware clock in Time to The measurement increment between time points is calculated using the following formula: ; The process noise vector follows a Gaussian distribution, and its value is determined by the stability of the crystal oscillator. The more stable the crystal oscillator, the smaller the value of the process noise vector. Establish the observation equation: (11), Among them, the observation matrix ; Measurement value , It was obtained in step three. Two pseudorange values at time 1; The measurement noise matrix represents a Gaussian distribution. This represents the quantization noise variance, which is determined by the crystal oscillator frequency; the higher the crystal oscillator frequency, the smaller the quantization noise variance. Covariance matrix of the measurement noise vector , Covariance matrix of process noise vector Discretization modeling based on the power-law spectral density of quartz crystal oscillators: (12), in, The phase white noise spectral density, The values of the random walk spectral density and the frequency random walk spectral density are determined by the physical characteristics of the crystal oscillator and can be obtained from the device manual. Indicates the master node The local hardware clock in Time to The measurement increment between time points is calculated using the following formula: .
3. The centralized time synchronization method for UAV swarms according to claim 2, characterized in that, The drone, each node In real time Hardware clock The model is as follows: (1), in, , This represents the set of all node numbers in a drone swarm. Represents a node The nominal frequency of a crystal oscillator. This indicates the drone node. exist The actual frequency of the crystal oscillator at any given time. Indicates the actual time at which the timing began. The hardware time indicating the start of the timing; and The value of is determined by the physical characteristics and manufacturing process of the crystal oscillator; Since the frequency of a crystal oscillator changes very little in a short time, we can assume that the frequency remains constant during synchronization, thus obtaining a linear model of the hardware clock: (2), in, Represents a node Frequency offset skew, Represents a node phase offset, The value is determined by the node. The crystal oscillator itself has physical characteristics and the hardware clock value at the start of synchronization is determined by the crystal oscillator. In time synchronization, the hardware time cannot be directly changed, so a logical time is usually maintained. Compensation for hardware time: (3), in, Representing nodes respectively The frequency compensation value and phase compensation value are calculated using a time synchronization algorithm.
4. The centralized time synchronization method for UAV swarms according to claim 3, characterized in that, node Synchronizing communication with its neighbors involves the following process: (1) Node The hardware clock satisfies At that time, broadcast a synchronized message to the surrounding neighbors. Indicates when initiating a broadcast The actual time value of the node. A positive integer representing the number of times the current node has initiated synchronization since the start of synchronization, i.e., the synchronization round; the synchronization message includes: its own node ID. The hardware time of the sending moment Frequency compensation value Phase compensation value ; (2) To ,node Receive neighbor nodes Synchronization messages; the coarse synchronization process ignores the signal propagation delay, if the node In real time Received from neighboring nodes Synchronization messages, nodes Record the local hardware time of the received message And store the synchronization information sequence. If node Existence and Nodes Historical communication records Continue with the following process; otherwise, re-receive neighbor messages. (3) Let , ,in This indicates the MTS synchronization update threshold, determined by the timestamp measurement noise; the greater the noise, the higher the threshold. The larger the value; (a) When the condition is met At that time, update sequentially according to formula (5). and Value: (5), (b) When the condition is met Update according to equation (6) Value: (6), After completing synchronization communication with all neighbors, the node In the next Within a given time period, it receives synchronization broadcasts from its neighboring nodes, and after the synchronization period ends, it calculates the current synchronization period. Variance of the difference between its own and its neighbor's logic clocks Used to represent nodes The synchronization status of the local network; if and All are not greater than the set maximum coarse synchronization error Then determine the node If the network in the area achieves the required precision for coarse synchronization, proceed to the next step of the central node election process; otherwise, repeat step one. The value is determined by the maximum time synchronization error allowed by coarse synchronization, and the two are positively correlated.
5. The centralized time synchronization method for UAV swarms according to claim 4, characterized in that, The central node specifically includes the following processes: (1) For nodes that enter the master node election process It will record the time interval between the last time synchronization was initiated and the current time, and the relationship between the node and the time interval. The set of neighbor node numbers for synchronous communication If the node scoring table is maintained by itself In the middle, node If the corresponding score is 0, then the self-score is calculated using equation (7). And update the table. : (7), in, Represents a node The Allen variance of the self-contained crystal oscillator was obtained by consulting the device datasheet. Indicates the relationship with the node in the previous synchronization cycle. The set of neighbor node numbers for synchronous communication The number of elements in and These are stability weights and coverage weights, respectively, satisfying... If high stability of the master node crystal oscillator is required, then the corresponding... The larger the value; if the master node is required to be located as centrally as possible in the network, then the corresponding value is... The larger the value; After the update is complete, the node Information from its own rating table will be added in the next coarse synchronization broadcast; (2) Node neighboring nodes Upon receiving the broadcast message, the synchronization information sequence is obtained, and coarse synchronization is performed while utilizing... Update its own rating form Update the rules to utilize Update the table with non-zero data Data with a score of 0; (3) If node After performing a coarse synchronization update, the self-rating table was found. All nodes in the array have non-zero scores, and each node has its own score. If the maximum value of all nodes is found, then the node... Declaring itself as the master node, and using the node The flood pseudorange synchronization is performed around the center, and all nodes end the coarse synchronization process when they receive the flood synchronization message.
6. The centralized time synchronization method for UAV swarms according to claim 5, characterized in that, The synchronization of flood pseudodistances includes the following process: (1) Initialization of flooding parameters: For the central node Initialize flooding cycles and levels as follows: For the remaining nodes that are not the central node, the flooding round is initialized to 0 and the flooding level is initialized to 99. (2) Central node When its own hardware clock reaches the flood synchronization period When the value is an integer multiple of its own, a bidirectional pseudorange synchronization process is performed sequentially with its neighbors, which includes the following operations: (a) The central node will send a synchronization request to its neighbors, which includes its current flooding cycle. Its own flood level and the agreed-upon joint sending time ; (b) After receiving confirmation from its neighbor, the node... Will be local hardware time Send synchronization messages, simultaneously receive synchronization messages from neighboring nodes, and record the arrival time of each message. ; (c) After the two-way information exchange is completed, the node The pseudorange measurement value Pass it to neighboring nodes; (3) When a non-central node receives a synchronization request, the node... To the node Send a synchronization request; when the condition is met. or At that time, node Reply to confirm the synchronization message and set the local hardware time. To the node Send a synchronization message, in which They are nodes The flooding cycles and flooding levels are recorded, along with the nodes. Synchronization message arrival time And calculate the local pseudorange value. Received from node The amount of pseudorange information transmitted After that, node Update its own flooding parameters to ; (4) After completing the bidirectional pseudorange synchronization process, the node In the integer interval Generate a random integer that follows a discrete uniform distribution. ,in This represents a fixed competition window, the value of which is determined by the network size and is positively correlated with the network size. Subsequently, the node calculates the actual backoff time. : (8), in, This represents the basic time slot, and its value is determined by the physical layer data transmission rate and processing latency. an integer range The inner integers follow a discrete uniform distribution; After the retreat time is reached, the node It will perform flood pseudorange synchronization to its neighboring nodes as the master node. The synchronization process is the same as in (2). When the central node When the hardware time reaches another integer multiple of the flooding cycle, a new round of flooding will be initiated, and the flooding cycle will be updated accordingly. .
7. The centralized time synchronization method for UAV swarms according to claim 6, characterized in that, The AKF parameter estimation and data processing workflow is as follows: (1) AKF parameter initialization, when the node to be synchronized With the master node When the number of synchronization message rounds is equal to 2, perform Kalman filter parameter initialization; State vector The initial value is represented as: (13), Initial error covariance matrix satisfy: (14), in, This represents the latest wheel pseudodistance measurement value obtained during the flood synchronization process. This indicates the timestamp information obtained in step three; and These represent the initial phase variance and the initial frequency ratio variance, respectively, and their values are determined by the physical characteristics of the crystal oscillator; the more stable the crystal oscillator, the smaller the corresponding values. (2) State prediction, in At each moment, the predicted value of the prior state is obtained through state prediction. With the prior error covariance matrix The specific prediction calculation is as follows: (15), in, express The posterior state estimate at time t, matrix express The posterior error covariance matrix at time step [time]. , Represents the state transition matrix. Represents the affine control vector, and the discretization process noise covariance matrix. Calculated using formula (12); (3) Calculate the innovation and decision statistics. Based on the observation equation established by formula (11), calculate the innovation vector of the Kalman filter. and its corresponding theoretical information covariance : (16), in, This represents the measured value of the two-way ranging observation deviation at the current moment. The measurement noise matrix is represented by the observation matrix, whose values are determined by the timestamp measurement accuracy. ; To quantify the deviation between observed values and the prediction model, a normalized innovation square (NIS) is constructed as the decision statistic for adaptive filtering. : (17), in, This represents the innovation vector of the Kalman filter. The new information covariance is represented by the values of both, which are calculated by formula (16). (4) Adaptive decision, with a preset first decision threshold Second Decision Threshold , The value is determined by the frequency drift range of the crystal oscillator caused by environmental factors such as temperature. The more stable the crystal oscillator, the lower the corresponding frequency drift range. The smaller the value, the more the system will adjust the current statistic accordingly. The numerical value determines the automatic selection of one of the following three processing modes to balance high dynamic tracking capability and anti-interference capability: (a) Mode 1: Steady-state tracking mode, i.e., when At the same time; maintain the current process noise matrix. With measurement noise matrix If nothing changes, proceed directly to step (5) to perform the standard update; (b) Mode 2: Frequency Offset Tracking Mode When the drone makes a sharp turn, accelerates, or experiences a sudden change in ambient temperature, causing a nonlinear drift in the crystal oscillator frequency, the tracking process is executed, and the prior error covariance matrix is analyzed. An expansion injection process is performed to increase the filter gain, forcing the system to quickly correct the frequency ratio estimate. The corrected formula is: (18), in, The preset adaptive noise matrix is significantly larger than that under steady-state conditions. The specific value is determined by the temperature characteristics of the crystal oscillator, and is usually taken as 4 to 8 times the steady-state noise matrix. (c) Mode 3: Abnormal Suppression Mode, i.e., when Time; Determine the current observation value If the system is severely contaminated by non-line-of-sight (NLOS) multipath effects or suffers from malicious forged timestamp attacks, the measurement update will be refused; the posterior state estimate will be set equal to the prior prediction. And keep the covariance matrix unchanged. At this point, the system relies entirely on the inertia of the affine model for time recursion, skipping the next step (5) and directly proceeding to step (6). (5) Update state variables and calculate the optimal Kalman gain. and utilize new information Posterior corrections are made to the state vector and covariance matrix: (19), in, The identity matrix is used to obtain the optimal state estimate at the current time. ; (6) Update logic clock parameters: Update the logic clock adjustment parameters of the node to be synchronized based on the state estimation results of the filtered output. (a) Node Logic clock frequency adjustment parameters renew: (20), in, Indicates the master node Logic clock frequency adjustment parameters This represents the optimal relative offset estimate obtained through Kalman filtering. (b) Node Logic clock phase adjustment parameters renew: (21), in, Indicates the master node Logic clock frequency adjustment parameters Indicates the master node Logic clock phase adjustment parameters Indicates the node to be synchronized Logic clock frequency adjustment parameters Indicates the master node exist The hardware clock value at any given moment. This represents the estimated optimal clock difference for the Kalman filter.