Method and system for time synchronization and ranging of nodes of a wireless sensor network

By exchanging synchronization signals between active and passive nodes in wireless sensor networks and iteratively utilizing the state transfer matrix and noise covariance matrix, the target filter state vector is generated, which solves the problems of poor time synchronization and ranging accuracy in wireless sensor networks and reduces the computational cost.

CN119421232BActive Publication Date: 2025-10-17GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411610102.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-10-17
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

Existing wireless sensor network node time synchronization and ranging technologies suffer from poor accuracy, resulting in increased computational costs.

Method used

A node time synchronization and ranging method for wireless sensor networks is adopted. Through synchronous signal exchange between active and passive nodes, the preset state transfer matrix and process noise covariance matrix are used for iteration to generate the target filter state vector, thereby achieving time synchronization and ranging and reducing the computational cost.

Benefits of technology

By filtering the observation data and combining the prediction filter state vector and covariance matrix to construct the node Euclidean distance matrix, time synchronization and ranging without independent methods are achieved, reducing the computational cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119421232B_ABST
    Figure CN119421232B_ABST
Patent Text Reader

Abstract

The application discloses a node time synchronization and ranging method and system of a wireless sensor network, and is used for solving the technical problem that the existing node time synchronization and ranging technology of the wireless sensor network causes poor time synchronization and ranging precision. The method comprises the following steps: 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 screens the first observation data and second observation data, determines target observation data, and combines a predicted filter state vector, a predicted state covariance matrix and a preset initial observation noise covariance matrix to output a target filter state vector used for realizing time synchronization between the active node and the passive node, and then constructs a node Euclidean distance matrix according to the target filter state vector.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of wireless communication technology, in particular to a node time synchronization and ranging method and system of a wireless sensor network. BACKGROUND

[0002] With the progress of technologies in the fields of sensor, wireless communication, embedded computing, distributed processing, microelectronics, etc., in recent years, low-cost, low-power sensor nodes with on-site perception, local computing and wireless transmission have begun to appear on a large scale, and a special research field-wireless sensor network has been formed.

[0003] Wireless sensor network can be deployed temporarily without relying on fixed infrastructure, has good scalability and self-organizing ability, and the node life cycle is measured in years, so wireless sensor network has different characteristics from other traditional networks and belongs to a new type of distributed network system. Time synchronization is one of the important problems faced by this new type of distributed system. In wireless sensor network (WSN, Wireless Sensor Network), the position information of nodes is an indispensable part of network messages and is the premise of target detection and tracking, event geographic location reporting, etc.

[0004] The existing node time synchronization and ranging technology of wireless sensor network is usually based on the traditional TOA (Time of Arrival) ranging method, which establishes the distance relationship between nodes by measuring the arrival time of signals. However, the traditional TOA ranging method requires time synchronization, which needs to perform a time synchronization algorithm, so that time synchronization and ranging are realized by independent methods, resulting in a large increase in calculation cost. SUMMARY

[0005] The present application provides a node time synchronization and ranging method and system of a wireless sensor network, which is used to solve the technical problem of poor accuracy of time synchronization and ranging caused by the existing node time synchronization and ranging technology of wireless sensor network.

[0006] The first aspect of the present application provides a node time synchronization and ranging method of a wireless sensor network, comprising:

[0007] 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;

[0008] The active node determines second observation data based on the second synchronization signal sent by the passive node, and iterates filter state vectors and state covariance matrices corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine predicted filter state vectors and predicted state covariance matrices.

[0009] The active node screens the first observation data and the second observation data to determine target observation data.

[0010] The active node generates target filter state vectors according to the target observation data, the predicted filter state vectors, the predicted state covariance matrices and a preset initial observation noise covariance matrix, and the target filter state vectors are used to realize time synchronization between the active node and the passive node.

[0011] The active node constructs a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vectors.

[0012] Optionally, the active node iterates filter state vectors and state covariance matrices corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine predicted filter state vectors and predicted state covariance matrices, including:

[0013] The active node initializes filter state vectors and state covariance matrices corresponding to the active node to determine initial filter state vectors and initial state covariance matrices.

[0014] The active node updates the initial filter state vectors using a preset state transition matrix to determine intermediate filter state vectors.

[0015] The active node updates the initial state covariance matrices using the preset state transition matrix and a preset process noise covariance matrix to determine intermediate state covariance matrices, and counts iteration numbers in real time.

[0016] The active node determines whether the iteration numbers reach preset iteration numbers.

[0017] If yes, the active node takes the intermediate filter state vectors as predicted filter state vectors and takes the intermediate state covariance matrices as predicted state covariance matrices.

[0018] Optionally, the first observation data comprises a first pseudo-range, a first received signal frequency and a first received signal strength difference; the second observation data comprises a second pseudo-range, a second received signal frequency, a signal frequency sent by the active node, a second received signal strength difference and a signal frequency sent by the passive node; the target observation data comprises 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, comprising:

[0019] The active node determines 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 according to the first pseudo-range, the first received signal frequency, the second pseudo-range, the second received signal frequency, the signal frequency sent by the active node and the signal frequency sent by the passive node.

