Node time synchronization and distance measurement method and system of wireless sensor network
By using filter state iteration and Euclidean distance matrix construction methods in wireless sensor networks, the problem of poor time synchronization and ranging accuracy in the prior art is solved, high-precision time synchronization and ranging are achieved, and the Calculate the cost.
Patent Information
- Application Number
- CN202411610102.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing wireless sensor network node time synchronization and ranging technology leads to poor accuracy of time synchronization and ranging.
By introducing active nodes and passive nodes into the wireless sensor network, the preset state transition matrix and process noise covariance matrix are used to iterate the filter state vector and state covariance matrix, the target filter state vector is generated for time synchronization, and Construct the Euclidean distance matrix of nodes for distance measurement.
It improves the accuracy of time synchronization and ranging of wireless sensor network nodes, reduces calculation costs, enhances the robustness of the algorithm, and can maintain clock synchronization across the entire network for a long time.
Smart Images

Figure CN119421232A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, and in particular to a method and system for node time synchronization and ranging in a wireless sensor network. Background Technology
[0002] With the advancement of technologies in fields such as sensors, wireless communication, embedded computing, distributed processing, and microelectronics, low-cost, low-power sensor nodes with on-site sensing, local computing, and wireless transmission have begun to emerge on a large scale in recent years, forming a specialized research field—wireless sensor networks.
[0003] Wireless sensor networks (WSNs) are capable of temporary deployments, excellent scalability and self-organization, and node lifecycles measured in years, making them distinct from traditional networks and a novel type of distributed network system. Time synchronization is a critical challenge for these new distributed systems. Furthermore, in WSNs, node location information is an indispensable part of network messages, serving as a prerequisite for functions such as target detection and tracking, and event geolocation reporting.
[0004] Existing wireless sensor network node time synchronization and ranging technologies are typically based on traditional TOA (Time of Arrival) ranging methods, which establish distance relationships between nodes by measuring signal arrival times. However, traditional TOA ranging methods require time synchronization first, which necessitates the execution of time synchronization algorithms. This means that time synchronization and ranging are implemented using independent methods, significantly increasing computational costs. Summary of the Invention
[0005] This invention provides a method and system for node time synchronization and ranging in wireless sensor networks, which solves the technical problem that the existing node time synchronization and ranging technologies in wireless sensor networks have poor accuracy in time synchronization and ranging.
[0006] The first aspect of this invention provides a node time synchronization and ranging method for a wireless sensor network, comprising:
[0007] When a passive node in a wireless sensor network receives a first synchronization signal sent by an active node in the wireless sensor network, the passive node determines first observation data based on the first synchronization signal and sends the first observation data to the active node based on preset communication conditions.
[0008] The active node determines the second observation data based on the second synchronization signal sent by the passive node, and iterates the filter state vector and state covariance matrix corresponding to the active node based on the preset state transition matrix and the preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix.
[0009] The active node filters the first observation data and the second observation data to determine the target observation data;
[0010] The active node generates a target filter state vector based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and a preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node.
[0011] The active node constructs a node Euclidean distance matrix based on multiple vector elements in the target filter state vector.
[0012] Optionally, the active node iterates over the filter state vector and state covariance matrix corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix, including:
[0013] The active node initializes the filter state vector and state covariance matrix corresponding to the active node, and determines the initial filter state vector and initial state covariance matrix;
[0014] The active node updates the initial filter state vector using a preset state transition matrix to determine the intermediate filter state vector;
[0015] The active node updates the initial state covariance matrix using the preset state transition matrix and the preset process noise covariance matrix, determines the intermediate state covariance matrix, and counts the number of iterations in real time.
[0016] The active node determines whether the number of iterations has reached the preset number of iterations;
[0017] If so, the active node uses the intermediate filter state vector as the prediction filter state vector and the intermediate state covariance matrix as the prediction state covariance matrix.
[0018] Optionally, the first observation data includes a first pseudorange, a first received signal frequency, and a first received signal strength difference; the second observation data includes a second pseudorange, a second received signal frequency, the active node's transmitted signal frequency, a second received signal strength difference, and the passive node's transmitted signal frequency; the target observation data includes first target observation data and second target observation data; the active node filters the first observation data and the second observation data to determine the target observation data, including:
[0019] The active node determines the first rewritten signal data corresponding to the first received signal strength difference and the second rewritten signal data corresponding to the second received signal strength difference based on the first pseudorange, the first received signal frequency, the second pseudorange, the second received signal frequency, the active node's transmitted signal frequency, and the passive node's transmitted signal frequency.
[0020] The active node compares the first signal strength difference with a preset strength threshold;
[0021] If the first signal strength difference is less than a preset strength threshold, the active node will use the first rewritten signal data as the first target observation data;
[0022] If the first signal strength difference is greater than or equal to the preset strength threshold, the active node will discard the first rewritten signal data;
[0023] The active node compares the second signal strength difference with the preset strength threshold;
[0024] If the second signal strength difference is less than the preset strength threshold, the active node will use the second rewritten signal data as the second target observation data;
[0025] If the second signal strength difference is greater than or equal to the preset strength threshold, the active node will discard the second rewritten signal data.
[0026] Optionally, the active node generates the target filter state vector based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and a preset initial observation noise covariance matrix, including:
[0027] The active node uses the prediction filter state vector and the target observation data to construct the observation function matrix and the Jacobian matrix;
[0028] The active node performs matrix subtraction on the observation function matrix and the preset actual observation function matrix to determine the residual.
[0029] The active node updates the preset initial observation noise covariance matrix using the residual, determines the target observation noise covariance matrix, and calculates the Kalman gain matrix based on the target observation noise covariance matrix, the predicted state covariance matrix, and the Jacobian matrix.
[0030] The active node updates the prediction filter state vector using the Kalman gain matrix and the residual, determines the updated filter state vector, and counts the number of updates in real time.
[0031] The active node determines whether the number of updates has reached a preset update round threshold;
[0032] If the target is reached, the active node will use the updated filter state vector as the target filter state vector.
[0033] The second aspect of this invention provides a node time synchronization and ranging method for a wireless sensor network, applied to passive nodes in a wireless sensor network, comprising:
[0034] When a first synchronization signal is received from an active node in the wireless sensor network, the first observation data is determined based on the first synchronization signal.
[0035] Based on preset communication conditions, the first observation data is sent to the active node.
[0036] The third aspect of this invention provides a node time synchronization and ranging method for a wireless sensor network, applied to active nodes in a wireless sensor network, comprising:
[0037] Send a first synchronization signal to the passive node in the wireless sensor network, and receive a second synchronization signal and first observation data sent by the passive node;
[0038] Based on the second synchronization signal, the second observation data is determined, and the filter state vector and state covariance matrix corresponding to the active node are iterated based on the preset state transition matrix and the preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix.
[0039] The first observation data and the second observation data are filtered to determine the target observation data;
[0040] Based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix, a target filter state vector is generated; the target filter state vector is used to achieve time synchronization between the active node and the passive node.
[0041] Construct a node Euclidean distance matrix based on multiple vector elements in the target filter state vector.
[0042] The fourth aspect of this invention provides a node time synchronization and ranging system for a wireless sensor network, comprising:
[0043] A receiving module is configured to, when a passive node in a wireless sensor network receives a first synchronization signal sent by an active node in the wireless sensor network, determine first observation data based on the first synchronization signal, and send the first observation data to the active node based on preset communication conditions.
[0044] The iteration module is used for the active node to determine the second observation data based on the second synchronization signal sent by the passive node, and to iterate the filter state vector and state covariance matrix corresponding to the active node based on the preset state transition matrix and the preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix.
[0045] The filtering module is used by the active node to filter the first observation data and the second observation data to determine the target observation data;
[0046] The generation module is used by the active node to generate a target filter state vector based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and a preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node.
[0047] The construction module is used by the active node to construct a node Euclidean distance matrix based on multiple vector elements in the target filter state vector.
[0048] A computer device provided in a fifth aspect of the present invention includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the node time synchronization and ranging method of the wireless sensor network as described in any of the preceding claims.
[0049] The sixth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the node time synchronization and ranging method of the wireless sensor network as described in any of the preceding claims.
[0050] The seventh aspect of the present invention provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein, when the program instructions are executed by a computer, the computer performs the steps of the node time synchronization and ranging method of the wireless sensor network as described in any of the preceding claims.
[0051] As can be seen from the above technical solutions, the present invention has the following advantages:
[0052] The above-described technical solution of the present invention provides a node time synchronization and ranging method for a wireless sensor network. When a passive node in the wireless sensor network receives a first synchronization signal sent by an active node in the wireless sensor network, the passive node determines first observation data based on the first synchronization signal and sends the first observation data to the active node based on preset communication conditions. The active node determines second observation data based on a second synchronization signal sent by the passive node and iterates the filter state vector and state covariance matrix corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine the prediction filter state vector and prediction state covariance matrix. The active node filters the first and second observation data to determine the target observation data. The active node then determines the target observation data and the prediction filter state vector based on the target observation data and the prediction filter state vector. The process involves generating a target filter state vector from the device state vector, the predicted state covariance matrix, and the preset initial observation noise covariance matrix. This target filter state vector is used to achieve time synchronization between active and passive nodes. The active node constructs a node Euclidean distance matrix based on multiple vector elements in the target filter state vector. Based on this scheme, the active node filters the first and second observation data to determine the target observation data. This data is then combined with the predicted filter state vector, the predicted state covariance matrix, and the preset initial observation noise covariance matrix to output the target filter state vector used for time synchronization between active and passive nodes. The process of constructing the node Euclidean distance matrix based on the target filter state vector eliminates the need for separate methods for time synchronization and ranging, thus reducing computational costs. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a flowchart illustrating the steps of a node time synchronization and ranging method for a wireless sensor network according to Embodiment 1 of the present invention.
[0055] Figure 2 This is a schematic diagram of the node time synchronization and ranging process of a wireless sensor network provided in Embodiment 1 of the present invention.
[0056] Figure 3 This is a schematic diagram illustrating the path of the node time synchronization and ranging method for a wireless sensor network provided in Embodiment 1 of the present invention.
[0057] Figure 4 This is a flowchart illustrating the steps of a node time synchronization and ranging method for a passive node in a wireless sensor network, as provided in Embodiment 2 of the present invention.
[0058] Figure 5 This is a flowchart of the steps of a node time synchronization and ranging method for active nodes in a wireless sensor network provided in Embodiment 3 of the present invention.
[0059] Figure 6 This is a structural block diagram of a node time synchronization and ranging system for a wireless sensor network provided in Embodiment 4 of the present invention. Detailed Implementation
[0060] This invention provides a method and system for node time synchronization and ranging in wireless sensor networks, which addresses the technical problem of poor accuracy in time synchronization and ranging caused by existing node time synchronization and ranging technologies in wireless sensor networks.
[0061] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0062] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of a node time synchronization and ranging method for a wireless sensor network provided in Embodiment 1 of the present invention.
[0063] This invention provides a node time synchronization and ranging method for wireless sensor networks, comprising:
[0064] Step 101: When a passive node in a wireless sensor network receives a first synchronization signal sent by an active node in a wireless sensor network, the passive node determines the first observation data based on the first synchronization signal and sends the first observation data to the active node based on preset communication conditions.
[0065] The first observation data includes a first pseudorange, a first received signal frequency, and a first received signal strength difference; wherein, the first pseudorange is obtained by the passive node j based on the first synchronization signal sent by the active node through pseudo-random noise code or carrier phase. Calculated pseudorange The first received signal frequency is the signal frequency at which the passive node j receives the first synchronization signal. The first received signal strength difference is the signal strength difference of the passive node j receiving the first synchronization signal. .
[0066] It should be noted that you should refer to [link / reference]. Figure 2 When any pair of nodes (active node and passive node) in a wireless sensor network needs clock synchronization and ranging, the server broadcasts a synchronization initialization signal Init. This means that all nodes in the wireless sensor network broadcast a synchronization signal (the first synchronization signal) for K rounds (with a preset update round threshold) based on their local clock and preset communication conditions. Or the second synchronization signal Each round of broadcasting and the subsequent responses from other nodes to the broadcast are called a round of synchronization communication. For example... Figure 2 As shown, taking nodes i and j as an example, when node j receives the synchronization signal (broadcast signal) sent by node i, node j, as a passive node, generates observation information (observation data) based on the synchronization signal sent by node i and sends it to node i, which is the active node. Node i then performs a joint estimation process based on the observation data to achieve bidirectional synchronous ranging. The preset communication condition is that all nodes in the wireless sensor network communicate at the same time. Communication interval The synchronization period T is the start time for the synchronization and ranging process at a specific communication frequency; the preset update round threshold is a complete K-round synchronization communication. , This indicates taking the integer part of x.
[0067] Specifically, in a wireless sensor network, all nodes broadcast synchronization signals to other nodes. When passive node j receives a synchronization signal from active node i (node j and node i refer to any different nodes in the wireless sensor network), passive node j uses pseudo-random noise code or carrier phase to synchronize with the first synchronization signal sent by the active node. Calculated pseudorange That is, the distance, including clock offset factors, is calculated based on the changes in code phase or carrier phase during signal propagation. Then, the passive node j, based on preset communication conditions, utilizes the communication gap to... The frequency of the signal receiving the first synchronization signal The signal strength difference between receiving the first synchronization signal and the signal strength difference , and send back the active node i.
[0068] Step 102: The active node determines the second observation data based on the second synchronization signal sent by the passive node, and iterates the filter state vector and state covariance matrix corresponding to the active node based on the preset state transition matrix and the preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix.
[0069] The second observation data includes the second pseudorange, the second received signal frequency, the active node's transmitted signal frequency, the second received signal strength difference, and the passive node's transmitted signal frequency; the second pseudorange is the second synchronization signal transmitted by the active node i based on the passive node j via pseudo-random noise code or carrier phase. Calculated pseudorange The second received signal frequency is the signal frequency at which the active node i receives the second synchronization signal. The frequency of the active node's transmitted signal is the same as the frequency of the active node i's own transmitted signal. The second received signal strength difference is the difference in signal strength between the active node i and the second synchronization signal received. The frequency of the passive node's transmitted signal is the same as the frequency of the passive node j's transmitted signal. The frequency of the transmitted signal of passive node j and the transmission frequency of the active node i itself All of these are specific communication frequencies.
[0070] It should be noted that the active node i calculates the second pseudorange based on the second synchronization signal sent by the passive node j, and records the second received signal frequency, the second received signal strength difference, its own transmission signal frequency (the active node's transmission signal frequency), and the passive node's transmission signal frequency.
[0071] It is worth mentioning that after completing one round of synchronization communication, that is, the active node i receives the synchronization signal from the passive node j and subsequently receives the pseudorange and received frequency observations (the first received signal frequency and the first received signal strength difference) sent by the passive node j, or at a specified time T max If no corresponding synchronization signal is received from the passive node j, or no pseudorange and received frequency observations are received, then the communication process for that round is considered to have ended, and the joint estimation process is completed at the active node i.
[0072] Furthermore, the process of iterating over the filter state vector and state covariance matrix corresponding to the active node based on the preset state transition matrix and the preset process noise covariance matrix to determine the predicted filter state vector and the predicted state covariance matrix can be achieved by executing the following steps S21 to S25:
[0073] Step S21: The active node initializes the filter state vector and state covariance matrix corresponding to the active node to determine the initial filter state vector and initial state covariance matrix.
[0074] It should be noted that modeling based on clock and propagation delay characteristics uses state vectors to represent the parameters to be estimated. If the clock of the active node is used as the reference clock, then the clock of the passive node is the clock to be synchronized, and there is also a propagation delay pair to be estimated between the two nodes. Due to the influence of factors such as the working environment and manufacturing process, the local clock of a specific node has nonlinear phase shift and frequency deviation. However, at a small time scale, the state changes of these clocks can be approximated as a linear state transition process. The phase shift of the clock can be approximated by a cumulative value, while the frequency deviation of the clock is generally relatively stable and can be approximated by a constant value. Let $i$ be the global reference time of node $i$ during the $k$-th synchronous communication round. Given the corresponding local time, the discrete clock model can be expressed as:
[0075] ;
[0076] ;
[0077] in, This represents the mapping relationship between the local time and the global reference time of node i; Let be the clock phase offset of node i's local clock during the k-th round of communication; Let be the local clock frequency offset of node i at time k-1; This is the fixed interval between two rounds of communication.
[0078] Furthermore, synchronous bidirectional communication is accomplished by the two nodes mutually recording pseudorange containing distance information and receiving frequency containing frequency change information; the communication process between the two nodes involves two signal propagation delays. and , representing the propagation time required for node i to transmit the synchronization signal to node j and the propagation time required for node j to transmit the synchronization signal to node i, respectively; theoretically, the propagation delay can be expanded into a global reference time. and The l-th order Taylor series, and It is the local transmission time of the synchronization signal between node i and node j. In the global reference time frame, the propagation delay can be expressed as:
[0079] ;
[0080] ;
[0081] in, for exist The coefficients obtained by performing a Taylor series expansion at that point. for exist The Taylor series coefficients obtained by performing a Taylor series expansion at a given point are theoretically a set of constants. However, since the extended Kalman filter obtains the state estimate through an iterative approximation process, the Taylor series coefficients in the state vector will change. For ease of representation, the subscript k and superscript k are omitted. Power of 1 for The propagation delay required for node i to transmit the synchronization signal to node j for The first derivative, for of The order derivative divided by factorial, for The propagation delay required for node j to transmit the synchronization signal to node i. for The first derivative, for of The order derivative divided by factorial; Delay the signal propagation at node i; The signal propagation delay is given for node j.
[0082] Furthermore, in the actual synchronization process, the global reference time... and It is not entirely knowable. Obviously, even if the local clock of node i is taken as the reference global clock, the local clock of node j still has clock deviation. Therefore, this is a model that cannot be directly implemented and is called the propagation delay ideal model.
[0083] Furthermore, based on the clock model and the ideal propagation delay model, the clock model is used to construct an achievable propagation delay model, that is, to fuse clock parameters to construct a propagation delay model based on a reference time system; the synchronization signal transmission times of nodes i and j are consistent in their local time system, i.e., both are... From the formula Can When converted to a global reference clock system, it can be expressed as:
[0084] ;
[0085] ;
[0086] in, The global reference time of node i is at the k-th synchronous communication round; The global reference time for node j is during the k-th synchronous communication round; Let be the clock phase offset of node j's local clock during the k-th round of communication; This is local time.
[0087] Based on the above, the propagation delay model can be constructed as follows:
[0088] ;
[0089] ;
[0090] Furthermore, if the velocity change is not a rapid process, the propagation delay can be approximated by a first-order Taylor series, i.e., l=1. Since the purpose of solving for the clock parameters is to solve for the clock difference between node j and node i, it can be assumed that the clock on node i is an ideal clock, i.e., the clock parameters satisfy... The first-order approximate model of propagation delay can be written as:
[0091] ;
[0092] ;
[0093] in, The local clock frequency offset of node i; It is a set of integers.
[0094] Furthermore, a state vector is constructed based on the clock model and the first-order approximation model of propagation delay; assuming that the clock on node i is an ideal clock, it is only necessary to estimate the clock parameters of node j in real time. Taylor series coefficients of propagation delay If a higher-order Taylor series expansion is used, then only the remaining Taylor series coefficients need to be stacked. Therefore, from the clock parameters and Taylor series coefficients mentioned above, the state vector to be estimated can be obtained as follows: ,in, It is the set of real numbers.
[0095] Based on the above, during the first round of synchronous communication, it is necessary to initialize the extended Kalman filter, that is, to initialize the filter state vector and state covariance matrix corresponding to the active node. Each node needs to be configured with N-1 extended Kalman filters, and the relative clock difference and relative distance between them are iteratively estimated based on the communication information with different nodes. The state vector (target filter state vector) that each filter needs to estimate is: .
[0096] Furthermore, based on the least squares method for state vector initialization, that is, for the initialization of the filter state vector, when the initial state is unknown, the initial state vector is generally set to the zero vector, i.e., the initial filter state vector. In practice, a coarse initial estimate can significantly improve the convergence speed of the nonlinear estimator compared to an initial estimate based on the zero vector representation, since only a coarse initial estimate is needed. Therefore, only the first few are selected. A rough estimate is obtained by estimating the observations in round-robin synchronous communication using the least squares method. This step is used to initialize the state vector to obtain the initial filter state vector. Since there are few observations, the computational cost is low, so it can be considered an optional step.
[0097] Furthermore, an initial state covariance matrix is constructed based on the initial state. That is, for the initialization of the state covariance matrix, since there is a simple nonlinear relationship between the observations and the state variables (this nonlinear relationship will be discussed below), an extended Kalman filter is considered to iteratively estimate the state vector. The extended Kalman filter assumes that the state at time k is a state with a mean of... The covariance matrix is The initial state covariance matrix is a multivariate Gaussian distribution. Its covariance matrix represents the uncertainty of the state estimate at time k; it is a symmetric positive definite matrix used to quantify the error in the state estimate. Therefore, the initial state covariance matrix... The values need to be assigned based on the degree of deviation between the initial state and the actual state. If the degree of deviation is unknown, then... Initialize to identity matrix This is a common practice.
[0098] Step S22: The active node updates the initial filter state vector using a preset state transition matrix to determine the intermediate filter state vector;
[0099] It should be noted that the state transition matrix and process noise covariance matrix are constructed based on the state vector; the state vector consists of clock parameters and propagation delay parameters, so the state transition matrix and state covariance matrix are also correspondingly divided into two parts; since the Taylor series coefficients after propagation delay expansion are a set of constants, its state transition matrix... It is an identity matrix, while the state transition matrix of the clock parameters is... Written as:
[0100] ;
[0101] Based on the above, the complete state transition matrix of the state vector can be obtained, that is, the preset state transition matrix. It can be represented as:
[0102] ;
[0103] Furthermore, the transition process of the state vector can be represented as follows:
[0104] ;
[0105] in, Let be the local clock phase offset of node j at time k-1 (the previous time step); Let be the local clock frequency offset of node j at time k-1; for The propagation delay required for node i to transmit the synchronization signal to node j for The first derivative; for The propagation delay required for node j to transmit the synchronization signal to node i. for The first derivative; This refers to the communication interval.
[0106] Furthermore, the update process of the intermediate filter state vector can be represented as:
[0107] ;
[0108] in, This is the intermediate filter state vector when the number of iterations is k; This is a preset state transition matrix; This is the initial filter state vector when the number of iterations is k-1; The noise is state transition noise, and it follows a zero mean and a covariance matrix of... The Gaussian distribution.
[0109] Step S23: The active node updates the initial state covariance matrix using a preset state transition matrix and a preset process noise covariance matrix, determines the intermediate state covariance matrix, and counts the number of iterations in real time.
[0110] It should be noted that, assuming both clock noise and propagation delay noise satisfy zero-mean Gaussian noise, the noise standard deviation of the clock phase shift is... The noise standard deviation of the clock frequency deviation is The process noise covariance matrix of clock parameters It can be written as:
[0111] ;
[0112] Furthermore, the noise standard deviation of the Taylor series coefficients is used as an empirical control quantity. Under ideal conditions, it can be set to 0, and the process noise covariance matrix of the Taylor series coefficients is: , The magnitude of depends on the actual motion of the node. Therefore, the complete process noise covariance matrix of the state vector, i.e., the preset process noise covariance matrix. It can be written as:
[0113] ;
[0114] Furthermore, the update process of the intermediate state covariance matrix can be expressed as:
[0115] ;
[0116] in, Let K be the intermediate state covariance matrix when the number of iterations is k. This is a preset state transition matrix; The initial state covariance matrix is given by the number of iterations k-1. is the preset process noise covariance matrix; T is the transpose.
[0117] Step S24: The active node determines whether the number of iterations has reached the preset number of iterations;
[0118] Step S25: If yes, the active node uses the intermediate filter state vector as the prediction filter state vector and the intermediate state covariance matrix as the prediction state covariance matrix.
[0119] It should be noted that if the iteration number k reaches the preset iteration number, the active node will set the intermediate state covariance matrix at iteration number k. As the predicted state covariance matrix, the intermediate filter state vector at iteration number k is used. As the state vector of the prediction filter; if the iteration number k has not reached the preset iteration number, the active node will use the intermediate state covariance matrix set when the iteration number is k. The new initial state covariance matrix and the intermediate filter state vector at iteration number k are used as the intermediate state covariance matrix. As the new initial filter state vector, proceed to step S22 until the iteration number k reaches the preset iteration number, and use the intermediate state covariance matrix determined when the iteration number k reaches the preset iteration number. As the predicted state covariance matrix, the intermediate filter state vector is determined when the number of iterations k reaches the preset number of iterations. The state vector is used as the prediction filter state vector; the preset number of iterations can be set as needed, and this invention is not limited thereto.
[0120] Step 103: The active node filters the first observation data and the second observation data to determine the target observation data.
[0121] It should be noted that the observation vector is constructed based on the pseudorange and signal frequency collected in each round of communication; in each round of communication, the active node i can obtain pseudorange observations. , Frequency observation , , , In this context, the frequency observation is optional. Clock parameters and propagation delay parameters are observable for the pseudorange observation, but the frequency observation cannot independently estimate all parameters. Therefore, a vector method is used. Let represent the observation information of the k-th round of synchronous communication, then the observation vector can be represented as: .
[0122] Further, step 103 may include the following sub-steps S31-S37:
[0123] Step S31: The active node determines the first rewritten signal data corresponding to the first received signal strength difference and the second rewritten signal data corresponding to the second received signal strength difference based on the first pseudorange, the first received signal frequency, the second pseudorange, the second received signal frequency, the active node's transmitted signal frequency, and the passive node's transmitted signal frequency.
[0124] It should be noted that each active node i will collect N-1 sets of data in the form of... The observation vector is rewritten as a new state vector. , where c is the speed of light.
[0125] Specifically, based on the observation vector and state vector, the observation equation and observation noise covariance matrix are constructed; according to the synchronous two-way ranging model and the first-order approximation model of propagation delay, the pseudorange observation is... , There is a non-linear relationship between the clock parameters and the propagation delay parameters, as follows:
[0126] ;
[0127] ;
[0128] in, The clock frequency offset of passive node j; pseudo-range The corresponding observation noise satisfies zero mean and standard deviation of Gaussian distribution; The local clock frequency offset of active node i; pseudo-range The corresponding observation noise satisfies zero mean and standard deviation of The Gaussian distribution.
[0129] Furthermore, by expanding on the propagation delay, we obtain the pseudorange observation and the state vector. The relationship is as follows:
[0130] ;
[0131] ;
[0132] Furthermore, assuming that the clock of node i is an ideal clock, and after rearranging terms, the observation equation is further simplified to:
[0133] ;
[0134] ;
[0135] Wherein, formula The right side of the equals sign Treating it as a constant rather than an observable avoids more complex nonlinear relationships.
[0136] Furthermore, frequency observations , , , With state quantity , , , There is a nonlinear relationship. Generally, because the transmission times of the two nodes are relatively close, the Doppler velocity between the two nodes... and It will be very close; assuming the Doppler velocity is constant, a Doppler velocity parameter can be used. Approximation, i.e. The relationship between Doppler velocity and Doppler frequency shift between nodes is as follows:
[0137] ;
[0138] ;
[0139] in, The Doppler frequency shift between the frequency of the signal transmitted by node i and the frequency of the signal received by node j; The Doppler frequency shift is the frequency of the signal transmitted by node j and the frequency of the signal received by node i.
[0140] Furthermore, assuming the Doppler velocity is constant... and They will also be very close; therefore, the relationship between the Doppler velocity and the first-order Taylor series coefficients of the propagation delay is as follows:
[0141] ;
[0142] in, for The first derivative of the propagation delay required for node i to transmit the synchronization signal to node j; for The first derivative of the propagation delay required for node j to transmit the synchronization signal to node i.
[0143] Furthermore, the relationship between Doppler frequency shift and the frequency of the transmitted signal and the frequency of the received signal is as follows:
[0144] ;
[0145] ;
[0146] Based on the above, we can conclude that:
[0147] ;
[0148] ;
[0149] Furthermore, assuming that the clock of node i is an ideal clock, similarly, to prevent the nonlinear relationship from becoming too complex, we will... and Treat it as a constant. and If we consider it as an observation and take into account the presence of observation noise, then the above equation can be rearranged to obtain the following form:
[0150] ;
[0151] ;
[0152] Among them, the right side of the equation Similarly, it is used as known information to construct the observation function and Jacobian matrix in the extended Kalman filter, rather than as the observation itself. for and The corresponding observation noise satisfies zero mean and standard deviation of . Gaussian distribution; for and The corresponding observation noise satisfies zero mean and standard deviation of . The Gaussian distribution.
[0153] In summary, the observation vector is rewritten as follows: The observation vector includes first rewritten signal data and second rewritten signal data. The first rewritten signal data includes... , The second rewritten signal data includes , ,in, The propagation delay, including clock skew, between the signal sent by the active node i and the passive node j. The propagation delay, including clock skew, between the passive node j sending a signal and the active node i.
[0154] Step S32: The active node compares the first signal strength difference with a preset strength threshold;
[0155] Step S33: If the first signal strength difference is less than the preset strength threshold, the active node will use the first rewritten signal data as the first target observation data.
[0156] It should be noted that the observations are adjusted based on signal strength; if multipath effects exist in the working environment, the total received signal power can be analyzed. and first path power The difference between (i.e., the signal strength difference of the passive node j receiving the first synchronization signal) The signal strength difference between the active node i and the second synchronization signal received ),when If the observations and variances corresponding to the communication link are discarded, the specific calculations of the total received power and the first path power depend on the sensor device.
[0157] The specific calculation of the total received power and the first path power depends on the sensor device. For example, the calculation formula for DW1000 is as follows:
[0158] ;
[0159] ;
[0160] in, The channel impulse response power is represented by A; a constant term is represented by N; and the leading cumulative count is represented by N. This represents the amplitude point of the first path; This represents the amplitude point of the second path; This is the amplitude point of the third path; all of the above parameters can be obtained from the registers of the DW1000.
[0161] Specifically, if the first signal strength difference is less than a preset strength threshold, the active node will use the first rewritten signal data as the first target observation data, that is, retain the first rewritten signal data.
[0162] Step S34: If the first signal strength difference is greater than or equal to the preset strength threshold, the active node will remove the first rewritten signal data.
[0163] Step S35: The active node compares the second signal strength difference with a preset strength threshold;
[0164] Step S36: If the second signal strength difference is less than the preset strength threshold, the active node will use the second rewritten signal data as the second target observation data.
[0165] It should be noted that if the second signal strength difference is less than the preset strength threshold, the active node will use the second rewritten signal data as the second target observation data, that is, retain the second rewritten signal data.
[0166] Step S37: If the second signal strength difference is greater than or equal to the preset strength threshold, the active node will remove the second rewritten signal data.
[0167] Step 104: The active node generates the target filter state vector based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node.
[0168] Further, step 104 may include the following sub-steps S41-S46:
[0169] Step S41: The active node uses the prediction filter state vector and target observation data to construct the observation function matrix and Jacobian matrix;
[0170] It should be noted that the process of constructing the observation function matrix can be represented as follows:
[0171] ;
[0172] in, The observation function matrix; For observation functions; For the corresponding state vector of the prediction filter The propagation delay required for node i to transmit the synchronization signal to node j; for The first derivative; Local time; To predict the clock phase offset of node j in the filter state vector; To predict the clock frequency offset of node j in the filter state vector; The propagation delay, including clock skew, between the active node i and the passive node j; For the corresponding state vector of the prediction filter The propagation delay required for node j to transmit the synchronization signal to node i; for The first derivative; The frequency of the signal transmitted by the active node i itself; For the observed noise vector; The signal frequency for receiving the first synchronization signal is considered constant. Let be the frequency of the transmitted signal of passive node j, which is considered a constant.
[0173] Furthermore, due to the observation equation middle and Given the existence of a simple nonlinear relationship, we consider using an extended Kalman filter as the joint estimator. Therefore, we need to calculate the Jacobian matrix, which is the matrix of the first-order partial derivatives of the observation vector with respect to the state vector. Jacobian matrix The construction process can be represented as:
[0174] ;
[0175] Step S42: The active node performs matrix subtraction on the observation function matrix and the preset actual observation function matrix to determine the residual;
[0176] It should be noted that the calculation process of the residual can be expressed as follows: ;in, For residuals; To pre-set the actual observation function matrix; Let be the observation function matrix.
[0177] Step S43: The active node updates the preset initial observation noise covariance matrix using residuals, determines the target observation noise covariance matrix, and calculates the Kalman gain matrix based on the target observation noise covariance matrix, the predicted state covariance matrix, and the Jacobian matrix.
[0178] It should be noted that, considering the unavoidable noise in the observations, an initial observation noise covariance matrix is preset. It is necessary to assume that the noise of each observation is independent. It is a diagonal matrix, which can be represented as:
[0179] ;
[0180] Furthermore, the residual is used to update the preset initial observation noise covariance matrix to determine the target observation noise covariance matrix. The processing of the target observation noise covariance matrix can be expressed as follows: ,in, The target observation noise covariance matrix; To preset the initial observation noise covariance matrix; This is a vector of adjustment coefficients, where all elements are greater than 1. ; This is a vector of reciprocals of the threshold, where each element is the reciprocal of the threshold. ; For Hadamard products.
[0181] Furthermore, the processing of the Kalman gain matrix can be expressed as follows:
[0182] ;
[0183] in, The Kalman gain matrix; For predicting the state covariance matrix; It is a Jacobian matrix; Let T be the target observation noise covariance matrix; T is the transpose. This is the inverse operation.
[0184] Step S44: The active node updates the prediction filter state vector using the Kalman gain matrix and residuals to determine the updated filter state vector; and the number of updates is counted in real time.
[0185] It should be noted that the process of updating the filter state vector can be represented as follows:
[0186] ;
[0187] in, To update the filter state vector; For predicting the filter state vector; The Kalman gain matrix; , , , It represents the residual.
[0188] Step S45: The active node determines whether the number of updates has reached the preset update round threshold;
[0189] Step S46: If the target is reached, the active node will update the filter state vector as the target filter state vector.
[0190] It should be noted that before the synchronization communication process ends, the synchronization communication, information collection, and iterative joint estimation are repeatedly performed. The joint estimator on the node can output an estimated state vector after each synchronization communication round. And the covariance matrix reflecting its confidence level. , Including the clock parameters of node j allows for synchronization between two nodes.
[0191] Specifically, if the number of updates reaches a preset update round threshold, the active node will update the filter state vector. As the target filter state vector; if the number of updates has not reached the preset update round threshold, the active node updates the predicted state covariance matrix using the Kalman gain matrix and Jacobian matrix to obtain the updated state covariance matrix, which is used as the new initial state covariance matrix. The updated filter state vector is used as the new initial filter state vector, and the target observation noise covariance matrix is used as the new preset initial observation noise covariance matrix. Then, a new synchronization communication process is initiated to obtain new first observation data and new second observation data. Then, step S22 is executed until the number of updates reaches the preset update round threshold. The updated filter state vector determined when the number of updates reaches the preset update round threshold is used. The target filter state vector is used as the processing method for updating the filter state vector, which can be represented as follows: .
[0192] Step 105: The active node constructs the node Euclidean distance matrix based on multiple vector elements in the target filter state vector.
[0193] Multiple vector elements include the clock phase offset of node j's local clock during the k-th round of communication. Propagation delay as well as The coefficients obtained after Taylor series expansion , , , .
[0194] It should be noted that the active node calculates multiple propagation delays based on multiple vector elements in the target filter state vector, and uses all propagation delays to construct the node Euclidean distance matrix; the calculation process of the Kth round communication propagation delay (i.e., when the number of updates reaches the preset update round threshold) can be expressed as:
[0195]
[0196] in, The propagation time required for node i to send a signal to node j during the Kth round of communication is also called the propagation delay. for The propagation delay required for node i to transmit the synchronization signal to node j; for The first derivative; The local time for the Kth round of communication; The propagation time required for node j to send a signal to node i during the Kth round of communication is also called the propagation delay. for The propagation delay required for node j to transmit the synchronization signal to node i; for The first derivative; Let be the phase offset of the local clock of node j during the Kth round of communication.
[0197] Furthermore, in the Kth round, i.e. when the number of updates reaches the preset update round threshold, the process of constructing the Euclidean distance matrix of the nodes can be represented as:
[0198] ;
[0199] in, is the Euclidean distance matrix between nodes; c is the speed of light; The first row and second column of the Euclidean distance matrix represents the time required for a signal to propagate from node 1 to node 2 (propagation delay). The element in the first row and third column of the Euclidean distance matrix represents the time required for a signal to propagate from node 1 to node 3.
[0200] Furthermore, if network-wide clock synchronization and ranging are required, the server needs to coordinate the synchronization communication process of each node, and broadcast a synchronization initialization signal across the entire network during the initialization phase. Any node in the network receives a network-wide broadcast synchronization initialization signal. Afterwards, it is necessary to follow The signal requires setting synchronization communication parameters and periodically broadcasting synchronization signals. Upon receiving the broadcast synchronization signals, the remaining nodes respond according to the above process until each node estimates its clock parameters and ranging parameters with other nodes, thus achieving clock synchronization and ranging across the entire network. The ranging values are then used to construct a Euclidean distance matrix. It can be used to solve node localization problems, and can be further used for relative positioning between nodes using multidimensional scaling transformation, or used as an observation in integrated navigation methods.
[0201] It is worth mentioning that before the end of the synchronization cycle, that is, before the end of the Kth round of synchronization communication, the synchronization communication, information collection and joint estimation based on extended Kalman filtering are repeatedly performed. After the synchronization cycle is completed, each node can know the relative clock difference and relative distance with the other nodes, that is, the clock synchronization and ranging of the whole network are realized, which can be further used to correct the sensor information containing time information provided by the other nodes.
[0202] Furthermore, when there is a need for clock synchronization or ranging between two nodes without requiring a full network resynchronization, the above process can be performed between the two nodes. First, the server no longer needs to send a synchronization signal; one node (acting as the active node) sends a synchronization initialization signal to the other node (acting as the passive node). The passive node receives the synchronization initialization signal After modifying their own communication configuration, the two nodes then enter a synchronous communication process, which is the same as network distributed synchronization.
[0203] For example, please refer to Figure 3 The server broadcasts a synchronization initialization signal to coordinate the synchronous communication process of each node, that is, to agree that all nodes in the wireless sensor network should communicate at the same time. Communication interval The synchronization period T is a specific communication frequency at which the time synchronization and ranging process begins. All nodes initialize a joint estimator based on an extended Kalman filter and periodically broadcast a synchronization signal at the same local time. Simultaneously, each node responds to the received synchronization signal by sending the obtained pseudorange, received signal frequency, and received signal strength difference to the corresponding broadcast node (active node). The active node executes the prediction step of the joint estimator, adjusts the observation covariance matrix based on the residual, selects observations based on signal strength, and thus executes the update step of the joint estimator until the number of updates reaches a threshold. Finally, the propagation delay and Euclidean distance matrix are calculated and output, which are used to achieve time synchronization and node Euclidean distance matrix between active and passive nodes. Based on the above, this invention can effectively solve the clock synchronization problem of networks in the long term, and can provide ranging information for solving positioning problems. It achieves data communication through spread spectrum data link technology, realizes frequency modulation and multiplexing, and can effectively overcome the impact of multipath effects on mobile communication. With the assistance of multi-frequency shift observations and the propagation delay modeling method under the synchronous two-way ranging communication mechanism, it achieves high-precision joint clock synchronization and ranging. It considers the differences in signal strength, as well as the degree of deviation between the predicted state mapping in the observation space and the observation vector, which enhances the robustness of the algorithm. It can be used for distributed execution across the entire network, and can also be used for active maintenance of clock synchronization and ranging accuracy between two nodes.
[0204] For comparison of technical effects, existing technologies can be referenced. Wireless sensor networks play an important role in many fields, including smart homes, intelligent transportation, and unmanned aerial vehicles. In these applications, sharing a common time base is a key factor in ensuring the normal operation of the sensor network. The clock oscillator is the core component providing the basic clock frequency signal for the system. Because the frequency of the clock oscillators on sensor network nodes is affected by factors such as temperature deviation, material differences, usage time, and power supply noise, frequency inconsistencies, i.e., frequency deviations, inevitably occur. This results in varying clock phase shifts between different nodes. Furthermore, clock phase shifts are also affected by environmental noise and device noise. Spread spectrum data links are a communication technology whose core idea is to multiply the original signal with a wideband spread spectrum sequence, thereby broadening the signal's spectrum to improve anti-interference performance and transmission capacity. The basic characteristic of spread spectrum communication is that the bandwidth of the signal used to transmit information is much larger than the bandwidth of the information itself. This technology can improve signal anti-interference, communication distance, system capacity, and reduce hardware costs.
[0205] Clock synchronization and ranging among network nodes are currently hot research topics, with clock synchronization and ranging often serving as initial prerequisites or steps in localization. Based on the information possessed by network nodes, sensor networks can be divided into anchored networks and anchorless networks. Anchored networks contain nodes with known prior information such as clock parameters, position, and velocity, while anchorless networks lack this information. In terms of implementation methods, clock synchronization and ranging can be achieved through independent estimation and joint estimation. Independent estimation typically uses addition and subtraction to eliminate clock deviations or propagation delays, while joint estimation treats clock synchronization and ranging as a single problem to be solved simultaneously. Least Squares (LS) is widely used due to its high accuracy and fast convergence. LS is a mathematical optimization technique that finds the optimal function match for data by minimizing the sum of squared errors. However, most LS-based algorithms cannot handle cases of observational anomalies, and as the amount of observation data increases, the size of the information matrix containing all observation information also increases, leading to a greater computational burden for operations such as matrix inversion. Furthermore, if LS-based algorithms are to estimate nonlinear propagation delays, they first need to model the propagation delays. The ranging accuracy is limited by the propagation delay modeling method, and the modeling method is limited by the principle of LS and the synchronous communication mechanism.
[0206] To address the aforementioned problems, this invention proposes a node time synchronization and ranging method for wireless sensor networks. Utilizing spread spectrum data link technology for data communication, it effectively solves the network's clock synchronization problem over the long term, providing ranging information for location-related needs. The spread spectrum data link technology enables signal frequency modulation and multiplexing for inter-node communication, effectively overcoming the impact of multipath effects on mobile communication. With the assistance of multi-frequency shift observations and a propagation delay modeling method based on a synchronous bidirectional ranging communication mechanism, high-precision joint clock synchronization and ranging are achieved. The invention considers differences in signal strength, the mapping of predicted states in the observation space, and the deviation between observation vectors, enhancing the algorithm's robustness. Furthermore, this invention is applicable to communication networks composed of asynchronous sensors, aiming to achieve time synchronization and relative ranging functions in distributed networks by observing the pseudorange and Doppler frequency shift of node communication signals, while simultaneously meeting the long-term synchronization requirements of sensor networks with low computational cost and high robustness.
[0207] Compared with existing technologies, the method proposed in this invention only requires observations from one communication round to update the estimate each time, resulting in low computational complexity. Furthermore, it does not require timestamps in the synchronization signal, making it suitable for inexpensive wireless sensors that cannot include transmission time in the information. The Doppler frequency shift, as an auxiliary observation, provides redundant information for estimating clock frequency deviation and propagation delay. The use of an extended Kalman filter effectively eliminates Gaussian noise effects on state variables and observations. Measures to handle abnormal observations ensure the robustness of the algorithm, enabling it to maintain clock synchronization across the entire network for extended periods. Any node can execute this method locally to maintain synchronization with other nodes, exhibiting high flexibility. Moreover, it provides crucial information such as the Euclidean distance matrix for network localization problems.
[0208] In this embodiment of the invention, a node time synchronization and ranging method for a wireless sensor network is provided. When a passive node in the wireless sensor network receives a first synchronization signal sent by an active node in the wireless sensor network, the passive node determines first observation data based on the first synchronization signal and sends the first observation data to the active node based on preset communication conditions. The active node determines second observation data based on a second synchronization signal sent by the passive node, and iterates the filter state vector and state covariance matrix corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine the prediction filter state vector and prediction state covariance matrix. The active node filters the first observation data and the second observation data to determine the target observation data. The active node then determines the target observation data and the prediction filter state vector based on the target observation data and the prediction filter state vector. The target filter state vector is generated from the filter state vector, the predicted state covariance matrix, and the preset initial observation noise covariance matrix. This target filter state vector is used to achieve time synchronization between active and passive nodes. The active node constructs a node Euclidean distance matrix based on multiple vector elements in the target filter state vector. Based on this scheme, the active node filters the first and second observation data to determine the target observation data. This data, combined with the predicted filter state vector, the predicted state covariance matrix, and the preset initial observation noise covariance matrix, outputs the target filter state vector used for time synchronization between active and passive nodes. The process of constructing the node Euclidean distance matrix based on the target filter state vector eliminates the need for separate methods for time synchronization and ranging, thus reducing computational costs.
[0209] Please see Figure 4 , Figure 4 This is a flowchart illustrating the steps of a node time synchronization and ranging method for a passive node in a wireless sensor network, as provided in Embodiment 2 of the present invention.
[0210] This invention provides a node time synchronization and ranging method for wireless sensor networks, applied to passive nodes in wireless sensor networks, comprising:
[0211] Step 401: When the first synchronization signal sent by the active node in the wireless sensor network is received, determine the first observation data based on the first synchronization signal;
[0212] Step 402: Based on the preset communication conditions, send the first observation data to the active node.
[0213] In this embodiment of the invention, when the passive node receives the first synchronization signal sent by the active node in the wireless sensor network, it determines the first observation data based on the first synchronization signal; based on the preset communication conditions, it sends the first observation data to the active node, and combines the active node to perform a joint estimation process. This eliminates the need to achieve time synchronization and ranging through separate methods, thereby reducing computational costs.
[0214] Please see Figure 5 , Figure 5 This is a flowchart illustrating the steps of a node time synchronization and ranging method for active nodes in a wireless sensor network, as provided in Embodiment 3 of the present invention.
[0215] This invention provides a node time synchronization and ranging method for wireless sensor networks, applied to active nodes in wireless sensor networks, comprising:
[0216] Step 501: Send the first synchronization signal to the passive node in the wireless sensor network, and receive the second synchronization signal and the first observation data sent by the passive node;
[0217] Step 502: Based on the second synchronization signal, determine the second observation data, and iterate the filter state vector and state covariance matrix corresponding to the active node based on the preset state transition matrix and the preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix.
[0218] Step 503: Filter the first observation data and the second observation data to determine the target observation data;
[0219] Step 504: Generate the target filter state vector based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node.
[0220] Step 505: Construct the node Euclidean distance matrix based on multiple vector elements in the target filter state vector.
[0221] In this embodiment of the invention, the process of filtering the first and second observation data by the active node, determining the target observation data, and combining the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix to output the target filter state vector for achieving time synchronization between the active and passive nodes, and then constructing the node Euclidean distance matrix based on the target filter state vector, does not require separate methods to achieve time synchronization and ranging, thus reducing computational costs.
[0222] Please see Figure 6 , Figure 6 This is a structural block diagram of a node time synchronization and ranging system for a wireless sensor network provided in Embodiment 4 of the present invention.
[0223] This invention provides a node time synchronization and ranging system for a wireless sensor network, comprising:
[0224] The receiving module 601 is used to determine the first observation data based on the first synchronization signal when the passive node in the wireless sensor network receives the first synchronization signal sent by the active node in the wireless sensor network, and send the first observation data to the active node based on preset communication conditions.
[0225] The iteration module 602 is used for the active node to determine the second observation data based on the second synchronization signal sent by the passive node, and to iterate the filter state vector and state covariance matrix corresponding to the active node based on the preset state transition matrix and the preset process noise covariance matrix to determine the prediction filter state vector and the prediction state covariance matrix.
[0226] The filtering module 603 is used by the active node to filter the first observation data and the second observation data to determine the target observation data;
[0227] The generation module 604 is used by the active node to generate the target filter state vector based on the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix; the target filter state vector is used to realize time synchronization between the active node and the passive node.
[0228] Module 605 is used by active nodes to construct the node Euclidean distance matrix based on multiple vector elements in the target filter state vector.
[0229] Furthermore, the iteration module 602 is specifically used for:
[0230] The active node initializes the filter state vector and state covariance matrix corresponding to the active node, and determines the initial filter state vector and initial state covariance matrix.
[0231] The active node updates the initial filter state vector using a preset state transition matrix to determine the intermediate filter state vector;
[0232] The active node updates the initial state covariance matrix using a preset state transition matrix and a preset process noise covariance matrix, determines the intermediate state covariance matrix, and counts the number of iterations in real time.
[0233] The active node determines whether the preset number of iterations has been reached.
[0234] If so, the active node uses the intermediate filter state vector as the prediction filter state vector and the intermediate state covariance matrix as the prediction state covariance matrix.
[0235] Further, the first observation data includes a first pseudorange, a first received signal frequency, and a first received signal strength difference; the second observation data includes a second pseudorange, a second received signal frequency, an active node's transmitted signal frequency, a second received signal strength difference, and a passive node's transmitted signal frequency; the target observation data includes first target observation data and second target observation data; the filtering module 603 is specifically used for:
[0236] The active node determines the first rewritten signal data corresponding to the first received signal strength difference and the second rewritten signal data corresponding to the second received signal strength difference based on the first pseudorange, the first received signal frequency, the second pseudorange, the second received signal frequency, the active node's transmitted signal frequency, and the passive node's transmitted signal frequency.
[0237] The active node compares the first signal strength difference with a preset strength threshold.
[0238] If the first signal strength difference is less than the preset strength threshold, the active node will use the first rewritten signal data as the first target observation data.
[0239] If the first signal strength difference is greater than or equal to the preset strength threshold, the active node will discard the first rewritten signal data;
[0240] The active node compares the second signal strength difference with a preset strength threshold.
[0241] If the second signal strength difference is less than the preset strength threshold, the active node will use the second rewritten signal data as the second target observation data.
[0242] If the second signal strength difference is greater than or equal to a preset strength threshold, the active node will discard the second rewritten signal data.
[0243] Furthermore, module 604 is specifically used for:
[0244] The active node uses the prediction filter state vector and the target observation data to construct the observation function matrix and the Jacobian matrix;
[0245] The active node performs matrix subtraction between the observation function matrix and the preset actual observation function matrix to determine the residual.
[0246] The active node updates the preset initial observation noise covariance matrix using residuals to determine the target observation noise covariance matrix, and calculates the Kalman gain matrix based on the target observation noise covariance matrix, the predicted state covariance matrix, and the Jacobian matrix.
[0247] The active node updates the state vector of the prediction filter using the Kalman gain matrix and residuals to determine the updated filter state vector; and counts the number of updates in real time.
[0248] The active node determines whether the number of updates has reached the preset update round threshold;
[0249] If the target is reached, the active node will update the filter state vector as the target filter state vector.
[0250] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0251] This invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs the steps of the node time synchronization and ranging method of the wireless sensor network as described in Embodiment 1 above.
[0252] This invention also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the node time synchronization and ranging method of the wireless sensor network as described in Embodiment 1 above.
[0253] This invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the node time synchronization and ranging method of the wireless sensor network as described in Embodiment 1 above.
[0254] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for node time synchronization and ranging in a wireless sensor network, characterized in that: include: When a passive node in the wireless sensor network receives a first synchronization signal sent by an active node in the wireless sensor network, the passive node determines first observation data according to the first synchronization signal, and sends the first observation data to the active node based on a preset communication condition; The active node determines the second observation data based on the second synchronization signal sent by the passive node, and iterates the filter state vector and state covariance matrix corresponding to the active node based on the preset state transfer matrix and the preset process noise covariance matrix to determine the predicted filter state vector and the predicted state covariance matrix; The active node screens the first observation data and the second observation data to determine target observation data; The active node generates a target filter state vector according to the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node; The active node constructs a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vector.
2. The node time synchronization and ranging method of a wireless sensor network according to claim 1, characterized in that: The active node iterates the filter state vector and state covariance matrix corresponding to the active node based on a preset state transfer matrix and a preset process noise covariance matrix to determine a predicted filter state vector and a predicted state covariance matrix, including: The active node initializes the filter state vector and the state covariance matrix corresponding to the active node to determine the initial filter state vector and the initial state covariance matrix; The active node updates the initial filter state vector using a preset state transfer matrix to determine an intermediate filter state vector; The active node updates the initial state covariance matrix using the preset state transfer matrix and the preset process noise covariance matrix, determines the intermediate state covariance matrix, and counts the number of iterations in real time; The active node determines whether the number of iterations reaches a preset number of iterations; If so, the active node uses the intermediate filter state vector as the prediction filter state vector and the intermediate state covariance matrix as the prediction state covariance matrix.
3. The node time synchronization and ranging method of a wireless sensor network according to claim 1, characterized in that: The first observation data includes a first pseudorange, a first received signal frequency and a first received signal strength difference; the second observation data includes a second pseudorange, a second received signal frequency, an active node sending signal frequency, a second received signal strength difference and a passive node sending signal frequency; the target observation data includes first target observation data and second target observation data; The active node screens the first observation data and the second observation data to determine target observation data, including: The active node determines, according to the first pseudorange, the first received signal frequency, the second pseudorange, the second received signal frequency, the active node sending signal frequency, and the passive node sending signal frequency, first rewritten signal data corresponding to the first received signal strength difference and second rewritten signal data corresponding to the second received signal strength difference; The active node compares the first signal strength difference with a preset strength threshold; If the first signal strength difference is less than a preset strength threshold, the active node uses the first rewritten signal data as first target observation data; If the first signal strength difference is greater than or equal to the preset strength threshold, the active node removes the first rewritten signal data; The active node compares the second signal strength difference with the preset strength threshold; If the second signal strength difference is less than the preset strength threshold, the active node uses the second rewritten signal data as second target observation data; If the second signal strength difference is greater than or equal to the preset strength threshold, the active node removes the second rewritten signal data.
4. The node time synchronization and ranging method of a wireless sensor network according to claim 1, characterized in that: The active node generates a target filter state vector according to the target observation data, the prediction filter state vector, the prediction state covariance matrix, and a preset initial observation noise covariance matrix, including: The active node uses the prediction filter state vector and the target observation data to construct an observation function matrix and a Jacobian matrix; The active node performs a matrix subtraction operation on the observation function matrix and a preset actual observation function matrix to determine a residual; The active node updates the preset initial observation noise covariance matrix using the residual, determines the target observation noise covariance matrix, and calculates the Kalman gain matrix according to the target observation noise covariance matrix, the predicted state covariance matrix, and the Jacobian matrix; The active node updates the prediction filter state vector using the Kalman gain matrix and the residual to determine the updated filter state vector; and counts the number of updates in real time; The active node determines whether the update number reaches a preset update round threshold; If so, the active node uses the updated filter state vector as the target filter state vector.
5. A method for node time synchronization and ranging in a wireless sensor network, characterized in that: Applied to a passive node in a wireless sensor network, the method comprises: When receiving a first synchronization signal sent by an active node in the wireless sensor network, determining first observation data according to the first synchronization signal; Based on preset communication conditions, the first observation data is sent to the active node.
6. A method for node time synchronization and ranging in a wireless sensor network, characterized in that: Applied to an active node in a wireless sensor network, the method comprises: Sending a first synchronization signal to a passive node in the wireless sensor network, and receiving a second synchronization signal and first observation data sent by the passive node; Based on the second synchronization signal, second observation data is determined, and based on a preset state transfer matrix and a preset process noise covariance matrix, a filter state vector and a state covariance matrix corresponding to the active node are iterated to determine a predicted filter state vector and a predicted state covariance matrix; Screening the first observation data and the second observation data to determine target observation data; Generate a target filter state vector according to the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node; A node Euclidean distance matrix is constructed according to a plurality of vector elements in the target filter state vector.
7. A node time synchronization and ranging system for a wireless sensor network, characterized in that: include: A receiving module, configured to, when a passive node in a wireless sensor network receives a first synchronization signal sent by an active node in the wireless sensor network, determine first observation data according to the first synchronization signal, and send the first observation data to the active node based on a preset communication condition; An iteration module, used for the active node to determine the second observation data based on the second synchronization signal sent by the passive node, and iterate the filter state vector and state covariance matrix corresponding to the active node based on a preset state transfer matrix and a preset process noise covariance matrix to determine a predicted filter state vector and a predicted state covariance matrix; A screening module, used for the active node to screen the first observation data and the second observation data to determine target observation data; A generating module, used for the active node to generate a target filter state vector according to the target observation data, the prediction filter state vector, the prediction state covariance matrix, and the preset initial observation noise covariance matrix; the target filter state vector is used to achieve time synchronization between the active node and the passive node; A construction module is used for the active node to construct a node Euclidean distance matrix according to multiple vector elements in the target filter state vector.
8. A computer device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the node time synchronization and ranging method of the wireless sensor network as described in any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the node time synchronization and ranging method of the wireless sensor network as claimed in any one of claims 1 to 4 is implemented.
10. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer is caused to execute the node time synchronization and ranging method for a wireless sensor network as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Distributed SLAM (simultaneous localization and mapping) method on basis of global optimal data fusion
CN105737832A
Clock drift rate tracking method and system based on interactive multi-model filter
CN110350996A
Novel double-Kalman filtering method
CN114637956A
Visual inertial odometer online time calibration method based on two-stage extended Kalman filtering
CN116592917A
Method and system for positioning time difference of arrival information based on Kalman network
CN118625254A
Cited By
Hierarchical architecture-based real-time analysis method for multi-modal wearable sensor data
WO2026188793A1