Research on UWB-Based Indoor Ranging Positioning Technology

In recent years, with the development of the Internet and Internet of Things technology, people’s demand for high-precision indoor positioning technology is increasing. The traditional ranging positioning methods (such as Bluetooth, ultrasound, GPS, etc.) have some limitations. In this paper, an indoor location ranging method based on UWB technology, TOA and TOF principle is proposed. UWB is widely used in high-precision indoor positioning because of its strong anti-interference performance, high transmission rate, wide bandwidth, low power consumption, and low transmission power. An inverse star location model was established based on the principle of spatial 4-point location. This scheme adopts STM32 to control DW1000 to realize the UWB signal to receive and dispatch on the hardware. The software algorithm uses the TOA and TOF principles combined with the spatial 4-point positioning method to determine the location of the target point. In addition, the accuracy of the system was tested and corrected through experiments, which further improved the system accuracy.


Introduction
UWB (Ultra Wideband, UWB) is a carrierless communication ultra-wideband communication technology that uses narrow pulses from nanoseconds to microseconds to transmit data. It can achieve data transfer rates of hundreds of Mbit / s to several Gbit / s in the range of tens to hundreds of meters. At the same time, it has many advantages such as strong anti-interference performance, high transmission rate, extremely wide bandwidth, low power consumption, and low transmission power [1]. As early as the 1940s (1942), De Rose submitted a patent involving the UWB random pulse system, but it was not published until the 1950s (1954) because of the Second World War. The US patent of Ross & Robbirls (R&R) was published in 1974 and is the earliest landmark patent for UWB communications [2]. UWB is currently mainly used in indoor communication/positioning, high-speed wireless LAN, home network, cordless telephone, security detection, radar and other fields [3]. Especially in the indoor positioning field UWB has a unique advantage. Since the UWB system uses pulses of nanosecond duration as the transmission signal, the time resolution is relatively high, and the TOA (Time of Arrival, TOA) and TOF (Time of Flight, TOF) based ranging positioning methods become the most common methods for UWB positioning systems [4]. For indoor positioning technology, a single acquisition of a target data is difficult to meet the position accuracy requirements, currently collecting multiple data in the target scene, and then through real-time

System Hardware Implementation
Based on UWB technology, the system uses a microprocessor (MCU) to control the UWB sensor's UWB signal reception and transmission at the node. We chose DecaWave's UWB sensor DW1000 as the UWB sensor and STMicroelectronics' STM32F103 as the on-chip MCU. Node hardware block diagram is shown in Figure 2. The MCU is connected to the UWB sensor DW1000 through the SPI interface. The SPI uses the 4wire connection method (CS, SLK, MISO, and MOSI). DW1000 to transmit and receive UWB signals through the on-board antenna. At the same time, we also reserved a program debugging interface (connected to the serial port of the MCU) to facilitate debugging. DW1000 is an excellent UWB sensor. It is a low-power, low-cost wireless transceiver chip that conforms to the IEEE802.15.4-2011 UWB standard. It supports accurate positioning and synchronous data transmission, high positioning accuracy, and strong anti-multipath capability. It supports TOF. Ranging and TOA accurate positioning support 6 bands from 3.5GHz to 6.5GHz; but in China, DW1000 only channel5 and channel7 are valid [7]. DW1000 data transmission rate is 110 kbps, 850 kbps, 6.8 Mbps, low power consumption, DW1000 transmit power is less than WIFI transmit power. The sleep mode current is 1μA, and the deep sleep current loss value is 50nA. It has a complete MAC layer support software and provides an SPI interface to the processor. And the package size is small, suitable for on-chip micro system development. The circuit board we designed is shown in Figure 3.

System Software Implementation
The system uses the on-chip MCU of the node to control the DW1000 to send and receive UWB signals. Through the serial port of the MCU, programs are written to achieve system functions. In terms of specific software implementation, we use Keil's MDK5 software platform to control the STM32 to read data from the DW1000 sensor through a program. Both are connected via SPI. When the STM32 receives the data, it is first stored in an array Buffer. After a simple processing, the data is collected on a data acquisition node. After the data is processed, the convergence node uploads the data to the PC through a wireless method. The system software flow chart is shown in Figure 4.