[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 the preset strength threshold, the active node takes the first rewritten signal data as first target observation data.

[0022] If the first signal strength difference is greater than or equal to the preset strength threshold, the active node eliminates 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 takes the second rewritten signal data as second target observation data.

[0025] If the second signal strength difference is greater than or equal to the preset strength threshold, the active node eliminates the second rewritten signal data.

[0026] Optionally, the active node generates a target filter state vector according to the target observation data, the predicted filter state vector, the predicted state covariance matrix and a preset initial observation noise covariance matrix, comprising:

[0027] The active node constructs an observation function matrix and a Jacobian matrix by using the predicted filter state vector and the target observation data.

[0028] The active node performs matrix subtraction operation on the observation function matrix and a preset actual observation function matrix to determine a residual.

[0029] The active node updates the preset initial observation noise covariance matrix by using the residual, determines a target observation noise covariance matrix, and calculates a Kalman gain matrix according to the target observation noise covariance matrix, the predicted state covariance matrix and the Jacobian matrix;

[0030] The active node updates the predicted filter state vector by using the Kalman gain matrix and the residual, determines an updated filter state vector, and counts the number of updates in real time;

[0031] The active node determines whether the number of updates reaches a preset update round threshold.

[0032] If yes, the active node takes the updated filter state vector as the target filter state vector.

[0033] The second aspect of the present application provides a node time synchronization and ranging method of a wireless sensor network, which is applied to a passive node in the wireless sensor network and includes the following steps:

[0034] When a first synchronization signal sent by an active node in the wireless sensor network is received, first observation data is determined according to the first synchronization signal.

[0035] The first observation data is sent to the active node based on a preset communication condition.

[0036] The third aspect of the present application provides a node time synchronization and ranging method of a wireless sensor network, which is applied to an active node in the wireless sensor network and includes the following steps:

[0037] A first synchronization signal is sent to a passive node in the wireless sensor network, and a second synchronization signal and first observation data sent by the passive node are received.

[0038] Second observation data is determined based on the second synchronization signal, and a filter state vector and a state covariance matrix corresponding to the active node are iterated based on a preset state transition matrix and a preset process noise covariance matrix, to determine a predicted filter state vector and a predicted state covariance matrix.

[0039] The first observation data and the second observation data are screened to determine target observation data.

[0040] A target filter state vector is generated according to the target observation data, the predicted filter state vector, the predicted state covariance matrix and a 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.

[0041] construct a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vector.

[0042] The fourth aspect of the present application provides a node time synchronization and ranging system of a wireless sensor network, comprising:

[0043] The receiving module is configured to, when a passive node in the 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.

[0044] The iteration module is configured to, based on second observation data sent by the passive node, determine a predicted filter state vector and a predicted state covariance matrix by iteratively processing a filter state vector and a state covariance matrix corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix.

[0045] The screening module is configured to screen the first observation data and the second observation data to determine target observation data.

[0046] The generating module is configured to generate a target filter state vector according to the target observation data, the predicted filter state vector, the predicted state covariance matrix, and a preset initial observation noise covariance matrix, wherein the target filter state vector is used to realize time synchronization between the active node and the passive node.

[0047] The constructing module is configured to construct a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vector.

[0048] The fifth aspect of the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the node time synchronization and ranging method of the wireless sensor network according to any one of the above aspects.

[0049] The sixth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed to realize the steps of the node time synchronization and ranging method of the wireless sensor network according to any one of the above aspects.

[0050] The seventh aspect of the present application provides a computer program product, the computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprises program instructions, wherein when the program instructions are executed by a computer, the computer executes the steps of the node time synchronization and ranging method of the wireless sensor network as described in any one of the above aspects.

[0051] From the above technical solutions, the present application has the following advantages:

[0052] The above technical solutions of the present application provide a node time synchronization and ranging method of 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 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 second observation data based on a second synchronization signal sent by the passive node and iterates a filter state vector and a state covariance matrix corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine a predicted filter state vector and a 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 predicted filter state vector, the predicted state covariance matrix, and a 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. The active node constructs a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vector. Based on the above solution, the target observation data is determined by screening the first observation data and the second observation data by the active node, and the target filter state vector used to realize time synchronization between the active node and the passive node is output in combination with the predicted filter state vector, the predicted state covariance matrix, and the preset initial observation noise covariance matrix. Then, the node Euclidean distance matrix is constructed according to the target filter state vector. The process does not need to realize time synchronization and ranging by independent methods respectively, and can reduce the calculation cost. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0054] Figure 1 A step flowchart of a node time synchronization and ranging method of a wireless sensor network provided for the first embodiment of the present application;

[0055] Figure 2 A frame diagram of a node time synchronization and ranging process of a wireless sensor network provided for the embodiment one of the present application;

[0056] Figure 3 A path diagram of a node time synchronization and ranging method of a wireless sensor network provided for the embodiment one of the present application;

[0057] Figure 4 A step flow chart of a node time synchronization and ranging method of a wireless sensor network applied to a passive node in a wireless sensor network provided for the embodiment two of the present application;

[0058] Figure 5 A step flow chart of a node time synchronization and ranging method of a wireless sensor network applied to an active node in a wireless sensor network provided for the embodiment three of the present application;

[0059] Figure 6 A structure block diagram of a node time synchronization and ranging system of a wireless sensor network provided for the embodiment four of the present application. DETAILED DESCRIPTION

[0060] The embodiment of the present application provides a node time synchronization and ranging method and system of a wireless sensor network, which is used for solving the technical problem that the existing node time synchronization and ranging technology of a wireless sensor network causes poor precision of time synchronization and ranging.

[0061] In order to make the technical scheme of the present application clearer and easier to understand, the technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the embodiments described below are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the present application.

[0062] Please refer to Figure 1 , Figure 1 A step flow chart of a node time synchronization and ranging method of a wireless sensor network provided for the embodiment one of the present application.

[0063] The node time synchronization and ranging method of a wireless sensor network provided by the present application comprises the following steps.

[0064] In step 101, 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 according to the first synchronization signal, and sends the first observation data to the active node based on a preset communication condition.

[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 a first synchronization signal sent by the passive node j according to the active node through a pseudorandom noise code or a carrier phase. , the calculated pseudorange ; The first received signal frequency is the signal frequency of the first synchronization signal received by the passive node j The first received signal strength difference is the signal strength difference of the first synchronization signal received by the passive node j .

[0066] Please note that Figure 2 When any pair of nodes (active node, passive node) in the wireless sensor network needs clock synchronization and ranging, the server broadcasts the synchronization initialization signal Init, that is, all nodes in the wireless sensor network broadcast K rounds (preset update round threshold) of synchronization signals (the first synchronization signal) based on the local clock and the preset communication conditions. or second synchronization signal ), each round of broadcasting and subsequent responses of other nodes to the broadcasting is called a round of synchronous communication. Figure 2 As shown in the figure, taking nodes i and j as an example, when node j receives the synchronization signal (broadcast signal) sent by node i, node j acts as a passive node and generates observation information (observation data) based on the synchronization signal sent by node i and sends it to node i as an active node. Node i then performs a joint estimation process based on the observation data to achieve two-way synchronous ranging. The preset communication condition is that all nodes in the wireless sensor network communicate with each other at the same time. , communication interval , synchronization period T, a specific communication frequency starts the time synchronization and ranging process; the preset update round threshold is a complete K rounds of synchronous communication, , It means taking the integer part of x.

