An improved method for wireless clock synchronization and positioning solution for UWB indoor positioning
Through the master-slave base station timestamp synchronization and grid map compensation method, the problems of base station clock synchronization difficulties and Chan-Taylor algorithm coordinate divergence in UWB indoor positioning are solved, and high-precision UWB indoor positioning is achieved.
Patent Information
- Application Number
- CN202211730909.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In existing UWB indoor positioning technology, wireless clock synchronization between base stations is difficult, and the coordinates calculated by the Chan-Taylor algorithm are prone to divergence, resulting in insufficient positioning accuracy.
Base station clock synchronization is achieved by periodically exchanging timestamp information between the master and slave base stations. The Chan-Taylor algorithm is combined with grid map data to perform coordinate solution compensation, calculate clock drift and offset, improve base station synchronization accuracy, and determine the coordinate estimate by calculating the minimum first-order norm of the grid points when the positioning results diverge.
It achieves high-precision UWB indoor positioning, improves the clock synchronization accuracy and positioning accuracy between base stations, solves the problem of divergence of positioning results in the presence of errors in the Chan algorithm, and enhances the stability and accuracy of positioning.
Smart Images

Figure CN116056202B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of indoor positioning, relates to a method for UWB indoor positioning, and mainly relates to an improved method for wireless clock synchronization and positioning solution of UWB indoor positioning. Background Art
[0002] With the demands of modern life, indoor scenarios such as subways and underground garages have placed a certain demand on indoor positioning technology. Due to the influence of occlusion and multipath, global navigation satellite systems (GNSS) such as GPS and Beidou positioning systems cannot achieve the expected accuracy and stability indoors.
[0003] The TDOA positioning solution calculates the distance difference between the tag and the base station by measuring the arrival time difference of the tag received by different base stations. In this method, it is usually necessary to set up a base station as a clock synchronization base station, and the clocks of other positioning base stations need to be synchronized with the clock synchronization base station. Clock synchronization methods include wired clock synchronization and wireless clock synchronization. The wired clock synchronization solution connects the clock synchronizer and the positioning base station through coaxial cable or optical fiber. However, when it comes to multi-level clock synchronization and large-area indoor positioning, the wiring and connection of the wired clock synchronization solution will become quite difficult, which brings great difficulties to the installation and use of the base station; the wireless clock synchronization solution periodically sends clock synchronization signals through the clock synchronization base station. Through the clock synchronization algorithm, the clock of the positioning base station can be synchronized to the clock synchronization base station. However, since each base station has its own independent clock source, the crystal oscillators used have different frequency drifts, which brings difficulties to clock synchronization.
[0004] In addition, common algorithms for using TDOA data to solve tag positioning include the Fang algorithm, the Chan algorithm, and the Taylor series expansion method. The Fang algorithm has a simple principle and low computational complexity. It uses TDOA data from three positioning base stations to obtain a hyperbola equation and then solves the tag's position. However, the Fang algorithm can only solve the tag's position using three positioning base stations and cannot use information from more base stations to improve positioning accuracy. The Chan algorithm performs two weighted least squares operations on the TDOA data from the positioning base stations to solve for the tag's coordinates. However, if the measurement error does not conform to a Gaussian distribution or non-line-of-sight errors occur during the measurement process, the results generated by the Chan algorithm may deviate from the tag's true coordinates. The Taylor series expansion method is an algorithm that uses the tag's initial position for iterative estimation calculations. Some solutions use the Chan algorithm to obtain an initial positioning estimate, which is then introduced into the Taylor algorithm to obtain the final positioning result. However, the Taylor algorithm relies on the initial position estimate. If the measurement result contains non-line-of-sight errors, the initial value obtained by the Chan algorithm will deviate from the true value, and the final positioning result may diverge. Summary of the Invention
[0005] The present invention is precisely aimed at the problems that the coordinates calculated in the coordinate solution Chan-Taylor algorithm are easy to diverge and the wireless clocks between base stations are difficult to synchronize. It provides an improved method for wireless clock synchronization and positioning solution of UWB indoor positioning. First, the main base station and the slave base station establish a communication connection and periodically send timestamp information to each other to achieve clock synchronization between the base stations; the tag broadcasts the timestamp information after the clock synchronization process is completed, the slave base station saves the received timestamp information, and sends this information and the timestamp during the clock synchronization process to the tag; the tag sends the timestamp information during the positioning process to the host computer, and the host computer uses the clock synchronization information to calculate the clock drift and clock offset, synchronizes the clocks of the slave base stations, and synchronizes the timestamps of the tag messages received by each slave base station to the clock axis of the main base station to obtain the arrival time difference information of the tag; the arrival time difference information is brought into the Chan-Taylor algorithm to solve the coordinates of the tag. If the positioning result diverges, the coordinate solution compensation method is used to re-determine the coordinate estimate value, and secondary positioning is performed, which effectively improves the indoor positioning accuracy of UWB.
[0006] To achieve the above-mentioned object, the present invention adopts a technical solution: an improved method for wireless clock synchronization and positioning solution for UWB indoor positioning, comprising the following steps:
[0007] S1: The master base station establishes a communication connection with the slave base station and periodically sends timestamp information to each other to achieve clock synchronization between the base stations. After the clock synchronization process is completed, the tag broadcasts the timestamp information. The slave base station saves the received timestamp information and sends it and the timestamp during the clock synchronization process to the tag.
[0008] S2: The tag sends the timestamp information of the positioning process to the host computer. The host computer uses the clock synchronization information to calculate the clock drift and clock offset, synchronizes the clocks of the slave base stations, and synchronizes the timestamps of the tag messages received by each slave base station to the clock axis of the master base station to obtain the arrival time difference information of the tags;
[0009] S3: The arrival time difference information obtained in step S2 is introduced into the Chan-Taylor algorithm to solve the coordinates of the tag and determine the location;
[0010] S4: If the positioning result of step S3 diverges, the coordinate solution compensation method is used to re-determine the coordinate estimate value and bring it into the Taylor algorithm to solve the coordinates of the tag; the coordinate solution compensation method is: using the collected TDOA data and the established grid map data, in the indoor two-dimensional positioning space, calculate the distance difference between the grid point coordinates and the slave base station, and subtract the data collected by TDOA positioning from the distance difference data between the grid point coordinates and the slave base station to find the coordinate point corresponding to the smallest first-order norm, which is the coordinate estimate value.
[0011] As an improvement of the present invention, step S1 specifically includes the following steps:
[0012] S11: The primary base station broadcasts a message (poll), with a sending timestamp of T1;
[0013] S12: Receive the master base station message (poll) from base station i and record the receiving timestamp T 2,i ;
[0014] S13: The slave base station sends a message (response) to the master base station according to the set delay time, and the slave base station i records the sending timestamp T 3,i ;
[0015] S14: The master base station receives the slave base station message (response) and records the receiving timestamp T 4,i ;
[0016] S15: After receiving the message (poll) from the primary base station, the tag delays until the clock synchronization process is completed and then sends a message (blink);
[0017] S16: Receive the tag message from base station i (blink) and record the receiving timestamp S i ;
[0018] S17: The primary base station receives the tag message (blink) and sends a message (ack) containing all timestamp information to the tag. The timestamp information message (ack) includes timestamps T1, T 2,i 、T 3,i 、T 4,i and S i information.
[0019] As an improvement of the present invention, in step S2, the clock drift ω of the slave base station i relative to the master base station is i and clock skew The satisfied relationship is as follows:
[0020]
[0021] Where, T 1,i (t) is the timestamp of the message (poll) sent by the master base station in the current clock synchronization period, T 2,i (t) is the timestamp of receiving the message (poll) from the master base station from base station i in the current clock synchronization period, T 3,i (t) is the timestamp of the response sent from base station i in the current clock synchronization period, T 4,i(t) is the timestamp when the master base station receives the response message from the slave base station i in the current clock synchronization period, T 1,i (tT), T 2,i (tT), T 3,i (tT), T 4,i (tT) are the timestamps of the previous clock synchronization cycle, is the flight time of the signal during transmission.
[0022] As another improvement of the present invention, in step S2, the clock drift ω of the slave base station i relative to the master base station is i and clock skew The estimated value B is:
[0023] B=(X T X) -1 X T Y
[0024]
[0025]
[0026]
[0027] As another improvement of the present invention, in step S2, the time function between the master base station and the slave base station i is:
[0028]
[0029] Where, T i (t) is the clock from base station i at time t, T m (t) is the master base station clock at time t; when a message (blink) is received from base station i, the timestamp can be synchronized to the master base station clock axis according to the following formula:
[0030]
[0031] Where S i (t) is the receiving timestamp of the tag message (blink) received from base station i, S m (t) is S i (t) Timestamp synchronized to the master base station clock axis.
[0032] As another improvement of the present invention, the specific steps of the coordinate solution compensation method in step S4 are:
[0033] Calculate the distance difference between the coordinate point and the base station:
[0034]
[0035] Where, is the distance difference between the selected coordinate point j and base station i and base station 1, (x i ,y i ) is the coordinate of base station i, (x1,y1) is the coordinate of base station 1, is the coordinate of coordinate point j;
[0036] The TDOA positioning method measures the distance difference R between the tag and base station i and base station 1 i,1 :
[0037] The collected R i,1 Sequentially and distance difference Do poorly and get an A j :
[0038]
[0039] Find the smallest first-order norm min 1≤j≤n ||A j ||The corresponding coordinate point n is the number of all coordinate points in the grid, and this coordinate point is used as an estimated value to be brought into the Taylor algorithm for secondary positioning.
[0040] As a further improvement of the present invention, the grid size in step S4 is 0.5m×0.5m.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] (1) High clock synchronization accuracy: The method of the present invention uses the timestamps of two consecutive clock synchronization cycles to calculate the clock drift and clock offset of the base station, which can effectively achieve wireless clock synchronization between base stations.
[0043] (2) High concurrent positioning volume: The present invention adopts the TDOA positioning solution, and the number of tags can be expanded.
[0044] (3) The method of the present invention provides a coordinate solution compensation method to solve the problem of Chan algorithm in R i,1 When a certain offset occurs, the positioning result cannot converge beyond the current positioning area. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flowchart of the steps of the improved method for wireless clock synchronization and positioning solution of the present invention;
[0046] Figure 2 This is a communication sequence diagram of positioning communication in step S1 of the present invention;
[0047] Figure 3Schematic diagram of the process of clock synchronization communication between the master and slave base stations of the present invention;
[0048] Figure 4 Schematic diagram of the coordinate calculation and compensation method in step S4 of the present invention. DETAILED DESCRIPTION
[0049] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0050] Example 1
[0051] An improved method for wireless clock synchronization and positioning solution for UWB indoor positioning is mainly used to improve the accuracy of UWB indoor positioning. In this embodiment, an area includes 1 master base station and 4 slave base stations responsible for tag positioning, such as Figure 1 As shown, the following steps are included:
[0052] Step S1: The master base station establishes a communication connection with the slave base station, and periodically sends timestamp information to each other to achieve clock synchronization between the slave base stations.
[0053] The tag broadcasts the timestamp information after the clock synchronization process is completed, and the base station saves the received timestamp information and sends the information and the timestamp in the clock synchronization process to the tag.
[0054] like Figure 2 As shown, Figure 2 The communication sequence diagram of the positioning system. A clock synchronization cycle starts from the main base station broadcasting message (poll), the sending timestamp is T1, and the slave base station i receives the main base station message (poll) and records the receiving timestamp T 2,i To avoid channel conflicts in wireless communication, each slave base station sends a message (response) to the master base station according to the set delay time. The slave base station i records the sending timestamp T 3,i , the master base station receives the slave base station message (response) and records the receiving timestamp T 4,i After the tag receives the message from the main base station (poll), it delays until the clock synchronization process is completed, sends a message (blink), receives the tag message from base station i (blink), and records the receiving timestamp S i The master base station receives the tag message (blink) and sends a message containing all timestamp information (ack) to the tag. The tag receives the master base station message (ack) and sends all timestamp information to the host computer for positioning solution.
[0055] Step S2: The tag sends the timestamp of clock synchronization and the timestamp data of the tag message received from the base station to the host computer. The host computer uses the clock synchronization information to calculate the clock drift and clock offset, and then synchronizes the clock of the positioning base station, and synchronizes the timestamp of the tag message received from each slave base station to the clock axis of the master base station, thereby obtaining the arrival time difference information of the tag.
[0056] Figure 3 Schematic diagram of the clock synchronization communication process between the master and slave base stations: Assume that the real time of a node at a certain moment is as follows:
[0057]
[0058] Where f0 is the standard frequency of the node, f(t) is the actual frequency of the crystal oscillator at time t, and C(t0) is the clock reading at time t0.
[0059] Assuming that the crystal oscillator frequency between two nodes i and j does not change in a short period of time, the clock relationship between the two nodes can be obtained by the equation:
[0060]
[0061] In the formula is the clock drift of node i compared to node j, is the clock offset of node i compared to node j. Under complete clock synchronization, ω i =1, However, in reality, since the crystal oscillator is not stable and the actual frequency is different from the calibrated frequency, the clocks between the two nodes cannot be completely consistent.
[0062] Clock drift means that the crystal oscillator of a node will not always maintain a certain frequency due to external environment and its own reasons, such as temperature, air pressure, aging, workmanship, etc., which will cause a time gap every once in a while.
[0063] Clock offset is the difference between the initial values of the clock counters of the nodes when clock synchronization starts.
[0064] Assume that the time function between the master base station and the slave base station i is:
[0065]
[0066] Where T i (t) is the clock from base station i at time t, T m (t) is the clock of the main base station at time t.
[0067] Then the clock drift ω of slave base station i relative to the master base station is i and clock skew The satisfied relationship is as follows:
[0068]
[0069] Where T 1,i (t) is the timestamp of the message (poll) sent by the master base station in the current clock synchronization period, T 2,i (t) is the timestamp of receiving the message (poll) from the master base station from base station i in the current clock synchronization period, T 3,i (t) is the timestamp of the response sent from base station i in the current clock synchronization period, T 4,i (t) is the timestamp when the master base station receives the response message from the slave base station i in the current clock synchronization period, T 1,i (tT), T 2,i (tT), T 3,i (tT), T 4,i (tT) are the timestamps of the previous clock synchronization cycle, is the flight time of the signal during transmission.
[0070] The clock drift ω of slave base station i relative to the master base station can be obtained by the least squares method: i and clock skew Estimated value of:
[0071] B=(X T X) -1 X T Y
[0072] In the above formula:
[0073]
[0074]
[0075]
[0076] B is the clock drift ω to be determined i and clock skew Measurement value.
[0077] The method of the present invention uses the timestamps of the two sets of clock synchronization cycles to calculate clock drift and clock offset, which can effectively reduce errors. When a message (blink) sent by a tag is received from base station i, the timestamp can be synchronized to the clock axis of the master base station according to the following formula:
[0078]
[0079] S i (t) is the receiving timestamp of the tag message (blink) received from base station i, S m(t) is S i (t) The timestamp synchronized to the master base station clock axis.
[0080] Step S3: Substitute the arrival time difference and the base station location data into the Chan algorithm to obtain an initial estimate of the tag location, and then substitute the initial estimate into the Taylor algorithm for iteration to obtain the tag location and achieve positioning;
[0081] Step S4: If the positioning result diverges, meaning it exceeds the current positioning area, it indicates that a non-line-of-sight error occurred during the time difference of arrival (TDOA) data measurement process. A coordinate solution compensation method is then used to re-determine the initial estimate, which is then fed into the Taylor algorithm for iteration to re-determine the tag's position. The coordinate solution compensation method specifically involves using the collected TDOA data and the established grid map data to calculate the distance difference between the grid point coordinates and the slave base station in an indoor two-dimensional positioning space. The data collected by TDOA positioning is then subtracted from the distance difference between the grid point coordinates and the slave base station to find the coordinate point corresponding to the minimum first-order norm, which is the coordinate estimate.
[0082] like Figure 4 The figure shows the coordinate solution compensation method. When the arrival time difference of the Chan algorithm has a certain deviation, the positioning result will produce a large offset. When this is used as the initial value in the Taylor algorithm, the positioning result cannot converge, exceeds the current positioning area, and positioning fails.
[0083] In this case, we use the idea of differential to establish a grid map, that is, in the indoor two-dimensional positioning space, coordinate points are regularly selected. The coordinate point selection method is:
[0084] The two-dimensional positioning space is divided into small grids with a grid size of 0.5m×0.5m, and the coordinate points are the vertices of each grid. Figure 4 Coordinate point 1, coordinate point 2, coordinate point i, coordinate point j in .
[0085] The data obtained by measuring the TDOA positioning solution are as follows:
[0086]
[0087] R i,1 is the distance difference between the tag and base station i and base station 1, (x i ,y i ) is the coordinate of base station i, (x1,y1) is the coordinate of base station 1, and (x,y) is the coordinate of the tag.
[0088] Taking the coordinate point j in the grid as an example, calculate the distance difference between the coordinate point j and the slave base station:
[0089]
[0090] is the distance difference between the selected coordinate point j and base station i and base station 1, (x i ,y i ) is the coordinate of base station i, (x1,y1) is the coordinate of base station 1, is the coordinate of point j.
[0091] Then the collected R i,1 Calculated in sequence with the coordinate point j in the grid Do poorly and get an A j :
[0092]
[0093] Find the smallest first-order norm min 1≤j≤n ||A j ||The corresponding coordinate point n is the total number of coordinate points in the grid. This coordinate point is used as an estimated value and brought into the Taylor algorithm for secondary positioning, which further improves the positioning precision and accuracy.
[0094] The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning proposed in the present invention can effectively calculate clock drift and clock offset by using the timestamps of two consecutive clock synchronization cycles, thereby realizing clock synchronization between base stations. The provided coordinate solution compensation method solves the problem that the positioning result cannot converge when a certain deviation occurs in the arrival time difference of the Chan algorithm. The positioning is more accurate, filling the defects and deficiencies in the existing technology, and is a new generation of advantageous positioning method.
[0095] It should be noted that the above content merely illustrates the technical idea of the present invention and cannot be used to limit the scope of protection of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications all fall within the scope of protection of the claims of the present invention.
Claims
1. An improved method for wireless clock synchronization and positioning solution for UWB indoor positioning, characterized in that: The following steps are involved: S1: The master base station establishes a communication connection with the slave base station and periodically sends timestamp information to each other to achieve clock synchronization between the base stations; After the clock synchronization process between the base stations is completed, the tag sends a message, receives the tag message from the base station, and records the receiving timestamp; The primary base station receives the tag message and sends a message containing all timestamp information to the tag; S2: The tag receives the message from the master base station and sends all the timestamp information to the host computer. The host computer uses the clock synchronization information to calculate the clock drift and clock offset, synchronizes the clocks of the slave base stations, and synchronizes the timestamps of the tag messages received by each slave base station to the clock axis of the master base station to obtain the arrival time difference information of the tags; S3: The arrival time difference information obtained in step S2 is introduced into the Chan-Taylor algorithm to solve the coordinates of the tag and determine the location; S4: If the positioning result of step S3 diverges, the coordinate solution compensation method is used to re-determine the coordinate estimate value and bring it into the Taylor algorithm to solve the coordinates of the tag; the coordinate solution compensation method is: using the collected TDOA data and the established grid map data, in the indoor two-dimensional positioning space, calculate the distance difference between the grid point coordinates and the slave base station, and subtract the data collected by TDOA positioning from the distance difference data between the grid point coordinates and the slave base station to find the coordinate point corresponding to the smallest first-order norm, which is the coordinate estimate value.
2. The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning according to claim 1, characterized in that: The step S1 specifically includes the following steps: S11: The primary base station broadcasts a message (poll), with a sending timestamp of T1; S12: Receive the master base station message (poll) from base station i and record the receiving timestamp T 2,i ; S13: The slave base station sends a message (response) to the master base station according to the set delay time, and the slave base station i records the sending timestamp T 3,i ; S14: The master base station receives the slave base station message (response) and records the receiving timestamp T 4,i ; S15: After receiving the message from the master base station (pol l), the tag delays until the clock synchronization process is completed and then sends a message (blink); S16: Receive the tag message from base station i (blink) and record the receiving timestamp S i ; S17: The primary base station receives the tag message (blink) and sends a message (ack) containing all timestamp information to the tag. The timestamp information message (ack) includes timestamps T1, T 2,i 、T 3,i 、T 4,i and S i information.
3. The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning according to claim 2, characterized in that: In step S2, the clock drift ω of the slave base station i relative to the master base station i and clock skew The satisfied relationship is as follows: Where, T 1,i (t) is the timestamp of the message (poll) sent by the master base station in the current clock synchronization period, T 2,i (t) is the timestamp of receiving the message (poll) from the master base station from base station i in the current clock synchronization period, T 3,i (t) is the timestamp of the response sent from base station i in the current clock synchronization period, T 4,i (t) is the timestamp when the master base station receives the response message from the slave base station i in the current clock synchronization period, T 1,i (tT), T 2,i (tT), T 3,i (tT), T 4,i (tT) are the timestamps of the previous clock synchronization cycle, is the flight time of the signal during transmission.
4. The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning according to claim 3, characterized in that: In step S2, the clock drift ω of the slave base station i relative to the master base station i and clock skew The estimated value B is: B=(X T X) -1 X T Y 5. The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning according to claim 3 or 4, characterized in that: In step S2, the time function between the master base station and the slave base station i is: Where, T i (t) is the clock of base station i at time t, T m (t) is the clock of the main base station at time t; When a message (blink) is received from a tag from base station i, the timestamp can be synchronized to the clock axis of the master base station according to the following formula: Where S i (t) is the receiving timestamp of the tag message (blink) received from base station i, S m (t) is S i (t) Timestamp synchronized to the master base station clock axis.
6. The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning according to claim 5, characterized in that: The specific steps of the coordinate calculation and compensation method in step S4 are: Calculate the distance difference between the coordinate point and the base station: Where, is the distance difference between the selected coordinate point j and base station i and base station 1, (x i ,y i ) is the coordinate of base station i, (x1,y1) is the coordinate of base station 1, is the coordinate of coordinate point j; The TDOA positioning method measures the distance difference R between the tag and base station i and base station 1 i,1 : The collected R i,1 Sequentially and distance difference Do poorly and get an A j : Find the smallest first-order norm min 1≤j≤n ||A j ||The corresponding coordinate point n is the number of all coordinate points in the grid, and this coordinate point is used as an estimated value to be brought into the Taylor algorithm for secondary positioning.
7. The improved method for wireless clock synchronization and positioning solution for UWB indoor positioning according to claim 6, characterized in that: The grid size in step S4 is 0.5 m×0.5 m.
Citation Information
Patent Citations
TDOA positioning method using pseudo clock synchronization
CN113677000A
Method for determining static pointing direction of head of intelligent vehicle based on UWB
CN115002663A