Positioning/Ranging Principle and Algorithms
The system uses TOA and TOF combined indoor positioning algorithm, through the TOF algorithm to calculate the distance between the target node and the data acquisition node, and then use the TOA algorithm to calculate the relative position of the target node and the data acquisition node, and then according to the location of the data acquisition node It knows the location of the target node in the target area. When placing the data acquisition node in a predetermined target area, it is necessary to determine the coordinate position of each data acquisition node and establish a virtual coordinate map. The single node's ranging principle is shown in Figure 5. Data node A sends a UWB signal to target node B and records time node Ta1. When the target node receives the signal sent by node A and records this time as Tb1, then target node B sends feedback UWB signal to A at time Tb2. When node A receives the UWB signal, it records this time as Ta2. The speed of UWB signal transmission in air is approximately the speed of light (C). So we can calculate the distance between node A and node B according to formula (1) [8].

Figure 5. Schematic diagram of distance measurement principle
After a single data acquisition node's ranging calculation, we can know the distance from the target node to each data acquisition node that is pre-positioned. Then we can find the location of the target node in space according to the spatial 4-point positioning, as shown in Figure 6. Show. It is known that the position coordinates of the four-point space are A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3), and D(x4, y4, z4). Assuming that the target node has a spatial location of (x, y, z), the distances from the target node to the four data collection nodes are calculated by TOF and TOA as D1, D2, D3, and D4, respectively. Then according to the following calculation method, the position coordinates of the target node can be calculated. List equations (2) based on known conditions. (x-x 1 ) 2 +(y-y 1 ) 2 +(z-z 1 ) 2 =D 1 2 (x-x 2 ) 2 +(y-y 2 ) 2 +(z-z 2 ) 2 =D 2 2 (x-x 3 ) 2 +(y-y 3 ) 2 +(z-z 3 ) 2 =D 3 2 (x-x 4 ) 2 +(y-y 4 ) 2 +(z-z 4 ) 2 =D 4 2 (2) Solve the above equations to get the following calculation equations (3): Then we can simplify the above equations to get the following equations(4): The above equations (4) are converted to a matrix form as shown below equations (5): Then we are doing some inverse matrix operations to find the values of x, y, and z.

Test Verification
The technical core of this system is the ranging accuracy of the system, the distance accuracy from the target node to the data acquisition node. Therefore, we measure the system accuracy by measuring the distance from the data acquisition node to the target node. We fixed the data acquisition node, and then let the target node move along a straight line from 1-10m. The data acquisition node sends the collected data to the host computer. We then use MATLAB to analyze the data, as shown in Figure 7 below.  Figure 7, the inclined straight line is the actual moving straight line, and the curve is the curve drawn by the data collected by the data acquisition node. The horizontal axis indicates the number of UWB signals received by the data acquisition node, and the vertical axis indicates the distance in meters. It can be seen from the figure that there is a certain error between the distance measured by UWB and the actual value during the movement of the node. Through repeated experiments, we made an error correction based on the data shown in Formula (6).
In Formula (6), D is the data before correction, R is the corrected data, and D and Rare in millimeters. The revised data is shown in Figure 8. After the correction, we let the node stabilize at a distance of 2 meters and begin to move. Figure 8 shows that the average error of data after correction is about ±0.2m, and the accuracy after correction is greatly improved.

Conclusion
Indoor positioning technology using UWB technology has the advantages of high accuracy, low power consumption, and high transmission speed. At present, positioning based on UWB technology mostly uses a positioning method based on measurement distance. This paper introduces a UWB indoor location ranging method based on TOA and TOF combination. The specific schemes of software and hardware are given, and the accuracy of the system is tested through experiments. A method to improve the