[0067] Specifically, all nodes in the wireless sensor network broadcast synchronization signals to other nodes. When the passive node j receives the active node i (node ​​j and node i refer to any different nodes in the wireless sensor network), the passive node j uses pseudo-random noise code or carrier phase to transmit the first synchronization signal sent by the active node. , the calculated pseudorange , that is, the distance including the clock deviation factor is calculated based on the change of code phase or carrier phase during the propagation of the signal. Then, the passive node j uses the communication gap to , the signal frequency of the first synchronization signal will be received The signal strength difference between the first synchronization signal received , the active node i sends back the second synchronization signal to the passive node j.

[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 the 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.

[0069] The second observation data includes the second pseudo-range, the second received signal frequency, the active node signal frequency, the second received signal strength difference and the passive node signal frequency; the second pseudo-range is the pseudo-range calculated by the active node i according to the second synchronization signal sent by the passive node j in the way of pseudo-random noise code or carrier phase . The second received signal frequency is the signal frequency of the active node i receiving the second synchronization signal ; the active node signal frequency is the transmission signal frequency of the active node i itself ; the second received signal strength difference is the signal strength difference of the active node i receiving the second synchronization signal ; the passive node signal frequency is the transmission signal frequency of the passive node j ; the transmission signal frequency of the passive node j and the transmission signal frequency of the active node i itself are all specific communication frequencies.

[0070] It should be noted that the active node i calculates the second pseudo-range 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, the transmission signal frequency of the active node itself (the active node signal frequency) and the transmission signal frequency of the passive node.

[0071] It is worth mentioning that after completing a round of synchronization communication, that is, the active node i receives the synchronization signal of the passive node j and then receives the pseudo-range and the received frequency observation value (the first received signal frequency and the first received signal strength difference) sent by the passive node j, or does not receive the corresponding synchronization signal of the passive node j within a specified time T max , or does not receive the pseudo-range and the received frequency observation value, it is considered that the communication process is ended, and the joint estimation process is completed at the active node i.

[0072] Further, the process of iterating the filter state vector and the 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 realized by performing the following steps S21 to S25:

[0073] Step S21, the active node initializes the filter state vector and the state covariance matrix corresponding to the active node, determines the initial filter state vector and the initial state covariance matrix;

[0074] It should be noted that the modeling based on the clock and the propagation delay characteristics is in the form of a state vector, and the parameters to be estimated are required; if the clock of the active node is taken as the reference clock, the clock of the passive node is the clock to be synchronized, and there is a pair of propagation delays to be estimated between the two nodes; due to the influence of factors such as working environment and manufacturing process, the local clock of a specific node has nonlinear phase offset and frequency deviation, but in a small time scale, the state change of these clocks can be approximated as a linear state transition process, the phase offset of the clock can be approximated by the cumulant, and the frequency deviation of the clock is generally relatively stable and can be approximated by a constant, that is, is the global reference time of node i in the kth synchronization communication round, is the corresponding local time, and the discrete clock model can be represented as:

[0075] ;

[0076] ;

[0077] wherein, is the mapping relationship between the local time and the global reference time of node i; is the clock phase offset of the local clock of node i in the kth communication round; is the local clock frequency offset of node i at time k-1; is the fixed interval between two communication rounds.

[0078] Further, the synchronous bidirectional communication is completed by two nodes recording the pseudo-range containing distance information and the received frequency containing frequency change information; the communication process of the two nodes has two signal propagation delays and , which represent the propagation time required for node i to transmit a synchronization signal to node j and the propagation time required for node j to transmit a synchronization signal to node i, respectively; theoretically, the propagation delay can be expanded into a Taylor series of order l of the global reference time and , wherein and are the local transmission times of the synchronization signals of nodes i and j in the global reference time system, and the propagation delay can be represented as:

[0079] ;

[0080] ;

[0081] wherein, is at the Taylor series coefficients obtained by Taylor series expansion at is at the Taylor series coefficients obtained by Taylor series expansion at is the power of is is the propagation delay required for node i to deliver synchronization signal to node j, is the first derivative of , is the is the derivative of order of divided by the factorial of is is the propagation delay required for node j to deliver synchronization signal to node i, is the first derivative of , is the is the derivative of order of divided by the factorial of is the signal propagation delay of node i; is the signal propagation delay of node j.

[0082] Further, in the actual synchronization process, the global reference time and are not completely known, obviously, even if the local clock of node i is taken as the reference global clock, the local clock of node j is still with clock bias, therefore, this is a model that cannot be directly implemented, called the propagation delay ideal model.

[0083] Further, based on the clock model and the propagation delay ideal model, the clock model is used to construct an implementable propagation delay model, that is, a propagation delay model based on the reference time system is constructed by fusing clock parameters; the synchronization signal sending time of node i and node j is consistent on the local time system, that is, both are , by formula can be converted to a global reference clock system, which can be expressed as:

[0084] ;

[0085] ; ​​​

[0086] wherein, is the global reference time of node i at the kth synchronization communication round; is the global reference time of node j at the kth synchronization communication round; is the clock phase offset of node j at the kth communication round; is the local time.

[0087] Based on the above basis, the model of propagation delay can be constructed as:

[0088] ;

[0089] ;

[0090] Further, if the speed change is not a sharp change process, then the propagation delay can be approximated by the first order Taylor series, i.e. l = 1, because the purpose of solving the clock parameters is to solve the clock difference of node j relative to node i, it can be assumed that the clock carried by node i is an ideal clock, i.e. the clock parameters satisfy , the first order approximation model of the propagation delay can be written as:

[0091] ;

[0092] ;

[0093] wherein, is the local clock frequency offset of node i; is an integer set.

[0094] Further, based on the clock model and the first order approximation model of the propagation delay, the state vector is constructed; under the premise of assuming that the clock carried by node i is an ideal clock, only the clock parameters of node j and the Taylor series coefficients of the propagation delay need to be estimated in real time, if the high order Taylor series expansion is applied, only the remaining Taylor series coefficients need to be stacked. Therefore, the state vector that needs to be estimated can be obtained based on the above clock parameters and Taylor series coefficients as wherein, is a real set.

[0095] Based on the above basis, when the first round of synchronization communication is performed, the extended Kalman filter needs to be initialized, i.e. the filter state vector and state covariance matrix corresponding to the active node are initialized, each node needs to configure N-1 extended Kalman filters, and according to the communication information with different nodes, the relative clock difference and relative distance between them are iteratively estimated; wherein the state vector that each filter needs to estimate (target filter state vector) is .

[0096] Further, the state vector initialization based on least square method, i.e. the initialization of the filter state vector, when the initial state is unknown, the initial state vector is generally set as a zero vector, i.e. the initial filter state vector ; in practice, the rough initial estimate can significantly improve the convergence speed of the nonlinear estimator compared to the initial estimate represented by the zero vector, since only a rough initial estimate is needed , so only the first wheel synchronization communication is selected to perform the estimation based on the least square method to obtain a rough estimate for initializing the state vector to obtain the initial filter state vector, and the process has less observation values and thus lower calculation amount, as an optional step.

[0097] Further, the initial state covariance matrix is constructed based on the initial state, i.e. the initialization of the state covariance matrix, since there is a simple nonlinear relationship between the observation and the state quantity, which will be discussed below, therefore the extended Kalman filter is considered to perform iterative estimation on the state vector; the extended Kalman filter assumes that the state at time k is a multivariate Gaussian distribution with mean and covariance matrix , the covariance matrix represents the uncertainty of the state estimation at time k, which is a symmetric positive definite matrix, used to quantify the error of the state estimation. Therefore, the initial state covariance matrix needs to be valued according to the deviation degree of the initial state from the true state, if the deviation degree is unknown, it will be initialized as the unit matrix , which is a common practice.

[0098] Step S22, the active node updates the initial filter state vector using the preset state transition matrix to determine the intermediate filter state vector;

[0099] It should be noted that the state transition matrix and the process noise covariance matrix are constructed based on the state vector; the state vector is composed of the clock parameter and the propagation delay parameter, so the state transition matrix and the state covariance matrix are also correspondingly divided into two parts; since the Taylor series coefficients after the propagation delay expansion are a group of constants, therefore its state transition matrix is a unit matrix, while the state transition matrix of the clock parameter is written as:

[0100] ;

[0101] Based on the above, the complete state transition matrix of the state vector, i.e. the preset state transition matrix which can be expressed as:

[0102] ;

[0103] Further, the transition process of the state vector can be expressed as:

[0104] ;

[0105] wherein, is the local clock phase offset of node j at k-1 time (last time); is the local clock frequency offset of node j at k-1 time; is the local clock frequency offset of node j at k-1 time; is the propagation delay required for node i to deliver a synchronization signal to node j, is the first derivative of ; is the first derivative of is the propagation delay required for node j to deliver a synchronization signal to node i, is the first derivative of ; is the communication interval.

[0106] Further, the update process of the intermediate filter state vector can be expressed as:

[0107] ;

[0108] wherein, is the intermediate filter state vector at iteration number k; is the preset state transition matrix; is the initial filter state vector at iteration number k-1; is the state transition noise, and is subject to a Gaussian distribution with zero mean and covariance matrix .

[0109] Step S23, 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 iteration number in real time;

[0110] It should be noted that, assuming that the clock noise and the propagation delay noise both satisfy the Gaussian noise with zero mean, therefore, when the noise standard deviation of the clock phase offset is , the noise standard deviation of the clock frequency offset is , and the process noise covariance matrix of the clock parameter can be written as:

[0111] ;

[0112] Furthermore, the noise standard deviation of the Taylor series coefficient is used as an empirical control quantity as follows: , which can be set to 0 under ideal conditions, and the process noise covariance matrix of the Taylor series coefficients is , The size of depends on the actual motion status of the node. Therefore, the complete process noise covariance matrix of the state vector is the preset process noise covariance matrix It can be written as:

[0113] ;

[0114] Furthermore, the updating process of the intermediate state covariance matrix can be expressed as:

[0115] ;

[0116] in, is the intermediate state covariance matrix when the number of iterations is k; is the preset state transfer matrix; is the initial state covariance matrix when the number of iterations is 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 reaches a preset number of iterations;

[0118] Step S25: If yes, the active node uses the intermediate filter state vector as the predicted filter state vector and the intermediate state covariance matrix as the predicted state covariance matrix.

[0119] It should be noted that if the number of iterations k reaches the preset number of iterations, the active node will group the intermediate state covariance matrix when the number of iterations is k As the predicted state covariance matrix, the intermediate filter state vector when the number of iterations is k As the prediction filter state vector; if the number of iterations k does not reach the preset number of iterations, the active node will set the intermediate state covariance matrix when the number of iterations is k As the new initial state covariance matrix, the intermediate filter state vector when the number of iterations is k As the new initial filter state vector, and jump to step S22, until the number of iterations k reaches the preset number of iterations, the intermediate state covariance matrix group determined when the number of iterations k reaches the preset number of iterations As the predicted state covariance matrix, the intermediate filter state vector determined when the number of iterations k reaches the preset number of iterations is As the prediction filter state vector; wherein, the preset number of iterations can be set as needed, and the present invention is not limited thereto.

[0120] Step 103, the active node screens the first observation data and the second observation data to determine target observation data.

[0121] It should be noted that the observation vector is constructed based on the pseudo range and the signal frequency collected in each round of communication process; in each round of communication, the active node i can obtain the pseudo range observation 、 , and the frequency observation 、 、 、 , wherein the frequency observation is optional, the clock parameter and the propagation delay parameter are observable for the pseudo range observation, and the frequency observation cannot independently estimate all parameters, therefore, the vector is used to represent the observation information of the kth round of synchronous communication, and the observation vector can be represented as .

[0122] Further, step 103 can 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 according to the first pseudo range, the first received signal frequency, the second pseudo range, the second received signal frequency, the active node transmitted signal frequency and the passive node transmitted signal frequency;

[0124] It should be noted that each active node i will collect N-1 groups of observation vectors in the form of , which is rewritten as a new state vector , wherein c is the speed of light.

[0125] Specifically, based on the observation vector and the state vector, an observation equation and an observation noise covariance matrix are constructed; according to the synchronous bidirectional ranging model and the first-order approximation model of the propagation delay, the pseudo range observation 、 and the clock parameter and the propagation delay parameter have a nonlinear relationship, as follows:

[0126] ;

[0127] ;

[0128] , wherein is the clock frequency offset of the passive node j; is the observation noise corresponding to the pseudo range , which satisfies the Gaussian distribution with zero mean and standard deviation ; is the local clock frequency offset of active node i; Pseudorange The corresponding observation noise satisfies zero mean and standard deviation Gaussian distribution.

[0129] Furthermore, the propagation delay is further expanded to obtain the pseudo-range observation and state vector The relationship is as follows:

[0130] ;

[0131] ;

[0132] Furthermore, assuming that the clock of node i is an ideal clock and performing term shifting, the observation equation is further simplified to:

[0133] ;

[0134] ;

[0135] Among them, the formula The right side of the equal sign in It is considered as a constant rather than an observable, avoiding more complex nonlinear relationships.

[0136] Furthermore, the frequency observable 、 、 、 and state quantity 、 、 、 There is a nonlinear relationship. Generally speaking, since the transmission time of two nodes is close, the Doppler velocity between the two nodes is and will be very close, and when the Doppler velocity is assumed to be constant, a Doppler velocity parameter can be used Approximately, that is , the relationship between Doppler velocity and Doppler frequency shift between nodes is as follows:

[0137] ;

[0138] ;

[0139] in, is the Doppler shift between the frequency of the signal sent by node i and the frequency of the signal received by node j; is the Doppler shift between the frequency of the signal sent by node j and the frequency of the signal received by node i.

[0140] Further, assuming the Doppler velocity is constant With Also very close, so the relationship between the Doppler velocity and the first-order coefficient of the Taylor series of the propagation delay is as follows:

[0141] ;

[0142] Wherein, is the first-order derivative of the propagation delay required for node i to transmit a synchronization signal to node j; is the first-order derivative of the propagation delay required for node j to transmit a synchronization signal to node i. is the first-order derivative of the propagation delay required for node j to transmit a synchronization signal to node i.

[0143] Further, the relationship between the Doppler frequency shift and the transmitted signal frequency, the received signal frequency is as follows:

[0144] ;

[0145] ;

[0146] Based on the above, we can get:

[0147] ;

[0148] ;

[0149] Further, assuming that the clock of node i is an ideal clock, in order to make the non-linear relationship not too complex, and are considered as constants, and are considered as observations, and the existence of observation noise is considered, then the above equation can be obtained by moving the term as follows:

[0150] ;

[0151] ;

[0152] Wherein, the on the right side of the equation is also used as known information to construct the observation function and Jacobian matrix in the extended Kalman filter instead of as an observation, is the observation noise corresponding to and , which satisfies the Gaussian distribution with zero mean and standard deviation ; is the observation noise corresponding to and , which satisfies the Gaussian distribution with zero mean and standard deviation .​

[0153] In summary, the observation vector is rewritten as , wherein the observation vector includes first rewritten signal data and second rewritten signal data, the first rewritten signal data includes 、 , the second rewrite signal data includes 、 ,in, is the propagation delay including clock deviation between the signal sent by active node i and the passive node j, The propagation delay including clock deviation between the signal sent by passive node j 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 uses the first rewritten signal data as the first target observation data;

[0156] It should be noted that the observation amount is adjusted based on the signal strength; if the working environment has multipath effect, the total received power of the signal can be analyzed and the first path power The difference between (i.e. the signal strength difference of the first synchronization signal received by the passive node j The signal strength difference between the active node i and the second synchronization signal received ),when , then the observation value and the corresponding variance corresponding to the communication link are discarded. The specific calculation of the total received power and the first path power depends 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, is the channel impulse response power; A is a constant term; N is the leading cumulative count; is the amplitude point of the first path; is the amplitude point of the second path; is the amplitude point of the third path; the above parameters can be obtained from the register of DW1000.

[0161] Specifically, if the first signal strength difference is less than the preset strength threshold, the active node takes the first rewritten signal data as the first target observation data, i.e. retains 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 eliminates the first rewritten signal data.

[0163] Step S35, the active node compares the second signal strength difference with the preset strength threshold.

[0164] Step S36, if the second signal strength difference is less than the preset strength threshold, the active node takes 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 takes the second rewritten signal data as the second target observation data, i.e. retains 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 eliminates the second rewritten signal data.

[0167] Step 104, the active node generates a target filter state vector according to the target observation data, the predicted filter state vector, the predicted 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.

[0168] Further, step 104 can include the following sub-steps S41-S46:

[0169] Step S41, the active node constructs an observation function matrix and a Jacobian matrix by using the predicted filter state vector and the target observation data.

[0170] It should be noted that the construction process of the observation function matrix can be represented as:

[0171] ;

[0172] Wherein, is the observation function matrix; is the observation function; is the corresponding is the propagation delay required for node i to transmit a synchronization signal to node j; is the first derivative of ; is the local time; is the clock phase offset of node j in the predicted filter state vector; is the clock frequency offset of node j in the predicted filter state vector; a propagation delay including clock bias between the transmission of the signal for the active node i to the passive node j; a first order derivative of the propagation delay a propagation delay required for the passive node j to transmit the synchronization signal to the node i; a first order derivative of the propagation delay a first order derivative of the propagation delay a transmission signal frequency of the active node i itself; an observation noise vector; a signal frequency of receiving the first synchronization signal, regarded as a constant; a transmission signal frequency of the passive node j, regarded as a constant.

[0173] Further, since there is a simple nonlinear relationship in the observation equation and and the extended Kalman filter is considered as the joint estimator, and the Jacobian matrix, i.e., the first order partial derivative matrix of the observation vector with respect to the state vector needs to be calculated, and the construction process of the Jacobian matrix can be represented as:

[0174] ;

[0175] Step S42, the active node performs matrix subtraction operation on the observation function matrix and the preset actual observation function matrix to determine the residual error.

[0176] It should be noted that the calculation process of the residual error can be represented as: ; wherein, is the residual error; is the preset actual observation function matrix; is the observation function matrix.

[0177] Step S43, the active node updates the preset initial observation noise covariance matrix using the residual error to determine 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.

[0178] It should be noted that, considering that the observation quantity inevitably exists noise, therefore, the preset initial observation noise covariance matrix is necessary, assuming that the noise of each observation quantity is independent, then, is a diagonal matrix, which can be represented as:

[0179] ;

[0180] Further, the preset initial observation noise covariance matrix is updated by using the residual to determine a target observation noise covariance matrix, and a processing procedure of the target observation noise covariance matrix can be represented as: wherein, is the target observation noise covariance matrix; is the preset initial observation noise covariance matrix; is an adjustment coefficient vector, and elements of the adjustment coefficient vector are greater than 1, ; is a threshold reciprocal vector, and elements of the threshold reciprocal vector are reciprocals of threshold values, ; is a Hadamard product.

[0181] Further, a processing procedure of the Kalman gain matrix can be represented as:

[0182] ;

[0183] wherein, is the Kalman gain matrix; is a prediction state covariance matrix; is a Jacobian matrix; is the target observation noise covariance matrix; T is a transpose; is an inverse operation.

[0184] In step S44, the active node updates the prediction filter state vector by using the Kalman gain matrix and the residual to determine an updated filter state vector, and the active node counts the number of updates in real time.

[0185] It should be noted that a processing procedure of the updated filter state vector can be represented as:

[0186] ;

[0187] wherein, is the updated filter state vector; is the prediction filter state vector; is the Kalman gain matrix; , , , is the residual.

[0188] In step S45, the active node determines whether the number of updates reaches a preset update round threshold.

[0189] In step S46, if the number of updates reaches the preset update round threshold, the active node takes the updated filter state vector as a target filter state vector.

[0190] It should be noted that before the end of the synchronous communication process, the synchronous communication, information collection and iterative joint estimation are repeated continuously. The joint estimator carried by the node can output an estimated state vector after each synchronous communication round. , and the covariance matrix reflecting its confidence level , Contains the clock parameters of node j, which can achieve synchronization between two nodes.

[0191] Specifically, if the number of updates reaches the preset update round threshold, the active node will update the filter state vector As the target filter state vector; if the number of updates does not reach the preset update round threshold, the active node uses the Kalman gain matrix and the Jacobian matrix to update the predicted state covariance matrix, obtains the updated state covariance matrix and uses it as the new initial state covariance matrix, uses the updated filter state vector as the new initial filter state vector, uses the target observation noise covariance matrix as the new preset initial observation noise covariance matrix, and enters a new synchronous communication process, thereby obtaining new first observation data and new second observation data, and jumps to execute step S22 until the number of updates reaches the preset update round threshold, and uses the updated filter state vector determined when the number of updates reaches the preset update round threshold As the target filter state vector; wherein, the process of updating the filter state vector can be expressed as: .

[0192] Step 105: The active node constructs a node Euclidean distance matrix according to multiple vector elements in the target filter state vector.

[0193] The multiple vector elements include the clock phase offset of the local clock of node j in the kth round of communication , propagation delay in 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 K-th round of 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 in the Kth round of communication, also known as propagation delay; for The propagation delay required for node i to transmit the synchronization signal to node j; for The first derivative of ; is the local time of the Kth round of communication; The propagation time required for node j to send a signal to node i in the Kth round of communication, also known as propagation delay; for The propagation delay required for node j to transmit the synchronization signal to node i; for The first derivative of ; is the phase offset of the local clock of node j during the Kth round of communication.

[0197] Furthermore, in the Kth round, that is, when the number of updates reaches the preset update round threshold, the process of constructing the node Euclidean distance matrix can be expressed as:

[0198] ;

[0199] in, is the node Euclidean distance matrix; c is the speed of light; is the matrix element in the first row and second column of the node Euclidean distance matrix, which represents the time required for the signal to propagate from node 1 to node 2 (propagation delay); It is the matrix element in the first row and third column of the node Euclidean distance matrix, which represents the time required for the signal to propagate from node 1 to node 3.

[0200] Furthermore, if clock synchronization and ranging of the entire network need to be achieved, the server needs to coordinate the synchronous communication process of each node. During the initialization phase, the synchronization initialization signal is broadcast to the entire network. , any node in the network receives the network-wide broadcast synchronization initialization signal After that, you need to follow The synchronization communication parameters are set according to the requirements of the signal, and the synchronization signal is broadcast periodically. After receiving the broadcast synchronization signal, the other nodes respond to it according to the above process until each node estimates the clock parameters and ranging parameters between it and other nodes, thus achieving clock synchronization and ranging for the entire network. The ranging values ​​are combined into a Euclidean distance matrix , which is used to solve the node positioning problem, can further use multidimensional scaling transformation to perform relative positioning between nodes, or be used as an observation in combined navigation methods.

[0201] It is worth mentioning that before the end of the synchronization cycle, i.e. before the end of the Kth round of synchronization communication, the synchronization communication, information collection and joint estimation based on extended Kalman filter are repeatedly performed. After the completion of the synchronization cycle, each node can obtain the relative clock difference and relative distance of the remaining nodes, i.e. the clock synchronization and ranging of the whole network are achieved, which can be further used to correct the sensor information provided by the remaining nodes containing time information.

[0202] Further, when there is a demand for clock synchronization or ranging between two nodes without the need for whole network re-synchronization communication, the above process can be performed between the two nodes. First, the server no longer needs to send a synchronization signal, and one node (acting as an active node) sends a synchronization initialization signal to the other node (acting as a passive node) , the passive node receives the synchronization initialization signal , modifies its own communication configuration, and then the two nodes enter the synchronization communication process, which is the same as the network distributed synchronization.

[0203] Exemplarily, referring to Figure 3 , the server broadcasts a synchronization initialization signal to coordinate the synchronization communication process of each node, i.e. all nodes in the wireless sensor network agree to start the time synchronization and ranging process at the same communication time , communication interval , synchronization cycle T and specific communication frequency; all nodes initialize the joint estimator based on the extended Kalman filter, and periodically broadcast a synchronization signal at the same time based on the local time, while responding to the received synchronization signal, sending the obtained pseudo-range, received signal frequency and received signal strength difference to the corresponding broadcast node (active node), the active node performing the prediction step of the joint estimator, and adjusting the observation covariance matrix based on the residual, selecting the observation based on the signal strength, thereby performing the update step of the joint estimator, until the update times reach the threshold, thereby calculating the final propagation delay and Euclidean distance matrix, i.e. for realizing the time synchronization and node Euclidean distance matrix between the active node and the passive node. Based on the above, the application can effectively solve the clock synchronization problem of the network for a long time, and can provide ranging information for solving the positioning problem, perform data communication through spread spectrum data link technology, realize frequency modulation and multiplexing, and effectively overcome the influence of multipath effect on mobile communication. Under the assistance of multi-frequency frequency shift observation and through the propagation delay modeling method under the synchronization bidirectional ranging communication mechanism, high-precision joint clock synchronization and ranging are achieved. The difference in signal strength, the mapping of the predicted state in the observation space and the deviation between the observation vectors are considered, which enhances the robustness of the algorithm, which can be used for distributed execution of the whole network, and can be used for active maintenance of clock synchronization and ranging accuracy between two nodes.

[0204] As a comparison of technical effects, reference can be made in combination with the prior art. Wireless sensor networks play an important role in many fields, including smart home, intelligent transportation, unmanned aerial vehicles, etc. In these applications, sharing a time reference is a key factor to ensure the normal operation of the sensor network. The clock oscillator is the core element that provides the basic clock frequency signal for the system. Due to the influence of factors such as temperature deviation, material difference, use time, power supply noise, etc., the frequency of the clock oscillator carried by the sensor network node is inevitably inconsistent, that is, frequency deviation occurs, so that the clocks of different nodes have varying clock phase offsets. In addition, the clock phase offset is also affected by environmental noise, device noise, etc. Spread spectrum data link is a communication technology, the core idea of which is to multiply the original signal with a wideband spread spectrum sequence, thereby widening the frequency spectrum of the signal to improve the 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 the anti-interference performance, communication distance, system capacity and reduce the hardware cost.

[0205] Clock synchronization and ranging between network nodes are hot issues in current research, and clock synchronization and ranging are often used as the initial premise or initial step of positioning. According to the information possessed by the network nodes, the sensor network can be divided into anchor network and anchor-free network. Anchor network refers to the nodes in the network that have prior information such as known clock parameters, position, speed, etc., while anchor-free network does not have such information. In terms of implementation method, the implementation of clock synchronization and ranging can be divided into independent estimation and joint estimation. Independent estimation usually uses the way of addition and subtraction to eliminate clock deviation or propagation delay, while joint estimation considers clock synchronization and ranging as a problem to be solved at the same time. Least squares (LS) is widely used due to its high solution accuracy and fast convergence. LS is a mathematical optimization technique that finds the best function match of data by minimizing the sum of squares of errors. However, most algorithms based on LS cannot handle abnormal observation values, and as the amount of observation data increases, the size of the information matrix containing all observation information increases, and the amount of calculation required for matrix inversion and other operations also increases. In addition, if the LS-based algorithm wants to estimate the nonlinear propagation delay, it first needs to model the propagation delay, and the ranging accuracy will be limited by the modeling method of the propagation delay, and the modeling method is limited by the principle of LS and the synchronization communication mechanism.

[0206] In view of the above problems, the present application provides a node time synchronization and ranging method of wireless sensor network, which can effectively solve the clock synchronization problem of the network for a long time by using spread spectrum data link technology for data communication, provides ranging information to meet the demand of solving positioning problem, realizes signal frequency modulation and multiplexing by using spread spectrum data link technology for inter-node communication, can effectively overcome the influence of multipath effect on mobile communication, realizes high-precision joint clock synchronization and ranging by using multi-frequency frequency shift observation auxiliary and propagation delay modeling method under the mechanism of synchronous bidirectional ranging communication, considers the difference of signal strength, and the deviation degree between the mapping of predicted state in observation space and observation vector, and enhances the robustness of the algorithm. Meanwhile, the present application is suitable for communication network composed of asynchronous sensors, aims to realize time synchronization and relative ranging function of distributed network by observing the pseudo-range and Doppler frequency shift of communication signal of nodes, and meets the long-time synchronization demand of sensor network with low calculation cost and high robustness.

[0207] Compared with the prior art, the method provided by the present application only needs one communication round of observation value when updating the estimated value each time, has low calculation complexity, does not need to contain time stamp in the synchronization signal, is suitable for cheap wireless sensors which cannot contain sending time in information, uses Doppler frequency shift as auxiliary observation to provide redundant information for the estimation of clock frequency deviation and propagation delay, can effectively eliminate the influence of Gaussian noise of state quantity and observation by using extended Kalman filter, the processing measures for abnormal observation value ensure the robustness of the algorithm, can keep the clock synchronization of the whole network for a long time, any node can execute the method locally to maintain the synchronization state with other nodes, has high flexibility, and provides Euclidean distance matrix which is important information for network positioning problem.

[0208] In the embodiment of the present application, the present application provides a node time synchronization and ranging method of 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 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 second observation data based on a second synchronization signal sent by the passive node, and iterates a filter state vector and a state covariance matrix corresponding to the active node based on a preset state transition matrix and a preset process noise covariance matrix to determine a predicted filter state vector and a 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 predicted filter state vector, the predicted state covariance matrix and a 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; the active node constructs a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vector; based on the above scheme, the target filter state vector used to realize time synchronization between the active node and the passive node is output by screening the first observation data and the second observation data of the active node to determine the target observation data and combining the predicted filter state vector, the predicted state covariance matrix and the preset initial observation noise covariance matrix, and then the node Euclidean distance matrix is constructed according to the target filter state vector, so that the time synchronization and the ranging are realized by independent methods respectively, and the calculation cost is reduced.

[0209] Please refer to Figure 4 , Figure 4 A step flowchart of a node time synchronization and ranging method of a wireless sensor network applied to a passive node in a wireless sensor network is provided for the second embodiment of the present application.

[0210] The present application provides a node time synchronization and ranging of a wireless sensor network applied to a passive node in a wireless sensor network, which comprises:

[0211] Step 401, when receiving a first synchronization signal sent by an active node in a wireless sensor network, first observation data is determined according to the first synchronization signal;

[0212] Step 402, the first observation data is sent to the active node based on a preset communication condition.

[0213] In the embodiment of the present application, when the passive node receives the first synchronization signal sent by the active node in the wireless sensor network, the first observation data is determined according to the first synchronization signal; the first observation data is sent to the active node based on the preset communication condition, and the process of combining the active node to perform joint estimation does not need to realize time synchronization and ranging by independent methods respectively, and the calculation cost can be reduced.

[0214] Please refer to Figure 5 , Figure 5 The step flow chart of the node time synchronization and ranging method of the wireless sensor network applied to the active node in the wireless sensor network is provided for the third embodiment of the present application.

[0215] The node time synchronization and ranging of the wireless sensor network provided by the present application is applied to the active node in the wireless sensor network, and comprises:

[0216] Step 501, a first synchronization signal is sent to a passive node in a wireless sensor network, and a second synchronization signal and first observation data sent by the passive node are received;

[0217] Step 502, second observation data is determined based on the second synchronization signal, and the filter state vector and the 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 predicted filter state vector and the predicted state covariance matrix;

[0218] Step 503, the first observation data and the second observation data are screened to determine the target observation data;

[0219] Step 504, the target filter state vector is generated according to the target observation data, the predicted filter state vector, the predicted 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;

[0220] Step 505, the node Euclidean distance matrix is constructed according to the plurality of vector elements in the target filter state vector.

[0221] In the embodiment of the present application, the target observation data is determined by screening the first observation data and the second observation data by the active node, and the target filter state vector used to realize time synchronization between the active node and the passive node is output in combination with the predicted filter state vector, the predicted state covariance matrix and the preset initial observation noise covariance matrix, and then the node Euclidean distance matrix is constructed according to the target filter state vector, and the process of realizing time synchronization and ranging by independent methods respectively can reduce the calculation cost.

[0222] Please refer to Figure 6 ,Figure 6 A structural block diagram of a node time synchronization and ranging system of a wireless sensor network is provided for embodiment four of the present application.

[0223] The present application provides a node time synchronization and ranging system of a wireless sensor network, comprising:

[0224] The receiving module 601 is configured to, when the passive node in the wireless sensor network receives the first synchronization signal sent by the 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;

[0225] The iteration module 602 is configured to, based on the second synchronization signal sent by the passive node, determine second observation data, and based on a preset state transition matrix and a preset process noise covariance matrix, iteratively determine a predicted filter state vector and a predicted state covariance matrix for the filter state vector and the state covariance matrix corresponding to the active node;

[0226] The screening module 603 is configured to screen the first observation data and the second observation data to determine target observation data;

[0227] The generating module 604 is configured to generate a target filter state vector according to the target observation data, the predicted filter state vector, the predicted state covariance matrix, and a 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] The construction module 605 is configured to construct a node Euclidean distance matrix according to a plurality of vector elements in the target filter state vector.

