A UWB-based indoor and outdoor real-time positioning method
By using bilateral bidirectional ranging and unique identification code configuration, the ranging error and anti-interference problems in UWB positioning technology are solved, realizing high-precision, low-cost, and low-power UWB beacon configuration, which is suitable for high-precision positioning in the fields of smart manufacturing and logistics.
Patent Information
- Application Number
- CN202611232998.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-11-17
AI Technical Summary
Existing UWB positioning technology suffers from large unilateral ranging errors and weak anti-interference capabilities. Furthermore, the configuration process of UWB beacons is complex and costly.
A two-sided, two-way ranging method is adopted to eliminate hardware clock offset errors. The least squares method and Gauss-Newton iteration are combined to improve ranging accuracy. By configuring a unique identification code for each UWB beacon, the process of configuring Bluetooth one by one is eliminated, and UWB tags are used to replace fixed gateways for batch configuration.
It improves positioning accuracy, reduces the difficulty and cost of UWB beacon configuration, achieves low-power operation and high-capacity tag concurrency, and ensures stable positioning results in complex environments.
Smart Images

Figure SMS_22 
Figure SMS_55 
Figure QLYQS_1
Abstract
Description
Technical Field
[0001] This invention belongs to the field of positioning technology, specifically relating to a UWB-based indoor and outdoor real-time positioning method. Background Technology
[0002] In fields such as smart manufacturing and logistics, the demand for high-precision positioning is surging. Traditional technologies using Wi-Fi and Bluetooth, limited by their signal characteristics, can no longer meet the high-precision, high-real-time tracking requirements in complex scenarios. Therefore, ultra-wideband (UWB) technology, with its extremely narrow pulse, high bandwidth, and excellent anti-fading capabilities, has become the core technology for high-precision positioning.
[0003] However, in the practical application of UWB technology, there are still two major defects: large single-sided ranging error and weak anti-interference capability of the system. The reasons are as follows: (1) In order to reduce system power consumption, the existing scheme often adopts a single-sided bidirectional ranging model. This model is extremely dependent on the clock synchronization between devices. However, since the hardware crystal oscillator inevitably has frequency offset, and the flight time between each base station and tag is different, the unknown clock offset of each has differences. This dynamic nonlinear error cannot be effectively canceled, which directly reduces the accuracy of ranging on the underlying physical link; (2) The existing system has relatively weak anti-interference and calculation capabilities in complex environments. The least squares method commonly used in position calculation will produce matrix singularity when the tag and beacon are in a collinear state, which will make it impossible to obtain a unique solution. In addition, the system generally lacks a special anti-interference algorithm to effectively optimize and compensate for multipath effects and non-line-of-sight errors, which can easily cause the positioning coordinates to jump or diverge, making it difficult to guarantee the reliability of high-precision tracking.
[0004] In addition, existing UWB technologies require configuring coordinates and regions for UWB beacons via Bluetooth or a gateway. Currently, this can only be achieved by connecting Bluetooth devices one by one or by using a more expensive gateway configuration method, resulting in high difficulty, time consumption, and high cost in configuring UWB beacons.
[0005] Therefore, this invention proposes an indoor and outdoor real-time positioning method based on UWB. Summary of the Invention
[0006] The purpose of this invention is to disclose a UWB-based indoor and outdoor real-time positioning method, which solves the shortcomings of existing UWB positioning methods, such as large single-sided ranging errors and weak anti-interference capabilities. In practical applications, the coordinates and areas of UWB beacons can only be configured by connecting them one by one via Bluetooth, or by using a high-cost gateway configuration method, which leads to the problems of high difficulty, long time consumption and high cost in configuring UWB beacons.
[0007] To achieve the above objectives, this invention discloses an indoor and outdoor real-time positioning method based on UWB, comprising the following steps: S1, the UWB beacon initiates a broadcast, and after receiving the broadcast, the UWB tags within the coverage area of the broadcast communicate with the UWB beacon and perform bilateral two-way ranging; S2, the UWB beacon marks each UWB tag that has completed ranging, and sets up a separate receiving window for the marked UWB tag.
[0008] As an optional implementation, step S1 includes: S11, the UWB tag connects to the cloud management platform and obtains the unique identification code of all the UWB beacons in the current environment, as well as the corresponding distribution area and coordinates; S12, the UWB beacon initiates a broadcast with its own unique identification code in the current area; S13, the UWB tag receives the broadcast, parses and obtains the unique identification code of the UWB beacon, and retrieves the distribution area and coordinates of the UWB beacon based on the unique identification code of the UWB beacon; S14, the UWB tag initiates bilateral two-way ranging to the coordinates of the acquired UWB beacon.
[0009] As an optional implementation, step S1 includes: S11, the UWB tag connects to the cloud management platform and obtains the preset area and coordinate data of the UWB beacon to be configured in the current environment; S12, the UWB beacon to be configured initiates a broadcast with blank areas and coordinate data; S13, when the UWB tag receives a broadcast containing the blank area and coordinate data, it configures the preset area and coordinate data to the UWB beacon; S15, the UWB beacon saves and solidifies the preset area and coordinate data, and updates the broadcast content to carry the preset area and coordinate data when the broadcast is initiated again; S16, when the UWB tag receives a broadcast initiated by the UWB beacon carrying the preset area and coordinate data, it performs bilateral two-way ranging with the UWB beacon.
[0010] As an optional implementation, a step is provided before step S2. SX, waiting to enter the next broadcast cycle of the UWB beacon.
[0011] As an optional implementation, step S1 includes performing bilateral two-way ranging, comprising: Obtain the absolute ranging values between the UWB tag and the UWB beacon; The initial positioning coordinates are linearly calculated using a preset algorithm; The optimal coordinates of the UWB tag are calculated iteratively.
[0012] As an optional implementation, the iterative calculation of the optimal coordinates of the UWB tag includes: Let the state vector of the UWB tag be x = ; The state estimate at the k-th iteration is ; Let the iterative formula be, ; Where J represents in The first-order partial derivative matrix at; Represents the residual vector; This represents the weight matrix.
[0013] As an optional implementation, the residual vector The i-th element Defined as, ; The residual vector Represented as a column vector, ; in, This indicates the difference in actual observed distance; This represents the difference in distance calculated theoretically.
[0014] As an optional implementation, after step S2, the following step is further included: S3. The motion trajectory of the UWB tag is obtained after smoothing and filtering based on multiple optimal solution coordinates.
[0015] As an optional implementation, step S3 includes performing a smoothing filter, comprising: Based on the optimal solution coordinates and preset motion model of the previous moment, the current preset motion coordinates of the UWB tag are calculated, and the error covariance of the filtering model is updated. Calculate the difference between the current optimal solution coordinates and the preset motion coordinates; Construct the measurement noise covariance matrix , ; The coordinates of any of the outstanding optimal solutions are filtered based on the error covariance and measurement noise covariance matrices to generate a smooth motion trajectory of the UWB tag. in, Indicates the variance of basic measurement noise under ideal conditions; Indicates the first The horizontal geometric precision factor at any given time reflects the quality of the base station layout; Indicates the first The root mean square of the residuals at time step 1; This represents the weighting coefficient.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: First, the positioning method proposed in this invention enables UWB tags and UWB beacons to perform bilateral bidirectional ranging, eliminating hardware clock offset errors of different UWB devices. Combined with the least squares method and Gauss-Newton iteration, the accuracy of physical ranging and preliminary coordinate calculation can be improved. Second, the positioning method proposed in this invention uses a unique identification code to retrieve the distribution area and coordinates of each UWB beacon, eliminating the need for configuration via Bluetooth and requiring no additional fixed gateway equipment. This greatly improves the configuration efficiency of UWB signals and reduces the configuration cost of UWB beacons. Third, the positioning method proposed in this invention replaces the fixed gateway network with UWB tags to achieve contactless batch distribution, which also eliminates the hardware and software investment of laying dedicated configuration gateways, greatly reduces manual operation steps, and reduces the cost of configuring UWB beacons. Fourth, in the positioning method proposed in this invention, a dedicated window is opened for each UWB tag on a UWB beacon to avoid signal collisions between UWB tags, thereby achieving a low-power operation mode with fixed window opening for reception and significantly increasing the total number of UWB tags that can be accommodated. Fifth, the positioning method proposed in this invention also includes a smoothing filter, which enables dynamic adaptive adjustment when there is signal interference or coordinate calculation errors, so as to ensure smooth and stable output of effective coordinates in complex indoor and outdoor environments. Detailed Implementation
[0017] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The technical solution of the present invention will be further described below with reference to the embodiments.
[0019] Example 1 This embodiment proposes a UWB-based indoor and outdoor real-time positioning method, including the following steps: S1, the UWB beacon initiates a broadcast. After receiving the broadcast, the UWB tags within the broadcast's coverage area communicate with the UWB beacon and perform bilateral two-way ranging. S2, the UWB beacon marks each UWB tag that has completed ranging and sets up a separate receiving window for the marked UWB tag.
[0020] Step S1 includes: S11, the UWB tag connects to the cloud management platform and obtains the unique identifier (UID) of all UWB beacons in the current environment, as well as their corresponding distribution areas and coordinates; S12, the UWB beacon initiates a broadcast with its own unique identifier (UID) in the current area; S13, the UWB tag receives the broadcast, parses and obtains the unique identifier (UID) of the UWB beacon, and retrieves the distribution area and coordinates of the UWB beacon based on the unique identifier (UID). S14, the UWB tag initiates bilateral two-way ranging to the coordinates of the acquired UWB beacon.
[0021] In a preferred embodiment, in step S11, the UWB tag enters the current environment, connects to the cloud management platform through the built-in network module (such as Wi-Fi, 4G / 5G, Cat1, etc.), and pulls the configuration data packets of all beacons in the current physical space from the cloud management platform. After protocol parsing, the unique identifier (UID) of the UWB beacon and the physical coordinates to which the region belongs in the configuration data packet are persistently stored in the UWB tag's own FLASH flash memory in the form of a mapping table, as shown in the table below.
[0022]
[0023] Table 1 In a preferred embodiment, in step S12, after the UWB tag enters the positioning area, it broadcasts a ranging request to the surrounding area according to a set refresh frequency. Based on the dual-sided two-way ranging (DS-TWR) mechanism, the UWB tag completes ranging interaction with multiple UWB beacons within the range. During this process, the UWB tag not only calculates the high-precision physical distance, but also parses the unique identification code (UID) of each beacon participating in this ranging from the underlying data frame.
[0024] In a preferred embodiment, in step S13, after the ranging is completed, the tag's underlying program uses the extracted UWB beacon unique identifier (UID) to perform a fast hash search in the mapping table of the local FLASH flash memory, accurately extracting the three-dimensional coordinates and area information of the corresponding UWB beacon.
[0025] In this embodiment, step S1 enables the UWB tag (such as an employee badge) to receive beacon coordinates and area information sent by the platform through its built-in network module and store them in local FLASH memory. When interacting with the UWB beacon for ranging, the UWB tag obtains the UWB beacon's factory-unique identification code (UID), and uses the UID to retrieve the corresponding coordinates and area locally, thereby completing the location calculation.
[0026] There are steps preceding step S2. SX, waiting to enter the next broadcast cycle of the UWB beacon.
[0027] In a preferred embodiment, after one ranging cycle in step S1, the UWB beacon will actively record the UWB tags that have been ranging, and in the next broadcast, it will actively add a fixed number of tag UIDs to the broadcast packet for transmission, which is the tag in step S2.
[0028] In a preferred embodiment, the tagged UWB tags have a low-power scheme for receiving data through a fixed window on the UWB beacon.
[0029] In this embodiment, by using a ranging communication allocation mechanism based on the beacon actively broadcasting tag UID, signal collisions between tags are effectively avoided, and low-power operation with fixed tag window opening for reception is achieved, thereby significantly increasing the total number of positioning tags that the system can accommodate.
[0030] In step S1, bilateral two-way ranging is performed, including: Obtain the absolute ranging values of UWB tags and UWB beacons; The initial positioning coordinates are linearly calculated using a preset algorithm; Iteratively calculate the optimal coordinates of the UWB tag.
[0031] Furthermore, the iterative calculation of the optimal coordinates for the UWB tag includes: Let the state vector of the UWB tag be x = ; The state estimate at the k-th iteration is ; Let the iterative formula be, ; Where J represents in The first-order partial derivative matrix at; Represents the residual vector; This represents the weight matrix.
[0032] In a preferred embodiment, the residual vector The i-th element Defined as, ; residual vector Represented as a column vector, ; in, This indicates the difference in actual observed distance; This represents the difference in distance calculated theoretically.
[0033] In a preferred embodiment, the iterative formula is the standard formula of Gauss-Newton iteration, and for a distance measurement model based on absolute distance, J consists of the partial derivatives of the theoretical distance with respect to the x and y coordinates. For the actual measured distance and the distance based on the current estimated coordinates The difference between the calculated theoretical distances; Typically, the inverse of the measurement error covariance matrix is taken. In UWB systems, different UWB beacons have different signal quality. It can reduce the weight of poor-quality measurements.
[0034] In addition, after step S2, the following steps are also included: S3, the motion trajectory of the UWB tag is obtained after smoothing and filtering based on multiple optimal solution coordinates.
[0035] The smoothing filtering process includes: Based on the optimal solution coordinates of the previous moment and the preset motion model, the current preset motion coordinates of the UWB tag are calculated, and the error covariance of the filtering model is updated. Calculate the difference between the current optimal solution coordinates and the preset motion coordinates; Construct the measurement noise covariance matrix , ; The coordinates of any outstanding optimal solution are filtered based on the error covariance and measurement noise covariance matrix to generate a smooth motion trajectory for the UWB tag. in, This represents the variance of the basic measurement noise under ideal conditions; Indicates the first The horizontal geometric precision factor at any given time reflects the quality of the base station layout; Indicates the first The root mean square of the residuals at time step 1; This represents the weighting coefficient.
[0036] In a preferred embodiment, after obtaining the optimal coordinates, a dynamic Kalman filter algorithm is used to filter out abrupt changes in coordinates, making the final motion trajectory smoother. For example, the Kalman filter is a recursive data fusion algorithm based on optimal estimation theory. Its core idea is to obtain the minimum variance estimate of the system state in a linear dynamic system containing process noise and measurement noise through continuous iteration.
[0037] In a preferred embodiment, in the dynamic measurement noise matrix middle, The squared term is due to the standard deviation of HDOP linear amplification. R represents variance ; This reflects the impact of the physical environment on the current solution quality; Used to control the severity of R amplification caused by multipath interference.
[0038] In this embodiment, the dynamic Kalman filter adaptively adjusts the measurement noise matrix in the Kalman filter according to the dynamic calculation formula when signal interference or singularities occur in coordinate calculation. This effectively filters and compensates for abnormal data caused by environmental interference, ensuring smooth and stable positioning trajectories even in complex industrial or commercial environments prone to coordinate abrupt changes. Furthermore, a centralized communication scheduling mechanism reconstructs the airborne interaction logic, employing a ranging communication allocation mechanism based on "beacon-actively broadcast tag UIDs." The beacon coordinates and schedules tags to wake up and receive signals within a fixed window, fundamentally avoiding disordered signal collisions when a massive number of tags are concurrently accessing the system. This not only enables tags to achieve ultra-low power sleep mode but also significantly increases the total number of concurrent tags that the system can accommodate within a single area.
[0039] The above technical solution, through the three-dimensional integrated optimization of "bottom-level ranging and correction", "upper-level algorithm adaptive filtering" and "anti-collision communication scheduling", not only cuts off the transmission chain of environmental interference and hardware error, but also successfully achieves a perfect combination of high-precision tracking, stable anti-interference and large capacity and low power consumption.
[0040] Example 2 This embodiment proposes a UWB-based indoor and outdoor real-time positioning method. The difference from the previous embodiment is that step S1 includes: S11, the UWB tag connects to the cloud management platform and obtains the preset area and coordinate data of the UWB beacon to be configured in the current environment; S12, the UWB beacon to be configured initiates a broadcast with blank areas and coordinate data; S13, When the UWB tag receives a broadcast with blank area and coordinate data, it configures the preset area and coordinate data to the UWB beacon; S14, the UWB beacon saves and solidifies the preset area and coordinate data, and updates the broadcast content to carry the preset area and coordinate data when it initiates broadcast again; S15, when the UWB tag receives a broadcast initiated by a UWB beacon with preset area and coordinate data, it performs bilateral two-way ranging with the UWB beacon.
[0041] In a preferred embodiment, in step S11, the UWB tag in "engineering configuration mode" receives an engineering task order from the implementation personnel via the network module from the cloud platform. This task order contains the absolute coordinates and area parameters that need to be written to specific beacons on-site, as shown in the table below.
[0042]
[0043] Table 2 In a preferred embodiment, in steps S12 and S13, the UWB tag in configuration mode enters the receiving state and listens for broadcast frames emitted by unconfigured UWB beacons on site. At this time, the coordinate and region fields in the broadcast payload of factory-set or unreset UWB beacons are defaulted to 0. After the UWB tag recognizes the broadcast of the target beacon, it initiates an air handshake. To avoid air channel congestion caused by multiple devices operating concurrently on the construction site, the underlying layer does not rely on simple MAC address modulo, but instead uses a dynamic time slot allocation mechanism to establish a stable, collision-free one-to-one data link with the target beacon. After the connection is established, the UWB tag, based on the extended IEEE 802.15.4 protocol, encapsulates the acquired coordinate and region parameters into a MAC layer custom payload and sends it to the target UWB beacon in the form of a configuration command frame.
[0044] In a preferred embodiment, in steps S14 and S15, after receiving the configuration command, the UWB beacon chip verifies the data packet. Upon successful verification, it calls the underlying driver to erase and write to the internal FLASH memory, permanently fixing the three-dimensional coordinates and region parameters. After the FLASH is written, the UWB beacon program automatically refreshes the underlying broadcast message register, automatically replacing the coordinate field in the next periodic broadcast packet with the actual set coordinate value instead of the default 0. From this point on, any subsequent UWB tag entering the area only needs to receive the broadcast frame to directly extract the UWB beacon coordinates for positioning calculation, achieving seamless integration and "plug and play".
[0045] In this embodiment, a regular tag with a network module acts as a "portable configuration device." After receiving tasks from the cloud, the UWB tag automatically sends parameters to UWB beacons along its route and stores them as it moves. A single portable UWB tag replaces the entire expensive fixed gateway network. This achieves contactless, batch automatic data transmission while eliminating the hardware and software investment required for deploying dedicated configuration gateways.
[0046] In summary, Embodiments 1 and 2 propose a UWB-based indoor and outdoor real-time positioning method. By conveniently configuring UWB beacons, the difficulty and cost of UWB positioning are reduced. At the same time, by opening a dedicated receiving window for UWB tags, tag signal collisions are avoided, ensuring the accuracy and timeliness of tag data reception.
[0047] The technical means disclosed in this invention are not limited to those disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications are also considered within the scope of protection of this invention.
Claims
1. A UWB-based indoor and outdoor real-time positioning method, characterized in that, Includes the following steps: S1, the UWB beacon initiates a broadcast, and after receiving the broadcast, the UWB tags within the coverage area of the broadcast communicate with the UWB beacon and perform bilateral two-way ranging; S2, the UWB beacon marks each UWB tag that has completed ranging, and sets up a separate receiving window for the marked UWB tag.
2. The UWB-based indoor / outdoor real-time positioning method according to claim 1, characterized in that, Step S1 includes: S11, the UWB tag connects to the cloud management platform and obtains the unique identification code of all the UWB beacons in the current environment, as well as the corresponding distribution area and coordinates; S12, the UWB beacon initiates a broadcast with its own unique identification code in the current area; S13, the UWB tag receives the broadcast, parses and obtains the unique identification code of the UWB beacon, and retrieves the distribution area and coordinates of the UWB beacon based on the unique identification code of the UWB beacon; S14, the UWB tag initiates bilateral two-way ranging to the coordinates of the acquired UWB beacon.
3. The UWB-based indoor and outdoor real-time positioning method according to claim 1, characterized in that, Step S1 includes: S11, the UWB tag connects to the cloud management platform and obtains the preset area and coordinate data of the UWB beacon to be configured in the current environment; S12, the UWB beacon to be configured initiates a broadcast with blank areas and coordinate data; S13, when the UWB tag receives a broadcast containing the blank area and coordinate data, it configures the preset area and coordinate data to the UWB beacon; S14, the UWB beacon saves and solidifies the preset area and coordinate data, and updates the broadcast content to carry the preset area and coordinate data when the broadcast is initiated again; S15, when the UWB tag receives a broadcast initiated by the UWB beacon carrying the preset area and coordinate data, it performs bilateral two-way ranging with the UWB beacon.
4. A UWB-based indoor / outdoor real-time positioning method according to claim 2 or 3, characterized in that: A step is set before step S2. SX, waiting to enter the next broadcast cycle of the UWB beacon.
5. The UWB-based indoor / outdoor real-time positioning method according to claim 4, characterized in that, In step S1, bilateral two-way ranging is performed, including: Obtain the absolute ranging values between the UWB tag and the UWB beacon; The initial positioning coordinates are linearly calculated using a preset algorithm; The optimal coordinates of the UWB tag are calculated iteratively.
6. The UWB-based indoor / outdoor real-time positioning method according to claim 5, characterized in that, The iterative calculation of the optimal coordinates of the UWB tag includes: Let the state vector of the UWB tag be x = ; The state estimate at the k-th iteration is ; Let the iterative formula be, ; Where J represents in The first-order partial derivative matrix at; Represents the residual vector; This represents the weight matrix.
7. The UWB-based indoor / outdoor real-time positioning method according to claim 6, characterized in that: The residual vector The i-th element Defined as, ; The residual vector Represented as a column vector, ; in, This indicates the difference in actual observed distance; This represents the difference in distance calculated theoretically.
8. The UWB-based indoor and outdoor real-time positioning method according to claim 7, characterized in that, Following step S2, the following step is also included: S3. The motion trajectory of the UWB tag is obtained after smoothing and filtering based on multiple optimal solution coordinates.
9. The UWB-based indoor and outdoor real-time positioning method according to claim 8, characterized in that, In step S3, a smoothing filter is performed, including: Based on the optimal solution coordinates and preset motion model of the previous moment, the current preset motion coordinates of the UWB tag are calculated, and the error covariance of the filtering model is updated. Calculate the difference between the current optimal solution coordinates and the preset motion coordinates; Constructing a dynamic measurement noise matrix , ; The coordinates of any of the outstanding optimal solutions are filtered based on the error covariance and the dynamic measurement noise matrix to generate a smooth motion trajectory of the UWB tag. in, This represents the variance of the basic measurement noise under ideal conditions; Indicates the first The horizontal geometric precision factor at any given time reflects the quality of the base station layout; Indicates the first The root mean square of the residuals at time step 1; This represents the weighting coefficient.