[0229] Further, the iteration module 602 is specifically configured to:

[0230] The active node initializes the filter state vector and the state covariance matrix corresponding to the active node to determine an initial filter state vector and an initial state covariance matrix;

[0231] The active node updates the initial filter state vector using the preset state transition matrix to determine an intermediate filter state vector;

[0232] The active node updates the initial state covariance matrix using the preset state transition matrix and the preset process noise covariance matrix to determine an intermediate state covariance matrix, and statistically determines the number of iterations in real time;

[0233] The active node determines whether the number of iterations reaches a preset number of iterations;

[0234] If yes, the active node takes the intermediate filter state vector as a predicted filter state vector and takes the intermediate state covariance matrix as a predicted state covariance matrix.

[0235] Further, the first observation data includes a first pseudo-range, a first received signal frequency and a first received signal strength difference; the second observation data includes a second pseudo-range, a second received signal frequency, an active node transmitted signal frequency, a second received signal strength difference and a passive node transmitted signal frequency; the target observation data includes first target observation data and second target observation data; the screening module 603 is specifically configured to:

[0236] The active node determines 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 according to the first pseudo-range, the first received signal frequency, the second pseudo-range, the second received signal frequency, the active node transmitted signal frequency and the passive node transmitted signal frequency;

[0237] The active node compares the first signal strength difference with a preset strength threshold value;

[0238] If the first signal strength difference is less than the preset strength threshold value, the active node takes 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 value, the active node eliminates the first rewritten signal data;

[0240] The active node compares the second signal strength difference with the preset strength threshold value;

[0241] If the second signal strength difference is less than the preset strength threshold value, the active node takes the second rewritten signal data as the second target observation data;

[0242] If the second signal strength difference is greater than or equal to the preset strength threshold value, the active node eliminates the second rewritten signal data.

[0243] Further, the generating module 604 is specifically configured to:

[0244] The active node adopts the predicted filter state vector and the target observation data to construct an observation function matrix and a Jacobian matrix;

[0245] The active node performs a matrix subtraction operation on the observation function matrix and a preset actual observation function matrix to determine a residual;

[0246] The active node updates a preset initial observation noise covariance matrix by using the residual to determine a target observation noise covariance matrix, and calculates a Kalman gain matrix according to the target observation noise covariance matrix, the predicted state covariance matrix and the Jacobian matrix;

[0247] The active node adopts Kalman gain matrix and residual to update the predicted filter state vector, and determines the updated filter state vector; and the number of updates is counted in real time;

[0248] The active node judges whether the number of updates reaches the preset update round threshold.

[0249] If yes, the active node takes the updated filter state vector as the target filter state vector.

[0250] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and the module described above can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0251] The embodiment of the application further provides a computer device, including a memory and a processor, the memory stores a computer program; the computer program is executed by the processor, so that the processor executes the steps of the node time synchronization and ranging method of the wireless sensor network in the embodiment one.

[0252] The embodiment of the application further provides a computer readable storage medium, which stores a computer program / instruction, and the computer program / instruction is executed by a processor to realize the steps of the node time synchronization and ranging method of the wireless sensor network in the embodiment one.

[0253] The embodiment of the application further provides a computer program product, which includes a computer program / instruction, and the computer program / instruction is executed by a processor to realize the steps of the node time synchronization and ranging method of the wireless sensor network in the embodiment one.

[0254] The above-described embodiments are only used to illustrate the technical solutions of the application, rather than limit them; although the application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application.

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 preset communication conditions; 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 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; 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 method for node time synchronization and ranging in a wireless sensor network according to claim 1, wherein: 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 predicted filter state vector and the intermediate state covariance matrix as the predicted state covariance matrix.

3. The method for node time synchronization and ranging in a wireless sensor network according to claim 1, wherein: 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, based on 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 received signal strength difference with a preset strength threshold; If the first received 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 received 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 received signal strength difference with the preset strength threshold; If the second received 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 received signal strength difference is greater than or equal to the preset strength threshold, the active node removes the second rewritten signal data.

4. The method for node time synchronization and ranging in a wireless sensor network according to claim 1, wherein: 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 constructs an observation function matrix and a Jacobian matrix using the prediction filter state vector and the target observation data; 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 to determine a target observation noise covariance matrix, and calculates a Kalman gain matrix based on 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 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 preset communication conditions; an iterative module, configured 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 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, configured for the active node to screen the first observation data and the second observation data to determine target observation data; A generation module is used for 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 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.

6. A computer device, characterized in that: The method 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 for a wireless sensor network according to any one of claims 1 to 4.

7. 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 according to any one of claims 1 to 4 is implemented.

8. 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 perform the node time synchronization and ranging method for a wireless sensor network according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • 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